Skip to content

Commit c882352

Browse files
Crash Fix
Fix crash when Vermillion Virus Replaces Fractal Fingers (Caused a 0 card hand)
1 parent 4405ca2 commit c882352

File tree

3 files changed

+14
-4
lines changed

3 files changed

+14
-4
lines changed

items/misc_joker.lua

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6508,7 +6508,9 @@ local fractal = {
65086508
if G.hand.config.highlighted_limit < 5 then
65096509
G.hand.config.highlighted_limit = 5
65106510
end
6511-
G.hand:unhighlight_all()
6511+
if not G.GAME.before_play_buffer then
6512+
G.hand:unhighlight_all()
6513+
end
65126514
end,
65136515
cry_credits = {
65146516
idea = {

items/voucher.lua

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -799,7 +799,9 @@ local stickyhand = { --+1 card selection limit
799799
if G.hand.config.highlighted_limit < 5 then
800800
G.hand.config.highlighted_limit = 5
801801
end
802-
G.hand:unhighlight_all()
802+
if not G.GAME.before_play_buffer then
803+
G.hand:unhighlight_all()
804+
end
803805
end,
804806
}
805807
local grapplinghook = { --+1 card selection limit (replace me when "extra functionality" is added later)
@@ -829,7 +831,9 @@ local grapplinghook = { --+1 card selection limit (replace me when "extra functi
829831
if G.hand.config.highlighted_limit < 5 then
830832
G.hand.config.highlighted_limit = 5
831833
end
832-
G.hand:unhighlight_all()
834+
if not G.GAME.before_play_buffer then
835+
G.hand:unhighlight_all()
836+
end
833837
end,
834838
}
835839
local hyperspacetether = { --+2 card selection limit + other stuff
@@ -861,7 +865,9 @@ local hyperspacetether = { --+2 card selection limit + other stuff
861865
if G.hand.config.highlighted_limit < 5 then
862866
G.hand.config.highlighted_limit = 5
863867
end
864-
G.hand:unhighlight_all()
868+
if not G.GAME.before_play_buffer then
869+
G.hand:unhighlight_all()
870+
end
865871
end,
866872
}
867873
local triple = { --Copies voucher triple tag

lib/overrides.lua

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,10 @@ end
9393
--Add context for Just before cards are played
9494
local pcfh = G.FUNCS.play_cards_from_highlighted
9595
function G.FUNCS.play_cards_from_highlighted(e)
96+
G.GAME.before_play_buffer = true
9697
G.GAME.blind:cry_before_play()
9798
pcfh(e)
99+
G.GAME.before_play_buffer = nil
98100
end
99101

100102
--Track defeated blinds for Obsidian Orb

0 commit comments

Comments
 (0)