@@ -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