Skip to content

Commit 314a3f5

Browse files
Merge pull request #423 from TheRealNova422-real/patch-11
Potentially fixed Seal The Deal crash
2 parents 3367f3b + 50965da commit 314a3f5

File tree

1 file changed

+15
-13
lines changed

1 file changed

+15
-13
lines changed

items/misc_joker.lua

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1201,19 +1201,21 @@ local seal_the_deal = {
12011201
sealtable[#sealtable + 1] = "green"
12021202
end
12031203
card.ability.extra = pseudorandom_element(sealtable, pseudoseed("abc"))
1204-
if G.P_CENTERS["j_cry_seal_the_deal"].discovered then
1205-
--Gold (ULTRA RARE!!!!!!!!)
1206-
if pseudorandom("xyz") <= 0.000001 and not (card.area and card.area.config.collection) then
1207-
card.children.center:set_sprite_pos({ x = 6, y = 4 })
1208-
--Others
1209-
elseif card.ability.extra == "red" then
1210-
card.children.center:set_sprite_pos({ x = 6, y = 0 })
1211-
elseif card.ability.extra == "azure" then
1212-
card.children.center:set_sprite_pos({ x = 6, y = 2 })
1213-
elseif card.ability.extra == "purple" then
1214-
card.children.center:set_sprite_pos({ x = 6, y = 3 })
1215-
elseif card.ability.extra == "green" then
1216-
card.children.center:set_sprite_pos({ x = 6, y = 1 })
1204+
if G.P_CENTERS["j_cry_seal_the_deal"] then -- Should avoid crash if disabled in gameset
1205+
if G.P_CENTERS["j_cry_seal_the_deal"].discovered then
1206+
--Gold (ULTRA RARE!!!!!!!!)
1207+
if pseudorandom("xyz") <= 0.000001 and not (card.area and card.area.config.collection) then
1208+
card.children.center:set_sprite_pos({ x = 6, y = 4 })
1209+
--Others
1210+
elseif card.ability.extra == "red" then
1211+
card.children.center:set_sprite_pos({ x = 6, y = 0 })
1212+
elseif card.ability.extra == "azure" then
1213+
card.children.center:set_sprite_pos({ x = 6, y = 2 })
1214+
elseif card.ability.extra == "purple" then
1215+
card.children.center:set_sprite_pos({ x = 6, y = 3 })
1216+
elseif card.ability.extra == "green" then
1217+
card.children.center:set_sprite_pos({ x = 6, y = 1 })
1218+
end
12171219
end
12181220
end
12191221
end,

0 commit comments

Comments
 (0)