mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-10-24 05:55:56 +02:00
15 lines
429 B
TypeScript
15 lines
429 B
TypeScript
import { globalScene } from "#app/global-scene";
|
|
import type Pokemon from "#app/field/pokemon";
|
|
import { BattlePhase } from "./battle-phase";
|
|
|
|
type PokemonFunc = (pokemon: Pokemon) => void;
|
|
|
|
export abstract class FieldPhase extends BattlePhase {
|
|
executeForAll(func: PokemonFunc): void {
|
|
const field = globalScene.getField(true).filter(p => p.summonData);
|
|
for (const pokemon of field) {
|
|
func(pokemon);
|
|
}
|
|
}
|
|
}
|