Fix overrides in forecast test

This commit is contained in:
Sirz Benjie 2025-05-20 20:26:12 -05:00
parent 3920669e69
commit 30b110412f
No known key found for this signature in database
GPG Key ID: 38AC42D68CF5E138

View File

@ -23,10 +23,10 @@ describe("Abilities - Forecast", () => {
/** /**
* Tests form changes based on weather changes * Tests form changes based on weather changes
* @param {GameManager} game The game manager instance * @param game - The game manager instance
* @param {WeatherType} weather The active weather to set * @param weather - The active weather to set
* @param form The expected form based on the active weather * @param form - The expected form based on the active weather
* @param initialForm The initial form pre form change * @param initialForm - The initial form pre form change
*/ */
const testWeatherFormChange = async (game: GameManager, weather: WeatherType, form: number, initialForm?: number) => { const testWeatherFormChange = async (game: GameManager, weather: WeatherType, form: number, initialForm?: number) => {
game.override.weather(weather).starterForms({ [SpeciesId.CASTFORM]: initialForm }); game.override.weather(weather).starterForms({ [SpeciesId.CASTFORM]: initialForm });
@ -39,8 +39,8 @@ describe("Abilities - Forecast", () => {
/** /**
* Tests reverting to normal form when Cloud Nine/Air Lock is active on the field * Tests reverting to normal form when Cloud Nine/Air Lock is active on the field
* @param {GameManager} game The game manager instance * @param game - The game manager instance
* @param {AbilityId} ability The ability that is active on the field * @param ability - The ability that is active on the field
*/ */
const testRevertFormAgainstAbility = async (game: GameManager, ability: AbilityId) => { const testRevertFormAgainstAbility = async (game: GameManager, ability: AbilityId) => {
game.override.starterForms({ [SpeciesId.CASTFORM]: SUNNY_FORM }).enemyAbility(ability); game.override.starterForms({ [SpeciesId.CASTFORM]: SUNNY_FORM }).enemyAbility(ability);
@ -287,7 +287,7 @@ describe("Abilities - Forecast", () => {
expect(castform.formIndex).toBe(SUNNY_FORM); expect(castform.formIndex).toBe(SUNNY_FORM);
}); });
it("should trigger enemy's form change when summoned at the same time as a player with a weather changing ability", async () => { it("should trigger enemy's form change when summoned at the same time as a player with a weather changing ability", async () => {
game.override.ability(AbilityId.DROUGHT).enemySpecies(SpeciesId.CASTFORM); game.override.ability(AbilityId.DROUGHT).enemySpecies(SpeciesId.CASTFORM).enemyAbility(AbilityId.FORECAST);
await game.classicMode.startBattle([SpeciesId.MAGIKARP]); await game.classicMode.startBattle([SpeciesId.MAGIKARP]);
const castform = game.scene.getEnemyPokemon()!; const castform = game.scene.getEnemyPokemon()!;
expect(castform.formIndex).toBe(SUNNY_FORM); expect(castform.formIndex).toBe(SUNNY_FORM);