mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-11 02:42:19 +02:00
update apply for ignoretypeimmunityabattr
This commit is contained in:
parent
bb843492ba
commit
0ee76e3019
@ -2483,11 +2483,11 @@ export class IgnoreTypeImmunityAbAttr extends AbAttr {
|
|||||||
}
|
}
|
||||||
|
|
||||||
apply(pokemon: Pokemon, passive: boolean, cancelled: Utils.BooleanHolder, args: any[]): boolean {
|
apply(pokemon: Pokemon, passive: boolean, cancelled: Utils.BooleanHolder, args: any[]): boolean {
|
||||||
if (this.defenderType === (args[1] as Type)) {
|
if (this.defenderType === (args[1] as Type) && this.allowedMoveTypes.some(type => type === (args[0] as Type))) {
|
||||||
cancelled.value = this.allowedMoveTypes.some(type => type === (args[0] as Type));
|
cancelled.value = true;
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
return false;
|
||||||
return cancelled.value;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user