Balatrolator is a score calculator for Balatro. It's a fan project and not affiliated with the makers of Balatro.
Note
Please, report any bugs you encounter.
Tip
Example score showcasing a hand played by haelian on 2024-02-26 18:13 (UTC).
- Game features: Supports all score-influencing game features (and has tests for a lot of them)
- Luck: Calculates worst case, average, and best case scores when odds are in play (read more below: Tell me the odds: how probabilistic effects are handled)
- Saves: Save hands in the browser and load them later to compare different hand variations. You can also export saves as JSON files and import them again.
- Share URLs: Share your score! The current hand is persisted in the URL and the saves.
- Quality of life: Duplicate jokers/playing cards or set their play count to input high-scoring endless game hands.
- No hand optimizations: the goal of this calculator is to predict/verify scores (i.e doing the math). I leave being clever to you. 🤡 (Also: I might change my mind on this. 🃏)
Balatrolator always returns deterministic scores and doesn't roll any “dice” when probabilistic effects (e.g. lucky card) are at play. Instead, it gives you scores for three “luck modes”:
- no luck: the lower bound
- all luck: the upper bound
- average luck: the score you can expect with perfectly average luck
“No luck” means probabilistic effects never contribute anything to the score. Lucky cards never apply their +Mult value; Bloodstone never applies its xMult value.
“All luck” means probablistic effects always contribute to the score. Lucky cards always add their +Mult value; Bloodstone always applies its xMult value.
“Average luck” means probabilistic effects are counted with the scores that you can expect on average. That is, the resulting score is the one you would get as if you would play the same hand an infinite amount of times and averaged the resulting scores. In other words, a lucky card's +Mult value of 20 with standard odds of 1 in 5 would add 4 (20 * 1/5). “Oops! All 6s” jokers do factor into this math: having two instances of that joker would raise the odds of a lucky card's +Mult effect to 4 in 5 and so the value scored would be 16 (20 * 4/5).
Of special note is the case when there are enough instances of the “Oops! All 6s” joker to guarantee an effect in the game. In that case, the three luck modes become irrelevant and the score is calculated the same way it would in “all luck” mode.
Contribution guidelines for this project
After cloning this repository, run the following to calculate a score with a Balatrolator save export in JSON format.
node --experimental-strip-types balatrolator.ts 'Current hand.json'