summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Repeated-Field-Medicine-Use.md14
1 files changed, 13 insertions, 1 deletions
diff --git a/Repeated-Field-Medicine-Use.md b/Repeated-Field-Medicine-Use.md
index 4ea0931..4bf3c32 100644
--- a/Repeated-Field-Medicine-Use.md
+++ b/Repeated-Field-Medicine-Use.md
@@ -126,11 +126,23 @@ static void PartyMenuTryEvolution(u8 taskId)
}
}
```
-And add the function, `CB2_ReturnToPartyMenuUsingRareCandy`, somewhere in the file:
+Then add the function, `CB2_ReturnToPartyMenuUsingRareCandy`, somewhere in the file:
```c
static void CB2_ReturnToPartyMenuUsingRareCandy(void)
{
gItemUseCB = ItemUseCB_RareCandy;
SetMainCallback2(CB2_ShowPartyMenuForItemUse);
}
+```
+This last section is for letting the player keep using Rare Candies after learning a new move. (*credit to Alex N*)
+
+Look for `CB2_ReturnToPartyMenuWhileLearningMove` and replace it with the following:
+```c
+static void CB2_ReturnToPartyMenuWhileLearningMove(void)
+{
+ if (gSpecialVar_ItemId == ITEM_RARE_CANDY && gPartyMenu.menuType == PARTY_MENU_TYPE_FIELD && CheckBagHasItem(gSpecialVar_ItemId, 1))
+ InitPartyMenu(PARTY_MENU_TYPE_FIELD, PARTY_LAYOUT_SINGLE, PARTY_ACTION_USE_ITEM, TRUE, PARTY_MSG_NONE, Task_ReturnToPartyMenuWhileLearningMove, gPartyMenu.exitCallback);
+ else
+ InitPartyMenu(PARTY_MENU_TYPE_FIELD, PARTY_LAYOUT_SINGLE, PARTY_ACTION_CHOOSE_MON, TRUE, PARTY_MSG_NONE, Task_ReturnToPartyMenuWhileLearningMove, gPartyMenu.exitCallback);
+}
``` \ No newline at end of file