mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-04 15:32:18 +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[] {
|
public getPlayerField(active = false): PlayerPokemon[] {
|
||||||
const party = this.getPlayerParty();
|
const party = this.getPlayerParty();
|
||||||
if (active) {
|
return party
|
||||||
return party.slice(0, Math.min(party.length, this.currentBattle?.double ? 2 : 1)).filter(p => p.isActive());
|
.slice(0, Math.min(party.length, this.currentBattle?.double ? 2 : 1))
|
||||||
}
|
.filter(p => !active || p.isActive());
|
||||||
return party.slice(0, Math.min(party.length, this.currentBattle?.double ? 2 : 1));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public getEnemyParty(): EnemyPokemon[] {
|
public getEnemyParty(): EnemyPokemon[] {
|
||||||
|
Loading…
Reference in New Issue
Block a user