Hello!
Since you're making some changes to gamble I've come to ask if it's intentional that the checks for the rewards with 2 different symbols are ordered only? Like πβπ only works if you get it in the exact same order.
I've previously calculated the odds for each of the rewards and these ones are incredibly rare compared to the 100x ones which only use 1 symbol. Here are the stats recalculated after the update:
| Reward |
Multiplier |
Probability |
| π |
2x |
10.123321% (1 in 10) |
| ππ |
3x |
5.416681% (1 in 18) |
| β€οΈβ€οΈ |
10x |
4.462129% (1 in 22) |
| ππ |
15x |
0.381724% (1 in 262) |
| πππ |
20x |
0.307068% (1 in 326) |
| π π π |
20x |
0.157219% (1 in 636) |
| πππ |
25x |
0.105324% (1 in 949) |
| πππ |
35x |
0.307068% (1 in 326) |
| β€οΈβ€οΈβ€οΈ |
50x |
0.223853% (1 in 447) |
| πππ |
50x |
0.105324% (1 in 949) |
| πβπ |
50x |
0.000614% (1 in 162830) |
| ππ°π |
50x |
0.000461% (1 in 217107) |
| ππ°π |
65x |
0.000295% (1 in 339230) |
| πππ |
65x |
0.000197% (1 in 508845) |
| πβπ |
65x |
0.000393% (1 in 254422) |
| πππ |
75x |
0.004798% (1 in 20842) |
| βββ |
100x |
0.002457% (1 in 40708) |
| π°π°π° |
100x |
0.001036% (1 in 96492) |
| πππ |
150x |
0.000307% (1 in 325661) |
| πππ |
333x |
0.000157% (1 in 636056) |
These are calculated with order in mind. The rewards such as πβπ would be 3 times more likely if they were unordered (still really rare).
Anyway here's the source code for calculations which also runs simulations of the bot for checking expected value and other stats.
https://gist.github.com/pckv/c49824ed7777647bbb4a102ea4a2072c
I could implement a PR for unordered checks against rewards with 3 items if you want, but the general logic I use for those sequences is just to loop through every sequence reward, start with a list of all symbols the player got and remove the ones the reward requires until remove doesn't work. I've changed my implementation to approx. match yours as an example:
bool matchesReward(Reward reward, int[] symbols)
{
if (reward.Type == RewardType.Symbols)
{
// ...
}
// Sequence rewards
var remainingSymbols = symbols.ToList(); // The symbols the player got
foreach (var symbol in reward.Symbols)
{
var removed = remainingSymbols.Remove(symbol);
// If we can't remove the symbol, it doesn't match (too many of a symbol or the wrong symbol)
if (!removed) return false;
}
// We removed all symbols so the rewards have the same symbols (unordered equality!)
return true;
}
Hello!
Since you're making some changes to gamble I've come to ask if it's intentional that the checks for the rewards with 2 different symbols are ordered only? Like πβπ only works if you get it in the exact same order.
I've previously calculated the odds for each of the rewards and these ones are incredibly rare compared to the 100x ones which only use 1 symbol. Here are the stats recalculated after the update:
These are calculated with order in mind. The rewards such as πβπ would be 3 times more likely if they were unordered (still really rare).
Anyway here's the source code for calculations which also runs simulations of the bot for checking expected value and other stats.
https://gist.github.com/pckv/c49824ed7777647bbb4a102ea4a2072c
I could implement a PR for unordered checks against rewards with 3 items if you want, but the general logic I use for those sequences is just to loop through every sequence reward, start with a list of all symbols the player got and remove the ones the reward requires until remove doesn't work. I've changed my implementation to approx. match yours as an example: