diff --git a/include/item.h b/include/item.h index e58348a78..1271e0d00 100644 --- a/include/item.h +++ b/include/item.h @@ -14,7 +14,7 @@ struct Item u8 holdEffectParam; const u8 *description; u8 importance; - u8 exitsBagOnUse; + u8 registrability; u8 pocket; u8 type; // unused for balls ItemUseFunc fieldUseFunc; @@ -69,7 +69,7 @@ ItemUseFunc ItemId_GetFieldFunc(u16 itemId); u8 ItemId_GetBattleUsage(u16 itemId); ItemUseFunc ItemId_GetBattleFunc(u16 itemId); u8 ItemId_GetSecondaryId(u16 itemId); -u16 itemid_get_market_price(u16 itemId); +u16 ItemId_GetPrice(u16 itemId); void ClearBag(void); void ClearPCItemSlots(void); void TrySetObtainedItemQuestLogEvent(u16 itemId); @@ -79,7 +79,7 @@ void SortPocketAndPlaceHMsFirst(struct BagPocket * pocket); u16 BagGetItemIdByPocketPosition(u8 pocketId, u16 itemId); u16 BagGetQuantityByPocketPosition(u8 pocketId, u16 itemId); u16 BagGetQuantityByItemId(u16 item); -bool8 itemid_is_unique(u16 itemId); +u8 ItemId_GetImportance(u16 itemId); void BagPocketCompaction(struct ItemSlot * slots, u8 capacity); u16 GetPcItemQuantity(u16 *); void SetBagPocketsPointers(void); diff --git a/include/strings.h b/include/strings.h index 222ed935d..c6df3df91 100644 --- a/include/strings.h +++ b/include/strings.h @@ -103,8 +103,8 @@ extern const u8 gText_ItemCantBeHeld[]; extern const u8 gText_TMCase[]; extern const u8 gText_Close[]; extern const u8 gText_TMCaseWillBePutAway[]; -extern const u8 gText_FontSize0[]; -extern const u8 gText_FontSize2[]; +extern const u8 gText_Font0[]; +extern const u8 gText_Font2[]; extern const u8 gText_OhNoICantBuyThat[]; extern const u8 gText_HowManyWouldYouLikeToSell[]; extern const u8 gText_ICanPayThisMuch_WouldThatBeOkay[]; diff --git a/include/tm_case.h b/include/tm_case.h index 22fb021e0..b940596f2 100644 --- a/include/tm_case.h +++ b/include/tm_case.h @@ -1,17 +1,21 @@ #ifndef GUARD_TM_CASE_H #define GUARD_TM_CASE_H -enum TmCaseType -{ - TMCASE_FROMFIELD, - TMCASE_FROMPARTYGIVE, - TMCASE_FROMMARTSELL, - TMCASE_FROMPOKEMONSTORAGEPC, - TMCASE_FROMBATTLE, - TMCASE_NA +// Values for 'type' argument to InitTMCase +enum { + TMCASE_FIELD, + TMCASE_GIVE_PARTY, + TMCASE_SELL, + TMCASE_GIVE_PC, + TMCASE_POKEDUDE, + TMCASE_REOPENING, }; -void InitTMCase(u8 a0, void (* a1)(void), u8 a2); +// Alternative value for 'allowSelectClose' argument to InitTMCase. +// Indicates that the previous value should be preserved +#define TMCASE_KEEP_PREV 0xFF + +void InitTMCase(u8 type, void (* exitCallback)(void), bool8 allowSelectClose); void ResetTMCaseCursorPos(void); void Pokedude_InitTMCase(void); diff --git a/src/berry_pouch.c b/src/berry_pouch.c index b18e0cd4a..2baf367de 100644 --- a/src/berry_pouch.c +++ b/src/berry_pouch.c @@ -684,13 +684,13 @@ static void SetUpListMenuTemplate(void) static void GetBerryNameAndIndexForMenu(u8 * dest, u16 itemId) { - StringCopy(gStringVar4, gText_FontSize0); + StringCopy(gStringVar4, gText_Font0); StringAppend(gStringVar4, gText_NumberClear01); ConvertIntToDecimalStringN(gStringVar1, itemId - FIRST_BERRY_INDEX + 1, STR_CONV_MODE_LEADING_ZEROS, 2); StringAppend(gStringVar4, gStringVar1); CopyItemName(itemId, gStringVar1); StringAppend(gStringVar4, sText_Space); - StringAppend(gStringVar4, gText_FontSize2); + StringAppend(gStringVar4, gText_Font2); StringAppend(gStringVar4, gStringVar1); StringCopy(dest, gStringVar4); } @@ -1265,7 +1265,7 @@ static void Task_ContextMenu_FromPokemonPC(u8 taskId) static void Task_ContextMenu_Sell(u8 taskId) { s16 * data = gTasks[taskId].data; - if (itemid_get_market_price(gSpecialVar_ItemId) == 0) + if (ItemId_GetPrice(gSpecialVar_ItemId) == 0) { CopyItemName(gSpecialVar_ItemId, gStringVar1); StringExpandPlaceholders(gStringVar4, gText_OhNoICantBuyThat); @@ -1293,7 +1293,7 @@ static void Task_ContextMenu_Sell(u8 taskId) static void Task_AskSellMultiple(u8 taskId) { s16 * data = gTasks[taskId].data; - ConvertIntToDecimalStringN(gStringVar3, itemid_get_market_price(BagGetItemIdByPocketPosition(POCKET_BERRY_POUCH, data[1])) / 2 * data[8], STR_CONV_MODE_LEFT_ALIGN, 6); + ConvertIntToDecimalStringN(gStringVar3, ItemId_GetPrice(BagGetItemIdByPocketPosition(POCKET_BERRY_POUCH, data[1])) / 2 * data[8], STR_CONV_MODE_LEFT_ALIGN, 6); StringExpandPlaceholders(gStringVar4, gText_ICanPayThisMuch_WouldThatBeOkay); DisplayItemMessageInBerryPouch(taskId, GetDialogBoxFontId(), gStringVar4, Task_SellMultiple_CreateYesNoMenu); } @@ -1323,7 +1323,7 @@ static void Task_Sell_PrintSelectMultipleUI(u8 taskId) ConvertIntToDecimalStringN(gStringVar1, 1, STR_CONV_MODE_LEADING_ZEROS, 2); StringExpandPlaceholders(gStringVar4, gText_TimesStrVar1); BerryPouchPrint(windowId, FONT_0, gStringVar4, 4, 10, 1, 0, 0xFF, 1); - SellMultiple_UpdateSellPriceDisplay(itemid_get_market_price(BagGetItemIdByPocketPosition(POCKET_BERRY_POUCH, data[1])) / 2 * data[8]); + SellMultiple_UpdateSellPriceDisplay(ItemId_GetPrice(BagGetItemIdByPocketPosition(POCKET_BERRY_POUCH, data[1])) / 2 * data[8]); PrintMoneyInWin2(); CreateScrollIndicatorArrows_SellQuantity(); gTasks[taskId].func = Task_Sell_SelectMultiple; @@ -1340,7 +1340,7 @@ static void Task_Sell_SelectMultiple(u8 taskId) if (AdjustQuantityAccordingToDPadInput(&data[8], data[2]) == TRUE) { PrintxQuantityOnWindow(1, data[8], 2); - SellMultiple_UpdateSellPriceDisplay(itemid_get_market_price(BagGetItemIdByPocketPosition(POCKET_BERRY_POUCH, data[1])) / 2 * data[8]); + SellMultiple_UpdateSellPriceDisplay(ItemId_GetPrice(BagGetItemIdByPocketPosition(POCKET_BERRY_POUCH, data[1])) / 2 * data[8]); } else if (JOY_NEW(A_BUTTON)) { @@ -1373,7 +1373,7 @@ static void Task_SellYes(u8 taskId) PutWindowTilemap(0); ScheduleBgCopyTilemapToVram(0); CopyItemName(gSpecialVar_ItemId, gStringVar1); - ConvertIntToDecimalStringN(gStringVar3, itemid_get_market_price(BagGetItemIdByPocketPosition(POCKET_BERRY_POUCH, data[1])) / 2 * data[8], STR_CONV_MODE_LEFT_ALIGN, 6); + ConvertIntToDecimalStringN(gStringVar3, ItemId_GetPrice(BagGetItemIdByPocketPosition(POCKET_BERRY_POUCH, data[1])) / 2 * data[8], STR_CONV_MODE_LEFT_ALIGN, 6); StringExpandPlaceholders(gStringVar4, gText_TurnedOverItemsWorthYen); DisplayItemMessageInBerryPouch(taskId, FONT_2, gStringVar4, Task_SellBerries_PlaySfxAndRemoveBerries); } @@ -1383,7 +1383,7 @@ static void Task_SellBerries_PlaySfxAndRemoveBerries(u8 taskId) s16 * data = gTasks[taskId].data; PlaySE(SE_SHOP); RemoveBagItem(gSpecialVar_ItemId, data[8]); - AddMoney(&gSaveBlock1Ptr->money, itemid_get_market_price(gSpecialVar_ItemId) / 2 * data[8]); + AddMoney(&gSaveBlock1Ptr->money, ItemId_GetPrice(gSpecialVar_ItemId) / 2 * data[8]); RecordItemPurchase(gSpecialVar_ItemId, data[8], 2); DestroyListMenuTask(data[0], &sStaticCnt.listMenuScrollOffset, &sStaticCnt.listMenuSelectedRow); SortAndCountBerries(); diff --git a/src/data/items.json b/src/data/items.json index 9527febe7..25c9056ff 100644 --- a/src/data/items.json +++ b/src/data/items.json @@ -8,7 +8,7 @@ "holdEffectParam": 0, "description_english": "?????", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -24,7 +24,7 @@ "holdEffectParam": 0, "description_english": "The best BALL with the ultimate\\nperformance. It will catch any wild\\nPOKéMON without fail.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_POKE_BALLS", "type": 0, "fieldUseFunc": "NULL", @@ -40,7 +40,7 @@ "holdEffectParam": 0, "description_english": "A very high-grade BALL that offers\\na higher POKéMON catch rate than\\na GREAT BALL.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_POKE_BALLS", "type": 1, "fieldUseFunc": "NULL", @@ -56,7 +56,7 @@ "holdEffectParam": 0, "description_english": "A good, quality BALL that offers\\na higher POKéMON catch rate than\\na standard POKé BALL.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_POKE_BALLS", "type": 2, "fieldUseFunc": "NULL", @@ -72,7 +72,7 @@ "holdEffectParam": 0, "description_english": "A BALL thrown to catch a wild\\nPOKéMON. It is designed in a\\ncapsule style.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_POKE_BALLS", "type": 3, "fieldUseFunc": "NULL", @@ -88,7 +88,7 @@ "holdEffectParam": 0, "description_english": "A special BALL that is used only in\\nthe SAFARI ZONE. It is finished in\\na camouflage pattern.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_POKE_BALLS", "type": 4, "fieldUseFunc": "NULL", @@ -104,7 +104,7 @@ "holdEffectParam": 0, "description_english": "A somewhat different BALL that\\nworks especially well on WATER- and\\nBUG-type POKéMON.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_POKE_BALLS", "type": 5, "fieldUseFunc": "NULL", @@ -120,7 +120,7 @@ "holdEffectParam": 0, "description_english": "A somewhat different BALL that\\nworks especially well on POKéMON\\ndeep in the sea.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_POKE_BALLS", "type": 6, "fieldUseFunc": "NULL", @@ -136,7 +136,7 @@ "holdEffectParam": 0, "description_english": "A somewhat different BALL that\\nworks especially well on weaker\\nPOKéMON.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_POKE_BALLS", "type": 7, "fieldUseFunc": "NULL", @@ -152,7 +152,7 @@ "holdEffectParam": 0, "description_english": "A somewhat different BALL that\\nworks especially well on POKéMON\\ncaught before.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_POKE_BALLS", "type": 8, "fieldUseFunc": "NULL", @@ -168,7 +168,7 @@ "holdEffectParam": 0, "description_english": "A somewhat different BALL that\\nbecomes progressively better the\\nmore turns there are in a battle.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_POKE_BALLS", "type": 9, "fieldUseFunc": "NULL", @@ -184,7 +184,7 @@ "holdEffectParam": 0, "description_english": "A comfortable BALL that makes a\\ncaptured wild POKéMON quickly grow\\nfriendly.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_POKE_BALLS", "type": 10, "fieldUseFunc": "NULL", @@ -200,7 +200,7 @@ "holdEffectParam": 0, "description_english": "A rare BALL that has been\\nspecially made to commemorate an\\nevent of some sort.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_POKE_BALLS", "type": 11, "fieldUseFunc": "NULL", @@ -216,7 +216,7 @@ "holdEffectParam": 20, "description_english": "A spray-type wound medicine.\\nIt restores the HP of one POKéMON\\nby 20 points.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "FieldUseFunc_Medicine", @@ -232,7 +232,7 @@ "holdEffectParam": 0, "description_english": "A spray-type medicine.\\nIt heals one POKéMON from a\\npoisoning.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "FieldUseFunc_Medicine", @@ -248,7 +248,7 @@ "holdEffectParam": 0, "description_english": "A spray-type medicine.\\nIt heals one POKéMON of a burn.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "FieldUseFunc_Medicine", @@ -264,7 +264,7 @@ "holdEffectParam": 0, "description_english": "A spray-type medicine.\\nIt defrosts a frozen POKéMON.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "FieldUseFunc_Medicine", @@ -280,7 +280,7 @@ "holdEffectParam": 0, "description_english": "A spray-type medicine.\\nIt awakens a sleeping POKéMON.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "FieldUseFunc_Medicine", @@ -296,7 +296,7 @@ "holdEffectParam": 0, "description_english": "A spray-type medicine.\\nIt heals one POKéMON from\\nparalysis.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "FieldUseFunc_Medicine", @@ -312,7 +312,7 @@ "holdEffectParam": 255, "description_english": "A medicine that fully restores the\\nHP and heals any status problems\\nof one POKéMON.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "FieldUseFunc_Medicine", @@ -328,7 +328,7 @@ "holdEffectParam": 255, "description_english": "A spray-type wound medicine.\\nIt fully restores the HP of one\\nPOKéMON.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "FieldUseFunc_Medicine", @@ -344,7 +344,7 @@ "holdEffectParam": 200, "description_english": "A spray-type wound medicine.\\nIt restores the HP of one POKéMON\\nby 200 points.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "FieldUseFunc_Medicine", @@ -360,7 +360,7 @@ "holdEffectParam": 50, "description_english": "A spray-type wound medicine.\\nIt restores the HP of one POKéMON\\nby 50 points.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "FieldUseFunc_Medicine", @@ -376,7 +376,7 @@ "holdEffectParam": 0, "description_english": "A spray-type medicine.\\nIt heals all the status problems of\\none POKéMON.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "FieldUseFunc_Medicine", @@ -392,7 +392,7 @@ "holdEffectParam": 0, "description_english": "A medicine that revives a fainted\\nPOKéMON, restoring HP by half the\\nmaximum amount.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "FieldUseFunc_Medicine", @@ -408,7 +408,7 @@ "holdEffectParam": 0, "description_english": "A medicine that revives a fainted\\nPOKéMON, restoring HP fully.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "FieldUseFunc_Medicine", @@ -424,7 +424,7 @@ "holdEffectParam": 50, "description_english": "Water with a high mineral content.\\nIt restores the HP of one POKéMON\\nby 50 points.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "FieldUseFunc_Medicine", @@ -440,7 +440,7 @@ "holdEffectParam": 60, "description_english": "A fizzy soda drink.\\nIt restores the HP of one POKéMON\\nby 60 points.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "FieldUseFunc_Medicine", @@ -456,7 +456,7 @@ "holdEffectParam": 80, "description_english": "A very sweet drink.\\nIt restores the HP of one POKéMON\\nby 80 points.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "FieldUseFunc_Medicine", @@ -472,7 +472,7 @@ "holdEffectParam": 100, "description_english": "Highly nutritious milk.\\nIt restores the HP of one POKéMON\\nby 100 points.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "FieldUseFunc_Medicine", @@ -488,7 +488,7 @@ "holdEffectParam": 0, "description_english": "A very bitter medicine powder.\\nIt restores the HP of one POKéMON\\nby 50 points.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "FieldUseFunc_Medicine", @@ -504,7 +504,7 @@ "holdEffectParam": 0, "description_english": "A very bitter root.\\nIt restores the HP of one POKéMON\\nby 200 points.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "FieldUseFunc_Medicine", @@ -520,7 +520,7 @@ "holdEffectParam": 0, "description_english": "A very bitter medicine powder.\\nIt heals all the status problems of\\none POKéMON.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "FieldUseFunc_Medicine", @@ -536,7 +536,7 @@ "holdEffectParam": 0, "description_english": "A very bitter medicinal herb.\\nIt revives a fainted POKéMON,\\nrestoring HP fully.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "FieldUseFunc_Medicine", @@ -552,7 +552,7 @@ "holdEffectParam": 10, "description_english": "Restores a selected move's PP by\\n10 points for one POKéMON.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "FieldUseFunc_Ether", @@ -568,7 +568,7 @@ "holdEffectParam": 255, "description_english": "Fully restores a selected move's PP\\nfor one POKéMON.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "FieldUseFunc_Ether", @@ -584,7 +584,7 @@ "holdEffectParam": 10, "description_english": "Restores the PP of all moves for\\none POKéMON by 10 points each.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "FieldUseFunc_Ether", @@ -600,7 +600,7 @@ "holdEffectParam": 255, "description_english": "Fully restores the PP of all moves\\nfor one POKéMON.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "FieldUseFunc_Ether", @@ -616,7 +616,7 @@ "holdEffectParam": 0, "description_english": "LAVARIDGE TOWN's local specialty.\\nIt heals all the status problems of\\none POKéMON.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "FieldUseFunc_Medicine", @@ -632,7 +632,7 @@ "holdEffectParam": 0, "description_english": "A blue glass flute that awakens\\na sleeping POKéMON.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "FieldUseFunc_Medicine", @@ -648,7 +648,7 @@ "holdEffectParam": 0, "description_english": "A yellow glass flute that snaps one\\nPOKéMON out of confusion.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -664,7 +664,7 @@ "holdEffectParam": 0, "description_english": "A red glass flute that snaps one\\nPOKéMON out of infatuation.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -680,7 +680,7 @@ "holdEffectParam": 50, "description_english": "A black glass flute.\\nWhen blown, it makes wild POKéMON\\nless likely to appear.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "FieldUseFunc_BlackWhiteFlute", @@ -696,7 +696,7 @@ "holdEffectParam": 150, "description_english": "A white glass flute.\\nWhen blown, it makes wild POKéMON\\nmore likely to appear.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "FieldUseFunc_BlackWhiteFlute", @@ -712,7 +712,7 @@ "holdEffectParam": 20, "description_english": "A 100% pure juice.\\nIt restores the HP of one POKéMON\\nby 20 points.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "FieldUseFunc_Medicine", @@ -728,7 +728,7 @@ "holdEffectParam": 0, "description_english": "Revives all fainted POKéMON,\\nrestoring HP fully.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "FieldUseFunc_SacredAsh", @@ -744,7 +744,7 @@ "holdEffectParam": 0, "description_english": "Pure salt obtained from deep inside\\nthe SHOAL CAVE. It is extremely\\nsalty.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -760,7 +760,7 @@ "holdEffectParam": 0, "description_english": "A pretty seashell found deep inside\\nthe SHOAL CAVE. It is striped in\\nblue and white.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -776,7 +776,7 @@ "holdEffectParam": 0, "description_english": "A small red shard.\\nIt appears to be from some sort of\\na tool made long ago.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -792,7 +792,7 @@ "holdEffectParam": 0, "description_english": "A small blue shard.\\nIt appears to be from some sort of\\na tool made long ago.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -808,7 +808,7 @@ "holdEffectParam": 0, "description_english": "A small yellow shard.\\nIt appears to be from some sort of\\na tool made long ago.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -824,7 +824,7 @@ "holdEffectParam": 0, "description_english": "A small green shard.\\nIt appears to be from some sort of\\na tool made long ago.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -840,7 +840,7 @@ "holdEffectParam": 0, "description_english": "?????", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -856,7 +856,7 @@ "holdEffectParam": 0, "description_english": "?????", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -872,7 +872,7 @@ "holdEffectParam": 0, "description_english": "?????", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -888,7 +888,7 @@ "holdEffectParam": 0, "description_english": "?????", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -904,7 +904,7 @@ "holdEffectParam": 0, "description_english": "?????", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -920,7 +920,7 @@ "holdEffectParam": 0, "description_english": "?????", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -936,7 +936,7 @@ "holdEffectParam": 0, "description_english": "?????", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -952,7 +952,7 @@ "holdEffectParam": 0, "description_english": "?????", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -968,7 +968,7 @@ "holdEffectParam": 0, "description_english": "?????", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -984,7 +984,7 @@ "holdEffectParam": 0, "description_english": "?????", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -1000,7 +1000,7 @@ "holdEffectParam": 0, "description_english": "?????", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -1016,7 +1016,7 @@ "holdEffectParam": 0, "description_english": "A nutritious drink for POKéMON.\\nIt raises the base HP of one\\nPOKéMON.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "FieldUseFunc_Medicine", @@ -1032,7 +1032,7 @@ "holdEffectParam": 0, "description_english": "A nutritious drink for POKéMON.\\nIt raises the base ATTACK stat of\\none POKéMON.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "FieldUseFunc_Medicine", @@ -1048,7 +1048,7 @@ "holdEffectParam": 0, "description_english": "A nutritious drink for POKéMON.\\nIt raises the base DEFENSE stat of\\none POKéMON.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "FieldUseFunc_Medicine", @@ -1064,7 +1064,7 @@ "holdEffectParam": 0, "description_english": "A nutritious drink for POKéMON.\\nIt raises the base SPEED stat of\\none POKéMON.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "FieldUseFunc_Medicine", @@ -1080,7 +1080,7 @@ "holdEffectParam": 0, "description_english": "A nutritious drink for POKéMON.\\nIt raises the base SP. ATK stat\\nof one POKéMON.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "FieldUseFunc_Medicine", @@ -1096,7 +1096,7 @@ "holdEffectParam": 0, "description_english": "A candy that is packed with energy.\\nIt raises the level of a POKéMON\\nby one.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "FieldUseFunc_RareCandy", @@ -1112,7 +1112,7 @@ "holdEffectParam": 0, "description_english": "Slightly raises the maximum PP of\\na selected move for one POKéMON.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "FieldUseFunc_PpUp", @@ -1128,7 +1128,7 @@ "holdEffectParam": 0, "description_english": "A nutritious drink for POKéMON.\\nIt raises the base SP. DEF stat\\nof one POKéMON.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "FieldUseFunc_Medicine", @@ -1144,7 +1144,7 @@ "holdEffectParam": 0, "description_english": "Raises the PP of a selected move\\nto its maximum level for one\\nPOKéMON.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "FieldUseFunc_PpUp", @@ -1160,7 +1160,7 @@ "holdEffectParam": 0, "description_english": "?????", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -1176,7 +1176,7 @@ "holdEffectParam": 0, "description_english": "An item that prevents stat reduction\\namong party POKéMON for five turns\\nafter use.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -1192,7 +1192,7 @@ "holdEffectParam": 0, "description_english": "Raises the critical-hit ratio of\\nPOKéMON in battle. Wears off if the\\nPOKéMON is withdrawn.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -1208,7 +1208,7 @@ "holdEffectParam": 0, "description_english": "Raises the ATTACK stat of POKéMON\\nin battle. Wears off if the POKéMON\\nis withdrawn.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -1224,7 +1224,7 @@ "holdEffectParam": 0, "description_english": "Raises the DEFENSE stat of POKéMON\\nin battle. Wears off if the POKéMON\\nis withdrawn.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -1240,7 +1240,7 @@ "holdEffectParam": 0, "description_english": "Raises the SPEED stat of POKéMON\\nin battle. Wears off if the POKéMON\\nis withdrawn.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -1256,7 +1256,7 @@ "holdEffectParam": 0, "description_english": "Raises the accuracy stat of\\nPOKéMON in battle. Wears off if the\\nPOKéMON is withdrawn.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -1272,7 +1272,7 @@ "holdEffectParam": 0, "description_english": "Raises the SP. ATK stat of\\nPOKéMON in battle. Wears off if the\\nPOKéMON is withdrawn.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -1288,7 +1288,7 @@ "holdEffectParam": 0, "description_english": "An attractive doll.\\nUse it to flee from any battle with\\na wild POKéMON.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -1304,7 +1304,7 @@ "holdEffectParam": 0, "description_english": "An attractive item.\\nUse it to flee from any battle with\\na wild POKéMON.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -1320,7 +1320,7 @@ "holdEffectParam": 0, "description_english": "?????", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -1336,7 +1336,7 @@ "holdEffectParam": 200, "description_english": "Prevents weak wild POKéMON from\\nappearing for 200 steps.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_Repel", @@ -1352,7 +1352,7 @@ "holdEffectParam": 250, "description_english": "Prevents weak wild POKéMON from\\nappearing for 250 steps.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_Repel", @@ -1368,7 +1368,7 @@ "holdEffectParam": 0, "description_english": "A long, durable rope.\\nUse it to escape instantly from a\\ncave or a dungeon.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_FIELD", "fieldUseFunc": "ItemUseOutOfBattle_EscapeRope", @@ -1384,7 +1384,7 @@ "holdEffectParam": 100, "description_english": "Prevents weak wild POKéMON from\\nappearing for 100 steps.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_Repel", @@ -1400,7 +1400,7 @@ "holdEffectParam": 0, "description_english": "?????", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -1416,7 +1416,7 @@ "holdEffectParam": 0, "description_english": "?????", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -1432,7 +1432,7 @@ "holdEffectParam": 0, "description_english": "?????", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -1448,7 +1448,7 @@ "holdEffectParam": 0, "description_english": "?????", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -1464,7 +1464,7 @@ "holdEffectParam": 0, "description_english": "?????", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -1480,7 +1480,7 @@ "holdEffectParam": 0, "description_english": "?????", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -1496,7 +1496,7 @@ "holdEffectParam": 0, "description_english": "A peculiar stone that makes certain\\nspecies of POKéMON evolve.\\nIt is as red as the sun.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "FieldUseFunc_EvoItem", @@ -1512,7 +1512,7 @@ "holdEffectParam": 0, "description_english": "A peculiar stone that makes certain\\nspecies of POKéMON evolve.\\nIt is as black as the night sky.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "FieldUseFunc_EvoItem", @@ -1528,7 +1528,7 @@ "holdEffectParam": 0, "description_english": "A peculiar stone that makes certain\\nspecies of POKéMON evolve.\\nIt is colored orange.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "FieldUseFunc_EvoItem", @@ -1544,7 +1544,7 @@ "holdEffectParam": 0, "description_english": "A peculiar stone that makes certain\\nspecies of POKéMON evolve.\\nIt has a thunderbolt pattern.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "FieldUseFunc_EvoItem", @@ -1560,7 +1560,7 @@ "holdEffectParam": 0, "description_english": "A peculiar stone that makes certain\\nspecies of POKéMON evolve.\\nIt is a clear light blue.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "FieldUseFunc_EvoItem", @@ -1576,7 +1576,7 @@ "holdEffectParam": 0, "description_english": "A peculiar stone that makes certain\\nspecies of POKéMON evolve.\\nIt has a leaf pattern.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "FieldUseFunc_EvoItem", @@ -1592,7 +1592,7 @@ "holdEffectParam": 0, "description_english": "?????", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -1608,7 +1608,7 @@ "holdEffectParam": 0, "description_english": "?????", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -1624,7 +1624,7 @@ "holdEffectParam": 0, "description_english": "?????", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -1640,7 +1640,7 @@ "holdEffectParam": 0, "description_english": "?????", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -1656,7 +1656,7 @@ "holdEffectParam": 0, "description_english": "A small and rare mushroom.\\nIt is quite popular among certain\\npeople.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -1672,7 +1672,7 @@ "holdEffectParam": 0, "description_english": "A large and rare mushroom.\\nIt is very popular among certain\\npeople.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -1688,7 +1688,7 @@ "holdEffectParam": 0, "description_english": "?????", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -1704,7 +1704,7 @@ "holdEffectParam": 0, "description_english": "A relatively small pearl that\\nsparkles in a pretty silver color.\\nIt can be sold cheaply.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -1720,7 +1720,7 @@ "holdEffectParam": 0, "description_english": "A quite-large pearl that sparkles\\nin a pretty silver color.\\nIt can be sold at a high price.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -1736,7 +1736,7 @@ "holdEffectParam": 0, "description_english": "A pretty red sand with a loose,\\nsilky feel.\\nIt can be sold at a high price.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -1752,7 +1752,7 @@ "holdEffectParam": 0, "description_english": "A shard of a pretty gem that\\nsparkles in a red color.\\nIt can be sold at a high price.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -1768,7 +1768,7 @@ "holdEffectParam": 0, "description_english": "A nugget of pure gold that gives\\noff a lustrous gleam.\\nIt can be sold at a high price.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -1784,7 +1784,7 @@ "holdEffectParam": 0, "description_english": "A pretty, heart-shaped scale that\\nis extremely rare. It glows faintly\\nin the colors of a rainbow.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -1800,7 +1800,7 @@ "holdEffectParam": 0, "description_english": "?????", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -1816,7 +1816,7 @@ "holdEffectParam": 0, "description_english": "?????", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -1832,7 +1832,7 @@ "holdEffectParam": 0, "description_english": "?????", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -1848,7 +1848,7 @@ "holdEffectParam": 0, "description_english": "?????", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -1864,7 +1864,7 @@ "holdEffectParam": 0, "description_english": "?????", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -1880,7 +1880,7 @@ "holdEffectParam": 0, "description_english": "?????", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -1896,7 +1896,7 @@ "holdEffectParam": 0, "description_english": "?????", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -1912,7 +1912,7 @@ "holdEffectParam": 0, "description_english": "?????", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -1928,7 +1928,7 @@ "holdEffectParam": 0, "description_english": "?????", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -1944,7 +1944,7 @@ "holdEffectParam": 0, "description_english": "A piece of MAIL featuring a cute\\nZIGZAGOON print.\\nIt is to be held by a POKéMON.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_MAIL", "fieldUseFunc": "FieldUseFunc_Mail", @@ -1960,7 +1960,7 @@ "holdEffectParam": 0, "description_english": "A piece of MAIL featuring a cute\\nWINGULL print.\\nIt is to be held by a POKéMON.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_MAIL", "fieldUseFunc": "FieldUseFunc_Mail", @@ -1976,7 +1976,7 @@ "holdEffectParam": 0, "description_english": "A piece of MAIL featuring a cute\\nPIKACHU print.\\nIt is to be held by a POKéMON.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_MAIL", "fieldUseFunc": "FieldUseFunc_Mail", @@ -1992,7 +1992,7 @@ "holdEffectParam": 0, "description_english": "A piece of MAIL featuring a cute\\nMAGNEMITE print.\\nIt is to be held by a POKéMON.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_MAIL", "fieldUseFunc": "FieldUseFunc_Mail", @@ -2008,7 +2008,7 @@ "holdEffectParam": 0, "description_english": "A piece of MAIL featuring a cute\\nSLAKOTH print.\\nIt is to be held by a POKéMON.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_MAIL", "fieldUseFunc": "FieldUseFunc_Mail", @@ -2024,7 +2024,7 @@ "holdEffectParam": 0, "description_english": "A piece of MAIL featuring a cute\\nWAILMER print.\\nIt is to be held by a POKéMON.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_MAIL", "fieldUseFunc": "FieldUseFunc_Mail", @@ -2040,7 +2040,7 @@ "holdEffectParam": 0, "description_english": "A piece of MAIL to be held by a\\nPOKéMON. It will bear the print of\\nthe POKéMON holding it.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_MAIL", "fieldUseFunc": "FieldUseFunc_Mail", @@ -2056,7 +2056,7 @@ "holdEffectParam": 0, "description_english": "A piece of MAIL featuring a cute\\nDUSKULL print.\\nIt is to be held by a POKéMON.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_MAIL", "fieldUseFunc": "FieldUseFunc_Mail", @@ -2072,7 +2072,7 @@ "holdEffectParam": 0, "description_english": "A piece of MAIL featuring a cute\\nBELLOSSOM print.\\nIt is to be held by a POKéMON.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_MAIL", "fieldUseFunc": "FieldUseFunc_Mail", @@ -2088,7 +2088,7 @@ "holdEffectParam": 0, "description_english": "A piece of MAIL to be held by a\\nPOKéMON. It will bear the print of\\nthe POKéMON holding it.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_MAIL", "fieldUseFunc": "FieldUseFunc_Mail", @@ -2104,7 +2104,7 @@ "holdEffectParam": 0, "description_english": "A piece of MAIL featuring a\\ngorgeous, extravagant print.\\nIt is to be held by a POKéMON.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_MAIL", "fieldUseFunc": "FieldUseFunc_Mail", @@ -2120,7 +2120,7 @@ "holdEffectParam": 0, "description_english": "A piece of MAIL featuring a print\\nof three cute POKéMON.\\nIt is to be held by a POKéMON.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_MAIL", "fieldUseFunc": "FieldUseFunc_Mail", @@ -2136,7 +2136,7 @@ "holdEffectParam": 0, "description_english": "When held by a POKéMON, it will be\\nused in battle to heal paralysis.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_BERRY_POUCH", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "FieldUseFunc_Medicine", @@ -2152,7 +2152,7 @@ "holdEffectParam": 0, "description_english": "When held by a POKéMON, it will be\\nused in battle to wake up.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_BERRY_POUCH", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "FieldUseFunc_Medicine", @@ -2168,7 +2168,7 @@ "holdEffectParam": 0, "description_english": "When held by a POKéMON, it will be\\nused in battle to cure poison.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_BERRY_POUCH", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "FieldUseFunc_Medicine", @@ -2184,7 +2184,7 @@ "holdEffectParam": 0, "description_english": "When held by a POKéMON, it will be\\nused in battle to heal a burn.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_BERRY_POUCH", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "FieldUseFunc_Medicine", @@ -2200,7 +2200,7 @@ "holdEffectParam": 0, "description_english": "When held by a POKéMON, it will be\\nused in battle for defrosting.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_BERRY_POUCH", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "FieldUseFunc_Medicine", @@ -2216,7 +2216,7 @@ "holdEffectParam": 10, "description_english": "When held by a POKéMON, it will be\\nused in battle to restore 10 PP.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_BERRY_POUCH", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "FieldUseFunc_Ether", @@ -2232,7 +2232,7 @@ "holdEffectParam": 10, "description_english": "When held by a POKéMON, it will be\\nused in battle to restore 10 HP.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_BERRY_POUCH", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "FieldUseFunc_Medicine", @@ -2248,7 +2248,7 @@ "holdEffectParam": 0, "description_english": "When held by a POKéMON, it will be\\nused in battle to lift confusion.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_BERRY_POUCH", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -2264,7 +2264,7 @@ "holdEffectParam": 0, "description_english": "When held by a POKéMON, it will be\\nused in battle to heal any problem.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_BERRY_POUCH", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "FieldUseFunc_Medicine", @@ -2280,7 +2280,7 @@ "holdEffectParam": 30, "description_english": "When held by a POKéMON, it will be\\nused in battle to restore 30 HP.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_BERRY_POUCH", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "FieldUseFunc_Medicine", @@ -2296,7 +2296,7 @@ "holdEffectParam": 8, "description_english": "A hold item that restores HP but\\nmay cause confusion when used.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_BERRY_POUCH", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -2312,7 +2312,7 @@ "holdEffectParam": 8, "description_english": "A hold item that restores HP but\\nmay cause confusion when used.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_BERRY_POUCH", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -2328,7 +2328,7 @@ "holdEffectParam": 8, "description_english": "A hold item that restores HP but\\nmay cause confusion when used.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_BERRY_POUCH", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -2344,7 +2344,7 @@ "holdEffectParam": 8, "description_english": "A hold item that restores HP but\\nmay cause confusion when used.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_BERRY_POUCH", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -2360,7 +2360,7 @@ "holdEffectParam": 8, "description_english": "A hold item that restores HP but\\nmay cause confusion when used.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_BERRY_POUCH", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -2376,7 +2376,7 @@ "holdEffectParam": 0, "description_english": "Can be ground up into a powder as\\nan ingredient for medicine.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_BERRY_POUCH", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -2392,7 +2392,7 @@ "holdEffectParam": 0, "description_english": "Can be ground up into a powder as\\nan ingredient for medicine.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_BERRY_POUCH", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -2408,7 +2408,7 @@ "holdEffectParam": 0, "description_english": "Can be ground up into a powder as\\nan ingredient for medicine.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_BERRY_POUCH", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -2424,7 +2424,7 @@ "holdEffectParam": 0, "description_english": "Can be ground up into a powder as\\nan ingredient for medicine.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_BERRY_POUCH", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -2440,7 +2440,7 @@ "holdEffectParam": 0, "description_english": "Can be ground up into a powder as\\nan ingredient for medicine.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_BERRY_POUCH", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -2456,7 +2456,7 @@ "holdEffectParam": 0, "description_english": "Can be ground up into a powder as\\nan ingredient for medicine.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_BERRY_POUCH", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -2472,7 +2472,7 @@ "holdEffectParam": 0, "description_english": "Can be ground up into a powder as\\nan ingredient for medicine.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_BERRY_POUCH", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -2488,7 +2488,7 @@ "holdEffectParam": 0, "description_english": "Can be ground up into a powder as\\nan ingredient for medicine.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_BERRY_POUCH", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -2504,7 +2504,7 @@ "holdEffectParam": 0, "description_english": "Can be ground up into a powder as\\nan ingredient for medicine.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_BERRY_POUCH", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -2520,7 +2520,7 @@ "holdEffectParam": 0, "description_english": "Can be ground up into a powder as\\nan ingredient for medicine.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_BERRY_POUCH", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -2536,7 +2536,7 @@ "holdEffectParam": 0, "description_english": "Can be ground up into a powder as\\nan ingredient for medicine.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_BERRY_POUCH", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -2552,7 +2552,7 @@ "holdEffectParam": 0, "description_english": "Can be ground up into a powder as\\nan ingredient for medicine.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_BERRY_POUCH", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -2568,7 +2568,7 @@ "holdEffectParam": 0, "description_english": "Can be ground up into a powder as\\nan ingredient for medicine.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_BERRY_POUCH", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -2584,7 +2584,7 @@ "holdEffectParam": 0, "description_english": "Can be ground up into a powder as\\nan ingredient for medicine.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_BERRY_POUCH", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -2600,7 +2600,7 @@ "holdEffectParam": 0, "description_english": "Can be ground up into a powder as\\nan ingredient for medicine.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_BERRY_POUCH", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -2616,7 +2616,7 @@ "holdEffectParam": 0, "description_english": "Can be ground up into a powder as\\nan ingredient for medicine.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_BERRY_POUCH", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -2632,7 +2632,7 @@ "holdEffectParam": 0, "description_english": "Can be ground up into a powder as\\nan ingredient for medicine.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_BERRY_POUCH", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -2648,7 +2648,7 @@ "holdEffectParam": 0, "description_english": "Can be ground up into a powder as\\nan ingredient for medicine.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_BERRY_POUCH", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -2664,7 +2664,7 @@ "holdEffectParam": 0, "description_english": "Can be ground up into a powder as\\nan ingredient for medicine.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_BERRY_POUCH", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -2680,7 +2680,7 @@ "holdEffectParam": 0, "description_english": "Can be ground up into a powder as\\nan ingredient for medicine.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_BERRY_POUCH", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -2696,7 +2696,7 @@ "holdEffectParam": 4, "description_english": "When held by a POKéMON, it raises\\nthe ATTACK stat in a pinch.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_BERRY_POUCH", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -2712,7 +2712,7 @@ "holdEffectParam": 4, "description_english": "When held by a POKéMON, it raises\\nthe DEFENSE stat in a pinch.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_BERRY_POUCH", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -2728,7 +2728,7 @@ "holdEffectParam": 4, "description_english": "When held by a POKéMON, it raises\\nthe SPEED stat in a pinch.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_BERRY_POUCH", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -2744,7 +2744,7 @@ "holdEffectParam": 4, "description_english": "When held by a POKéMON, it raises\\nthe SP. ATK stat in a pinch.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_BERRY_POUCH", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -2760,7 +2760,7 @@ "holdEffectParam": 4, "description_english": "When held by a POKéMON, it raises\\nthe SP. DEF stat in a pinch.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_BERRY_POUCH", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -2776,7 +2776,7 @@ "holdEffectParam": 4, "description_english": "When held by a POKéMON, it raises\\nthe critical-hit ratio in a pinch.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_BERRY_POUCH", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -2792,7 +2792,7 @@ "holdEffectParam": 4, "description_english": "When held by a POKéMON, it sharply\\nraises one stat in a pinch.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_BERRY_POUCH", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -2808,7 +2808,7 @@ "holdEffectParam": 0, "description_english": "Can be ground up into a powder as\\nan ingredient for medicine.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_BERRY_POUCH", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "ItemUseOutOfBattle_EnigmaBerry", @@ -2824,7 +2824,7 @@ "holdEffectParam": 0, "description_english": "?????", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -2840,7 +2840,7 @@ "holdEffectParam": 0, "description_english": "?????", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -2856,7 +2856,7 @@ "holdEffectParam": 0, "description_english": "?????", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -2872,7 +2872,7 @@ "holdEffectParam": 10, "description_english": "An item to be held by a POKéMON.\\nIt casts a tricky glare that lowers\\nthe opponent's accuracy.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -2888,7 +2888,7 @@ "holdEffectParam": 0, "description_english": "An item to be held by a POKéMON.\\nIt restores any lowered stat in\\nbattle. It can be used only once.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -2904,7 +2904,7 @@ "holdEffectParam": 0, "description_english": "An item to be held by a POKéMON.\\nIt promotes strong growth but\\nlowers SPEED while it is held.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -2920,7 +2920,7 @@ "holdEffectParam": 0, "description_english": "An item to be held by a POKéMON.\\nThe holder gets a share of EXP.\\npoints without having to battle.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -2936,7 +2936,7 @@ "holdEffectParam": 20, "description_english": "An item to be held by a POKéMON.\\nA light and sharp claw. The holder\\nmay be able to strike first.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -2952,7 +2952,7 @@ "holdEffectParam": 0, "description_english": "An item to be held by a POKéMON.\\nA bell with a comforting chime that\\nmakes the holder calm and friendly.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -2968,7 +2968,7 @@ "holdEffectParam": 0, "description_english": "An item to be held by a POKéMON.\\nIt snaps the holder out of\\ninfatuation. It can be used once.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -2984,7 +2984,7 @@ "holdEffectParam": 0, "description_english": "An item to be held by a POKéMON.\\nIt powers up one move, which\\nbecomes the only usable one.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -3000,7 +3000,7 @@ "holdEffectParam": 10, "description_english": "An item to be held by a POKéMON.\\nIt may cause the foe to flinch\\nupon taking damage.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -3016,7 +3016,7 @@ "holdEffectParam": 10, "description_english": "An item to be held by a POKéMON.\\nA shiny silver powder that boosts\\nthe power of BUG-type moves.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -3032,7 +3032,7 @@ "holdEffectParam": 10, "description_english": "An item to be held by a POKéMON.\\nIt doubles the battle money if the\\nholding POKéMON takes part.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -3048,7 +3048,7 @@ "holdEffectParam": 0, "description_english": "An item to be held by a POKéMON.\\nIt repels wild POKéMON if the\\nholder is first in the party.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -3064,7 +3064,7 @@ "holdEffectParam": 0, "description_english": "An orb to be held by a LATIOS or\\nLATIAS. It raises the SP. ATK\\nand SP. DEF stats.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -3080,7 +3080,7 @@ "holdEffectParam": 0, "description_english": "An item to be held by a POKéMON.\\nA fang that gleams a sharp silver.\\nIt raises the SP. ATK stat.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -3096,7 +3096,7 @@ "holdEffectParam": 0, "description_english": "An item to be held by a POKéMON.\\nA scale that shines a faint pink.\\nIt raises the SP. DEF stat.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -3112,7 +3112,7 @@ "holdEffectParam": 0, "description_english": "An item to be held by a POKéMON.\\nThe holding POKéMON can flee from\\nany wild POKéMON for sure.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -3128,7 +3128,7 @@ "holdEffectParam": 0, "description_english": "An item to be held by a POKéMON.\\nThe holding POKéMON is prevented\\nfrom evolving.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -3144,7 +3144,7 @@ "holdEffectParam": 10, "description_english": "An item to be held by a POKéMON.\\nThe holding POKéMON may endure an\\nattack, leaving just 1 HP.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -3160,7 +3160,7 @@ "holdEffectParam": 0, "description_english": "An item to be held by a POKéMON.\\nAn egg filled with happiness that\\nearns extra EXP. points in battle.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -3176,7 +3176,7 @@ "holdEffectParam": 0, "description_english": "An item to be held by a POKéMON.\\nA lens that boosts the critical-hit\\nratio of the holding POKéMON.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -3192,7 +3192,7 @@ "holdEffectParam": 10, "description_english": "An item to be held by a POKéMON.\\nA special metallic film that boosts\\nthe power of STEEL-type moves.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -3208,7 +3208,7 @@ "holdEffectParam": 10, "description_english": "An item to be held by a POKéMON.\\nThe holding POKéMON gradually\\nregains HP during battle.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -3224,7 +3224,7 @@ "holdEffectParam": 10, "description_english": "A thick and tough scale.\\nA DRAGON-type POKéMON may be\\nholding it.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -3240,7 +3240,7 @@ "holdEffectParam": 0, "description_english": "An orb to be held by a PIKACHU\\nthat raises the SP. ATK stat.\\nTouching it may cause a shock.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -3256,7 +3256,7 @@ "holdEffectParam": 10, "description_english": "An item to be held by a POKéMON.\\nA loose, silky sand that boosts the\\npower of GROUND-type moves.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -3272,7 +3272,7 @@ "holdEffectParam": 10, "description_english": "An item to be held by a POKéMON.\\nAn unbreakable stone that boosts\\nthe power of ROCK-type moves.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -3288,7 +3288,7 @@ "holdEffectParam": 10, "description_english": "An item to be held by a POKéMON.\\nA seed imbued with life that boosts\\nthe power of GRASS-type moves.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -3304,7 +3304,7 @@ "holdEffectParam": 10, "description_english": "An item to be held by a POKéMON.\\nA shady-looking pair of glasses\\nthat boosts DARK-type moves.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -3320,7 +3320,7 @@ "holdEffectParam": 10, "description_english": "An item to be held by a POKéMON.\\nA belt that boosts determination\\nand FIGHTING-type moves.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -3336,7 +3336,7 @@ "holdEffectParam": 10, "description_english": "An item to be held by a POKéMON.\\nA powerful magnet that boosts the\\npower of ELECTRIC-type moves.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -3352,7 +3352,7 @@ "holdEffectParam": 10, "description_english": "An item to be held by a POKéMON.\\nA teardrop-shaped gem that boosts\\nthe power of WATER-type moves.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -3368,7 +3368,7 @@ "holdEffectParam": 10, "description_english": "An item to be held by a POKéMON.\\nA long, sharp beak that boosts the\\npower of FLYING-type moves.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -3384,7 +3384,7 @@ "holdEffectParam": 10, "description_english": "An item to be held by a POKéMON.\\nA small, poisonous barb that boosts\\nthe power of POISON-type moves.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -3400,7 +3400,7 @@ "holdEffectParam": 10, "description_english": "An item to be held by a POKéMON.\\nA piece of ice that repels heat\\nand boosts ICE-type moves.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -3416,7 +3416,7 @@ "holdEffectParam": 10, "description_english": "An item to be held by a POKéMON.\\nA sinister, eerie tag that boosts\\nGHOST-type moves.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -3432,7 +3432,7 @@ "holdEffectParam": 10, "description_english": "An item to be held by a POKéMON.\\nA spoon imbued with telekinetic\\npower boosts PSYCHIC-type moves.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -3448,7 +3448,7 @@ "holdEffectParam": 10, "description_english": "An item to be held by a POKéMON.\\nA combustible fuel that boosts the\\npower of FIRE-type moves.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -3464,7 +3464,7 @@ "holdEffectParam": 10, "description_english": "An item to be held by a POKéMON.\\nA hard and sharp fang that boosts\\nthe power of DRAGON-type moves.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -3480,7 +3480,7 @@ "holdEffectParam": 10, "description_english": "An item to be held by a POKéMON.\\nA sumptuous scarf that boosts the\\npower of NORMAL-type moves.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -3496,7 +3496,7 @@ "holdEffectParam": 0, "description_english": "A transparent device filled with all\\nsorts of data.\\nIt is made by SILPH CO.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -3512,7 +3512,7 @@ "holdEffectParam": 8, "description_english": "An item to be held by a POKéMON.\\nThe holding POKéMON regains some\\nHP upon striking the foe.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -3528,7 +3528,7 @@ "holdEffectParam": 5, "description_english": "An item to be held by a POKéMON.\\nIt slightly boosts the power of\\nWATER-type moves.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -3544,7 +3544,7 @@ "holdEffectParam": 5, "description_english": "An item to be held by a POKéMON.\\nIts tricky aroma slightly reduces\\nthe foe's accuracy.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -3560,7 +3560,7 @@ "holdEffectParam": 0, "description_english": "A glove to be held by a CHANSEY.\\nIt raises CHANSEY's critical-hit\\nratio.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -3576,7 +3576,7 @@ "holdEffectParam": 0, "description_english": "A fine, hard powder to be held by\\na DITTO.\\nIt raises DITTO's DEFENSE stat.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -3592,7 +3592,7 @@ "holdEffectParam": 0, "description_english": "A hard bone of some sort to be\\nheld by a CUBONE or MAROWAK.\\nIt raises the ATTACK stat.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -3608,7 +3608,7 @@ "holdEffectParam": 0, "description_english": "A stick of leek to be held by a\\nFARFETCH'D. It raises FARFETCH'D's\\ncritical-hit ratio.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -3624,7 +3624,7 @@ "holdEffectParam": 0, "description_english": "?????", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -3640,7 +3640,7 @@ "holdEffectParam": 0, "description_english": "?????", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -3656,7 +3656,7 @@ "holdEffectParam": 0, "description_english": "?????", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -3672,7 +3672,7 @@ "holdEffectParam": 0, "description_english": "?????", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -3688,7 +3688,7 @@ "holdEffectParam": 0, "description_english": "?????", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -3704,7 +3704,7 @@ "holdEffectParam": 0, "description_english": "?????", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -3720,7 +3720,7 @@ "holdEffectParam": 0, "description_english": "?????", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -3736,7 +3736,7 @@ "holdEffectParam": 0, "description_english": "?????", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -3752,7 +3752,7 @@ "holdEffectParam": 0, "description_english": "?????", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -3768,7 +3768,7 @@ "holdEffectParam": 0, "description_english": "?????", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -3784,7 +3784,7 @@ "holdEffectParam": 0, "description_english": "?????", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -3800,7 +3800,7 @@ "holdEffectParam": 0, "description_english": "?????", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -3816,7 +3816,7 @@ "holdEffectParam": 0, "description_english": "?????", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -3832,7 +3832,7 @@ "holdEffectParam": 0, "description_english": "?????", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -3848,7 +3848,7 @@ "holdEffectParam": 0, "description_english": "?????", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -3864,7 +3864,7 @@ "holdEffectParam": 0, "description_english": "?????", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -3880,7 +3880,7 @@ "holdEffectParam": 0, "description_english": "?????", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -3896,7 +3896,7 @@ "holdEffectParam": 0, "description_english": "?????", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -3912,7 +3912,7 @@ "holdEffectParam": 0, "description_english": "?????", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -3928,7 +3928,7 @@ "holdEffectParam": 0, "description_english": "?????", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -3944,7 +3944,7 @@ "holdEffectParam": 0, "description_english": "?????", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -3960,7 +3960,7 @@ "holdEffectParam": 0, "description_english": "?????", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -3976,7 +3976,7 @@ "holdEffectParam": 0, "description_english": "?????", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -3992,7 +3992,7 @@ "holdEffectParam": 0, "description_english": "?????", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -4008,7 +4008,7 @@ "holdEffectParam": 0, "description_english": "?????", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -4024,7 +4024,7 @@ "holdEffectParam": 0, "description_english": "?????", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -4040,7 +4040,7 @@ "holdEffectParam": 0, "description_english": "?????", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -4056,7 +4056,7 @@ "holdEffectParam": 0, "description_english": "?????", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -4072,7 +4072,7 @@ "holdEffectParam": 0, "description_english": "An item to be held by a POKéMON.\\nIt boosts the holding POKéMON's\\nCOOL condition in CONTESTS.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -4088,7 +4088,7 @@ "holdEffectParam": 0, "description_english": "An item to be held by a POKéMON.\\nIt boosts the holding POKéMON's\\nBEAUTY condition in CONTESTS.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -4104,7 +4104,7 @@ "holdEffectParam": 0, "description_english": "An item to be held by a POKéMON.\\nIt boosts the holding POKéMON's\\nCUTE condition in CONTESTS.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -4120,7 +4120,7 @@ "holdEffectParam": 0, "description_english": "An item to be held by a POKéMON.\\nIt boosts the holding POKéMON's\\nSMART condition in CONTESTS.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -4136,7 +4136,7 @@ "holdEffectParam": 0, "description_english": "An item to be held by a POKéMON.\\nIt boosts the holding POKéMON's\\nTOUGH condition in CONTESTS.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -4152,7 +4152,7 @@ "holdEffectParam": 0, "description_english": "A folding bicycle that is at least\\ntwice as fast as walking.", "importance": 1, - "exitsBagOnUse": 1, + "registrability": 1, "pocket": "POCKET_KEY_ITEMS", "type": "ITEM_TYPE_FIELD", "fieldUseFunc": "FieldUseFunc_Bike", @@ -4168,7 +4168,7 @@ "holdEffectParam": 0, "description_english": "A case for holding COINS obtained\\nat the GAME CORNER.\\nIt holds up to 9,999 COINS.", "importance": 1, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_KEY_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_CoinCase", @@ -4184,7 +4184,7 @@ "holdEffectParam": 0, "description_english": "A device used for finding items.\\nIf there is a hidden item nearby\\nwhen it is used, it emits a signal.", "importance": 1, - "exitsBagOnUse": 1, + "registrability": 1, "pocket": "POCKET_KEY_ITEMS", "type": "ITEM_TYPE_FIELD", "fieldUseFunc": "ItemUseOutOfBattle_Itemfinder", @@ -4200,7 +4200,7 @@ "holdEffectParam": 0, "description_english": "An old and beat-up fishing rod.\\nUse it by any body of water to \\nfish for wild POKéMON.", "importance": 1, - "exitsBagOnUse": 1, + "registrability": 1, "pocket": "POCKET_KEY_ITEMS", "type": "ITEM_TYPE_FIELD", "fieldUseFunc": "FieldUseFunc_Rod", @@ -4216,7 +4216,7 @@ "holdEffectParam": 0, "description_english": "A new, good-quality fishing rod.\\nUse it by any body of water to \\nfish for wild POKéMON.", "importance": 1, - "exitsBagOnUse": 1, + "registrability": 1, "pocket": "POCKET_KEY_ITEMS", "type": "ITEM_TYPE_FIELD", "fieldUseFunc": "FieldUseFunc_Rod", @@ -4232,7 +4232,7 @@ "holdEffectParam": 0, "description_english": "An awesome, high-tech fishing rod.\\nUse it by any body of water to fish\\nfor wild POKéMON.", "importance": 1, - "exitsBagOnUse": 1, + "registrability": 1, "pocket": "POCKET_KEY_ITEMS", "type": "ITEM_TYPE_FIELD", "fieldUseFunc": "FieldUseFunc_Rod", @@ -4248,7 +4248,7 @@ "holdEffectParam": 0, "description_english": "The ticket required for sailing on\\nthe ferry S.S. ANNE.\\nIt has a drawing of a ship on it.", "importance": 1, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_KEY_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -4264,7 +4264,7 @@ "holdEffectParam": 0, "description_english": "The pass required for entering\\nPOKéMON CONTESTS. It has a\\ndrawing of an award ribbon on it.", "importance": 1, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_KEY_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -4280,7 +4280,7 @@ "holdEffectParam": 0, "description_english": "?????", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -4296,7 +4296,7 @@ "holdEffectParam": 0, "description_english": "A nifty watering pail.\\nUse it to promote strong growth in\\nBERRIES planted in soft soil.", "importance": 1, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_KEY_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -4312,7 +4312,7 @@ "holdEffectParam": 0, "description_english": "A package that contains mechanical\\nparts of some sort made by the\\nDEVON CORPORATION.", "importance": 2, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_KEY_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -4328,7 +4328,7 @@ "holdEffectParam": 0, "description_english": "A sack used to collect volcanic\\nash automatically during walks\\nover deep ash.", "importance": 1, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_KEY_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -4344,7 +4344,7 @@ "holdEffectParam": 0, "description_english": "The key to NEW MAUVILLE, which\\nwas constructed beneath MAUVILLE\\nCITY.", "importance": 1, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_KEY_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -4360,7 +4360,7 @@ "holdEffectParam": 0, "description_english": "A folding bicycle that is capable\\nof stunts like jumps and wheelies.", "importance": 1, - "exitsBagOnUse": 1, + "registrability": 1, "pocket": "POCKET_KEY_ITEMS", "type": "ITEM_TYPE_FIELD", "fieldUseFunc": "FieldUseFunc_Bike", @@ -4376,7 +4376,7 @@ "holdEffectParam": 0, "description_english": "A case for holding {POKEBLOCK}S made\\nwith a BERRY BLENDER. It releases\\none {POKEBLOCK} when shaken.", "importance": 1, - "exitsBagOnUse": 1, + "registrability": 1, "pocket": "POCKET_KEY_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -4392,7 +4392,7 @@ "holdEffectParam": 0, "description_english": "An extremely important letter to\\nSTEVEN from the PRESIDENT of the\\nDEVON CORPORATION.", "importance": 2, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_KEY_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -4408,7 +4408,7 @@ "holdEffectParam": 0, "description_english": "The ticket required for sailing on a\\nferry to a distant southern island.\\nIt features a drawing of an island.", "importance": 1, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_KEY_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -4424,7 +4424,7 @@ "holdEffectParam": 0, "description_english": "An orb that glows red.\\nIt is said to contain an incredible\\npower from ancient times.", "importance": 2, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_KEY_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -4440,7 +4440,7 @@ "holdEffectParam": 0, "description_english": "An orb that glows blue.\\nIt is said to contain an incredible\\npower from ancient times.", "importance": 2, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_KEY_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -4456,7 +4456,7 @@ "holdEffectParam": 0, "description_english": "A device used to search for\\nlife-forms in water.\\nIt looks too difficult to use.", "importance": 1, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_KEY_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -4472,7 +4472,7 @@ "holdEffectParam": 0, "description_english": "A pair of protective goggles.\\nThey enable a TRAINER to travel\\nthrough even desert sandstorms.", "importance": 1, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_KEY_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -4488,7 +4488,7 @@ "holdEffectParam": 0, "description_english": "A meteorite that fell from space\\nonto MT. MOON long ago.\\nIt is very lumpy and hard.", "importance": 1, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_KEY_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -4504,7 +4504,7 @@ "holdEffectParam": 0, "description_english": "A key that opens the door to Room\\n1 inside the ABANDONED SHIP.\\nIt is old and looks easily broken.", "importance": 1, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_KEY_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -4520,7 +4520,7 @@ "holdEffectParam": 0, "description_english": "A key that opens the door to Room\\n2 inside the ABANDONED SHIP.\\nIt is old and looks easily broken.", "importance": 1, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_KEY_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -4536,7 +4536,7 @@ "holdEffectParam": 0, "description_english": "A key that opens the door to Room\\n4 inside the ABANDONED SHIP.\\nIt is old and looks easily broken.", "importance": 1, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_KEY_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -4552,7 +4552,7 @@ "holdEffectParam": 0, "description_english": "A key that opens the door to Room\\n6 inside the ABANDONED SHIP.\\nIt is old and looks easily broken.", "importance": 1, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_KEY_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -4568,7 +4568,7 @@ "holdEffectParam": 0, "description_english": "A key that opens the storage hold\\ninside the ABANDONED SHIP.\\nIt is old and looks easily broken.", "importance": 1, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_KEY_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -4584,7 +4584,7 @@ "holdEffectParam": 0, "description_english": "A fossil of an ancient, seafloor-\\ndwelling POKéMON. It appears to be\\npart of a plant root.", "importance": 1, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_KEY_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -4600,7 +4600,7 @@ "holdEffectParam": 0, "description_english": "A fossil of an ancient, seafloor-\\ndwelling POKéMON. It appears to be\\npart of a claw.", "importance": 1, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_KEY_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -4616,7 +4616,7 @@ "holdEffectParam": 0, "description_english": "A scope that signals the presence\\nof any unseeable POKéMON.\\nIt is made by the DEVON CORP.", "importance": 1, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_KEY_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -4632,7 +4632,7 @@ "holdEffectParam": 0, "description_english": "An extremely powerful attack.\\nHowever, if the user is hit before\\nusing the move, they will flinch.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_TM_CASE", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "NULL", @@ -4649,7 +4649,7 @@ "holdEffectParam": 0, "description_english": "Sharp, huge claws hook and slash\\nthe foe quickly and with great\\npower.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_TM_CASE", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "NULL", @@ -4666,7 +4666,7 @@ "holdEffectParam": 0, "description_english": "The foe is hit with a pulsing blast\\nof water. It may also confuse the\\ntarget.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_TM_CASE", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "NULL", @@ -4683,7 +4683,7 @@ "holdEffectParam": 0, "description_english": "The user calms its spirit and\\nfocuses its mind to raise its\\nSP. ATK and SP. DEF stats.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_TM_CASE", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "NULL", @@ -4700,7 +4700,7 @@ "holdEffectParam": 0, "description_english": "A savage roar that causes the foe\\nto switch out of battle. In the\\nwild, ROAR ends the battle.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_TM_CASE", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "NULL", @@ -4717,7 +4717,7 @@ "holdEffectParam": 0, "description_english": "A move that leaves the foe badly\\npoisoned. Its poison damage worsens\\nevery turn.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_TM_CASE", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "NULL", @@ -4734,7 +4734,7 @@ "holdEffectParam": 0, "description_english": "Summons a hailstorm that lasts for\\nfive turns. The hailstorm damages\\nall types except the ICE type.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_TM_CASE", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "NULL", @@ -4751,7 +4751,7 @@ "holdEffectParam": 0, "description_english": "The user tightens all its muscles\\nand bulks up, boosting both its\\nATTACK and DEFENSE stats.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_TM_CASE", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "NULL", @@ -4768,7 +4768,7 @@ "holdEffectParam": 0, "description_english": "The user shoots seeds at the foe\\nin rapid succession. Two to five\\nseeds are shot at once.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_TM_CASE", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "NULL", @@ -4785,7 +4785,7 @@ "holdEffectParam": 0, "description_english": "A variable move that changes type\\nand power depending on the POKéMON\\nusing it.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_TM_CASE", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "NULL", @@ -4802,7 +4802,7 @@ "holdEffectParam": 0, "description_english": "The weather is turned sunny for\\nfive turns. Over that time, FIRE-\\ntype moves are powered up.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_TM_CASE", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "NULL", @@ -4819,7 +4819,7 @@ "holdEffectParam": 0, "description_english": "A taunted foe may become enraged.\\nIt will then only be able to use\\nattack moves.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_TM_CASE", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "NULL", @@ -4836,7 +4836,7 @@ "holdEffectParam": 0, "description_english": "An icy-cold beam is shot at the\\nfoe. It may leave the target\\nfrozen.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_TM_CASE", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "NULL", @@ -4853,7 +4853,7 @@ "holdEffectParam": 0, "description_english": "A vicious snow-and-wind attack that\\nstrikes all foes in battle. It may\\ncause freezing.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_TM_CASE", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "NULL", @@ -4870,7 +4870,7 @@ "holdEffectParam": 0, "description_english": "A harsh attack that inflicts severe\\ndamage on the foe. However, the\\nuser must rest the next turn.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_TM_CASE", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "NULL", @@ -4887,7 +4887,7 @@ "holdEffectParam": 0, "description_english": "A wall of light is created over\\nfive turns. It reduces damage from\\nSP. ATK attacks.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_TM_CASE", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "NULL", @@ -4904,7 +4904,7 @@ "holdEffectParam": 0, "description_english": "The user is completely protected\\nfrom attack in the turn it is used.\\nIt may fail if used in succession.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_TM_CASE", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "NULL", @@ -4921,7 +4921,7 @@ "holdEffectParam": 0, "description_english": "A heavy rain is summoned for five\\nturns. Over that time, WATER-type\\nmoves are powered up.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_TM_CASE", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "NULL", @@ -4938,7 +4938,7 @@ "holdEffectParam": 0, "description_english": "The user strikes the foe with\\ntentacles or roots, stealing the\\ntarget's HP and healing itself.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_TM_CASE", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "NULL", @@ -4955,7 +4955,7 @@ "holdEffectParam": 0, "description_english": "Protects the party with a shield\\nagainst all status problems over\\nfive turns.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_TM_CASE", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "NULL", @@ -4972,7 +4972,7 @@ "holdEffectParam": 0, "description_english": "This attack move grows more\\npowerful the more the POKéMON\\ndislikes its TRAINER.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_TM_CASE", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "NULL", @@ -4989,7 +4989,7 @@ "holdEffectParam": 0, "description_english": "A 2-turn attack that uses the first\\nturn for absorbing sunlight, then\\nblasting the foe in the next turn.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_TM_CASE", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "NULL", @@ -5006,7 +5006,7 @@ "holdEffectParam": 0, "description_english": "The foe is slammed with a sturdy\\ntail of steel. It may lower the\\ntarget's DEFENSE stat.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_TM_CASE", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "NULL", @@ -5023,7 +5023,7 @@ "holdEffectParam": 0, "description_english": "A massive jolt of electricity is\\nlaunched at the foe. It may cause\\nparalysis.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_TM_CASE", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "NULL", @@ -5040,7 +5040,7 @@ "holdEffectParam": 0, "description_english": "Strikes the foe with a huge\\nthunderbolt. It may cause\\nparalysis.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_TM_CASE", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "NULL", @@ -5057,7 +5057,7 @@ "holdEffectParam": 0, "description_english": "Causes an earthquake that strikes\\nall POKéMON in battle, excluding\\nthe user.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_TM_CASE", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "NULL", @@ -5074,7 +5074,7 @@ "holdEffectParam": 0, "description_english": "This attack move grows more\\npowerful the more the POKéMON\\nlikes its TRAINER.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_TM_CASE", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "NULL", @@ -5091,7 +5091,7 @@ "holdEffectParam": 0, "description_english": "A 2-turn attack in which the user\\ndigs underground, then strikes.\\nIt can be used to exit dungeons.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_TM_CASE", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "NULL", @@ -5108,7 +5108,7 @@ "holdEffectParam": 0, "description_english": "A powerful blast of telekinetic\\nenergy strikes the foe. It may\\nlower the target's SP. DEF stat.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_TM_CASE", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "NULL", @@ -5125,7 +5125,7 @@ "holdEffectParam": 0, "description_english": "The foe is attacked with a shadowy\\nlump. It may lower the target's\\nSP. DEF stat.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_TM_CASE", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "NULL", @@ -5142,7 +5142,7 @@ "holdEffectParam": 0, "description_english": "Strikes the foe with a rock-hard\\nfist, etc. It shatters barriers such\\nas REFLECT and LIGHT SCREEN.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_TM_CASE", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "NULL", @@ -5159,7 +5159,7 @@ "holdEffectParam": 0, "description_english": "The user begins moving so quickly\\nthat it creates illusory copies to\\nraise its evasiveness.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_TM_CASE", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "NULL", @@ -5176,7 +5176,7 @@ "holdEffectParam": 0, "description_english": "A tough barrier is put up over five\\nturns. It reduces damage from\\nphysical attacks over that time.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_TM_CASE", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "NULL", @@ -5193,7 +5193,7 @@ "holdEffectParam": 0, "description_english": "A rapid jolt of electricity strikes\\nthe foe. This attack is impossible\\nto evade.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_TM_CASE", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "NULL", @@ -5210,7 +5210,7 @@ "holdEffectParam": 0, "description_english": "The foe is roasted with a heavy\\nblast of fire. It may leave the\\ntarget with a burn.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_TM_CASE", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "NULL", @@ -5227,7 +5227,7 @@ "holdEffectParam": 0, "description_english": "Toxic sludge is hurled at the foe\\nwith great force. It may also\\npoison the target.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_TM_CASE", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "NULL", @@ -5244,7 +5244,7 @@ "holdEffectParam": 0, "description_english": "Summons a sandstorm that lasts for\\nfive turns. It damages all types\\nexcept ROCK, GROUND, and STEEL.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_TM_CASE", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "NULL", @@ -5261,7 +5261,7 @@ "holdEffectParam": 0, "description_english": "The foe is incinerated with an\\nintense flame. It may leave the\\ntarget with a burn.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_TM_CASE", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "NULL", @@ -5278,7 +5278,7 @@ "holdEffectParam": 0, "description_english": "Boulders are hurled at the foe.\\nIt also lowers the target's SPEED\\nstat if it hits.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_TM_CASE", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "NULL", @@ -5295,7 +5295,7 @@ "holdEffectParam": 0, "description_english": "An extremely fast attack against\\none target. It is impossible to\\nevade.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_TM_CASE", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "NULL", @@ -5312,7 +5312,7 @@ "holdEffectParam": 0, "description_english": "If enraged by this move, the target\\nbecomes incapable of using the same\\nmove twice in a row.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_TM_CASE", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "NULL", @@ -5329,7 +5329,7 @@ "holdEffectParam": 0, "description_english": "An attack move that becomes very\\npowerful if the user is poisoned,\\nburned, or paralyzed.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_TM_CASE", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "NULL", @@ -5346,7 +5346,7 @@ "holdEffectParam": 0, "description_english": "An attack move that may have an\\nadditional effect depending on the\\nbattle terrain.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_TM_CASE", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "NULL", @@ -5363,7 +5363,7 @@ "holdEffectParam": 0, "description_english": "A move that makes the user fall\\nasleep over two turns to restore HP\\nand heal any status problems.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_TM_CASE", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "NULL", @@ -5380,7 +5380,7 @@ "holdEffectParam": 0, "description_english": "The foe, if it is the opposite\\ngender as the user, becomes\\ninfatuated and may not attack.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_TM_CASE", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "NULL", @@ -5397,7 +5397,7 @@ "holdEffectParam": 0, "description_english": "An attack that gives the user an\\nopportunity to steal the foe's hold\\nitem.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_TM_CASE", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "NULL", @@ -5414,7 +5414,7 @@ "holdEffectParam": 0, "description_english": "The foe is struck with steel-hard\\nwings. It may also raise the user's\\nDEFENSE stat.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_TM_CASE", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "NULL", @@ -5431,7 +5431,7 @@ "holdEffectParam": 0, "description_english": "A special power is transmitted to\\nthe foe, causing it to switch\\nabilities with the user.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_TM_CASE", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "NULL", @@ -5448,7 +5448,7 @@ "holdEffectParam": 0, "description_english": "A move that steals the effects of\\nany status-changing or healing move\\nthat the foe tries to use.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_TM_CASE", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "NULL", @@ -5465,7 +5465,7 @@ "holdEffectParam": 0, "description_english": "A maximum-power attack of great\\nferocity, but one that also sharply\\nreduces the user's SP. ATK stat.", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_TM_CASE", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "NULL", @@ -5482,7 +5482,7 @@ "holdEffectParam": 0, "description_english": "Attacks the foe with sharp blades\\nor claws. It can also cut down thin\\ntrees and grass outside of battle.", "importance": 1, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_TM_CASE", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "NULL", @@ -5499,7 +5499,7 @@ "holdEffectParam": 0, "description_english": "The user flies up on the first turn,\\nthen attacks next turn. It can be\\nused to fly to any known town.", "importance": 1, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_TM_CASE", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "NULL", @@ -5516,7 +5516,7 @@ "holdEffectParam": 0, "description_english": "Creates a huge wave, then crashes\\nit down on the foe. It can be used\\nfor traveling on water.", "importance": 1, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_TM_CASE", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "NULL", @@ -5533,7 +5533,7 @@ "holdEffectParam": 0, "description_english": "The user builds enormous power,\\nthen slams the foe. It can be used\\nfor moving large, round boulders.", "importance": 1, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_TM_CASE", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "NULL", @@ -5550,7 +5550,7 @@ "holdEffectParam": 0, "description_english": "Looses a powerful blast of light\\nthat reduces the foe's accuracy.\\nIt also lights up dark caves.", "importance": 1, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_TM_CASE", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "NULL", @@ -5567,7 +5567,7 @@ "holdEffectParam": 0, "description_english": "Hits the foe with a rock-crushingly\\ntough attack. It can smash cracked\\nboulders.", "importance": 1, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_TM_CASE", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "NULL", @@ -5584,7 +5584,7 @@ "holdEffectParam": 0, "description_english": "A powerful charge attack. It can\\nbe used for climbing a torrential\\nwaterfall.", "importance": 1, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_TM_CASE", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "NULL", @@ -5601,7 +5601,7 @@ "holdEffectParam": 0, "description_english": "A 2-turn attack in which the user\\ndives underwater on the first turn,\\nthen strikes in the next turn.", "importance": 1, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_TM_CASE", "type": "ITEM_TYPE_PARTY_MENU", "fieldUseFunc": "NULL", @@ -5618,7 +5618,7 @@ "holdEffectParam": 0, "description_english": "?????", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -5634,7 +5634,7 @@ "holdEffectParam": 0, "description_english": "?????", "importance": 0, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -5650,7 +5650,7 @@ "holdEffectParam": 0, "description_english": "A parcel to be delivered to PROF.\\nOAK from VIRIDIAN CITY's POKéMON\\nMART.", "importance": 2, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_KEY_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -5666,7 +5666,7 @@ "holdEffectParam": 0, "description_english": "A flute that is said to instantly\\nawaken any POKéMON. It has a\\nlovely tone.", "importance": 1, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_KEY_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_PokeFlute", @@ -5682,7 +5682,7 @@ "holdEffectParam": 0, "description_english": "The key to CINNABAR ISLAND GYM's\\nfront door. It is colored red and\\ndecorated.", "importance": 1, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_KEY_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -5698,7 +5698,7 @@ "holdEffectParam": 0, "description_english": "Take this voucher to the BIKE SHOP\\nin CERULEAN CITY and exchange it\\nfor a bicycle.", "importance": 1, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_KEY_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -5714,7 +5714,7 @@ "holdEffectParam": 0, "description_english": "A set of false teeth lost by the\\nSAFARI ZONE'S WARDEN. It makes his\\nsmile sparkle.", "importance": 1, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_KEY_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -5730,7 +5730,7 @@ "holdEffectParam": 0, "description_english": "A piece of amber that contains\\nthe genes of an ancient POKéMON.\\nIt is clear with a reddish tint.", "importance": 1, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_KEY_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -5746,7 +5746,7 @@ "holdEffectParam": 0, "description_english": "A card-type key that unlocks doors\\nin SILPH CO.'s HEAD OFFICE in\\nSAFFRON CITY.", "importance": 1, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_KEY_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -5762,7 +5762,7 @@ "holdEffectParam": 0, "description_english": "A key that operates the elevator\\nin TEAM ROCKET's HIDEOUT.\\nIt bears the TEAM ROCKET logo.", "importance": 1, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_KEY_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -5778,7 +5778,7 @@ "holdEffectParam": 0, "description_english": "A fossil of an ancient, seafloor-\\ndwelling POKéMON. It appears to be\\npart of a seashell.", "importance": 1, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_KEY_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -5794,7 +5794,7 @@ "holdEffectParam": 0, "description_english": "A fossil of an ancient, seafloor-\\ndwelling POKéMON. It appears to be\\npart of a shell.", "importance": 1, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_KEY_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -5810,7 +5810,7 @@ "holdEffectParam": 0, "description_english": "A scope that makes unseeable\\nPOKéMON visible.\\nIt is made by SILPH CO.", "importance": 1, - "exitsBagOnUse": 0, + "registrability": 0, "pocket": "POCKET_KEY_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -5826,7 +5826,7 @@ "holdEffectParam": 0, "description_english": "A folding bicycle that allows\\nfaster movement than the RUNNING\\nSHOES.", "importance": 1, - "exitsBagOnUse": 1, + "registrability": 1, "pocket": "POCKET_KEY_ITEMS", "type": "ITEM_TYPE_FIELD", "fieldUseFunc": "FieldUseFunc_Bike", @@ -5842,7 +5842,7 @@ "holdEffectParam": 0, "description_english": "A very convenient map that can be\\nviewed anytime. It even shows your \\npresent location.", "importance": 1, - "exitsBagOnUse": 1, + "registrability": 1, "pocket": "POCKET_KEY_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_TownMap", @@ -5858,7 +5858,7 @@ "holdEffectParam": 0, "description_english": "A device that indicates TRAINERS\\nwho want to battle. The battery\\ncharges while traveling.", "importance": 1, - "exitsBagOnUse": 1, + "registrability": 1, "pocket": "POCKET_KEY_ITEMS", "type": "ITEM_TYPE_FIELD", "fieldUseFunc": "FieldUseFunc_VsSeeker", @@ -5874,7 +5874,7 @@ "holdEffectParam": 0, "description_english": "A device that enables you to\\nrecall what you've heard and seen\\nabout famous people.", "importance": 1, - "exitsBagOnUse": 1, + "registrability": 1, "pocket": "POCKET_KEY_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_FameChecker", @@ -5890,7 +5890,7 @@ "holdEffectParam": 0, "description_english": "A case that holds TMs and HMs.\\nIt is attached to the BAG's\\ncompartment for important items.", "importance": 1, - "exitsBagOnUse": 1, + "registrability": 1, "pocket": "POCKET_KEY_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_TmCase", @@ -5906,7 +5906,7 @@ "holdEffectParam": 0, "description_english": "A pouch for carrying BERRIES.\\nIt is attached to the BAG's\\ncompartment for important items.", "importance": 1, - "exitsBagOnUse": 1, + "registrability": 1, "pocket": "POCKET_KEY_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_BerryPouch", @@ -5922,7 +5922,7 @@ "holdEffectParam": 0, "description_english": "A television set that is tuned to\\na program with useful tips for\\nnovice TRAINERS.", "importance": 1, - "exitsBagOnUse": 1, + "registrability": 1, "pocket": "POCKET_KEY_ITEMS", "type": "ITEM_TYPE_FIELD", "fieldUseFunc": "FieldUseFunc_TeachyTv", @@ -5938,7 +5938,7 @@ "holdEffectParam": 0, "description_english": "A pass for ferries between ONE,\\nTWO, and THREE ISLAND.\\nIt has a drawing of three islands.", "importance": 1, - "exitsBagOnUse": 1, + "registrability": 1, "pocket": "POCKET_KEY_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -5954,7 +5954,7 @@ "holdEffectParam": 0, "description_english": "A pass for ferries between\\nVERMILION and the SEVII ISLANDS.\\nIt features a drawing of a rainbow.", "importance": 1, - "exitsBagOnUse": 1, + "registrability": 1, "pocket": "POCKET_KEY_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -5970,7 +5970,7 @@ "holdEffectParam": 0, "description_english": "An aromatic tea prepared by an old\\nlady. It will slake even the worst\\nthirst.", "importance": 1, - "exitsBagOnUse": 1, + "registrability": 1, "pocket": "POCKET_KEY_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -5986,7 +5986,7 @@ "holdEffectParam": 0, "description_english": "A ticket required to board the ship\\nto NAVEL ROCK.\\nIt glows with a mystic light.", "importance": 1, - "exitsBagOnUse": 1, + "registrability": 1, "pocket": "POCKET_KEY_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -6002,7 +6002,7 @@ "holdEffectParam": 0, "description_english": "A ticket required to board the ship\\nto BIRTH ISLAND.\\nIt glows beautifully.", "importance": 1, - "exitsBagOnUse": 1, + "registrability": 1, "pocket": "POCKET_KEY_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -6018,7 +6018,7 @@ "holdEffectParam": 0, "description_english": "A jar for storing BERRY POWDER\\nmade using a BERRY CRUSHER.", "importance": 1, - "exitsBagOnUse": 1, + "registrability": 1, "pocket": "POCKET_KEY_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_PowderJar", @@ -6034,7 +6034,7 @@ "holdEffectParam": 0, "description_english": "An exquisitely beautiful gem that\\nhas a red glow.\\nIt symbolizes passion.", "importance": 1, - "exitsBagOnUse": 1, + "registrability": 1, "pocket": "POCKET_KEY_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", @@ -6050,7 +6050,7 @@ "holdEffectParam": 0, "description_english": "An exquisitely beautiful gem that\\nhas a blue glow.\\nIt symbolizes honesty.", "importance": 1, - "exitsBagOnUse": 1, + "registrability": 1, "pocket": "POCKET_KEY_ITEMS", "type": "ITEM_TYPE_BAG_MENU", "fieldUseFunc": "FieldUseFunc_OakStopsYou", diff --git a/src/data/items.json.txt b/src/data/items.json.txt index 0daa783aa..a389a5c83 100644 --- a/src/data/items.json.txt +++ b/src/data/items.json.txt @@ -20,7 +20,7 @@ const struct Item gItems[] = { .description = gItemDescription_{{ item.itemId }}, ## endif .importance = {{ item.importance }}, - .exitsBagOnUse = {{ item.exitsBagOnUse }}, + .registrability = {{ item.registrability }}, .pocket = {{ item.pocket }}, .type = {{ item.type }}, .fieldUseFunc = {{ item.fieldUseFunc }}, diff --git a/src/item.c b/src/item.c index 763838133..e072a5692 100644 --- a/src/item.c +++ b/src/item.c @@ -621,12 +621,13 @@ const u8 * ItemId_GetName(u16 itemId) return gItems[SanitizeItemId(itemId)].name; } -u16 itemid_get_number(u16 itemId) +// Unused +u16 ItemId_GetId(u16 itemId) { return gItems[SanitizeItemId(itemId)].itemId; } -u16 itemid_get_market_price(u16 itemId) +u16 ItemId_GetPrice(u16 itemId) { return gItems[SanitizeItemId(itemId)].price; } @@ -646,14 +647,15 @@ const u8 * ItemId_GetDescription(u16 itemId) return gItems[SanitizeItemId(itemId)].description; } -bool8 itemid_is_unique(u16 itemId) +u8 ItemId_GetImportance(u16 itemId) { return gItems[SanitizeItemId(itemId)].importance; } -u8 itemid_get_x19(u16 itemId) +// Unused +u8 ItemId_GetRegistrability(u16 itemId) { - return gItems[SanitizeItemId(itemId)].exitsBagOnUse; + return gItems[SanitizeItemId(itemId)].registrability; } u8 ItemId_GetPocket(u16 itemId) diff --git a/src/item_menu.c b/src/item_menu.c index 3ee223343..d499d6081 100644 --- a/src/item_menu.c +++ b/src/item_menu.c @@ -714,7 +714,7 @@ static void BagListMenuItemPrintFunc(u8 windowId, u32 itemId, u8 y) { bagItemId = BagGetItemIdByPocketPosition(gBagMenuState.pocket + 1, itemId); bagItemQuantity = BagGetQuantityByPocketPosition(gBagMenuState.pocket + 1, itemId); - if (gBagMenuState.pocket != POCKET_KEY_ITEMS - 1 && !itemid_is_unique(bagItemId)) + if (gBagMenuState.pocket != POCKET_KEY_ITEMS - 1 && ItemId_GetImportance(bagItemId) == 0) { ConvertIntToDecimalStringN(gStringVar1, bagItemQuantity, STR_CONV_MODE_RIGHT_ALIGN, 3); StringExpandPlaceholders(gStringVar4, gText_TimesStrVar1); @@ -1611,7 +1611,7 @@ static void Task_ItemMenuAction_Give(u8 taskId) CopyWindowToVram(0, COPYWIN_MAP); if (!CanWriteMailHere(itemId)) DisplayItemMessageInBag(taskId, FONT_2, gText_CantWriteMailHere, Task_WaitAButtonAndCloseContextMenu); - else if (!itemid_is_unique(itemId)) + else if (ItemId_GetImportance(itemId) == 0) { if (CalculatePlayerPartyCount() == 0) { @@ -1717,7 +1717,7 @@ static void Task_ItemContext_FieldGive(u8 taskId) ItemMenu_SetExitCallback(GoToBerryPouch_Give); ItemMenu_StartFadeToExitCallback(taskId); } - else if (gBagMenuState.pocket != POCKET_KEY_ITEMS - 1 && !itemid_is_unique(itemId)) + else if (gBagMenuState.pocket != POCKET_KEY_ITEMS - 1 && ItemId_GetImportance(itemId) == 0) { Bag_BeginCloseWin0Animation(); gTasks[taskId].func = ItemMenu_StartFadeToExitCallback; @@ -1730,7 +1730,7 @@ static void Task_ItemContext_FieldGive(u8 taskId) static void GoToTMCase_Give(void) { - InitTMCase(TMCASE_FROMPARTYGIVE, ReturnToBagMenuFromSubmenu_Give, FALSE); + InitTMCase(TMCASE_GIVE_PARTY, ReturnToBagMenuFromSubmenu_Give, FALSE); } static void GoToBerryPouch_Give(void) @@ -1761,7 +1761,7 @@ static void Task_ItemContext_PcBoxGive(u8 taskId) ItemMenu_SetExitCallback(GoToBerryPouch_PCBox); ItemMenu_StartFadeToExitCallback(taskId); } - else if (gBagMenuState.pocket != POCKET_KEY_ITEMS - 1 && !itemid_is_unique(itemId)) + else if (gBagMenuState.pocket != POCKET_KEY_ITEMS - 1 && ItemId_GetImportance(itemId) == 0) { Bag_BeginCloseWin0Animation(); gTasks[taskId].func = ItemMenu_StartFadeToExitCallback; @@ -1774,7 +1774,7 @@ static void Task_ItemContext_PcBoxGive(u8 taskId) static void GoToTMCase_PCBox(void) { - InitTMCase(TMCASE_FROMPOKEMONSTORAGEPC, ReturnToBagMenuFromSubmenu_PCBox, FALSE); + InitTMCase(TMCASE_GIVE_PC, ReturnToBagMenuFromSubmenu_PCBox, FALSE); } static void GoToBerryPouch_PCBox(void) @@ -1800,7 +1800,7 @@ static void Task_ItemContext_Sell(u8 taskId) ItemMenu_SetExitCallback(GoToBerryPouch_Sell); ItemMenu_StartFadeToExitCallback(taskId); } - else if (itemid_get_market_price(gSpecialVar_ItemId) == 0) + else if (ItemId_GetPrice(gSpecialVar_ItemId) == 0) { CopyItemName(gSpecialVar_ItemId, gStringVar1); StringExpandPlaceholders(gStringVar4, gText_OhNoICantBuyThat); @@ -1827,7 +1827,7 @@ static void Task_ItemContext_Sell(u8 taskId) static void GoToTMCase_Sell(void) { - InitTMCase(TMCASE_FROMMARTSELL, ReturnToBagMenuFromSubmenu_Sell, FALSE); + InitTMCase(TMCASE_SELL, ReturnToBagMenuFromSubmenu_Sell, FALSE); } static void GoToBerryPouch_Sell(void) @@ -1843,7 +1843,7 @@ static void ReturnToBagMenuFromSubmenu_Sell(void) static void Task_PrintSaleConfirmationText(u8 taskId) { s16 *data = gTasks[taskId].data; - ConvertIntToDecimalStringN(gStringVar3, itemid_get_market_price(BagGetItemIdByPocketPosition(gBagMenuState.pocket + 1, data[1])) / 2 * data[8], STR_CONV_MODE_LEFT_ALIGN, 6); + ConvertIntToDecimalStringN(gStringVar3, ItemId_GetPrice(BagGetItemIdByPocketPosition(gBagMenuState.pocket + 1, data[1])) / 2 * data[8], STR_CONV_MODE_LEFT_ALIGN, 6); StringExpandPlaceholders(gStringVar4, gText_ICanPayThisMuch_WouldThatBeOkay); DisplayItemMessageInBag(taskId, GetDialogBoxFontId(), gStringVar4, Task_ShowSellYesNoMenu); } @@ -1873,7 +1873,7 @@ static void Task_InitSaleQuantitySelectInterface(u8 taskId) ConvertIntToDecimalStringN(gStringVar1, 1, STR_CONV_MODE_LEADING_ZEROS, 2); StringExpandPlaceholders(gStringVar4, gText_TimesStrVar1); BagPrintTextOnWindow(r4, FONT_0, gStringVar4, 4, 10, 1, 0, 0xFF, 1); - UpdateSalePriceDisplay(itemid_get_market_price(BagGetItemIdByPocketPosition(gBagMenuState.pocket + 1, data[1])) / 2 * data[8]); + UpdateSalePriceDisplay(ItemId_GetPrice(BagGetItemIdByPocketPosition(gBagMenuState.pocket + 1, data[1])) / 2 * data[8]); BagPrintMoneyAmount(); CreatePocketScrollArrowPair_SellQuantity(); gTasks[taskId].func = Task_SelectQuantityToSell; @@ -1890,7 +1890,7 @@ static void Task_SelectQuantityToSell(u8 taskId) if (AdjustQuantityAccordingToDPadInput(&data[8], data[2]) == TRUE) { UpdateQuantityToTossOrDeposit(data[8], 2); - UpdateSalePriceDisplay(itemid_get_market_price(BagGetItemIdByPocketPosition(gBagMenuState.pocket + 1, data[1])) / 2 * data[8]); + UpdateSalePriceDisplay(ItemId_GetPrice(BagGetItemIdByPocketPosition(gBagMenuState.pocket + 1, data[1])) / 2 * data[8]); } else if (JOY_NEW(A_BUTTON)) { @@ -1923,7 +1923,7 @@ static void Task_SellItem_Yes(u8 taskId) PutWindowTilemap(0); ScheduleBgCopyTilemapToVram(0); CopyItemName(gSpecialVar_ItemId, gStringVar1); - ConvertIntToDecimalStringN(gStringVar3, itemid_get_market_price(BagGetItemIdByPocketPosition(gBagMenuState.pocket + 1, data[1])) / 2 * data[8], STR_CONV_MODE_LEFT_ALIGN, 6); + ConvertIntToDecimalStringN(gStringVar3, ItemId_GetPrice(BagGetItemIdByPocketPosition(gBagMenuState.pocket + 1, data[1])) / 2 * data[8], STR_CONV_MODE_LEFT_ALIGN, 6); StringExpandPlaceholders(gStringVar4, gText_TurnedOverItemsWorthYen); DisplayItemMessageInBag(taskId, FONT_2, gStringVar4, Task_FinalizeSaleToShop); } @@ -1933,7 +1933,7 @@ static void Task_FinalizeSaleToShop(u8 taskId) s16 *data = gTasks[taskId].data; PlaySE(SE_SHOP); RemoveBagItem(gSpecialVar_ItemId, data[8]); - AddMoney(&gSaveBlock1Ptr->money, itemid_get_market_price(gSpecialVar_ItemId) / 2 * data[8]); + AddMoney(&gSaveBlock1Ptr->money, ItemId_GetPrice(gSpecialVar_ItemId) / 2 * data[8]); RecordItemPurchase(gSpecialVar_ItemId, data[8], 2); DestroyListMenuTask(data[0], &gBagMenuState.cursorPos[gBagMenuState.pocket], &gBagMenuState.itemsAbove[gBagMenuState.pocket]); Pocket_CalculateNItemsAndMaxShowed(gBagMenuState.pocket); diff --git a/src/item_use.c b/src/item_use.c index 7c5091ccd..331aa5656 100644 --- a/src/item_use.c +++ b/src/item_use.c @@ -457,7 +457,7 @@ void FieldUseFunc_TmCase(u8 taskId) static void InitTMCaseFromBag(void) { - InitTMCase(0, CB2_BagMenuFromStartMenu, 0); + InitTMCase(TMCASE_FIELD, CB2_BagMenuFromStartMenu, FALSE); } static void Task_InitTMCaseFromField(u8 taskId) @@ -466,7 +466,7 @@ static void Task_InitTMCaseFromField(u8 taskId) { CleanupOverworldWindowsAndTilemaps(); SetFieldCallback2ForItemUse(); - InitTMCase(0, CB2_ReturnToField, 1); + InitTMCase(TMCASE_FIELD, CB2_ReturnToField, TRUE); DestroyTask(taskId); } } diff --git a/src/party_menu.c b/src/party_menu.c index 33293ed9c..4b64d8480 100644 --- a/src/party_menu.c +++ b/src/party_menu.c @@ -4258,7 +4258,7 @@ static void CB2_ReturnToBagMenu(void) static void CB2_ReturnToTMCaseMenu(void) { - InitTMCase(TMCASE_NA, NULL, 0xFF); + InitTMCase(TMCASE_REOPENING, NULL, TMCASE_KEEP_PREV); } static void CB2_ReturnToBerryPouchMenu(void) diff --git a/src/shop.c b/src/shop.c index 7327874ca..37c3c7ee0 100644 --- a/src/shop.c +++ b/src/shop.c @@ -614,7 +614,7 @@ static void BuyMenuPrintPriceInList(u8 windowId, u32 item, u8 y) if (item != INDEX_CANCEL) { - ConvertIntToDecimalStringN(gStringVar1, itemid_get_market_price(item), 0, 4); + ConvertIntToDecimalStringN(gStringVar1, ItemId_GetPrice(item), 0, 4); x = 4 - StringLength(gStringVar1); loc = gStringVar4; while (x-- != 0) @@ -902,7 +902,7 @@ static void Task_BuyMenu(u8 taskId) BuyMenuRemoveScrollIndicatorArrows(); BuyMenuPrintCursor(tListTaskId, 2); RecolorItemDescriptionBox(1); - gShopData.itemPrice = itemid_get_market_price(itemId); + gShopData.itemPrice = ItemId_GetPrice(itemId); if (!IsEnoughMoney(&gSaveBlock1Ptr->money, gShopData.itemPrice)) { BuyMenuDisplayMessage(taskId, gText_YouDontHaveMoney, BuyMenuReturnToItemList); @@ -931,7 +931,7 @@ static void Task_BuyHowManyDialogueInit(u8 taskId) BuyMenuQuantityBoxNormalBorder(3, 0); BuyMenuPrintItemQuantityAndPrice(taskId); ScheduleBgCopyTilemapToVram(0); - maxQuantity = GetMoney(&gSaveBlock1Ptr->money) / itemid_get_market_price(tItemId); + maxQuantity = GetMoney(&gSaveBlock1Ptr->money) / ItemId_GetPrice(tItemId); if (maxQuantity > 99) gShopData.maxQuantity = 99; else @@ -949,7 +949,7 @@ static void Task_BuyHowManyDialogueHandleInput(u8 taskId) if (AdjustQuantityAccordingToDPadInput(&tItemCount, gShopData.maxQuantity) == TRUE) { - gShopData.itemPrice = itemid_get_market_price(tItemId) * tItemCount; + gShopData.itemPrice = ItemId_GetPrice(tItemId) * tItemCount; BuyMenuPrintItemQuantityAndPrice(taskId); } else @@ -1102,7 +1102,7 @@ void RecordItemPurchase(u16 item, u16 quantity, u8 a2) if (history->unk0 < 999999) { - history->unk0 += (itemid_get_market_price(item) >> (a2 - 1)) * quantity; + history->unk0 += (ItemId_GetPrice(item) >> (a2 - 1)) * quantity; if (history->unk0 > 999999) history->unk0 = 999999; } diff --git a/src/strings.c b/src/strings.c index 9ce0e031c..e9b40707e 100644 --- a/src/strings.c +++ b/src/strings.c @@ -207,8 +207,8 @@ const u8 gText_PokeFluteAwakenedMon[] = _("The POKé FLUTE awakened sleeping\nPO const u8 gText_TMCase[] = _("TM CASE"); const u8 gText_Close[] = _("CLOSE"); const u8 gText_TMCaseWillBePutAway[] = _("The TM CASE will be\nput away."); -const u8 gText_FontSize0[] = _("{FONT_0}"); -const u8 gText_FontSize2[] = _("{FONT_2}"); +const u8 gText_Font0[] = _("{FONT_0}"); +const u8 gText_Font2[] = _("{FONT_2}"); const u8 gText_EmptySpace[] = _(" "); const u8 gText_BerryPouch[] = _("BERRY POUCH"); const u8 gText_TheBerryPouchWillBePutAway[] = _("The BERRY POUCH will be\nput away."); diff --git a/src/tm_case.c b/src/tm_case.c index 8ef9e7fbb..401a2a57c 100644 --- a/src/tm_case.c +++ b/src/tm_case.c @@ -1,4 +1,5 @@ #include "global.h" +#include "tm_case.h" #include "gflib.h" #include "decompress.h" #include "graphics.h" @@ -23,45 +24,96 @@ #include "constants/items.h" #include "constants/songs.h" -#define TM_CASE_TM_TAG 400 +// Any item in the TM Case with nonzero importance is considered an HM +#define IS_HM(itemId) (ItemId_GetImportance(itemId) != 0) -struct UnkStruct_203B10C -{ - void (* savedCallback)(void); - u8 tmCaseMenuType; - u8 unk_05; - u8 unk_06; - u16 selectedRow; - u16 scrollOffset; +#define TAG_SCROLL_ARROW 110 + +enum { + WIN_LIST, + WIN_DESCRIPTION, + WIN_SELECTED_MSG, + WIN_TITLE, + WIN_MOVE_INFO_LABELS, + WIN_MOVE_INFO, + WIN_MESSAGE, + WIN_SELL_QUANTITY, + WIN_MONEY, }; -struct UnkStruct_203B118 -{ - void (* savedCallback)(void); - u8 tmSpriteId; +// Window IDs for the context menu that opens when a TM/HM is selected +enum { + WIN_USE_GIVE_EXIT, + WIN_GIVE_EXIT, +}; + +// IDs for the actions in the context menu +enum { + ACTION_USE, + ACTION_GIVE, + ACTION_EXIT +}; + +enum { + COLOR_LIGHT, + COLOR_DARK, + COLOR_CURSOR_SELECTED, + COLOR_MOVE_INFO, + COLOR_CURSOR_ERASE = 0xFF +}; + +// Base position for TM/HM disc sprite +#define DISC_BASE_X 41 +#define DISC_BASE_Y 46 + +#define DISC_CASE_DISTANCE 20 // The total number of pixels a disc travels vertically in/out of the case +#define DISC_Y_MOVE 10 // The number of pixels a disc travels vertically per movement step + +#define TAG_DISC 400 + +#define DISC_HIDDEN 0xFF // When no TM/HM is selected, hide the disc sprite + +enum { + ANIM_TM, + ANIM_HM, +}; + +// The "static" resources are preserved even if the TM case is exited. This is +// useful for when its left temporarily (e.g. going to the party menu to teach a TM) +// but also to preserve the selected item when the TM case is fully closed. +static EWRAM_DATA struct { + void (* exitCallback)(void); + u8 menuType; + bool8 allowSelectClose; + u8 unused; + u16 selectedRow; + u16 scrollOffset; +} sTMCaseStaticResources = {}; + +// The "dynamic" resources will be reset any time the TM case is exited, even temporarily. +static EWRAM_DATA struct { + void (* nextScreenCallback)(void); + u8 discSpriteId; u8 maxTMsShown; u8 numTMs; u8 contextMenuWindowId; - u8 scrollIndicatorArrowPairId; + u8 scrollArrowsTaskId; u16 currItem; const u8 * menuActionIndices; u8 numMenuActions; s16 seqId; - u8 filler_14[8]; -}; + u8 unused[8]; +} * sTMCaseDynamicResources = NULL; -struct UnkStruct_203B11C -{ +// Save the player's bag state when the Pokedude's bag is being shown +static EWRAM_DATA struct { struct ItemSlot bagPocket_TMHM[BAG_TMHM_COUNT]; struct ItemSlot bagPocket_KeyItems[BAG_KEYITEMS_COUNT]; - u16 unk_160; - u16 unk_162; -}; + u16 selectedRow; + u16 scrollOffset; +} * sPokedudeBagBackup = NULL; -static EWRAM_DATA struct UnkStruct_203B10C sTMCaseStaticResources = {}; -static EWRAM_DATA struct UnkStruct_203B118 * sTMCaseDynamicResources = NULL; -static EWRAM_DATA struct UnkStruct_203B11C * sPokedudePackBackup = NULL; -static EWRAM_DATA void *sTilemapBuffer = NULL; // tilemap buffer +static EWRAM_DATA void *sTilemapBuffer = NULL; static EWRAM_DATA struct ListMenuItem * sListMenuItemsBuffer = NULL; static EWRAM_DATA u8 (* sListMenuStringsBuffer)[29] = NULL; static EWRAM_DATA u16 * sTMSpritePaletteBuffer = NULL; @@ -74,28 +126,29 @@ static bool8 HandleLoadTMCaseGraphicsAndPalettes(void); static void CreateTMCaseListMenuBuffers(void); static void InitTMCaseListMenuItems(void); static void GetTMNumberAndMoveString(u8 * dest, u16 itemId); -static void TMCase_MoveCursorFunc(s32 itemIndex, bool8 onInit, struct ListMenu *list); -static void TMCase_ItemPrintFunc(u8 windowId, u32 itemId, u8 y); -static void TMCase_MoveCursor_UpdatePrintedDescription(s32 itemIndex); -static void PrintListMenuCursorAt_WithColorIdx(u8 a0, u8 a1); -static void CreateTMCaseScrollIndicatorArrowPair_Main(void); +static void List_MoveCursorFunc(s32 itemIndex, bool8 onInit, struct ListMenu *list); +static void List_ItemPrintFunc(u8 windowId, u32 itemId, u8 y); +static void PrintDescription(s32 itemIndex); +static void PrintMoveInfo(u16 itemId); +static void PrintListCursorAtRow(u8 y, u8 colorIdx); +static void CreateListScrollArrows(void); static void TMCaseSetup_GetTMCount(void); static void TMCaseSetup_InitListMenuPositions(void); static void TMCaseSetup_UpdateVisualMenuOffset(void); static void Task_FadeOutAndCloseTMCase(u8 taskId); -static void Task_TMCaseMain(u8 taskId); -static void Task_SelectTMAction_FromFieldBag(u8 taskId); -static void Task_TMContextMenu_HandleInput(u8 taskId); -static void TMHMContextMenuAction_Use(u8 taskId); -static void TMHMContextMenuAction_Give(u8 taskId); +static void Task_HandleListInput(u8 taskId); +static void Task_SelectedTMHM_Field(u8 taskId); +static void Task_ContextMenu_HandleInput(u8 taskId); +static void Action_Use(u8 taskId); +static void Action_Give(u8 taskId); static void PrintError_ThereIsNoPokemon(u8 taskId); static void PrintError_ItemCantBeHeld(u8 taskId); static void Task_WaitButtonAfterErrorPrint(u8 taskId); -static void Subtask_CloseContextMenuAndReturnToMain(u8 taskId); -static void TMHMContextMenuAction_Exit(u8 taskId); -static void Task_SelectTMAction_Type1(u8 taskId); -static void Task_SelectTMAction_Type3(u8 taskId); -static void Task_SelectTMAction_FromSellMenu(u8 taskId); +static void CloseMessageAndReturnToList(u8 taskId); +static void Action_Exit(u8 taskId); +static void Task_SelectedTMHM_GiveParty(u8 taskId); +static void Task_SelectedTMHM_GivePC(u8 taskId); +static void Task_SelectedTMHM_Sell(u8 taskId); static void Task_AskConfirmSaleWithAmount(u8 taskId); static void Task_PlaceYesNoBox(u8 taskId); static void Task_SaleOfTMsCanceled(u8 taskId); @@ -105,28 +158,27 @@ static void Task_QuantitySelect_HandleInput(u8 taskId); static void Task_PrintSaleConfirmedText(u8 taskId); static void Task_DoSaleOfTMs(u8 taskId); static void Task_AfterSale_ReturnToList(u8 taskId); -static void Task_TMCaseDude1(u8 taskId); -static void Task_TMCaseDude_Playback(u8 taskId); +static void Task_Pokedude_Start(u8 taskId); +static void Task_Pokedude_Run(u8 taskId); static void InitWindowTemplatesAndPals(void); -static void AddTextPrinterParameterized_ColorByIndex(u8 windowId, u8 fontId, const u8 * str, u8 x, u8 y, u8 letterSpacing, u8 lineSpacing, u8 speed, u8 colorIdx); +static void TMCase_Print(u8 windowId, u8 fontId, const u8 * str, u8 x, u8 y, u8 letterSpacing, u8 lineSpacing, u8 speed, u8 colorIdx); static void TMCase_SetWindowBorder1(u8 windowId); static void TMCase_SetWindowBorder2(u8 windowId); -static void TMCase_PrintMessageWithFollowupTask(u8 taskId, u8 fontId, const u8 * str, TaskFunc func); -static void PrintStringTMCaseOnWindow3(void); -static void DrawMoveInfoUIMarkers(void); -static void TMCase_MoveCursor_UpdatePrintedTMInfo(u16 itemId); +static void PrintMessageWithFollowupTask(u8 taskId, u8 fontId, const u8 * str, TaskFunc func); +static void PrintTitle(void); +static void DrawMoveInfoLabels(void); static void PlaceHMTileInWindow(u8 windowId, u8 x, u8 y); -static void HandlePrintMoneyOnHand(void); +static void PrintPlayersMoney(void); static void HandleCreateYesNoMenu(u8 taskId, const struct YesNoFuncTable * ptrs); -static u8 AddTMContextMenu(u8 * a0, u8 a1); -static void RemoveTMContextMenu(u8 * a0); -static u8 CreateTMSprite(u16 itemId); -static void SetTMSpriteAnim(struct Sprite *sprite, u8 var); -static void TintTMSpriteByType(u8 type); -static void UpdateTMSpritePosition(struct Sprite *sprite, u8 var); -static void InitSelectedTMSpriteData(u8 a0, u16 itemId); -static void SpriteCB_MoveTMSpriteInCase(struct Sprite *sprite); -static void LoadTMTypePalettes(void); +static u8 AddContextMenu(u8 * windowId, u8 windowIndex); +static void RemoveContextMenu(u8 * windowId); +static u8 CreateDiscSprite(u16 itemId); +static void SetDiscSpriteAnim(struct Sprite *sprite, u8 tmIdx); +static void TintDiscpriteByType(u8 type); +static void SetDiscSpritePosition(struct Sprite *sprite, u8 tmIdx); +static void SwapDisc(u8 spriteId, u16 itemId); +static void SpriteCB_SwapDisc(struct Sprite *sprite); +static void LoadDiscTypePalettes(void); static const struct BgTemplate sBGTemplates[] = { { @@ -156,21 +208,24 @@ static const struct BgTemplate sBGTemplates[] = { } }; +// The list of functions to run when a TM/HM is selected. +// What happens when one is selected depends on how the player arrived at the TM case static void (*const sSelectTMActionTasks[])(u8 taskId) = { - Task_SelectTMAction_FromFieldBag, - Task_SelectTMAction_Type1, - Task_SelectTMAction_FromSellMenu, - Task_SelectTMAction_Type3 + [TMCASE_FIELD] = Task_SelectedTMHM_Field, + [TMCASE_GIVE_PARTY] = Task_SelectedTMHM_GiveParty, + [TMCASE_SELL] = Task_SelectedTMHM_Sell, + [TMCASE_GIVE_PC] = Task_SelectedTMHM_GivePC }; -static const struct MenuAction sMenuActions_UseGiveExit[] = { - {gOtherText_Use, TMHMContextMenuAction_Use }, - {gOtherText_Give, TMHMContextMenuAction_Give}, - {gOtherText_Exit, TMHMContextMenuAction_Exit}, +static const struct MenuAction sMenuActions[] = { + [ACTION_USE] = {gOtherText_Use, Action_Use }, + [ACTION_GIVE] = {gOtherText_Give, Action_Give}, + [ACTION_EXIT] = {gOtherText_Exit, Action_Exit}, }; -static const u8 sMenuActionIndices_Field[] = {0, 1, 2}; -static const u8 sMenuActionIndices_UnionRoom[] = {1, 2}; +static const u8 sMenuActionIndices_Field[] = {ACTION_USE, ACTION_GIVE, ACTION_EXIT}; +static const u8 sMenuActionIndices_UnionRoom[] = {ACTION_GIVE, ACTION_EXIT}; + static const struct YesNoFuncTable sYesNoFuncTable = {Task_PrintSaleConfirmedText, Task_SaleOfTMsCanceled}; static const u8 sText_ClearTo18[] = _("{CLEAR_TO 18}"); @@ -179,30 +234,126 @@ static const u8 sText_SingleSpace[] = _(" "); static ALIGNED(4) const u16 sPal3Override[] = {RGB(8, 8, 8), RGB(30, 16, 6)}; static const u8 sTextColors[][3] = { - {0, 1, 2}, - {0, 2, 3}, - {0, 3, 6}, - {0, 14, 10} + [COLOR_LIGHT] = {0, 1, 2}, + [COLOR_DARK] = {0, 2, 3}, + [COLOR_CURSOR_SELECTED] = {0, 3, 6}, + [COLOR_MOVE_INFO] = {0, 14, 10}, }; static const struct WindowTemplate sWindowTemplates[] = { - {0x00, 0x0a, 0x01, 0x13, 0x0a, 0x0f, 0x0081}, - {0x00, 0x0c, 0x0c, 0x12, 0x08, 0x0a, 0x013f}, - {0x01, 0x05, 0x0f, 0x0f, 0x04, 0x0d, 0x01f9}, - {0x00, 0x00, 0x01, 0x0a, 0x02, 0x0f, 0x0235}, - {0x00, 0x01, 0x0d, 0x05, 0x06, 0x0c, 0x0249}, - {0x00, 0x07, 0x0d, 0x05, 0x06, 0x0c, 0x0267}, - {0x01, 0x02, 0x0f, 0x1a, 0x04, 0x0b, 0x0285}, - {0x01, 0x11, 0x09, 0x0c, 0x04, 0x0f, 0x02ed}, - {0x01, 0x01, 0x01, 0x08, 0x03, 0x0d, 0x031d}, + [WIN_LIST] = { + .bg = 0, + .tilemapLeft = 10, + .tilemapTop = 1, + .width = 19, + .height = 10, + .paletteNum = 15, + .baseBlock = 0x081 + }, + [WIN_DESCRIPTION] = { + .bg = 0, + .tilemapLeft = 12, + .tilemapTop = 12, + .width = 18, + .height = 8, + .paletteNum = 10, + .baseBlock = 0x13f + }, + [WIN_SELECTED_MSG] = { + .bg = 1, + .tilemapLeft = 5, + .tilemapTop = 15, + .width = 15, + .height = 4, + .paletteNum = 13, + .baseBlock = 0x1f9 + }, + [WIN_TITLE] = { + .bg = 0, + .tilemapLeft = 0, + .tilemapTop = 1, + .width = 10, + .height = 2, + .paletteNum = 15, + .baseBlock = 0x235 + }, + [WIN_MOVE_INFO_LABELS] = { + .bg = 0, + .tilemapLeft = 1, + .tilemapTop = 13, + .width = 5, + .height = 6, + .paletteNum = 12, + .baseBlock = 0x249 + }, + [WIN_MOVE_INFO] = { + .bg = 0, + .tilemapLeft = 7, + .tilemapTop = 13, + .width = 5, + .height = 6, + .paletteNum = 12, + .baseBlock = 0x267 + }, + [WIN_MESSAGE] = { + .bg = 1, + .tilemapLeft = 2, + .tilemapTop = 15, + .width = 26, + .height = 4, + .paletteNum = 11, + .baseBlock = 0x285 + }, + [WIN_SELL_QUANTITY] = { + .bg = 1, + .tilemapLeft = 17, + .tilemapTop = 9, + .width = 12, + .height = 4, + .paletteNum = 15, + .baseBlock = 0x2ed + }, + [WIN_MONEY] = { + .bg = 1, + .tilemapLeft = 1, + .tilemapTop = 1, + .width = 8, + .height = 3, + .paletteNum = 13, + .baseBlock = 0x31d + }, DUMMY_WIN_TEMPLATE }; -static const struct WindowTemplate sYesNoWindowTemplate = {0x01, 0x15, 0x09, 0x06, 0x04, 0x0f, 0x0335}; +static const struct WindowTemplate sYesNoWindowTemplate = { + .bg = 1, + .tilemapLeft = 21, + .tilemapTop = 9, + .width = 6, + .height = 4, + .paletteNum = 15, + .baseBlock = 0x335 +}; -static const struct WindowTemplate sTMContextWindowTemplates[] = { - {0x01, 0x16, 0x0d, 0x07, 0x06, 0x0f, 0x01cf}, - {0x01, 0x16, 0x0f, 0x07, 0x04, 0x0f, 0x01cf} +static const struct WindowTemplate sWindowTemplates_ContextMenu[] = { + [WIN_USE_GIVE_EXIT] = { + .bg = 1, + .tilemapLeft = 22, + .tilemapTop = 13, + .width = 7, + .height = 6, + .paletteNum = 15, + .baseBlock = 0x1cf + }, + [WIN_GIVE_EXIT] = { + .bg = 1, + .tilemapLeft = 22, + .tilemapTop = 15, + .width = 7, + .height = 4, + .paletteNum = 15, + .baseBlock = 0x1cf + }, }; static const struct OamData sTMSpriteOamData = { @@ -210,35 +361,35 @@ static const struct OamData sTMSpriteOamData = { .priority = 2 }; -static const union AnimCmd sTMSpriteAnim0[] = { +static const union AnimCmd sAnim_TM[] = { ANIMCMD_FRAME(0, 0), ANIMCMD_END }; -static const union AnimCmd sTMSpriteAnim1[] = { +static const union AnimCmd sAnim_HM[] = { ANIMCMD_FRAME(16, 0), ANIMCMD_END }; -static const union AnimCmd *const sTMSpriteAnims[] = { - sTMSpriteAnim0, - sTMSpriteAnim1 +static const union AnimCmd *const sAnims_Disc[] = { + [ANIM_TM] = sAnim_TM, + [ANIM_HM] = sAnim_HM }; -static const struct CompressedSpriteSheet sTMSpriteSheet = { - (const void *)gTMCaseDisc_Gfx, - 0x400, - TM_CASE_TM_TAG +static const struct CompressedSpriteSheet sSpriteSheet_Disc = { + .data = gTMCaseDisc_Gfx, + .size = 0x400, + .tag = TAG_DISC }; -static const struct SpriteTemplate sTMSpriteTemplate = { - TM_CASE_TM_TAG, - TM_CASE_TM_TAG, - &sTMSpriteOamData, - sTMSpriteAnims, - NULL, - gDummySpriteAffineAnimTable, - SpriteCallbackDummy +static const struct SpriteTemplate sSpriteTemplate_Disc = { + .tileTag = TAG_DISC, + .paletteTag = TAG_DISC, + .oam = &sTMSpriteOamData, + .anims = sAnims_Disc, + .images = NULL, + .affineAnims = gDummySpriteAffineAnimTable, + .callback = SpriteCallbackDummy }; static const u16 sTMSpritePaletteOffsetByType[NUMBER_OF_MON_TYPES] = { @@ -261,19 +412,19 @@ static const u16 sTMSpritePaletteOffsetByType[NUMBER_OF_MON_TYPES] = { [TYPE_DRAGON] = 0x100 }; -void InitTMCase(u8 type, void (* callback)(void), u8 a2) +void InitTMCase(u8 type, void (* exitCallback)(void), bool8 allowSelectClose) { ResetBufferPointers_NoFree(); - sTMCaseDynamicResources = Alloc(sizeof(struct UnkStruct_203B118)); - sTMCaseDynamicResources->savedCallback = 0; - sTMCaseDynamicResources->scrollIndicatorArrowPairId = 0xFF; - sTMCaseDynamicResources->contextMenuWindowId = 0xFF; - if (type != 5) - sTMCaseStaticResources.tmCaseMenuType = type; - if (callback != NULL) - sTMCaseStaticResources.savedCallback = callback; - if (a2 != 0xFF) - sTMCaseStaticResources.unk_05 = a2; + sTMCaseDynamicResources = Alloc(sizeof(*sTMCaseDynamicResources)); + sTMCaseDynamicResources->nextScreenCallback = NULL; + sTMCaseDynamicResources->scrollArrowsTaskId = TASK_NONE; + sTMCaseDynamicResources->contextMenuWindowId = WINDOW_NONE; + if (type != TMCASE_REOPENING) + sTMCaseStaticResources.menuType = type; + if (exitCallback != NULL) + sTMCaseStaticResources.exitCallback = exitCallback; + if (allowSelectClose != TMCASE_KEEP_PREV) + sTMCaseStaticResources.allowSelectClose = allowSelectClose; gTextFlags.autoScroll = FALSE; SetMainCallback2(CB2_SetUpTMCaseUI_Blocking); } @@ -307,6 +458,14 @@ static void CB2_SetUpTMCaseUI_Blocking(void) } } +#define tListTaskId data[0] +#define tSelection data[1] +#define tQuantityOwned data[2] +#define tQuantitySelected data[8] + +#define tPokedudeState data[8] // Re-used +#define tPokedudeTimer data[9] + static bool8 DoSetUpTMCaseUI(void) { u8 taskId; @@ -362,7 +521,7 @@ static bool8 DoSetUpTMCaseUI(void) gMain.state++; break; case 11: - DrawMoveInfoUIMarkers(); + DrawMoveInfoLabels(); gMain.state++; break; case 12: @@ -371,23 +530,23 @@ static bool8 DoSetUpTMCaseUI(void) gMain.state++; break; case 13: - PrintStringTMCaseOnWindow3(); + PrintTitle(); gMain.state++; break; case 14: - if (sTMCaseStaticResources.tmCaseMenuType == 4) - taskId = CreateTask(Task_TMCaseDude1, 0); + if (sTMCaseStaticResources.menuType == TMCASE_POKEDUDE) + taskId = CreateTask(Task_Pokedude_Start, 0); else - taskId = CreateTask(Task_TMCaseMain, 0); - gTasks[taskId].data[0] = ListMenuInit(&gMultiuseListMenuTemplate, sTMCaseStaticResources.scrollOffset, sTMCaseStaticResources.selectedRow); + taskId = CreateTask(Task_HandleListInput, 0); + gTasks[taskId].tListTaskId = ListMenuInit(&gMultiuseListMenuTemplate, sTMCaseStaticResources.scrollOffset, sTMCaseStaticResources.selectedRow); gMain.state++; break; case 15: - CreateTMCaseScrollIndicatorArrowPair_Main(); + CreateListScrollArrows(); gMain.state++; break; case 16: - sTMCaseDynamicResources->tmSpriteId = CreateTMSprite(BagGetItemIdByPocketPosition(POCKET_TM_CASE, sTMCaseStaticResources.scrollOffset + sTMCaseStaticResources.selectedRow)); + sTMCaseDynamicResources->discSpriteId = CreateDiscSprite(BagGetItemIdByPocketPosition(POCKET_TM_CASE, sTMCaseStaticResources.scrollOffset + sTMCaseStaticResources.selectedRow)); gMain.state++; break; case 17: @@ -423,7 +582,7 @@ static void LoadBGTemplates(void) ptr = &sTilemapBuffer; *ptr = AllocZeroed(0x800); ResetBgsAndClearDma3BusyFlags(0); - InitBgsFromTemplates(0, sBGTemplates, NELEMS(sBGTemplates)); + InitBgsFromTemplates(0, sBGTemplates, ARRAY_COUNT(sBGTemplates)); SetBgTilemapBuffer(2, *ptr); ScheduleBgCopyTilemapToVram(1); ScheduleBgCopyTilemapToVram(2); @@ -462,11 +621,11 @@ static bool8 HandleLoadTMCaseGraphicsAndPalettes(void) sTMCaseDynamicResources->seqId++; break; case 4: - LoadCompressedSpriteSheet(&sTMSpriteSheet); + LoadCompressedSpriteSheet(&sSpriteSheet_Disc); sTMCaseDynamicResources->seqId++; break; default: - LoadTMTypePalettes(); + LoadDiscTypePalettes(); sTMCaseDynamicResources->seqId = 0; return TRUE; } @@ -493,10 +652,11 @@ static void InitTMCaseListMenuItems(void) sListMenuItemsBuffer[i].index = i; } sListMenuItemsBuffer[i].label = gText_Close; - sListMenuItemsBuffer[i].index = -2; + sListMenuItemsBuffer[i].index = LIST_CANCEL; + gMultiuseListMenuTemplate.items = sListMenuItemsBuffer; - gMultiuseListMenuTemplate.totalItems = sTMCaseDynamicResources->numTMs + 1; - gMultiuseListMenuTemplate.windowId = 0; + gMultiuseListMenuTemplate.totalItems = sTMCaseDynamicResources->numTMs + 1; // +1 for Cancel + gMultiuseListMenuTemplate.windowId = WIN_LIST; gMultiuseListMenuTemplate.header_X = 0; gMultiuseListMenuTemplate.item_X = 8; gMultiuseListMenuTemplate.cursor_X = 0; @@ -508,15 +668,15 @@ static void InitTMCaseListMenuItems(void) gMultiuseListMenuTemplate.cursorPal = 2; gMultiuseListMenuTemplate.fillValue = 0; gMultiuseListMenuTemplate.cursorShadowPal = 3; - gMultiuseListMenuTemplate.moveCursorFunc = TMCase_MoveCursorFunc; - gMultiuseListMenuTemplate.itemPrintFunc = TMCase_ItemPrintFunc; + gMultiuseListMenuTemplate.moveCursorFunc = List_MoveCursorFunc; + gMultiuseListMenuTemplate.itemPrintFunc = List_ItemPrintFunc; gMultiuseListMenuTemplate.cursorKind = 0; gMultiuseListMenuTemplate.scrollMultiple = 0; } static void GetTMNumberAndMoveString(u8 * dest, u16 itemId) { - StringCopy(gStringVar4, gText_FontSize0); + StringCopy(gStringVar4, gText_Font0); if (itemId >= ITEM_HM01) { StringAppend(gStringVar4, sText_ClearTo18); @@ -531,38 +691,38 @@ static void GetTMNumberAndMoveString(u8 * dest, u16 itemId) StringAppend(gStringVar4, gStringVar1); } StringAppend(gStringVar4, sText_SingleSpace); - StringAppend(gStringVar4, gText_FontSize2); + StringAppend(gStringVar4, gText_Font2); StringAppend(gStringVar4, gMoveNames[ItemIdToBattleMoveId(itemId)]); StringCopy(dest, gStringVar4); } -static void TMCase_MoveCursorFunc(s32 itemIndex, bool8 onInit, struct ListMenu *list) +static void List_MoveCursorFunc(s32 itemIndex, bool8 onInit, struct ListMenu *list) { u16 itemId; - if (itemIndex == -2) - itemId = 0; + if (itemIndex == LIST_CANCEL) + itemId = ITEM_NONE; else itemId = BagGetItemIdByPocketPosition(POCKET_TM_CASE, itemIndex); if (onInit != TRUE) { PlaySE(SE_SELECT); - InitSelectedTMSpriteData(sTMCaseDynamicResources->tmSpriteId, itemId); + SwapDisc(sTMCaseDynamicResources->discSpriteId, itemId); } - TMCase_MoveCursor_UpdatePrintedDescription(itemIndex); - TMCase_MoveCursor_UpdatePrintedTMInfo(itemId); + PrintDescription(itemIndex); + PrintMoveInfo(itemId); } -static void TMCase_ItemPrintFunc(u8 windowId, u32 itemId, u8 y) +static void List_ItemPrintFunc(u8 windowId, u32 itemIndex, u8 y) { - if (itemId != -2) + if (itemIndex != LIST_CANCEL) { - if (!itemid_is_unique(BagGetItemIdByPocketPosition(POCKET_TM_CASE, itemId))) + if (!IS_HM(BagGetItemIdByPocketPosition(POCKET_TM_CASE, itemIndex))) { - ConvertIntToDecimalStringN(gStringVar1, BagGetQuantityByPocketPosition(POCKET_TM_CASE, itemId), STR_CONV_MODE_RIGHT_ALIGN, 3); + ConvertIntToDecimalStringN(gStringVar1, BagGetQuantityByPocketPosition(POCKET_TM_CASE, itemIndex), STR_CONV_MODE_RIGHT_ALIGN, 3); StringExpandPlaceholders(gStringVar4, gText_TimesStrVar1); - AddTextPrinterParameterized_ColorByIndex(windowId, FONT_0, gStringVar4, 0x7E, y, 0, 0, 0xFF, 1); + TMCase_Print(windowId, FONT_0, gStringVar4, 126, y, 0, 0, TEXT_SKIP_DRAW, COLOR_DARK); } else { @@ -571,62 +731,69 @@ static void TMCase_ItemPrintFunc(u8 windowId, u32 itemId, u8 y) } } -static void TMCase_MoveCursor_UpdatePrintedDescription(s32 itemIndex) +static void PrintDescription(s32 itemIndex) { const u8 * str; - if (itemIndex != -2) - { + if (itemIndex != LIST_CANCEL) str = ItemId_GetDescription(BagGetItemIdByPocketPosition(POCKET_TM_CASE, itemIndex)); - } else - { str = gText_TMCaseWillBePutAway; - } - FillWindowPixelBuffer(1, 0); - AddTextPrinterParameterized_ColorByIndex(1, FONT_2, str, 2, 3, 1, 0, 0, 0); + FillWindowPixelBuffer(WIN_DESCRIPTION, 0); + TMCase_Print(WIN_DESCRIPTION, FONT_2, str, 2, 3, 1, 0, 0, COLOR_LIGHT); } -static void FillBG2RowWithPalette_2timesNplus1(s32 a0) +// Darkens (or subsequently lightens) the blue bg tiles around the description window when a TM/HM is selected. +// shade=0: lighten, shade=1: darken +static void SetDescriptionWindowShade(s32 shade) { - SetBgTilemapPalette(2, 0, 12, 30, 8, 2 * a0 + 1); + SetBgTilemapPalette(2, 0, 12, 30, 8, 2 * shade + 1); ScheduleBgCopyTilemapToVram(2); } -static void PrintListMenuCursorByID_WithColorIdx(u8 a0, u8 a1) +static void PrintListCursor(u8 listTaskId, u8 colorIdx) { - PrintListMenuCursorAt_WithColorIdx(ListMenuGetYCoordForPrintingArrowCursor(a0), a1); + PrintListCursorAtRow(ListMenuGetYCoordForPrintingArrowCursor(listTaskId), colorIdx); } -static void PrintListMenuCursorAt_WithColorIdx(u8 a0, u8 a1) +static void PrintListCursorAtRow(u8 y, u8 colorIdx) { - if (a1 == 0xFF) + if (colorIdx == COLOR_CURSOR_ERASE) { - FillWindowPixelRect(0, 0, 0, a0, GetFontAttribute(FONT_2, FONTATTR_MAX_LETTER_WIDTH), GetFontAttribute(FONT_2, FONTATTR_MAX_LETTER_HEIGHT)); - CopyWindowToVram(0, COPYWIN_GFX); + // Never used. Would erase cursor (but also a portion of the list text) + FillWindowPixelRect(WIN_LIST, 0, 0, y, GetFontAttribute(FONT_2, FONTATTR_MAX_LETTER_WIDTH), GetFontAttribute(FONT_2, FONTATTR_MAX_LETTER_HEIGHT)); + CopyWindowToVram(WIN_LIST, COPYWIN_GFX); } else { - AddTextPrinterParameterized_ColorByIndex(0, FONT_2, gText_SelectorArrow2, 0, a0, 0, 0, 0, a1); + TMCase_Print(WIN_LIST, FONT_2, gText_SelectorArrow2, 0, y, 0, 0, 0, colorIdx); } } -static void CreateTMCaseScrollIndicatorArrowPair_Main(void) +static void CreateListScrollArrows(void) { - sTMCaseDynamicResources->scrollIndicatorArrowPairId = AddScrollIndicatorArrowPairParameterized(2, 0xA0, 0x08, 0x58, sTMCaseDynamicResources->numTMs - sTMCaseDynamicResources->maxTMsShown + 1, 0x6E, 0x6E, &sTMCaseStaticResources.scrollOffset); + sTMCaseDynamicResources->scrollArrowsTaskId = AddScrollIndicatorArrowPairParameterized(SCROLL_ARROW_UP, + 160, 8, 88, + sTMCaseDynamicResources->numTMs - sTMCaseDynamicResources->maxTMsShown + 1, + TAG_SCROLL_ARROW, TAG_SCROLL_ARROW, + &sTMCaseStaticResources.scrollOffset); } -static void CreateTMCaseScrollIndicatorArrowPair_SellQuantitySelect(void) +static void CreateQuantityScrollArrows(void) { sTMCaseDynamicResources->currItem = 1; - sTMCaseDynamicResources->scrollIndicatorArrowPairId = AddScrollIndicatorArrowPairParameterized(2, 0x98, 0x48, 0x68, 2, 0x6E, 0x6E, &sTMCaseDynamicResources->currItem); + sTMCaseDynamicResources->scrollArrowsTaskId = AddScrollIndicatorArrowPairParameterized(SCROLL_ARROW_UP, + 152, 72, 104, + 2, + TAG_SCROLL_ARROW, TAG_SCROLL_ARROW, + &sTMCaseDynamicResources->currItem); } -static void RemoveTMCaseScrollIndicatorArrowPair(void) +static void RemoveScrollArrows(void) { - if (sTMCaseDynamicResources->scrollIndicatorArrowPairId != 0xFF) + if (sTMCaseDynamicResources->scrollArrowsTaskId != TASK_NONE) { - RemoveScrollIndicatorArrowPair(sTMCaseDynamicResources->scrollIndicatorArrowPairId); - sTMCaseDynamicResources->scrollIndicatorArrowPairId = 0xFF; + RemoveScrollIndicatorArrowPair(sTMCaseDynamicResources->scrollArrowsTaskId); + sTMCaseDynamicResources->scrollArrowsTaskId = TASK_NONE; } } @@ -709,18 +876,18 @@ static void Task_FadeOutAndCloseTMCase(u8 taskId) if (!gPaletteFade.active) { - DestroyListMenuTask(data[0], &sTMCaseStaticResources.scrollOffset, &sTMCaseStaticResources.selectedRow); - if (sTMCaseDynamicResources->savedCallback != NULL) - SetMainCallback2(sTMCaseDynamicResources->savedCallback); + DestroyListMenuTask(tListTaskId, &sTMCaseStaticResources.scrollOffset, &sTMCaseStaticResources.selectedRow); + if (sTMCaseDynamicResources->nextScreenCallback != NULL) + SetMainCallback2(sTMCaseDynamicResources->nextScreenCallback); else - SetMainCallback2(sTMCaseStaticResources.savedCallback); - RemoveTMCaseScrollIndicatorArrowPair(); + SetMainCallback2(sTMCaseStaticResources.exitCallback); + RemoveScrollArrows(); DestroyTMCaseBuffers(); DestroyTask(taskId); } } -static void Task_TMCaseMain(u8 taskId) +static void Task_HandleListInput(u8 taskId) { s16 * data = gTasks[taskId].data; s32 input; @@ -729,9 +896,9 @@ static void Task_TMCaseMain(u8 taskId) { if (MenuHelpers_CallLinkSomething() != TRUE) { - input = ListMenu_ProcessInput(data[0]); - ListMenuGetScrollAndRow(data[0], &sTMCaseStaticResources.scrollOffset, &sTMCaseStaticResources.selectedRow); - if (JOY_NEW(SELECT_BUTTON) && sTMCaseStaticResources.unk_05 == 1) + input = ListMenu_ProcessInput(tListTaskId); + ListMenuGetScrollAndRow(tListTaskId, &sTMCaseStaticResources.scrollOffset, &sTMCaseStaticResources.selectedRow); + if (JOY_NEW(SELECT_BUTTON) && sTMCaseStaticResources.allowSelectClose == TRUE) { PlaySE(SE_SELECT); gSpecialVar_ItemId = ITEM_NONE; @@ -741,22 +908,22 @@ static void Task_TMCaseMain(u8 taskId) { switch (input) { - case -1: + case LIST_NOTHING_CHOSEN: break; - case -2: + case LIST_CANCEL: PlaySE(SE_SELECT); - gSpecialVar_ItemId = 0; + gSpecialVar_ItemId = ITEM_NONE; Task_BeginFadeOutFromTMCase(taskId); break; default: PlaySE(SE_SELECT); - FillBG2RowWithPalette_2timesNplus1(1); - RemoveTMCaseScrollIndicatorArrowPair(); - PrintListMenuCursorByID_WithColorIdx(data[0], 2); - data[1] = input; - data[2] = BagGetQuantityByPocketPosition(POCKET_TM_CASE, input); + SetDescriptionWindowShade(1); + RemoveScrollArrows(); + PrintListCursor(tListTaskId, COLOR_CURSOR_SELECTED); + tSelection = input; + tQuantityOwned = BagGetQuantityByPocketPosition(POCKET_TM_CASE, input); gSpecialVar_ItemId = BagGetItemIdByPocketPosition(POCKET_TM_CASE, input); - gTasks[taskId].func = sSelectTMActionTasks[sTMCaseStaticResources.tmCaseMenuType]; + gTasks[taskId].func = sSelectTMActionTasks[sTMCaseStaticResources.menuType]; break; } } @@ -764,47 +931,67 @@ static void Task_TMCaseMain(u8 taskId) } } -static void Subtask_ReturnToTMCaseMain(u8 taskId) +static void ReturnToList(u8 taskId) { - FillBG2RowWithPalette_2timesNplus1(0); - CreateTMCaseScrollIndicatorArrowPair_Main(); - gTasks[taskId].func = Task_TMCaseMain; + SetDescriptionWindowShade(0); + CreateListScrollArrows(); + gTasks[taskId].func = Task_HandleListInput; } -static void Task_SelectTMAction_FromFieldBag(u8 taskId) +// When a TM/HM in the list is selected in the field, create a context +// menu with a list of actions that can be taken. +static void Task_SelectedTMHM_Field(u8 taskId) { u8 * strbuf; - TMCase_SetWindowBorder2(2); + + // Create context window + TMCase_SetWindowBorder2(WIN_SELECTED_MSG); if (!MenuHelpers_LinkSomething() && InUnionRoom() != TRUE) { - AddTMContextMenu(&sTMCaseDynamicResources->contextMenuWindowId, 0); + // Regular TM/HM context menu + AddContextMenu(&sTMCaseDynamicResources->contextMenuWindowId, WIN_USE_GIVE_EXIT); sTMCaseDynamicResources->menuActionIndices = sMenuActionIndices_Field; - sTMCaseDynamicResources->numMenuActions = NELEMS(sMenuActionIndices_Field); + sTMCaseDynamicResources->numMenuActions = ARRAY_COUNT(sMenuActionIndices_Field); } else { - AddTMContextMenu(&sTMCaseDynamicResources->contextMenuWindowId, 1); + // In Union Room, "Use" is removed from the context menu + AddContextMenu(&sTMCaseDynamicResources->contextMenuWindowId, WIN_GIVE_EXIT); sTMCaseDynamicResources->menuActionIndices = sMenuActionIndices_UnionRoom; - sTMCaseDynamicResources->numMenuActions = NELEMS(sMenuActionIndices_UnionRoom); + sTMCaseDynamicResources->numMenuActions = ARRAY_COUNT(sMenuActionIndices_UnionRoom); } - AddItemMenuActionTextPrinters(sTMCaseDynamicResources->contextMenuWindowId, FONT_2, GetMenuCursorDimensionByFont(FONT_2, 0), 2, 0, GetFontAttribute(FONT_2, FONTATTR_MAX_LETTER_HEIGHT) + 2, sTMCaseDynamicResources->numMenuActions, sMenuActions_UseGiveExit, sTMCaseDynamicResources->menuActionIndices); + + // Print context window actions + AddItemMenuActionTextPrinters(sTMCaseDynamicResources->contextMenuWindowId, + FONT_2, + GetMenuCursorDimensionByFont(FONT_2, 0), + 2, + 0, + GetFontAttribute(FONT_2, FONTATTR_MAX_LETTER_HEIGHT) + 2, + sTMCaseDynamicResources->numMenuActions, + sMenuActions, + sTMCaseDynamicResources->menuActionIndices); + Menu_InitCursor(sTMCaseDynamicResources->contextMenuWindowId, FONT_2, 0, 2, GetFontAttribute(FONT_2, FONTATTR_MAX_LETTER_HEIGHT) + 2, sTMCaseDynamicResources->numMenuActions, 0); + + // Print label text next to the context window strbuf = Alloc(256); GetTMNumberAndMoveString(strbuf, gSpecialVar_ItemId); StringAppend(strbuf, gText_Var1IsSelected + 2); // +2 skips over the stringvar - AddTextPrinterParameterized_ColorByIndex(2, FONT_2, strbuf, 0, 2, 1, 0, 0, 1); + TMCase_Print(WIN_SELECTED_MSG, FONT_2, strbuf, 0, 2, 1, 0, 0, COLOR_DARK); Free(strbuf); - if (itemid_is_unique(gSpecialVar_ItemId)) + if (IS_HM(gSpecialVar_ItemId)) { - PlaceHMTileInWindow(2, 0, 2); - CopyWindowToVram(2, COPYWIN_GFX); + PlaceHMTileInWindow(WIN_SELECTED_MSG, 0, 2); + CopyWindowToVram(WIN_SELECTED_MSG, COPYWIN_GFX); } + ScheduleBgCopyTilemapToVram(0); ScheduleBgCopyTilemapToVram(1); - gTasks[taskId].func = Task_TMContextMenu_HandleInput; + gTasks[taskId].func = Task_ContextMenu_HandleInput; } -static void Task_TMContextMenu_HandleInput(u8 taskId) +static void Task_ContextMenu_HandleInput(u8 taskId) { s8 input; @@ -813,26 +1000,27 @@ static void Task_TMContextMenu_HandleInput(u8 taskId) input = Menu_ProcessInputNoWrapAround(); switch (input) { - case -1: + case MENU_B_PRESSED: + // Run last action in list (Exit) PlaySE(SE_SELECT); - sMenuActions_UseGiveExit[sTMCaseDynamicResources->menuActionIndices[sTMCaseDynamicResources->numMenuActions - 1]].func.void_u8(taskId); + sMenuActions[sTMCaseDynamicResources->menuActionIndices[sTMCaseDynamicResources->numMenuActions - 1]].func.void_u8(taskId); break; - case -2: + case MENU_NOTHING_CHOSEN: break; default: PlaySE(SE_SELECT); - sMenuActions_UseGiveExit[sTMCaseDynamicResources->menuActionIndices[input]].func.void_u8(taskId); + sMenuActions[sTMCaseDynamicResources->menuActionIndices[input]].func.void_u8(taskId); break; } } } -static void TMHMContextMenuAction_Use(u8 taskId) +static void Action_Use(u8 taskId) { - RemoveTMContextMenu(&sTMCaseDynamicResources->contextMenuWindowId); - ClearStdWindowAndFrameToTransparent(2, FALSE); - ClearWindowTilemap(2); - PutWindowTilemap(0); + RemoveContextMenu(&sTMCaseDynamicResources->contextMenuWindowId); + ClearStdWindowAndFrameToTransparent(WIN_SELECTED_MSG, FALSE); + ClearWindowTilemap(WIN_SELECTED_MSG); + PutWindowTilemap(WIN_LIST); ScheduleBgCopyTilemapToVram(0); ScheduleBgCopyTilemapToVram(1); if (CalculatePlayerPartyCount() == 0) @@ -841,25 +1029,26 @@ static void TMHMContextMenuAction_Use(u8 taskId) } else { + // Chose a TM/HM to use, exit TM case for party menu gItemUseCB = ItemUseCB_TMHM; - sTMCaseDynamicResources->savedCallback = CB2_ShowPartyMenuForItemUse; + sTMCaseDynamicResources->nextScreenCallback = CB2_ShowPartyMenuForItemUse; Task_BeginFadeOutFromTMCase(taskId); } } -static void TMHMContextMenuAction_Give(u8 taskId) +static void Action_Give(u8 taskId) { s16 * data = gTasks[taskId].data; - u16 itemId = BagGetItemIdByPocketPosition(POCKET_TM_CASE, data[1]); - RemoveTMContextMenu(&sTMCaseDynamicResources->contextMenuWindowId); - ClearStdWindowAndFrameToTransparent(2, FALSE); - ClearWindowTilemap(2); - PutWindowTilemap(1); - PutWindowTilemap(4); - PutWindowTilemap(5); + u16 itemId = BagGetItemIdByPocketPosition(POCKET_TM_CASE, tSelection); + RemoveContextMenu(&sTMCaseDynamicResources->contextMenuWindowId); + ClearStdWindowAndFrameToTransparent(WIN_SELECTED_MSG, FALSE); + ClearWindowTilemap(WIN_SELECTED_MSG); + PutWindowTilemap(WIN_DESCRIPTION); + PutWindowTilemap(WIN_MOVE_INFO_LABELS); + PutWindowTilemap(WIN_MOVE_INFO); ScheduleBgCopyTilemapToVram(0); ScheduleBgCopyTilemapToVram(1); - if (!itemid_is_unique(itemId)) + if (!IS_HM(itemId)) { if (CalculatePlayerPartyCount() == 0) { @@ -867,7 +1056,7 @@ static void TMHMContextMenuAction_Give(u8 taskId) } else { - sTMCaseDynamicResources->savedCallback = CB2_ChooseMonToGiveItem; + sTMCaseDynamicResources->nextScreenCallback = CB2_ChooseMonToGiveItem; Task_BeginFadeOutFromTMCase(taskId); } } @@ -879,14 +1068,14 @@ static void TMHMContextMenuAction_Give(u8 taskId) static void PrintError_ThereIsNoPokemon(u8 taskId) { - TMCase_PrintMessageWithFollowupTask(taskId, FONT_2, gText_ThereIsNoPokemon, Task_WaitButtonAfterErrorPrint); + PrintMessageWithFollowupTask(taskId, FONT_2, gText_ThereIsNoPokemon, Task_WaitButtonAfterErrorPrint); } static void PrintError_ItemCantBeHeld(u8 taskId) { CopyItemName(gSpecialVar_ItemId, gStringVar1); StringExpandPlaceholders(gStringVar4, gText_ItemCantBeHeld); - TMCase_PrintMessageWithFollowupTask(taskId, FONT_2, gStringVar4, Task_WaitButtonAfterErrorPrint); + PrintMessageWithFollowupTask(taskId, FONT_2, gStringVar4, Task_WaitButtonAfterErrorPrint); } static void Task_WaitButtonAfterErrorPrint(u8 taskId) @@ -894,99 +1083,102 @@ static void Task_WaitButtonAfterErrorPrint(u8 taskId) if (JOY_NEW(A_BUTTON)) { PlaySE(SE_SELECT); - Subtask_CloseContextMenuAndReturnToMain(taskId); + CloseMessageAndReturnToList(taskId); } } -static void Subtask_CloseContextMenuAndReturnToMain(u8 taskId) +static void CloseMessageAndReturnToList(u8 taskId) { s16 * data = gTasks[taskId].data; - DestroyListMenuTask(data[0], &sTMCaseStaticResources.scrollOffset, &sTMCaseStaticResources.selectedRow); - data[0] = ListMenuInit(&gMultiuseListMenuTemplate, sTMCaseStaticResources.scrollOffset, sTMCaseStaticResources.selectedRow); - PrintListMenuCursorByID_WithColorIdx(data[0], 1); - ClearDialogWindowAndFrameToTransparent(6, FALSE); - ClearWindowTilemap(6); - PutWindowTilemap(1); - PutWindowTilemap(4); - PutWindowTilemap(5); + DestroyListMenuTask(tListTaskId, &sTMCaseStaticResources.scrollOffset, &sTMCaseStaticResources.selectedRow); + tListTaskId = ListMenuInit(&gMultiuseListMenuTemplate, sTMCaseStaticResources.scrollOffset, sTMCaseStaticResources.selectedRow); + PrintListCursor(tListTaskId, COLOR_DARK); + ClearDialogWindowAndFrameToTransparent(WIN_MESSAGE, FALSE); + ClearWindowTilemap(WIN_MESSAGE); + PutWindowTilemap(WIN_DESCRIPTION); + PutWindowTilemap(WIN_MOVE_INFO_LABELS); + PutWindowTilemap(WIN_MOVE_INFO); ScheduleBgCopyTilemapToVram(0); ScheduleBgCopyTilemapToVram(1); - Subtask_ReturnToTMCaseMain(taskId); + ReturnToList(taskId); } -static void TMHMContextMenuAction_Exit(u8 taskId) +static void Action_Exit(u8 taskId) { s16 * data = gTasks[taskId].data; - RemoveTMContextMenu(&sTMCaseDynamicResources->contextMenuWindowId); - ClearStdWindowAndFrameToTransparent(2, FALSE); - ClearWindowTilemap(2); - PutWindowTilemap(0); - PrintListMenuCursorByID_WithColorIdx(data[0], 1); - PutWindowTilemap(1); - PutWindowTilemap(4); - PutWindowTilemap(5); + RemoveContextMenu(&sTMCaseDynamicResources->contextMenuWindowId); + ClearStdWindowAndFrameToTransparent(WIN_SELECTED_MSG, FALSE); + ClearWindowTilemap(WIN_SELECTED_MSG); + PutWindowTilemap(WIN_LIST); + PrintListCursor(tListTaskId, COLOR_DARK); + PutWindowTilemap(WIN_DESCRIPTION); + PutWindowTilemap(WIN_MOVE_INFO_LABELS); + PutWindowTilemap(WIN_MOVE_INFO); ScheduleBgCopyTilemapToVram(0); ScheduleBgCopyTilemapToVram(1); - Subtask_ReturnToTMCaseMain(taskId); + ReturnToList(taskId); } -static void Task_SelectTMAction_Type1(u8 taskId) +static void Task_SelectedTMHM_GiveParty(u8 taskId) { s16 * data = gTasks[taskId].data; - if (!itemid_is_unique(BagGetItemIdByPocketPosition(POCKET_TM_CASE, data[1]))) + if (!IS_HM(BagGetItemIdByPocketPosition(POCKET_TM_CASE, tSelection))) { - sTMCaseDynamicResources->savedCallback = CB2_GiveHoldItem; + sTMCaseDynamicResources->nextScreenCallback = CB2_GiveHoldItem; Task_BeginFadeOutFromTMCase(taskId); } else { + // Can't hold "important" items (e.g. key items) PrintError_ItemCantBeHeld(taskId); } } -static void Task_SelectTMAction_Type3(u8 taskId) +static void Task_SelectedTMHM_GivePC(u8 taskId) { s16 * data = gTasks[taskId].data; - if (!itemid_is_unique(BagGetItemIdByPocketPosition(POCKET_TM_CASE, data[1]))) + if (!IS_HM(BagGetItemIdByPocketPosition(POCKET_TM_CASE, tSelection))) { - sTMCaseDynamicResources->savedCallback = CB2_ReturnToPokeStorage; + sTMCaseDynamicResources->nextScreenCallback = CB2_ReturnToPokeStorage; Task_BeginFadeOutFromTMCase(taskId); } else { + // Can't hold "important" items (e.g. key items) PrintError_ItemCantBeHeld(taskId); } } -static void Task_SelectTMAction_FromSellMenu(u8 taskId) +static void Task_SelectedTMHM_Sell(u8 taskId) { s16 * data = gTasks[taskId].data; - if (itemid_get_market_price(gSpecialVar_ItemId) == 0) + if (ItemId_GetPrice(gSpecialVar_ItemId) == 0) { + // Can't sell TM/HMs with no price (by default this is just the HMs) CopyItemName(gSpecialVar_ItemId, gStringVar1); StringExpandPlaceholders(gStringVar4, gText_OhNoICantBuyThat); - TMCase_PrintMessageWithFollowupTask(taskId, GetDialogBoxFontId(), gStringVar4, Subtask_CloseContextMenuAndReturnToMain); + PrintMessageWithFollowupTask(taskId, GetDialogBoxFontId(), gStringVar4, CloseMessageAndReturnToList); } else { - data[8] = 1; - if (data[2] == 1) + tQuantitySelected = 1; + if (tQuantityOwned == 1) { - HandlePrintMoneyOnHand(); + PrintPlayersMoney(); Task_AskConfirmSaleWithAmount(taskId); } else { - if (data[2] > 99) - data[2] = 99; + if (tQuantityOwned > 99) + tQuantityOwned = 99; CopyItemName(gSpecialVar_ItemId, gStringVar1); StringExpandPlaceholders(gStringVar4, gText_HowManyWouldYouLikeToSell); - TMCase_PrintMessageWithFollowupTask(taskId, GetDialogBoxFontId(), gStringVar4, Task_InitQuantitySelectUI); + PrintMessageWithFollowupTask(taskId, GetDialogBoxFontId(), gStringVar4, Task_InitQuantitySelectUI); } } } @@ -995,9 +1187,9 @@ static void Task_AskConfirmSaleWithAmount(u8 taskId) { s16 * data = gTasks[taskId].data; - ConvertIntToDecimalStringN(gStringVar3, itemid_get_market_price(BagGetItemIdByPocketPosition(POCKET_TM_CASE, data[1])) / 2 * data[8], STR_CONV_MODE_LEFT_ALIGN, 6); + ConvertIntToDecimalStringN(gStringVar3, ItemId_GetPrice(BagGetItemIdByPocketPosition(POCKET_TM_CASE, tSelection)) / 2 * tQuantitySelected, STR_CONV_MODE_LEFT_ALIGN, 6); StringExpandPlaceholders(gStringVar4, gText_ICanPayThisMuch_WouldThatBeOkay); - TMCase_PrintMessageWithFollowupTask(taskId, GetDialogBoxFontId(), gStringVar4, Task_PlaceYesNoBox); + PrintMessageWithFollowupTask(taskId, GetDialogBoxFontId(), gStringVar4, Task_PlaceYesNoBox); } static void Task_PlaceYesNoBox(u8 taskId) @@ -1009,30 +1201,30 @@ static void Task_SaleOfTMsCanceled(u8 taskId) { s16 * data = gTasks[taskId].data; - ClearStdWindowAndFrameToTransparent(8, FALSE); - ClearDialogWindowAndFrameToTransparent(6, FALSE); - PutWindowTilemap(0); - PutWindowTilemap(1); - PutWindowTilemap(3); - PutWindowTilemap(4); - PutWindowTilemap(5); + ClearStdWindowAndFrameToTransparent(WIN_MONEY, FALSE); + ClearDialogWindowAndFrameToTransparent(WIN_MESSAGE, FALSE); + PutWindowTilemap(WIN_LIST); + PutWindowTilemap(WIN_DESCRIPTION); + PutWindowTilemap(WIN_TITLE); + PutWindowTilemap(WIN_MOVE_INFO_LABELS); + PutWindowTilemap(WIN_MOVE_INFO); ScheduleBgCopyTilemapToVram(0); ScheduleBgCopyTilemapToVram(1); - PrintListMenuCursorByID_WithColorIdx(data[0], 1); - Subtask_ReturnToTMCaseMain(taskId); + PrintListCursor(tListTaskId, COLOR_DARK); + ReturnToList(taskId); } static void Task_InitQuantitySelectUI(u8 taskId) { s16 * data = gTasks[taskId].data; - TMCase_SetWindowBorder1(7); + TMCase_SetWindowBorder1(WIN_SELL_QUANTITY); ConvertIntToDecimalStringN(gStringVar1, 1, STR_CONV_MODE_LEADING_ZEROS, 2); StringExpandPlaceholders(gStringVar4, gText_TimesStrVar1); - AddTextPrinterParameterized_ColorByIndex(7, FONT_0, gStringVar4, 4, 10, 1, 0, 0, 1); - SellTM_PrintQuantityAndSalePrice(1, itemid_get_market_price(BagGetItemIdByPocketPosition(POCKET_TM_CASE, data[1])) / 2 * data[8]); - HandlePrintMoneyOnHand(); - CreateTMCaseScrollIndicatorArrowPair_SellQuantitySelect(); + TMCase_Print(WIN_SELL_QUANTITY, FONT_0, gStringVar4, 4, 10, 1, 0, 0, COLOR_DARK); + SellTM_PrintQuantityAndSalePrice(1, ItemId_GetPrice(BagGetItemIdByPocketPosition(POCKET_TM_CASE, tSelection)) / 2 * tQuantitySelected); + PrintPlayersMoney(); + CreateQuantityScrollArrows(); ScheduleBgCopyTilemapToVram(0); ScheduleBgCopyTilemapToVram(1); gTasks[taskId].func = Task_QuantitySelect_HandleInput; @@ -1040,44 +1232,44 @@ static void Task_InitQuantitySelectUI(u8 taskId) static void SellTM_PrintQuantityAndSalePrice(s16 quantity, s32 amount) { - FillWindowPixelBuffer(7, 0x11); + FillWindowPixelBuffer(WIN_SELL_QUANTITY, 0x11); ConvertIntToDecimalStringN(gStringVar1, quantity, STR_CONV_MODE_LEADING_ZEROS, 2); StringExpandPlaceholders(gStringVar4, gText_TimesStrVar1); - AddTextPrinterParameterized_ColorByIndex(7, FONT_0, gStringVar4, 4, 10, 1, 0, 0, 1); - PrintMoneyAmount(7, 0x38, 0x0A, amount, 0); + TMCase_Print(WIN_SELL_QUANTITY, FONT_0, gStringVar4, 4, 10, 1, 0, 0, COLOR_DARK); + PrintMoneyAmount(WIN_SELL_QUANTITY, 0x38, 0x0A, amount, 0); } static void Task_QuantitySelect_HandleInput(u8 taskId) { s16 * data = gTasks[taskId].data; - if (AdjustQuantityAccordingToDPadInput(&data[8], data[2]) == 1) + if (AdjustQuantityAccordingToDPadInput(&tQuantitySelected, tQuantityOwned) == 1) { - SellTM_PrintQuantityAndSalePrice(data[8], itemid_get_market_price(BagGetItemIdByPocketPosition(POCKET_TM_CASE, data[1])) / 2 * data[8]); + SellTM_PrintQuantityAndSalePrice(tQuantitySelected, ItemId_GetPrice(BagGetItemIdByPocketPosition(POCKET_TM_CASE, tSelection)) / 2 * tQuantitySelected); } else if (JOY_NEW(A_BUTTON)) { PlaySE(SE_SELECT); - ClearStdWindowAndFrameToTransparent(7, FALSE); + ClearStdWindowAndFrameToTransparent(WIN_SELL_QUANTITY, FALSE); ScheduleBgCopyTilemapToVram(0); ScheduleBgCopyTilemapToVram(1); - RemoveTMCaseScrollIndicatorArrowPair(); + RemoveScrollArrows(); Task_AskConfirmSaleWithAmount(taskId); } else if (JOY_NEW(B_BUTTON)) { PlaySE(SE_SELECT); - ClearStdWindowAndFrameToTransparent(7, FALSE); - ClearStdWindowAndFrameToTransparent(8, FALSE); - ClearDialogWindowAndFrameToTransparent(6, FALSE); - PutWindowTilemap(3); - PutWindowTilemap(0); - PutWindowTilemap(1); + ClearStdWindowAndFrameToTransparent(WIN_SELL_QUANTITY, FALSE); + ClearStdWindowAndFrameToTransparent(WIN_MONEY, FALSE); + ClearDialogWindowAndFrameToTransparent(WIN_MESSAGE, FALSE); + PutWindowTilemap(WIN_TITLE); + PutWindowTilemap(WIN_LIST); + PutWindowTilemap(WIN_DESCRIPTION); ScheduleBgCopyTilemapToVram(0); ScheduleBgCopyTilemapToVram(1); - RemoveTMCaseScrollIndicatorArrowPair(); - PrintListMenuCursorByID_WithColorIdx(data[0], 1); - Subtask_ReturnToTMCaseMain(taskId); + RemoveScrollArrows(); + PrintListCursor(tListTaskId, COLOR_DARK); + ReturnToList(taskId); } } @@ -1085,12 +1277,12 @@ static void Task_PrintSaleConfirmedText(u8 taskId) { s16 * data = gTasks[taskId].data; - PutWindowTilemap(0); + PutWindowTilemap(WIN_LIST); ScheduleBgCopyTilemapToVram(0); CopyItemName(gSpecialVar_ItemId, gStringVar1); - ConvertIntToDecimalStringN(gStringVar3, itemid_get_market_price(BagGetItemIdByPocketPosition(POCKET_TM_CASE, data[1])) / 2 * data[8], STR_CONV_MODE_LEFT_ALIGN, 6); + ConvertIntToDecimalStringN(gStringVar3, ItemId_GetPrice(BagGetItemIdByPocketPosition(POCKET_TM_CASE, tSelection)) / 2 * tQuantitySelected, STR_CONV_MODE_LEFT_ALIGN, 6); StringExpandPlaceholders(gStringVar4, gText_TurnedOverItemsWorthYen); - TMCase_PrintMessageWithFollowupTask(taskId, FONT_2, gStringVar4, Task_DoSaleOfTMs); + PrintMessageWithFollowupTask(taskId, FONT_2, gStringVar4, Task_DoSaleOfTMs); } static void Task_DoSaleOfTMs(u8 taskId) @@ -1098,16 +1290,16 @@ static void Task_DoSaleOfTMs(u8 taskId) s16 * data = gTasks[taskId].data; PlaySE(SE_SHOP); - RemoveBagItem(gSpecialVar_ItemId, data[8]); - AddMoney(&gSaveBlock1Ptr->money, itemid_get_market_price(gSpecialVar_ItemId) / 2 * data[8]); - RecordItemPurchase(gSpecialVar_ItemId, data[8], 2); - DestroyListMenuTask(data[0], &sTMCaseStaticResources.scrollOffset, &sTMCaseStaticResources.selectedRow); + RemoveBagItem(gSpecialVar_ItemId, tQuantitySelected); + AddMoney(&gSaveBlock1Ptr->money, ItemId_GetPrice(gSpecialVar_ItemId) / 2 * tQuantitySelected); + RecordItemPurchase(gSpecialVar_ItemId, tQuantitySelected, 2); + DestroyListMenuTask(tListTaskId, &sTMCaseStaticResources.scrollOffset, &sTMCaseStaticResources.selectedRow); TMCaseSetup_GetTMCount(); TMCaseSetup_InitListMenuPositions(); InitTMCaseListMenuItems(); - data[0] = ListMenuInit(&gMultiuseListMenuTemplate, sTMCaseStaticResources.scrollOffset, sTMCaseStaticResources.selectedRow); - PrintListMenuCursorByID_WithColorIdx(data[0], 2); - PrintMoneyAmountInMoneyBox(8, GetMoney(&gSaveBlock1Ptr->money), 0); + tListTaskId = ListMenuInit(&gMultiuseListMenuTemplate, sTMCaseStaticResources.scrollOffset, sTMCaseStaticResources.selectedRow); + PrintListCursor(tListTaskId, COLOR_CURSOR_SELECTED); + PrintMoneyAmountInMoneyBox(WIN_MONEY, GetMoney(&gSaveBlock1Ptr->money), 0); gTasks[taskId].func = Task_AfterSale_ReturnToList; } @@ -1116,74 +1308,75 @@ static void Task_AfterSale_ReturnToList(u8 taskId) if (JOY_NEW(A_BUTTON) || JOY_NEW(B_BUTTON)) { PlaySE(SE_SELECT); - ClearStdWindowAndFrameToTransparent(8, FALSE); - ClearDialogWindowAndFrameToTransparent(6, FALSE); - PutWindowTilemap(1); - PutWindowTilemap(3); - PutWindowTilemap(4); - PutWindowTilemap(5); - Subtask_CloseContextMenuAndReturnToMain(taskId); + ClearStdWindowAndFrameToTransparent(WIN_MONEY, FALSE); + ClearDialogWindowAndFrameToTransparent(WIN_MESSAGE, FALSE); + PutWindowTilemap(WIN_DESCRIPTION); + PutWindowTilemap(WIN_TITLE); + PutWindowTilemap(WIN_MOVE_INFO_LABELS); + PutWindowTilemap(WIN_MOVE_INFO); + CloseMessageAndReturnToList(taskId); } } void Pokedude_InitTMCase(void) { - sPokedudePackBackup = AllocZeroed(sizeof(*sPokedudePackBackup)); - memcpy(sPokedudePackBackup->bagPocket_TMHM, gSaveBlock1Ptr->bagPocket_TMHM, sizeof(gSaveBlock1Ptr->bagPocket_TMHM)); - memcpy(sPokedudePackBackup->bagPocket_KeyItems, gSaveBlock1Ptr->bagPocket_KeyItems, sizeof(gSaveBlock1Ptr->bagPocket_KeyItems)); - sPokedudePackBackup->unk_160 = sTMCaseStaticResources.selectedRow; - sPokedudePackBackup->unk_162 = sTMCaseStaticResources.scrollOffset; - ClearItemSlots(gSaveBlock1Ptr->bagPocket_TMHM, NELEMS(gSaveBlock1Ptr->bagPocket_TMHM)); - ClearItemSlots(gSaveBlock1Ptr->bagPocket_KeyItems, NELEMS(gSaveBlock1Ptr->bagPocket_KeyItems)); + sPokedudeBagBackup = AllocZeroed(sizeof(*sPokedudeBagBackup)); + memcpy(sPokedudeBagBackup->bagPocket_TMHM, gSaveBlock1Ptr->bagPocket_TMHM, sizeof(gSaveBlock1Ptr->bagPocket_TMHM)); + memcpy(sPokedudeBagBackup->bagPocket_KeyItems, gSaveBlock1Ptr->bagPocket_KeyItems, sizeof(gSaveBlock1Ptr->bagPocket_KeyItems)); + sPokedudeBagBackup->selectedRow = sTMCaseStaticResources.selectedRow; + sPokedudeBagBackup->scrollOffset = sTMCaseStaticResources.scrollOffset; + ClearItemSlots(gSaveBlock1Ptr->bagPocket_TMHM, ARRAY_COUNT(gSaveBlock1Ptr->bagPocket_TMHM)); + ClearItemSlots(gSaveBlock1Ptr->bagPocket_KeyItems, ARRAY_COUNT(gSaveBlock1Ptr->bagPocket_KeyItems)); ResetTMCaseCursorPos(); AddBagItem(ITEM_TM01, 1); AddBagItem(ITEM_TM03, 1); AddBagItem(ITEM_TM09, 1); AddBagItem(ITEM_TM35, 1); - InitTMCase(4, CB2_ReturnToTeachyTV, 0); + InitTMCase(TMCASE_POKEDUDE, CB2_ReturnToTeachyTV, 0); } -static void Task_TMCaseDude1(u8 taskId) +static void Task_Pokedude_Start(u8 taskId) { s16 * data = gTasks[taskId].data; if (!gPaletteFade.active) { - data[8] = 0; - data[9] = 0; - gTasks[taskId].func = Task_TMCaseDude_Playback; + tPokedudeState = 0; + tPokedudeTimer = 0; + gTasks[taskId].func = Task_Pokedude_Run; } } -static void Task_TMCaseDude_Playback(u8 taskId) +#define POKEDUDE_INPUT_DELAY 101 + +static void Task_Pokedude_Run(u8 taskId) { s16 * data = gTasks[taskId].data; if (JOY_NEW(B_BUTTON)) { - if (data[8] < 21) + if (tPokedudeState < 21) { - data[8] = 21; + tPokedudeState = 21; SetTeachyTvControllerModeToResume(); } } - switch (data[8]) + switch (tPokedudeState) { case 0: BeginNormalPaletteFade(0xFFFF8405, 4, 0, 6, 0); - FillBG2RowWithPalette_2timesNplus1(1); - data[8]++; + SetDescriptionWindowShade(1); + tPokedudeState++; break; case 1: case 11: if (!gPaletteFade.active) { - data[9]++; - if (data[9] > 0x65) + if (++tPokedudeTimer > POKEDUDE_INPUT_DELAY) { - data[9] = 0; - data[8]++; + tPokedudeTimer = 0; + tPokedudeState++; } } break; @@ -1193,17 +1386,16 @@ static void Task_TMCaseDude_Playback(u8 taskId) case 12: case 13: case 14: - if (data[9] == 0) + if (tPokedudeTimer == 0) { gMain.newKeys = 0; gMain.newAndRepeatedKeys = DPAD_DOWN; - ListMenu_ProcessInput(data[0]); + ListMenu_ProcessInput(tListTaskId); } - data[9]++; - if (data[9] > 0x65) + if (++tPokedudeTimer > POKEDUDE_INPUT_DELAY) { - data[9] = 0; - data[8]++; + tPokedudeTimer = 0; + tPokedudeState++; } break; case 5: @@ -1212,71 +1404,71 @@ static void Task_TMCaseDude_Playback(u8 taskId) case 15: case 16: case 17: - if (data[9] == 0) + if (tPokedudeTimer == 0) { gMain.newKeys = 0; gMain.newAndRepeatedKeys = DPAD_UP; - ListMenu_ProcessInput(data[0]); + ListMenu_ProcessInput(tListTaskId); } - data[9]++; - if (data[9] > 0x65) + if (++tPokedudeTimer > POKEDUDE_INPUT_DELAY) { - data[9] = 0; - data[8]++; + tPokedudeTimer = 0; + tPokedudeState++; } break; case 8: - FillBG2RowWithPalette_2timesNplus1(1); - TMCase_PrintMessageWithFollowupTask(taskId, FONT_4, gPokedudeText_TMTypes, 0); - gTasks[taskId].func = Task_TMCaseDude_Playback; - data[8]++; + SetDescriptionWindowShade(1); + PrintMessageWithFollowupTask(taskId, FONT_4, gPokedudeText_TMTypes, NULL); + gTasks[taskId].func = Task_Pokedude_Run; + tPokedudeState++; break; case 9: case 19: RunTextPrinters(); - if (!IsTextPrinterActive(6)) - data[8]++; + if (!IsTextPrinterActive(WIN_MESSAGE)) + tPokedudeState++; break; case 10: if (JOY_NEW(A_BUTTON | B_BUTTON)) { - FillBG2RowWithPalette_2timesNplus1(0); + SetDescriptionWindowShade(0); BeginNormalPaletteFade(0x00000400, 0, 6, 0, 0); - ClearDialogWindowAndFrameToTransparent(6, FALSE); + ClearDialogWindowAndFrameToTransparent(WIN_MESSAGE, FALSE); ScheduleBgCopyTilemapToVram(1); - data[8]++; + tPokedudeState++; } break; case 18: - FillBG2RowWithPalette_2timesNplus1(1); - TMCase_PrintMessageWithFollowupTask(taskId, FONT_4, gPokedudeText_ReadTMDescription, NULL); - gTasks[taskId].func = Task_TMCaseDude_Playback; // this function - data[8]++; + SetDescriptionWindowShade(1); + PrintMessageWithFollowupTask(taskId, FONT_4, gPokedudeText_ReadTMDescription, NULL); + gTasks[taskId].func = Task_Pokedude_Run; // this function + tPokedudeState++; break; case 20: if (JOY_NEW(A_BUTTON | B_BUTTON)) - data[8]++; + tPokedudeState++; break; case 21: if (!gPaletteFade.active) { - memcpy(gSaveBlock1Ptr->bagPocket_TMHM, sPokedudePackBackup->bagPocket_TMHM, sizeof(gSaveBlock1Ptr->bagPocket_TMHM)); - memcpy(gSaveBlock1Ptr->bagPocket_KeyItems, sPokedudePackBackup->bagPocket_KeyItems, sizeof(gSaveBlock1Ptr->bagPocket_KeyItems)); - DestroyListMenuTask(data[0], NULL, NULL); - sTMCaseStaticResources.selectedRow = sPokedudePackBackup->unk_160; - sTMCaseStaticResources.scrollOffset = sPokedudePackBackup->unk_162; - Free(sPokedudePackBackup); + // Restore the player's bag + memcpy(gSaveBlock1Ptr->bagPocket_TMHM, sPokedudeBagBackup->bagPocket_TMHM, sizeof(gSaveBlock1Ptr->bagPocket_TMHM)); + memcpy(gSaveBlock1Ptr->bagPocket_KeyItems, sPokedudeBagBackup->bagPocket_KeyItems, sizeof(gSaveBlock1Ptr->bagPocket_KeyItems)); + DestroyListMenuTask(tListTaskId, NULL, NULL); + sTMCaseStaticResources.selectedRow = sPokedudeBagBackup->selectedRow; + sTMCaseStaticResources.scrollOffset = sPokedudeBagBackup->scrollOffset; + Free(sPokedudeBagBackup); CpuFastCopy(gPlttBufferFaded, gPlttBufferUnfaded, 0x400); CB2_SetUpReshowBattleScreenAfterMenu(); BeginNormalPaletteFade(PALETTES_ALL, -2, 0, 16, 0); - data[8]++; + tPokedudeState++; } break; default: if (!gPaletteFade.active) { - SetMainCallback2(sTMCaseStaticResources.savedCallback); - RemoveTMCaseScrollIndicatorArrowPair(); + SetMainCallback2(sTMCaseStaticResources.exitCallback); + RemoveScrollArrows(); DestroyTMCaseBuffers(); DestroyTask(taskId); } @@ -1298,17 +1490,17 @@ static void InitWindowTemplatesAndPals(void) LoadPalette(sPal3Override, 0xF6, 0x04); LoadPalette(sPal3Override, 0xD6, 0x04); ListMenuLoadStdPalAt(0xc0, 0x01); - for (i = 0; i < 9; i++) + for (i = 0; i < ARRAY_COUNT(sWindowTemplates) - 1; i++) FillWindowPixelBuffer(i, 0x00); - PutWindowTilemap(0); - PutWindowTilemap(1); - PutWindowTilemap(3); - PutWindowTilemap(4); - PutWindowTilemap(5); + PutWindowTilemap(WIN_LIST); + PutWindowTilemap(WIN_DESCRIPTION); + PutWindowTilemap(WIN_TITLE); + PutWindowTilemap(WIN_MOVE_INFO_LABELS); + PutWindowTilemap(WIN_MOVE_INFO); ScheduleBgCopyTilemapToVram(0); } -static void AddTextPrinterParameterized_ColorByIndex(u8 windowId, u8 fontId, const u8 * str, u8 x, u8 y, u8 letterSpacing, u8 lineSpacing, u8 speed, u8 colorIdx) +static void TMCase_Print(u8 windowId, u8 fontId, const u8 * str, u8 x, u8 y, u8 letterSpacing, u8 lineSpacing, u8 speed, u8 colorIdx) { AddTextPrinterParameterized4(windowId, fontId, x, y, letterSpacing, lineSpacing, sTextColors[colorIdx], speed, str); } @@ -1323,46 +1515,47 @@ static void TMCase_SetWindowBorder2(u8 windowId) DrawStdFrameWithCustomTileAndPalette(windowId, FALSE, 0x78, 0x0D); } -static void TMCase_PrintMessageWithFollowupTask(u8 taskId, u8 fontId, const u8 * str, TaskFunc func) +static void PrintMessageWithFollowupTask(u8 taskId, u8 fontId, const u8 * str, TaskFunc func) { - DisplayMessageAndContinueTask(taskId, 6, 0x64, 0x0B, fontId, GetTextSpeedSetting(), str, func); + DisplayMessageAndContinueTask(taskId, WIN_MESSAGE, 0x64, 0x0B, fontId, GetTextSpeedSetting(), str, func); ScheduleBgCopyTilemapToVram(1); } -static void PrintStringTMCaseOnWindow3(void) +static void PrintTitle(void) { u32 distance = 72 - GetStringWidth(FONT_1, gText_TMCase, 0); - AddTextPrinterParameterized3(3, FONT_1, distance / 2, 1, sTextColors[0], 0, gText_TMCase); + AddTextPrinterParameterized3(WIN_TITLE, FONT_1, distance / 2, 1, sTextColors[COLOR_LIGHT], 0, gText_TMCase); } -static void DrawMoveInfoUIMarkers(void) +static void DrawMoveInfoLabels(void) { - BlitMoveInfoIcon(4, 19, 0, 0); - BlitMoveInfoIcon(4, 20, 0, 12); - BlitMoveInfoIcon(4, 21, 0, 24); - BlitMoveInfoIcon(4, 22, 0, 36); - CopyWindowToVram(4, COPYWIN_GFX); + BlitMoveInfoIcon(WIN_MOVE_INFO_LABELS, 19, 0, 0); + BlitMoveInfoIcon(WIN_MOVE_INFO_LABELS, 20, 0, 12); + BlitMoveInfoIcon(WIN_MOVE_INFO_LABELS, 21, 0, 24); + BlitMoveInfoIcon(WIN_MOVE_INFO_LABELS, 22, 0, 36); + CopyWindowToVram(WIN_MOVE_INFO_LABELS, COPYWIN_GFX); } -static void TMCase_MoveCursor_UpdatePrintedTMInfo(u16 itemId) +static void PrintMoveInfo(u16 itemId) { u8 i; u16 move; const u8 * str; - FillWindowPixelRect(5, 0, 0, 0, 40, 48); + FillWindowPixelRect(WIN_MOVE_INFO, 0, 0, 0, 40, 48); if (itemId == ITEM_NONE) { for (i = 0; i < 4; i++) - { - AddTextPrinterParameterized_ColorByIndex(5, FONT_3, gText_ThreeHyphens, 7, 12 * i, 0, 0, 0xFF, 3); - } - CopyWindowToVram(5, COPYWIN_GFX); + TMCase_Print(WIN_MOVE_INFO, FONT_3, gText_ThreeHyphens, 7, 12 * i, 0, 0, TEXT_SKIP_DRAW, COLOR_MOVE_INFO); + CopyWindowToVram(WIN_MOVE_INFO, COPYWIN_GFX); } else { + // Draw type icon move = ItemIdToBattleMoveId(itemId); - BlitMoveInfoIcon(5, gBattleMoves[move].type + 1, 0, 0); + BlitMoveInfoIcon(WIN_MOVE_INFO, gBattleMoves[move].type + 1, 0, 0); + + // Print power if (gBattleMoves[move].power < 2) str = gText_ThreeHyphens; else @@ -1370,7 +1563,9 @@ static void TMCase_MoveCursor_UpdatePrintedTMInfo(u16 itemId) ConvertIntToDecimalStringN(gStringVar1, gBattleMoves[move].power, STR_CONV_MODE_RIGHT_ALIGN, 3); str = gStringVar1; } - AddTextPrinterParameterized_ColorByIndex(5, FONT_3, str, 7, 12, 0, 0, 0xFF, 3); + TMCase_Print(WIN_MOVE_INFO, FONT_3, str, 7, 12, 0, 0, TEXT_SKIP_DRAW, COLOR_MOVE_INFO); + + // Print accuracy if (gBattleMoves[move].accuracy == 0) str = gText_ThreeHyphens; else @@ -1378,10 +1573,13 @@ static void TMCase_MoveCursor_UpdatePrintedTMInfo(u16 itemId) ConvertIntToDecimalStringN(gStringVar1, gBattleMoves[move].accuracy, STR_CONV_MODE_RIGHT_ALIGN, 3); str = gStringVar1; } - AddTextPrinterParameterized_ColorByIndex(5, FONT_3, str, 7, 24, 0, 0, 0xFF, 3); + TMCase_Print(WIN_MOVE_INFO, FONT_3, str, 7, 24, 0, 0, TEXT_SKIP_DRAW, COLOR_MOVE_INFO); + + // Print PP ConvertIntToDecimalStringN(gStringVar1, gBattleMoves[move].pp, STR_CONV_MODE_RIGHT_ALIGN, 3); - AddTextPrinterParameterized_ColorByIndex(5, FONT_3, gStringVar1, 7, 36, 0, 0, 0xFF, 3); - CopyWindowToVram(5, COPYWIN_GFX); + TMCase_Print(WIN_MOVE_INFO, FONT_3, gStringVar1, 7, 36, 0, 0, TEXT_SKIP_DRAW, COLOR_MOVE_INFO); + + CopyWindowToVram(WIN_MOVE_INFO, COPYWIN_GFX); } } @@ -1390,144 +1588,149 @@ static void PlaceHMTileInWindow(u8 windowId, u8 x, u8 y) BlitBitmapToWindow(windowId, gTMCaseHM_Gfx, x, y, 16, 12); } -static void HandlePrintMoneyOnHand(void) +static void PrintPlayersMoney(void) { - PrintMoneyAmountInMoneyBoxWithBorder(8, 0x78, 0xD, GetMoney(&gSaveBlock1Ptr->money)); + PrintMoneyAmountInMoneyBoxWithBorder(WIN_MONEY, 120, 13, GetMoney(&gSaveBlock1Ptr->money)); } static void HandleCreateYesNoMenu(u8 taskId, const struct YesNoFuncTable *ptrs) { - CreateYesNoMenuWithCallbacks(taskId, &sYesNoWindowTemplate, FONT_2, 0, 2, 0x5B, 0x0E, ptrs); + CreateYesNoMenuWithCallbacks(taskId, &sYesNoWindowTemplate, FONT_2, 0, 2, 91, 14, ptrs); } -static u8 AddTMContextMenu(u8 * a0, u8 a1) +static u8 AddContextMenu(u8 * windowId, u8 windowIndex) { - if (*a0 == 0xFF) + if (*windowId == WINDOW_NONE) { - *a0 = AddWindow(&sTMContextWindowTemplates[a1]); - TMCase_SetWindowBorder1(*a0); + *windowId = AddWindow(&sWindowTemplates_ContextMenu[windowIndex]); + TMCase_SetWindowBorder1(*windowId); ScheduleBgCopyTilemapToVram(0); } - return *a0; + return *windowId; } -static void RemoveTMContextMenu(u8 * a0) +static void RemoveContextMenu(u8 * windowId) { - ClearStdWindowAndFrameToTransparent(*a0, FALSE); - ClearWindowTilemap(*a0); - RemoveWindow(*a0); + ClearStdWindowAndFrameToTransparent(*windowId, FALSE); + ClearWindowTilemap(*windowId); + RemoveWindow(*windowId); ScheduleBgCopyTilemapToVram(0); - *a0 = 0xFF; + *windowId = WINDOW_NONE; } -static u8 CreateTMSprite(u16 itemId) +static u8 CreateDiscSprite(u16 itemId) { - u8 spriteId = CreateSprite(&sTMSpriteTemplate, 0x29, 0x2E, 0); + u8 spriteId = CreateSprite(&sSpriteTemplate_Disc, DISC_BASE_X, DISC_BASE_Y, 0); u8 tmIdx; if (itemId == ITEM_NONE) { - UpdateTMSpritePosition(&gSprites[spriteId], 0xFF); + SetDiscSpritePosition(&gSprites[spriteId], DISC_HIDDEN); return spriteId; } else { tmIdx = itemId - ITEM_TM01; - SetTMSpriteAnim(&gSprites[spriteId], tmIdx); - TintTMSpriteByType(gBattleMoves[ItemIdToBattleMoveId(itemId)].type); - UpdateTMSpritePosition(&gSprites[spriteId], tmIdx); + SetDiscSpriteAnim(&gSprites[spriteId], tmIdx); + TintDiscpriteByType(gBattleMoves[ItemIdToBattleMoveId(itemId)].type); + SetDiscSpritePosition(&gSprites[spriteId], tmIdx); return spriteId; } } -static void SetTMSpriteAnim(struct Sprite *sprite, u8 idx) +static void SetDiscSpriteAnim(struct Sprite *sprite, u8 tmIdx) { - if (idx >= NUM_TECHNICAL_MACHINES) - StartSpriteAnim(sprite, 1); + if (tmIdx >= NUM_TECHNICAL_MACHINES) + StartSpriteAnim(sprite, ANIM_HM); else - StartSpriteAnim(sprite, 0); + StartSpriteAnim(sprite, ANIM_TM); } -static void TintTMSpriteByType(u8 type) +static void TintDiscpriteByType(u8 type) { - u8 palIndex = IndexOfSpritePaletteTag(TM_CASE_TM_TAG) << 4; + u8 palIndex = IndexOfSpritePaletteTag(TAG_DISC) << 4; LoadPalette(sTMSpritePaletteBuffer + sTMSpritePaletteOffsetByType[type], 0x100 | palIndex, 0x20); - if (sTMCaseStaticResources.tmCaseMenuType == 4) - { + if (sTMCaseStaticResources.menuType == TMCASE_POKEDUDE) BlendPalettes(1 << (0x10 + palIndex), 4, RGB_BLACK); - } } -static void UpdateTMSpritePosition(struct Sprite *sprite, u8 var) +static void SetDiscSpritePosition(struct Sprite *sprite, u8 tmIdx) { s32 x, y; - if (var == 0xFF) + if (tmIdx == DISC_HIDDEN) { - x = 0x1B; - y = 0x36; - sprite->y2 = 0x14; + x = 27; + y = 54; + sprite->y2 = DISC_CASE_DISTANCE; } else { - if (var >= 50) - var -= 50; + if (tmIdx >= NUM_TECHNICAL_MACHINES) + tmIdx -= NUM_TECHNICAL_MACHINES; else - var += 8; - x = 0x29 - (((0xE00 * var) / 58) >> 8); - y = 0x2E + (((0x800 * var) / 58) >> 8); + tmIdx += NUM_HIDDEN_MACHINES; + + x = DISC_BASE_X - Q_24_8_TO_INT(Q_24_8(14 * tmIdx) / (NUM_TECHNICAL_MACHINES + NUM_HIDDEN_MACHINES)); + y = DISC_BASE_Y + Q_24_8_TO_INT(Q_24_8(8 * tmIdx) / (NUM_TECHNICAL_MACHINES + NUM_HIDDEN_MACHINES)); } sprite->x = x; sprite->y = y; } -static void InitSelectedTMSpriteData(u8 spriteId, u16 itemId) +#define sItemId data[0] +#define sState data[1] + +static void SwapDisc(u8 spriteId, u16 itemId) { - gSprites[spriteId].data[0] = itemId; - gSprites[spriteId].data[1] = 0; - gSprites[spriteId].callback = SpriteCB_MoveTMSpriteInCase; + gSprites[spriteId].sItemId = itemId; + gSprites[spriteId].sState = 0; + gSprites[spriteId].callback = SpriteCB_SwapDisc; } -static void SpriteCB_MoveTMSpriteInCase(struct Sprite *sprite) +static void SpriteCB_SwapDisc(struct Sprite *sprite) { - switch (sprite->data[1]) + switch (sprite->sState) { case 0: - if (sprite->y2 >= 20) + // Lower old disc back into case + if (sprite->y2 >= DISC_CASE_DISTANCE) { - if (sprite->data[0] != ITEM_NONE) + // Old disc is hidden, set up new disc + if (sprite->sItemId != ITEM_NONE) { - sprite->data[1]++; - TintTMSpriteByType(gBattleMoves[ItemIdToBattleMoveId(sprite->data[0])].type); - sprite->data[0] -= ITEM_TM01; - SetTMSpriteAnim(sprite, sprite->data[0]); - UpdateTMSpritePosition(sprite, sprite->data[0]); + sprite->sState++; + TintDiscpriteByType(gBattleMoves[ItemIdToBattleMoveId(sprite->sItemId)].type); + sprite->sItemId -= ITEM_TM01; + SetDiscSpriteAnim(sprite, sprite->sItemId); + SetDiscSpritePosition(sprite, sprite->sItemId); } else sprite->callback = SpriteCallbackDummy; } else { - sprite->y2 += 10; + sprite->y2 += DISC_Y_MOVE; } break; case 1: + // Raise new disc out of case if (sprite->y2 <= 0) sprite->callback = SpriteCallbackDummy; else - sprite->y2 -= 10; + sprite->y2 -= DISC_Y_MOVE; } } // - 1 excludes TYPE_MYSTERY -#define NUM_TM_COLORS ((NUMBER_OF_MON_TYPES - 1) * 16) +#define NUM_DISC_COLORS ((NUMBER_OF_MON_TYPES - 1) * 16) -static void LoadTMTypePalettes(void) +static void LoadDiscTypePalettes(void) { struct SpritePalette spritePalette; - sTMSpritePaletteBuffer = Alloc(NUM_TM_COLORS * sizeof(u16)); + sTMSpritePaletteBuffer = Alloc(NUM_DISC_COLORS * sizeof(u16)); LZDecompressWram(gTMCaseDiscTypes1_Pal, sTMSpritePaletteBuffer); // Decompress the first 16 LZDecompressWram(gTMCaseDiscTypes2_Pal, sTMSpritePaletteBuffer + 0x100); // Decompress the rest (Only 17 total, this is just Dragon type) - spritePalette.data = sTMSpritePaletteBuffer + NUM_TM_COLORS; - spritePalette.tag = TM_CASE_TM_TAG; + spritePalette.data = sTMSpritePaletteBuffer + NUM_DISC_COLORS; + spritePalette.tag = TAG_DISC; LoadSpritePalette(&spritePalette); }