Apply to editioned cards
This commit is contained in:
parent
4bf3ef046e
commit
8533e4c146
2 changed files with 14 additions and 7 deletions
|
|
@ -6,7 +6,7 @@
|
||||||
"author": [
|
"author": [
|
||||||
"Emik"
|
"Emik"
|
||||||
],
|
],
|
||||||
"version": "2.0.9",
|
"version": "2.1.0",
|
||||||
"badge_colour": "8BE9FD",
|
"badge_colour": "8BE9FD",
|
||||||
"main_file": "src/main.lua",
|
"main_file": "src/main.lua",
|
||||||
"badge_text_colour": "44475A",
|
"badge_text_colour": "44475A",
|
||||||
|
|
|
||||||
|
|
@ -62,14 +62,20 @@ local function has_enhancement(card)
|
||||||
end
|
end
|
||||||
|
|
||||||
local function set_freeze(state)
|
local function set_freeze(state)
|
||||||
|
local function copy(x)
|
||||||
|
return type(x) == "table" and f(x):map(copy):table() or x
|
||||||
|
end
|
||||||
|
|
||||||
---@param card Card|{ Roland_blizzard: true|nil }
|
---@param card Card|{ Roland_blizzard: true|nil }
|
||||||
return function(card)
|
return function(card)
|
||||||
card.Roland_blizzard = state
|
local last_edition = card.Roland_blizzard
|
||||||
|
card.Roland_blizzard = state and (copy(card.edition) or true) or nil
|
||||||
|
|
||||||
q {
|
q {
|
||||||
delay = 0.1,
|
delay = 0.1,
|
||||||
func = function()
|
func = function()
|
||||||
card:set_edition(state and {Roland_frozen = true})
|
local edition = state and {Roland_frozen = true} or last_edition or card.Roland_blizzard
|
||||||
|
card:set_edition(edition ~= true and edition or nil)
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
@ -226,18 +232,19 @@ blind {
|
||||||
|
|
||||||
blind {
|
blind {
|
||||||
key = "blizzard",
|
key = "blizzard",
|
||||||
boss = {min = 4},
|
boss = {min = 3},
|
||||||
boss_colour = HEX "102a41ff",
|
boss_colour = HEX "102a41ff",
|
||||||
pronouns = "it_its",
|
pronouns = "it_its",
|
||||||
defeat = function(self)
|
defeat = function(self)
|
||||||
self.cards():where("Roland_blizzard"):each(set_freeze())
|
self.cards():each(set_freeze())
|
||||||
|
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():where(function(v)
|
||||||
return not v.Roland_blizzard and not v.edition and v.facing == "front"
|
return not v.Roland_blizzard and v.facing == "front"
|
||||||
end):each(set_freeze(true)) or nil
|
end):each(set_freeze(true)) or nil
|
||||||
end,
|
end,
|
||||||
cards = function()
|
cards = function()
|
||||||
|
|
@ -304,7 +311,7 @@ blind {
|
||||||
|
|
||||||
blind {
|
blind {
|
||||||
key = "improbable",
|
key = "improbable",
|
||||||
boss = {min = 4},
|
boss = {min = 3},
|
||||||
boss_colour = HEX "009966ff",
|
boss_colour = HEX "009966ff",
|
||||||
pronouns = "it_its",
|
pronouns = "it_its",
|
||||||
mult = 2,
|
mult = 2,
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue