mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-25 09:42:20 +02:00
Switch phase does not assume that .leaveField() has been called anymore
This commit is contained in:
parent
24159dce08
commit
b057fcd715
@ -53,11 +53,6 @@ export class SwitchPhase extends BattlePhase {
|
||||
return super.end();
|
||||
}
|
||||
|
||||
// Check if there is any space still in field
|
||||
if (this.isModal && globalScene.getPlayerField().filter(p => p.isAllowedInBattle() && p.isActive(true)).length >= globalScene.currentBattle.getBattlerCount()) {
|
||||
return super.end();
|
||||
}
|
||||
|
||||
// Override field index to 0 in case of double battle where 2/3 remaining legal party members fainted at once
|
||||
const fieldIndex = globalScene.currentBattle.getBattlerCount() === 1 || globalScene.getPokemonAllowedInBattle().length > 1 ? this.fieldIndex : 0;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user