Skip to content

Commit 44fd76c

Browse files
authored
fix glitched + double scale interaction
fixed random value manipulation causing double scale's info storage to be inaccurate this will still cause issues if a card has multiple values in its ability table that use the key of a scalar value but that should hopefully be fairly rare
1 parent 179b0f4 commit 44fd76c

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed

lib/misprintize.lua

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -499,12 +499,20 @@ function Cryptid.manipulate_table(card, ref_table, ref_value, args, tblkey)
499499
or Cryptid.base_values[card.config.center.key][i .. "consumeable"]
500500
end
501501
end
502-
if args.big ~= nil then
503-
ref_table[ref_value][i] = Cryptid.manipulate_value(num, args, args.big, i)
504-
else
505-
ref_table[ref_value][i] = Cryptid.manipulate_value(num, args, Cryptid.is_card_big(card), i)
502+
local new_val = Cryptid.manipulate_value(
503+
num,
504+
args,
505+
args.big or Cryptid.is_card_big(card),
506+
i
507+
)
508+
ref_table[ref_value][i] = new_val
509+
510+
-- take double scale / scalae into account
511+
if ref_value == "ability" and ref_table.ability.cry_scaling_info then
512+
ref_table.ability.cry_scaling_info[i] = new_val
506513
end
507-
elseif i ~= "immutable" and type(v) == "table" and Cryptid.misprintize_value_blacklist[i] ~= false then
514+
515+
elseif i ~= "immutable" and not (ref_value == "ability" and i == "cry_scaling_info") and type(v) == "table" and Cryptid.misprintize_value_blacklist[i] ~= false then
508516
Cryptid.manipulate_table(card, ref_table[ref_value], i, args)
509517
end
510518
end

0 commit comments

Comments
 (0)