mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-18 22:32:32 +02:00
Make forecast unreplaceable
This commit is contained in:
parent
24a44a55e1
commit
1c8fdfc6b6
@ -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 ]),
|
||||||
|
@ -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]);
|
||||||
|
Loading…
Reference in New Issue
Block a user