Fix bet handling and payout calculations in Krash game (#103)

fix where it would let you win if you didn't attempt to krash
also keeps message on screen a little longer after its over so you can see the final number better
This commit is contained in:
alogindtractor
2026-04-07 21:39:06 -07:00
committed by GitHub
parent b86986f03e
commit 7e131ff1a4

View File

@@ -162,7 +162,7 @@ public class KasinoKrash : IDisposable
await _kfChatBot.KfClient.EditMessageAsync(msg.ChatMessageUuid!, $"[center][b][size=200][color=red]{TheGame.FinalMulti}x");
foreach (var bet in TheGame.Bets)
{
if (bet.Multi <= TheGame.FinalMulti)
if (bet.Multi <= TheGame.FinalMulti && bet.Multi != -1)
{
//you win
var payout = TheGame.CurrentMulti * bet.Wager - bet.Wager;
@@ -192,6 +192,7 @@ public class KasinoKrash : IDisposable
}
//now close the game
await Task.Delay(5000);
await _kfChatBot.KfClient.DeleteMessageAsync(msg.ChatMessageUuid!);
await RemoveKrashState();
}