pokerogue/src/phases/check-interlude-phase.ts
NightKev 10b9cfcdb0
[Balance] End of turn triggers won't occur when you end a biome (#6169)
* [Balance] End of turn triggers won't occur when you end a biome

* Add tests

* Move phase manipulation logic into `PhaseManager`

* Rename "biome end" to "interlude"

* Rename `TurnEndPhase#endOfBiome` to `upcomingInterlude`

---------

Co-authored-by: Wlowscha <54003515+Wlowscha@users.noreply.github.com>
2025-07-29 22:50:57 +00:00

19 lines
499 B
TypeScript

import { globalScene } from "#app/global-scene";
import { Phase } from "#app/phase";
export class CheckInterludePhase extends Phase {
public override readonly phaseName = "CheckInterludePhase";
public override start(): void {
super.start();
const { phaseManager } = globalScene;
const { waveIndex } = globalScene.currentBattle;
if (waveIndex % 10 === 0 && globalScene.getEnemyParty().every(p => p.isFainted())) {
phaseManager.onInterlude();
}
this.end();
}
}