mirror of
https://gitlab.com/Kwoth/nadekobot.git
synced 2025-09-11 09:48:26 -04:00
.slot should now show correct messages if multipliers are changed in the config
This commit is contained in:
@@ -8,21 +8,44 @@ public class SlotGame
|
||||
{
|
||||
var rolls = new[] { _rng.Next(0, 6), _rng.Next(0, 6), _rng.Next(0, 6) };
|
||||
var multi = 0;
|
||||
var winType = SlotWinType.None;
|
||||
|
||||
if (rolls.All(x => x == 5))
|
||||
{
|
||||
winType = SlotWinType.TrippleJoker;
|
||||
multi = 30;
|
||||
}
|
||||
else if (rolls.All(x => x == rolls[0]))
|
||||
{
|
||||
winType = SlotWinType.TrippleNormal;
|
||||
multi = 10;
|
||||
}
|
||||
else if (rolls.Count(x => x == 5) == 2)
|
||||
{
|
||||
winType = SlotWinType.DoubleJoker;
|
||||
multi = 4;
|
||||
}
|
||||
else if (rolls.Any(x => x == 5))
|
||||
{
|
||||
winType = SlotWinType.SingleJoker;
|
||||
multi = 1;
|
||||
}
|
||||
|
||||
return new()
|
||||
{
|
||||
Won = bet * multi,
|
||||
WinType = winType,
|
||||
Multiplier = multi,
|
||||
Rolls = rolls,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
public enum SlotWinType : byte
|
||||
{
|
||||
None,
|
||||
SingleJoker,
|
||||
DoubleJoker,
|
||||
TrippleNormal,
|
||||
TrippleJoker,
|
||||
}
|
@@ -5,4 +5,5 @@ public readonly struct SlotResult
|
||||
public decimal Multiplier { get; init; }
|
||||
public int[] Rolls { get; init; }
|
||||
public decimal Won { get; init; }
|
||||
public SlotWinType WinType { get; init; }
|
||||
}
|
Reference in New Issue
Block a user