From fe2c57f5c1ecbc81c92ac653d0dd7fb0ed50681d Mon Sep 17 00:00:00 2001 From: alogindtractor <251821224+A-Log-In-D-Tractor@users.noreply.github.com> Date: Wed, 7 Jan 2026 19:41:07 -0800 Subject: [PATCH] fix plinko payout maybe? also added logger in case its still bugged to print ball position (#31) * Update cleanup delay settings for PlinkoCommand, use plinko delay instead of limbo Update cleanup delay settings for PlinkoCommand, use plinko delay instead of limbo * wait for chat message id update wait for chat message id update * update plinko to fix shit update plinko to fix shit * add underline to final blackjack message add underline to final blackjack message to make it easier to read which game is which when many games are happening at once * plinko fix frfr this time plinko fix frfr this time * settings fix as requested settings fix as requested * plinko payout fix? not exactly sure why its not correct this should maybe fix it? * Add logger for max win in PlinkoCommand Added logging for maximum win condition in Plinko game. --- KfChatDotNetBot/Commands/Kasino/PlinkoCommand.cs | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/KfChatDotNetBot/Commands/Kasino/PlinkoCommand.cs b/KfChatDotNetBot/Commands/Kasino/PlinkoCommand.cs index 71b7e3b..5e6da0b 100644 --- a/KfChatDotNetBot/Commands/Kasino/PlinkoCommand.cs +++ b/KfChatDotNetBot/Commands/Kasino/PlinkoCommand.cs @@ -35,11 +35,11 @@ public class PlinkoCommand : ICommand private static readonly Dictionary PlinkoPayoutBoard = new() { {0, 25}, - {1, 2_5}, - {2, 0_25}, - {3, 0_1}, - {4, 0_25}, - {5, 2_5}, + {1, (decimal)2.5}, + {2, (decimal)0.25}, + {3, (decimal)0.1}, + {4, (decimal)0.25}, + {5, (decimal)2.5}, {6, 25}, }; @@ -112,6 +112,7 @@ public class PlinkoCommand : ICommand throw new Exception("game broke while waiting for chat message id"); } breakCounter = 0; + var logger = LogManager.GetCurrentClassLogger(); while (ballsNotInPlay.Count > 0 || ballsInPlay.Count > 0) { breakCounter++; @@ -127,7 +128,7 @@ public class PlinkoCommand : ICommand { currentPayout = wager * PlinkoPayoutBoard[ballsInPlay[0].POSITION.col]; payout += currentPayout; - ballsInPlay.RemoveAt(0); + if (currentPayout == wager * 25) logger.Info($"Plinko: Max win on plinko, ball position: ({ballsInPlay[0].POSITION.row}, {ballsInPlay[0].POSITION.col})"); if (currentPayout > wager) { await botInstance.SendChatMessageAsync( @@ -228,9 +229,11 @@ public class PlinkoCommand : ICommand { case >= 0.5: if (!evenrow && Math.Abs(POSITION.col) > POSITION.row / 2) POSITION.col--; + else if (evenrow) POSITION.col--; break; case < 0.5: if (!evenrow && POSITION.col > POSITION.row / 2) POSITION.col++; + else if (evenrow) POSITION.col++; break; default: throw new Exception("generated an incorrect number");