pokerogue/src/phases/check-status-effect-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

23 lines
623 B
TypeScript

import { PostTurnStatusEffectPhase } from "#app/phases/post-turn-status-effect-phase";
import { Phase } from "#app/phase";
import type { BattlerIndex } from "#app/battle";
import { globalScene } from "#app/global-scene";
export class CheckStatusEffectPhase extends Phase {
private order: BattlerIndex[];
constructor(order: BattlerIndex[]) {
super();
this.order = order;
}
start() {
const field = globalScene.getField();
for (const o of this.order) {
if (field[o].status?.isPostTurn()) {
globalScene.unshiftPhase(new PostTurnStatusEffectPhase(o));
}
}
this.end();
}
}