Alter glass tag

This commit is contained in:
Emik 2026-02-13 21:23:11 +01:00
parent bf15f05563
commit 4b8b5915b5
Signed by: emik
GPG key ID: 6B0CD72A5E503BDF
2 changed files with 16 additions and 14 deletions

View file

@ -203,10 +203,9 @@ return {
roland_glass_seal = { roland_glass_seal = {
name = "Glass Seal", name = "Glass Seal",
text = { text = {
"Creates a random {C:attention}Tag", "{C:red,E:1}Shatters {}and creates",
"at the end of the {C:attention}Ante", "a random {C:attention}Tag {}if",
"{C:red,E:1}Shatters{} if drawn", "drawn during a {C:attention}Blind",
"during any {C:attention}Blind",
}, },
}, },
}, },

View file

@ -14,6 +14,10 @@ SMODS.Seal {
badge_colour = HEX "a6a6a6", badge_colour = HEX "a6a6a6",
pronouns = "he_him", pronouns = "he_him",
calculate = function(_, card, context) calculate = function(_, card, context)
local function eq(v)
return v == card
end
local function proc() local function proc()
card.Roland_glass = true card.Roland_glass = true
local tag = Tag(get_next_tag_key "Roland_glass") local tag = Tag(get_next_tag_key "Roland_glass")
@ -39,18 +43,17 @@ SMODS.Seal {
return return
end end
if context.hand_drawn and f(context.hand_drawn):any(function(v) local hand_drawn = context.hand_drawn
return v == card
end) then
q(function()
card:shatter()
end)
SMODS.calculate_context({remove_playing_cards = true, removed = {card}}) if type(hand_drawn) ~= "table" or not f(hand_drawn):any(eq) then
return
end end
if context.ante_end then q(function()
proc() card:shatter()
end end)
SMODS.calculate_context({remove_playing_cards = true, removed = {card}})
proc()
end, end,
} }