Prevent edition overrides
This commit is contained in:
parent
3f7a8685be
commit
a294b7f7ea
2 changed files with 11 additions and 4 deletions
|
|
@ -3,7 +3,7 @@
|
||||||
"id": "Roland",
|
"id": "Roland",
|
||||||
"name": "Roland",
|
"name": "Roland",
|
||||||
"prefix": "Roland",
|
"prefix": "Roland",
|
||||||
"version": "2.9.0",
|
"version": "2.9.1",
|
||||||
"badge_colour": "8BE9FD",
|
"badge_colour": "8BE9FD",
|
||||||
"display_name": "Roland",
|
"display_name": "Roland",
|
||||||
"main_file": "src/main.lua",
|
"main_file": "src/main.lua",
|
||||||
|
|
|
||||||
|
|
@ -21,9 +21,16 @@ local coolheaded = SMODS.Consumable {
|
||||||
return {vars = {card.ability.extra.amount}}
|
return {vars = {card.ability.extra.amount}}
|
||||||
end,
|
end,
|
||||||
can_use = function(_, card)
|
can_use = function(_, card)
|
||||||
return u() and f(G.jokers.highlighted):concat(Bakery_API.get_highlighted()):count(function(v)
|
if not u() then
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
|
||||||
|
local highlighted = Bakery_API.get_highlighted()
|
||||||
|
|
||||||
|
return #G.jokers.highlighted + #highlighted == card.ability.extra.amount and
|
||||||
|
f(G.jokers.highlighted):concat(Bakery_API.get_highlighted()):all(function(v)
|
||||||
return not v.edition
|
return not v.edition
|
||||||
end) == card.ability.extra.amount
|
end)
|
||||||
end,
|
end,
|
||||||
use = function()
|
use = function()
|
||||||
f(G.jokers.highlighted):concat(Bakery_API.get_highlighted()):each(function(v)
|
f(G.jokers.highlighted):concat(Bakery_API.get_highlighted()):each(function(v)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue