Switch phase does not assume that .leaveField() has been called anymore

This commit is contained in:
Wlowscha 2025-02-20 09:06:01 +01:00
parent 24159dce08
commit b057fcd715
No known key found for this signature in database
GPG Key ID: 3C8F1AD330565D04

View File

@ -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;