apply game.override.startingLevel

This commit is contained in:
Felix Staud 2024-07-25 15:29:19 -07:00
parent b16a28d5b8
commit 5924e5c1b4
44 changed files with 53 additions and 54 deletions

View File

@ -72,7 +72,7 @@ describe("Abilities - DISGUISE", () => {
bustedForm = 1;
game.override.enemyMoveset([Moves.DARK_PULSE, Moves.DARK_PULSE, Moves.DARK_PULSE, Moves.DARK_PULSE]);
vi.spyOn(Overrides, "STARTING_LEVEL_OVERRIDE", "get").mockReturnValue(20);
game.override.startingLevel(20);
vi.spyOn(Overrides, "OPP_LEVEL_OVERRIDE", "get").mockReturnValue(20);
game.override.enemySpecies(Species.MAGIKARP);
vi.spyOn(Overrides, "STARTER_FORM_OVERRIDES", "get").mockReturnValue({

View File

@ -203,7 +203,7 @@ describe("Abilities - Ice Face", () => {
it("reverts to Ice Face on arena reset", async () => {
game.override.startingWave(4);
vi.spyOn(Overrides, "STARTING_LEVEL_OVERRIDE", "get").mockReturnValue(4);
game.override.startingLevel(4);
game.override.enemySpecies(Species.MAGIKARP);
vi.spyOn(Overrides, "STARTER_FORM_OVERRIDES", "get").mockReturnValue({
[Species.EISCUE]: noiceForm,

View File

@ -35,7 +35,7 @@ describe("Abilities - Protean", () => {
game = new GameManager(phaserGame);
game.override.battleType("single");
vi.spyOn(Overrides, "ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.LIBERO);
vi.spyOn(Overrides, "STARTING_LEVEL_OVERRIDE", "get").mockReturnValue(100);
game.override.startingLevel(100);
game.override.enemySpecies(Species.RATTATA);
game.override.enemyMoveset([Moves.ENDURE, Moves.ENDURE, Moves.ENDURE, Moves.ENDURE]);
});

View File

@ -38,7 +38,7 @@ describe("Abilities - Moxie", () => {
game.override.enemySpecies(Species.RATTATA);
game.override.enemyAbility(Abilities.MOXIE);
vi.spyOn(Overrides, "ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.MOXIE);
vi.spyOn(Overrides, "STARTING_LEVEL_OVERRIDE", "get").mockReturnValue(2000);
game.override.startingLevel(2000);
vi.spyOn(Overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([moveToUse]);
game.override.enemyMoveset([Moves.TACKLE,Moves.TACKLE,Moves.TACKLE,Moves.TACKLE]);
});

View File

@ -37,7 +37,7 @@ describe("Abilities - Parental Bond", () => {
game.override.enemySpecies(Species.SNORLAX);
game.override.enemyAbility(Abilities.INSOMNIA);
game.override.enemyMoveset(SPLASH_ONLY);
vi.spyOn(Overrides, "STARTING_LEVEL_OVERRIDE", "get").mockReturnValue(100);
game.override.startingLevel(100);
vi.spyOn(Overrides, "OPP_LEVEL_OVERRIDE", "get").mockReturnValue(100);
});

View File

@ -35,7 +35,7 @@ describe("Abilities - Protean", () => {
game = new GameManager(phaserGame);
game.override.battleType("single");
vi.spyOn(Overrides, "ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.PROTEAN);
vi.spyOn(Overrides, "STARTING_LEVEL_OVERRIDE", "get").mockReturnValue(100);
game.override.startingLevel(100);
game.override.enemySpecies(Species.RATTATA);
game.override.enemyMoveset([Moves.ENDURE, Moves.ENDURE, Moves.ENDURE, Moves.ENDURE]);
});

View File

@ -33,7 +33,7 @@ describe("Abilities - Sand Veil", () => {
game.override.enemySpecies(Species.MEOWSCARADA);
game.override.enemyAbility(Abilities.INSOMNIA);
game.override.enemyMoveset([Moves.TWISTER, Moves.TWISTER, Moves.TWISTER, Moves.TWISTER]);
vi.spyOn(Overrides, "STARTING_LEVEL_OVERRIDE", "get").mockReturnValue(100);
game.override.startingLevel(100);
vi.spyOn(Overrides, "OPP_LEVEL_OVERRIDE", "get").mockReturnValue(100);
game.override
.weather(WeatherType.SANDSTORM)

View File

@ -36,7 +36,7 @@ describe("Abilities - Serene Grace", () => {
const movesToUse = [Moves.AIR_SLASH, Moves.TACKLE];
game.override.battleType("single");
game.override.enemySpecies(Species.ONIX);
vi.spyOn(Overrides, "STARTING_LEVEL_OVERRIDE", "get").mockReturnValue(100);
game.override.startingLevel(100);
vi.spyOn(Overrides, "MOVESET_OVERRIDE", "get").mockReturnValue(movesToUse);
game.override.enemyMoveset([Moves.TACKLE,Moves.TACKLE,Moves.TACKLE,Moves.TACKLE]);
});

View File

@ -36,7 +36,7 @@ describe("Abilities - Sheer Force", () => {
const movesToUse = [Moves.AIR_SLASH, Moves.BIND, Moves.CRUSH_CLAW, Moves.TACKLE];
game.override.battleType("single");
game.override.enemySpecies(Species.ONIX);
vi.spyOn(Overrides, "STARTING_LEVEL_OVERRIDE", "get").mockReturnValue(100);
game.override.startingLevel(100);
vi.spyOn(Overrides, "MOVESET_OVERRIDE", "get").mockReturnValue(movesToUse);
game.override.enemyMoveset([Moves.TACKLE,Moves.TACKLE,Moves.TACKLE,Moves.TACKLE]);
});

View File

@ -37,7 +37,7 @@ describe("Abilities - Shield Dust", () => {
game.override.battleType("single");
game.override.enemySpecies(Species.ONIX);
game.override.enemyAbility(Abilities.SHIELD_DUST);
vi.spyOn(Overrides, "STARTING_LEVEL_OVERRIDE", "get").mockReturnValue(100);
game.override.startingLevel(100);
vi.spyOn(Overrides, "MOVESET_OVERRIDE", "get").mockReturnValue(movesToUse);
game.override.enemyMoveset([Moves.TACKLE,Moves.TACKLE,Moves.TACKLE,Moves.TACKLE]);
});

View File

@ -33,7 +33,7 @@ describe("Abilities - Sturdy", () => {
game.override.battleType("single");
game.override.starterSpecies(Species.LUCARIO);
vi.spyOn(Overrides, "STARTING_LEVEL_OVERRIDE", "get").mockReturnValue(100);
game.override.startingLevel(100);
vi.spyOn(Overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([Moves.CLOSE_COMBAT, Moves.FISSURE]);
game.override.enemySpecies(Species.ARON);

View File

@ -30,7 +30,7 @@ describe("Abilities - Unseen Fist", () => {
game.override.starterSpecies(Species.URSHIFU);
game.override.enemySpecies(Species.SNORLAX);
game.override.enemyMoveset([Moves.PROTECT, Moves.PROTECT, Moves.PROTECT, Moves.PROTECT]);
vi.spyOn(Overrides, "STARTING_LEVEL_OVERRIDE", "get").mockReturnValue(100);
game.override.startingLevel(100);
vi.spyOn(Overrides, "OPP_LEVEL_OVERRIDE", "get").mockReturnValue(100);
});

View File

@ -47,7 +47,7 @@ describe("Abilities - ZEN MODE", () => {
game.override.enemySpecies(Species.RATTATA);
game.override.enemyAbility(Abilities.HYDRATION);
vi.spyOn(Overrides, "ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.ZEN_MODE);
vi.spyOn(Overrides, "STARTING_LEVEL_OVERRIDE", "get").mockReturnValue(100);
game.override.startingLevel(100);
vi.spyOn(Overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([moveToUse]);
game.override.enemyMoveset([Moves.TACKLE, Moves.TACKLE, Moves.TACKLE, Moves.TACKLE]);
});

View File

@ -103,9 +103,9 @@ describe("RibbonAchv", () => {
});
beforeEach(() => {
vi.spyOn(Overrides, "STARTING_LEVEL_OVERRIDE", "get").mockReturnValue(0);
vi.spyOn(Overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([]);
game = new GameManager(phaserGame);
game.override.startingLevel(0);
game.override.starterSpecies(0);
game.override.enemyMoveset([]);
game.override.enemySpecies(0);

View File

@ -58,7 +58,7 @@ describe("Arena - Gravity", () => {
});
it("OHKO move accuracy is not affected", async () => {
vi.spyOn(Overrides, "STARTING_LEVEL_OVERRIDE", "get").mockReturnValue(5);
game.override.startingLevel(5);
vi.spyOn(Overrides, "OPP_LEVEL_OVERRIDE", "get").mockReturnValue(5);
/** See Fissure {@link https://bulbapedia.bulbagarden.net/wiki/Fissure_(move)} */

View File

@ -28,7 +28,7 @@ describe("Weather - Strong Winds", () => {
beforeEach(() => {
game = new GameManager(phaserGame);
game.override.battleType("single");
vi.spyOn(Overrides, "STARTING_LEVEL_OVERRIDE", "get").mockReturnValue(10);
game.override.startingLevel(10);
game.override.enemySpecies(Species.TAILLOW);
game.override.enemyAbility(Abilities.DELTA_STREAM);
vi.spyOn(Overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([Moves.THUNDERBOLT, Moves.ICE_BEAM, Moves.ROCK_SLIDE]);

View File

@ -92,7 +92,7 @@ describe("Test Battle Phase", () => {
it("do attack wave 3 - single battle - regular - OHKO", async() => {
game.override.starterSpecies(Species.MEWTWO);
game.override.enemySpecies(Species.RATTATA);
vi.spyOn(Overrides, "STARTING_LEVEL_OVERRIDE", "get").mockReturnValue(2000);
game.override.startingLevel(2000);
game.override
.startingWave(3)
.battleType("single");
@ -113,7 +113,7 @@ describe("Test Battle Phase", () => {
it("do attack wave 3 - single battle - regular - NO OHKO with opponent using non damage attack", async() => {
game.override.starterSpecies(Species.MEWTWO);
game.override.enemySpecies(Species.RATTATA);
vi.spyOn(Overrides, "STARTING_LEVEL_OVERRIDE", "get").mockReturnValue(5);
game.override.startingLevel(5);
game.override.startingWave(3);
vi.spyOn(Overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([Moves.TACKLE]);
game.override.enemyAbility(Abilities.HYDRATION);
@ -266,7 +266,7 @@ describe("Test Battle Phase", () => {
game.override.enemySpecies(Species.RATTATA);
game.override.enemyAbility(Abilities.HYDRATION);
vi.spyOn(Overrides, "ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.ZEN_MODE);
vi.spyOn(Overrides, "STARTING_LEVEL_OVERRIDE", "get").mockReturnValue(2000);
game.override.startingLevel(2000);
game.override.startingWave(3);
vi.spyOn(Overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([moveToUse]);
game.override.enemyMoveset([Moves.TACKLE,Moves.TACKLE,Moves.TACKLE,Moves.TACKLE]);
@ -295,7 +295,7 @@ describe("Test Battle Phase", () => {
game.override.enemySpecies(Species.RATTATA);
game.override.enemyAbility(Abilities.HYDRATION);
vi.spyOn(Overrides, "ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.ZEN_MODE);
vi.spyOn(Overrides, "STARTING_LEVEL_OVERRIDE", "get").mockReturnValue(2000);
game.override.startingLevel(2000);
game.override.startingWave(3);
vi.spyOn(Overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([moveToUse]);
game.override.enemyMoveset([Moves.TACKLE,Moves.TACKLE,Moves.TACKLE,Moves.TACKLE]);
@ -313,7 +313,7 @@ describe("Test Battle Phase", () => {
game.override.enemySpecies(Species.RATTATA);
game.override.enemyAbility(Abilities.HYDRATION);
vi.spyOn(Overrides, "ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.ZEN_MODE);
vi.spyOn(Overrides, "STARTING_LEVEL_OVERRIDE", "get").mockReturnValue(2000);
game.override.startingLevel(2000);
game.override.startingWave(3);
vi.spyOn(Overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([moveToUse]);
game.override.enemyMoveset([Moves.TACKLE,Moves.TACKLE,Moves.TACKLE,Moves.TACKLE]);

View File

@ -30,7 +30,7 @@ describe("Test Battle Phase", () => {
game.override.enemySpecies(Species.RATTATA);
game.override.enemyAbility(Abilities.HYDRATION);
vi.spyOn(Overrides, "ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.ZEN_MODE);
vi.spyOn(Overrides, "STARTING_LEVEL_OVERRIDE", "get").mockReturnValue(2000);
game.override.startingLevel(2000);
vi.spyOn(Overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([moveToUse]);
game.override.enemyMoveset([Moves.TACKLE,Moves.TACKLE,Moves.TACKLE,Moves.TACKLE]);
});

View File

@ -27,7 +27,7 @@ describe("Test Battle Phase", () => {
beforeEach(() => {
game = new GameManager(phaserGame);
game.override.enemySpecies(Species.RATTATA);
vi.spyOn(Overrides, "STARTING_LEVEL_OVERRIDE", "get").mockReturnValue(2000);
game.override.startingLevel(2000);
vi.spyOn(Overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([Moves.TACKLE]);
game.override.enemyAbility(Abilities.HYDRATION);
vi.spyOn(Overrides, "ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.HYDRATION);

View File

@ -1,10 +1,9 @@
import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
import Phaser from "phaser";
import GameManager from "#app/test/utils/gameManager";
import { Species } from "#app/enums/species.js";
import { Abilities } from "#app/enums/abilities.js";
import Overrides from "#app/overrides";
import { pokemonEvolutions } from "#app/data/pokemon-evolutions.js";
import { Abilities } from "#app/enums/abilities.js";
import { Species } from "#app/enums/species.js";
import GameManager from "#app/test/utils/gameManager";
import Phaser from "phaser";
import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest";
describe("Evolution", () => {
let phaserGame: Phaser.Game;
@ -29,7 +28,7 @@ describe("Evolution", () => {
game.override.enemySpecies(Species.MAGIKARP);
game.override.enemyAbility(Abilities.BALL_FETCH);
vi.spyOn(Overrides, "STARTING_LEVEL_OVERRIDE", "get").mockReturnValue(60);
game.override.startingLevel(60);
});
it("should keep hidden ability after evolving", async () => {

View File

@ -40,7 +40,7 @@ describe("Items - Grip Claw", () => {
{name: "BERRY", type: BerryType.SITRUS, count: 2},
{name: "BERRY", type: BerryType.LUM, count: 2}
]);
vi.spyOn(Overrides, "STARTING_LEVEL_OVERRIDE", "get").mockReturnValue(100);
game.override.startingLevel(100);
vi.spyOn(Overrides, "OPP_LEVEL_OVERRIDE", "get").mockReturnValue(100);
vi.spyOn(allMoves[Moves.POPULATION_BOMB], "accuracy", "get").mockReturnValue(100);

View File

@ -40,7 +40,7 @@ describe("Items - Toxic orb", () => {
game.override.enemySpecies(Species.RATTATA);
vi.spyOn(Overrides, "ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.INSOMNIA);
game.override.enemyAbility(Abilities.INSOMNIA);
vi.spyOn(Overrides, "STARTING_LEVEL_OVERRIDE", "get").mockReturnValue(2000);
game.override.startingLevel(2000);
vi.spyOn(Overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([moveToUse]);
game.override.enemyMoveset([oppMoveToUse, oppMoveToUse, oppMoveToUse, oppMoveToUse]);
vi.spyOn(Overrides, "STARTING_HELD_ITEMS_OVERRIDE", "get").mockReturnValue([{

View File

@ -33,7 +33,7 @@ describe("Moves - Astonish", () => {
game.override.enemySpecies(Species.BLASTOISE);
game.override.enemyAbility(Abilities.INSOMNIA);
game.override.enemyMoveset([Moves.TACKLE, Moves.TACKLE, Moves.TACKLE, Moves.TACKLE]);
vi.spyOn(Overrides, "STARTING_LEVEL_OVERRIDE", "get").mockReturnValue(100);
game.override.startingLevel(100);
vi.spyOn(Overrides, "OPP_LEVEL_OVERRIDE", "get").mockReturnValue(100);
vi.spyOn(allMoves[Moves.ASTONISH], "chance", "get").mockReturnValue(100);

View File

@ -36,7 +36,7 @@ describe("Moves - Ceaseless Edge", () => {
game.override.enemySpecies(Species.RATTATA);
game.override.enemyAbility(Abilities.RUN_AWAY);
vi.spyOn(Overrides, "OPP_PASSIVE_ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.RUN_AWAY);
vi.spyOn(Overrides, "STARTING_LEVEL_OVERRIDE", "get").mockReturnValue(100);
game.override.startingLevel(100);
vi.spyOn(Overrides, "OPP_LEVEL_OVERRIDE", "get").mockReturnValue(100);
vi.spyOn(Overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([ Moves.CEASELESS_EDGE, Moves.SPLASH, Moves.ROAR ]);
game.override.enemyMoveset([Moves.SPLASH,Moves.SPLASH,Moves.SPLASH,Moves.SPLASH]);

View File

@ -42,7 +42,7 @@ describe("Moves - Dragon Rage", () => {
vi.spyOn(Overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([Moves.DRAGON_RAGE]);
vi.spyOn(Overrides, "ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.BALL_FETCH);
vi.spyOn(Overrides, "PASSIVE_ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.BALL_FETCH);
vi.spyOn(Overrides, "STARTING_LEVEL_OVERRIDE", "get").mockReturnValue(100);
game.override.startingLevel(100);
game.override.enemySpecies(Species.SNORLAX);
game.override.enemyMoveset(SPLASH_ONLY);

View File

@ -29,7 +29,7 @@ describe("Moves - Dynamax Cannon", () => {
game = new GameManager(phaserGame);
vi.spyOn(Overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([ dynamaxCannon.id ]);
vi.spyOn(Overrides, "STARTING_LEVEL_OVERRIDE", "get").mockReturnValue(200);
game.override.startingLevel(200);
// Note that, for Waves 1-10, the level cap is 10
game.override.startingWave(1);

View File

@ -36,7 +36,7 @@ describe("Moves - Fissure", () => {
game.override.starterSpecies(Species.SNORLAX);
vi.spyOn(Overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([Moves.FISSURE]);
vi.spyOn(Overrides, "PASSIVE_ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.BALL_FETCH);
vi.spyOn(Overrides, "STARTING_LEVEL_OVERRIDE", "get").mockReturnValue(100);
game.override.startingLevel(100);
game.override.enemySpecies(Species.SNORLAX);
game.override.enemyMoveset(SPLASH_ONLY);

View File

@ -35,7 +35,7 @@ describe("Moves - Follow Me", () => {
game.override.battleType("double");
game.override.starterSpecies(Species.AMOONGUSS);
game.override.enemySpecies(Species.SNORLAX);
vi.spyOn(Overrides, "STARTING_LEVEL_OVERRIDE", "get").mockReturnValue(100);
game.override.startingLevel(100);
vi.spyOn(Overrides, "OPP_LEVEL_OVERRIDE", "get").mockReturnValue(100);
vi.spyOn(Overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([ Moves.FOLLOW_ME, Moves.RAGE_POWDER, Moves.SPOTLIGHT, Moves.QUICK_ATTACK ]);
game.override.enemyMoveset([Moves.TACKLE,Moves.TACKLE,Moves.TACKLE,Moves.TACKLE]);

View File

@ -31,7 +31,7 @@ describe("Moves - Gastro Acid", () => {
beforeEach(() => {
game = new GameManager(phaserGame);
game.override.battleType("double");
vi.spyOn(Overrides, "STARTING_LEVEL_OVERRIDE", "get").mockReturnValue(1);
game.override.startingLevel(1);
vi.spyOn(Overrides, "OPP_LEVEL_OVERRIDE", "get").mockReturnValue(100);
vi.spyOn(Overrides, "ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.NONE);
vi.spyOn(Overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([Moves.GASTRO_ACID, Moves.WATER_GUN, Moves.SPLASH, Moves.CORE_ENFORCER]);

View File

@ -38,7 +38,7 @@ describe("Moves - Growth", () => {
game.override.enemySpecies(Species.RATTATA);
game.override.enemyAbility(Abilities.MOXIE);
vi.spyOn(Overrides, "ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.INSOMNIA);
vi.spyOn(Overrides, "STARTING_LEVEL_OVERRIDE", "get").mockReturnValue(2000);
game.override.startingLevel(2000);
vi.spyOn(Overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([moveToUse]);
game.override.enemyMoveset([Moves.TACKLE,Moves.TACKLE,Moves.TACKLE,Moves.TACKLE]);
});

View File

@ -37,7 +37,7 @@ describe("Moves - Make It Rain", () => {
game.override.enemySpecies(Species.SNORLAX);
game.override.enemyAbility(Abilities.INSOMNIA);
game.override.enemyMoveset(SPLASH_ONLY);
vi.spyOn(Overrides, "STARTING_LEVEL_OVERRIDE", "get").mockReturnValue(100);
game.override.startingLevel(100);
vi.spyOn(Overrides, "OPP_LEVEL_OVERRIDE", "get").mockReturnValue(100);
});

View File

@ -170,7 +170,7 @@ function beforeTrial(phaserGame: Phaser.Game, single: boolean = false) {
vi.spyOn(Overrides, "ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.BALL_FETCH);
game.override.enemyMoveset(SPLASH_ONLY);
vi.spyOn(Overrides, "NEVER_CRIT_OVERRIDE", "get").mockReturnValue(true);
vi.spyOn(Overrides, "STARTING_LEVEL_OVERRIDE", "get").mockReturnValue(50);
game.override.startingLevel(50);
vi.spyOn(Overrides, "OPP_LEVEL_OVERRIDE", "get").mockReturnValue(40);
game.override.enemySpecies(Species.EEVEE);
return game;

View File

@ -35,7 +35,7 @@ describe("Moves - Octolock", () => {
game.override.enemyMoveset(SPLASH_ONLY);
game.override.enemyAbility(Abilities.NONE);
vi.spyOn(Overrides, "STARTING_LEVEL_OVERRIDE", "get").mockReturnValue(2000);
game.override.startingLevel(2000);
vi.spyOn(Overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([Moves.OCTOLOCK, Moves.SPLASH]);
vi.spyOn(Overrides, "ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.NONE);
});

View File

@ -32,7 +32,7 @@ describe("Moves - Purify", () => {
game.override.battleType("single");
game.override.starterSpecies(Species.PYUKUMUKU);
vi.spyOn(Overrides, "STARTING_LEVEL_OVERRIDE", "get").mockReturnValue(10);
game.override.startingLevel(10);
vi.spyOn(Overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([Moves.PURIFY, Moves.SIZZLY_SLIDE]);
game.override.enemySpecies(Species.MAGIKARP);

View File

@ -34,7 +34,7 @@ describe("Moves - Rage Powder", () => {
game.override.battleType("double");
game.override.starterSpecies(Species.AMOONGUSS);
game.override.enemySpecies(Species.SNORLAX);
vi.spyOn(Overrides, "STARTING_LEVEL_OVERRIDE", "get").mockReturnValue(100);
game.override.startingLevel(100);
vi.spyOn(Overrides, "OPP_LEVEL_OVERRIDE", "get").mockReturnValue(100);
vi.spyOn(Overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([ Moves.FOLLOW_ME, Moves.RAGE_POWDER, Moves.SPOTLIGHT, Moves.QUICK_ATTACK ]);
game.override.enemyMoveset([Moves.TACKLE,Moves.TACKLE,Moves.TACKLE,Moves.TACKLE]);

View File

@ -32,7 +32,7 @@ describe("Moves - Rollout", () => {
vi.spyOn(Overrides, "ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.NONE);
game.override.enemySpecies(Species.BIDOOF);
game.override.enemyAbility(Abilities.NONE);
vi.spyOn(Overrides, "STARTING_LEVEL_OVERRIDE", "get").mockReturnValue(100);
game.override.startingLevel(100);
vi.spyOn(Overrides, "OPP_LEVEL_OVERRIDE", "get").mockReturnValue(100);
game.override.enemyMoveset(SPLASH_ONLY);
});

View File

@ -30,7 +30,7 @@ describe("Moves - Roost", () => {
game.override.battleType("single");
game.override.enemySpecies(Species.STARAPTOR);
game.override.enemyAbility(Abilities.INSOMNIA);
vi.spyOn(Overrides, "STARTING_LEVEL_OVERRIDE", "get").mockReturnValue(100);
game.override.startingLevel(100);
vi.spyOn(Overrides, "OPP_LEVEL_OVERRIDE", "get").mockReturnValue(100);
vi.spyOn(Overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([ Moves.STOMPING_TANTRUM ]);
game.override.enemyMoveset([Moves.ROOST,Moves.ROOST,Moves.ROOST,Moves.ROOST]);

View File

@ -105,7 +105,7 @@ describe("Moves - Spikes", () => {
it("trainer - wild - force switch by himself opponent - should take damage", async() => {
game.override.startingWave(5);
vi.spyOn(Overrides, "STARTING_LEVEL_OVERRIDE", "get").mockReturnValue(5000);
game.override.startingLevel(5000);
game.override.enemySpecies(0);
// turn 1: player set spikes, opponent do splash
// turn 2: player do splash, opponent switch pokemon

View File

@ -34,7 +34,7 @@ describe("Moves - Spotlight", () => {
game.override.battleType("double");
game.override.starterSpecies(Species.AMOONGUSS);
game.override.enemySpecies(Species.SNORLAX);
vi.spyOn(Overrides, "STARTING_LEVEL_OVERRIDE", "get").mockReturnValue(100);
game.override.startingLevel(100);
vi.spyOn(Overrides, "OPP_LEVEL_OVERRIDE", "get").mockReturnValue(100);
vi.spyOn(Overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([ Moves.FOLLOW_ME, Moves.RAGE_POWDER, Moves.SPOTLIGHT, Moves.QUICK_ATTACK ]);
game.override.enemyMoveset([Moves.TACKLE,Moves.TACKLE,Moves.TACKLE,Moves.TACKLE]);

View File

@ -33,7 +33,7 @@ describe("Moves - Tackle", () => {
const moveToUse = Moves.TACKLE;
game.override.battleType("single");
game.override.enemySpecies(Species.MAGIKARP);
vi.spyOn(Overrides, "STARTING_LEVEL_OVERRIDE", "get").mockReturnValue(1);
game.override.startingLevel(1);
game.override.startingWave(97);
vi.spyOn(Overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([moveToUse]);
game.override.enemyMoveset([Moves.GROWTH,Moves.GROWTH,Moves.GROWTH,Moves.GROWTH]);

View File

@ -37,7 +37,7 @@ describe("Moves - Tail whip", () => {
game.override.enemySpecies(Species.RATTATA);
game.override.enemyAbility(Abilities.INSOMNIA);
vi.spyOn(Overrides, "ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.INSOMNIA);
vi.spyOn(Overrides, "STARTING_LEVEL_OVERRIDE", "get").mockReturnValue(2000);
game.override.startingLevel(2000);
vi.spyOn(Overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([moveToUse]);
game.override.enemyMoveset([Moves.TACKLE,Moves.TACKLE,Moves.TACKLE,Moves.TACKLE]);
});

View File

@ -32,7 +32,7 @@ describe("Moves - Thousand Arrows", () => {
game = new GameManager(phaserGame);
game.override.battleType("single");
game.override.enemySpecies(Species.TOGETIC);
vi.spyOn(Overrides, "STARTING_LEVEL_OVERRIDE", "get").mockReturnValue(100);
game.override.startingLevel(100);
vi.spyOn(Overrides, "OPP_LEVEL_OVERRIDE", "get").mockReturnValue(100);
vi.spyOn(Overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([ Moves.THOUSAND_ARROWS ]);
game.override.enemyMoveset([Moves.SPLASH,Moves.SPLASH,Moves.SPLASH,Moves.SPLASH]);

View File

@ -35,7 +35,7 @@ describe("Moves - Tidy Up", () => {
game.override.starterSpecies(Species.FEEBAS);
vi.spyOn(Overrides, "ABILITY_OVERRIDE", "get").mockReturnValue(Abilities.BALL_FETCH);
vi.spyOn(Overrides, "MOVESET_OVERRIDE", "get").mockReturnValue([Moves.TIDY_UP]);
vi.spyOn(Overrides, "STARTING_LEVEL_OVERRIDE", "get").mockReturnValue(50);
game.override.startingLevel(50);
});
it("spikes are cleared", async() => {

View File

@ -34,7 +34,7 @@ describe("UI - Transfer Items", () => {
beforeEach(async () => {
game = new GameManager(phaserGame);
game.override.battleType("single");
vi.spyOn(Overrides, "STARTING_LEVEL_OVERRIDE", "get").mockReturnValue(100);
game.override.startingLevel(100);
game.override.startingWave(1);
vi.spyOn(Overrides, "STARTING_HELD_ITEMS_OVERRIDE", "get").mockReturnValue([
{ name: "BERRY", count: 1, type: BerryType.SITRUS },