Scratch-Off
Scratch-Offs are gambling tickets that can be bought in the Dock Shop for $25, $75, and $350.
Usage
Each Scratch-Off generates five random winning numbers and twenty random scratch spots, with each scratch spot having a random value between the minimum value and jackpot value. To win, at least one of the player's winning numbers must match one of the scratch spots. If the player wins, a celebratory jingle will play and the player character will emote happily. If the player loses, a lose jingle will play and the player will emote angrily.
Scratch-Offs are scratched off by holding
and dragging the mouse over the gray area. Once most of the gray has been scratched off, the minigame will end, and the player will either win money or gain nothing.
Prize Amounts
Each Scratch-Off type contains 9 different tiers of prize money.
| Scratch-Off Type | Tier 1 | Tier 2 | Tier 3 | Tier 4 | Tier 5 | Tier 6 | Tier 7 | Tier 8 | Tier 9 |
|---|---|---|---|---|---|---|---|---|---|
| $25 Scratch-Off | $10 | $25 | $50 | $100 | $200 | $500 | $1,000 | $5,000 | $10,000 |
| $75 Scratch-Off | $25 | $65 | $125 | $250 | $500 | $1,250 | $2,500 | $12,500 | $25,000 |
| $350 Scratch-Off | $100 | $250 | $500 | $1,000 | $2,000 | $5,000 | $10,000 | $50,000 | $100,000 |
For each scratch spot, the prize tier starts at 1, has a 70% chance to increase to tier 2, and for each tier after 2, the chance to increase to the next tier goes down by 25% of the current chance.
Via /Scenes/Minigames/ScratchTicket/scratch_spots.gd:
var chance = 0.7
var price = 0
for i in 8:
if randf() <= chance:
price += 1
chance *= 0.75
else:
break
This can be represented by the following equation:
Which leads to the following chances for each tier being picked:
| Tier 1 | Tier 2 | Tier 3 | Tier 4 | Tier 5 | Tier 6 | Tier 7 | Tier 8 | Tier 9 |
|---|---|---|---|---|---|---|---|---|
| 30% | 33.25% | 22.28% | 10.197% | 3.327% | 0.789% | 0.138% | 0.018% | 0.001% |
Odds of winning
The winning numbers are generated as five random integers between 0 and 49, with no repeats and roughly equal chances of choosing each number. Next, the twenty scratch spot numbers are generated again between 0 and 49 with no repeats, with the stipulation that if a number generated for a scratch spot is one of the five winning numbers, there is an 80% chance it will be rerolled and the process repeated. The source of this computation is in /Scenes/Minigames/ScratchTicket/scratch_ticket.gd:
var blacklist = [] for child in $Node2D / winning.get_children(): var num = randi() % 50 while blacklist.has(num): num = randi() % 50 winning_numbers.append(num) blacklist.append(num) blacklist = [] for child in $Node2D / spots.get_children(): var num = randi() % 50 while blacklist.has(num) or (winning_numbers.has(num) and randf() < 0.8): num = randi() % 50 blacklist.append(num)
To find the chance that at least one number matches, we can subtract the chance of generating no matches from 1, and instead focus on computing the chance of generating no matches.
Let for i from 0 to 19 be the probability of not generating a winning number in scratch spot i. Then we have and by chain rule of probability,
Let us now focus on , the probability of spot 0 not containing a winning number. This can happen in infinitely many ways:
- We immediately roll one of the 45 numbers that are not winning with probability 45/50
- We roll a winning number with probability 5/50, but then hit the 80% reroll chance, and then hit one of the 45 non-winning numbers, leading to a total probability of (5/50 * 0.8) * 45/50
- We roll case 2, but on the reroll hit a winning number again with chance 5/50, hit the reroll chance of 80% again, and only then hit one of the 45 non-winning numbers, leading to a probability of (5/50 * 0.8) * (5/50 * 0.8) * 45/50
- This can go on forever, each case adds on a factor of (5/50 * 0.8)
To summarize, we obtain . Applying the formula for infinite geometric series, we obtain
Analyzing , we find that the cases only change in a small way, namely the chance of rolling a winning/non-winning number. Explicitly written out for this leads to:
- We immediately roll one of the 44 numbers that are not winning and were not rolled in one of the previous scratch spots with probability 44/49 (Note that we cannot roll the card from S_0, and we know that that card was a losing card).
- We roll a winning number with probability 5/49, but then hit the 80% reroll chance, and then hit one of the 44 non-winning numbers, leading to a total probability of (5/49 * 0.8) * 44/49
- We roll case 2, but on the reroll hit a winning number again with chance 5/49, hit the reroll chance of 80% again, and only then hit one of the 44 non-winning numbers, leading to a probability of (5/49 * 0.8) * (5/49 * 0.8) * 44/49
- This can go on forever, each case adds on a factor of (5/49 * 0.8)
In other words, we moved from and to and . This generalizes to the other probabilities .
We obtain a general formula: .
Plugging in these numbers into our original formulation of , we get . Inverting this, we get a probability of having at least one winning number on a ticket of roughly .
As such, the player stands to win in just over 4 out of 10 tickets on average.
A slightly more involved computation gives explicit probabilities for seeing a certain number of winning spots on a ticket:
- 0 winning spots: 56.52%
- 1 winning spot: 34.78%
- 2 winning spots: 7.85%
- 3 winning spots: 0.81%
- 4 winning spots: 0.038%
- 5 winning spots: 0.00066%
Plugging in the probabilities for the difference prize tiers, we can additionally compute (for the $350 tickets, the numbers are different for the lower types!):
- The chance of a ticket breaking even: 20.75%
- The average return for a winning spot: $456.96
- The average return for an entire ticket: $242.51
- The average net loss of an entire ticket: $107.49
Empirical Evidence
The math was checked by simulating 100 million runs, reaching a win ratio of 0.43477. The source code for this simulation and calculation for above numbers can be found here.
Content creator Dagnel scratched 5000 tickets manually in-game in this video and published his data here, ending up with a ratio of 0.4426.



