Fix The Blizzard keeping Frozen on cards not drawn
This commit is contained in:
parent
203916923f
commit
82656d8308
3 changed files with 8 additions and 11 deletions
|
|
@ -6,7 +6,7 @@
|
||||||
"author": [
|
"author": [
|
||||||
"Emik"
|
"Emik"
|
||||||
],
|
],
|
||||||
"version": "2.4.1",
|
"version": "2.4.2",
|
||||||
"badge_colour": "8BE9FD",
|
"badge_colour": "8BE9FD",
|
||||||
"main_file": "src/main.lua",
|
"main_file": "src/main.lua",
|
||||||
"badge_text_colour": "44475A",
|
"badge_text_colour": "44475A",
|
||||||
|
|
|
||||||
|
|
@ -32,9 +32,7 @@ local function common_rank()
|
||||||
---@type { [integer]: integer }, { [integer]: string }
|
---@type { [integer]: integer }, { [integer]: string }
|
||||||
local tally, to_name = {}, {}
|
local tally, to_name = {}, {}
|
||||||
|
|
||||||
f(G.playing_cards):where(function(v)
|
f(G.playing_cards):where(SMODS.has_no_rank, false):each(function(v)
|
||||||
return not SMODS.has_no_rank(v)
|
|
||||||
end):each(function(v)
|
|
||||||
local id = v:get_id()
|
local id = v:get_id()
|
||||||
to_name[id] = v.base.value
|
to_name[id] = v.base.value
|
||||||
tally[id] = (tally[id] or 0) + 1
|
tally[id] = (tally[id] or 0) + 1
|
||||||
|
|
@ -236,16 +234,17 @@ blind {
|
||||||
boss_colour = HEX "102a41ff",
|
boss_colour = HEX "102a41ff",
|
||||||
pronouns = "it_its",
|
pronouns = "it_its",
|
||||||
defeat = function(self)
|
defeat = function(self)
|
||||||
self.cards():each(set_freeze())
|
self.cards():where "Roland_blizzard":each(set_freeze())
|
||||||
G.GAME.blind.disabled = true
|
G.GAME.blind.disabled = true
|
||||||
end,
|
end,
|
||||||
disable = function(self)
|
disable = function(self)
|
||||||
self:defeat()
|
self:defeat()
|
||||||
end,
|
end,
|
||||||
calculate = function(self, b)
|
calculate = function(self, b)
|
||||||
return not b.disabled and self.cards():where(function(v)
|
return not b.disabled and self.cards()
|
||||||
return not v.Roland_blizzard and v.facing == "front"
|
:where("Roland_blizzard", false)
|
||||||
end):each(set_freeze(true)) or nil
|
:where("facing", "front")
|
||||||
|
:each(set_freeze(true)) or nil
|
||||||
end,
|
end,
|
||||||
cards = function()
|
cards = function()
|
||||||
return f(G):where(function(v)
|
return f(G):where(function(v)
|
||||||
|
|
|
||||||
|
|
@ -198,9 +198,7 @@ local finalizers = {
|
||||||
local _ = v.debuff and SMODS.recalc_debuff(v)
|
local _ = v.debuff and SMODS.recalc_debuff(v)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
jokers = next(jokers) and jokers or f(cards):where(function(v)
|
jokers = next(jokers) and jokers or f(cards):where("debuff", false):map(function(v)
|
||||||
return not v.debuff
|
|
||||||
end):map(function(v)
|
|
||||||
local _ = not prev[v] and table.insert(jokers, v)
|
local _ = not prev[v] and table.insert(jokers, v)
|
||||||
return v
|
return v
|
||||||
end):table()
|
end):table()
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue