Skip to content

Commit 2dc2757

Browse files
committed
remove unneeded extra step
1 parent 3efa60d commit 2dc2757

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

lib/misprintize.lua

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -445,13 +445,15 @@ function Cryptid.manipulate(card, args)
445445
end
446446
end
447447
local config = copy_table(card.config.center.config)
448-
Cryptid.base_values[card.config.center.key] = {}
449-
for i, v in pairs(config) do
450-
if (type(v) == "table" and v.tetrate) or type(v) == "number" and to_big(v) ~= to_big(0) then
451-
Cryptid.base_values[card.config.center.key][i .. "ability"] = v
452-
elseif type(v) == "table" then
453-
for i2, v2 in pairs(v) do
454-
Cryptid.base_values[card.config.center.key][i2 .. i] = v2
448+
if not Cryptid.base_values[card.config.center.key] then
449+
Cryptid.base_values[card.config.center.key] = {}
450+
for i, v in pairs(config) do
451+
if (type(v) == "table" and v.tetrate) or type(v) == "number" and to_big(v) ~= to_big(0) then
452+
Cryptid.base_values[card.config.center.key][i .. "ability"] = v
453+
elseif type(v) == "table" then
454+
for i2, v2 in pairs(v) do
455+
Cryptid.base_values[card.config.center.key][i2 .. i] = v2
456+
end
455457
end
456458
end
457459
end

0 commit comments

Comments
 (0)