mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-06-21 00:52:47 +02:00
25 lines
631 B
TypeScript
25 lines
631 B
TypeScript
import { Phase } from "#app/phase";
|
|
import type { BattlerIndex } from "#enums/battler-index";
|
|
import { globalScene } from "#app/global-scene";
|
|
|
|
export class CheckStatusEffectPhase extends Phase {
|
|
public readonly phaseName = "CheckStatusEffectPhase";
|
|
private order: BattlerIndex[];
|
|
constructor(order: BattlerIndex[]) {
|
|
super();
|
|
this.order = order;
|
|
}
|
|
|
|
start() {
|
|
super.start();
|
|
|
|
const field = globalScene.getField();
|
|
for (const o of this.order) {
|
|
if (field[o].status?.isPostTurn()) {
|
|
globalScene.phaseManager.unshiftNew("PostTurnStatusEffectPhase", o);
|
|
}
|
|
}
|
|
super.end();
|
|
}
|
|
}
|