Skip to content

Commit 02e12e6

Browse files
committed
why fix a bug when you could just refactor the code to skip it
1 parent d97e815 commit 02e12e6

File tree

1 file changed

+15
-17
lines changed

1 file changed

+15
-17
lines changed

items/misc_joker.lua

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1194,28 +1194,26 @@ local seal_the_deal = {
11941194
end,
11951195
set_ability = function(self, card, initial, delay_sprites)
11961196
local sealtable = { "blue", "red", "purple" }
1197-
if Cryptid.enabled["Misc."] then
1197+
if cry_card_enabled("cry_azure") then
11981198
sealtable[#sealtable + 1] = "azure"
11991199
end
1200-
if Cryptid.enabled["Code Cards"] then
1200+
if cry_card_enabled("cry_green") then
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"] 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
1204+
if self.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 })
12191217
end
12201218
end
12211219
end,

0 commit comments

Comments
 (0)