mirror of
https://gitlab.com/Kwoth/nadekobot.git
synced 2025-09-11 17:58:26 -04:00
Replaced .wheel with .lula (lucky ladder). It looks nicer but plays the same. Also it is more customizable as you can have more or less multipliers. Cleaned up some trivia code. Sorted lula multipliers in gambling.yml. Improved .slottest
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
namespace Nadeko.Econ.Gambling;
|
||||
|
||||
public readonly struct WofResult
|
||||
public readonly struct LuLaResult
|
||||
{
|
||||
public int Index { get; init; }
|
||||
public decimal Multiplier { get; init; }
|
||||
public decimal Won { get; init; }
|
||||
public IReadOnlyList<decimal> Multipliers { get; init; }
|
||||
}
|
@@ -1,23 +1,23 @@
|
||||
namespace Nadeko.Econ.Gambling;
|
||||
|
||||
public sealed class WofGame
|
||||
public sealed class LulaGame
|
||||
{
|
||||
public static IReadOnlyList<decimal> DEFAULT_MULTIPLIERS = new[] { 1.7M, 1.5M, 0.2M, 0.1M, 0.3M, 0.5M, 1.2M, 2.4M };
|
||||
|
||||
private readonly IReadOnlyList<decimal> _multipliers;
|
||||
private readonly NadekoRandom _rng;
|
||||
|
||||
public WofGame(IReadOnlyList<decimal> multipliers)
|
||||
public LulaGame(IReadOnlyList<decimal> multipliers)
|
||||
{
|
||||
_multipliers = multipliers;
|
||||
_rng = new();
|
||||
}
|
||||
|
||||
public WofGame() : this(DEFAULT_MULTIPLIERS)
|
||||
public LulaGame() : this(DEFAULT_MULTIPLIERS)
|
||||
{
|
||||
}
|
||||
|
||||
public WofResult Spin(long bet)
|
||||
public LuLaResult Spin(long bet)
|
||||
{
|
||||
var result = _rng.Next(0, _multipliers.Count);
|
||||
|
||||
@@ -28,7 +28,8 @@ public sealed class WofGame
|
||||
{
|
||||
Index = result,
|
||||
Multiplier = multi,
|
||||
Won = amount
|
||||
Won = amount,
|
||||
Multipliers = _multipliers.ToArray(),
|
||||
};
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user