Skip to content

Commit 7323d05

Browse files
author
jolly[bot]
committed
jolly-bot: auto-format Lua files using Stylua
1 parent a3e23fa commit 7323d05

File tree

1 file changed

+30
-25
lines changed

1 file changed

+30
-25
lines changed

lib/misprintize.lua

Lines changed: 30 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -398,17 +398,17 @@ function Card:get_nominal(mod)
398398
end
399399

400400
function Cryptid.manipulate(card, args)
401-
if not args then
402-
Cryptid.manipulate(card, {
403-
min = G.GAME.modifiers.cry_misprint_min,
404-
max = G.GAME.modifiers.cry_misprint_max,
405-
type = "X",
406-
dont_stack = true,
407-
})
408-
else
401+
if not args then
402+
Cryptid.manipulate(card, {
403+
min = G.GAME.modifiers.cry_misprint_min,
404+
max = G.GAME.modifiers.cry_misprint_max,
405+
type = "X",
406+
dont_stack = true,
407+
})
408+
else
409409
if not args.type then
410-
args.type = "X"
411-
end
410+
args.type = "X"
411+
end
412412
--hardcoded whatever
413413
if card.config.center.set == "Booster" then
414414
args.big = false
@@ -424,19 +424,19 @@ function Cryptid.manipulate(card, args)
424424
if not Cryptid.base_values[card.config.center.key] then
425425
Cryptid.base_values[card.config.center.key] = {}
426426
for i, v in pairs(card.ability) do
427-
if (type(v) == "table" and v.tetrate) or type(v) == "number" and to_big(v) < to_big(0) then
428-
Cryptid.base_values[card.config.center.key][i.."ability"] = v
429-
elseif (type(v) == "table") then
427+
if (type(v) == "table" and v.tetrate) or type(v) == "number" and to_big(v) < to_big(0) then
428+
Cryptid.base_values[card.config.center.key][i .. "ability"] = v
429+
elseif type(v) == "table" then
430430
for i2, v2 in pairs(v) do
431-
Cryptid.base_values[card.config.center.key][i2..i] = v2
431+
Cryptid.base_values[card.config.center.key][i2 .. i] = v2
432432
end
433433
end
434434
end
435435
end
436-
Cryptid.manipulate_table(card, card, "ability", args)
437-
if card.base then
438-
Cryptid.manipulate_table(card, card, "base", args)
439-
end
436+
Cryptid.manipulate_table(card, card, "ability", args)
437+
if card.base then
438+
Cryptid.manipulate_table(card, card, "base", args)
439+
end
440440
if G.GAME.modifiers.cry_misprint_min then
441441
--card.cost = cry_format(card.cost / Cryptid.log_random(pseudoseed('cry_misprint'..G.GAME.round_resets.ante),override and override.min or G.GAME.modifiers.cry_misprint_min,override and override.max or G.GAME.modifiers.cry_misprint_max),"%.2f")
442442
card.misprint_cost_fac = 1
@@ -462,24 +462,29 @@ function Cryptid.manipulate(card, args)
462462
end
463463
end
464464
end
465-
-- if card.ability.consumeable then
466-
-- for k, v in pairs(card.ability.consumeable) do
467-
-- --card.ability.consumeable[k] = Cryptid.deep_copy(card.ability[k])
468-
-- end
469-
-- end
465+
-- if card.ability.consumeable then
466+
-- for k, v in pairs(card.ability.consumeable) do
467+
-- --card.ability.consumeable[k] = Cryptid.deep_copy(card.ability[k])
468+
-- end
469+
-- end
470470
end
471471
end
472472

473473
function Cryptid.manipulate_table(card, ref_table, ref_value, args, tblkey)
474-
if ref_value == "consumeable" then return end
474+
if ref_value == "consumeable" then
475+
return
476+
end
475477
for i, v in pairs(ref_table[ref_value]) do
476478
if
477479
(type(v) == "number" or (type(v) == "table" and v.tetrate))
478480
and Cryptid.misprintize_value_blacklist[i] ~= false
479481
then
480482
local num = v
481483
if args.dont_stack then
482-
if Cryptid.base_values[card.config.center.key] and Cryptid.base_values[card.config.center.key][i .. ref_value] then
484+
if
485+
Cryptid.base_values[card.config.center.key]
486+
and Cryptid.base_values[card.config.center.key][i .. ref_value]
487+
then
483488
num = Cryptid.base_values[card.config.center.key][i .. ref_value]
484489
end
485490
end

0 commit comments

Comments
 (0)