Add bulk use for Afterimage

This commit is contained in:
Emik 2026-07-27 19:58:41 +02:00
parent fd9ad55325
commit cc33c578e7
Signed by: emik
GPG key ID: 6B0CD72A5E503BDF
4 changed files with 14 additions and 11 deletions

View file

@ -3,7 +3,7 @@
"id": "Roland", "id": "Roland",
"name": "Roland", "name": "Roland",
"prefix": "Roland", "prefix": "Roland",
"version": "2.9.81", "version": "2.9.82",
"badge_colour": "8BE9FD", "badge_colour": "8BE9FD",
"display_name": "Roland", "display_name": "Roland",
"main_file": "src/main.lua", "main_file": "src/main.lua",

View file

@ -80,10 +80,10 @@ back {
pronouns = "any_all", pronouns = "any_all",
config = {extra = {alt_times = 9, times = 3}}, config = {extra = {alt_times = 9, times = 3}},
attributes = {"passive", "boss_blind"}, attributes = {"passive", "boss_blind"},
loc_vars = function(self, _, _) loc_vars = function(self)
return {vars = {self.config.extra.alt_times}} return {vars = {self.config.extra.alt_times}}
end, end,
apply = function(_, _) apply = function()
G.GAME.modifiers.Roland_blossom_deck = true G.GAME.modifiers.Roland_blossom_deck = true
end, end,
calculate = function(self, b, context) calculate = function(self, b, context)

View file

@ -257,7 +257,7 @@ blind {
boss = {min = 6}, boss = {min = 6},
boss_colour = HEX "bdaeccff", boss_colour = HEX "bdaeccff",
pronouns = "they_them", pronouns = "they_them",
collection_loc_vars = function(_) collection_loc_vars = function()
return { return {
vars = {localize { vars = {localize {
type = "variable", type = "variable",
@ -265,7 +265,7 @@ blind {
}}, }},
} }
end, end,
loc_vars = function(_) loc_vars = function()
local _, name = common_rank() local _, name = common_rank()
return {vars = {localize(name or "Ace", "ranks")}} return {vars = {localize(name or "Ace", "ranks")}}
end, end,
@ -319,7 +319,7 @@ blind {
dollars = 5, dollars = 5,
defeat = disable_improbable, defeat = disable_improbable,
disable = disable_improbable, disable = disable_improbable,
set_blind = function(_) set_blind = function()
G.GAME.modifiers.Roland_improbable = true G.GAME.modifiers.Roland_improbable = true
end, end,
} }
@ -380,7 +380,7 @@ function SMODS.current_mod:calculate(context)
:map(f.index_into(G.P_CENTERS)) :map(f.index_into(G.P_CENTERS))
:where("config.extra.hand_type", context.scoring_name) :where("config.extra.hand_type", context.scoring_name)
:pun "SMODS.Voucher" :pun "SMODS.Voucher"
:each(function(v, _) :each(function(v)
SMODS.smart_level_up_hand(nil, v.config.extra.hand_type, false, v.config.extra.amount) SMODS.smart_level_up_hand(nil, v.config.extra.hand_type, false, v.config.extra.amount)
end) end)

View file

@ -40,14 +40,17 @@ spectral {
can_use = function() can_use = function()
return next(G.hand.cards) and u() return next(G.hand.cards) and u()
end, end,
use = function(_, card, _) use = function(self, card)
self:bulk_use(card, card.area, nil, 1)
end,
bulk_use = function(_, card, _, _, number)
local cards = f(G.hand.cards):table() local cards = f(G.hand.cards):table()
pseudoshuffle(cards, pseudoseed "RolandDual") pseudoshuffle(cards, pseudoseed "RolandDual")
f(cards):take(card.ability.extra.amount):each(function(v) f(cards):take(card.ability.extra.amount * number):each(function(v)
local seal local seal
for _ = 1, 64 do for _ = 1, 38 do
seal = SMODS.poll_seal {guaranteed = true} seal = SMODS.poll_seal {guaranteed = true}
if seal ~= "Roland_glass" then if seal ~= "Roland_glass" then
@ -135,7 +138,7 @@ spectral {
local count = #Bakery_API.get_highlighted() local count = #Bakery_API.get_highlighted()
return u() and count > 0 and count <= card.ability.extra.amount return u() and count > 0 and count <= card.ability.extra.amount
end, end,
use = function(_, _, _) use = function()
f(Bakery_API.get_highlighted()):each(function(v) f(Bakery_API.get_highlighted()):each(function(v)
v:set_seal "Roland_glass" v:set_seal "Roland_glass"
end) end)