diff --git a/js/client-battle.js b/js/client-battle.js index 8405e7467..7e86b712a 100644 --- a/js/client-battle.js +++ b/js/client-battle.js @@ -381,7 +381,7 @@ if (this.request.forceSwitch !== true) { var faintedLength = _.filter(this.request.forceSwitch, function (fainted) {return fainted;}).length; - var freedomDegrees = faintedLength - _.filter(switchables.slice(this.battle.mySide.active.length), function (mon) {return !mon.fainted && !mon.notMine;}).length; + var freedomDegrees = faintedLength - _.filter(switchables.slice(this.battle.mySide.active.length), function (mon) {return !mon.fainted;}).length; this.choice.freedomDegrees = Math.max(freedomDegrees, 0); this.choice.canSwitch = faintedLength - this.choice.freedomDegrees; } @@ -402,9 +402,6 @@ done: 0, count: 1 }; - if (this.battle.gameType === 'multi') { - this.choice.count = 1; - } if (this.battle.gameType === 'doubles') { this.choice.count = 2; } @@ -517,8 +514,7 @@ } var moveTarget = this.choice ? this.choice.moveTarget : ''; - var pos = this.choice.choices.length; - if (type === 'movetarget') pos--; + var pos = this.choice.choices.length - (type === 'movetarget' ? 1 : 0); var hpRatio = switchables[pos].hp / switchables[pos].maxhp; @@ -555,10 +551,6 @@ if (type === 'movetarget') { requestTitle += 'At who? '; - if (this.request && this.request.side) { - pos += Math.floor((parseInt(this.side.charAt(1), 10) - 1) / 2); - } - var targetMenus = ['', '']; var myActive = this.battle.mySide.active; var yourActive = this.battle.yourSide.active; @@ -792,9 +784,8 @@ for (var i = 0; i < switchables.length; i++) { var pokemon = switchables[i]; var tooltipArgs = 'switchpokemon|' + i; - if (pokemon.fainted || i < (this.battle.pokemonControlled || this.battle.mySide.active.length) || pokemon.notMine || this.choice.switchFlags[i]) { - var disabledReason = pokemon.notMine ? ',notMine' : pokemon.fainted ? ',fainted' : i < (this.battle.pokemonControlled || this.battle.mySide.active.length) ? ',active' : ''; - switchMenu += '