From 2420134e4532d87f44768a919229fe908a685c63 Mon Sep 17 00:00:00 2001 From: Frank DeBlasio <35279583+fdeblasio@users.noreply.github.com> Date: Sun, 14 May 2023 19:30:30 -0400 Subject: [PATCH] Updated Ability Patch for Gen 9 functionality (#2989) --- src/party_menu.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/party_menu.c b/src/party_menu.c index aa37b1c691..27f4e0da42 100755 --- a/src/party_menu.c +++ b/src/party_menu.c @@ -4663,7 +4663,6 @@ void Task_AbilityPatch(u8 taskId) // Can't use. if (gSpeciesInfo[tSpecies].abilities[tAbilityNum] == 0 || !tSpecies - || GetMonData(&gPlayerParty[tMonId], MON_DATA_ABILITY_NUM, NULL) > 1 ) { gPartyMenuUseExitCallback = FALSE; @@ -4734,7 +4733,10 @@ void ItemUseCB_AbilityPatch(u8 taskId, TaskFunc task) tState = 0; tMonId = gPartyMenu.slotId; tSpecies = GetMonData(&gPlayerParty[tMonId], MON_DATA_SPECIES, NULL); - tAbilityNum = 2; + if (GetMonData(&gPlayerParty[tMonId], MON_DATA_ABILITY_NUM, NULL) == 2) + tAbilityNum = 0; + else + tAbilityNum = 2; SetWordTaskArg(taskId, tOldFunc, (uintptr_t)(gTasks[taskId].func)); gTasks[taskId].func = Task_AbilityPatch; }