From 3b1dd22300a28358f6b46bf5482f34f949974e8d Mon Sep 17 00:00:00 2001 From: Dragon Fire Date: Sun, 5 May 2024 17:29:41 -0400 Subject: [PATCH] Update hunger-games.js --- commands/games-sp/hunger-games.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/commands/games-sp/hunger-games.js b/commands/games-sp/hunger-games.js index d08b7438..2c2d96db 100644 --- a/commands/games-sp/hunger-games.js +++ b/commands/games-sp/hunger-games.js @@ -172,7 +172,7 @@ module.exports = class HungerGamesCommand extends Command { const tribu = tributes.get(turnArr[Math.floor(Math.random() * turnArr.length)]); if (event.requires === 'food') tribu.food--; if (event.spoils) { - const spoils = event.spoils[i]; + const spoils = event.spoils[i - 1]; if (spoils === 'food') tribu.food++; if (spoils === '-food') tribu.food--; else tribu.weapon = spoils; @@ -184,7 +184,7 @@ module.exports = class HungerGamesCommand extends Command { } if (event.injured.includes(i)) tribu.injured = true; if (event.cures.includes(i)) tribu.injured = false; - tribu.sanity += event.sanity[i]; + tribu.sanity += event.sanity[i - 1]; current.push(tribu); turn.delete(tribu.name); }