mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2024-11-27 01:06:09 +00:00
add OverridesHelper.enemyStatusEffect()
This commit is contained in:
parent
4338f7b927
commit
fa8e9c38bc
@ -1,3 +1,4 @@
|
||||
import { StatusEffect } from "#app/data/status-effect.js";
|
||||
import { Weather, WeatherType } from "#app/data/weather";
|
||||
import { Abilities } from "#app/enums/abilities.js";
|
||||
import { Biome } from "#app/enums/biome";
|
||||
@ -242,6 +243,17 @@ export class OverridesHelper {
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Override the enemy (pokemon) {@linkcode StatusEffect | status-effect}
|
||||
* @param statusEffect the {@linkcode StatusEffect | status-effect} to set
|
||||
* @returns
|
||||
*/
|
||||
enemyStatusEffect(statusEffect: StatusEffect): this {
|
||||
vi.spyOn(Overrides, "OPP_STATUS_OVERRIDE", "get").mockReturnValue(statusEffect);
|
||||
this.log(`Enemy Pokemon status-effect set to ${StatusEffect[statusEffect]} (=${statusEffect})!`);
|
||||
return this;
|
||||
}
|
||||
|
||||
private log(...params: any[]) {
|
||||
console.log("Overrides:", ...params);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user