mirror of
https://github.com/barelyprofessional/KfChatDotNet.git
synced 2026-05-02 04:22:04 -04:00
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:
@@ -162,7 +162,7 @@ public class KasinoKrash : IDisposable
|
|||||||
await _kfChatBot.KfClient.EditMessageAsync(msg.ChatMessageUuid!, $"[center][b][size=200][color=red]{TheGame.FinalMulti}x");
|
await _kfChatBot.KfClient.EditMessageAsync(msg.ChatMessageUuid!, $"[center][b][size=200][color=red]{TheGame.FinalMulti}x");
|
||||||
foreach (var bet in TheGame.Bets)
|
foreach (var bet in TheGame.Bets)
|
||||||
{
|
{
|
||||||
if (bet.Multi <= TheGame.FinalMulti)
|
if (bet.Multi <= TheGame.FinalMulti && bet.Multi != -1)
|
||||||
{
|
{
|
||||||
//you win
|
//you win
|
||||||
var payout = TheGame.CurrentMulti * bet.Wager - bet.Wager;
|
var payout = TheGame.CurrentMulti * bet.Wager - bet.Wager;
|
||||||
@@ -192,6 +192,7 @@ public class KasinoKrash : IDisposable
|
|||||||
}
|
}
|
||||||
|
|
||||||
//now close the game
|
//now close the game
|
||||||
|
await Task.Delay(5000);
|
||||||
await _kfChatBot.KfClient.DeleteMessageAsync(msg.ChatMessageUuid!);
|
await _kfChatBot.KfClient.DeleteMessageAsync(msg.ChatMessageUuid!);
|
||||||
await RemoveKrashState();
|
await RemoveKrashState();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user