12 lines
357 B
TypeScript
Raw Normal View History

import Pokemon from "#app/field/pokemon";
2024-08-19 03:23:52 +01:00
import { BattlePhase } from "./battle-phase";
type PokemonFunc = (pokemon: Pokemon) => void;
export abstract class FieldPhase extends BattlePhase {
executeForAll(func: PokemonFunc): void {
const field = this.scene.getField(true).filter(p => p.summonData);
field.forEach(pokemon => func(pokemon));
}
}