Add to info queue

This commit is contained in:
Emik 2026-02-11 23:16:15 +01:00
parent 0a9e348059
commit d3be480afe
Signed by: emik
GPG key ID: 6B0CD72A5E503BDF
6 changed files with 41 additions and 16 deletions

View file

@ -77,7 +77,7 @@ return {
name = "Escapey", name = "Escapey",
text = { text = {
"Use to {C:attention}destroy tags{} or {C:attention}unselected consumables", "Use to {C:attention}destroy tags{} or {C:attention}unselected consumables",
"in exchange for {C:planet}leveling up #1# random hands", "in exchange for {C:planet}leveling up {X:planet,C:white}#1#{C:planet} random hands",
"{C:inactive,s:0.75,E:1}#2#{C:red,s:1.5,E:1}#3#{s:0.9}#4#{C:blue,E:1,s:0.9}#5#{s:0.9}#6#", "{C:inactive,s:0.75,E:1}#2#{C:red,s:1.5,E:1}#3#{s:0.9}#4#{C:blue,E:1,s:0.9}#5#{s:0.9}#6#",
}, },
merge = {"Since none apply, fuse with other ", " jokers"}, merge = {"Since none apply, fuse with other ", " jokers"},
@ -175,15 +175,6 @@ return {
"{C:inactive}(Currently {C:green}X#1#{C:inactive})", "{C:inactive}(Currently {C:green}X#1#{C:inactive})",
}, },
}, },
j_Roland_rigged = {
name = "Rigged",
text = {
"{C:blue}#1#{}#2#{C:green}#3#{}#4#{C:red}#5#{}#6#{C:edition}#7#{}#8#{C:legendary}#9#{}#10#{C:dark_edition}#11#",
"jokers cannot appear",
"{C:attention}Upgrade{} this card by",
"obtaining another {C:attention}Rigged",
},
},
j_Roland_sunny = { j_Roland_sunny = {
name = "Sunny Side Up", name = "Sunny Side Up",
text = { text = {
@ -292,6 +283,7 @@ return {
challenge_names = { challenge_names = {
c_Roland_Jokerful = "Jokerful", c_Roland_Jokerful = "Jokerful",
c_Roland_Pastries = "Sweet Pastries", c_Roland_Pastries = "Sweet Pastries",
c_Roland_Surgery = "Surgery",
}, },
v_dictionary = { v_dictionary = {
b_Roland_bye = "Bye!", b_Roland_bye = "Bye!",
@ -310,6 +302,8 @@ return {
v_text = { v_text = {
ch_c_Roland_Jokerful = {"Only the {C:common}default Joker{} can appear in shops"}, ch_c_Roland_Jokerful = {"Only the {C:common}default Joker{} can appear in shops"},
ch_c_Roland_Pastries = {"All blinds, cards, and tags are of {C:gold}Bakery{} or {C:blue}Roland"}, ch_c_Roland_Pastries = {"All blinds, cards, and tags are of {C:gold}Bakery{} or {C:blue}Roland"},
ch_c_Roland_Oops_All_Tranquilizers = {"Non-showdown blinds are replaced with {C:blue}The Tranquilizer"},
ch_c_Roland_Linked_Rank = {"Cards of the same rank share state"},
}, },
}, },
} }

View file

@ -121,7 +121,8 @@ back {
name = "Go", name = "Go",
pronouns = "he_him", pronouns = "he_him",
config = {extra = {times = 1, alt_times = 5}}, config = {extra = {times = 1, alt_times = 5}},
loc_vars = function(self, _, _) loc_vars = function(self, info_queue, _)
table.insert(info_queue, G.P_CENTERS.j_credit_card)
return {vars = {self.config.extra.alt_times - self.config.extra.times}} return {vars = {self.config.extra.alt_times - self.config.extra.times}}
end, end,
apply = function(self) apply = function(self)

View file

@ -117,6 +117,10 @@ blind {
q(function() q(function()
local count = #G.discard.cards local count = #G.discard.cards
if count == 0 then
return
end
f(G.discard.cards):take(count):foreach(function(v, i) f(G.discard.cards):take(count):foreach(function(v, i)
draw_card(G.discard, G.hand, i / count * 100, "up", false, v, nil, nil, true) draw_card(G.discard, G.hand, i / count * 100, "up", false, v, nil, nil, true)
end) end)

View file

@ -1,7 +1,7 @@
local f, q = unpack(... or require "src.functional") local f, q = unpack(... or require "src.functional")
local jokerful = {banned_cards = {}} local jokerful = {banned_cards = {}}
local pastries = {banned_cards = {}, banned_tags = {}, banned_other = {}} local pastries = {banned_cards = {}, banned_tags = {}, banned_other = {}}
-- local surgery = {banned_other = {}}
local function adder(tbl) local function adder(tbl)
return function(v) return function(v)
table.insert(tbl, {id = v.key}) table.insert(tbl, {id = v.key})
@ -12,6 +12,9 @@ local function is_banned_from_pastry(_, k)
return not k:find "_Bakery_" and not k:find "_Roland_" return not k:find "_Bakery_" and not k:find "_Roland_"
end end
-- local function is_blind_banned_from_surgery(v, k)
-- return k ~= "bl_Roland_tranquilizer" and not (v.boss or {}).showdown
-- end
local function is_center_banned_from_pastry(v, k) local function is_center_banned_from_pastry(v, k)
local pastries_targets = {Enhanced = true, Joker = true, Tarot = true, Spectral = true} local pastries_targets = {Enhanced = true, Joker = true, Tarot = true, Spectral = true}
return pastries_targets[v.set] and is_banned_from_pastry(v, k) return pastries_targets[v.set] and is_banned_from_pastry(v, k)
@ -35,12 +38,26 @@ SMODS.Challenge {
pronouns = "she_them", pronouns = "she_them",
} }
-- SMODS.Challenge {
-- key = "Surgery",
-- rules = {custom = {{id = "Roland_Oops_All_Tranquilizers"}, {id = "Roland_Linked_Rank"}}},
-- restrictions = surgery,
-- pronouns = "she_them",
-- calculate = function()
-- f(G.playing_cards):skip(1):take(5):foreach(function(v)
-- ---@type Card
-- v = v
-- v.config.center = G.playing_cards[1].config.center
-- end)
-- end,
-- }
q(function() q(function()
f { f {
{G.P_CENTERS, is_joker, jokerful.banned_cards}, {G.P_CENTERS, is_joker, jokerful.banned_cards},
{G.P_TAGS, is_banned_from_pastry, pastries.banned_tags}, {G.P_TAGS, is_banned_from_pastry, pastries.banned_tags},
{G.P_BLINDS, is_banned_from_pastry, pastries.banned_other}, {G.P_BLINDS, is_banned_from_pastry, pastries.banned_other},
{G.P_CENTERS, is_center_banned_from_pastry, pastries.banned_cards}, {G.P_CENTERS, is_center_banned_from_pastry, pastries.banned_cards},
-- {G.P_BLINDS, is_blind_banned_from_surgery, surgery.banned_other},
}:foreach(function(v) }:foreach(function(v)
f(v[1]):filter(v[2]):foreach(adder(v[3])) f(v[1]):filter(v[2]):foreach(adder(v[3]))
end) end)

View file

@ -449,6 +449,10 @@ joker {
eternal_compat = true, eternal_compat = true,
blueprint_compat = false, blueprint_compat = false,
perishable_compat = true, perishable_compat = true,
loc_vars = function(_, info_queue)
table.insert(info_queue, G.P_SEALS.Purple)
table.insert(info_queue, G.P_CENTERS.e_negative)
end,
} }
joker { joker {
@ -460,7 +464,8 @@ joker {
eternal_compat = true, eternal_compat = true,
blueprint_compat = true, blueprint_compat = true,
perishable_compat = true, perishable_compat = true,
loc_vars = function(_, _, card) loc_vars = function(_, info_queue, card)
table.insert(info_queue, G.P_CENTERS.m_wild)
return {vars = {card.ability.extra.xmult}} return {vars = {card.ability.extra.xmult}}
end, end,
calculate = function(_, card, context) calculate = function(_, card, context)

View file

@ -30,7 +30,8 @@ spectral {
key = "afterimage", key = "afterimage",
pronouns = "he_they", pronouns = "he_they",
config = {extra = {amount = 1, hand = -1}}, config = {extra = {amount = 1, hand = -1}},
loc_vars = function(_, _, card) loc_vars = function(_, info_queue, card)
table.insert(info_queue, G.P_CENTERS.e_negative)
return {vars = {card.ability.extra.amount, card.ability.extra.hand}} return {vars = {card.ability.extra.amount, card.ability.extra.hand}}
end, end,
can_use = function(_, card) can_use = function(_, card)
@ -91,7 +92,8 @@ spectral {
key = "mirror", key = "mirror",
pronouns = "he_him", pronouns = "he_him",
config = {extra = {amount = 1}}, config = {extra = {amount = 1}},
loc_vars = function(_, _, card) loc_vars = function(_, info_queue, card)
table.insert(info_queue, G.P_SEALS.Roland_glass)
return {vars = {card.ability.extra.amount}} return {vars = {card.ability.extra.amount}}
end, end,
can_use = function(_, card) can_use = function(_, card)
@ -111,7 +113,9 @@ spectral {
soul_set = "Spectral", soul_set = "Spectral",
pronouns = "it_its", pronouns = "it_its",
config = {extra = {amount = 2}}, config = {extra = {amount = 2}},
loc_vars = function(_, _, card) loc_vars = function(_, info_queue, card)
table.insert(info_queue, G.P_CENTERS.e_negative)
table.insert(info_queue, G.P_CENTERS.c_cryptid)
return {vars = {card.ability.extra.amount}} return {vars = {card.ability.extra.amount}}
end, end,
can_use = function() can_use = function()