Fix more tests

This commit is contained in:
Xavion3 2025-02-05 04:17:21 +11:00
parent e11247f5b0
commit d620a85592
2 changed files with 11 additions and 6 deletions

View File

@ -117,11 +117,12 @@ describe("Moves - Freeze-Dry", () => {
});
it("should deal 2x damage to steel type terastallized into water", async () => {
game.override.enemySpecies(Species.SKARMORY)
.enemyHeldItems([{ name: "TERA_SHARD", type: Type.WATER }]);
game.override.enemySpecies(Species.SKARMORY);
await game.classicMode.startBattle();
const enemy = game.scene.getEnemyPokemon()!;
enemy.teraType = Type.WATER;
enemy.isTerastallized = true;
vi.spyOn(enemy, "getMoveEffectiveness");
game.move.select(Moves.FREEZE_DRY);
@ -132,11 +133,12 @@ describe("Moves - Freeze-Dry", () => {
});
it("should deal 0.5x damage to water type terastallized into fire", async () => {
game.override.enemySpecies(Species.PELIPPER)
.enemyHeldItems([{ name: "TERA_SHARD", type: Type.FIRE }]);
game.override.enemySpecies(Species.PELIPPER);
await game.classicMode.startBattle();
const enemy = game.scene.getEnemyPokemon()!;
enemy.teraType = Type.FIRE;
enemy.isTerastallized = true;
vi.spyOn(enemy, "getMoveEffectiveness");
game.move.select(Moves.FREEZE_DRY);

View File

@ -83,10 +83,12 @@ describe("Moves - Tar Shot", () => {
});
it("does not double the effectiveness of Fire-type moves against a Pokémon that is Terastallized", async () => {
game.override.enemyHeldItems([{ name: "TERA_SHARD", type: Type.GRASS }]).enemySpecies(Species.SPRIGATITO);
game.override.enemySpecies(Species.SPRIGATITO);
await game.classicMode.startBattle([ Species.PIKACHU ]);
const enemy = game.scene.getEnemyPokemon()!;
enemy.teraType = Type.GRASS;
enemy.isTerastallized = true;
vi.spyOn(enemy, "getMoveEffectiveness");
@ -119,7 +121,8 @@ describe("Moves - Tar Shot", () => {
await game.toNextTurn();
game.override.enemyHeldItems([{ name: "TERA_SHARD", type: Type.GRASS }]);
enemy.teraType = Type.GRASS;
enemy.isTerastallized = true;
game.move.select(Moves.FIRE_PUNCH);
await game.setTurnOrder([ BattlerIndex.PLAYER, BattlerIndex.ENEMY ]);