From a14aeca9aecfcc08d4887856f3aebb6d30a69c2f Mon Sep 17 00:00:00 2001 From: Dragon Fire Date: Sun, 5 May 2024 11:20:19 -0400 Subject: [PATCH] Fix --- commands/games-sp/hunger-games.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/commands/games-sp/hunger-games.js b/commands/games-sp/hunger-games.js index 04790cea..a2c6c1c7 100644 --- a/commands/games-sp/hunger-games.js +++ b/commands/games-sp/hunger-games.js @@ -112,8 +112,9 @@ module.exports = class HungerGamesCommand extends Command { const results = []; const deaths = []; const remaining = tributes.filter(tribute => !tribute.dead); - const turn = new Set(shuffle([...remaining.keys()])); - for (const tribute of remaining.values()) { + const remainingArr = shuffle([...remaining.keys()]); + const turn = new Set(...remainingArr); + for (const tribute of remainingArr) { if (!turn.has(tribute.name)) continue; const types = this.decideTypes(tribute); const type = types[Math.floor(Math.random() * types.length)];