Skip to content

Commit 0e8846e

Browse files
Fix Green Joker on discard
who tested this 😭
1 parent c097dce commit 0e8846e

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

lib/cross-mod.lua

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,15 @@ SMODS.Joker:take_ownership("green_joker", {
1313
and not context.blueprint
1414
and context.other_card == context.full_hand[#context.full_hand]
1515
then
16-
local prev_mult = card.ability.mult
17-
if card.ability.mult ~= prev_mult then
16+
if card.ability.mult ~= 0 then
1817
SMODS.scale_card(card, {
1918
ref_table = card.ability,
2019
ref_value = "mult",
20+
scalar_table = card.ability,
2121
scalar_value = "extra",
22-
operation = "-",
22+
operation = function(ref_table, ref_value, initial, change)
23+
ref_table[ref_value] = math.max(0, initial - change)
24+
end,
2325
message_key = "a_mult_minus",
2426
message_colour = G.C.RED,
2527
})

0 commit comments

Comments
 (0)