File tree Expand file tree Collapse file tree 2 files changed +19
-6
lines changed
Expand file tree Collapse file tree 2 files changed +19
-6
lines changed Original file line number Diff line number Diff line change @@ -1530,7 +1530,10 @@ local candy_buttons = {
15301530 end
15311531 end ,
15321532 add_to_deck = function (self , card , from_debuff )
1533+ -- The find_joker check in calculate_reroll_cost doesn't work if this is the only copy when added to deck (Too early)
1534+ G .GAME .reroll_limit_buffer = 1
15331535 calculate_reroll_cost (true )
1536+ G .GAME .reroll_limit_buffer = nil
15341537 end ,
15351538 remove_from_deck = function (self , card , from_debuff )
15361539 calculate_reroll_cost (true )
Original file line number Diff line number Diff line change @@ -748,21 +748,31 @@ end
748748
749749-- This is short enough that I'm fine overriding it
750750function calculate_reroll_cost (skip_increment )
751+ local limit = G .GAME .reroll_limit_buffer or nil
752+ if not limit then
753+ if next (find_joker (" cry-candybuttons" )) then
754+ limit = 1
755+ elseif G .GAME .used_vouchers .v_cry_rerollexchange then
756+ limit = 2
757+ end
758+ end
751759 if not G .GAME .current_round .free_rerolls or G .GAME .current_round .free_rerolls < 0 then
752760 G .GAME .current_round .free_rerolls = 0
753761 end
754762 if next (find_joker (" cry-crustulum" )) or G .GAME .current_round .free_rerolls > 0 then
755763 G .GAME .current_round .reroll_cost = 0
756764 return
757765 end
758- if next (find_joker (" cry-candybuttons" )) then
759- G .GAME .current_round .reroll_cost = 1
760- return
761- end
762- if G .GAME .used_vouchers .v_cry_rerollexchange then
763- G .GAME .current_round .reroll_cost = 2
766+ if
767+ limit
768+ and (G .GAME .round_resets .temp_reroll_cost or G .GAME .round_resets .reroll_cost )
769+ + G .GAME .current_round .reroll_cost_increase
770+ >= limit
771+ then
772+ G .GAME .current_round .reroll_cost = limit
764773 return
765774 end
775+
766776 G .GAME .current_round .reroll_cost_increase = G .GAME .current_round .reroll_cost_increase or 0
767777 if not skip_increment then
768778 G .GAME .current_round .reroll_cost_increase = G .GAME .current_round .reroll_cost_increase
You can’t perform that action at this time.
0 commit comments