diff --git a/config.lua b/config.lua index b37808d..0e3035b 100644 --- a/config.lua +++ b/config.lua @@ -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, } diff --git a/localization/en-us.lua b/localization/en-us.lua index d4c7853..900dfeb 100644 --- a/localization/en-us.lua +++ b/localization/en-us.lua @@ -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", diff --git a/manifest.json b/manifest.json index 8a80ecc..93f18e2 100644 --- a/manifest.json +++ b/manifest.json @@ -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", diff --git a/src/blind.lua b/src/blind.lua index 54d1e5c..33b4772 100644 --- a/src/blind.lua +++ b/src/blind.lua @@ -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 diff --git a/src/main.lua b/src/main.lua index 1edd3fe..8e867c8 100644 --- a/src/main.lua +++ b/src/main.lua @@ -13,7 +13,7 @@ end q(function() ---@type 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,41 +52,22 @@ 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 = { - { - n = G.UIT.C, - config = {minw = 1, minh = 1, align = "tl", padding = 0.1, colour = G.C.CLEAR}, - nodes = { - toggle "illusion_seal", - toggle "no_wild_debuff", - toggle "no_highlight_limit", - _G["Talisman"] and toggle "harsh_ante_scaling", - toggle "fusable_escapey", - toggle "equinox_assist", - }, + nodes = {{ + n = G.UIT.C, + config = {minw = 1, minh = 1, align = "tl", padding = 0.1, colour = G.C.CLEAR}, + nodes = { + toggle "illusion_seal", + toggle "no_wild_debuff", + toggle "no_highlight_limit", + _G["Talisman"] and toggle "harsh_ante_scaling", + toggle "fusable_escapey", + 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, - }, - }, - }}, + }}, } 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 diff --git a/src/tweaks.lua b/src/tweaks.lua index c32c9ec..defa373 100644 --- a/src/tweaks.lua +++ b/src/tweaks.lua @@ -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