[Bug] Struggle Recoil should ignore Magic Guard (#3017)

* Drafted testable conditions for Magic Guard

* Weather Test

* Update src/test/abilities/magic_guard.test.ts

InnerThunder

Co-authored-by: innerthunder <168692175+innerthunder@users.noreply.github.com>

* Implemented checks for poison/toxic/burn

* Added tests for recoil moves and volatile status

* Updated Rock Head, Magic Guard, and Reckless interactions with Struggle

* Removed stray file

* Fixed Typedoc errors

* Implemented innerthunder's feedback

---------

Co-authored-by: Frutescens <info@laptop>
Co-authored-by: innerthunder <168692175+innerthunder@users.noreply.github.com>
This commit is contained in:
Mumble 2024-07-13 21:27:42 -07:00 committed by GitHub
parent 1be11d2b3a
commit eedabbf17c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1085,6 +1085,7 @@ export class RecoilAttr extends MoveEffectAttr {
const cancelled = new Utils.BooleanHolder(false);
if (!this.unblockable) {
applyAbAttrs(BlockRecoilDamageAttr, user, cancelled);
applyAbAttrs(BlockNonDirectDamageAbAttr, user, cancelled);
}
if (cancelled.value) {
@ -1097,7 +1098,6 @@ export class RecoilAttr extends MoveEffectAttr {
return false;
}
applyAbAttrs(BlockNonDirectDamageAbAttr, user, cancelled);
if (cancelled.value) {
return false;
}