add OverridesHelper.enemySpecies()

This commit is contained in:
Felix Staud 2024-07-25 14:53:34 -07:00
parent e52d89ba40
commit 08e0531eae
1 changed files with 12 additions and 0 deletions

View File

@ -1,5 +1,6 @@
import { Weather, WeatherType } from "#app/data/weather";
import { Biome } from "#app/enums/biome";
import { Species } from "#app/enums/species.js";
import * as GameMode from "#app/game-mode";
import { GameModes, getGameMode } from "#app/game-mode";
import Overrides from "#app/overrides";
@ -92,6 +93,17 @@ export class OverridesHelper {
return this;
}
/**
* Override the enemy (pokemon) species
* @param species the (pokemon) species to set
* @returns this
*/
enemySpecies(species: Species): this {
vi.spyOn(Overrides, "OPP_SPECIES_OVERRIDE", "get").mockReturnValue(species);
this.log(`Enemy Pokemon species set to ${Species[species]} (=${species})!`);
return this;
}
private log(...params: any[]) {
console.log("Overrides:", ...params);
}