@@ -471,6 +471,86 @@ function Game:update(dt)
471471 G .STATE = G .STATES .SELECTING_HAND
472472 G .STATE_COMPLETE = false
473473 end
474+ if
475+ G .STATE == G .STATES .HAND_PLAYED
476+ and to_big (G .GAME .chips ) > to_big (G .GAME .blind .chips )
477+ and not G .hand .cards [1 ]
478+ and not G .deck .cards [1 ]
479+ then
480+ -- im having to manually recreate some of this idk why
481+ G .RESET_BLIND_STATES = true
482+ G .RESET_JIGGLES = true
483+ G .GAME .blind .in_blind = false
484+ G .E_MANAGER :add_event (Event ({
485+ trigger = ' after' ,
486+ delay = 0.3 ,
487+ func = function ()
488+ if G .GAME .blind .config .blind .cry_before_cash and not G .GAME .blind .disabled then
489+ G .GAME .blind :cry_before_cash ()
490+ else
491+ G .GAME .cry_make_a_decision = nil
492+
493+ G .STATE = G .STATES .ROUND_EVAL
494+ G .STATE_COMPLETE = false
495+ end
496+
497+ if G .GAME .blind_on_deck == ' Small' then
498+ G .GAME .round_resets .blind_states .Small = ' Defeated'
499+ elseif G .GAME .blind_on_deck == ' Big' then
500+ G .GAME .round_resets .blind_states .Big = ' Defeated'
501+ else
502+ if G .GAME .current_round .cry_voucher_stickers .pinned == false then
503+ G .GAME .current_round .voucher = SMODS .get_next_vouchers ()
504+ G .GAME .current_round .cry_voucher_stickers = Cryptid .next_voucher_stickers ()
505+ G .GAME .current_round .cry_voucher_edition = cry_get_next_voucher_edition () or {}
506+ G .GAME .current_round .cry_bonusvouchers = {}
507+ G .GAME .cry_bonusvouchersused = {} -- i'm not sure why i'm putting these in two separate tables but it doesn't matter much
508+ for i = 1 , G .GAME .cry_bonusvouchercount do
509+ G .GAME .current_round .cry_bonusvouchers [i ] = SMODS .get_next_vouchers ()
510+ end
511+ if G .GAME .modifiers .cry_no_vouchers then
512+ very_fair_quip = pseudorandom_element (G .localization .misc .very_fair_quips , pseudoseed (" cry_very_fair" ))
513+ end
514+ end
515+ G .GAME .round_resets .blind_states .Boss = ' Defeated'
516+ for k , v in ipairs (G .playing_cards ) do
517+ v .ability .played_this_ante = nil
518+ end
519+ end
520+
521+ if G .GAME .round_resets .temp_handsize then G .hand :change_size (- G .GAME .round_resets .temp_handsize ); G .GAME .round_resets .temp_handsize = nil end
522+ if G .GAME .round_resets .temp_reroll_cost then G .GAME .round_resets .temp_reroll_cost = nil ; calculate_reroll_cost (true ) end
523+ for _ , v in pairs (find_joker (" cry-loopy" )) do
524+ if v .ability .extra .retrigger ~= 0 then
525+ v .ability .extra .retrigger = 0
526+ card_eval_status_text (v , ' extra' , nil , nil , nil , {message = localize (" k_reset" ), colour = G .C .GREEN })
527+ end
528+ end
529+ for _ , v in pairs (G .deck .cards ) do
530+ v .sus = nil
531+ end
532+ if G .GAME .sus_cards then
533+ SMODS .calculate_context ({ remove_playing_cards = true , removed = G .GAME .sus_cards })
534+ G .GAME .sus_cards = nil
535+ end
536+
537+ reset_idol_card ()
538+ reset_mail_rank ()
539+ reset_ancient_card ()
540+ reset_castle_card ()
541+ for _ , mod in ipairs (SMODS .mod_list ) do
542+ if mod .reset_game_globals and type (mod .reset_game_globals ) == ' function' then
543+ mod .reset_game_globals (false )
544+ end
545+ end
546+ for k , v in ipairs (G .playing_cards ) do
547+ v .ability .discarded = nil
548+ v .ability .forced_selection = nil
549+ end
550+ return true
551+ end
552+ }))
553+ end
474554end
475555
476556-- All the scattered set_cost hooks from all the pre refactor files moved into one hook
0 commit comments