-
Notifications
You must be signed in to change notification settings - Fork 12
03. Edition Definitions
Use Edition definitions to specify the modifiers that an edition gives or to give modifiers under centain conditions. Right now it only works with chips, Xchips, mult, Xmult, ^mult and dollars.
Define a new Edition as follows:
local jd_edition_def = JokerDisplay.Edition_Definitions
jd_edition_def["e_prefix_key"] = {
-- Definition
}An Edition definition is composed by the following values (all of them mandatory):
-
condition_function: (function) This function checks if the condition is fulfilled to applymod_function. -
mod_function: (function) This function is used to add extra modifiers to Jokers.
This function checks if the condition is fulfilled to apply mod_function. It's always checked when updating the display.
-
Arguments:
-
card: The Joker being calculated
-
-
Returns:
- bool:
trueifmod_functionshould apply
- bool:
-- Cryptid's Mosaic Edition
-- Checks if card has the edition
condition_function = function(card)
return not card.debuff and card.edition and card.edition.key and card.edition.key == "e_cry_mosaic"
end-- Checks for card's key
condition_function = function(card)
return not card.debuff and card.config.center_key == "j_bloodstone"
endThis function is used to add extra modifiers to Jokers. I.e. extra chips, Xchips, mult, Xmult, ^mult or dollars. See JokerDisplay.calculate_joker_modifiers.
-
Arguments:
-
card: The Joker being calculated
-
-
Returns:
-
modifiers: Modifiers to be added. Modifiers can bechips,x_chips,mult,x_mult,e_multand/ordollars. You can return multiple.
-
-- Cryptid's Mosaic Edition
-- Adds Xchips
mod_function = function(card)
return { x_chips = card.edition.x_chips }
end