@@ -508,6 +508,86 @@ function Game:update(dt)
508508 G .STATE = G .STATES .SELECTING_HAND
509509 G .STATE_COMPLETE = false
510510 end
511+ if
512+ G .STATE == G .STATES .HAND_PLAYED
513+ and to_big (G .GAME .chips ) > to_big (G .GAME .blind .chips )
514+ and not G .hand .cards [1 ]
515+ and not G .deck .cards [1 ]
516+ then
517+ -- im having to manually recreate some of this idk why
518+ G .RESET_BLIND_STATES = true
519+ G .RESET_JIGGLES = true
520+ G .GAME .blind .in_blind = false
521+ G .E_MANAGER :add_event (Event ({
522+ trigger = ' after' ,
523+ delay = 0.3 ,
524+ func = function ()
525+ if G .GAME .blind .config .blind .cry_before_cash and not G .GAME .blind .disabled then
526+ G .GAME .blind :cry_before_cash ()
527+ else
528+ G .GAME .cry_make_a_decision = nil
529+
530+ G .STATE = G .STATES .ROUND_EVAL
531+ G .STATE_COMPLETE = false
532+ end
533+
534+ if G .GAME .blind_on_deck == ' Small' then
535+ G .GAME .round_resets .blind_states .Small = ' Defeated'
536+ elseif G .GAME .blind_on_deck == ' Big' then
537+ G .GAME .round_resets .blind_states .Big = ' Defeated'
538+ else
539+ if G .GAME .current_round .cry_voucher_stickers .pinned == false then
540+ G .GAME .current_round .voucher = SMODS .get_next_vouchers ()
541+ G .GAME .current_round .cry_voucher_stickers = Cryptid .next_voucher_stickers ()
542+ G .GAME .current_round .cry_voucher_edition = cry_get_next_voucher_edition () or {}
543+ G .GAME .current_round .cry_bonusvouchers = {}
544+ G .GAME .cry_bonusvouchersused = {} -- i'm not sure why i'm putting these in two separate tables but it doesn't matter much
545+ for i = 1 , G .GAME .cry_bonusvouchercount do
546+ G .GAME .current_round .cry_bonusvouchers [i ] = SMODS .get_next_vouchers ()
547+ end
548+ if G .GAME .modifiers .cry_no_vouchers then
549+ very_fair_quip = pseudorandom_element (G .localization .misc .very_fair_quips , pseudoseed (" cry_very_fair" ))
550+ end
551+ end
552+ G .GAME .round_resets .blind_states .Boss = ' Defeated'
553+ for k , v in ipairs (G .playing_cards ) do
554+ v .ability .played_this_ante = nil
555+ end
556+ end
557+
558+ 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
559+ if G .GAME .round_resets .temp_reroll_cost then G .GAME .round_resets .temp_reroll_cost = nil ; calculate_reroll_cost (true ) end
560+ for _ , v in pairs (find_joker (" cry-loopy" )) do
561+ if v .ability .extra .retrigger ~= 0 then
562+ v .ability .extra .retrigger = 0
563+ card_eval_status_text (v , ' extra' , nil , nil , nil , {message = localize (" k_reset" ), colour = G .C .GREEN })
564+ end
565+ end
566+ for _ , v in pairs (G .deck .cards ) do
567+ v .sus = nil
568+ end
569+ if G .GAME .sus_cards then
570+ SMODS .calculate_context ({ remove_playing_cards = true , removed = G .GAME .sus_cards })
571+ G .GAME .sus_cards = nil
572+ end
573+
574+ reset_idol_card ()
575+ reset_mail_rank ()
576+ reset_ancient_card ()
577+ reset_castle_card ()
578+ for _ , mod in ipairs (SMODS .mod_list ) do
579+ if mod .reset_game_globals and type (mod .reset_game_globals ) == ' function' then
580+ mod .reset_game_globals (false )
581+ end
582+ end
583+ for k , v in ipairs (G .playing_cards ) do
584+ v .ability .discarded = nil
585+ v .ability .forced_selection = nil
586+ end
587+ return true
588+ end
589+ }))
590+ end
511591end
512592
513593-- All the scattered set_cost hooks from all the pre refactor files moved into one hook
0 commit comments