Add case where move becomes the redirect type to tests

This commit is contained in:
Dean 2025-03-02 00:30:59 -08:00
parent ceb2684e93
commit a421a3a08d
2 changed files with 36 additions and 0 deletions

View File

@ -94,4 +94,22 @@ describe("Abilities - Lightningrod", () => {
expect(enemy1.isFullHp()).toBe(false);
});
it("should redirect moves changed to electric type via ability", async () => {
game.override.ability(Abilities.GALVANIZE)
.moveset(Moves.TACKLE);
await game.classicMode.startBattle([ Species.FEEBAS, Species.MAGIKARP ]);
const enemy1 = game.scene.getEnemyField()[0];
const enemy2 = game.scene.getEnemyField()[1];
enemy2.summonData.ability = Abilities.LIGHTNING_ROD;
game.move.select(Moves.TACKLE, BattlerIndex.PLAYER, BattlerIndex.ENEMY);
game.move.select(Moves.SPLASH, BattlerIndex.PLAYER_2);
await game.phaseInterceptor.to("BerryPhase");
expect(enemy1.isFullHp()).toBe(true);
expect(enemy2.getStatStage(Stat.SPATK)).toBe(1);
});
});

View File

@ -94,4 +94,22 @@ describe("Abilities - Storm Drain", () => {
expect(enemy1.isFullHp()).toBe(false);
});
it("should redirect moves changed to water type via ability", async () => {
game.override.ability(Abilities.LIQUID_VOICE)
.moveset(Moves.PSYCHIC_NOISE);
await game.classicMode.startBattle([ Species.FEEBAS, Species.MAGIKARP ]);
const enemy1 = game.scene.getEnemyField()[0];
const enemy2 = game.scene.getEnemyField()[1];
enemy2.summonData.ability = Abilities.STORM_DRAIN;
game.move.select(Moves.PSYCHIC_NOISE, BattlerIndex.PLAYER, BattlerIndex.ENEMY);
game.move.select(Moves.SPLASH, BattlerIndex.PLAYER_2);
await game.phaseInterceptor.to("BerryPhase");
expect(enemy1.isFullHp()).toBe(true);
expect(enemy2.getStatStage(Stat.SPATK)).toBe(1);
});
});