diff --git a/localization/en-us.lua b/localization/en-us.lua index a9208e6..7bb7ec3 100644 --- a/localization/en-us.lua +++ b/localization/en-us.lua @@ -112,7 +112,6 @@ return { text = { "{C:attention}Unscored cards{} add a", "permanent copy to deck", - "and draw it to {C:blue}hand", "if played hand is a", "{C:attention}Four of a Kind", }, @@ -200,7 +199,7 @@ return { name = "Glass Seal", text = { "Gives a random tag at", - "the end of the {C:attention}Blind", + "the end of the {C:attention}Ante", "{C:red,E:1}Self destructs{} if {C:attention}drawn", }, }, diff --git a/src/main.lua b/src/main.lua index b8a98e0..0270ce4 100644 --- a/src/main.lua +++ b/src/main.lua @@ -1,6 +1,6 @@ local qol = assert(SMODS.load_file "src/functional.lua")() or require "src.functional" -qol[1] {"challenge", "spectral", "blind", "charm", "joker", "joker.rigged", "back", "seal"}:foreach(function(v) +qol[1] {"challenge", "spectral", "blind", "charm", "joker", "back", "seal"}:foreach(function(v) assert(SMODS.load_file("src/" .. v .. ".lua"))(qol) end) diff --git a/src/seal.lua b/src/seal.lua index 2a86a0f..9e21ec5 100644 --- a/src/seal.lua +++ b/src/seal.lua @@ -11,6 +11,7 @@ SMODS.Seal { atlas = "void", pos = {x = 0, y = 0}, badge_colour = HEX "f6f6f6", + calculate = function(_, card, context) if context.setting_blind or context.starting_shop then card.Roland_glass = nil @@ -20,7 +21,7 @@ SMODS.Seal { return end - if G.STATE == G.STATES.DRAW_TO_HAND and card == context.other_card and card.area == G.hand then + if G.STATE == G.STATES.DRAW_TO_HAND and card == context.other_card then card.Roland_glass = true return q(function() @@ -28,7 +29,7 @@ SMODS.Seal { end) end - if not context.end_of_round then + if not context.ante_end then return end @@ -40,7 +41,6 @@ SMODS.Seal { f(G.GAME.hands):filter(function(v) return v.visible end):into(), - pseudoseed "Roland_glass" ) end diff --git a/src/spectral.lua b/src/spectral.lua index d2387b1..f6bbb02 100644 --- a/src/spectral.lua +++ b/src/spectral.lua @@ -69,11 +69,27 @@ SMODS.Consumable { return u() and #G.hand.cards > 0 end, use = function(_, card, _) + local banned_seals = {"Roland_glass"} + local cards = f(G.hand.cards, ipairs):into() pseudoshuffle(cards, pseudoseed "RolandDual") f(cards):take(card.ability.extra.amount):foreach(function(v) - v:set_seal(SMODS.poll_seal {guaranteed = true}) + local seal + + local function nq(s) + return s ~= seal + end + + for _ = 1, 31 do + seal = SMODS.poll_seal {guaranteed = true} + + if f(banned_seals):all(nq) then + break + end + end + + v:set_seal(f(banned_seals):all(nq) and seal or "Red") end) end, }