repeat meds

This commit is contained in:
Jess 2022-05-20 13:16:55 +00:00
parent 538733d798
commit 1885ee79dc
2 changed files with 13 additions and 11 deletions

View File

@ -1,8 +0,0 @@
# This configuration file was automatically generated by Gitpod.
# Please adjust to your needs (see https://www.gitpod.io/docs/config-gitpod-file)
# and commit this file to your remote git repository to share the goodness with others.
tasks:
- init: sh makerom

View File

@ -4345,7 +4345,11 @@ void ItemUseCB_Medicine(u8 taskId, TaskFunc task)
PlaySE(SE_SELECT);
DisplayPartyMenuMessage(gText_WontHaveEffect, TRUE);
ScheduleBgCopyTilemapToVram(2);
gTasks[taskId].func = task;
if (gPartyMenu.menuType == PARTY_MENU_TYPE_FIELD)
gTasks[taskId].func = Task_ReturnToChooseMonAfterText;
else
gTasks[taskId].func = task;
return;
}
else
{
@ -4377,7 +4381,10 @@ void ItemUseCB_Medicine(u8 taskId, TaskFunc task)
GetMedicineItemEffectMessage(item);
DisplayPartyMenuMessage(gStringVar4, TRUE);
ScheduleBgCopyTilemapToVram(2);
gTasks[taskId].func = task;
if (gPartyMenu.menuType == PARTY_MENU_TYPE_FIELD && CheckBagHasItem(item, 1))
gTasks[taskId].func = Task_ReturnToChooseMonAfterText;
else
gTasks[taskId].func = task;
}
}
}
@ -4389,7 +4396,10 @@ static void Task_DisplayHPRestoredMessage(u8 taskId)
DisplayPartyMenuMessage(gStringVar4, FALSE);
ScheduleBgCopyTilemapToVram(2);
HandleBattleLowHpMusicChange();
gTasks[taskId].func = Task_ClosePartyMenuAfterText;
if (gPartyMenu.menuType == PARTY_MENU_TYPE_FIELD && CheckBagHasItem(gSpecialVar_ItemId, 1))
gTasks[taskId].func = Task_ReturnToChooseMonAfterText;
else
gTasks[taskId].func = Task_ClosePartyMenuAfterText;
}
static void Task_ClosePartyMenuAfterText(u8 taskId)