From 30d14f21f592fd70ba53b7931b6edc98bd949d44 Mon Sep 17 00:00:00 2001 From: Daniel Odendahl Jr Date: Sun, 11 Jun 2017 14:27:14 +0000 Subject: [PATCH] Fix Battle Bug --- commands/games/battle.js | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/commands/games/battle.js b/commands/games/battle.js index d97de26c..f34cdba8 100644 --- a/commands/games/battle.js +++ b/commands/games/battle.js @@ -51,8 +51,8 @@ module.exports = class BattleCommand extends Command { else userHP -= damage; }; const forfeit = () => { - if (userTurn) userHP -= 500 - userHP; - else oppoHP -= 500 - oppoHP; + if (userTurn) userHP = 0; + else oppoHP = 0; }; while (userHP > 0 && oppoHP > 0) { // eslint-disable-line no-unmodified-loop-condition const username = userTurn ? msg.author.username : opponent.username; diff --git a/package.json b/package.json index e5d702f4..a6573a67 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "xiaobot", - "version": "22.1.7", + "version": "22.1.8", "description": "A Discord Bot", "main": "Shard.js", "scripts": {