Skip to content

Commit

Permalink
Merge pull request #422 from Toneblock/main
Browse files Browse the repository at this point in the history
find_card in vouchers
  • Loading branch information
Aurelius7309 authored Jan 21, 2025
2 parents e10d59b + 14c05e5 commit 9790e96
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions src/utils.lua
Original file line number Diff line number Diff line change
Expand Up @@ -300,14 +300,11 @@ end
function SMODS.find_card(key, count_debuffed)
local results = {}
if not G.jokers or not G.jokers.cards then return {} end
for k, v in pairs(G.jokers.cards) do
if v and type(v) == 'table' and v.config.center.key == key and (count_debuffed or not v.debuff) then
table.insert(results, v)
end
end
for k, v in pairs(G.consumeables.cards) do
if v and type(v) == 'table' and v.config.center.key == key and (count_debuffed or not v.debuff) then
table.insert(results, v)
for _, area in ipairs(SMODS.get_card_areas('jokers')) do
for _, v in pairs(area.cards) do
if v and type(v) == 'table' and v.config.center.key == key and (count_debuffed or not v.debuff) then
table.insert(results, v)
end
end
end
return results
Expand Down Expand Up @@ -1657,4 +1654,4 @@ SMODS.get_optional_features = function()
end
end
end
end
end

0 comments on commit 9790e96

Please sign in to comment.