Cleaned up getPlayerField

This commit is contained in:
jnotsknab 2025-06-20 19:57:27 -05:00
parent 3681fc5148
commit c4f1ec2a7a

View File

@ -805,10 +805,9 @@ export default class BattleScene extends SceneBase {
*/
public getPlayerField(active = false): PlayerPokemon[] {
const party = this.getPlayerParty();
if (active) {
return party.slice(0, Math.min(party.length, this.currentBattle?.double ? 2 : 1)).filter(p => p.isActive());
}
return party.slice(0, Math.min(party.length, this.currentBattle?.double ? 2 : 1));
return party
.slice(0, Math.min(party.length, this.currentBattle?.double ? 2 : 1))
.filter(p => !active || p.isActive());
}
public getEnemyParty(): EnemyPokemon[] {