add OverridesHelper.ability()

This commit is contained in:
Felix Staud 2024-07-25 15:31:16 -07:00
parent 5924e5c1b4
commit 7732411c92
1 changed files with 11 additions and 0 deletions

View File

@ -63,6 +63,17 @@ export class OverridesHelper {
return this;
}
/**
* Override the player (pokemon) {@linkcode Abilities | ability}
* @param ability the (pokemon) {@linkcode Abilities | ability} to set
* @returns this
*/
ability(ability: Abilities): this {
vi.spyOn(Overrides, "ABILITY_OVERRIDE", "get").mockReturnValue(ability);
this.log(`Player Pokemon ability set to ${Abilities[ability]} (=${ability})!`);
return this;
}
/**
* Override each wave to have or not have standard trainer battles
* @returns this