Nerf glass seal
This commit is contained in:
parent
a26962e704
commit
042231c2db
4 changed files with 22 additions and 7 deletions
|
|
@ -112,7 +112,6 @@ return {
|
||||||
text = {
|
text = {
|
||||||
"{C:attention}Unscored cards{} add a",
|
"{C:attention}Unscored cards{} add a",
|
||||||
"permanent copy to deck",
|
"permanent copy to deck",
|
||||||
"and draw it to {C:blue}hand",
|
|
||||||
"if played hand is a",
|
"if played hand is a",
|
||||||
"{C:attention}Four of a Kind",
|
"{C:attention}Four of a Kind",
|
||||||
},
|
},
|
||||||
|
|
@ -200,7 +199,7 @@ return {
|
||||||
name = "Glass Seal",
|
name = "Glass Seal",
|
||||||
text = {
|
text = {
|
||||||
"Gives a random tag at",
|
"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",
|
"{C:red,E:1}Self destructs{} if {C:attention}drawn",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
local qol = assert(SMODS.load_file "src/functional.lua")() or require "src.functional"
|
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)
|
assert(SMODS.load_file("src/" .. v .. ".lua"))(qol)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,7 @@ SMODS.Seal {
|
||||||
atlas = "void",
|
atlas = "void",
|
||||||
pos = {x = 0, y = 0},
|
pos = {x = 0, y = 0},
|
||||||
badge_colour = HEX "f6f6f6",
|
badge_colour = HEX "f6f6f6",
|
||||||
|
|
||||||
calculate = function(_, card, context)
|
calculate = function(_, card, context)
|
||||||
if context.setting_blind or context.starting_shop then
|
if context.setting_blind or context.starting_shop then
|
||||||
card.Roland_glass = nil
|
card.Roland_glass = nil
|
||||||
|
|
@ -20,7 +21,7 @@ SMODS.Seal {
|
||||||
return
|
return
|
||||||
end
|
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
|
card.Roland_glass = true
|
||||||
|
|
||||||
return q(function()
|
return q(function()
|
||||||
|
|
@ -28,7 +29,7 @@ SMODS.Seal {
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
if not context.end_of_round then
|
if not context.ante_end then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
@ -40,7 +41,6 @@ SMODS.Seal {
|
||||||
f(G.GAME.hands):filter(function(v)
|
f(G.GAME.hands):filter(function(v)
|
||||||
return v.visible
|
return v.visible
|
||||||
end):into(),
|
end):into(),
|
||||||
|
|
||||||
pseudoseed "Roland_glass"
|
pseudoseed "Roland_glass"
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -69,11 +69,27 @@ SMODS.Consumable {
|
||||||
return u() and #G.hand.cards > 0
|
return u() and #G.hand.cards > 0
|
||||||
end,
|
end,
|
||||||
use = function(_, card, _)
|
use = function(_, card, _)
|
||||||
|
local banned_seals = {"Roland_glass"}
|
||||||
|
|
||||||
local cards = f(G.hand.cards, ipairs):into()
|
local cards = f(G.hand.cards, ipairs):into()
|
||||||
pseudoshuffle(cards, pseudoseed "RolandDual")
|
pseudoshuffle(cards, pseudoseed "RolandDual")
|
||||||
|
|
||||||
f(cards):take(card.ability.extra.amount):foreach(function(v)
|
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)
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue