Prevent edition overrides

This commit is contained in:
Emik 2026-06-17 05:12:56 +02:00
parent 3f7a8685be
commit a294b7f7ea
Signed by: emik
GPG key ID: 6B0CD72A5E503BDF
2 changed files with 11 additions and 4 deletions

View file

@ -3,7 +3,7 @@
"id": "Roland",
"name": "Roland",
"prefix": "Roland",
"version": "2.9.0",
"version": "2.9.1",
"badge_colour": "8BE9FD",
"display_name": "Roland",
"main_file": "src/main.lua",

View file

@ -21,9 +21,16 @@ local coolheaded = SMODS.Consumable {
return {vars = {card.ability.extra.amount}}
end,
can_use = function(_, card)
return u() and f(G.jokers.highlighted):concat(Bakery_API.get_highlighted()):count(function(v)
return not v.edition
end) == card.ability.extra.amount
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
end)
end,
use = function()
f(G.jokers.highlighted):concat(Bakery_API.get_highlighted()):each(function(v)