#Calculation Triggers and Contexts

55 messages · Page 1 of 1 (latest)

fleet wedge
#

Evaluate play flow

  1. populate scoring_hand with cards that are scored

  2. get base hand_chips and mult from the played poker hand

  3. for each joker, call eval_card with context: cardarea = G.jokers full_hand = G.play.cards scoring_hand = scoring_hand scoring_name = text poker_hands = poker_hands before = true This evaluation call looks for level_up effects

  4. reset hand_chips and mult based off any level_up effects

  5. check to see if a blind affects the base mult and chips and set accordingly

#
  1. iterate through each card in the scoring_hand
    i) if the card is debuffed, stop
    ii) call eval_card with context: repetition_only = true cardarea = G.play full_hand = G.play.cards scoring_hand = scoring_hand scoring_name = text poker_hands = poker_hands repetition = true This evaluation call looks for repetitions effects in seals

    iii) iterate through G.jokers.cards calling eval_card with context: cardarea = G.play full_hand = G.play.cards scoring_hand = scoring_hand scoring_name = text poker_hands = poker_hands other_card = scoring_hand[i] -- this card is the current playing card repetition = true This evaluation call looks for repetitions effects in jokers

    iv) for each repetition
    a) call eval_card with context: cardarea = G.play full_hand = G.play.cards scoring_hand = scoring_hand scoring_name = text This evaluation finds base values in the playing card or edition and is saved in effects

     b) iterate through `G.jokers.cards` calling `calculate_joker` with context:```
    

cardarea = G.play
full_hand = G.play.cards
scoring_hand = scoring_hand
scoring_name = text
poker_hands = poker_hands
other_card = scoring_hand[i] -- this card is the current playing card
individual = true``` What does this do? saved in effects

    c) iterate through `effects` and look for:```

chips
mult
p_dollars
dollars
extra.mult_mod
extra.chip_mod
extra.swap
extra.func
x_mult
edition.chip_mod
edition.mult_mod
edition.x_mult_mod```

#
  1. iterate through each card in G.hand.cards
    i) establish the repetition loop reps

    ii) call eval_card with context: cardarea = G.hand full_hand = G.play.cards scoring_hand = scoring_hand scoring_name = text poker_hands = poker_hands This evaluations checks for effects on the playing cards saved in effects

    iii) iterate through G.jokers.cards calling calculate_joker with context: cardarea = G.hand full_hand = G.play.cards scoring_hand = scoring_hand scoring_name = text poker_hands = poker_hands other_card = G.hand.cards[i] individual = true This evaluation checks for joker effects on cards held in the hand saved in effects

    iv) begin checks for hand doubling
    a) call eval_card with context: repetition_only = true cardarea = G.hand full_hand = G.play.cards scoring_hand = scoring_hand socring_name = text poker_hands = poker_hands repetition = true card_effects = effects This evaluation checks for repetitions effects in seals

     b) iterate thourhg `G.jokers.cards` calling `eval_card` with context:```
    

cardarea = G.hand
full_hand = G.play.cards
scoring_hand = scoring_hand
scoring_name = text
poker_hands = poker_hands
other_card = G.hand.cards[i]
repetition - true
card_effects = effects``` This evaluation checks for repetitions effects in jokers

v) iterate through `effects` and look for:```

dollars
h_mult
x_mult
message```

#
  1. iterate through each card in G.jokers.cards and G.consumeables.cards
    i) call eval_card with the context: cardarea = G.jokers full_hand = G.play.cards scoring_hand = scoring_hand scoring_name = text poker_hands = poker_hands edition = true This evaluation checks for chip_mod and mult_mod from editions

    ii) call eval_card with context: cardarea = G.jokers full_hand = G.play.cards scoring_hand = scoring_hand scoring_name = text poker_hands = poker_hands joker_main = true This evaluation checks for mult_mod, chip_mod and Xmult_mod from jokers

    iii) iterate through each card in G.jokers.cards and call calculate_joker with context: full_hand = G.play.cards scoring_hand = scoring_hand scoring_name = text poker_hands = poker_hands other_joker = _card This evaluation checks for mult_mod, chip_mod and Xmult_mod from joker on joker interactions

    iv) check for any x_mult_mod in edition_effects from 8.i

  2. call G.GAME.selected_back:trigger_effect with context final_scoring_step

  3. set chips and mult accordingly

