Griftlands

Griftlands

Playable Plundak Prototype
 This topic has been pinned, so it's probably important
codyfun  [developer] 10 Apr, 2022 @ 10:01am
Mod Compatibility API
This mod automatically detects if the following fields are present in your card data, and collects them for usage:
pc_plundak_classes
Set to 0 (zero) for cards that should always be able to show up. Set to a table of strings (can be size one), e.g. {"COMBO"}, to list classes that Plundak must be required to have for this card to show up.
pc_plundak_defense
Set to any truthy value for cards that prevent damage (via defense/composure, evasion/shielding, etc.). Plundak is required to have at least a certain number of protective cards for each rarity, and the mod considers cards with this field for this purpose.



Additionally, this mod adds the following global functions (as long as your mod uses them after this one finishes loading—use load_after or return a function containing all compatibility code at the end of your OnLoad to guarantee this):
SuperBrawlAPI.AddTypeRequire(class, ...)
Marks the class class as requiring Plundak to have one or more classes provided as additional arguments to this function, e.g. SuperBrawlAPI.AddTypeRequire("SURGE", "CHARGE"), before it can be considered as available to her.
SuperBrawlAPI.AddTypeClash(...)
Two or more classes provided as arguments to this function, e.g., SuperBrawlAPI.AddTypeRequire("BLEED", "BURN"), may never simultaneously be available to Plundak.
SuperBrawlAPI.AddTypeFunction(class, func)
Pass a function that takes one table as an argument to be ran if Plundak picks up that class. The table contains the members classes (a list of all classes Plundak has), owner (Plundak's agent), and hp_delta (an integer that will be added to/removed from Plundak's total HP, such as with Charge and Moxie).
SuperBrawlAPI.GetFlourishData()
Returns two tables (make sure you get both! e.g., flourishes, negotiation_flourishes = SuperBrawlApi.GetFlourishData()), which can be appended to in order to add support for new flourishes. Entries take the form of a table with one to three members: {id = "the card ID of the flourish", basic = (a boolean, if it's a basic flourish or not), req = "(optional) CLASSNAME, only if this flourish should require a class to be available"



The classes I have manually labelled the base game's cards as having are as follows:
BLEED COMBO DISCARD IMPROVISE BURN CHARGE CONCENTRATION EMPTY SURGE RICOCHET ADRENALINE DRINK SELF_DAMAGE SMITH_REGENERATION TRAUMA THRESHOLD DISCARD_N GAMBLE HEADS PREPARE SNAILS RENOWN SELF_DAMAGE_N
  • BURN includes Scorched.
  • CHARGE includes Fully Charged.
  • DRINK includes Empty Bottles.
  • SELF_DAMAGE includes Alleviate.
  • GAMBLE includes Rig and Set.
  • SELF_DAMAGE_N includes instant destruction of your own arguments.
Last edited by codyfun; 25 Jun, 2022 @ 5:03pm