diff options
author | ghoulslash <41651341+ghoulslash@users.noreply.github.com> | 2020-09-09 13:33:55 -0600 |
---|---|---|
committer | ghoulslash <41651341+ghoulslash@users.noreply.github.com> | 2020-09-09 13:33:55 -0600 |
commit | 7a2b40eada5a03cd2bf817f34605d8bdb5158ebe (patch) | |
tree | 5dce725a19c7aca1c7b6d40d9f670f415f0442b8 | |
parent | 1af051b2732c83501affe31ff9387a2a12c310d9 (diff) |
Updated Repeated Field Medicine Use (markdown)
-rw-r--r-- | Repeated-Field-Medicine-Use.md | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/Repeated-Field-Medicine-Use.md b/Repeated-Field-Medicine-Use.md index f9cb188..db56533 100644 --- a/Repeated-Field-Medicine-Use.md +++ b/Repeated-Field-Medicine-Use.md @@ -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; |