Fix Battle Bug

This commit is contained in:
Daniel Odendahl Jr
2017-06-11 14:27:14 +00:00
parent fe54dc26c0
commit 30d14f21f5
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -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;
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "xiaobot",
"version": "22.1.7",
"version": "22.1.8",
"description": "A Discord Bot",
"main": "Shard.js",
"scripts": {