apply game.override.enemyPassiveAbility

This commit is contained in:
Felix Staud 2024-07-25 16:29:31 -07:00
parent e0e37314ce
commit dfdba05439
5 changed files with 10 additions and 6 deletions

View File

@ -2,13 +2,17 @@ import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vite
import Phaser from "phaser";
import GameManager from "#app/test/utils/gameManager";
import Overrides from "#app/overrides";
import { CommandPhase, DamagePhase, EncounterPhase, EnemyCommandPhase, SelectStarterPhase, TurnInitPhase } from "#app/phases";
import { Mode } from "#app/ui/ui";
import { BattleStat } from "#app/data/battle-stat";
import { generateStarter, getMovePosition } from "#app/test/utils/gameManagerUtils";
import { Command } from "#app/ui/command-ui-handler";
import { Status, StatusEffect } from "#app/data/status-effect";
import { GameModes, getGameMode } from "#app/game-mode";
import {
CommandPhase, DamagePhase, EncounterPhase,
EnemyCommandPhase, SelectStarterPhase,
TurnInitPhase,
} from "#app/phases";
import { Abilities } from "#enums/abilities";
import { Moves } from "#enums/moves";
import { Species } from "#enums/species";
@ -32,7 +36,7 @@ describe("Abilities - Intimidate", () => {
game.override.battleType("single");
game.override.enemySpecies(Species.RATTATA);
game.override.enemyAbility(Abilities.INTIMIDATE);
vi.spyOn(Overrides, "OPP_PASSIVE_ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.HYDRATION);
game.override.enemyPassiveAbility(Abilities.HYDRATION);
game.override.ability(Abilities.INTIMIDATE);
game.override.startingWave(3);
game.override.enemyMoveset([Moves.SPLASH, Moves.SPLASH, Moves.SPLASH, Moves.SPLASH]);

View File

@ -35,7 +35,7 @@ describe("Moves - Ceaseless Edge", () => {
game.override.battleType("single");
game.override.enemySpecies(Species.RATTATA);
game.override.enemyAbility(Abilities.RUN_AWAY);
vi.spyOn(Overrides, "OPP_PASSIVE_ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.RUN_AWAY);
game.override.enemyPassiveAbility(Abilities.RUN_AWAY);
game.override.startingLevel(100);
game.override.enemyLevel(100);
game.override.moveset([ Moves.CEASELESS_EDGE, Moves.SPLASH, Moves.ROAR ]);

View File

@ -47,7 +47,7 @@ describe("Moves - Dragon Rage", () => {
game.override.enemySpecies(Species.SNORLAX);
game.override.enemyMoveset(SPLASH_ONLY);
game.override.enemyAbility(Abilities.BALL_FETCH);
vi.spyOn(Overrides, "OPP_PASSIVE_ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.BALL_FETCH);
game.override.enemyPassiveAbility(Abilities.BALL_FETCH);
game.override.enemyLevel(100);
await game.startBattle();

View File

@ -40,7 +40,7 @@ describe("Moves - Fissure", () => {
game.override.enemySpecies(Species.SNORLAX);
game.override.enemyMoveset(SPLASH_ONLY);
vi.spyOn(Overrides, "OPP_PASSIVE_ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.BALL_FETCH);
game.override.enemyPassiveAbility(Abilities.BALL_FETCH);
game.override.enemyLevel(100);
await game.startBattle();

View File

@ -30,7 +30,7 @@ describe("Moves - Spikes", () => {
game.override.battleType("single");
game.override.enemySpecies(Species.RATTATA);
game.override.enemyAbility(Abilities.HYDRATION);
vi.spyOn(Overrides, "OPP_PASSIVE_ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.HYDRATION);
game.override.enemyPassiveAbility(Abilities.HYDRATION);
game.override.ability(Abilities.HYDRATION);
vi.spyOn(Overrides, "PASSIVE_ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.HYDRATION);
game.override.startingWave(3);