Added tsdocs to overrideHelper.ts

This commit is contained in:
Wlowscha 2025-02-03 19:12:17 +01:00
parent 5130eddf1f
commit df4204bb48
No known key found for this signature in database
GPG Key ID: 3C8F1AD330565D04

View File

@ -181,6 +181,11 @@ export class OverridesHelper extends GameManagerHelper {
return this; return this;
} }
/**
* Forces the status of the player (pokemon) **passive** {@linkcode Abilities | ability}
* @param hasPassiveAbility forces the passive to be active if `true`, inactive if `false`
* @returns `this`
*/
public hasPassiveAbility(hasPassiveAbility: boolean | null): this { public hasPassiveAbility(hasPassiveAbility: boolean | null): this {
vi.spyOn(Overrides, "HAS_PASSIVE_ABILITY_OVERRIDE", "get").mockReturnValue(hasPassiveAbility); vi.spyOn(Overrides, "HAS_PASSIVE_ABILITY_OVERRIDE", "get").mockReturnValue(hasPassiveAbility);
if (hasPassiveAbility === null) { if (hasPassiveAbility === null) {
@ -334,6 +339,11 @@ export class OverridesHelper extends GameManagerHelper {
return this; return this;
} }
/**
* Forces the status of the enemy (pokemon) **passive** {@linkcode Abilities | ability}
* @param hasPassiveAbility forces the passive to be active if `true`, inactive if `false`
* @returns `this`
*/
public enemyHasPassiveAbility(hasPassiveAbility: boolean | null): this { public enemyHasPassiveAbility(hasPassiveAbility: boolean | null): this {
vi.spyOn(Overrides, "OPP_HAS_PASSIVE_ABILITY_OVERRIDE", "get").mockReturnValue(hasPassiveAbility); vi.spyOn(Overrides, "OPP_HAS_PASSIVE_ABILITY_OVERRIDE", "get").mockReturnValue(hasPassiveAbility);
if (hasPassiveAbility === null) { if (hasPassiveAbility === null) {