Updated Repeated Field Medicine Use (markdown)

ghoulslash 2020-09-09 13:33:55 -06:00
parent 1af051b273
commit 7a2b40eada
1 changed files with 16 additions and 3 deletions

@ -6,9 +6,20 @@ If you're using a lot of potions at once, it can be annoying to keep returning t
Let's start by opening [src/party_menu.c](../blob/master/src/party_menu.c)
### Handle Medicine
### 1.
Find the function `ItemUseCB_Medicine`. Towards the end of the function, replace
First, find the function `ItemUseCB_Medicine`. Inside the code block that starts with `if (ExecuteTableBasedItemEffect_(gPartyMenu.slotId, item, 0))`, replace `gTasks[taskId].func = task;` with:
```c
if (gPartyMenu.menuType == PARTY_MENU_TYPE_FIELD)
gTasks[taskId].func = Task_ReturnToChooseMonAfterText;
else
gTasks[taskId].func = task;
```
### 2.
Next, stay in the function `ItemUseCB_Medicine`. Towards the end of the function, replace
```c
.....
else
@ -38,7 +49,9 @@ with
}
```
Next, find `Task_DisplayHPRestoredMessage`. Replace `gTasks[taskId].func = Task_ClosePartyMenuAfterText;` with:
### 3.
Finally, find `Task_DisplayHPRestoredMessage`. Replace `gTasks[taskId].func = Task_ClosePartyMenuAfterText;` with:
```c
if (gPartyMenu.menuType == PARTY_MENU_TYPE_FIELD && CheckBagHasItem(gSpecialVar_ItemId, 1))
gTasks[taskId].func = Task_ReturnToChooseMonAfterText;