Add non-talisman compatibility

This commit is contained in:
Emik 2026-07-31 04:26:13 +02:00
parent 4480833d67
commit 1bb7da3416
Signed by: emik
GPG key ID: 6B0CD72A5E503BDF
3 changed files with 12 additions and 6 deletions

View file

@ -47,16 +47,20 @@ payload = '''if Jane and
G.ARGS.score_intensity.required_score:to_number() or
G.ARGS.score_intensity.required_score) ~= 0 then
local break_infinity = ((Talisman or {}).config_file or {}).break_infinity
local small = function (x) return type(x) == "table" and x:to_number() or x end
local big = (break_infinity == "" or break_infinity == nil) and function (x) return x end or to_big
local base = Cryptid and 2 or G.ARGS.score_intensity.required_score
local expo = Cryptid and G.ARGS.score_intensity.required_score or 2
local ratio = (G.ARGS.score_intensity.earned_score / (big(base) ^ big(expo))):to_number()
Jane.sinister = ratio > 1
local ratio = G.ARGS.score_intensity.earned_score / (big(base) ^ big(expo))
Jane.sinister = small(ratio) > 1
G.ARGS.score_intensity.ambientSurreal4 =
(break_infinity and
SMODS.Mods.Amulet and
G.ARGS.score_intensity.earned_score >= Bakery_API.parse_hyper_e("e10#10##10000")) and 1 or 0
G.ARGS.score_intensity.earned_score >= (SMODS.Mods.Amulet
and Big:new { 1.7976931348623157e308, 1, [1.7975e308] = 1 }
or Bakery_API.parse_hyper_e 'e10#10##100000'
)) and 1 or 0
G.ARGS.score_intensity.ambientSurreal3 =
(G.ARGS.score_intensity.ambientSurreal4 == 0 and
@ -65,14 +69,14 @@ payload = '''if Jane and
G.ARGS.score_intensity.ambientSurreal2 =
(G.ARGS.score_intensity.ambientSurreal3 == 0 and
G.ARGS.score_intensity.ambientSurreal4 == 0 and
(G.ARGS.score_intensity.earned_score /
small(G.ARGS.score_intensity.earned_score /
(Cryptid and
big(G.ARGS.score_intensity.required_score) ^
big(G.ARGS.score_intensity.required_score) ^
big(G.ARGS.score_intensity.required_score) or
big(2) ^ big(G.ARGS.score_intensity.required_score)
)
):to_number() > 1
) > 1
) and 1 or 0
G.ARGS.score_intensity.ambientSurreal1 =

View file

@ -18,5 +18,5 @@
"conflicts": [
"Jen"
],
"version": "1.11.17"
"version": "1.11.18"
}

View file

@ -127,6 +127,8 @@ function Jane.misprintize_val(val, override, big)
end
function Jane.misprintize_tbl(name, ref_tbl, ref_value, clear, override, stack, big)
local is_number = _G.is_number or function(x) return type(x) == "number" end
if name and ref_tbl and ref_value then
local tbl = deep_copy(ref_tbl[ref_value])