Updated Ability Patch for Gen 9 functionality (#2989)
This commit is contained in:
parent
f6f0e5fa33
commit
2420134e45
1 changed files with 4 additions and 2 deletions
|
@ -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,6 +4733,9 @@ void ItemUseCB_AbilityPatch(u8 taskId, TaskFunc task)
|
|||
tState = 0;
|
||||
tMonId = gPartyMenu.slotId;
|
||||
tSpecies = GetMonData(&gPlayerParty[tMonId], MON_DATA_SPECIES, NULL);
|
||||
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;
|
||||
|
|
Loading…
Reference in a new issue