Add test for Roar, remove test for Acupressure

This commit is contained in:
Christopher Schmidt 2024-10-04 19:22:27 -04:00
parent 931025d3d2
commit 463f86fb83

View File

@ -96,15 +96,22 @@ describe("Moves - Metronome", () => {
expect(rightOpp.getStatStage(Stat.SPDEF)).toBe(0); expect(rightOpp.getStatStage(Stat.SPDEF)).toBe(0);
}); });
// it("should be able to target itself or its ally with Acupressure", { repeats: 20 }, async () => { it("should cause opponent to flee, and not crash for Roar", async () => {
// game.override.battleType("double"); await game.classicMode.startBattle();
// await game.classicMode.startBattle([ Species.REGIELEKI, Species.RATTATA ]); const player = game.scene.getPlayerPokemon()!;
// vi.spyOn(leftPlayer, "randSeedInt").mockReturnValue(Moves.ACUPRESSURE); vi.spyOn(player, "randSeedInt").mockReturnValue(Moves.ROAR);
// // game.move.select(Moves.METRONOME); const enemyPokemon = game.scene.getEnemyPokemon()!;
// // game.move.select(Moves.SPLASH, 1);
// // await game.phaseInterceptor.to("MoveEffectPhase"); game.move.select(Moves.METRONOME);
// // await game.move.forceHit(); await game.phaseInterceptor.to("MoveEffectPhase");
// // await game.toNextTurn(); await game.move.forceHit();
// }); await game.phaseInterceptor.to("BerryPhase");
const isVisible = enemyPokemon.visible;
const hasFled = enemyPokemon.switchOutStatus;
expect(!isVisible && hasFled).toBe(true);
await game.phaseInterceptor.to("BattleEndPhase");
});
}); });