-
Notifications
You must be signed in to change notification settings - Fork 6
Suit and rank levels
(Suit levels from Entropy; rank levels derived from it)
Suits can be levelled up to increase the amount of chips and/or mult they give. This is done via the function Spectrallib.level_suit(suit, card, level_amt, chips, mult, instant, display_all). Similarly, ranks can be levelled up to increase the amount of chips and/or mult they give. This is done via the function Spectrallib.level_rank(rank, card, level_amt, chips, mult, instant, display_all); information about both of these functions can be found in the following section.
When a suit or rank is levelled up, its level and bonus information can be found on a card of said suit.
Consumables that define level_suit (a suit's key) in its config table will level up the corresponding suit. Similarly, consumables that define level_rank (a rank's key) in its config table will level up the corresponding rank. These are analogous to defining hand_type for Planet Cards.
Both of the following functions share the following parameters:
-
card- The card responsible for the level-up; used in some animations. -
level_amt- Optional: The number of levels to add to the suit. -
chips- Optional: If specified, chips on a suit will increase by this amount instead of the default 10. -
mult- Optional: If specified, mult on a suit will increase by this amount instead of the default 0. -
instant- Optional: If true, no animation plays. -
display_all- Optional: If true, parameters with an increase of 0 (i.e.chips_override = 0) will not be displayed as "...".
Levels up a suit. suit is the suit's key. If suit == 'suitless', the "pseudosuit" that suitless cards are associated with will be levelled up; then suitless cards gain bonus chips/mult.
Levels up a rank. rank is the rank's key. If rank == 'rankless', the "pseudorank" that rankless cards are associated with will be levelled up; then rankless cards gain bonus chips/mult.
Get the total amount of bonus chips from all of the card's suits (that is, multi-suits are recognized).
Get the total amount of bonus mult from all of the card's suits (that is, multi-suits are recognized).
This method returns a list of tables of the following form:
{
key = string, -- Suit's key
loc_key = string, -- Suit's localization key
level = number, -- Suit's level
chips = number, -- Suit's bonus chips
mult = number, -- Suit's bonus mult
}Get the total amount of bonus chips from the card's rank.
Get the total amount of bonus mult from the card's rank.
This method returns a list of tables of the following form:
{
key = string, -- Rank's key
loc_key = string, -- Rank's localization key
level = number, -- Rank's level
chips = number, -- Rank's bonus chips
mult = number, -- Rank's bonus mult
}The aforementioned table is made for the card's rank.
This API hooks the following functions:
-
Card:get_chip_bonus- Also counts bonus chips from any of the card's suits and rank. -
Card:get_chip_mult- Also counts bonus mult from any of the card's suits and rank. -
Card:use_consumeable- If a consumable defineslevel_suit, which is a suit's key, in its config table, level up the corresponding suit when used. If a consumable defineslevel_rank, which is a rank's key, in its config table, level up the corresponding rank when used.