Skip to content

Commit bca501c

Browse files
author
jolly[bot]
committed
jolly-bot: auto-format Lua files using Stylua
1 parent bd13ac1 commit bca501c

File tree

3 files changed

+24
-22
lines changed

3 files changed

+24
-22
lines changed

items/epic.lua

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1035,11 +1035,11 @@ local double_scale = {
10351035
cost = 18,
10361036
immutable = true,
10371037
atlas = "atlasepic",
1038-
calc_scaling = function(self, card, other, current_scaling, current_scalar, args)
1038+
calc_scaling = function(self, card, other, current_scaling, current_scalar, args)
10391039
-- store original scaling rate
10401040
if not other.ability.cry_scaling_info then
10411041
other.ability.cry_scaling_info = {
1042-
[args.scalar_value] = current_scalar
1042+
[args.scalar_value] = current_scalar,
10431043
}
10441044
elseif not other.ability.cry_scaling_info[args.scalar_value] then
10451045
other.ability.cry_scaling_info[args.scalar_value] = current_scalar
@@ -1069,7 +1069,7 @@ local double_scale = {
10691069
},
10701070
code = {
10711071
"Math",
1072-
"Mathguy"
1072+
"Mathguy",
10731073
},
10741074
},
10751075
}

items/exotic.lua

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -821,12 +821,14 @@ local scalae = {
821821
calc_scaling = function(self, card, other, current_scaling, current_scalar, args)
822822
-- checks if the scaled joker is also a scalae
823823
-- if so, return nothing
824-
if other.config.center.key == self.key then return end
824+
if other.config.center.key == self.key then
825+
return
826+
end
825827

826828
-- store original scaling rate
827829
if not other.ability.cry_scaling_info then
828830
other.ability.cry_scaling_info = {
829-
[args.scalar_value] = current_scalar
831+
[args.scalar_value] = current_scalar,
830832
}
831833
elseif not other.ability.cry_scaling_info[args.scalar_value] then
832834
other.ability.cry_scaling_info[args.scalar_value] = current_scalar
@@ -835,15 +837,16 @@ local scalae = {
835837
-- joker scaling stuff
836838
local original_scalar = other.ability.cry_scaling_info[args.scalar_value]
837839
local new_scale = lenient_bignum(
838-
to_big(original_scalar) * (
839-
(
840-
1
841-
+ (
842-
(to_big(current_scaling) / to_big(original_scalar))
843-
^ (to_big(1) / to_big(card.ability.extra.scale))
844-
)
845-
) ^ to_big(card.ability.extra.scale)
846-
)
840+
to_big(original_scalar)
841+
* (
842+
(
843+
1
844+
+ (
845+
(to_big(current_scaling) / to_big(original_scalar))
846+
^ (to_big(1) / to_big(card.ability.extra.scale))
847+
)
848+
) ^ to_big(card.ability.extra.scale)
849+
)
847850
)
848851
args.scalar_table[args.scalar_value] = new_scale
849852

lib/misprintize.lua

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -499,20 +499,19 @@ 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-
local new_val = Cryptid.manipulate_value(
503-
num,
504-
args,
505-
args.big or Cryptid.is_card_big(card),
506-
i
507-
)
502+
local new_val = Cryptid.manipulate_value(num, args, args.big or Cryptid.is_card_big(card), i)
508503
ref_table[ref_value][i] = new_val
509504

510505
-- take double scale / scalae into account
511506
if ref_value == "ability" and ref_table.ability.cry_scaling_info then
512507
ref_table.ability.cry_scaling_info[i] = new_val
513508
end
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
509+
elseif
510+
i ~= "immutable"
511+
and not (ref_value == "ability" and i == "cry_scaling_info")
512+
and type(v) == "table"
513+
and Cryptid.misprintize_value_blacklist[i] ~= false
514+
then
516515
Cryptid.manipulate_table(card, ref_table[ref_value], i, args)
517516
end
518517
end

0 commit comments

Comments
 (0)