apply game.override.enemyPassiveAbility
This commit is contained in:
parent
e0e37314ce
commit
dfdba05439
|
@ -2,13 +2,17 @@ import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vite
|
||||||
import Phaser from "phaser";
|
import Phaser from "phaser";
|
||||||
import GameManager from "#app/test/utils/gameManager";
|
import GameManager from "#app/test/utils/gameManager";
|
||||||
import Overrides from "#app/overrides";
|
import Overrides from "#app/overrides";
|
||||||
import { CommandPhase, DamagePhase, EncounterPhase, EnemyCommandPhase, SelectStarterPhase, TurnInitPhase } from "#app/phases";
|
|
||||||
import { Mode } from "#app/ui/ui";
|
import { Mode } from "#app/ui/ui";
|
||||||
import { BattleStat } from "#app/data/battle-stat";
|
import { BattleStat } from "#app/data/battle-stat";
|
||||||
import { generateStarter, getMovePosition } from "#app/test/utils/gameManagerUtils";
|
import { generateStarter, getMovePosition } from "#app/test/utils/gameManagerUtils";
|
||||||
import { Command } from "#app/ui/command-ui-handler";
|
import { Command } from "#app/ui/command-ui-handler";
|
||||||
import { Status, StatusEffect } from "#app/data/status-effect";
|
import { Status, StatusEffect } from "#app/data/status-effect";
|
||||||
import { GameModes, getGameMode } from "#app/game-mode";
|
import { GameModes, getGameMode } from "#app/game-mode";
|
||||||
|
import {
|
||||||
|
CommandPhase, DamagePhase, EncounterPhase,
|
||||||
|
EnemyCommandPhase, SelectStarterPhase,
|
||||||
|
TurnInitPhase,
|
||||||
|
} from "#app/phases";
|
||||||
import { Abilities } from "#enums/abilities";
|
import { Abilities } from "#enums/abilities";
|
||||||
import { Moves } from "#enums/moves";
|
import { Moves } from "#enums/moves";
|
||||||
import { Species } from "#enums/species";
|
import { Species } from "#enums/species";
|
||||||
|
@ -32,7 +36,7 @@ describe("Abilities - Intimidate", () => {
|
||||||
game.override.battleType("single");
|
game.override.battleType("single");
|
||||||
game.override.enemySpecies(Species.RATTATA);
|
game.override.enemySpecies(Species.RATTATA);
|
||||||
game.override.enemyAbility(Abilities.INTIMIDATE);
|
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.ability(Abilities.INTIMIDATE);
|
||||||
game.override.startingWave(3);
|
game.override.startingWave(3);
|
||||||
game.override.enemyMoveset([Moves.SPLASH, Moves.SPLASH, Moves.SPLASH, Moves.SPLASH]);
|
game.override.enemyMoveset([Moves.SPLASH, Moves.SPLASH, Moves.SPLASH, Moves.SPLASH]);
|
||||||
|
|
|
@ -35,7 +35,7 @@ describe("Moves - Ceaseless Edge", () => {
|
||||||
game.override.battleType("single");
|
game.override.battleType("single");
|
||||||
game.override.enemySpecies(Species.RATTATA);
|
game.override.enemySpecies(Species.RATTATA);
|
||||||
game.override.enemyAbility(Abilities.RUN_AWAY);
|
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.startingLevel(100);
|
||||||
game.override.enemyLevel(100);
|
game.override.enemyLevel(100);
|
||||||
game.override.moveset([ Moves.CEASELESS_EDGE, Moves.SPLASH, Moves.ROAR ]);
|
game.override.moveset([ Moves.CEASELESS_EDGE, Moves.SPLASH, Moves.ROAR ]);
|
||||||
|
|
|
@ -47,7 +47,7 @@ describe("Moves - Dragon Rage", () => {
|
||||||
game.override.enemySpecies(Species.SNORLAX);
|
game.override.enemySpecies(Species.SNORLAX);
|
||||||
game.override.enemyMoveset(SPLASH_ONLY);
|
game.override.enemyMoveset(SPLASH_ONLY);
|
||||||
game.override.enemyAbility(Abilities.BALL_FETCH);
|
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);
|
game.override.enemyLevel(100);
|
||||||
|
|
||||||
await game.startBattle();
|
await game.startBattle();
|
||||||
|
|
|
@ -40,7 +40,7 @@ describe("Moves - Fissure", () => {
|
||||||
|
|
||||||
game.override.enemySpecies(Species.SNORLAX);
|
game.override.enemySpecies(Species.SNORLAX);
|
||||||
game.override.enemyMoveset(SPLASH_ONLY);
|
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);
|
game.override.enemyLevel(100);
|
||||||
|
|
||||||
await game.startBattle();
|
await game.startBattle();
|
||||||
|
|
|
@ -30,7 +30,7 @@ describe("Moves - Spikes", () => {
|
||||||
game.override.battleType("single");
|
game.override.battleType("single");
|
||||||
game.override.enemySpecies(Species.RATTATA);
|
game.override.enemySpecies(Species.RATTATA);
|
||||||
game.override.enemyAbility(Abilities.HYDRATION);
|
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);
|
game.override.ability(Abilities.HYDRATION);
|
||||||
vi.spyOn(Overrides, "PASSIVE_ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.HYDRATION);
|
vi.spyOn(Overrides, "PASSIVE_ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.HYDRATION);
|
||||||
game.override.startingWave(3);
|
game.override.startingWave(3);
|
||||||
|
|
Loading…
Reference in New Issue