add OverridesHelper.starterForms

This commit is contained in:
Felix Staud 2024-07-25 15:54:48 -07:00
parent 3242a084f1
commit 97376d5c70
1 changed files with 14 additions and 0 deletions

View File

@ -63,6 +63,20 @@ export class OverridesHelper {
return this;
}
/**
* Override the player (pokemons) forms
* @param forms the (pokemon) forms to set
* @returns this
*/
starterForms(forms: Partial<Record<Species, number>>): this {
vi.spyOn(Overrides, "STARTER_FORM_OVERRIDES", "get").mockReturnValue(forms);
const formsStr = Object.entries(forms)
.map(([speciesId, formIndex]) => `${Species[speciesId]}=${formIndex}`)
.join(", ");
this.log(`Player Pokemon form set to: ${formsStr}!`);
return this;
}
/**
* Override the player (pokemon) {@linkcode Abilities | ability}
* @param ability the (pokemon) {@linkcode Abilities | ability} to set