Fixed up tetss

This commit is contained in:
Bertie690 2025-06-20 23:28:42 -04:00
parent 3d7d7c115b
commit 927aafce31
2 changed files with 9 additions and 10 deletions

View File

@ -78,7 +78,7 @@ describe("Abilities - Imposter", () => {
game.override.ability(AbilityId.BALL_FETCH); game.override.ability(AbilityId.BALL_FETCH);
await game.classicMode.startBattle([SpeciesId.MAGIKARP, SpeciesId.DITTO]); await game.classicMode.startBattle([SpeciesId.MAGIKARP, SpeciesId.DITTO]);
const [karp, ditto] = game.scene.getPlayerField(); const [karp, ditto] = game.scene.getPlayerParty();
const enemy = game.field.getEnemyPokemon(); const enemy = game.field.getEnemyPokemon();
game.field.mockAbility(ditto, AbilityId.IMPOSTER); game.field.mockAbility(ditto, AbilityId.IMPOSTER);
@ -93,7 +93,7 @@ describe("Abilities - Imposter", () => {
expect(enemy.getStat(Stat.ATK, false)).toBe(avgAtk); expect(enemy.getStat(Stat.ATK, false)).toBe(avgAtk);
expect(enemy.getStat(Stat.SPATK, false)).toBe(avgSpAtk); expect(enemy.getStat(Stat.SPATK, false)).toBe(avgSpAtk);
// Turn 2: Switch in ditto, should copy enemy ability // Turn 2: Switch in ditto, should copy enemy stats
game.doSwitchPokemon(1); game.doSwitchPokemon(1);
await game.move.forceEnemyMove(MoveId.SPLASH); await game.move.forceEnemyMove(MoveId.SPLASH);
await game.toNextTurn(); await game.toNextTurn();

View File

@ -7,6 +7,7 @@ import GameManager from "#test/testUtils/gameManager";
import Phaser from "phaser"; import Phaser from "phaser";
import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest";
// TODO: Condense with lightning rod tests sometime
describe("Abilities - Storm Drain", () => { describe("Abilities - Storm Drain", () => {
let phaserGame: Phaser.Game; let phaserGame: Phaser.Game;
let game: GameManager; let game: GameManager;
@ -39,7 +40,7 @@ describe("Abilities - Storm Drain", () => {
const enemy1 = game.scene.getEnemyField()[0]; const enemy1 = game.scene.getEnemyField()[0];
const enemy2 = game.scene.getEnemyField()[1]; const enemy2 = game.scene.getEnemyField()[1];
enemy2.summonData.ability = AbilityId.STORM_DRAIN; game.field.mockAbility(enemy2, AbilityId.STORM_DRAIN);
game.move.select(MoveId.WATER_GUN, BattlerIndex.PLAYER, BattlerIndex.ENEMY); game.move.select(MoveId.WATER_GUN, BattlerIndex.PLAYER, BattlerIndex.ENEMY);
game.move.select(MoveId.SPLASH, BattlerIndex.PLAYER_2); game.move.select(MoveId.SPLASH, BattlerIndex.PLAYER_2);
@ -55,7 +56,7 @@ describe("Abilities - Storm Drain", () => {
const enemy1 = game.scene.getEnemyField()[0]; const enemy1 = game.scene.getEnemyField()[0];
const enemy2 = game.scene.getEnemyField()[1]; const enemy2 = game.scene.getEnemyField()[1];
enemy2.summonData.ability = AbilityId.STORM_DRAIN; game.field.mockAbility(enemy2, AbilityId.STORM_DRAIN);
game.move.select(MoveId.AERIAL_ACE, BattlerIndex.PLAYER, BattlerIndex.ENEMY); game.move.select(MoveId.AERIAL_ACE, BattlerIndex.PLAYER, BattlerIndex.ENEMY);
game.move.select(MoveId.SPLASH, BattlerIndex.PLAYER_2); game.move.select(MoveId.SPLASH, BattlerIndex.PLAYER_2);
@ -68,8 +69,7 @@ describe("Abilities - Storm Drain", () => {
await game.classicMode.startBattle([SpeciesId.FEEBAS, SpeciesId.MAGIKARP]); await game.classicMode.startBattle([SpeciesId.FEEBAS, SpeciesId.MAGIKARP]);
const enemy2 = game.scene.getEnemyField()[1]; const enemy2 = game.scene.getEnemyField()[1];
game.field.mockAbility(enemy2, AbilityId.STORM_DRAIN);
enemy2.summonData.ability = AbilityId.STORM_DRAIN;
game.move.select(MoveId.WATER_GUN, BattlerIndex.PLAYER, BattlerIndex.ENEMY); game.move.select(MoveId.WATER_GUN, BattlerIndex.PLAYER, BattlerIndex.ENEMY);
game.move.select(MoveId.SPLASH, BattlerIndex.PLAYER_2); game.move.select(MoveId.SPLASH, BattlerIndex.PLAYER_2);
@ -85,8 +85,7 @@ describe("Abilities - Storm Drain", () => {
const enemy1 = game.scene.getEnemyField()[0]; const enemy1 = game.scene.getEnemyField()[0];
const enemy2 = game.scene.getEnemyField()[1]; const enemy2 = game.scene.getEnemyField()[1];
game.field.mockAbility(enemy2, AbilityId.STORM_DRAIN);
enemy2.summonData.ability = AbilityId.STORM_DRAIN;
game.move.select(MoveId.WATER_GUN, BattlerIndex.PLAYER, BattlerIndex.ENEMY); game.move.select(MoveId.WATER_GUN, BattlerIndex.PLAYER, BattlerIndex.ENEMY);
game.move.select(MoveId.SPLASH, BattlerIndex.PLAYER_2); game.move.select(MoveId.SPLASH, BattlerIndex.PLAYER_2);
@ -102,9 +101,9 @@ describe("Abilities - Storm Drain", () => {
const enemy1 = game.scene.getEnemyField()[0]; const enemy1 = game.scene.getEnemyField()[0];
const enemy2 = game.scene.getEnemyField()[1]; const enemy2 = game.scene.getEnemyField()[1];
enemy2.summonData.ability = AbilityId.STORM_DRAIN; game.field.mockAbility(enemy2, AbilityId.STORM_DRAIN);
game.move.use(MoveId.HYPER_VOICE, BattlerIndex.PLAYER); game.move.use(MoveId.ROUND, BattlerIndex.PLAYER, BattlerIndex.ENEMY);
await game.phaseInterceptor.to("BerryPhase"); await game.phaseInterceptor.to("BerryPhase");
expect(enemy1.isFullHp()).toBe(true); expect(enemy1.isFullHp()).toBe(true);