This commit is contained in:
Dragon Fire
2024-05-05 11:20:19 -04:00
parent 08cb9c3e36
commit a14aeca9ae
+3 -2
View File
@@ -112,8 +112,9 @@ module.exports = class HungerGamesCommand extends Command {
const results = []; const results = [];
const deaths = []; const deaths = [];
const remaining = tributes.filter(tribute => !tribute.dead); const remaining = tributes.filter(tribute => !tribute.dead);
const turn = new Set(shuffle([...remaining.keys()])); const remainingArr = shuffle([...remaining.keys()]);
for (const tribute of remaining.values()) { const turn = new Set(...remainingArr);
for (const tribute of remainingArr) {
if (!turn.has(tribute.name)) continue; if (!turn.has(tribute.name)) continue;
const types = this.decideTypes(tribute); const types = this.decideTypes(tribute);
const type = types[Math.floor(Math.random() * types.length)]; const type = types[Math.floor(Math.random() * types.length)];