<aside> 🇨🇳
For Chinese:
小丑牌中无法战胜的分数机制—一次简单的游戏代码分析【中文版】
</aside>
Balatro's Unbeatable Ante: A Closer Look
It becomes exceedingly hard after reaching a certain ante level. I often find myself with a well-synergized deck, but suddenly, upon reaching the next level, the blinds become so large that the game feels unbeatable. I'm curious about how the game calculates its blind amounts.
I've extracted Lua files from the Balatro game files. Using the keyword “300” (the initial round blind amount), I located the function get_blind_amount(ante) in misc_functions.lua.
Here’s the full function:
function get_blind_amount(ante)
local k = 0.75
if not G.GAME.modifiers.scaling or G.GAME.modifiers.scaling == 1 then
local amounts = {
300, 800, 2800, 6000, 11000, 20000, 35000, 50000
}
if ante < 1 then return 100 end
if ante <= 8 then return amounts[ante] end
local a, b, c, d = amounts[8],1.6,ante-8, 1 + 0.2*(ante-8)
local amount = math.floor(a*(b+(k*c)^d)^c)
amount = amount - amount%(10^math.floor(math.log10(amount)-1))
return amount
elseif G.GAME.modifiers.scaling == 2 then
local amounts = {
300, 1000, 3200, 9000, 18000, 32000, 56000, 90000
}
if ante < 1 then return 100 end
if ante <= 8 then return amounts[ante] end
local a, b, c, d = amounts[8],1.6,ante-8, 1 + 0.2*(ante-8)
local amount = math.floor(a*(b+(k*c)^d)^c)
amount = amount - amount%(10^math.floor(math.log10(amount)-1))
return amount
elseif G.GAME.modifiers.scaling == 3 then
local amounts = {
300, 1200, 3600, 10000, 25000, 50000, 90000, 180000
}
if ante < 1 then return 100 end
if ante <= 8 then return amounts[ante] end
local a, b, c, d = amounts[8],1.6,ante-8, 1 + 0.2*(ante-8)
local amount = math.floor(a*(b+(k*c)^d)^c)
amount = amount - amount%(10^math.floor(math.log10(amount)-1))
return amount
end
end
To breakdown the function:
b_plasma={name = "Plasma Deck",
stake = 1,
unlocked = false,
order = 14,
pos = {x=4,y=2},
set = "Back",
**config = {ante_scaling = 2},**
unlock_condition = {type = 'win_stake', stake=5}
}
local a, b, c, d = amounts[8],1.6,ante-8, 1 + 0.2*(ante-8)
local amount = math.floor(a*(b+(k*c)^d)^c)
amount = amount - amount%(10^math.floor(math.log10(amount)-1))
$$ \begin{align*} \text{Write in math expression:} & \\ k & = 0.75\\ a & = 180000 \text{ (depends on scaling)}\\ b & = 1.6\\ c & = n - 8\\ d & = 0.2 * (n - 8 )\\ A & = \lfloor a \cdot (b + (k \cdot c)^d)^c \rfloor\\ A' & = A - \left( A \mod 10^{\lfloor \log_{10}(A) - 1 \rfloor} \right)\\ \end{align*} $$