From db7a17806fc86e1b41691e10d5af61a2ebcad571 Mon Sep 17 00:00:00 2001 From: Guangcong Luo Date: Fri, 25 Apr 2014 01:39:46 -0500 Subject: [PATCH] Fix asking for moves for fainted pokemon The bug was introduced as a typo in 24c07d32 --- js/client-battle.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/client-battle.js b/js/client-battle.js index 13bd07a5c..37c23cce4 100644 --- a/js/client-battle.js +++ b/js/client-battle.js @@ -252,7 +252,7 @@ choices: [], switchFlags: {} } - if (this.choice.choices.length > 1) while (switchables[this.choice.choices.length] && switchables[this.choice.choices.length].fainted) { + if (this.battle.mySide.active.length > 1) while (switchables[this.choice.choices.length] && switchables[this.choice.choices.length].fainted) { this.choice.choices.push('pass'); } }