slightly better overrides

This commit is contained in:
snoozbuster 2024-08-13 21:10:09 -07:00
parent c628759756
commit 1bb79b87f6
1 changed files with 9 additions and 4 deletions

View File

@ -276,6 +276,11 @@ export class OverridesHelper extends GameManagerHelper {
return this; return this;
} }
/**
* Overrides the trainer AI's party
* @param species List of pokemon to generate in the party
* @returns this
*/
enemyParty(species: Species[]) { enemyParty(species: Species[]) {
vi.spyOn(Overrides, "TRAINER_PARTY_OVERRIDE", "get").mockReturnValue(species); vi.spyOn(Overrides, "TRAINER_PARTY_OVERRIDE", "get").mockReturnValue(species);
this.log("Enemy trainer party set to:", species); this.log("Enemy trainer party set to:", species);
@ -283,12 +288,12 @@ export class OverridesHelper extends GameManagerHelper {
} }
/** /**
* Forces the AI to always switch out * Forces the AI to always switch out, or reset to allow normal switching decisions
* @returns this * @returns this
*/ */
forceTrainerSwitches() { forceTrainerSwitches(newValue: boolean = true) {
vi.spyOn(Overrides, "TRAINER_ALWAYS_SWITCHES_OVERRIDE", "get").mockReturnValue(true); vi.spyOn(Overrides, "TRAINER_ALWAYS_SWITCHES_OVERRIDE", "get").mockReturnValue(newValue);
this.log("Trainers will always switch out"); this.log("Trainers will always switch out set to:", newValue);
return this; return this;
} }