Balatro
You are viewing a potentially older version of this package. View Latest Version
Install with App

Details

Date Uploaded
20 hours ago
Downloads
61
Size
172KB

Project logo

Status GitHub Issues License


All new special combinations of jokers!

📝 Table of Contents

🧐 About

Fusion Jokers is a mod that allows players to combine jokers into special powerful new Fusion Jokers!

When you have a fusable joker, pressing on it will show a "fuse" button. When you have the correct jokers, and enough money, you can combine the jokers into a powerful Fusion!

Showcase of jokers tab 5

There are a total of 17 fusions added in the mod, two of which are exclusive to Six Suits!

You can find a list of their abilities, as well as the jokers needed to make them, in this link: https://itayfeder.github.io/Fusion-Jokers/

⬇ How to Download

  • The mod requires Steamodded. You can see info about how to use it here
  • Download the latest release of Fusion Jokers from the releases tab (should be stable), or the latest commit from the green "Code" button up there (might include bugfixes for some dumb thing I overlooked earlier)
  • Extract the downloaded mod to the Mods folder (at %appdata%/Balatro/Mods)

⚙️ Config

  • Block used components from reappearing: Jokers used in a fusion cannot reappear if the fusion is present. Default true.
    • These Jokers can reappear regardless if Showman or a Showman-like effect is active, if the fused Joker's in_pool() has {allow_returning_components = true} in its second return value, or if the component Joker's in_pool() has {allow_duplicates = true} in its second return value.
  • Alt art for Club Wizard: A lighter color to better match high-contrast Clubs.
  • No price flickering: Stop the fusion cost from flickering when multiple fusions are possible.

➕ Fusion API (For Developers)

The mod adds a way for other developers to create their own fusions!

Developers can call the function FusionJokers.fusions:register_fusion() to register their own fusion to the game. The function also allows them to determine carried stats between the component jokers and the fusion joker.

FusionJokers.fusions:register_fusion{
  jokers = {
      --First component Joker; all values except "name" optional
			{ name = "j_modprefix_key", carry_stat = "stat_to_carry", merge_stat = "stat_to_merge" },
      --       String, key of component 1      String, name of stat          String, name of stat
      --                                               to carry over                 to merge                                  
			{ name = "j_modprefix_key", carry_stat = "stat_to_carry", merge_stat = "stat_to_merge" },
      --Second component Joker; same values.
      --This works for arbitrary numbers of additional Jokers
      --if you want to do the Exodia thing.
  },
  result_joker = "j_modprefix_key", --String, key of result Joker
  cost = number,                    --Number, cost in $ to fuse this recipe
  requirement = func,               --Optional function; fusion can only be carried out if this function returns `true`.
  merged_stat = "stat",             --Optional string, name of stat that contains "merge_stat"s above
  aftermath = func,                 --Optional function; will be run after the fusion is complete.
}

[!NOTE] Carried and merged stats always go in the new Joker's ability.extra table now! You also no longer need to specify whether the component Jokers' abilities are in an extra table or not; this is now detected automatically.

[!NOTE] The old add_fusion method is depreciated and kept only for compatibility; please switch to register_fusion at your earliest convenience! You should be able to use this regex to quickly swap everything in your codespace.

When fusing, calculation is called with the following context:

context = {
  fusing_jokers = true, --Boolean to flag this context
  fusion_components = {
    [1] = Card, --first Joker to be fused away
    [2] = Card, --next Joker to be fused away
    --and so forth
  },
  fusion_result = Card --resulting Joker
}

Fusions can be discounted by indexing a number to the final joker's key in G.GAME.fujo_fusion_discount for a flat discount in dollars, or G.GAME.fujo_fusion_discountpercent for a percentage discount. Alternately, index at the universal key for a discount that applies to all fusions. (Decimals always round down; minimum $1 after all discounts.)

Fusion recipes add the attributes fusion_ingredient to their components, and fusion_result to their results. Use this info however you see fit!

🎉 Credits

  • The original mod was written by Itayfeder, with art created by Lyman
  • elbe maintained the mod for several months through breaking Steamodded changes, and added some features
  • wingedcatgirl (hi!) is the current mod maintainer and has added a number of updates
Thunderstore development is made possible with ads. Please consider making an exception to your adblock.