Fix cantNoMove in text parser

Fixes #1183
This commit is contained in:
Guangcong Luo
2018-11-29 19:45:28 -05:00
parent 7d649b8f12
commit 6840eac68f

View File

@@ -327,7 +327,8 @@ class BattleTextParser {
[pokemon, kwArgs.of] = [kwArgs.of, pokemon];
break;
}
const template = this.template(move ? 'cant' : 'cantNoMove', effect);
const template = this.template('cant', effect, 'NODEFAULT') ||
this.template(move ? 'cant' : 'cantNoMove');
const line1 = this.maybeAbility(effect, kwArgs.of || pokemon);
return line1 + template.replace('[POKEMON]', this.pokemon(pokemon)).replace('[MOVE]', move);
}