mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-08-11 18:09:29 +02:00
Maybe fixed a few bugs
This commit is contained in:
parent
3114c1743f
commit
d10b1b0a13
@ -547,7 +547,7 @@ describe("Abilities - Wimp Out", () => {
|
||||
await game.move.selectEnemyMove(MoveId.SPLASH);
|
||||
await game.move.selectEnemyMove(MoveId.ENDURE);
|
||||
|
||||
await game.toNextWave();
|
||||
await game.phaseInterceptor.to("SelectModifierPhase");
|
||||
expect(game.scene.currentBattle.waveIndex).toBe(wave + 1);
|
||||
});
|
||||
});
|
||||
|
@ -146,6 +146,6 @@ describe("Moves - Metronome", () => {
|
||||
const hasFled = enemyPokemon.switchOutStatus;
|
||||
expect(!isVisible && hasFled).toBe(true);
|
||||
|
||||
await game.toNextWave();
|
||||
await game.toNextTurn();
|
||||
});
|
||||
});
|
||||
|
@ -104,6 +104,7 @@ export class GameManager {
|
||||
(this.scene.ui.handlers[UiMode.STARTER_SELECT] as StarterSelectUiHandler).clearStarterPreferences();
|
||||
|
||||
// Must be run after phase interceptor has been initialized.
|
||||
this.gameWrapper.scene = this.scene;
|
||||
this.scene.phaseManager.toTitleScreen(true);
|
||||
this.scene.phaseManager.shiftPhase();
|
||||
}
|
||||
@ -148,7 +149,7 @@ export class GameManager {
|
||||
|
||||
/**
|
||||
* Ends the current phase immediately.
|
||||
* @see {@linkcode PhaseManager.shiftPhase} Function to skip the next upcoming phase
|
||||
* @see {@linkcode PhaseInterceptor.shiftPhase} Function to skip the next upcoming phase
|
||||
*/
|
||||
endPhase() {
|
||||
this.scene.phaseManager.getCurrentPhase()?.end();
|
||||
|
@ -30,6 +30,7 @@ interface UIPrompt {
|
||||
* Array of phases that hang whiile waiting for player input.
|
||||
* Changing UI modes during these phases will halt the phase interceptor.
|
||||
* @todo This is an extremely unintuitive solution that only works on a select few phases
|
||||
* and does not account for UI handlers not accepting input
|
||||
*/
|
||||
const endBySetMode: ReadonlyArray<PhaseString> = [
|
||||
"CommandPhase",
|
||||
|
@ -57,6 +57,7 @@ export class ReloadHelper extends GameManagerHelper {
|
||||
this.game.scene.modifiers = [];
|
||||
}
|
||||
titlePhase.loadSaveSlot(-1); // Load the desired session data
|
||||
console.log(this.game.scene.phaseManager.getCurrentPhase()?.phaseName);
|
||||
this.game.scene.phaseManager.shiftPhase(); // Loading the save slot also ended TitlePhase, clean it up
|
||||
|
||||
// Run through prompts for switching Pokemon, copied from classicModeHelper.ts
|
||||
|
Loading…
Reference in New Issue
Block a user