mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2024-11-26 16:56:11 +00:00
add missing changes to sweet veil(#3265)
This commit is contained in:
parent
495284ad47
commit
59a4546a3f
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user