Skip to content

Commit 6a563b9

Browse files
authored
Merge pull request #774 from SpectralPack/temp-1
sync scaling changes
2 parents abcbbae + bdd40ed commit 6a563b9

27 files changed

+435
-695
lines changed

assets/1x/atlasnotjokers.png

3.9 KB
Loading

assets/2x/atlasnotjokers.png

4.08 KB
Loading

items/code.lua

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4989,12 +4989,12 @@ local cut = {
49894989

49904990
if codecard_to_destroy then
49914991
codecard_to_destroy.getting_sliced = true
4992-
card.ability.extra.Xmult =
4993-
lenient_bignum(to_big(card.ability.extra.Xmult) + card.ability.extra.Xmult_mod)
4994-
local msg = SMODS.scale_card(card, {
4992+
SMODS.scale_card(card, {
49954993
ref_table = card.ability.extra,
49964994
ref_value = "Xmult",
49974995
scalar_value = "Xmult_mod",
4996+
message_key = "a_xmult",
4997+
colour = G.C.RED,
49984998
})
49994999
G.E_MANAGER:add_event(Event({
50005000
func = function()
@@ -5029,20 +5029,14 @@ local cut = {
50295029
}
50305030
end
50315031
if context.forcetrigger then
5032-
card.ability.extra.Xmult = lenient_bignum(to_big(card.ability.extra.Xmult) + card.ability.extra.Xmult_mod)
5033-
local msg = SMODS.scale_card(card, {
5032+
SMODS.scale_card(card, {
50345033
ref_table = card.ability.extra,
50355034
ref_value = "Xmult",
50365035
scalar_value = "Xmult_mod",
5036+
message_key = "a_xmult",
5037+
colour = G.C.RED,
50375038
})
50385039
return {
5039-
message = not msg and localize({
5040-
type = "variable",
5041-
key = "a_xmult",
5042-
vars = {
5043-
number_format(card.ability.extra.Xmult),
5044-
},
5045-
}) or (type(msg) == "string" and msg) or nil,
50465040
Xmult_mod = card.ability.extra.Xmult,
50475041
colour = G.C.MULT,
50485042
}

items/epic.lua

Lines changed: 16 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -784,39 +784,24 @@ local m = {
784784
}
785785
end
786786
if context.selling_card and context.card:is_jolly() and not context.blueprint then
787-
card.ability.extra.x_mult = lenient_bignum(to_big(card.ability.extra.x_mult) + card.ability.extra.extra)
788-
local msg = SMODS.scale_card(card, {
787+
SMODS.scale_card(card, {
789788
ref_table = card.ability.extra,
790789
ref_value = "x_mult",
791790
scalar_value = "extra",
791+
message_key = "a_xmult",
792+
message_colour = G.C.RED,
792793
})
793-
if not context.retrigger_joker and (not msg or type(msg) == "string") then
794-
--This doesn't display the correct amount of mult if retriggered it display the amount from the first retrigger instead of the final one
795-
--But I would rather have this than constant card_eval_status_text spam
796-
--If anyone knows a solution feel free to do a pr xd
797-
card_eval_status_text(card, "extra", nil, nil, nil, {
798-
message = msg or localize({
799-
type = "variable",
800-
key = "a_xmult",
801-
vars = { number_format(card.ability.extra.x_mult) },
802-
}),
803-
})
804-
end
805794
return nil, true
806795
end
807796
if context.forcetrigger then
808-
card.ability.extra.x_mult = lenient_bignum(to_big(card.ability.extra.x_mult) + card.ability.extra.extra)
809-
local msg = SMODS.scale_card(card, {
797+
SMODS.scale_card(card, {
810798
ref_table = card.ability.extra,
811799
ref_value = "x_mult",
812800
scalar_value = "extra",
801+
message_key = "a_xmult",
802+
message_colour = G.C.RED,
813803
})
814804
return {
815-
message = not msg and localize({
816-
type = "variable",
817-
key = "a_xmult",
818-
vars = { number_format(card.ability.extra.x_mult) },
819-
}) or (type(msg) == "string" and msg) or nil,
820805
Xmult_mod = card.ability.extra.x_mult,
821806
}
822807
end
@@ -1006,9 +991,11 @@ local number_blocks = {
1006991
if context.after and not context.blueprint and not context.before and not context.repetition then
1007992
for i, v in pairs(G.hand.cards) do
1008993
if v:get_id() == G.GAME.current_round.cry_nb_card.id and not v.debuff then
1009-
card.ability.extra.money =
1010-
lenient_bignum(to_big(card.ability.extra.money) + card.ability.extra.money_mod)
1011-
card_eval_status_text(card, "extra", nil, nil, nil, { message = localize("k_upgrade_ex") })
994+
SMODS.scale_card(card, {
995+
ref_table = card.ability.extra,
996+
ref_value = "money",
997+
scalar_value = "money_mod",
998+
})
1012999
return nil, true
10131000
end
10141001
end
@@ -1075,8 +1062,8 @@ local double_scale = {
10751062
message = localize("k_upgrade_ex"),
10761063
}
10771064
end
1065+
args.scalar_table[args.scalar_value] = new_scale
10781066
return {
1079-
scalar_value = lenient_bignum(orig_scale_scale + to_big(true_base)),
10801067
message = localize("k_upgrade_ex"),
10811068
}
10821069
end,
@@ -1756,38 +1743,20 @@ local goldjoker = {
17561743
calculate = function(self, card, context)
17571744
if context.cardarea == G.play and context.individual and not context.blueprint then
17581745
if SMODS.has_enhancement(context.other_card, "m_gold") then
1759-
card.ability.extra.percent =
1760-
lenient_bignum(to_big(card.ability.extra.percent) + card.ability.extra.percent_mod)
1761-
local msg = SMODS.scale_card(card, {
1746+
SMODS.scale_card(card, {
17621747
ref_table = card.ability.extra,
17631748
ref_value = "percent",
17641749
scalar_value = "percent_mod",
17651750
})
1766-
if not msg or type(msg) == "string" then
1767-
return {
1768-
extra = { focus = card, message = msg or localize("k_upgrade_ex") },
1769-
card = card,
1770-
colour = G.C.MONEY,
1771-
}
1772-
end
17731751
end
17741752
end
17751753
if context.individual and context.cardarea == G.play then
17761754
if SMODS.has_enhancement(context.other_card, "m_gold") then
1777-
card.ability.extra.percent =
1778-
lenient_bignum(to_big(card.ability.extra.percent) + card.ability.extra.percent_mod)
1779-
local msg = SMODS.scale_card(card, {
1755+
SMODS.scale_card(card, {
17801756
ref_table = card.ability.extra,
17811757
ref_value = "percent",
17821758
scalar_value = "percent_mod",
17831759
})
1784-
if not msg or type(msg) == "string" then
1785-
return {
1786-
message = msg or localize("k_upgrade_ex"),
1787-
card = card,
1788-
colour = G.C.CHIPS,
1789-
}
1790-
end
17911760
end
17921761
end
17931762
end,
@@ -2619,12 +2588,12 @@ local starfruit = {
26192588
}
26202589
end
26212590
if context.reroll_shop or context.forcetrigger then
2622-
card.ability.emult = card.ability.emult - card.ability.emult_mod
2623-
local msg = SMODS.scale_card(card, {
2591+
SMODS.scale_card(card, {
26242592
ref_table = card.ability,
26252593
ref_value = "emult",
26262594
scalar_value = "emult_mod",
26272595
operation = "-",
2596+
no_message = true,
26282597
})
26292598
--floating point precision can kiss my ass istg
26302599
if to_number(card.ability.emult) <= 1.00000001 then

0 commit comments

Comments
 (0)