mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-09-24 07:23:24 +02:00
Adjust fly tests to expect pp reduction properly
This commit is contained in:
parent
5c67d65e09
commit
f361b8efed
@ -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);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user