@@ -819,41 +819,42 @@ local scalae = {
819819 end
820820 end ,
821821 calc_scaling = function (self , card , other , current_scaling , current_scalar , args )
822- if other .ability .name ~= " cry-Scalae" then
823- if not G .GAME .cryptid_base_scales then
824- G .GAME .cryptid_base_scales = {}
825- end
826- if not G .GAME .cryptid_base_scales [other .config .center .key ] then
827- G .GAME .cryptid_base_scales [other .config .center .key ] = {}
828- end
829- if not G .GAME .cryptid_base_scales [other .config .center .key ][args .scalar_value ] then
830- G .GAME .cryptid_base_scales [other .config .center .key ][args .scalar_value ] = current_scalar
831- end
832- local true_base = G .GAME .cryptid_base_scales [other .config .center .key ][args .scalar_value ]
833- local orig_scale_scale = current_scaling
834- local new_scale = lenient_bignum (
835- to_big (true_base )
836- * (
837- (
838- 1
839- + (
840- (to_big (orig_scale_scale ) / to_big (true_base ))
841- ^ (to_big (1 ) / to_big (card .ability .extra .scale ))
842- )
843- ) ^ to_big (card .ability .extra .scale )
844- )
845- )
846- if not Cryptid .is_card_big (other ) and to_big (new_scale ) >= to_big (1e300 ) then
847- new_scale = 1e300
848- end
849- return {
850- scalar_value = new_scale ,
851- message = localize (" k_upgrade_ex" ),
822+ -- checks if the scaled joker is also a scalae
823+ -- if so, return nothing
824+ if other .config .center .key == self .key then return end
825+
826+ -- store original scaling rate
827+ if not other .ability .cry_scaling_info then
828+ other .ability .cry_scaling_info = {
829+ [args .scalar_value ] = current_scalar
852830 }
831+ elseif not other .ability .cry_scaling_info [args .scalar_value ] then
832+ other .ability .cry_scaling_info [args .scalar_value ] = current_scalar
853833 end
834+
835+ -- joker scaling stuff
836+ local original_scalar = other .ability .cry_scaling_info [args .scalar_value ]
837+ 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+ )
847+ )
848+ args .scalar_table [args .scalar_value ] = new_scale
849+
850+ return {
851+ message = localize (" k_upgrade_ex" ),
852+ }
854853 end ,
854+
855855 loc_vars = function (self , info_queue , card )
856856 local example = { 2 , 3 , 4 }
857+ -- this is literally just straight up wrong atm, scalae doesn't work like this
857858 for i = 1 , # example do
858859 example [i ] = to_big (example [i ]) ^ (card .ability .extra .scale + 1 )
859860 end
0 commit comments