-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Repeated Field Medicine Use
ghoulslash edited this page Sep 9, 2020
·
13 revisions
Credit: ghoulslash
If you're using a lot of potions at once, it can be annoying to keep returning to the bag after use. This simple fix keeps the menu open unless you run out of potions. The user will have to select Cancel
or press B
to exit the party menu. But this is intuitive.
Let's start by opening src/party_menu.c
Find the function ItemUseCB_Medicine
. Towards the end of the function, replace
.....
else
{
GetMonNickname(mon, gStringVar1);
GetMedicineItemEffectMessage(item);
DisplayPartyMenuMessage(gStringVar4, TRUE);
ScheduleBgCopyTilemapToVram(2);
gTasks[taskId].func = task;
}
with
.....
else
{
GetMonNickname(mon, gStringVar1);
GetMedicineItemEffectMessage(item);
DisplayPartyMenuMessage(gStringVar4, TRUE);
ScheduleBgCopyTilemapToVram(2);
if (gPartyMenu.menuType == PARTY_MENU_TYPE_FIELD && CheckBagHasItem(item, 1))
gTasks[taskId].func = Task_ReturnToChooseMonAfterText;
else
gTasks[taskId].func = task;
}
Next, find Task_DisplayHPRestoredMessage
. Replace gTasks[taskId].func = Task_ClosePartyMenuAfterText;
with:
if (gPartyMenu.menuType == PARTY_MENU_TYPE_FIELD && CheckBagHasItem(gSpecialVar_ItemId, 1))
gTasks[taskId].func = Task_ReturnToChooseMonAfterText;
else
gTasks[taskId].func = Task_ClosePartyMenuAfterText;