From 9c9d5506053dd8e5be9e5cd0efa380746d4ffd69 Mon Sep 17 00:00:00 2001 From: Dean Date: Sun, 2 Feb 2025 12:21:51 -0800 Subject: [PATCH] Fix intimidate display --- src/data/ability.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/data/ability.ts b/src/data/ability.ts index 8c19f0d5e3f..a07e8f7e9f3 100644 --- a/src/data/ability.ts +++ b/src/data/ability.ts @@ -2148,7 +2148,7 @@ export class PostSummonStatStageChangeAbAttr extends PostSummonAbAttr { private intimidate: boolean; constructor(stats: BattleStat[], stages: number, selfTarget?: boolean, intimidate?: boolean) { - super(false); + super(true); this.stats = stats; this.stages = stages; @@ -5002,6 +5002,7 @@ async function applyAbAttrsInternal( messages: string[] = [], ) { for (const passive of [ false, true ]) { + let abShown = false; if (!pokemon?.canApplyAbility(passive) || (passive && pokemon.getPassiveAbility().id === pokemon.getAbility().id)) { continue; } @@ -5017,6 +5018,7 @@ async function applyAbAttrsInternal( if (attr.showAbility && !simulated) { queueShowAbility(pokemon, passive); + abShown = true; } const message = attr.getTriggerMessage(pokemon, ability.name, args); if (message) { @@ -5032,7 +5034,9 @@ async function applyAbAttrsInternal( result = await result; } if (result) { - queueHideAbility(pokemon, passive); + if (abShown) { + queueHideAbility(pokemon, passive); + } if (pokemon.summonData && !pokemon.summonData.abilitiesApplied.includes(ability.id)) { pokemon.summonData.abilitiesApplied.push(ability.id);