Fix sinister erroneously activating

This commit is contained in:
Emik 2025-03-27 20:24:43 +01:00
parent cb052fa1d6
commit f7037ce504
Signed by untrusted user who does not match committer: emik
GPG key ID: 09CDFF9E5703688D
2 changed files with 7 additions and 4 deletions

View file

@ -42,10 +42,12 @@ match_indent = true
target = "functions/misc_functions.lua" target = "functions/misc_functions.lua"
pattern = "local AC = G.SETTINGS.ambient_control" pattern = "local AC = G.SETTINGS.ambient_control"
position = "before" position = "before"
payload = '''if Jane and G.ARGS.score_intensity.required_score ~= 0 then payload = '''if Jane and (type(G.ARGS.score_intensity.required_score) == "table" 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 big = (break_infinity == "" or break_infinity == nil) and function (x) return x end or to_big
local base = Cryptid and 10 or G.ARGS.score_intensity.required_score local base = Cryptid and 10 or G.ARGS.score_intensity.required_score
local expo = Cryptid and G.ARGS.score_intensity.required_score or 10 local expo = Cryptid and G.ARGS.score_intensity.required_score or 10
Jane.sinister = (G.ARGS.score_intensity.earned_score / (to_big(base) ^ to_big(expo))):to_number() > 1 Jane.sinister = (G.ARGS.score_intensity.earned_score / (big(base) ^ big(expo))):to_number() > 1
end''' end'''
match_indent = true match_indent = true

View file

@ -127,8 +127,9 @@ function Jane.get_chipmult_sum(chips, mult)
chips = chips or 0 chips = chips or 0
mult = mult or 0 mult = mult or 0
local op, big = Jane.get_operator(), Talisman.config_file.break_infinity == "omeganum" and local break_infinity = ((Talisman or {}).config_file or {}).break_infinity
to_big or function (x) return x end local big = (break_infinity == "" or break_infinity == nil) and function (x) return x end or to_big
local op = Jane.get_operator()
if op >= 3 then if op >= 3 then
return big(chips) ^ big(mult) return big(chips) ^ big(mult)