mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-08-21 06:49:35 +02:00
added more suggested tests
This commit is contained in:
parent
6a5f823bf8
commit
576650782a
@ -64,4 +64,86 @@ describe("Moves - Fairy Lock", () => {
|
|||||||
expect(enemyField[0].isTrapped()).toEqual(false);
|
expect(enemyField[0].isTrapped()).toEqual(false);
|
||||||
expect(enemyField[1].isTrapped()).toEqual(false);
|
expect(enemyField[1].isTrapped()).toEqual(false);
|
||||||
});
|
});
|
||||||
|
it("Ghost types can escape Fairy Lock", async () => {
|
||||||
|
await game.classicMode.startBattle([ Species.DUSKNOIR, Species.GENGAR, Species.TYRUNT ]);
|
||||||
|
|
||||||
|
game.move.select(Moves.FAIRY_LOCK);
|
||||||
|
game.move.select(Moves.SPLASH, 1);
|
||||||
|
await game.forceEnemyMove(Moves.SPLASH, 1);
|
||||||
|
await game.forceEnemyMove(Moves.SPLASH, 1);
|
||||||
|
await game.phaseInterceptor.to("BerryPhase");
|
||||||
|
|
||||||
|
expect(game.scene.arena.getTagOnSide(ArenaTagType.FAIRY_LOCK, ArenaTagSide.PLAYER)).toBeDefined();
|
||||||
|
expect(game.scene.arena.getTagOnSide(ArenaTagType.FAIRY_LOCK, ArenaTagSide.ENEMY)).toBeDefined();
|
||||||
|
|
||||||
|
await game.toNextTurn();
|
||||||
|
|
||||||
|
expect(game.scene.getPlayerField()[0].isTrapped()).toEqual(false);
|
||||||
|
expect(game.scene.getPlayerField()[1].isTrapped()).toEqual(false);
|
||||||
|
|
||||||
|
game.move.select(Moves.SPLASH);
|
||||||
|
game.doSwitchPokemon(2);
|
||||||
|
await game.forceEnemyMove(Moves.SPLASH, 1);
|
||||||
|
await game.forceEnemyMove(Moves.SPLASH, 1);
|
||||||
|
await game.phaseInterceptor.to("BerryPhase");
|
||||||
|
await game.toNextTurn();
|
||||||
|
|
||||||
|
expect(game.scene.getPlayerField()[1].species.speciesId).not.toBe(Species.GENGAR);
|
||||||
|
});
|
||||||
|
it("Phasing moves will still switch out", async () => {
|
||||||
|
game.override.enemyMoveset([ Moves.SPLASH, Moves.WHIRLWIND ]);
|
||||||
|
await game.classicMode.startBattle([ Species.KLEFKI, Species.TYRUNT, Species.ZYGARDE ]);
|
||||||
|
|
||||||
|
game.move.select(Moves.FAIRY_LOCK);
|
||||||
|
game.move.select(Moves.SPLASH, 1);
|
||||||
|
await game.forceEnemyMove(Moves.SPLASH, 1);
|
||||||
|
await game.forceEnemyMove(Moves.SPLASH, 1);
|
||||||
|
await game.phaseInterceptor.to("BerryPhase");
|
||||||
|
|
||||||
|
expect(game.scene.arena.getTagOnSide(ArenaTagType.FAIRY_LOCK, ArenaTagSide.PLAYER)).toBeDefined();
|
||||||
|
expect(game.scene.arena.getTagOnSide(ArenaTagType.FAIRY_LOCK, ArenaTagSide.ENEMY)).toBeDefined();
|
||||||
|
|
||||||
|
await game.toNextTurn();
|
||||||
|
game.move.select(Moves.SPLASH);
|
||||||
|
game.move.select(Moves.SPLASH);
|
||||||
|
await game.forceEnemyMove(Moves.WHIRLWIND, 0);
|
||||||
|
game.doSelectPartyPokemon(2);
|
||||||
|
await game.forceEnemyMove(Moves.WHIRLWIND, 1);
|
||||||
|
game.doSelectPartyPokemon(2);
|
||||||
|
await game.phaseInterceptor.to("BerryPhase");
|
||||||
|
await game.toNextTurn();
|
||||||
|
|
||||||
|
expect(game.scene.getPlayerField()[0].species.speciesId).not.toBe(Species.KLEFKI);
|
||||||
|
expect(game.scene.getPlayerField()[1].species.speciesId).not.toBe(Species.TYRUNT);
|
||||||
|
});
|
||||||
|
it("If a Pokemon faints and is replaced the replacement is also trapped", async () => {
|
||||||
|
game.override.moveset([ Moves.FAIRY_LOCK, Moves.SPLASH, Moves.MEMENTO ]);
|
||||||
|
await game.classicMode.startBattle([ Species.KLEFKI, Species.GUZZLORD, Species.TYRUNT, Species.ZYGARDE ]);
|
||||||
|
|
||||||
|
game.move.select(Moves.FAIRY_LOCK);
|
||||||
|
game.move.select(Moves.MEMENTO, 1);
|
||||||
|
game.doSelectPartyPokemon(2);
|
||||||
|
await game.forceEnemyMove(Moves.SPLASH, 1);
|
||||||
|
await game.forceEnemyMove(Moves.SPLASH, 1);
|
||||||
|
await game.phaseInterceptor.to("BerryPhase");
|
||||||
|
expect(game.scene.arena.getTagOnSide(ArenaTagType.FAIRY_LOCK, ArenaTagSide.PLAYER)).toBeDefined();
|
||||||
|
expect(game.scene.arena.getTagOnSide(ArenaTagType.FAIRY_LOCK, ArenaTagSide.ENEMY)).toBeDefined();
|
||||||
|
|
||||||
|
await game.toNextTurn();
|
||||||
|
game.move.select(Moves.SPLASH);
|
||||||
|
game.move.select(Moves.SPLASH);
|
||||||
|
await game.forceEnemyMove(Moves.SPLASH, 1);
|
||||||
|
await game.forceEnemyMove(Moves.SPLASH, 1);
|
||||||
|
await game.phaseInterceptor.to("BerryPhase");
|
||||||
|
expect(game.scene.getPlayerField()[0].isTrapped()).toEqual(true);
|
||||||
|
expect(game.scene.getPlayerField()[1].isTrapped()).toEqual(true);
|
||||||
|
expect(game.scene.getEnemyField()[0].isTrapped()).toEqual(true);
|
||||||
|
expect(game.scene.getEnemyField()[1].isTrapped()).toEqual(true);
|
||||||
|
|
||||||
|
await game.toNextTurn();
|
||||||
|
expect(game.scene.getPlayerField()[0].isTrapped()).toEqual(false);
|
||||||
|
expect(game.scene.getPlayerField()[1].isTrapped()).toEqual(false);
|
||||||
|
expect(game.scene.getEnemyField()[0].isTrapped()).toEqual(false);
|
||||||
|
expect(game.scene.getEnemyField()[1].isTrapped()).toEqual(false);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user