@@ -398,17 +398,17 @@ function Card:get_nominal(mod)
398398end
399399
400400function Cryptid .manipulate (card , args )
401- if not args then
402- Cryptid .manipulate (card , {
403- min = G .GAME .modifiers .cry_misprint_min ,
404- max = G .GAME .modifiers .cry_misprint_max ,
405- type = " X" ,
406- dont_stack = true ,
407- })
408- else
401+ if not args then
402+ Cryptid .manipulate (card , {
403+ min = G .GAME .modifiers .cry_misprint_min ,
404+ max = G .GAME .modifiers .cry_misprint_max ,
405+ type = " X" ,
406+ dont_stack = true ,
407+ })
408+ else
409409 if not args .type then
410- args .type = " X"
411- end
410+ args .type = " X"
411+ end
412412 -- hardcoded whatever
413413 if card .config .center .set == " Booster" then
414414 args .big = false
@@ -421,10 +421,22 @@ function Cryptid.manipulate(card, args)
421421 end )
422422 end
423423 end
424- Cryptid .manipulate_table (card , card , " ability" , args )
425- if card .base then
426- Cryptid .manipulate_table (card , card , " base" , args )
424+ if not Cryptid .base_values [card .config .center .key ] then
425+ Cryptid .base_values [card .config .center .key ] = {}
426+ for i , v in pairs (card .ability ) do
427+ if (type (v ) == " table" and v .tetrate ) or type (v ) == " number" and to_big (v ) < to_big (0 ) then
428+ Cryptid .base_values [card .config .center .key ][i .. " ability" ] = v
429+ elseif (type (v ) == " table" ) then
430+ for i2 , v2 in pairs (v ) do
431+ Cryptid .base_values [card .config .center .key ][i2 .. i ] = v2
432+ end
433+ end
434+ end
427435 end
436+ Cryptid .manipulate_table (card , card , " ability" , args )
437+ if card .base then
438+ Cryptid .manipulate_table (card , card , " base" , args )
439+ end
428440 if G .GAME .modifiers .cry_misprint_min then
429441 -- card.cost = cry_format(card.cost / Cryptid.log_random(pseudoseed('cry_misprint'..G.GAME.round_resets.ante),override and override.min or G.GAME.modifiers.cry_misprint_min,override and override.max or G.GAME.modifiers.cry_misprint_max),"%.2f")
430442 card .misprint_cost_fac = 1
@@ -450,29 +462,24 @@ function Cryptid.manipulate(card, args)
450462 end
451463 end
452464 end
453- if card .ability .consumeable then
454- for k , v in pairs (card .ability .consumeable ) do
455- card .ability .consumeable [k ] = Cryptid .deep_copy (card .ability [k ])
456- end
457- end
465+ -- if card.ability.consumeable then
466+ -- for k, v in pairs(card.ability.consumeable) do
467+ -- -- card.ability.consumeable[k] = Cryptid.deep_copy(card.ability[k])
468+ -- end
469+ -- end
458470 end
459471end
460472
461473function Cryptid .manipulate_table (card , ref_table , ref_value , args , tblkey )
474+ if ref_value == " consumeable" then return end
462475 for i , v in pairs (ref_table [ref_value ]) do
463476 if
464477 (type (v ) == " number" or (type (v ) == " table" and v .tetrate ))
465478 and Cryptid .misprintize_value_blacklist [i ] ~= false
466479 then
467480 local num = v
468481 if args .dont_stack then
469- if not Cryptid .base_values [card .config .center .key ] then
470- Cryptid .base_values [card .config .center .key ] = {}
471- end
472- if not Cryptid .base_values [card .config .center .key ][i .. ref_value ] and v ~= 0 then
473- Cryptid .base_values [card .config .center .key ][i .. ref_value ] = v
474- end
475- if Cryptid .base_values [card .config .center .key ][i .. ref_value ] then
482+ if Cryptid .base_values [card .config .center .key ] and Cryptid .base_values [card .config .center .key ][i .. ref_value ] then
476483 num = Cryptid .base_values [card .config .center .key ][i .. ref_value ]
477484 end
478485 end
0 commit comments