-
Notifications
You must be signed in to change notification settings - Fork 29
Custom Contexts
Every context added by Paperback can be easily accessed through the context parameter within your calculate function, they will all be located under the context.paperback field to avoid any conflicts with other mods.
This context is used for effects that happen when the "Cash Out" button is pressed.
context.paperback = {
cashing_out = true
}This context is used for effects before a Tag is activated.
context.paperback = {
using_tag = true,
tag = self -- Tag: the tag that was activated
}This context is used for effects when a Tag is added.
context.paperback = {
tag_acquired = true,
tag = tag, -- Tag: the tag that was acquired
}This context is used for effects after a joker is destroyed.
context.paperback = {
destroying_joker = true,
destroyed_joker = self -- Card: the joker that was destroyed
}Warning
When using this, ensure that your own joker isn't the one being destroyed: card ~= context.paperback.destroyed_joker
This context is used for effects after a hand's level has been increased.
context.paperback = {
level_up_hand = true
}This context is used to collect repetitions from other playing cards
context.paperback = {
repetition_from_playing_card = true,
other_card = card, -- the card that would be retriggered if at least 1 repetition was returned
cardarea = card.area, -- the area where the card is
scoring_hand = context.scoring_hand, -- the scoring hand, if any
}Warning
This is a W.I.P and currently only supports calculating repetitions from Enhancements
This context is used for modifying cards in a hand right before they're highlighted. Currently used by Black Rainbows and Bismuth
context.paperback = {
modify_final_hand = true,
scoring_hand = final_scoring_hand,
full_hand = G.play.cards
}Allows adding to the amount of cards drawn at any time.
context.paperback = {
drawing_cards = true,
amount = hand_space, -- integer: the amount of cards drawn initially (does not take into account cards added by this context)
}