diff --git a/.gitpod.yml b/.gitpod.yml deleted file mode 100644 index b5c6c64..0000000 --- a/.gitpod.yml +++ /dev/null @@ -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 - - diff --git a/src/party_menu.c b/src/party_menu.c index 1cda748..aba4c06 100755 --- a/src/party_menu.c +++ b/src/party_menu.c @@ -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)