Fix polyfill of Cryptid's misprintize
This commit is contained in:
parent
77f0c3c77e
commit
46afab542b
1 changed files with 6 additions and 5 deletions
|
|
@ -90,6 +90,11 @@ local function deep_copy(obj, seen)
|
|||
return res
|
||||
end
|
||||
|
||||
local function format(number, str)
|
||||
return math.abs(to_big(number)) >= to_big(1e300) and number
|
||||
or tonumber(str:format((Big and to_number(to_big(number)) or number)))
|
||||
end
|
||||
|
||||
local function is_card_big(joker)
|
||||
local center = joker.config and joker.config.center
|
||||
|
||||
|
|
@ -109,10 +114,6 @@ local function log_random(seed, min, max)
|
|||
end
|
||||
|
||||
function Jane.misprintize_val(val, override, big)
|
||||
local function format(number, str)
|
||||
return math.abs(to_big(number)) >= to_big(1e300) and number
|
||||
or tonumber(str:format((Big and to_number(to_big(number)) or number)))
|
||||
end
|
||||
|
||||
return is_number(val) and check(
|
||||
format(
|
||||
|
|
@ -152,7 +153,7 @@ function Jane.misprintize_tbl(name, ref_tbl, ref_value, clear, override, stack,
|
|||
|
||||
tbl[k] = check(
|
||||
clear and base_values[name][k]
|
||||
or cry_format(
|
||||
or format(
|
||||
(stack and tbl[k] or base_values[name][k])
|
||||
* log_random(
|
||||
pseudoseed("cry_misprint" .. G.GAME.round_resets.ante),
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue