Fix The Blizzard keeping Frozen on cards not drawn

This commit is contained in:
Emik 2026-05-20 15:06:27 +02:00
parent 203916923f
commit 82656d8308
Signed by: emik
GPG key ID: 6B0CD72A5E503BDF
3 changed files with 8 additions and 11 deletions

View file

@ -6,7 +6,7 @@
"author": [
"Emik"
],
"version": "2.4.1",
"version": "2.4.2",
"badge_colour": "8BE9FD",
"main_file": "src/main.lua",
"badge_text_colour": "44475A",

View file

@ -32,9 +32,7 @@ local function common_rank()
---@type { [integer]: integer }, { [integer]: string }
local tally, to_name = {}, {}
f(G.playing_cards):where(function(v)
return not SMODS.has_no_rank(v)
end):each(function(v)
f(G.playing_cards):where(SMODS.has_no_rank, false):each(function(v)
local id = v:get_id()
to_name[id] = v.base.value
tally[id] = (tally[id] or 0) + 1
@ -236,16 +234,17 @@ blind {
boss_colour = HEX "102a41ff",
pronouns = "it_its",
defeat = function(self)
self.cards():each(set_freeze())
self.cards():where "Roland_blizzard":each(set_freeze())
G.GAME.blind.disabled = true
end,
disable = function(self)
self:defeat()
end,
calculate = function(self, b)
return not b.disabled and self.cards():where(function(v)
return not v.Roland_blizzard and v.facing == "front"
end):each(set_freeze(true)) or nil
return not b.disabled and self.cards()
:where("Roland_blizzard", false)
:where("facing", "front")
:each(set_freeze(true)) or nil
end,
cards = function()
return f(G):where(function(v)

View file

@ -198,9 +198,7 @@ local finalizers = {
local _ = v.debuff and SMODS.recalc_debuff(v)
end)
jokers = next(jokers) and jokers or f(cards):where(function(v)
return not v.debuff
end):map(function(v)
jokers = next(jokers) and jokers or f(cards):where("debuff", false):map(function(v)
local _ = not prev[v] and table.insert(jokers, v)
return v
end):table()