Rework battle commands

This commit is contained in:
Daniel Odendahl Jr
2018-10-09 21:19:09 +00:00
parent 01e5331dc4
commit 3b14bbcaf0
3 changed files with 14 additions and 14 deletions
+5 -5
View File
@@ -1,7 +1,7 @@
const { stripIndents } = require('common-tags');
const { list } = require('../../util/Util');
const choices = ['fight', 'guard', 'special', 'run'];
const botChoices = ['fight', 'guard', 'special'];
const choices = ['attack', 'defend', 'special', 'run'];
const botChoices = ['attack', 'defend', 'special'];
module.exports = class Battler {
constructor(battle, user) {
@@ -9,7 +9,7 @@ module.exports = class Battler {
this.user = user;
this.bot = user.bot;
this.hp = 500;
this.guarding = false;
this.guard = false;
}
async chooseAction(msg) {
@@ -34,8 +34,8 @@ module.exports = class Battler {
}
changeGuard() {
this.guarding = !this.guarding;
return this.guarding;
this.guard = !this.guard;
return this.guard;
}
forfeit() {