pokerogue/src/phases/field-phase.ts
Sirz Benjie 408b66f913
[Misc][Refactor][GitHub] Ditch eslint for biome, and add a formatter (#5495)
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
2025-03-09 14:13:25 -07:00

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);
}
}
}