summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEduardo Quezada D'Ottone <eduardo602002@gmail.com>2022-02-18 00:54:50 -0300
committerEduardo Quezada D'Ottone <eduardo602002@gmail.com>2022-02-18 00:54:50 -0300
commit6d250feff7e654e695bbb470180ece29f1a0a5c0 (patch)
tree6d3713db9f3f35d87b2b0f19e538e76795b39361
parent3a7b49e843f0b6a586ca3d94a6cd5753dd70a849 (diff)
Fix for using rare candies after going into the move learn screen.
-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