|
@@ -1,7 +1,5 @@
|
|
|
-const Move = require('./move')
|
|
|
-
|
|
|
-const discord = require('discord.js')
|
|
|
const _ = require('lodash')
|
|
|
+const Move = require('./move')
|
|
|
const prompt = require('../util/prompt')
|
|
|
|
|
|
// The base class! Each method is called to request a decision from the AI.
|
|
@@ -14,7 +12,7 @@ class AI {
|
|
|
}
|
|
|
|
|
|
// Returns { move: Move, targets: [Character] } to perform next.
|
|
|
- async moveChoice(self, battle) {}
|
|
|
+ async moveChoice() {}
|
|
|
}
|
|
|
|
|
|
// For player-controlled characters. Interfaces with Discord.
|
|
@@ -101,7 +99,7 @@ class DiscordAI extends AI {
|
|
|
title: this.char.getName(this.battle.game.guild),
|
|
|
description: targetPromptDesc,
|
|
|
choices: await Promise.all(
|
|
|
- targetable.map(async (char, i) => ({
|
|
|
+ targetable.map(async char => ({
|
|
|
emote: await char.getEmote(this.battle.game),
|
|
|
name: char.getName(this.battle.game.guild),
|
|
|
char,
|