Fix regression in flower veil

This commit is contained in:
Sirz Benjie 2025-06-17 13:47:16 -05:00
parent c6af4acae3
commit 1fb7eb6891
No known key found for this signature in database
GPG Key ID: 38AC42D68CF5E138

View File

@ -3834,11 +3834,9 @@ export class ConditionalUserFieldBattlerTagImmunityAbAttr extends UserFieldBattl
override canApply(params: UserFieldBattlerTagImmunityAbAttrParams): boolean {
// the `!!params` here is to ensure the target is not null or undefined. This is defensive programming
// to guard against the case where
return !!params.target && super.canApply(params) && this.condition(params.target ?? params.pokemon);
return super.canApply(params) && this.condition(params.target);
}
override apply(_params: UserFieldBattlerTagImmunityAbAttrParams) {}
constructor(condition: (target: Pokemon) => boolean, immuneTagTypes: BattlerTagType | BattlerTagType[]) {
super(immuneTagTypes);