[Bug] Fixes Unseen Fist ignoring abilities (#3708)

* Inserts break to prevent fall through in checkFlag

* Adds break to IGNORE_PROTECT case for safety

* Revert "Adds break to IGNORE_PROTECT case for safety"

This reverts commit 2589faf69e.

* Adds break to IGNORE_PROTECT properly
This commit is contained in:
schmidtc1 2024-08-27 16:06:21 -04:00 committed by GitHub
parent d6dbd25e91
commit d3dfd006f8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 0 deletions

View File

@ -601,11 +601,13 @@ export default class Move implements Localizable {
return true;
}
}
break;
case MoveFlags.IGNORE_PROTECT:
if (user.hasAbilityWithAttr(IgnoreProtectOnContactAbAttr) &&
this.checkFlag(MoveFlags.MAKES_CONTACT, user, target)) {
return true;
}
break;
}
return !!(this.flags & flag);