diff --git a/js/client-battle.js b/js/client-battle.js index 7a71fb52e..13cd64573 100644 --- a/js/client-battle.js +++ b/js/client-battle.js @@ -304,7 +304,6 @@ var myActive = this.battle.mySide.active; var yourActive = this.battle.yourSide.active; var yourSlot = yourActive.length-1-pos; - var anyValidTarget = false; for (var i = yourActive.length-1; i >= 0; i--) { var pokemon = yourActive[i]; @@ -315,13 +314,11 @@ if (Math.abs(yourSlot-i) > 1) disabled = true; } - if (!pokemon) { - controls += ' '; - } else if (disabled || pokemon.zerohp) { - controls += ' '; + if (disabled) { + controls += ' '; + } else if (!pokemon || pokemon.zerohp) { + controls += ' '; } else { - anyValidTarget = true; - var posString = ''; controls += ' '; } } @@ -337,19 +334,14 @@ } if (moveTarget !== 'adjacentAllyOrSelf' && pos == i) disabled = true; - if (!pokemon) { - controls += ' '; - } else if (disabled || pokemon.zerohp) { - controls += ' '; + if (disabled) { + controls += ' '; + } else if (!pokemon || pokemon.zerohp) { + controls += ' '; } else { - anyValidTarget = true; controls += ' '; } } - if (!anyValidTarget) { - controls += '
'; controls += ''; this.$controls.html(controls); @@ -455,7 +447,7 @@ var pos = this.choice.choices.length - (type === 'movetarget'?1:0); // TODO? hpbar - controls += 'Which pokemon will it switch in for?'; + controls += 'Which Pokémon will it switch in for?'; controls += ''; + controls += 'Choose a Pokémon to send to battle!'; } else { controls += 'Switch '+Tools.escapeHTML(switchables[pos].name)+' to:'; } @@ -527,7 +518,7 @@ controls += ''; } else { controls += ' What about the rest of your team?'; - controls += '