Make forecast unreplaceable

This commit is contained in:
Dean 2025-03-28 15:21:35 -07:00
parent 24a44a55e1
commit 1c8fdfc6b6
2 changed files with 1 additions and 31 deletions

View File

@ -6248,6 +6248,7 @@ export function initAbilities() {
.conditionalAttr(p => globalScene.currentBattle.double && [ Abilities.PLUS, Abilities.MINUS ].some(a => p.getAlly().hasAbility(a)), StatMultiplierAbAttr, Stat.SPATK, 1.5), .conditionalAttr(p => globalScene.currentBattle.double && [ Abilities.PLUS, Abilities.MINUS ].some(a => p.getAlly().hasAbility(a)), StatMultiplierAbAttr, Stat.SPATK, 1.5),
new Ability(Abilities.FORECAST, 3) new Ability(Abilities.FORECAST, 3)
.uncopiable() .uncopiable()
.unreplaceable()
.attr(NoFusionAbilityAbAttr) .attr(NoFusionAbilityAbAttr)
.attr(PostSummonFormChangeByWeatherAbAttr, Abilities.FORECAST) .attr(PostSummonFormChangeByWeatherAbAttr, Abilities.FORECAST)
.attr(PostWeatherChangeFormChangeAbAttr, Abilities.FORECAST, [ WeatherType.NONE, WeatherType.SANDSTORM, WeatherType.STRONG_WINDS, WeatherType.FOG ]), .attr(PostWeatherChangeFormChangeAbAttr, Abilities.FORECAST, [ WeatherType.NONE, WeatherType.SANDSTORM, WeatherType.STRONG_WINDS, WeatherType.FOG ]),

View File

@ -210,37 +210,6 @@ describe("Abilities - Forecast", () => {
expect(game.scene.getEnemyPokemon()?.formIndex).not.toBe(RAINY_FORM); expect(game.scene.getEnemyPokemon()?.formIndex).not.toBe(RAINY_FORM);
}); });
it("reverts to Normal Form when Castform loses Forecast, changes form to match the weather when it regains it", async () => {
game.override
.moveset([Moves.SKILL_SWAP, Moves.WORRY_SEED, Moves.SPLASH])
.weather(WeatherType.RAIN)
.battleType("double");
await game.startBattle([Species.CASTFORM, Species.FEEBAS]);
const castform = game.scene.getPlayerField()[0];
expect(castform.formIndex).toBe(RAINY_FORM);
game.move.select(Moves.SKILL_SWAP, 0, BattlerIndex.PLAYER_2);
game.move.select(Moves.SKILL_SWAP, 1, BattlerIndex.PLAYER);
await game.setTurnOrder([BattlerIndex.PLAYER, BattlerIndex.PLAYER_2, BattlerIndex.ENEMY, BattlerIndex.ENEMY_2]);
await game.phaseInterceptor.to("MoveEndPhase");
expect(castform.formIndex).toBe(NORMAL_FORM);
await game.phaseInterceptor.to("MoveEndPhase");
expect(castform.formIndex).toBe(RAINY_FORM);
await game.toNextTurn();
game.move.select(Moves.SPLASH);
game.move.select(Moves.WORRY_SEED, 1, BattlerIndex.PLAYER);
await game.setTurnOrder([BattlerIndex.PLAYER_2, BattlerIndex.PLAYER, BattlerIndex.ENEMY, BattlerIndex.ENEMY_2]);
await game.phaseInterceptor.to("MoveEndPhase");
expect(castform.formIndex).toBe(NORMAL_FORM);
});
it("reverts to Normal Form when Forecast is suppressed, changes form to match the weather when it regains it", async () => { it("reverts to Normal Form when Forecast is suppressed, changes form to match the weather when it regains it", async () => {
game.override.enemyMoveset([Moves.GASTRO_ACID]).weather(WeatherType.RAIN); game.override.enemyMoveset([Moves.GASTRO_ACID]).weather(WeatherType.RAIN);
await game.startBattle([Species.CASTFORM, Species.PIKACHU]); await game.startBattle([Species.CASTFORM, Species.PIKACHU]);