Make bulk use consistent with use RNG

This commit is contained in:
Emik 2026-07-27 20:17:33 +02:00
parent ad24529beb
commit 4fda3af9c0
Signed by: emik
GPG key ID: 6B0CD72A5E503BDF
3 changed files with 18 additions and 17 deletions

View file

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

View file

@ -40,7 +40,7 @@ end
---@param v SMODS.GameObject ---@param v SMODS.GameObject
---@return boolean|string ---@return boolean|string
local function is_economy(v) local function is_economy(v)
return f(Bakery_API.econ_only_items):where(f.id, v.key):any() return f(Bakery_API.econ_only_items):where(f.eq(v.key)):any()
end end
---@param key string ---@param key string

View file

@ -40,27 +40,28 @@ 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(self, card) use = function(_, 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 * number):each(function(v) f(cards):take(card.ability.extra.amount):each(function(v)
local seal local seal = SMODS.poll_seal {
guaranteed = true,
options = f(G.P_SEALS):keys():where(f.nq "Roland_glass"):values():table(),
}
for _ = 1, 38 do q {
seal = SMODS.poll_seal {guaranteed = true} delay = 0.5,
trigger = "after",
if seal ~= "Roland_glass" then func = function()
break v:set_seal(seal, nil, true)
end end,
end }
v:set_seal(seal == "Roland_glass" and "Red" or seal)
end) end)
end, end,
bulk_use = function(self, card, area, copier, number)
f(number):map(f.const(self)):each(f.call("use", card, area, copier))
end,
} }
spectral { spectral {