mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-06-21 17:12:44 +02:00
Fix regression in flower veil
This commit is contained in:
parent
250fae9f2f
commit
3252cfb7a5
@ -3834,11 +3834,9 @@ export class ConditionalUserFieldBattlerTagImmunityAbAttr extends UserFieldBattl
|
|||||||
override canApply(params: UserFieldBattlerTagImmunityAbAttrParams): boolean {
|
override canApply(params: UserFieldBattlerTagImmunityAbAttrParams): boolean {
|
||||||
// the `!!params` here is to ensure the target is not null or undefined. This is defensive programming
|
// the `!!params` here is to ensure the target is not null or undefined. This is defensive programming
|
||||||
// to guard against the case where
|
// 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[]) {
|
constructor(condition: (target: Pokemon) => boolean, immuneTagTypes: BattlerTagType | BattlerTagType[]) {
|
||||||
super(immuneTagTypes);
|
super(immuneTagTypes);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user