From 23d342bd1e7c8283e04cea28a9c47591e5c4fe8d Mon Sep 17 00:00:00 2001 From: Dragon Fire Date: Sun, 5 May 2024 11:42:27 -0400 Subject: [PATCH] Update hunger-games.js --- commands/games-sp/hunger-games.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/commands/games-sp/hunger-games.js b/commands/games-sp/hunger-games.js index c3119272..bf69e585 100644 --- a/commands/games-sp/hunger-games.js +++ b/commands/games-sp/hunger-games.js @@ -2,7 +2,7 @@ const Command = require('../../framework/Command'); const { ActionRowBuilder, ButtonBuilder, ButtonStyle } = require('discord.js'); const { Collection } = require('@discordjs/collection'); const { stripIndents } = require('common-tags'); -const { removeDuplicates, shuffle } = require('../../util/Util'); +const { removeDuplicates, removeFromArray, shuffle } = require('../../util/Util'); const events = require('../../assets/json/hunger-games'); module.exports = class HungerGamesCommand extends Command { @@ -118,6 +118,7 @@ module.exports = class HungerGamesCommand extends Command { const tribute = tributes.get(tributeKey); if (!turn.has(tribute.name)) continue; const types = this.decideTypes(tribute); + if (turn.size === 1) removeFromArray(types, 'kill'); const type = types[Math.floor(Math.random() * types.length)]; const valid = eventsArr.filter(event => { if (event.type !== type) return false;