mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-03 23:12:20 +02:00
Cleaned up getPlayerField
This commit is contained in:
parent
3681fc5148
commit
c4f1ec2a7a
@ -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[] {
|
||||
|
Loading…
Reference in New Issue
Block a user