mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-27 10:42:25 +02:00
Fix issues with ending DamageAnimPhase during tests
This commit is contained in:
parent
c66be1997e
commit
6154306f80
@ -2471,6 +2471,10 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
||||
this.switchOutStatus = status;
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates the Pokemon's battle info UI. This is purely a visual update.
|
||||
* @param instant Whether or not the update should be instant.
|
||||
*/
|
||||
updateInfo(instant?: boolean): Promise<void> {
|
||||
return this.battleInfo.updateInfo(this, instant);
|
||||
}
|
||||
|
@ -33,15 +33,15 @@ export async function runMysteryEncounterToEnd(game: GameManager, optionNo: numb
|
||||
}, () => game.isCurrentPhase(MysteryEncounterBattlePhase) || game.isCurrentPhase(MysteryEncounterRewardsPhase));
|
||||
|
||||
if (isBattle) {
|
||||
game.onNextPrompt("DamageAnimPhase", Mode.MESSAGE, () => {
|
||||
game.setMode(Mode.MESSAGE);
|
||||
game.endPhase();
|
||||
}, () => game.isCurrentPhase(CommandPhase));
|
||||
|
||||
game.onNextPrompt("CheckSwitchPhase", Mode.CONFIRM, () => {
|
||||
game.setMode(Mode.MESSAGE);
|
||||
game.endPhase();
|
||||
}, () => game.isCurrentPhase(CommandPhase));
|
||||
game.onNextPrompt(
|
||||
"CheckSwitchPhase",
|
||||
Mode.CONFIRM,
|
||||
() => {
|
||||
game.setMode(Mode.MESSAGE);
|
||||
game.endPhase();
|
||||
},
|
||||
() => game.isCurrentPhase(CommandPhase),
|
||||
);
|
||||
|
||||
game.onNextPrompt("CheckSwitchPhase", Mode.MESSAGE, () => {
|
||||
game.setMode(Mode.MESSAGE);
|
||||
|
@ -186,6 +186,8 @@ export class GameWrapper {
|
||||
this.scene.time = new MockClock(this.scene);
|
||||
this.scene.remove = vi.fn(); // TODO: this should be stubbed differently
|
||||
this.scene.eventManager = new MockTimedEventManager(); // Disable Timed Events
|
||||
|
||||
Pokemon.prototype.updateInfo = async () => {};
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user