mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-26 22:32:52 +02:00
Lowest block will always topple
This commit is contained in:
@@ -87,7 +87,7 @@ module.exports = class JengaCommand extends Command {
|
|||||||
}
|
}
|
||||||
i = picked - 1;
|
i = picked - 1;
|
||||||
}
|
}
|
||||||
const fell = Math.floor(Math.random() * ((board.length + 1) - i));
|
const fell = Math.floor(Math.random() * ((board.length + 1) - (i + 1));
|
||||||
if (!fell) {
|
if (!fell) {
|
||||||
winner = userTurn ? opponent : msg.author;
|
winner = userTurn ? opponent : msg.author;
|
||||||
await msg.say(`${opponent.bot && !userTurn ? `I pick ${i + 1}, a` : 'A'}nd the tower topples!`);
|
await msg.say(`${opponent.bot && !userTurn ? `I pick ${i + 1}, a` : 'A'}nd the tower topples!`);
|
||||||
|
|||||||
Reference in New Issue
Block a user