Alter glass tag
This commit is contained in:
parent
bf15f05563
commit
4b8b5915b5
2 changed files with 16 additions and 14 deletions
|
|
@ -203,10 +203,9 @@ return {
|
|||
roland_glass_seal = {
|
||||
name = "Glass Seal",
|
||||
text = {
|
||||
"Creates a random {C:attention}Tag",
|
||||
"at the end of the {C:attention}Ante",
|
||||
"{C:red,E:1}Shatters{} if drawn",
|
||||
"during any {C:attention}Blind",
|
||||
"{C:red,E:1}Shatters {}and creates",
|
||||
"a random {C:attention}Tag {}if",
|
||||
"drawn during a {C:attention}Blind",
|
||||
},
|
||||
},
|
||||
},
|
||||
|
|
|
|||
23
src/seal.lua
23
src/seal.lua
|
|
@ -14,6 +14,10 @@ SMODS.Seal {
|
|||
badge_colour = HEX "a6a6a6",
|
||||
pronouns = "he_him",
|
||||
calculate = function(_, card, context)
|
||||
local function eq(v)
|
||||
return v == card
|
||||
end
|
||||
|
||||
local function proc()
|
||||
card.Roland_glass = true
|
||||
local tag = Tag(get_next_tag_key "Roland_glass")
|
||||
|
|
@ -39,18 +43,17 @@ SMODS.Seal {
|
|||
return
|
||||
end
|
||||
|
||||
if context.hand_drawn and f(context.hand_drawn):any(function(v)
|
||||
return v == card
|
||||
end) then
|
||||
q(function()
|
||||
card:shatter()
|
||||
end)
|
||||
local hand_drawn = context.hand_drawn
|
||||
|
||||
SMODS.calculate_context({remove_playing_cards = true, removed = {card}})
|
||||
if type(hand_drawn) ~= "table" or not f(hand_drawn):any(eq) then
|
||||
return
|
||||
end
|
||||
|
||||
if context.ante_end then
|
||||
proc()
|
||||
end
|
||||
q(function()
|
||||
card:shatter()
|
||||
end)
|
||||
|
||||
SMODS.calculate_context({remove_playing_cards = true, removed = {card}})
|
||||
proc()
|
||||
end,
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue