Skip to content

Commit 30e0244

Browse files
committed
Fixed 'The Fool?' crashing.
1 parent a4ed128 commit 30e0244

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

src/tarots.lua

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -118,13 +118,12 @@ SMODS.Consumable{
118118
if G.consumeables.config.card_count <= G.consumeables.config.card_limit then return true else return false end
119119
end,
120120
use = function (self, card, area, copier)
121-
local elegible_cards = SMODS.merge_lists(get_current_pool('Tarot'),get_current_pool('Planet'))
122-
if not next(elegible_cards) then return end
123121
for i=1, card.ability.extra.amount do
124-
if G.consumeables.config.card_count < G.consumeables.config.card_limit then
125-
local choosen_card = pseudorandom("mila",1,#elegible_cards)
122+
if G.consumeables.config.card_count <= G.consumeables.config.card_limit then
123+
local s = {'Tarot','Planet'}
126124
SMODS.add_card{
127-
key = elegible_cards[choosen_card]
125+
set = s[pseudorandom('mila',1,#s)],
126+
area = G.consumeables
128127
}
129128
end
130129
end

0 commit comments

Comments
 (0)