mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2024-11-27 01:06:09 +00:00
add OverridesHelper.starterForms
This commit is contained in:
parent
3242a084f1
commit
97376d5c70
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user