#
  1. iterate through scoring_hand
    i) iterate through G.jokers.cards and call calculation_joker with context: destroying_card = scoring_hand[i] full_hand = G.play.cards This evaluation checks to see if a joker destroys a played card

    ii) Glass card calculation
    iii) set card.destroyed as true and populate cards_destroyed

  2. iterate through G.jokers.cards and call eval_card with context: cardarea = G.jokers remove_playing_cards = true removed = cards_destroyed This evaluation checks to see if a joker has an effect on a removed card

  3. remove destroyed cards

  4. IF the hand is debuffed

    1. set mult and hand_chips to 0
    2. iterate through G.jokers.cards calling eval_card with context: cardarea = G.jokers full_hand = G.play.cards scoring_hand = scoring_hand scoring_name = text poker_hands = poker_hands debuffed_hand = true This evaluation checks to see if a joker has an effect on playing a debuffed hand
#
  1. multiply the hand_chips and mult and add to the current score
  2. iterate through G.jokers.cards calling eval_card with context: cardarea = G.jokers full_hand = G.play.cards scoring_hand = scoring_hand scoring_name = text poker_hands = poker_hands after = true This evaluation checks for joker effects after the hand is scored
#

Other joker calculations

End of round

  1. Iterate through G.jokers.cards calling calculate_joker with context: end_of_round = true game_over = game_over -- true or false This evaluation checks for saved effects
    rental and perishable calculations also happen here

  2. If the game is not over, iterate through G.hand.cards
    i) establish the repetition loop reps
    ii) calculate get_end_of_round_effect on the current card with no context
    This evaluation looks for h_dollars
    iii) call eval_card with context: end_of_round = true cardarea = G.hand repetition = true repetition_only = true This evaluation looks for repetitions effects from seals

    iv) call eval_card with context: cardarea = G,hand other_card = G.hand.cards[i] repetition = true end_of_round = true card_effects = effects This evaluation looks for repetitions effects from jokers

    v) iterate through effects and look for: h_dollars extra

#

Discard cards from highlighted

  1. iterate through G.hand.cards calling eval_card with context: pre_discard = true full_hand = G.hand.highlighted hook = hook This evaluation looks for cards that do something to a discarded hand before it is discarded
  2. iterate through G.jokers.cards calling calculate_joker with context: pre_discard = true full_hand = G.hand.highlighted hook = hook This evaluation looks for jokers that do something to a discarded hand before it is discarded
  3. iterate through G.hand.cards calling eval_card with context: discard = true full_hand = G.hand.highlighted This evaluation looks for remove effects from cards when it is discarded
  4. iterate through G.jokers.cards calling calculate_joker with context: discard = true other_card = G.hand.highlighted[i] full_hand = G.hand.highlighted This evaluation looks for remove effects from jokers when a card is discarded
  5. if there are any destroyed cards in the discarded cards, call calculate_joker with context: cardarea = G.jokers remove_playing_cards = true removed = destroyed_cards This evaluation checks to see if a joker has an effect on a removed card
#

New round

  1. iterate through G.jokers.cards calling calculate_joker with context: setting_blind = true blind = G.GAME.round_resets.blind This evaluation checks to see if a joker has an effect when a blind is selected

Use consumeable

  1. When a consumeable removes a card, iterate through G.jokers.cards calling calculate_joker with contet: remove_playing_cards = true removed = destroyed_cards

Open a booster

  1. iterate through G.jokers.cards calling calculate_joker with context: open_booster = true card = self

