Make bulk use consistent with use RNG

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

View file

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

View file

@ -40,7 +40,7 @@ end
---@param v SMODS.GameObject
---@return boolean|string
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
---@param key string

View file

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