diff --git a/manifest.json b/manifest.json index 92b5254..c152f3c 100644 --- a/manifest.json +++ b/manifest.json @@ -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", diff --git a/src/challenge.lua b/src/challenge.lua index a80d1c5..49587b7 100644 --- a/src/challenge.lua +++ b/src/challenge.lua @@ -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 diff --git a/src/spectral.lua b/src/spectral.lua index acedea3..8d747bb 100644 --- a/src/spectral.lua +++ b/src/spectral.lua @@ -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 {