Merge pull request #1963 from ghoulslash/be/aifix

Fix AI protect struct reset
This commit is contained in:
Eduardo Quezada D'Ottone 2021-12-02 16:24:52 -03:00 committed by GitHub
commit 8058da5b88
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -212,7 +212,7 @@ u8 BattleAI_ChooseMoveOrAction(void)
// Clear protect structures, some flags may be set during AI calcs // Clear protect structures, some flags may be set during AI calcs
// e.g. pranksterElevated from GetMovePriority // e.g. pranksterElevated from GetMovePriority
memset(&gProtectStructs[gActiveBattler], 0, sizeof(struct ProtectStruct)); memset(&gProtectStructs, 0, MAX_BATTLERS_COUNT * sizeof(struct ProtectStruct));
gCurrentMove = savedCurrentMove; gCurrentMove = savedCurrentMove;
return ret; return ret;