Fix Pokemon name when trapped (#793)

This commit is contained in:
QuiteQuiet
2016-11-05 01:53:06 +01:00
committed by Guangcong Luo
parent 834327825b
commit 84e69bf1e8

View File

@@ -163,7 +163,8 @@
switch (args[0]) {
case 'trapped':
requestData.trapped = true;
this.battle.activityQueue.push('|message|' + pokemon.getName() + ' is trapped and cannot switch!');
var pokeName = pokemon.side.n === 0 ? Tools.escapeHTML(pokemon.name) : "The opposing " + (this.battle.ignoreOpponent || this.battle.ignoreNicks ? pokemon.species : Tools.escapeHTML(pokemon.name));
this.battle.activityQueue.push('|message|' + pokeName + ' is trapped and cannot switch!');
break;
case 'cant':
for (var i = 0; i < requestData.moves.length; i++) {