From 259d5c339b102e047f20493894f30ec25839184f Mon Sep 17 00:00:00 2001 From: alogindtractor <251821224+A-Log-In-D-Tractor@users.noreply.github.com> Date: Wed, 11 Feb 2026 19:59:06 -0800 Subject: [PATCH] fix payouts (#82) games were slightly overpaying by including the original wager in the payout --- KfChatDotNetBot/Services/KasinoMines.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/KfChatDotNetBot/Services/KasinoMines.cs b/KfChatDotNetBot/Services/KasinoMines.cs index 65378a7..08bfb0f 100644 --- a/KfChatDotNetBot/Services/KasinoMines.cs +++ b/KfChatDotNetBot/Services/KasinoMines.cs @@ -309,9 +309,8 @@ public class KasinoMines { payout *= ((size2 - i) / (gems-i)); } - - var newBalance = await Money.NewWagerAsync(game.Creator.Id, game.Wager, payout, WagerGame.Mines); var net = payout - game.Wager; + var newBalance = await Money.NewWagerAsync(game.Creator.Id, game.Wager, net, WagerGame.Mines); await _kfChatBot.SendChatMessageAsync( $"{game.Creator.User.FormatUsername()}, you won {await payout.FormatKasinoCurrencyAsync()} from your {await game.Wager.FormatKasinoCurrencyAsync()} bet on mines, collecting {game.BetsPlaced.Count} gems while avoiding {game.Mines} mines. Net: {await net.FormatKasinoCurrencyAsync()}. Balance: {await newBalance.FormatKasinoCurrencyAsync()}", true, autoDeleteAfter: TimeSpan.FromSeconds(15)); await Task.Delay(TimeSpan.FromSeconds(15));