Skip to content

Commit

Permalink
feat(chess queen): ignore cards without rank
Browse files Browse the repository at this point in the history
no longer destroys stone cards since they normally don't have a rank
  • Loading branch information
Aiz0 committed Aug 1, 2024
1 parent c3b6b6b commit c92fe37
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions jokers/chess_queen.lua
Original file line number Diff line number Diff line change
Expand Up @@ -43,19 +43,17 @@ SMODS.Joker({
-- Find out what smallest id in deck is
local min = math.huge
for _, playing_card in ipairs(G.playing_cards) do
min = min < playing_card:get_id() and min
or playing_card:get_id()
end
-- stone cards don't have set id
-- but it's always less than 1
if min < 1 then
min = 1
-- ignore cards without ranks
if playing_card:get_id() >= -100 then
min = min < playing_card:get_id() and min
or playing_card:get_id()
end
end

-- keep track of xmult
local mult_mod = 0
for i, playing_card in ipairs(G.playing_cards) do
if playing_card:get_id() <= min then
if playing_card:get_id() == min then
mult_mod = mult_mod + card.ability.extra.Xmult_mod
-- Destroy card
playing_card:start_dissolve(nil, i ~= 1)
Expand Down

0 comments on commit c92fe37

Please sign in to comment.