mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-10-23 13:35:53 +02:00
- remove any `.js` extension imports - remove unncessary dynamic imports of `modifier.ts` file. The file was being imported statically & dynamically. Made it pure static - increase vite chunk-size warning limit Co-authored-by: Mumble <171087428+frutescens@users.noreply.github.com>
28 lines
789 B
TypeScript
28 lines
789 B
TypeScript
import BattleScene from "#app/battle-scene";
|
|
import Pokemon from "#app/field/pokemon";
|
|
import { FieldPhase } from "./field-phase";
|
|
|
|
export abstract class PartyMemberPokemonPhase extends FieldPhase {
|
|
protected partyMemberIndex: integer;
|
|
protected fieldIndex: integer;
|
|
protected player: boolean;
|
|
|
|
constructor(scene: BattleScene, partyMemberIndex: integer, player: boolean) {
|
|
super(scene);
|
|
|
|
this.partyMemberIndex = partyMemberIndex;
|
|
this.fieldIndex = partyMemberIndex < this.scene.currentBattle.getBattlerCount()
|
|
? partyMemberIndex
|
|
: -1;
|
|
this.player = player;
|
|
}
|
|
|
|
getParty(): Pokemon[] {
|
|
return this.player ? this.scene.getParty() : this.scene.getEnemyParty();
|
|
}
|
|
|
|
getPokemon(): Pokemon {
|
|
return this.getParty()[this.partyMemberIndex];
|
|
}
|
|
}
|