Make flower gift unreplaceable

This commit is contained in:
Dean 2025-03-28 14:32:10 -07:00 committed by Dean
parent bdaf3e9948
commit 9c21a5d92d
2 changed files with 1 additions and 19 deletions

View File

@ -6441,6 +6441,7 @@ export function initAbilities() {
.conditionalAttr(getWeatherCondition(WeatherType.SUNNY || WeatherType.HARSH_SUN), StatMultiplierAbAttr, Stat.ATK, 1.5) .conditionalAttr(getWeatherCondition(WeatherType.SUNNY || WeatherType.HARSH_SUN), StatMultiplierAbAttr, Stat.ATK, 1.5)
.conditionalAttr(getWeatherCondition(WeatherType.SUNNY || WeatherType.HARSH_SUN), StatMultiplierAbAttr, Stat.SPDEF, 1.5) .conditionalAttr(getWeatherCondition(WeatherType.SUNNY || WeatherType.HARSH_SUN), StatMultiplierAbAttr, Stat.SPDEF, 1.5)
.uncopiable() .uncopiable()
.unreplaceable()
.attr(NoFusionAbilityAbAttr) .attr(NoFusionAbilityAbAttr)
.attr(PostSummonFormChangeByWeatherAbAttr, Abilities.FLOWER_GIFT) .attr(PostSummonFormChangeByWeatherAbAttr, Abilities.FLOWER_GIFT)
.attr(PostWeatherChangeFormChangeAbAttr, Abilities.FLOWER_GIFT, [ WeatherType.NONE, WeatherType.SANDSTORM, WeatherType.STRONG_WINDS, WeatherType.FOG, WeatherType.HAIL, WeatherType.HEAVY_RAIN, WeatherType.SNOW, WeatherType.RAIN ]) .attr(PostWeatherChangeFormChangeAbAttr, Abilities.FLOWER_GIFT, [ WeatherType.NONE, WeatherType.SANDSTORM, WeatherType.STRONG_WINDS, WeatherType.FOG, WeatherType.HAIL, WeatherType.HEAVY_RAIN, WeatherType.SNOW, WeatherType.RAIN ])

View File

@ -90,25 +90,6 @@ describe("Abilities - Flower Gift", () => {
await testRevertFormAgainstAbility(game, Abilities.CLOUD_NINE); await testRevertFormAgainstAbility(game, Abilities.CLOUD_NINE);
}); });
it("reverts to Overcast Form when the Pokémon loses Flower Gift, changes form under Harsh Sunlight/Sunny when it regains it", async () => {
game.override.enemyMoveset([Moves.SKILL_SWAP]).weather(WeatherType.HARSH_SUN);
await game.classicMode.startBattle([Species.CHERRIM]);
const cherrim = game.scene.getPlayerPokemon()!;
game.move.select(Moves.SKILL_SWAP);
await game.phaseInterceptor.to("TurnStartPhase");
expect(cherrim.formIndex).toBe(SUNSHINE_FORM);
await game.phaseInterceptor.to("MoveEndPhase");
expect(cherrim.formIndex).toBe(OVERCAST_FORM);
await game.phaseInterceptor.to("MoveEndPhase");
expect(cherrim.formIndex).toBe(SUNSHINE_FORM);
});
it("reverts to Overcast Form when the Flower Gift is suppressed, changes form under Harsh Sunlight/Sunny when it regains it", async () => { it("reverts to Overcast Form when the Flower Gift is suppressed, changes form under Harsh Sunlight/Sunny when it regains it", async () => {
game.override.enemyMoveset([Moves.GASTRO_ACID]).weather(WeatherType.HARSH_SUN); game.override.enemyMoveset([Moves.GASTRO_ACID]).weather(WeatherType.HARSH_SUN);