Overhaul harsh ante scaling
This commit is contained in:
parent
6585e1fcc4
commit
2fb6606748
6 changed files with 36 additions and 67 deletions
|
|
@ -3,6 +3,7 @@ return {
|
|||
fusable_escapey = false,
|
||||
harsh_ante_scaling = true,
|
||||
illusion_seal = true,
|
||||
import_funky = false,
|
||||
no_highlight_limit = true,
|
||||
no_wild_debuff = true,
|
||||
}
|
||||
|
|
|
|||
|
|
@ -374,11 +374,11 @@ return {
|
|||
b_Roland_entering_shop = "Entering shop!",
|
||||
b_Roland_escape = "ESCAPE",
|
||||
b_Roland_fuse = "FUSE",
|
||||
b_Roland_debug_export = "Import funky.lua",
|
||||
b_Roland_equinox_assist = "Assist: Only hide text (Equinox)",
|
||||
b_Roland_fusable_escapey = "Fusable Escapey (overpowered)",
|
||||
b_Roland_harsh_ante_scaling = "Harsh ante scaling (Ante 40+)",
|
||||
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_no_highlight_limit = "No consumable highlight limit",
|
||||
b_Roland_no_wild_debuff = "No wild card debuffs",
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
"author": [
|
||||
"Emik"
|
||||
],
|
||||
"version": "2.0.8",
|
||||
"version": "2.0.9",
|
||||
"badge_colour": "8BE9FD",
|
||||
"main_file": "src/main.lua",
|
||||
"badge_text_colour": "44475A",
|
||||
|
|
|
|||
|
|
@ -378,6 +378,7 @@ local venerable_visage = blind {
|
|||
boss = {showdown = true},
|
||||
boss_colour = HEX "f6f6f2ff",
|
||||
pronouns = "any_all",
|
||||
dollars = 8,
|
||||
calculate = function(self, b, context)
|
||||
if b.disabled then
|
||||
return
|
||||
|
|
|
|||
29
src/main.lua
29
src/main.lua
|
|
@ -13,7 +13,7 @@ end
|
|||
|
||||
q(function()
|
||||
---@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 = {
|
||||
name = "asterSSH",
|
||||
|
|
@ -26,6 +26,10 @@ q(function()
|
|||
fg = HEX "f8f8f2ff",
|
||||
bg = HEX "ff79c6ff",
|
||||
}
|
||||
|
||||
if mods.DebugPlus and mods.Roland.config.import_funky then
|
||||
_G.f, _G.q, _G.u = unpack(qol)
|
||||
end
|
||||
end, true)
|
||||
|
||||
local function toggle(id)
|
||||
|
|
@ -48,8 +52,7 @@ function SMODS.current_mod.config_tab()
|
|||
return {
|
||||
n = G.UIT.ROOT,
|
||||
config = {minw = 1, minh = 1, align = "tl", padding = 0.1, colour = G.C.BLACK},
|
||||
nodes = {
|
||||
{
|
||||
nodes = {{
|
||||
n = G.UIT.C,
|
||||
config = {minw = 1, minh = 1, align = "tl", padding = 0.1, colour = G.C.CLEAR},
|
||||
nodes = {
|
||||
|
|
@ -59,20 +62,7 @@ function SMODS.current_mod.config_tab()
|
|||
_G["Talisman"] and toggle "harsh_ante_scaling",
|
||||
toggle "fusable_escapey",
|
||||
toggle "equinox_assist",
|
||||
},
|
||||
},
|
||||
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,
|
||||
},
|
||||
SMODS.Mods.DebugPlus and toggle "import_funky",
|
||||
},
|
||||
}},
|
||||
}
|
||||
|
|
@ -81,8 +71,3 @@ end
|
|||
function SMODS.current_mod.optional_features()
|
||||
return {cardareas = {deck = true, unscored = true}}
|
||||
end
|
||||
|
||||
function G.FUNCS.Roland_debug_export(_, tbl)
|
||||
local to = tbl or _G
|
||||
to.f, to.q, to.u = unpack(qol)
|
||||
end
|
||||
|
|
|
|||
|
|
@ -113,11 +113,12 @@ function create_card_for_shop(...)
|
|||
return ret
|
||||
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
|
||||
local function blind(offset)
|
||||
return (_G["to_number"] or f().id)(orig_get_blind_amount(offset))
|
||||
---@param ante number
|
||||
---@return number
|
||||
local function blind(ante)
|
||||
return ante == 39 and 1e294 or (_G["to_number"] or f().id)(orig_get_blind_amount(ante))
|
||||
end
|
||||
|
||||
local function no_harsh_ante_scaling()
|
||||
|
|
@ -125,40 +126,21 @@ local function no_harsh_ante_scaling()
|
|||
end
|
||||
|
||||
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, ...)
|
||||
end
|
||||
|
||||
if ante >= 100 then
|
||||
if (ante - 9) / 15 >= loop then
|
||||
return 1 / 0
|
||||
end
|
||||
|
||||
--- @type { new: fun(self: self, arr?: number[], sign?: number, noNormalize?: boolean): table }, number
|
||||
local big, bump = _G["Big"], 0.0001
|
||||
--- @type { constants?: { TEN: table }, new: (fun(self: self, arr?: number[], sign?: number, noNormalize?: boolean): table), pow: (fun(x: number, y: number): number) }
|
||||
local big, rem = _G["Big"], (ante % loop) + 1
|
||||
|
||||
if ante >= 91 then
|
||||
local offset = ante - 91
|
||||
local table = f(blind(offset)):map(tens):table()
|
||||
return big:new(table)
|
||||
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+", "")
|
||||
return ante / 15 >= loop and big:new(f(blind(ante - (loop * 15))):map(f().const(10)):table()) or
|
||||
(ante / 9 >= loop and big:new(f(ante / loop - 8):map(f().const(10)):concat {blind(rem)}:table()) or
|
||||
(ante / 2 >= loop and big:new {blind(rem), ante / loop} or
|
||||
(big.constants and big.constants.TEN or big:new {10}):pow(blind(rem))))
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue