pokerogue/src/phases/new-battle-phase.ts
NightKev 8cf1b9f766
[Dev] Enable Biome import sorting (#6052)
* [Dev] Enable Biome import sorting

Additional changes:

- Implement import aliases

- Convert default exports to named exports

- Remove relative imports

* Apply changes

* Misc fixes

* Merge cleanup
2025-07-13 00:21:25 -07:00

21 lines
660 B
TypeScript

import { globalScene } from "#app/global-scene";
import { BattlePhase } from "#phases/battle-phase";
export class NewBattlePhase extends BattlePhase {
public readonly phaseName = "NewBattlePhase";
start() {
super.start();
// cull any extra `NewBattle` phases from the queue.
globalScene.phaseManager.phaseQueue = globalScene.phaseManager.phaseQueue.filter(
phase => !phase.is("NewBattlePhase"),
);
// `phaseQueuePrepend` is private, so we have to use this inefficient loop.
while (globalScene.phaseManager.tryRemoveUnshiftedPhase(phase => phase.is("NewBattlePhase"))) {}
globalScene.newBattle();
this.end();
}
}