Redeem voucher

  1. iterate through G.jokers.cards calling calculate_joker with context: buying_card = true card = self

Calculate joker

  1. if joker is Blueprint or Brainstorm call calculate_joker with the same context

Update draw to hand

  1. on the first hand of a round, iterate through G.jokers.cards calling calculate_joker with context first_hand_drawn = true

Use card

  1. If card is consumeable, iterate through G.jokers.cards calling calculate_joker with context: using_consumeable = true consumeable = card
#

Sell joker

  1. When a joker is sold, call calculate_joker with context selling_self = true

Sell card

  1. If selling card, iterate through G.jokers.cards calling calculate_joker with context: selling_card = true card = card

Buy from shop

  1. When buying a joker, call calculate_joker with context: buying_card = true card = c1
  2. iterate through G.jokers.cards calling calculate_joker with context: buying_card = true card = c1

Toggle shop

  1. If leaving the shop, iterate through G.jokers.cards calling calculate_joker with context ending_shop = true

Reroll shop

  1. If rerolling the shop, iterate through G.jokers.cards calling calculate_joker with context reroll_shop = true

Skip booster

  1. If skipping a booster pack, iterate through G.jokers.cards calling calculate_joker with context skipping_booster = true

Skip blind

  1. If skipping a blind, iterate through G.jokers.cards calling calculate_joker with context skip_blind = true

Playing card added

  1. When adding a playing card, iterate through G.jokers.cards calling calculate_joker with context: playing_card_added = true cards = cards
robust edge
#

Putting a message here just so this thread shows up easier for the next few days

finite wedge
#

forum pin when

robust edge
#

This seriously needs to be pinned given how much I'm using it these days

finite wedge
#

@topaz harbor forum pin when?

topaz harbor
#

While I'm happy to give out pins within threads, pinning a thread in the forums needs an extremely good reason imho
Just download the documentation and keep it for yourself

#

Of course if a bunch of other regulars were to come in here and yell for a pin that's a different story

finite wedge
pearl tundra
#

fine, I'll vote for pin

worn forge
#

Maybe just make pinned a FAQ thread as well

subtle coral
wild isle
#

+1 for pin

finite wedge
subtle coral
finite wedge
#

i didnt even notice that 💀

#

(lets just play it as if i said this sarcastically, hence the exclamation mark at the end!)

stoic wren
#

I'm bumping this because I found it through a link to a link to a link and if it had been pinned I would have started my mod a week ago instead of staring at the source code being confused.

fleet wedge
#

I'll be rewriting this for the smods wiki at some point so at least it'll be easy to find then

stoic wren
#

You do this community a great service

real anvil
#

Still wanna say this is one of the most important tools just, we're using for modding.
Consider this a bump of approval

robust sphinx
#

Dropping a message so I can find this easier

loud atlas
#

bumping so i can find

sharp crystal
#

thx bro

lethal dawn
normal trail
#

Bumping this also because this is still like an incredible resource

dense heart
#

is this a good time to bump this

grizzled galleon
#

anytime is a good time honestly

#

i wish id have seen this sooner

undone rover
#

bumping this for the future

floral lance
#

bump so this gets seen more

tired cosmos
#

we've bumbed it enoufh for this week

floral lance
#

its never bumped enough

tired cosmos
#

aight bet

polar dawn
#

saving this for the future

barren pecan
#

Mate, there's a follow button to just add it to the list on the left

#

Not that I particularly mind or care if you bump threads

fast pasture
#

if there's no activity in a thread for a few days, discord will hide that thread on the list even if you are following the thread

#

so you have to go and find it again anyways

barren pecan
#

ah very fair

#

does ctrl+k stop bringing it up too? I know that's fickle too

#

Discord, man

tired cosmos
#

should have a keybind to show it forever lol

#

or like in the settings

#

somesort of personal pin

opaque rain
#

message so i can sift through this later