@@ -229,11 +229,12 @@ function Cryptid.misprintize_val(val, override, big, grow_type, pow_level)
229229 return val
230230end
231231function Cryptid .sanity_check (val , is_big )
232+ if not Talisman then return val end
232233 if is_big then
233234 if not val or type (val ) == " number" and (val ~= val or val > 1e300 or val < - 1e300 ) then
234235 val = 1e300
235236 end
236- if type (val ) == " table " then
237+ if Cryptid . is_big (val ) then
237238 return val
238239 end
239240 if val > 1e100 or val < - 1e100 then
@@ -243,7 +244,7 @@ function Cryptid.sanity_check(val, is_big)
243244 if not val or type (val ) == " number" and (val ~= val or val > 1e300 or val < - 1e300 ) then
244245 return 1e300
245246 end
246- if type (val ) == " table " then
247+ if Cryptid . is_big (val ) then
247248 if val > to_big (1e300 ) then
248249 return 1e300
249250 end
@@ -333,7 +334,7 @@ function Cryptid.misprintize(card, override, force_reset, stack, grow_type, pow_
333334 end
334335 if clamps then
335336 for i , v in pairs (clamps ) do
336- if type (v ) == " table" and not v . tetrate then
337+ if type (v ) == " table" and not Cryptid . is_big ( v ) then
337338 for i2 , v2 in pairs (v ) do
338339 if to_big (card .ability [i ][i2 ]) > to_big (v2 ) then
339340 card .ability [i ][i2 ] = Cryptid .sanity_check (v2 , Cryptid .is_card_big (card ))
@@ -345,7 +346,7 @@ function Cryptid.misprintize(card, override, force_reset, stack, grow_type, pow_
345346 end
346347 end
347348 end
348- elseif ( type ( v ) == " table " and v . tetrate ) or type (v ) == " number " then
349+ elseif Cryptid . is_number (v ) then
349350 if to_big (card .ability [i ]) > to_big (v ) then
350351 card .ability [i ] = Cryptid .sanity_check (v , Cryptid .is_card_big (card ))
351352 if to_big (card .ability [i ]) > to_big (- 1e100 ) or to_big (card .ability [i ]) < to_big (1e100 ) then
@@ -396,11 +397,12 @@ function Card:get_nominal(mod)
396397end
397398
398399function Cryptid .manipulate (card , args )
400+ if not card or not card .config or not card .config .center then return end
399401 if not Card .no (card , " immutable" , true ) or (args and args .bypass_checks ) then
400402 if not args then
401403 return Cryptid .manipulate (card , {
402- min = (G .GAME .modifiers .cry_misprint_min or 1 ) * ( G . GAME . modifiers . cry_jkr_misprint_mod or 1 ) ,
403- max = (G .GAME .modifiers .cry_misprint_max or 1 ) * ( G . GAME . modifiers . cry_jkr_misprint_mod or 1 ) ,
404+ min = (G .GAME .modifiers .cry_misprint_min or 1 ),
405+ max = (G .GAME .modifiers .cry_misprint_max or 1 ),
404406 type = " X" ,
405407 dont_stack = true ,
406408 no_deck_effects = true ,
@@ -438,13 +440,13 @@ function Cryptid.manipulate(card, args)
438440 end
439441 if caps then
440442 for i , v in pairs (caps ) do
441- if type (v ) == " table " and not v . tetrate then
443+ if Cryptid . is_big (v ) then
442444 for i2 , v2 in pairs (v ) do
443445 if to_big (card .ability [i ][i2 ]) > to_big (v2 ) then
444446 card .ability [i ][i2 ] = Cryptid .sanity_check (v2 , Cryptid .is_card_big (card ))
445447 end
446448 end
447- elseif ( type ( v ) == " table " and v . tetrate ) or type (v ) == " number " then
449+ elseif Cryptid . is_number (v ) then
448450 if to_big (card .ability [i ]) > to_big (v ) then
449451 card .ability [i ] = Cryptid .sanity_check (v , Cryptid .is_card_big (card ))
450452 end
@@ -456,7 +458,7 @@ function Cryptid.manipulate(card, args)
456458 if not Cryptid .base_values [card .config .center .key ] then
457459 Cryptid .base_values [card .config .center .key ] = {}
458460 for i , v in pairs (config ) do
459- if ( type ( v ) == " table " and v . tetrate ) or type (v ) == " number " and to_big (v ) ~= to_big (0 ) then
461+ if Cryptid . is_number (v ) and to_big (v ) ~= to_big (0 ) then
460462 Cryptid .base_values [card .config .center .key ][i .. " ability" ] = v
461463 elseif type (v ) == " table" then
462464 for i2 , v2 in pairs (v ) do
@@ -488,7 +490,7 @@ function Cryptid.manipulate_table(card, ref_table, ref_value, args, tblkey)
488490 end
489491 for i , v in pairs (ref_table [ref_value ]) do
490492 if
491- ( type ( v ) == " number " or ( type ( v ) == " table " and v . tetrate ) )
493+ Cryptid . is_number ( v )
492494 and Cryptid .misprintize_value_blacklist [i ] ~= false
493495 then
494496 local num = v
@@ -504,19 +506,12 @@ function Cryptid.manipulate_table(card, ref_table, ref_value, args, tblkey)
504506 or Cryptid .base_values [card .config .center .key ][i .. " consumeable" ]
505507 end
506508 end
507- local new_val = Cryptid .manipulate_value (num , args , args .big or Cryptid .is_card_big (card ), i )
508- ref_table [ref_value ][i ] = new_val
509-
510- -- take double scale / scalae into account
511- if ref_value == " ability" and ref_table .ability .cry_scaling_info then
512- ref_table .ability .cry_scaling_info [i ] = new_val
509+ if args .big ~= nil then
510+ ref_table [ref_value ][i ] = Cryptid .manipulate_value (num , args , args .big , i )
511+ else
512+ ref_table [ref_value ][i ] = Cryptid .manipulate_value (num , args , Cryptid .is_card_big (card ), i )
513513 end
514- elseif
515- i ~= " immutable"
516- and not (ref_value == " ability" and i == " cry_scaling_info" )
517- and type (v ) == " table"
518- and Cryptid .misprintize_value_blacklist [i ] ~= false
519- then
514+ elseif i ~= " immutable" and type (v ) == " table" and Cryptid .misprintize_value_blacklist [i ] ~= false then
520515 Cryptid .manipulate_table (card , ref_table [ref_value ], i , args )
521516 end
522517 end
@@ -547,7 +542,7 @@ function Cryptid.manipulate_value(num, args, is_big, name)
547542 end
548543 elseif args .type == " ^" then
549544 num = to_big (num ) ^ new_value
550- elseif args .type == " hyper" then
545+ elseif args .type == " hyper" and SMODS . Mods . Talisman and SMODS . Mods . Talisman . can_load then
551546 if to_big (num ) ~= to_big (0 ) and to_big (num ) ~= to_big (1 ) then
552547 num = to_big (num ):arrow (args .value .arrows , to_big (new_value ))
553548 end
@@ -565,7 +560,7 @@ function Cryptid.manipulate_value(num, args, is_big, name)
565560 end
566561 elseif args .type == " ^" then
567562 num = to_big (num ) ^ args .value
568- elseif args .type == " hyper" then
563+ elseif args .type == " hyper" and SMODS . Mods . Talisman and SMODS . Mods . Talisman . can_load then
569564 num = to_big (num ):arrow (args .value .arrows , to_big (args .value .height ))
570565 end
571566 end
0 commit comments