Add fusions overrides to overridesHelper

This commit is contained in:
EmberCM 2024-09-17 15:57:52 -05:00
parent 21bafb4eb2
commit fa5a42791e
1 changed files with 42 additions and 0 deletions

View File

@ -83,6 +83,27 @@ export class OverridesHelper extends GameManagerHelper {
return this;
}
/**
* Override the player (pokemon) to be a random fusion
* @returns this
*/
enableStarterFusion(): this {
vi.spyOn(Overrides, "STARTER_FUSION_OVERRIDE", "get").mockReturnValue(true);
this.log("Player Pokemon is a random fusion!");
return this;
}
/**
* Override the player (pokemon) fusion species
* @param species the fusion species to set
* @returns this
*/
starterFusionSpecies(species: Species | number): this {
vi.spyOn(Overrides, "STARTER_FUSION_SPECIES_OVERRIDE", "get").mockReturnValue(species);
this.log(`Player Pokemon fusion species set to ${Species[species]} (=${species})!`);
return this;
}
/**
* Override the player (pokemons) forms
* @param forms the (pokemon) forms to set
@ -230,6 +251,27 @@ export class OverridesHelper extends GameManagerHelper {
return this;
}
/**
* Override the enemy (pokemon) to be a random fusion
* @returns this
*/
enableEnemyFusion(): this {
vi.spyOn(Overrides, "OPP_FUSION_OVERRIDE", "get").mockReturnValue(true);
this.log("Enemy Pokemon is a random fusion!");
return this;
}
/**
* Override the enemy (pokemon) fusion species
* @param species the fusion species to set
* @returns this
*/
enemyFusionSpecies(species: Species | number): this {
vi.spyOn(Overrides, "OPP_FUSION_SPECIES_OVERRIDE", "get").mockReturnValue(species);
this.log(`Enemy Pokemon fusion species set to ${Species[species]} (=${species})!`);
return this;
}
/**
* Override the enemy (pokemon) {@linkcode Abilities | ability}
* @param ability the (pokemon) {@linkcode Abilities | ability} to set