From da6d814e3d656947affb09ff79fd072c39570d6b Mon Sep 17 00:00:00 2001 From: Dragon Fire Date: Tue, 19 Jan 2021 18:13:39 -0500 Subject: [PATCH] Fix --- commands/games-mp/jenga.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/commands/games-mp/jenga.js b/commands/games-mp/jenga.js index 9be794f5..746ff100 100644 --- a/commands/games-mp/jenga.js +++ b/commands/games-mp/jenga.js @@ -88,9 +88,8 @@ module.exports = class JengaCommand extends Command { } i = picked - 1; } - const numToUse = Math.ceil(((board.length + 1) - ((board.length + 1) - (i + 1))) / 2); - const notFell = Math.floor(Math.random() * numToUse); - if (!notFell) { + const fell = Math.floor(Math.random() * (10 - i)); + if (!fell) { winner = userTurn ? opponent : msg.author; await msg.say('And the tower topples!'); break;