Overhaul harsh ante scaling

This commit is contained in:
Emik 2026-03-01 20:13:38 +01:00
parent 6585e1fcc4
commit 2fb6606748
Signed by: emik
GPG key ID: 6B0CD72A5E503BDF
6 changed files with 36 additions and 67 deletions

View file

@ -3,6 +3,7 @@ return {
fusable_escapey = false, fusable_escapey = false,
harsh_ante_scaling = true, harsh_ante_scaling = true,
illusion_seal = true, illusion_seal = true,
import_funky = false,
no_highlight_limit = true, no_highlight_limit = true,
no_wild_debuff = true, no_wild_debuff = true,
} }

View file

@ -374,11 +374,11 @@ return {
b_Roland_entering_shop = "Entering shop!", b_Roland_entering_shop = "Entering shop!",
b_Roland_escape = "ESCAPE", b_Roland_escape = "ESCAPE",
b_Roland_fuse = "FUSE", b_Roland_fuse = "FUSE",
b_Roland_debug_export = "Import funky.lua",
b_Roland_equinox_assist = "Assist: Only hide text (Equinox)", b_Roland_equinox_assist = "Assist: Only hide text (Equinox)",
b_Roland_fusable_escapey = "Fusable Escapey (overpowered)", b_Roland_fusable_escapey = "Fusable Escapey (overpowered)",
b_Roland_harsh_ante_scaling = "Harsh ante scaling (Ante 40+)", b_Roland_harsh_ante_scaling = "Harsh ante scaling (Ante 40+)",
b_Roland_illusion_seal = "Allow seals from Illusion voucher", b_Roland_illusion_seal = "Allow seals from Illusion voucher",
b_Roland_import_funky = "Debug: Import funky.lua",
b_Roland_most_common_card = "(Rank)", b_Roland_most_common_card = "(Rank)",
b_Roland_no_highlight_limit = "No consumable highlight limit", b_Roland_no_highlight_limit = "No consumable highlight limit",
b_Roland_no_wild_debuff = "No wild card debuffs", b_Roland_no_wild_debuff = "No wild card debuffs",

View file

@ -6,7 +6,7 @@
"author": [ "author": [
"Emik" "Emik"
], ],
"version": "2.0.8", "version": "2.0.9",
"badge_colour": "8BE9FD", "badge_colour": "8BE9FD",
"main_file": "src/main.lua", "main_file": "src/main.lua",
"badge_text_colour": "44475A", "badge_text_colour": "44475A",

View file

@ -378,6 +378,7 @@ local venerable_visage = blind {
boss = {showdown = true}, boss = {showdown = true},
boss_colour = HEX "f6f6f2ff", boss_colour = HEX "f6f6f2ff",
pronouns = "any_all", pronouns = "any_all",
dollars = 8,
calculate = function(self, b, context) calculate = function(self, b, context)
if b.disabled then if b.disabled then
return return

View file

@ -13,7 +13,7 @@ end
q(function() q(function()
---@type table<string, {name: string, fg: table, bg: table}> ---@type table<string, {name: string, fg: table, bg: table}>
local contributors = Bakery_API.contributors local contributors, mods = Bakery_API.contributors, SMODS.Mods
contributors.Roland_aster = { contributors.Roland_aster = {
name = "asterSSH", name = "asterSSH",
@ -26,6 +26,10 @@ q(function()
fg = HEX "f8f8f2ff", fg = HEX "f8f8f2ff",
bg = HEX "ff79c6ff", bg = HEX "ff79c6ff",
} }
if mods.DebugPlus and mods.Roland.config.import_funky then
_G.f, _G.q, _G.u = unpack(qol)
end
end, true) end, true)
local function toggle(id) local function toggle(id)
@ -48,8 +52,7 @@ function SMODS.current_mod.config_tab()
return { return {
n = G.UIT.ROOT, n = G.UIT.ROOT,
config = {minw = 1, minh = 1, align = "tl", padding = 0.1, colour = G.C.BLACK}, config = {minw = 1, minh = 1, align = "tl", padding = 0.1, colour = G.C.BLACK},
nodes = { nodes = {{
{
n = G.UIT.C, n = G.UIT.C,
config = {minw = 1, minh = 1, align = "tl", padding = 0.1, colour = G.C.CLEAR}, config = {minw = 1, minh = 1, align = "tl", padding = 0.1, colour = G.C.CLEAR},
nodes = { nodes = {
@ -59,20 +62,7 @@ function SMODS.current_mod.config_tab()
_G["Talisman"] and toggle "harsh_ante_scaling", _G["Talisman"] and toggle "harsh_ante_scaling",
toggle "fusable_escapey", toggle "fusable_escapey",
toggle "equinox_assist", toggle "equinox_assist",
}, SMODS.Mods.DebugPlus and toggle "import_funky",
},
SMODS.Mods.DebugPlus and {
n = G.UIT.C,
config = {minw = 2, minh = 2, align = "tl", padding = 0.2, colour = G.C.CLEAR},
nodes = {
UIBox_button {
label = {localize {type = "variable", key = "b_Roland_debug_export"}},
func = G.P_CENTERS.j_Roland_escapey.debug_export,
button = "Roland_debug_export",
colour = G.C.MULT,
col = true,
scale = 5,
},
}, },
}}, }},
} }
@ -81,8 +71,3 @@ end
function SMODS.current_mod.optional_features() function SMODS.current_mod.optional_features()
return {cardareas = {deck = true, unscored = true}} return {cardareas = {deck = true, unscored = true}}
end end
function G.FUNCS.Roland_debug_export(_, tbl)
local to = tbl or _G
to.f, to.q, to.u = unpack(qol)
end

View file

@ -113,11 +113,12 @@ function create_card_for_shop(...)
return ret return ret
end end
local tens, orig_get_blind_amount = f().const(10.0001), get_blind_amount local orig_get_blind_amount = get_blind_amount
---@type fun(x: table|number): number ---@param ante number
local function blind(offset) ---@return number
return (_G["to_number"] or f().id)(orig_get_blind_amount(offset)) local function blind(ante)
return ante == 39 and 1e294 or (_G["to_number"] or f().id)(orig_get_blind_amount(ante))
end end
local function no_harsh_ante_scaling() local function no_harsh_ante_scaling()
@ -125,40 +126,21 @@ local function no_harsh_ante_scaling()
end end
function get_blind_amount(ante, ...) function get_blind_amount(ante, ...)
if ante <= 38 or no_harsh_ante_scaling() then local loop = 39
if ante < loop or no_harsh_ante_scaling() then
return orig_get_blind_amount(ante, ...) return orig_get_blind_amount(ante, ...)
end end
if ante >= 100 then if (ante - 9) / 15 >= loop then
return 1 / 0 return 1 / 0
end end
--- @type { new: fun(self: self, arr?: number[], sign?: number, noNormalize?: boolean): table }, number --- @type { constants?: { TEN: table }, new: (fun(self: self, arr?: number[], sign?: number, noNormalize?: boolean): table), pow: (fun(x: number, y: number): number) }
local big, bump = _G["Big"], 0.0001 local big, rem = _G["Big"], (ante % loop) + 1
if ante >= 91 then return ante / 15 >= loop and big:new(f(blind(ante - (loop * 15))):map(f().const(10)):table()) or
local offset = ante - 91 (ante / 9 >= loop and big:new(f(ante / loop - 8):map(f().const(10)):concat {blind(rem)}:table()) or
local table = f(blind(offset)):map(tens):table() (ante / 2 >= loop and big:new {blind(rem), ante / loop} or
return big:new(table) (big.constants and big.constants.TEN or big:new {10}):pow(blind(rem))))
end
if ante >= 70 then
local offset = ante - 70
local table = f((offset / 3) + 1):map(tens):concat {blind((offset % 3) * 8) + bump}:table()
return big:new(table)
end
if ante >= 49 then
local offset = ante - 49
return big:new {blind((offset % 3) * 8) + bump, math.floor(offset / 3) + 2 + bump}
end
local scaling = {3, 4, 5, 6, 7, 8, 9, 10, 20, 50}
return big:new {scaling[ante - 38] + bump, 2 + bump}
end
local orig_number_format = number_format
function number_format(...)
return no_harsh_ante_scaling() and orig_number_format(...) or orig_number_format(...):gsub("[.]0+", "")
end end