From 59a4546a3f56a9fbfd3469990360967bbde64c5a Mon Sep 17 00:00:00 2001 From: "Adrian T." <68144167+torranx@users.noreply.github.com> Date: Wed, 31 Jul 2024 16:52:01 +0800 Subject: [PATCH] add missing changes to sweet veil(#3265) --- src/data/ability.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/data/ability.ts b/src/data/ability.ts index a811da27b9f..491a14ba621 100644 --- a/src/data/ability.ts +++ b/src/data/ability.ts @@ -2540,6 +2540,7 @@ export class PreApplyBattlerTagAbAttr extends AbAttr { */ export class PreApplyBattlerTagImmunityAbAttr extends PreApplyBattlerTagAbAttr { private immuneTagType: BattlerTagType; + private battlerTag: BattlerTag; constructor(immuneTagType: BattlerTagType) { super(); @@ -2550,6 +2551,7 @@ export class PreApplyBattlerTagImmunityAbAttr extends PreApplyBattlerTagAbAttr { applyPreApplyBattlerTag(pokemon: Pokemon, passive: boolean, tag: BattlerTag, cancelled: Utils.BooleanHolder, args: any[]): boolean { if (tag.tagType === this.immuneTagType) { cancelled.value = true; + this.battlerTag = tag; return true; } @@ -2560,7 +2562,7 @@ export class PreApplyBattlerTagImmunityAbAttr extends PreApplyBattlerTagAbAttr { return i18next.t("abilityTriggers:battlerTagImmunity", { pokemonNameWithAffix: getPokemonNameWithAffix(pokemon), abilityName, - battlerTagName: (args[0] as BattlerTag).getDescriptor() + battlerTagName: this.battlerTag.getDescriptor() }); } } @@ -4837,7 +4839,7 @@ export function initAbilities() { .attr(MoveTypeChangeAttr, Type.ICE, 1.2, (user, target, move) => move.type === Type.NORMAL), new Ability(Abilities.SWEET_VEIL, 6) .attr(UserFieldStatusEffectImmunityAbAttr, StatusEffect.SLEEP) - .attr(BattlerTagImmunityAbAttr, BattlerTagType.DROWSY) + .attr(UserFieldBattlerTagImmunityAbAttr, BattlerTagType.DROWSY) .ignorable() .partial(), // Mold Breaker ally should not be affected by Sweet Veil new Ability(Abilities.STANCE_CHANGE, 6)