From 19fe03dbfc31e2d513ff4d48f486248afb7a20f4 Mon Sep 17 00:00:00 2001 From: Dragon Fire Date: Mon, 6 May 2024 14:24:11 -0400 Subject: [PATCH] Make tributes use the weapon they have 1/2 the time --- commands/games-sp/hunger-games.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/commands/games-sp/hunger-games.js b/commands/games-sp/hunger-games.js index 3b9eba14..0d6ec5ef 100644 --- a/commands/games-sp/hunger-games.js +++ b/commands/games-sp/hunger-games.js @@ -122,6 +122,10 @@ module.exports = class HungerGamesCommand extends Command { const type = types[Math.floor(Math.random() * types.length)]; const valid = eventsArr.filter(event => { if (event.type !== type) return false; + if (event.type === 'kill' && tribute.weapon && !event.requires) { + const useWeapon = Math.floor(Math.random() * 2); + if (useWeapon) return false; + } if (event.requires && event.requires !== 'food' && event.requires !== tribute.weapon) return false; if (event.requires && event.requires === 'food' && tribute.food <= 0) return false; if (event.requires && event.requires === '!food' && tribute.food !== 0) return false;