Adjust fly tests to expect pp reduction properly

This commit is contained in:
Sirz Benjie 2025-08-19 12:14:35 -05:00
parent 5c67d65e09
commit f361b8efed
No known key found for this signature in database
GPG Key ID: 4A524B4D196C759E

View File

@ -85,6 +85,7 @@ describe("Moves - Fly", () => {
const playerPokemon = game.field.getPlayerPokemon(); const playerPokemon = game.field.getPlayerPokemon();
game.move.select(MoveId.FLY); game.move.select(MoveId.FLY);
await game.setTurnOrder([BattlerIndex.ENEMY, BattlerIndex.PLAYER]);
await game.phaseInterceptor.to("TurnEndPhase"); await game.phaseInterceptor.to("TurnEndPhase");
expect(playerPokemon.getTag(BattlerTagType.FLYING)).toBeUndefined(); expect(playerPokemon.getTag(BattlerTagType.FLYING)).toBeUndefined();
@ -94,7 +95,7 @@ describe("Moves - Fly", () => {
expect(playerFly?.ppUsed).toBe(0); expect(playerFly?.ppUsed).toBe(0);
}); });
it("should be cancelled when another Pokemon uses Gravity", async () => { it("should be interrupted when another Pokemon uses Gravity", async () => {
game.override.enemyMoveset([MoveId.SPLASH, MoveId.GRAVITY]); game.override.enemyMoveset([MoveId.SPLASH, MoveId.GRAVITY]);
await game.classicMode.startBattle([SpeciesId.MAGIKARP]); await game.classicMode.startBattle([SpeciesId.MAGIKARP]);
@ -115,6 +116,6 @@ describe("Moves - Fly", () => {
expect(enemyPokemon.hp).toBe(enemyPokemon.getMaxHp()); expect(enemyPokemon.hp).toBe(enemyPokemon.getMaxHp());
const playerFly = playerPokemon.getMoveset().find(mv => mv && mv.moveId === MoveId.FLY); const playerFly = playerPokemon.getMoveset().find(mv => mv && mv.moveId === MoveId.FLY);
expect(playerFly?.ppUsed).toBe(0); expect(playerFly?.ppUsed).toBe(1);
}); });
}); });