mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-12-19 00:05:28 +01:00
* [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>
19 lines
499 B
TypeScript
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();
|
|
}
|
|
}
|