Skip to content

Commit b30c99a

Browse files
Some Deck fixes
- Fixed description issue with critical deck - Fixed Spooky deck not spawning jokers when it is supposed to
1 parent 0176ffd commit b30c99a

File tree

2 files changed

+12
-20
lines changed

2 files changed

+12
-20
lines changed

items/deck.lua

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -455,7 +455,8 @@ local critical = {
455455
atlas = "atlasdeck",
456456
loc_vars = function(self, info_queue, center)
457457
local _, aaa = SMODS.get_probability_vars(self, 1, self.config.cry_crit_miss_rate, "Critical Deck")
458-
return { vars = { SMODS.get_probability_vars(self, 1, self.config.cry_crit_rate, "Critical Deck"), aaa } }
458+
local bbb, ccc = SMODS.get_probability_vars(self, 1, self.config.cry_crit_rate, "Critical Deck")
459+
return { vars = { bbb, ccc, aaa } }
459460
end,
460461
calculate = function(self, card, context)
461462
if context.final_scoring_step then

items/spooky.lua

Lines changed: 10 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1341,26 +1341,17 @@ local spookydeck = {
13411341
end,
13421342
}))
13431343
end,
1344-
init = function(self)
1345-
local Backapply_to_runRef = Back.apply_to_run
1346-
function Back.apply_to_run(self)
1347-
Backapply_to_runRef(self)
1348-
if self.effect.config.cry_spooky then
1349-
G.GAME.modifiers.cry_spooky = true
1350-
G.GAME.modifiers.cry_curse_rate = self.effect.config.cry_curse_rate or 0.25
1351-
G.E_MANAGER:add_event(Event({
1352-
func = function()
1353-
if G.jokers then
1354-
local card = create_card("Joker", G.jokers, nil, nil, nil, nil, "j_cry_chocolate_dice")
1355-
card:add_to_deck()
1356-
card:start_materialize()
1357-
card:set_eternal(true)
1358-
G.jokers:emplace(card)
1359-
return true
1360-
end
1361-
end,
1362-
}))
1344+
calculate = function(self, blind, context)
1345+
if context.modify_ante and context.ante_end then
1346+
local card
1347+
if pseudorandom(pseudoseed("cry_spooky_curse")) < G.GAME.modifiers.cry_curse_rate then
1348+
card = create_card("Joker", G.jokers, nil, "cry_cursed", nil, nil, nil, "cry_spooky")
1349+
else
1350+
card = create_card("Joker", G.jokers, nil, "cry_candy", nil, nil, nil, "cry_spooky")
13631351
end
1352+
card:add_to_deck()
1353+
card:start_materialize()
1354+
G.jokers:emplace(card)
13641355
end
13651356
end,
13661357
unlocked = false,

0 commit comments

Comments
 (0)