From 2e671539820d9df7b3c73fe4ca640ee8cc019b16 Mon Sep 17 00:00:00 2001 From: LOuroboros Date: Wed, 1 Dec 2021 22:08:35 -0300 Subject: [PATCH] Renamed the Enigma Berries' constants --- data/maps/PetalburgCity_Gym/scripts.inc | 6 +- include/constants/items.h | 6 +- src/battle_ai_switch_items.c | 2 +- src/battle_main.c | 10 +- src/battle_message.c | 4 +- src/battle_script_commands.c | 24 +-- src/battle_util.c | 14 +- src/berry.c | 6 +- src/berry_blender.c | 4 +- src/data/item_icon_table.h | 4 +- src/data/items.h | 8 +- .../berry_tree_graphics_tables.h | 9 +- src/data/text/item_descriptions.h | 4 +- src/item_menu.c | 6 +- src/item_menu_icons.c | 137 +++++++++--------- src/item_use.c | 2 +- src/menu_helpers.c | 2 +- src/party_menu.c | 6 +- src/pokemon.c | 24 +-- src/pokemon_summary_screen.c | 4 +- src/script_pokemon_util.c | 4 +- 21 files changed, 145 insertions(+), 141 deletions(-) diff --git a/data/maps/PetalburgCity_Gym/scripts.inc b/data/maps/PetalburgCity_Gym/scripts.inc index 05e375c49..43e8c4108 100644 --- a/data/maps/PetalburgCity_Gym/scripts.inc +++ b/data/maps/PetalburgCity_Gym/scripts.inc @@ -383,10 +383,10 @@ PetalburgCity_Gym_EventScript_ShouldGiveEnigmaBerry:: specialvar VAR_RESULT, IsEnigmaBerryValid compare VAR_RESULT, FALSE goto_if_eq PetalburgCity_Gym_EventScript_DontGiveEnigmaBerry - checkitem ITEM_ENIGMA_BERRY_E_READER, 1 + checkitem ITEM_ENIGMA_BERRY, 1 compare VAR_RESULT, TRUE goto_if_eq PetalburgCity_Gym_EventScript_DontGiveEnigmaBerry - checkpcitem ITEM_ENIGMA_BERRY_E_READER, 1 + checkpcitem ITEM_ENIGMA_BERRY, 1 compare VAR_RESULT, TRUE goto_if_eq PetalburgCity_Gym_EventScript_DontGiveEnigmaBerry compare VAR_ENIGMA_BERRY_AVAILABLE, 0 @@ -400,7 +400,7 @@ PetalburgCity_Gym_EventScript_DontGiveEnigmaBerry:: return PetalburgCity_Gym_EventScript_GiveEnigmaBerry:: - giveitem ITEM_ENIGMA_BERRY_E_READER + giveitem ITEM_ENIGMA_BERRY compare VAR_RESULT, FALSE goto_if_eq Common_EventScript_ShowBagIsFull setvar VAR_ENIGMA_BERRY_AVAILABLE, 0 diff --git a/include/constants/items.h b/include/constants/items.h index 9c6970472..9280118e2 100644 --- a/include/constants/items.h +++ b/include/constants/items.h @@ -668,17 +668,17 @@ #define ITEM_APICOT_BERRY 572 #define ITEM_LANSAT_BERRY 573 #define ITEM_STARF_BERRY 574 -#define ITEM_ENIGMA_BERRY 575 +#define ITEM_ENIGMA_BERRY_NEW 575 #define ITEM_MICLE_BERRY 576 #define ITEM_CUSTAP_BERRY 577 #define ITEM_JABOCA_BERRY 578 #define ITEM_ROWAP_BERRY 579 #define ITEM_KEE_BERRY 580 #define ITEM_MARANGA_BERRY 581 -#define ITEM_ENIGMA_BERRY_E_READER 582 +#define ITEM_ENIGMA_BERRY 582 #define FIRST_BERRY_INDEX ITEM_CHERI_BERRY -#define LAST_BERRY_INDEX ITEM_ENIGMA_BERRY_E_READER +#define LAST_BERRY_INDEX ITEM_ENIGMA_BERRY // TMs/HMs #define ITEM_TM01 583 diff --git a/src/battle_ai_switch_items.c b/src/battle_ai_switch_items.c index ee4a395a4..04122b17d 100644 --- a/src/battle_ai_switch_items.c +++ b/src/battle_ai_switch_items.c @@ -834,7 +834,7 @@ static bool8 ShouldUseItem(void) if (gItemEffectTable[item - ITEM_POTION] == NULL) continue; - if (item == ITEM_ENIGMA_BERRY_E_READER) + if (item == ITEM_ENIGMA_BERRY) itemEffects = gSaveBlock1Ptr->enigmaBerry.itemEffect; else itemEffects = gItemEffectTable[item - ITEM_POTION]; diff --git a/src/battle_main.c b/src/battle_main.c index b49969c9f..37ab6109c 100644 --- a/src/battle_main.c +++ b/src/battle_main.c @@ -758,7 +758,7 @@ static void SetPlayerBerryDataInBattleStruct(void) } else { - const struct Berry *berryData = GetBerryInfo(ItemIdToBerryType(ITEM_ENIGMA_BERRY_E_READER)); + const struct Berry *berryData = GetBerryInfo(ItemIdToBerryType(ITEM_ENIGMA_BERRY)); for (i = 0; i < BERRY_NAME_LENGTH; i++) battleBerry->name[i] = berryData->name[i]; @@ -802,7 +802,7 @@ static void SetAllPlayersBerryData(void) } else { - const struct Berry *berryData = GetBerryInfo(ItemIdToBerryType(ITEM_ENIGMA_BERRY_E_READER)); + const struct Berry *berryData = GetBerryInfo(ItemIdToBerryType(ITEM_ENIGMA_BERRY)); for (i = 0; i < BERRY_NAME_LENGTH; i++) { @@ -3936,7 +3936,7 @@ u8 IsRunningFromBattleImpossible(void) u8 side; s32 i; - if (gBattleMons[gActiveBattler].item == ITEM_ENIGMA_BERRY_E_READER) + if (gBattleMons[gActiveBattler].item == ITEM_ENIGMA_BERRY) holdEffect = gEnigmaBerries[gActiveBattler].holdEffect; else holdEffect = ItemId_GetHoldEffect(gBattleMons[gActiveBattler].item); @@ -4547,7 +4547,7 @@ u8 GetWhoStrikesFirst(u8 battler1, u8 battler2, bool8 ignoreChosenMoves) * (gStatStageRatios[gBattleMons[battler1].statStages[STAT_SPEED]][0]) / (gStatStageRatios[gBattleMons[battler1].statStages[STAT_SPEED]][1]); - if (gBattleMons[battler1].item == ITEM_ENIGMA_BERRY_E_READER) + if (gBattleMons[battler1].item == ITEM_ENIGMA_BERRY) { holdEffect = gEnigmaBerries[battler1].holdEffect; holdEffectParam = gEnigmaBerries[battler1].holdEffectParam; @@ -4581,7 +4581,7 @@ u8 GetWhoStrikesFirst(u8 battler1, u8 battler2, bool8 ignoreChosenMoves) * (gStatStageRatios[gBattleMons[battler2].statStages[STAT_SPEED]][0]) / (gStatStageRatios[gBattleMons[battler2].statStages[STAT_SPEED]][1]); - if (gBattleMons[battler2].item == ITEM_ENIGMA_BERRY_E_READER) + if (gBattleMons[battler2].item == ITEM_ENIGMA_BERRY) { holdEffect = gEnigmaBerries[battler2].holdEffect; holdEffectParam = gEnigmaBerries[battler2].holdEffectParam; diff --git a/src/battle_message.c b/src/battle_message.c index fb853032c..ae30a2a62 100644 --- a/src/battle_message.c +++ b/src/battle_message.c @@ -2559,7 +2559,7 @@ u32 BattleStringExpandPlaceholders(const u8 *src, u8 *dst) case B_TXT_LAST_ITEM: // last used item if (gBattleTypeFlags & (BATTLE_TYPE_LINK | BATTLE_TYPE_RECORDED_LINK)) { - if (gLastUsedItem == ITEM_ENIGMA_BERRY_E_READER) + if (gLastUsedItem == ITEM_ENIGMA_BERRY) { if (!(gBattleTypeFlags & BATTLE_TYPE_MULTI)) { @@ -2940,7 +2940,7 @@ static void ExpandBattleTextBuffPlaceholders(const u8 *src, u8 *dst) hword = T1_READ_16(&src[srcID + 1]); if (gBattleTypeFlags & (BATTLE_TYPE_LINK | BATTLE_TYPE_RECORDED_LINK)) { - if (hword == ITEM_ENIGMA_BERRY_E_READER) + if (hword == ITEM_ENIGMA_BERRY) { if (gLinkPlayers[gBattleScripting.multiplayerId].id == gPotentialItemEffectBattler) { diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index 23f09106e..a6d6bb4e8 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -1140,7 +1140,7 @@ static void Cmd_accuracycheck(void) if (gBattleMons[gBattlerAttacker].ability == ABILITY_HUSTLE && IS_TYPE_PHYSICAL(type)) calc = (calc * 80) / 100; // 1.2 hustle loss - if (gBattleMons[gBattlerTarget].item == ITEM_ENIGMA_BERRY_E_READER) + if (gBattleMons[gBattlerTarget].item == ITEM_ENIGMA_BERRY) { holdEffect = gEnigmaBerries[gBattlerTarget].holdEffect; param = gEnigmaBerries[gBattlerTarget].holdEffectParam; @@ -1239,7 +1239,7 @@ static void Cmd_critcalc(void) item = gBattleMons[gBattlerAttacker].item; - if (item == ITEM_ENIGMA_BERRY_E_READER) + if (item == ITEM_ENIGMA_BERRY) holdEffect = gEnigmaBerries[gBattlerAttacker].holdEffect; else holdEffect = ItemId_GetHoldEffect(item); @@ -1642,7 +1642,7 @@ static void Cmd_adjustnormaldamage(void) ApplyRandomDmgMultiplier(); - if (gBattleMons[gBattlerTarget].item == ITEM_ENIGMA_BERRY_E_READER) + if (gBattleMons[gBattlerTarget].item == ITEM_ENIGMA_BERRY) { holdEffect = gEnigmaBerries[gBattlerTarget].holdEffect; param = gEnigmaBerries[gBattlerTarget].holdEffectParam; @@ -1684,7 +1684,7 @@ static void Cmd_adjustnormaldamage2(void) // The same as adjustnormaldamage exce ApplyRandomDmgMultiplier(); - if (gBattleMons[gBattlerTarget].item == ITEM_ENIGMA_BERRY_E_READER) + if (gBattleMons[gBattlerTarget].item == ITEM_ENIGMA_BERRY) { holdEffect = gEnigmaBerries[gBattlerTarget].holdEffect; param = gEnigmaBerries[gBattlerTarget].holdEffectParam; @@ -2728,7 +2728,7 @@ void SetMoveEffect(bool8 primary, u8 certain) RecordAbilityBattle(gBattlerTarget, gLastUsedAbility); } else if (gBattleMons[gBattlerAttacker].item != 0 - || gBattleMons[gBattlerTarget].item == ITEM_ENIGMA_BERRY_E_READER + || gBattleMons[gBattlerTarget].item == ITEM_ENIGMA_BERRY || IS_ITEM_MAIL(gBattleMons[gBattlerTarget].item) || gBattleMons[gBattlerTarget].item == 0) { @@ -3247,7 +3247,7 @@ static void Cmd_getexp(void) item = GetMonData(&gPlayerParty[i], MON_DATA_HELD_ITEM); - if (item == ITEM_ENIGMA_BERRY_E_READER) + if (item == ITEM_ENIGMA_BERRY) holdEffect = gSaveBlock1Ptr->enigmaBerry.holdEffect; else holdEffect = ItemId_GetHoldEffect(item); @@ -3286,7 +3286,7 @@ static void Cmd_getexp(void) { item = GetMonData(&gPlayerParty[gBattleStruct->expGetterMonId], MON_DATA_HELD_ITEM); - if (item == ITEM_ENIGMA_BERRY_E_READER) + if (item == ITEM_ENIGMA_BERRY) holdEffect = gSaveBlock1Ptr->enigmaBerry.holdEffect; else holdEffect = ItemId_GetHoldEffect(item); @@ -4176,7 +4176,7 @@ static void Cmd_moveend(void) arg1 = gBattlescriptCurrInstr[1]; arg2 = gBattlescriptCurrInstr[2]; - if (gBattleMons[gBattlerAttacker].item == ITEM_ENIGMA_BERRY_E_READER) + if (gBattleMons[gBattlerAttacker].item == ITEM_ENIGMA_BERRY) holdEffectAtk = gEnigmaBerries[gBattlerAttacker].holdEffect; else holdEffectAtk = ItemId_GetHoldEffect(gBattleMons[gBattlerAttacker].item); @@ -5805,7 +5805,7 @@ static void Cmd_adjustsetdamage(void) // The same as adjustnormaldamage, except { u8 holdEffect, param; - if (gBattleMons[gBattlerTarget].item == ITEM_ENIGMA_BERRY_E_READER) + if (gBattleMons[gBattlerTarget].item == ITEM_ENIGMA_BERRY) { holdEffect = gEnigmaBerries[gBattlerTarget].holdEffect; param = gEnigmaBerries[gBattlerTarget].holdEffectParam; @@ -7379,7 +7379,7 @@ static void Cmd_tryKO(void) { u8 holdEffect, param; - if (gBattleMons[gBattlerTarget].item == ITEM_ENIGMA_BERRY_E_READER) + if (gBattleMons[gBattlerTarget].item == ITEM_ENIGMA_BERRY) { holdEffect = gEnigmaBerries[gBattlerTarget].holdEffect; param = gEnigmaBerries[gBattlerTarget].holdEffectParam; @@ -9069,8 +9069,8 @@ static void Cmd_tryswapitems(void) // trick // can't swap if two pokemon don't have an item // or if either of them is an enigma berry or a mail else if ((gBattleMons[gBattlerAttacker].item == 0 && gBattleMons[gBattlerTarget].item == 0) - || gBattleMons[gBattlerAttacker].item == ITEM_ENIGMA_BERRY_E_READER - || gBattleMons[gBattlerTarget].item == ITEM_ENIGMA_BERRY_E_READER + || gBattleMons[gBattlerAttacker].item == ITEM_ENIGMA_BERRY + || gBattleMons[gBattlerTarget].item == ITEM_ENIGMA_BERRY || IS_ITEM_MAIL(gBattleMons[gBattlerAttacker].item) || IS_ITEM_MAIL(gBattleMons[gBattlerTarget].item)) { diff --git a/src/battle_util.c b/src/battle_util.c index b1366ea83..59769fef1 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -406,7 +406,7 @@ bool8 TryRunFromBattle(u8 battler) u8 pyramidMultiplier; u8 speedVar; - if (gBattleMons[battler].item == ITEM_ENIGMA_BERRY_E_READER) + if (gBattleMons[battler].item == ITEM_ENIGMA_BERRY) holdEffect = gEnigmaBerries[battler].holdEffect; else holdEffect = ItemId_GetHoldEffect(gBattleMons[battler].item); @@ -1028,7 +1028,7 @@ u8 TrySetCantSelectMoveBattleScript(void) } } - if (gBattleMons[gActiveBattler].item == ITEM_ENIGMA_BERRY_E_READER) + if (gBattleMons[gActiveBattler].item == ITEM_ENIGMA_BERRY) holdEffect = gEnigmaBerries[gActiveBattler].holdEffect; else holdEffect = ItemId_GetHoldEffect(gBattleMons[gActiveBattler].item); @@ -1072,7 +1072,7 @@ u8 CheckMoveLimitations(u8 battlerId, u8 unusableMoves, u8 check) u16 *choicedMove = &gBattleStruct->choicedMove[battlerId]; s32 i; - if (gBattleMons[battlerId].item == ITEM_ENIGMA_BERRY_E_READER) + if (gBattleMons[battlerId].item == ITEM_ENIGMA_BERRY) holdEffect = gEnigmaBerries[battlerId].holdEffect; else holdEffect = ItemId_GetHoldEffect(gBattleMons[battlerId].item); @@ -3217,7 +3217,7 @@ u8 ItemBattleEffects(u8 caseID, u8 battlerId, bool8 moveTurn) u16 atkItem, defItem; gLastUsedItem = gBattleMons[battlerId].item; - if (gLastUsedItem == ITEM_ENIGMA_BERRY_E_READER) + if (gLastUsedItem == ITEM_ENIGMA_BERRY) { battlerHoldEffect = gEnigmaBerries[battlerId].holdEffect; battlerHoldEffectParam = gEnigmaBerries[battlerId].holdEffectParam; @@ -3229,7 +3229,7 @@ u8 ItemBattleEffects(u8 caseID, u8 battlerId, bool8 moveTurn) } atkItem = gBattleMons[gBattlerAttacker].item; - if (atkItem == ITEM_ENIGMA_BERRY_E_READER) + if (atkItem == ITEM_ENIGMA_BERRY) { atkHoldEffect = gEnigmaBerries[gBattlerAttacker].holdEffect; atkHoldEffectParam = gEnigmaBerries[gBattlerAttacker].holdEffectParam; @@ -3242,7 +3242,7 @@ u8 ItemBattleEffects(u8 caseID, u8 battlerId, bool8 moveTurn) // def variables are unused defItem = gBattleMons[gBattlerTarget].item; - if (defItem == ITEM_ENIGMA_BERRY_E_READER) + if (defItem == ITEM_ENIGMA_BERRY) { defHoldEffect = gEnigmaBerries[gBattlerTarget].holdEffect; defHoldEffectParam = gEnigmaBerries[gBattlerTarget].holdEffectParam; @@ -3701,7 +3701,7 @@ u8 ItemBattleEffects(u8 caseID, u8 battlerId, bool8 moveTurn) for (battlerId = 0; battlerId < gBattlersCount; battlerId++) { gLastUsedItem = gBattleMons[battlerId].item; - if (gBattleMons[battlerId].item == ITEM_ENIGMA_BERRY_E_READER) + if (gBattleMons[battlerId].item == ITEM_ENIGMA_BERRY) { battlerHoldEffect = gEnigmaBerries[battlerId].holdEffect; battlerHoldEffectParam = gEnigmaBerries[battlerId].holdEffectParam; diff --git a/src/berry.c b/src/berry.c index 2d376b16f..bc6968ada 100644 --- a/src/berry.c +++ b/src/berry.c @@ -919,7 +919,7 @@ const struct Berry gBerries[] = .smoothness = 30, }, - [ITEM_ENIGMA_BERRY - FIRST_BERRY_INDEX] = + [ITEM_ENIGMA_BERRY_NEW - FIRST_BERRY_INDEX] = { .name = _("ENIGMA"), .firmness = BERRY_FIRMNESS_UNKNOWN, @@ -1413,7 +1413,7 @@ const struct BerryCrushBerryData gBerryCrush_BerryData[] = { [ITEM_APICOT_BERRY - FIRST_BERRY_INDEX] = {.difficulty = 180, .powder = 500}, [ITEM_LANSAT_BERRY - FIRST_BERRY_INDEX] = {.difficulty = 200, .powder = 750}, [ITEM_STARF_BERRY - FIRST_BERRY_INDEX] = {.difficulty = 200, .powder = 750}, - [ITEM_ENIGMA_BERRY - FIRST_BERRY_INDEX] = {.difficulty = 150, .powder = 200} + [ITEM_ENIGMA_BERRY_NEW - FIRST_BERRY_INDEX] = {.difficulty = 150, .powder = 200} }; const struct BerryTree gBlankBerryTree = {}; @@ -1460,7 +1460,7 @@ bool32 IsEnigmaBerryValid(void) const struct Berry *GetBerryInfo(u8 berry) { - if (berry == ITEM_TO_BERRY(ITEM_ENIGMA_BERRY_E_READER) && IsEnigmaBerryValid()) + if (berry == ITEM_TO_BERRY(ITEM_ENIGMA_BERRY) && IsEnigmaBerryValid()) return (struct Berry*)(&gSaveBlock1Ptr->enigmaBerry.berry); else { diff --git a/src/berry_blender.c b/src/berry_blender.c index 09f9b75ca..8e8d392db 100644 --- a/src/berry_blender.c +++ b/src/berry_blender.c @@ -1538,7 +1538,7 @@ static void SetOpponentsBerryData(u16 playerBerryItemId, u8 playersNum, struct B u16 berryMasterDiff; u16 i; - if (playerBerryItemId == ITEM_ENIGMA_BERRY_E_READER) + if (playerBerryItemId == ITEM_ENIGMA_BERRY) { for (i = 0; i < FLAVOR_COUNT; i++) { @@ -2286,7 +2286,7 @@ static u32 CalculatePokeblockColor(struct BlenderBerry* berries, s16* _flavors, for (j = 0; j < numPlayers; j++) { if (berries[i].itemId == berries[j].itemId && i != j - && (berries[i].itemId != ITEM_ENIGMA_BERRY_E_READER || AreBlenderBerriesSame(berries, i, j))) + && (berries[i].itemId != ITEM_ENIGMA_BERRY || AreBlenderBerriesSame(berries, i, j))) return PBLOCK_CLR_BLACK; } } diff --git a/src/data/item_icon_table.h b/src/data/item_icon_table.h index eb6c6142b..129f16606 100644 --- a/src/data/item_icon_table.h +++ b/src/data/item_icon_table.h @@ -614,14 +614,14 @@ const u32 *const gItemIconTable[][2] = [ITEM_APICOT_BERRY] = {gItemIcon_ApicotBerry, gItemIconPalette_ApicotBerry}, [ITEM_LANSAT_BERRY] = {gItemIcon_LansatBerry, gItemIconPalette_LansatBerry}, [ITEM_STARF_BERRY] = {gItemIcon_StarfBerry, gItemIconPalette_StarfBerry}, - [ITEM_ENIGMA_BERRY] = {gItemIcon_QuestionMark, gItemIconPalette_QuestionMark}, // Todo + [ITEM_ENIGMA_BERRY_NEW] = {gItemIcon_QuestionMark, gItemIconPalette_QuestionMark}, // Todo [ITEM_MICLE_BERRY] = {gItemIcon_MicleBerry, gItemIconPalette_MicleBerry}, [ITEM_CUSTAP_BERRY] = {gItemIcon_CustapBerry, gItemIconPalette_CustapBerry}, [ITEM_JABOCA_BERRY] = {gItemIcon_JabocaBerry, gItemIconPalette_JabocaBerry}, [ITEM_ROWAP_BERRY] = {gItemIcon_RowapBerry, gItemIconPalette_RowapBerry}, [ITEM_KEE_BERRY] = {gItemIcon_KeeBerry, gItemIconPalette_KeeBerry}, [ITEM_MARANGA_BERRY] = {gItemIcon_MarangaBerry, gItemIconPalette_MarangaBerry}, - [ITEM_ENIGMA_BERRY_E_READER] = {gItemIcon_EnigmaBerry, gItemIconPalette_EnigmaBerry}, + [ITEM_ENIGMA_BERRY] = {gItemIcon_EnigmaBerry, gItemIconPalette_EnigmaBerry}, // TMs/HMs [ITEM_TM01] = {gItemIcon_TM, gItemIconPalette_FightingTMHM}, [ITEM_TM02] = {gItemIcon_TM, gItemIconPalette_DragonTMHM}, diff --git a/src/data/items.h b/src/data/items.h index 1dbc74035..227a9cde8 100644 --- a/src/data/items.h +++ b/src/data/items.h @@ -7211,12 +7211,12 @@ const struct Item gItems[] = .fieldUseFunc = ItemUseOutOfBattle_CannotUse, }, - [ITEM_ENIGMA_BERRY] = // Todo + [ITEM_ENIGMA_BERRY_NEW] = // Todo { .name = _("????????"), .itemId = ITEM_NONE, .price = 0, - .description = sDummyDesc, + .description = sEnigmaBerryNewDesc, .pocket = POCKET_ITEMS, .type = ITEM_USE_BAG_MENU, .fieldUseFunc = ItemUseOutOfBattle_CannotUse, @@ -7296,12 +7296,12 @@ const struct Item gItems[] = .fieldUseFunc = ItemUseOutOfBattle_CannotUse, }, - [ITEM_ENIGMA_BERRY_E_READER] = + [ITEM_ENIGMA_BERRY] = { .name = _("Enigma Berry"), .itemId = ITEM_ENIGMA_BERRY, .price = 20, - .description = sEnigmaBerryEReaderDesc, + .description = sEnigmaBerryDesc, .pocket = POCKET_BERRIES, .type = ITEM_USE_BAG_MENU, // Type handled by ItemUseOutOfBattle_EnigmaBerry .fieldUseFunc = ItemUseOutOfBattle_EnigmaBerry, diff --git a/src/data/object_events/berry_tree_graphics_tables.h b/src/data/object_events/berry_tree_graphics_tables.h index 3f8dbbc9f..77a2f7f25 100755 --- a/src/data/object_events/berry_tree_graphics_tables.h +++ b/src/data/object_events/berry_tree_graphics_tables.h @@ -675,7 +675,7 @@ const struct SpriteFrameImage *const gBerryTreePicTablePointers[] = { [ITEM_APICOT_BERRY - FIRST_BERRY_INDEX] = sPicTable_GrepaBerryTree, [ITEM_LANSAT_BERRY - FIRST_BERRY_INDEX] = sPicTable_LansatBerryTree, [ITEM_STARF_BERRY - FIRST_BERRY_INDEX] = sPicTable_CornnBerryTree, - [ITEM_ENIGMA_BERRY - FIRST_BERRY_INDEX] = sPicTable_DurinBerryTree, + [ITEM_ENIGMA_BERRY_NEW - FIRST_BERRY_INDEX] = sPicTable_DurinBerryTree, [ITEM_OCCA_BERRY - FIRST_BERRY_INDEX] = sPicTable_OccaBerryTree, [ITEM_PASSHO_BERRY - FIRST_BERRY_INDEX] = sPicTable_CornnBerryTree, [ITEM_WACAN_BERRY - FIRST_BERRY_INDEX] = sPicTable_RazzBerryTree, @@ -700,6 +700,7 @@ const struct SpriteFrameImage *const gBerryTreePicTablePointers[] = { [ITEM_ROWAP_BERRY - FIRST_BERRY_INDEX] = sPicTable_RowapBerryTree, [ITEM_KEE_BERRY - FIRST_BERRY_INDEX] = sPicTable_PechaBerryTree, [ITEM_MARANGA_BERRY - FIRST_BERRY_INDEX] = sPicTable_OccaBerryTree, + [ITEM_ENIGMA_BERRY - FIRST_BERRY_INDEX] = sPicTable_DurinBerryTree, }; const u8 *const gBerryTreePaletteSlotTablePointers[] = { @@ -745,7 +746,7 @@ const u8 *const gBerryTreePaletteSlotTablePointers[] = { [ITEM_APICOT_BERRY - FIRST_BERRY_INDEX] = gBerryTreePaletteSlotTable_Grepa, [ITEM_LANSAT_BERRY - FIRST_BERRY_INDEX] = gBerryTreePaletteSlotTable_Lansat, [ITEM_STARF_BERRY - FIRST_BERRY_INDEX] = gBerryTreePaletteSlotTable_Cornn, - [ITEM_ENIGMA_BERRY - FIRST_BERRY_INDEX] = gBerryTreePaletteSlotTable_Durin, + [ITEM_ENIGMA_BERRY_NEW - FIRST_BERRY_INDEX] = gBerryTreePaletteSlotTable_Durin, [ITEM_OCCA_BERRY - FIRST_BERRY_INDEX] = gBerryTreePaletteSlotTable_Occa, [ITEM_PASSHO_BERRY - FIRST_BERRY_INDEX] = gBerryTreePaletteSlotTable_Cornn, [ITEM_WACAN_BERRY - FIRST_BERRY_INDEX] = gBerryTreePaletteSlotTable_Razz, @@ -770,6 +771,7 @@ const u8 *const gBerryTreePaletteSlotTablePointers[] = { [ITEM_ROWAP_BERRY - FIRST_BERRY_INDEX] = gBerryTreePaletteSlotTable_Rowap, [ITEM_KEE_BERRY - FIRST_BERRY_INDEX] = gBerryTreePaletteSlotTable_Pecha, [ITEM_MARANGA_BERRY - FIRST_BERRY_INDEX] = gBerryTreePaletteSlotTable_Occa, + [ITEM_ENIGMA_BERRY - FIRST_BERRY_INDEX] = gBerryTreePaletteSlotTable_Durin, }; const u8 *const gBerryTreeObjectEventGraphicsIdTablePointers[] = { @@ -815,7 +817,7 @@ const u8 *const gBerryTreeObjectEventGraphicsIdTablePointers[] = { [ITEM_APICOT_BERRY - FIRST_BERRY_INDEX] = gBerryTreeObjectEventGraphicsIdTable, [ITEM_LANSAT_BERRY - FIRST_BERRY_INDEX] = gBerryTreeObjectEventGraphicsIdTable, [ITEM_STARF_BERRY - FIRST_BERRY_INDEX] = gBerryTreeObjectEventGraphicsIdTable, - [ITEM_ENIGMA_BERRY - FIRST_BERRY_INDEX] = gBerryTreeObjectEventGraphicsIdTable, + [ITEM_ENIGMA_BERRY_NEW - FIRST_BERRY_INDEX] = gBerryTreeObjectEventGraphicsIdTable, [ITEM_OCCA_BERRY - FIRST_BERRY_INDEX] = gBerryTreeObjectEventGraphicsIdTable, [ITEM_PASSHO_BERRY - FIRST_BERRY_INDEX] = gBerryTreeObjectEventGraphicsIdTable, [ITEM_WACAN_BERRY - FIRST_BERRY_INDEX] = gBerryTreeObjectEventGraphicsIdTable, @@ -840,4 +842,5 @@ const u8 *const gBerryTreeObjectEventGraphicsIdTablePointers[] = { [ITEM_ROWAP_BERRY - FIRST_BERRY_INDEX] = gBerryTreeObjectEventGraphicsIdTable, [ITEM_KEE_BERRY - FIRST_BERRY_INDEX] = gBerryTreeObjectEventGraphicsIdTable, [ITEM_MARANGA_BERRY - FIRST_BERRY_INDEX] = gBerryTreeObjectEventGraphicsIdTable, + [ITEM_ENIGMA_BERRY - FIRST_BERRY_INDEX] = gBerryTreeObjectEventGraphicsIdTable, }; diff --git a/src/data/text/item_descriptions.h b/src/data/text/item_descriptions.h index b0bd4d854..60da35ba3 100644 --- a/src/data/text/item_descriptions.h +++ b/src/data/text/item_descriptions.h @@ -2710,7 +2710,7 @@ static const u8 sStarfBerryDesc[] = _( "sharply boosts a\n" "stat in a pinch."); -static const u8 sEnigmaBerryDesc[] = _( // Todo +static const u8 sEnigmaBerryNewDesc[] = _( // Todo "?????"); static const u8 sMicleBerryDesc[] = _( @@ -2743,7 +2743,7 @@ static const u8 sMarangaBerryDesc[] = _( "move, it raises the\n" "Sp. Def. a bit."); -static const u8 sEnigmaBerryEReaderDesc[] = _( +static const u8 sEnigmaBerryDesc[] = _( "{POKEBLOCK} ingredient.\n" "Plant in loamy soil\n" "to grow a mystery."); diff --git a/src/item_menu.c b/src/item_menu.c index f93e20129..9cc02e8cc 100755 --- a/src/item_menu.c +++ b/src/item_menu.c @@ -1549,7 +1549,7 @@ static void OpenContextMenu(u8 taskId) gBagMenu->contextMenuNumItems = ARRAY_COUNT(sContextMenuItems_BerryBlenderCrush); break; case ITEMMENULOCATION_APPRENTICE: - if (!ItemId_GetImportance(gSpecialVar_ItemId) && gSpecialVar_ItemId != ITEM_ENIGMA_BERRY_E_READER) + if (!ItemId_GetImportance(gSpecialVar_ItemId) && gSpecialVar_ItemId != ITEM_ENIGMA_BERRY) { gBagMenu->contextMenuItemsPtr = sContextMenuItems_Apprentice; gBagMenu->contextMenuNumItems = ARRAY_COUNT(sContextMenuItems_Apprentice); @@ -1561,7 +1561,7 @@ static void OpenContextMenu(u8 taskId) } break; case ITEMMENULOCATION_FAVOR_LADY: - if (!ItemId_GetImportance(gSpecialVar_ItemId) && gSpecialVar_ItemId != ITEM_ENIGMA_BERRY_E_READER) + if (!ItemId_GetImportance(gSpecialVar_ItemId) && gSpecialVar_ItemId != ITEM_ENIGMA_BERRY) { gBagMenu->contextMenuItemsPtr = sContextMenuItems_FavorLady; gBagMenu->contextMenuNumItems = ARRAY_COUNT(sContextMenuItems_FavorLady); @@ -1573,7 +1573,7 @@ static void OpenContextMenu(u8 taskId) } break; case ITEMMENULOCATION_QUIZ_LADY: - if (!ItemId_GetImportance(gSpecialVar_ItemId) && gSpecialVar_ItemId != ITEM_ENIGMA_BERRY_E_READER) + if (!ItemId_GetImportance(gSpecialVar_ItemId) && gSpecialVar_ItemId != ITEM_ENIGMA_BERRY) { gBagMenu->contextMenuItemsPtr = sContextMenuItems_QuizLady; gBagMenu->contextMenuNumItems = ARRAY_COUNT(sContextMenuItems_QuizLady); diff --git a/src/item_menu_icons.c b/src/item_menu_icons.c index f794bd850..822c754ed 100644 --- a/src/item_menu_icons.c +++ b/src/item_menu_icons.c @@ -321,73 +321,74 @@ static const struct SpriteTemplate gBerryPicRotatingSpriteTemplate = static const struct CompressedTilesPal sBerryPicTable[] = { - [ITEM_TO_BERRY(ITEM_CHERI_BERRY) - 1] = {gBerryPic_Cheri, gBerryPalette_Cheri}, - [ITEM_TO_BERRY(ITEM_CHESTO_BERRY) - 1] = {gBerryPic_Chesto, gBerryPalette_Chesto}, - [ITEM_TO_BERRY(ITEM_PECHA_BERRY) - 1] = {gBerryPic_Pecha, gBerryPalette_Pecha}, - [ITEM_TO_BERRY(ITEM_RAWST_BERRY) - 1] = {gBerryPic_Rawst, gBerryPalette_Rawst}, - [ITEM_TO_BERRY(ITEM_ASPEAR_BERRY) - 1] = {gBerryPic_Aspear, gBerryPalette_Aspear}, - [ITEM_TO_BERRY(ITEM_LEPPA_BERRY) - 1] = {gBerryPic_Leppa, gBerryPalette_Leppa}, - [ITEM_TO_BERRY(ITEM_ORAN_BERRY) - 1] = {gBerryPic_Oran, gBerryPalette_Oran}, - [ITEM_TO_BERRY(ITEM_PERSIM_BERRY) - 1] = {gBerryPic_Persim, gBerryPalette_Persim}, - [ITEM_TO_BERRY(ITEM_LUM_BERRY) - 1] = {gBerryPic_Lum, gBerryPalette_Lum}, - [ITEM_TO_BERRY(ITEM_SITRUS_BERRY) - 1] = {gBerryPic_Sitrus, gBerryPalette_Sitrus}, - [ITEM_TO_BERRY(ITEM_FIGY_BERRY) - 1] = {gBerryPic_Figy, gBerryPalette_Figy}, - [ITEM_TO_BERRY(ITEM_WIKI_BERRY) - 1] = {gBerryPic_Wiki, gBerryPalette_Wiki}, - [ITEM_TO_BERRY(ITEM_MAGO_BERRY) - 1] = {gBerryPic_Mago, gBerryPalette_Mago}, - [ITEM_TO_BERRY(ITEM_AGUAV_BERRY) - 1] = {gBerryPic_Aguav, gBerryPalette_Aguav}, - [ITEM_TO_BERRY(ITEM_IAPAPA_BERRY) - 1] = {gBerryPic_Iapapa, gBerryPalette_Iapapa}, - [ITEM_TO_BERRY(ITEM_RAZZ_BERRY) - 1] = {gBerryPic_Razz, gBerryPalette_Razz}, - [ITEM_TO_BERRY(ITEM_BLUK_BERRY) - 1] = {gBerryPic_Bluk, gBerryPalette_Bluk}, - [ITEM_TO_BERRY(ITEM_NANAB_BERRY) - 1] = {gBerryPic_Nanab, gBerryPalette_Nanab}, - [ITEM_TO_BERRY(ITEM_WEPEAR_BERRY) - 1] = {gBerryPic_Wepear, gBerryPalette_Wepear}, - [ITEM_TO_BERRY(ITEM_PINAP_BERRY) - 1] = {gBerryPic_Pinap, gBerryPalette_Pinap}, - [ITEM_TO_BERRY(ITEM_POMEG_BERRY) - 1] = {gBerryPic_Pomeg, gBerryPalette_Pomeg}, - [ITEM_TO_BERRY(ITEM_KELPSY_BERRY) - 1] = {gBerryPic_Kelpsy, gBerryPalette_Kelpsy}, - [ITEM_TO_BERRY(ITEM_QUALOT_BERRY) - 1] = {gBerryPic_Qualot, gBerryPalette_Qualot}, - [ITEM_TO_BERRY(ITEM_HONDEW_BERRY) - 1] = {gBerryPic_Hondew, gBerryPalette_Hondew}, - [ITEM_TO_BERRY(ITEM_GREPA_BERRY) - 1] = {gBerryPic_Grepa, gBerryPalette_Grepa}, - [ITEM_TO_BERRY(ITEM_TAMATO_BERRY) - 1] = {gBerryPic_Tamato, gBerryPalette_Tamato}, - [ITEM_TO_BERRY(ITEM_CORNN_BERRY) - 1] = {gBerryPic_Cornn, gBerryPalette_Cornn}, - [ITEM_TO_BERRY(ITEM_MAGOST_BERRY) - 1] = {gBerryPic_Magost, gBerryPalette_Magost}, - [ITEM_TO_BERRY(ITEM_RABUTA_BERRY) - 1] = {gBerryPic_Rabuta, gBerryPalette_Rabuta}, - [ITEM_TO_BERRY(ITEM_NOMEL_BERRY) - 1] = {gBerryPic_Nomel, gBerryPalette_Nomel}, - [ITEM_TO_BERRY(ITEM_SPELON_BERRY) - 1] = {gBerryPic_Spelon, gBerryPalette_Spelon}, - [ITEM_TO_BERRY(ITEM_PAMTRE_BERRY) - 1] = {gBerryPic_Pamtre, gBerryPalette_Pamtre}, - [ITEM_TO_BERRY(ITEM_WATMEL_BERRY) - 1] = {gBerryPic_Watmel, gBerryPalette_Watmel}, - [ITEM_TO_BERRY(ITEM_DURIN_BERRY) - 1] = {gBerryPic_Durin, gBerryPalette_Durin}, - [ITEM_TO_BERRY(ITEM_BELUE_BERRY) - 1] = {gBerryPic_Belue, gBerryPalette_Belue}, - [ITEM_TO_BERRY(ITEM_LIECHI_BERRY) - 1] = {gBerryPic_Liechi, gBerryPalette_Liechi}, - [ITEM_TO_BERRY(ITEM_GANLON_BERRY) - 1] = {gBerryPic_Ganlon, gBerryPalette_Ganlon}, - [ITEM_TO_BERRY(ITEM_SALAC_BERRY) - 1] = {gBerryPic_Salac, gBerryPalette_Salac}, - [ITEM_TO_BERRY(ITEM_PETAYA_BERRY) - 1] = {gBerryPic_Petaya, gBerryPalette_Petaya}, - [ITEM_TO_BERRY(ITEM_APICOT_BERRY) - 1] = {gBerryPic_Apicot, gBerryPalette_Apicot}, - [ITEM_TO_BERRY(ITEM_LANSAT_BERRY) - 1] = {gBerryPic_Lansat, gBerryPalette_Lansat}, - [ITEM_TO_BERRY(ITEM_STARF_BERRY) - 1] = {gBerryPic_Starf, gBerryPalette_Starf}, - [ITEM_TO_BERRY(ITEM_ENIGMA_BERRY) - 1] = {gBerryPic_Enigma, gBerryPalette_Enigma}, - [ITEM_TO_BERRY(ITEM_OCCA_BERRY) - 1] = {gBerryPic_Occa, gBerryPalette_Occa}, - [ITEM_TO_BERRY(ITEM_PASSHO_BERRY) - 1] = {gBerryPic_Passho, gBerryPalette_Passho}, - [ITEM_TO_BERRY(ITEM_WACAN_BERRY) - 1] = {gBerryPic_Wacan, gBerryPalette_Wacan}, - [ITEM_TO_BERRY(ITEM_RINDO_BERRY) - 1] = {gBerryPic_Rindo, gBerryPalette_Rindo}, - [ITEM_TO_BERRY(ITEM_YACHE_BERRY) - 1] = {gBerryPic_Yache, gBerryPalette_Yache}, - [ITEM_TO_BERRY(ITEM_CHOPLE_BERRY) - 1] = {gBerryPic_Chople, gBerryPalette_Chople}, - [ITEM_TO_BERRY(ITEM_KEBIA_BERRY) - 1] = {gBerryPic_Kebia, gBerryPalette_Kebia}, - [ITEM_TO_BERRY(ITEM_SHUCA_BERRY) - 1] = {gBerryPic_Shuca, gBerryPalette_Shuca}, - [ITEM_TO_BERRY(ITEM_COBA_BERRY) - 1] = {gBerryPic_Coba, gBerryPalette_Coba}, - [ITEM_TO_BERRY(ITEM_PAYAPA_BERRY) - 1] = {gBerryPic_Payapa, gBerryPalette_Payapa}, - [ITEM_TO_BERRY(ITEM_TANGA_BERRY) - 1] = {gBerryPic_Tanga, gBerryPalette_Tanga}, - [ITEM_TO_BERRY(ITEM_CHARTI_BERRY) - 1] = {gBerryPic_Charti, gBerryPalette_Charti}, - [ITEM_TO_BERRY(ITEM_KASIB_BERRY) - 1] = {gBerryPic_Kasib, gBerryPalette_Kasib}, - [ITEM_TO_BERRY(ITEM_HABAN_BERRY) - 1] = {gBerryPic_Haban, gBerryPalette_Haban}, - [ITEM_TO_BERRY(ITEM_COLBUR_BERRY) - 1] = {gBerryPic_Colbur, gBerryPalette_Colbur}, - [ITEM_TO_BERRY(ITEM_BABIRI_BERRY) - 1] = {gBerryPic_Babiri, gBerryPalette_Babiri}, - [ITEM_TO_BERRY(ITEM_CHILAN_BERRY) - 1] = {gBerryPic_Chilan, gBerryPalette_Chilan}, - [ITEM_TO_BERRY(ITEM_ROSELI_BERRY) - 1] = {gBerryPic_Roseli, gBerryPalette_Roseli}, - [ITEM_TO_BERRY(ITEM_MICLE_BERRY) - 1] = {gBerryPic_Micle, gBerryPalette_Micle}, - [ITEM_TO_BERRY(ITEM_CUSTAP_BERRY) - 1] = {gBerryPic_Custap, gBerryPalette_Custap}, - [ITEM_TO_BERRY(ITEM_JABOCA_BERRY) - 1] = {gBerryPic_Jaboca, gBerryPalette_Jaboca}, - [ITEM_TO_BERRY(ITEM_ROWAP_BERRY) - 1] = {gBerryPic_Rowap, gBerryPalette_Rowap}, - [ITEM_TO_BERRY(ITEM_KEE_BERRY) - 1] = {gBerryPic_Kee, gBerryPalette_Kee}, - [ITEM_TO_BERRY(ITEM_MARANGA_BERRY)- 1] = {gBerryPic_Maranga, gBerryPalette_Maranga}, + [ITEM_TO_BERRY(ITEM_CHERI_BERRY) - 1] = {gBerryPic_Cheri, gBerryPalette_Cheri}, + [ITEM_TO_BERRY(ITEM_CHESTO_BERRY) - 1] = {gBerryPic_Chesto, gBerryPalette_Chesto}, + [ITEM_TO_BERRY(ITEM_PECHA_BERRY) - 1] = {gBerryPic_Pecha, gBerryPalette_Pecha}, + [ITEM_TO_BERRY(ITEM_RAWST_BERRY) - 1] = {gBerryPic_Rawst, gBerryPalette_Rawst}, + [ITEM_TO_BERRY(ITEM_ASPEAR_BERRY) - 1] = {gBerryPic_Aspear, gBerryPalette_Aspear}, + [ITEM_TO_BERRY(ITEM_LEPPA_BERRY) - 1] = {gBerryPic_Leppa, gBerryPalette_Leppa}, + [ITEM_TO_BERRY(ITEM_ORAN_BERRY) - 1] = {gBerryPic_Oran, gBerryPalette_Oran}, + [ITEM_TO_BERRY(ITEM_PERSIM_BERRY) - 1] = {gBerryPic_Persim, gBerryPalette_Persim}, + [ITEM_TO_BERRY(ITEM_LUM_BERRY) - 1] = {gBerryPic_Lum, gBerryPalette_Lum}, + [ITEM_TO_BERRY(ITEM_SITRUS_BERRY) - 1] = {gBerryPic_Sitrus, gBerryPalette_Sitrus}, + [ITEM_TO_BERRY(ITEM_FIGY_BERRY) - 1] = {gBerryPic_Figy, gBerryPalette_Figy}, + [ITEM_TO_BERRY(ITEM_WIKI_BERRY) - 1] = {gBerryPic_Wiki, gBerryPalette_Wiki}, + [ITEM_TO_BERRY(ITEM_MAGO_BERRY) - 1] = {gBerryPic_Mago, gBerryPalette_Mago}, + [ITEM_TO_BERRY(ITEM_AGUAV_BERRY) - 1] = {gBerryPic_Aguav, gBerryPalette_Aguav}, + [ITEM_TO_BERRY(ITEM_IAPAPA_BERRY) - 1] = {gBerryPic_Iapapa, gBerryPalette_Iapapa}, + [ITEM_TO_BERRY(ITEM_RAZZ_BERRY) - 1] = {gBerryPic_Razz, gBerryPalette_Razz}, + [ITEM_TO_BERRY(ITEM_BLUK_BERRY) - 1] = {gBerryPic_Bluk, gBerryPalette_Bluk}, + [ITEM_TO_BERRY(ITEM_NANAB_BERRY) - 1] = {gBerryPic_Nanab, gBerryPalette_Nanab}, + [ITEM_TO_BERRY(ITEM_WEPEAR_BERRY) - 1] = {gBerryPic_Wepear, gBerryPalette_Wepear}, + [ITEM_TO_BERRY(ITEM_PINAP_BERRY) - 1] = {gBerryPic_Pinap, gBerryPalette_Pinap}, + [ITEM_TO_BERRY(ITEM_POMEG_BERRY) - 1] = {gBerryPic_Pomeg, gBerryPalette_Pomeg}, + [ITEM_TO_BERRY(ITEM_KELPSY_BERRY) - 1] = {gBerryPic_Kelpsy, gBerryPalette_Kelpsy}, + [ITEM_TO_BERRY(ITEM_QUALOT_BERRY) - 1] = {gBerryPic_Qualot, gBerryPalette_Qualot}, + [ITEM_TO_BERRY(ITEM_HONDEW_BERRY) - 1] = {gBerryPic_Hondew, gBerryPalette_Hondew}, + [ITEM_TO_BERRY(ITEM_GREPA_BERRY) - 1] = {gBerryPic_Grepa, gBerryPalette_Grepa}, + [ITEM_TO_BERRY(ITEM_TAMATO_BERRY) - 1] = {gBerryPic_Tamato, gBerryPalette_Tamato}, + [ITEM_TO_BERRY(ITEM_CORNN_BERRY) - 1] = {gBerryPic_Cornn, gBerryPalette_Cornn}, + [ITEM_TO_BERRY(ITEM_MAGOST_BERRY) - 1] = {gBerryPic_Magost, gBerryPalette_Magost}, + [ITEM_TO_BERRY(ITEM_RABUTA_BERRY) - 1] = {gBerryPic_Rabuta, gBerryPalette_Rabuta}, + [ITEM_TO_BERRY(ITEM_NOMEL_BERRY) - 1] = {gBerryPic_Nomel, gBerryPalette_Nomel}, + [ITEM_TO_BERRY(ITEM_SPELON_BERRY) - 1] = {gBerryPic_Spelon, gBerryPalette_Spelon}, + [ITEM_TO_BERRY(ITEM_PAMTRE_BERRY) - 1] = {gBerryPic_Pamtre, gBerryPalette_Pamtre}, + [ITEM_TO_BERRY(ITEM_WATMEL_BERRY) - 1] = {gBerryPic_Watmel, gBerryPalette_Watmel}, + [ITEM_TO_BERRY(ITEM_DURIN_BERRY) - 1] = {gBerryPic_Durin, gBerryPalette_Durin}, + [ITEM_TO_BERRY(ITEM_BELUE_BERRY) - 1] = {gBerryPic_Belue, gBerryPalette_Belue}, + [ITEM_TO_BERRY(ITEM_LIECHI_BERRY) - 1] = {gBerryPic_Liechi, gBerryPalette_Liechi}, + [ITEM_TO_BERRY(ITEM_GANLON_BERRY) - 1] = {gBerryPic_Ganlon, gBerryPalette_Ganlon}, + [ITEM_TO_BERRY(ITEM_SALAC_BERRY) - 1] = {gBerryPic_Salac, gBerryPalette_Salac}, + [ITEM_TO_BERRY(ITEM_PETAYA_BERRY) - 1] = {gBerryPic_Petaya, gBerryPalette_Petaya}, + [ITEM_TO_BERRY(ITEM_APICOT_BERRY) - 1] = {gBerryPic_Apicot, gBerryPalette_Apicot}, + [ITEM_TO_BERRY(ITEM_LANSAT_BERRY) - 1] = {gBerryPic_Lansat, gBerryPalette_Lansat}, + [ITEM_TO_BERRY(ITEM_STARF_BERRY) - 1] = {gBerryPic_Starf, gBerryPalette_Starf}, + [ITEM_TO_BERRY(ITEM_ENIGMA_BERRY_NEW) - 1] = {gBerryPic_Enigma, gBerryPalette_Enigma}, + [ITEM_TO_BERRY(ITEM_OCCA_BERRY) - 1] = {gBerryPic_Occa, gBerryPalette_Occa}, + [ITEM_TO_BERRY(ITEM_PASSHO_BERRY) - 1] = {gBerryPic_Passho, gBerryPalette_Passho}, + [ITEM_TO_BERRY(ITEM_WACAN_BERRY) - 1] = {gBerryPic_Wacan, gBerryPalette_Wacan}, + [ITEM_TO_BERRY(ITEM_RINDO_BERRY) - 1] = {gBerryPic_Rindo, gBerryPalette_Rindo}, + [ITEM_TO_BERRY(ITEM_YACHE_BERRY) - 1] = {gBerryPic_Yache, gBerryPalette_Yache}, + [ITEM_TO_BERRY(ITEM_CHOPLE_BERRY) - 1] = {gBerryPic_Chople, gBerryPalette_Chople}, + [ITEM_TO_BERRY(ITEM_KEBIA_BERRY) - 1] = {gBerryPic_Kebia, gBerryPalette_Kebia}, + [ITEM_TO_BERRY(ITEM_SHUCA_BERRY) - 1] = {gBerryPic_Shuca, gBerryPalette_Shuca}, + [ITEM_TO_BERRY(ITEM_COBA_BERRY) - 1] = {gBerryPic_Coba, gBerryPalette_Coba}, + [ITEM_TO_BERRY(ITEM_PAYAPA_BERRY) - 1] = {gBerryPic_Payapa, gBerryPalette_Payapa}, + [ITEM_TO_BERRY(ITEM_TANGA_BERRY) - 1] = {gBerryPic_Tanga, gBerryPalette_Tanga}, + [ITEM_TO_BERRY(ITEM_CHARTI_BERRY) - 1] = {gBerryPic_Charti, gBerryPalette_Charti}, + [ITEM_TO_BERRY(ITEM_KASIB_BERRY) - 1] = {gBerryPic_Kasib, gBerryPalette_Kasib}, + [ITEM_TO_BERRY(ITEM_HABAN_BERRY) - 1] = {gBerryPic_Haban, gBerryPalette_Haban}, + [ITEM_TO_BERRY(ITEM_COLBUR_BERRY) - 1] = {gBerryPic_Colbur, gBerryPalette_Colbur}, + [ITEM_TO_BERRY(ITEM_BABIRI_BERRY) - 1] = {gBerryPic_Babiri, gBerryPalette_Babiri}, + [ITEM_TO_BERRY(ITEM_CHILAN_BERRY) - 1] = {gBerryPic_Chilan, gBerryPalette_Chilan}, + [ITEM_TO_BERRY(ITEM_ROSELI_BERRY) - 1] = {gBerryPic_Roseli, gBerryPalette_Roseli}, + [ITEM_TO_BERRY(ITEM_MICLE_BERRY) - 1] = {gBerryPic_Micle, gBerryPalette_Micle}, + [ITEM_TO_BERRY(ITEM_CUSTAP_BERRY) - 1] = {gBerryPic_Custap, gBerryPalette_Custap}, + [ITEM_TO_BERRY(ITEM_JABOCA_BERRY) - 1] = {gBerryPic_Jaboca, gBerryPalette_Jaboca}, + [ITEM_TO_BERRY(ITEM_ROWAP_BERRY) - 1] = {gBerryPic_Rowap, gBerryPalette_Rowap}, + [ITEM_TO_BERRY(ITEM_KEE_BERRY) - 1] = {gBerryPic_Kee, gBerryPalette_Kee}, + [ITEM_TO_BERRY(ITEM_MARANGA_BERRY) - 1] = {gBerryPic_Maranga, gBerryPalette_Maranga}, + [ITEM_TO_BERRY(ITEM_ENIGMA_BERRY) - 1] = {gBerryPic_Enigma, gBerryPalette_Enigma}, }; const struct CompressedSpriteSheet gBerryCheckCircleSpriteSheet = @@ -610,7 +611,7 @@ static void LoadBerryGfx(u8 berryId) { struct CompressedSpritePalette pal; - if (berryId == ITEM_TO_BERRY(ITEM_ENIGMA_BERRY_E_READER) - 1 && IsEnigmaBerryValid()) + if (berryId == ITEM_TO_BERRY(ITEM_ENIGMA_BERRY) - 1 && IsEnigmaBerryValid()) { // unknown empty if statement } diff --git a/src/item_use.c b/src/item_use.c index 631bd6ef5..820df6623 100755 --- a/src/item_use.c +++ b/src/item_use.c @@ -98,7 +98,7 @@ static const struct YesNoFuncTable sUseTMHMYesNoFuncTable = static void SetUpItemUseCallback(u8 taskId) { u8 type; - if (gSpecialVar_ItemId == ITEM_ENIGMA_BERRY_E_READER) + if (gSpecialVar_ItemId == ITEM_ENIGMA_BERRY) type = gTasks[taskId].tEnigmaBerryType - 1; else type = ItemId_GetType(gSpecialVar_ItemId) - 1; diff --git a/src/menu_helpers.c b/src/menu_helpers.c index 547b4e44d..3e8148a42 100644 --- a/src/menu_helpers.c +++ b/src/menu_helpers.c @@ -278,7 +278,7 @@ u8 GetLRKeysPressedAndHeld(void) bool8 IsHoldingItemAllowed(u16 itemId) { // Enigma Berry can't be held in link areas - if (itemId != ITEM_ENIGMA_BERRY_E_READER) + if (itemId != ITEM_ENIGMA_BERRY) return TRUE; else if (gSaveBlock1Ptr->location.mapGroup == MAP_GROUP(TRADE_CENTER) && gSaveBlock1Ptr->location.mapNum == MAP_NUM(TRADE_CENTER)) diff --git a/src/party_menu.c b/src/party_menu.c index 509c755ba..f86ba0183 100755 --- a/src/party_menu.c +++ b/src/party_menu.c @@ -4222,7 +4222,7 @@ static bool8 IsHPRecoveryItem(u16 item) { const u8 *effect; - if (item == ITEM_ENIGMA_BERRY_E_READER) + if (item == ITEM_ENIGMA_BERRY) effect = gSaveBlock1Ptr->enigmaBerry.itemEffect; else effect = gItemEffectTable[item - ITEM_POTION]; @@ -4639,7 +4639,7 @@ void ItemUseCB_PPRecovery(u8 taskId, TaskFunc task) const u8 *effect; u16 item = gSpecialVar_ItemId; - if (item == ITEM_ENIGMA_BERRY_E_READER) + if (item == ITEM_ENIGMA_BERRY) effect = gSaveBlock1Ptr->enigmaBerry.itemEffect; else effect = gItemEffectTable[item - ITEM_POTION]; @@ -5281,7 +5281,7 @@ u8 GetItemEffectType(u16 item) return ITEM_EFFECT_NONE; // Read the item's effect properties. - if (item == ITEM_ENIGMA_BERRY_E_READER) + if (item == ITEM_ENIGMA_BERRY) itemEffect = gSaveBlock1Ptr->enigmaBerry.itemEffect; else itemEffect = gItemEffectTable[item - ITEM_POTION]; diff --git a/src/pokemon.c b/src/pokemon.c index 7a87939b3..e9c50fb66 100644 --- a/src/pokemon.c +++ b/src/pokemon.c @@ -2574,7 +2574,7 @@ void ConvertPokemonToBattleTowerPokemon(struct Pokemon *mon, struct BattleTowerP dest->species = GetMonData(mon, MON_DATA_SPECIES, NULL); heldItem = GetMonData(mon, MON_DATA_HELD_ITEM, NULL); - if (heldItem == ITEM_ENIGMA_BERRY_E_READER) + if (heldItem == ITEM_ENIGMA_BERRY) heldItem = ITEM_NONE; dest->heldItem = heldItem; @@ -3099,7 +3099,7 @@ s32 CalculateBaseDamage(struct BattlePokemon *attacker, struct BattlePokemon *de spAttack = attacker->spAttack; spDefense = defender->spDefense; - if (attacker->item == ITEM_ENIGMA_BERRY_E_READER) + if (attacker->item == ITEM_ENIGMA_BERRY) { attackerHoldEffect = gEnigmaBerries[battlerIdAtk].holdEffect; attackerHoldEffectParam = gEnigmaBerries[battlerIdAtk].holdEffectParam; @@ -3110,7 +3110,7 @@ s32 CalculateBaseDamage(struct BattlePokemon *attacker, struct BattlePokemon *de attackerHoldEffectParam = ItemId_GetHoldEffectParam(attacker->item); } - if (defender->item == ITEM_ENIGMA_BERRY_E_READER) + if (defender->item == ITEM_ENIGMA_BERRY) { defenderHoldEffect = gEnigmaBerries[battlerIdDef].holdEffect; defenderHoldEffectParam = gEnigmaBerries[battlerIdDef].holdEffectParam; @@ -4679,7 +4679,7 @@ bool8 PokemonUseItemEffects(struct Pokemon *mon, u16 item, u8 partyIndex, u8 mov // Get item hold effect heldItem = GetMonData(mon, MON_DATA_HELD_ITEM, NULL); - if (heldItem == ITEM_ENIGMA_BERRY_E_READER) + if (heldItem == ITEM_ENIGMA_BERRY) { if (gMain.inBattle) holdEffect = gEnigmaBerries[gBattlerInMenuId].holdEffect; @@ -4716,11 +4716,11 @@ bool8 PokemonUseItemEffects(struct Pokemon *mon, u16 item, u8 partyIndex, u8 mov // Skip using the item if it won't do anything if (!ITEM_HAS_EFFECT(item)) return TRUE; - if (gItemEffectTable[item - ITEM_POTION] == NULL && item != ITEM_ENIGMA_BERRY_E_READER) + if (gItemEffectTable[item - ITEM_POTION] == NULL && item != ITEM_ENIGMA_BERRY) return TRUE; // Get item effect - if (item == ITEM_ENIGMA_BERRY_E_READER) + if (item == ITEM_ENIGMA_BERRY) { if (gMain.inBattle) itemEffect = gEnigmaBerries[gActiveBattler].itemEffect; @@ -5265,10 +5265,10 @@ u8 GetItemEffectParamOffset(u16 itemId, u8 effectByte, u8 effectBit) temp = gItemEffectTable[itemId - ITEM_POTION]; - if (!temp && itemId != ITEM_ENIGMA_BERRY_E_READER) + if (!temp && itemId != ITEM_ENIGMA_BERRY) return 0; - if (itemId == ITEM_ENIGMA_BERRY_E_READER) + if (itemId == ITEM_ENIGMA_BERRY) { temp = gEnigmaBerries[gActiveBattler].itemEffect; } @@ -5379,7 +5379,7 @@ u8 *UseStatIncreaseItem(u16 itemId) int i; const u8 *itemEffect; - if (itemId == ITEM_ENIGMA_BERRY_E_READER) + if (itemId == ITEM_ENIGMA_BERRY) { if (gMain.inBattle) itemEffect = gEnigmaBerries[gBattlerInMenuId].itemEffect; @@ -5444,7 +5444,7 @@ u16 GetEvolutionTargetSpecies(struct Pokemon *mon, u8 mode, u16 evolutionItem) u16 upperPersonality = personality >> 16; u8 holdEffect; - if (heldItem == ITEM_ENIGMA_BERRY_E_READER) + if (heldItem == ITEM_ENIGMA_BERRY) holdEffect = gSaveBlock1Ptr->enigmaBerry.holdEffect; else holdEffect = ItemId_GetHoldEffect(heldItem); @@ -5807,7 +5807,7 @@ void AdjustFriendship(struct Pokemon *mon, u8 event) species = GetMonData(mon, MON_DATA_SPECIES2, 0); heldItem = GetMonData(mon, MON_DATA_HELD_ITEM, 0); - if (heldItem == ITEM_ENIGMA_BERRY_E_READER) + if (heldItem == ITEM_ENIGMA_BERRY) { if (gMain.inBattle) holdEffect = gEnigmaBerries[0].holdEffect; @@ -5900,7 +5900,7 @@ void MonGainEVs(struct Pokemon *mon, u16 defeatedSpecies) } heldItem = GetMonData(mon, MON_DATA_HELD_ITEM, 0); - if (heldItem == ITEM_ENIGMA_BERRY_E_READER) + if (heldItem == ITEM_ENIGMA_BERRY) { if (gMain.inBattle) holdEffect = gEnigmaBerries[0].holdEffect; diff --git a/src/pokemon_summary_screen.c b/src/pokemon_summary_screen.c index 9a5679eef..4cd85aa6a 100644 --- a/src/pokemon_summary_screen.c +++ b/src/pokemon_summary_screen.c @@ -3317,11 +3317,11 @@ static void PrintHeldItemName(void) const u8 *text; int x; - if (sMonSummaryScreen->summary.item == ITEM_ENIGMA_BERRY_E_READER + if (sMonSummaryScreen->summary.item == ITEM_ENIGMA_BERRY && IsMultiBattle() == TRUE && (sMonSummaryScreen->curMonIndex == 1 || sMonSummaryScreen->curMonIndex == 4 || sMonSummaryScreen->curMonIndex == 5)) { - text = ItemId_GetName(ITEM_ENIGMA_BERRY_E_READER); + text = ItemId_GetName(ITEM_ENIGMA_BERRY); } else if (sMonSummaryScreen->summary.item == ITEM_NONE) { diff --git a/src/script_pokemon_util.c b/src/script_pokemon_util.c index 523288157..93a747772 100755 --- a/src/script_pokemon_util.c +++ b/src/script_pokemon_util.c @@ -126,9 +126,9 @@ static bool8 CheckPartyMonHasHeldItem(u16 item) bool8 DoesPartyHaveEnigmaBerry(void) { - bool8 hasItem = CheckPartyMonHasHeldItem(ITEM_ENIGMA_BERRY_E_READER); + bool8 hasItem = CheckPartyMonHasHeldItem(ITEM_ENIGMA_BERRY); if (hasItem == TRUE) - GetBerryNameByBerryType(ItemIdToBerryType(ITEM_ENIGMA_BERRY_E_READER), gStringVar1); + GetBerryNameByBerryType(ItemIdToBerryType(ITEM_ENIGMA_BERRY), gStringVar1); return hasItem; }