Update Dancer test to account for changed phase behavior

This commit is contained in:
NightKev 2025-02-06 23:01:15 -08:00 committed by Sirz Benjie
parent 4faace9b63
commit 27cf3d9a41
No known key found for this signature in database
GPG Key ID: 4A524B4D196C759E

View File

@ -39,20 +39,24 @@ describe("Abilities - Dancer", () => {
game.move.select(Moves.SPLASH); game.move.select(Moves.SPLASH);
game.move.select(Moves.SWORDS_DANCE, 1); game.move.select(Moves.SWORDS_DANCE, 1);
await game.setTurnOrder([BattlerIndex.PLAYER_2, BattlerIndex.ENEMY, BattlerIndex.PLAYER, BattlerIndex.ENEMY_2]); await game.setTurnOrder([BattlerIndex.PLAYER_2, BattlerIndex.ENEMY, BattlerIndex.PLAYER, BattlerIndex.ENEMY_2]);
await game.phaseInterceptor.to("MovePhase"); await game.phaseInterceptor.to("MovePhase"); // feebas uses swords dance
// immediately copies ally move await game.phaseInterceptor.to("MovePhase", false); // oricorio copies swords dance
await game.phaseInterceptor.to("MovePhase", false);
let currentPhase = game.scene.getCurrentPhase() as MovePhase; let currentPhase = game.scene.getCurrentPhase() as MovePhase;
expect(currentPhase.pokemon).toBe(oricorio); expect(currentPhase.pokemon).toBe(oricorio);
expect(currentPhase.move.moveId).toBe(Moves.SWORDS_DANCE); expect(currentPhase.move.moveId).toBe(Moves.SWORDS_DANCE);
await game.phaseInterceptor.to("MoveEndPhase");
await game.phaseInterceptor.to("MovePhase"); await game.phaseInterceptor.to("MoveEndPhase"); // end oricorio's move
// immediately copies enemy move await game.phaseInterceptor.to("MovePhase"); // magikarp 1 copies swords dance
await game.phaseInterceptor.to("MovePhase", false); await game.phaseInterceptor.to("MovePhase"); // magikarp 2 copies swords dance
await game.phaseInterceptor.to("MovePhase"); // magikarp (left) uses victory dance
await game.phaseInterceptor.to("MovePhase", false); // oricorio copies magikarp's victory dance
currentPhase = game.scene.getCurrentPhase() as MovePhase; currentPhase = game.scene.getCurrentPhase() as MovePhase;
expect(currentPhase.pokemon).toBe(oricorio); expect(currentPhase.pokemon).toBe(oricorio);
expect(currentPhase.move.moveId).toBe(Moves.VICTORY_DANCE); expect(currentPhase.move.moveId).toBe(Moves.VICTORY_DANCE);
await game.phaseInterceptor.to("BerryPhase");
await game.phaseInterceptor.to("BerryPhase"); // finish the turn
// doesn't use PP if copied move is also in moveset // doesn't use PP if copied move is also in moveset
expect(oricorio.moveset[0]?.ppUsed).toBe(0); expect(oricorio.moveset[0]?.ppUsed).toBe(0);