Revert "Merge branch 'item_expansion' of github.com:rh-hideout/pokeemerald-expansion into item_expansion_sync"

This reverts commit ac2bcece75, reversing
changes made to 349262ebc3.
This commit is contained in:
ultima-soul 2021-12-10 09:41:54 -08:00
parent 3c9074a867
commit 26f29a04fd
21 changed files with 142 additions and 146 deletions

View File

@ -351,9 +351,9 @@ PetalburgCity_Gym_EventScript_NormanRematch::
PetalburgCity_Gym_EventScript_ShouldGiveEnigmaBerry::
specialvar VAR_RESULT, IsEnigmaBerryValid
goto_if_eq VAR_RESULT, FALSE, PetalburgCity_Gym_EventScript_DontGiveEnigmaBerry
checkitem ITEM_ENIGMA_BERRY
checkitem ITEM_ENIGMA_BERRY_E_READER
goto_if_eq VAR_RESULT, TRUE, PetalburgCity_Gym_EventScript_DontGiveEnigmaBerry
checkpcitem ITEM_ENIGMA_BERRY
checkpcitem ITEM_ENIGMA_BERRY_E_READER
goto_if_eq VAR_RESULT, TRUE, PetalburgCity_Gym_EventScript_DontGiveEnigmaBerry
goto_if_eq VAR_ENIGMA_BERRY_AVAILABLE, 0, PetalburgCity_Gym_EventScript_DontGiveEnigmaBerry
msgbox PetalburgCity_Gym_Text_GiveEnigmaBerry, MSGBOX_DEFAULT
@ -365,7 +365,7 @@ PetalburgCity_Gym_EventScript_DontGiveEnigmaBerry::
return
PetalburgCity_Gym_EventScript_GiveEnigmaBerry::
giveitem ITEM_ENIGMA_BERRY
giveitem ITEM_ENIGMA_BERRY_E_READER
goto_if_eq VAR_RESULT, FALSE, Common_EventScript_ShowBagIsFull
setvar VAR_ENIGMA_BERRY_AVAILABLE, 0
release

View File

@ -668,17 +668,17 @@
#define ITEM_APICOT_BERRY 572
#define ITEM_LANSAT_BERRY 573
#define ITEM_STARF_BERRY 574
#define ITEM_ENIGMA_BERRY_NEW 575
#define ITEM_ENIGMA_BERRY 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 582
#define ITEM_ENIGMA_BERRY_E_READER 582
#define FIRST_BERRY_INDEX ITEM_CHERI_BERRY
#define LAST_BERRY_INDEX ITEM_ENIGMA_BERRY
#define LAST_BERRY_INDEX ITEM_ENIGMA_BERRY_E_READER
// TMs/HMs
#define ITEM_TM01 583

View File

@ -835,7 +835,7 @@ static bool8 ShouldUseItem(void)
if (gItemEffectTable[item - ITEM_POTION] == NULL)
continue;
if (item == ITEM_ENIGMA_BERRY)
if (item == ITEM_ENIGMA_BERRY_E_READER)
itemEffects = gSaveBlock1Ptr->enigmaBerry.itemEffect;
else
itemEffects = gItemEffectTable[item - ITEM_POTION];

View File

@ -756,7 +756,7 @@ static void SetPlayerBerryDataInBattleStruct(void)
}
else
{
const struct Berry *berryData = GetBerryInfo(ItemIdToBerryType(ITEM_ENIGMA_BERRY));
const struct Berry *berryData = GetBerryInfo(ItemIdToBerryType(ITEM_ENIGMA_BERRY_E_READER));
for (i = 0; i < BERRY_NAME_LENGTH; i++)
battleBerry->name[i] = berryData->name[i];
@ -800,7 +800,7 @@ static void SetAllPlayersBerryData(void)
}
else
{
const struct Berry *berryData = GetBerryInfo(ItemIdToBerryType(ITEM_ENIGMA_BERRY));
const struct Berry *berryData = GetBerryInfo(ItemIdToBerryType(ITEM_ENIGMA_BERRY_E_READER));
for (i = 0; i < BERRY_NAME_LENGTH; i++)
{
@ -3992,7 +3992,7 @@ u8 IsRunningFromBattleImpossible(void)
u8 side;
s32 i;
if (gBattleMons[gActiveBattler].item == ITEM_ENIGMA_BERRY)
if (gBattleMons[gActiveBattler].item == ITEM_ENIGMA_BERRY_E_READER)
holdEffect = gEnigmaBerries[gActiveBattler].holdEffect;
else
holdEffect = ItemId_GetHoldEffect(gBattleMons[gActiveBattler].item);
@ -4597,7 +4597,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)
if (gBattleMons[battler1].item == ITEM_ENIGMA_BERRY_E_READER)
{
holdEffect = gEnigmaBerries[battler1].holdEffect;
holdEffectParam = gEnigmaBerries[battler1].holdEffectParam;
@ -4631,7 +4631,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)
if (gBattleMons[battler2].item == ITEM_ENIGMA_BERRY_E_READER)
{
holdEffect = gEnigmaBerries[battler2].holdEffect;
holdEffectParam = gEnigmaBerries[battler2].holdEffectParam;

View File

@ -2554,7 +2554,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)
if (gLastUsedItem == ITEM_ENIGMA_BERRY_E_READER)
{
if (!(gBattleTypeFlags & BATTLE_TYPE_MULTI))
{
@ -2935,7 +2935,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)
if (hword == ITEM_ENIGMA_BERRY_E_READER)
{
if (gLinkPlayers[gBattleScripting.multiplayerId].id == gPotentialItemEffectBattler)
{

View File

@ -1146,7 +1146,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)
if (gBattleMons[gBattlerTarget].item == ITEM_ENIGMA_BERRY_E_READER)
{
holdEffect = gEnigmaBerries[gBattlerTarget].holdEffect;
param = gEnigmaBerries[gBattlerTarget].holdEffectParam;
@ -1246,7 +1246,7 @@ static void Cmd_critcalc(void)
item = gBattleMons[gBattlerAttacker].item;
if (item == ITEM_ENIGMA_BERRY)
if (item == ITEM_ENIGMA_BERRY_E_READER)
holdEffect = gEnigmaBerries[gBattlerAttacker].holdEffect;
else
holdEffect = ItemId_GetHoldEffect(item);
@ -1649,7 +1649,7 @@ static void Cmd_adjustnormaldamage(void)
ApplyRandomDmgMultiplier();
if (gBattleMons[gBattlerTarget].item == ITEM_ENIGMA_BERRY)
if (gBattleMons[gBattlerTarget].item == ITEM_ENIGMA_BERRY_E_READER)
{
holdEffect = gEnigmaBerries[gBattlerTarget].holdEffect;
param = gEnigmaBerries[gBattlerTarget].holdEffectParam;
@ -1691,7 +1691,7 @@ static void Cmd_adjustnormaldamage2(void) // The same as adjustnormaldamage exce
ApplyRandomDmgMultiplier();
if (gBattleMons[gBattlerTarget].item == ITEM_ENIGMA_BERRY)
if (gBattleMons[gBattlerTarget].item == ITEM_ENIGMA_BERRY_E_READER)
{
holdEffect = gEnigmaBerries[gBattlerTarget].holdEffect;
param = gEnigmaBerries[gBattlerTarget].holdEffectParam;
@ -2735,7 +2735,7 @@ void SetMoveEffect(bool8 primary, u8 certain)
RecordAbilityBattle(gBattlerTarget, gLastUsedAbility);
}
else if (gBattleMons[gBattlerAttacker].item != 0
|| gBattleMons[gBattlerTarget].item == ITEM_ENIGMA_BERRY
|| gBattleMons[gBattlerTarget].item == ITEM_ENIGMA_BERRY_E_READER
|| IS_ITEM_MAIL(gBattleMons[gBattlerTarget].item)
|| gBattleMons[gBattlerTarget].item == 0)
{
@ -3254,7 +3254,7 @@ static void Cmd_getexp(void)
item = GetMonData(&gPlayerParty[i], MON_DATA_HELD_ITEM);
if (item == ITEM_ENIGMA_BERRY)
if (item == ITEM_ENIGMA_BERRY_E_READER)
holdEffect = gSaveBlock1Ptr->enigmaBerry.holdEffect;
else
holdEffect = ItemId_GetHoldEffect(item);
@ -3293,7 +3293,7 @@ static void Cmd_getexp(void)
{
item = GetMonData(&gPlayerParty[gBattleStruct->expGetterMonId], MON_DATA_HELD_ITEM);
if (item == ITEM_ENIGMA_BERRY)
if (item == ITEM_ENIGMA_BERRY_E_READER)
holdEffect = gSaveBlock1Ptr->enigmaBerry.holdEffect;
else
holdEffect = ItemId_GetHoldEffect(item);
@ -4183,7 +4183,7 @@ static void Cmd_moveend(void)
endMode = gBattlescriptCurrInstr[1];
endState = gBattlescriptCurrInstr[2];
if (gBattleMons[gBattlerAttacker].item == ITEM_ENIGMA_BERRY)
if (gBattleMons[gBattlerAttacker].item == ITEM_ENIGMA_BERRY_E_READER)
holdEffectAtk = gEnigmaBerries[gBattlerAttacker].holdEffect;
else
holdEffectAtk = ItemId_GetHoldEffect(gBattleMons[gBattlerAttacker].item);
@ -5811,7 +5811,7 @@ static void Cmd_adjustsetdamage(void) // The same as adjustnormaldamage, except
{
u8 holdEffect, param;
if (gBattleMons[gBattlerTarget].item == ITEM_ENIGMA_BERRY)
if (gBattleMons[gBattlerTarget].item == ITEM_ENIGMA_BERRY_E_READER)
{
holdEffect = gEnigmaBerries[gBattlerTarget].holdEffect;
param = gEnigmaBerries[gBattlerTarget].holdEffectParam;
@ -7394,7 +7394,7 @@ static void Cmd_tryKO(void)
{
u8 holdEffect, param;
if (gBattleMons[gBattlerTarget].item == ITEM_ENIGMA_BERRY)
if (gBattleMons[gBattlerTarget].item == ITEM_ENIGMA_BERRY_E_READER)
{
holdEffect = gEnigmaBerries[gBattlerTarget].holdEffect;
param = gEnigmaBerries[gBattlerTarget].holdEffectParam;
@ -9084,8 +9084,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
|| gBattleMons[gBattlerTarget].item == ITEM_ENIGMA_BERRY
|| gBattleMons[gBattlerAttacker].item == ITEM_ENIGMA_BERRY_E_READER
|| gBattleMons[gBattlerTarget].item == ITEM_ENIGMA_BERRY_E_READER
|| IS_ITEM_MAIL(gBattleMons[gBattlerAttacker].item)
|| IS_ITEM_MAIL(gBattleMons[gBattlerTarget].item))
{

View File

@ -406,7 +406,7 @@ bool8 TryRunFromBattle(u8 battler)
u8 pyramidMultiplier;
u8 speedVar;
if (gBattleMons[battler].item == ITEM_ENIGMA_BERRY)
if (gBattleMons[battler].item == ITEM_ENIGMA_BERRY_E_READER)
holdEffect = gEnigmaBerries[battler].holdEffect;
else
holdEffect = ItemId_GetHoldEffect(gBattleMons[battler].item);
@ -1021,7 +1021,7 @@ u8 TrySetCantSelectMoveBattleScript(void)
}
}
if (gBattleMons[gActiveBattler].item == ITEM_ENIGMA_BERRY)
if (gBattleMons[gActiveBattler].item == ITEM_ENIGMA_BERRY_E_READER)
holdEffect = gEnigmaBerries[gActiveBattler].holdEffect;
else
holdEffect = ItemId_GetHoldEffect(gBattleMons[gActiveBattler].item);
@ -1065,7 +1065,7 @@ u8 CheckMoveLimitations(u8 battlerId, u8 unusableMoves, u8 check)
u16 *choicedMove = &gBattleStruct->choicedMove[battlerId];
s32 i;
if (gBattleMons[battlerId].item == ITEM_ENIGMA_BERRY)
if (gBattleMons[battlerId].item == ITEM_ENIGMA_BERRY_E_READER)
holdEffect = gEnigmaBerries[battlerId].holdEffect;
else
holdEffect = ItemId_GetHoldEffect(gBattleMons[battlerId].item);
@ -3243,7 +3243,7 @@ u8 ItemBattleEffects(u8 caseID, u8 battlerId, bool8 moveTurn)
u16 atkItem, defItem;
gLastUsedItem = gBattleMons[battlerId].item;
if (gLastUsedItem == ITEM_ENIGMA_BERRY)
if (gLastUsedItem == ITEM_ENIGMA_BERRY_E_READER)
{
battlerHoldEffect = gEnigmaBerries[battlerId].holdEffect;
battlerHoldEffectParam = gEnigmaBerries[battlerId].holdEffectParam;
@ -3255,7 +3255,7 @@ u8 ItemBattleEffects(u8 caseID, u8 battlerId, bool8 moveTurn)
}
atkItem = gBattleMons[gBattlerAttacker].item;
if (atkItem == ITEM_ENIGMA_BERRY)
if (atkItem == ITEM_ENIGMA_BERRY_E_READER)
{
atkHoldEffect = gEnigmaBerries[gBattlerAttacker].holdEffect;
atkHoldEffectParam = gEnigmaBerries[gBattlerAttacker].holdEffectParam;
@ -3268,7 +3268,7 @@ u8 ItemBattleEffects(u8 caseID, u8 battlerId, bool8 moveTurn)
// def variables are unused
defItem = gBattleMons[gBattlerTarget].item;
if (defItem == ITEM_ENIGMA_BERRY)
if (defItem == ITEM_ENIGMA_BERRY_E_READER)
{
defHoldEffect = gEnigmaBerries[gBattlerTarget].holdEffect;
defHoldEffectParam = gEnigmaBerries[gBattlerTarget].holdEffectParam;
@ -3605,7 +3605,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)
if (gBattleMons[battlerId].item == ITEM_ENIGMA_BERRY_E_READER)
{
battlerHoldEffect = gEnigmaBerries[battlerId].holdEffect;
battlerHoldEffectParam = gEnigmaBerries[battlerId].holdEffectParam;

View File

@ -919,7 +919,7 @@ const struct Berry gBerries[] =
.smoothness = 30,
},
[ITEM_ENIGMA_BERRY_NEW - FIRST_BERRY_INDEX] =
[ITEM_ENIGMA_BERRY - 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_NEW - FIRST_BERRY_INDEX] = {.difficulty = 150, .powder = 200}
[ITEM_ENIGMA_BERRY - 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) && IsEnigmaBerryValid())
if (berry == ITEM_TO_BERRY(ITEM_ENIGMA_BERRY_E_READER) && IsEnigmaBerryValid())
return (struct Berry*)(&gSaveBlock1Ptr->enigmaBerry.berry);
else
{

View File

@ -1538,7 +1538,7 @@ static void SetOpponentsBerryData(u16 playerBerryItemId, u8 playersNum, struct B
u16 berryMasterDiff;
u16 i;
if (playerBerryItemId == ITEM_ENIGMA_BERRY)
if (playerBerryItemId == ITEM_ENIGMA_BERRY_E_READER)
{
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 || AreBlenderBerriesSame(berries, i, j)))
&& (berries[i].itemId != ITEM_ENIGMA_BERRY_E_READER || AreBlenderBerriesSame(berries, i, j)))
return PBLOCK_CLR_BLACK;
}
}

View File

@ -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_NEW] = {gItemIcon_QuestionMark, gItemIconPalette_QuestionMark}, // Todo
[ITEM_ENIGMA_BERRY] = {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] = {gItemIcon_EnigmaBerry, gItemIconPalette_EnigmaBerry},
[ITEM_ENIGMA_BERRY_E_READER] = {gItemIcon_EnigmaBerry, gItemIconPalette_EnigmaBerry},
// TMs/HMs
[ITEM_TM01] = {gItemIcon_TM, gItemIconPalette_FightingTMHM},
[ITEM_TM02] = {gItemIcon_TM, gItemIconPalette_DragonTMHM},

View File

@ -7211,12 +7211,12 @@ const struct Item gItems[] =
.fieldUseFunc = ItemUseOutOfBattle_CannotUse,
},
[ITEM_ENIGMA_BERRY_NEW] = // Todo
[ITEM_ENIGMA_BERRY] = // Todo
{
.name = _("????????"),
.itemId = ITEM_NONE,
.price = 0,
.description = sEnigmaBerryNewDesc,
.description = sDummyDesc,
.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] =
[ITEM_ENIGMA_BERRY_E_READER] =
{
.name = _("Enigma Berry"),
.itemId = ITEM_ENIGMA_BERRY,
.price = 20,
.description = sEnigmaBerryDesc,
.description = sEnigmaBerryEReaderDesc,
.pocket = POCKET_BERRIES,
.type = ITEM_USE_BAG_MENU, // Type handled by ItemUseOutOfBattle_EnigmaBerry
.fieldUseFunc = ItemUseOutOfBattle_EnigmaBerry,

View File

@ -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_NEW - FIRST_BERRY_INDEX] = sPicTable_DurinBerryTree,
[ITEM_ENIGMA_BERRY - 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,7 +700,6 @@ 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[] = {
@ -746,7 +745,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_NEW - FIRST_BERRY_INDEX] = gBerryTreePaletteSlotTable_Durin,
[ITEM_ENIGMA_BERRY - 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,
@ -771,7 +770,6 @@ 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[] = {
@ -817,7 +815,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_NEW - FIRST_BERRY_INDEX] = gBerryTreeObjectEventGraphicsIdTable,
[ITEM_ENIGMA_BERRY - 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,
@ -842,5 +840,4 @@ 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,
};

View File

@ -2710,7 +2710,7 @@ static const u8 sStarfBerryDesc[] = _(
"sharply boosts a\n"
"stat in a pinch.");
static const u8 sEnigmaBerryNewDesc[] = _( // Todo
static const u8 sEnigmaBerryDesc[] = _( // 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 sEnigmaBerryDesc[] = _(
static const u8 sEnigmaBerryEReaderDesc[] = _(
"{POKEBLOCK} ingredient.\n"
"Plant in loamy soil\n"
"to grow a mystery.");

View File

@ -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)
if (!ItemId_GetImportance(gSpecialVar_ItemId) && gSpecialVar_ItemId != ITEM_ENIGMA_BERRY_E_READER)
{
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)
if (!ItemId_GetImportance(gSpecialVar_ItemId) && gSpecialVar_ItemId != ITEM_ENIGMA_BERRY_E_READER)
{
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)
if (!ItemId_GetImportance(gSpecialVar_ItemId) && gSpecialVar_ItemId != ITEM_ENIGMA_BERRY_E_READER)
{
gBagMenu->contextMenuItemsPtr = sContextMenuItems_QuizLady;
gBagMenu->contextMenuNumItems = ARRAY_COUNT(sContextMenuItems_QuizLady);

View File

@ -321,74 +321,73 @@ 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_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},
[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},
};
const struct CompressedSpriteSheet gBerryCheckCircleSpriteSheet =
@ -619,7 +618,7 @@ static void LoadBerryGfx(u8 berryId)
{
struct CompressedSpritePalette pal;
if (berryId == ITEM_TO_BERRY(ITEM_ENIGMA_BERRY) - 1 && IsEnigmaBerryValid())
if (berryId == ITEM_TO_BERRY(ITEM_ENIGMA_BERRY_E_READER) - 1 && IsEnigmaBerryValid())
{
// unknown empty if statement
}

View File

@ -98,7 +98,7 @@ static const struct YesNoFuncTable sUseTMHMYesNoFuncTable =
static void SetUpItemUseCallback(u8 taskId)
{
u8 type;
if (gSpecialVar_ItemId == ITEM_ENIGMA_BERRY)
if (gSpecialVar_ItemId == ITEM_ENIGMA_BERRY_E_READER)
type = gTasks[taskId].tEnigmaBerryType - 1;
else
type = ItemId_GetType(gSpecialVar_ItemId) - 1;

View File

@ -276,8 +276,8 @@ u8 GetLRKeysPressedAndHeld(void)
bool8 IsHoldingItemAllowed(u16 itemId)
{
// Enigma Berry can't be held in link areas
if (itemId == ITEM_ENIGMA_BERRY
// e-Reader Enigma Berry can't be held in link areas
if (itemId == ITEM_ENIGMA_BERRY_E_READER
&& ((gSaveBlock1Ptr->location.mapGroup == MAP_GROUP(TRADE_CENTER)
&& gSaveBlock1Ptr->location.mapNum == MAP_NUM(TRADE_CENTER))
|| InUnionRoom() == TRUE))

View File

@ -4220,7 +4220,7 @@ static bool8 IsHPRecoveryItem(u16 item)
{
const u8 *effect;
if (item == ITEM_ENIGMA_BERRY)
if (item == ITEM_ENIGMA_BERRY_E_READER)
effect = gSaveBlock1Ptr->enigmaBerry.itemEffect;
else
effect = gItemEffectTable[item - ITEM_POTION];
@ -4637,7 +4637,7 @@ void ItemUseCB_PPRecovery(u8 taskId, TaskFunc task)
const u8 *effect;
u16 item = gSpecialVar_ItemId;
if (item == ITEM_ENIGMA_BERRY)
if (item == ITEM_ENIGMA_BERRY_E_READER)
effect = gSaveBlock1Ptr->enigmaBerry.itemEffect;
else
effect = gItemEffectTable[item - ITEM_POTION];
@ -5279,7 +5279,7 @@ u8 GetItemEffectType(u16 item)
return ITEM_EFFECT_NONE;
// Read the item's effect properties.
if (item == ITEM_ENIGMA_BERRY)
if (item == ITEM_ENIGMA_BERRY_E_READER)
itemEffect = gSaveBlock1Ptr->enigmaBerry.itemEffect;
else
itemEffect = gItemEffectTable[item - ITEM_POTION];

View File

@ -2599,7 +2599,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)
if (heldItem == ITEM_ENIGMA_BERRY_E_READER)
heldItem = ITEM_NONE;
dest->heldItem = heldItem;
@ -3125,7 +3125,7 @@ s32 CalculateBaseDamage(struct BattlePokemon *attacker, struct BattlePokemon *de
spDefense = defender->spDefense;
// Get attacker hold item info
if (attacker->item == ITEM_ENIGMA_BERRY)
if (attacker->item == ITEM_ENIGMA_BERRY_E_READER)
{
attackerHoldEffect = gEnigmaBerries[battlerIdAtk].holdEffect;
attackerHoldEffectParam = gEnigmaBerries[battlerIdAtk].holdEffectParam;
@ -3137,7 +3137,7 @@ s32 CalculateBaseDamage(struct BattlePokemon *attacker, struct BattlePokemon *de
}
// Get defender hold item info
if (defender->item == ITEM_ENIGMA_BERRY)
if (defender->item == ITEM_ENIGMA_BERRY_E_READER)
{
defenderHoldEffect = gEnigmaBerries[battlerIdDef].holdEffect;
defenderHoldEffectParam = gEnigmaBerries[battlerIdDef].holdEffectParam;
@ -4727,7 +4727,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)
if (heldItem == ITEM_ENIGMA_BERRY_E_READER)
{
if (gMain.inBattle)
holdEffect = gEnigmaBerries[gBattlerInMenuId].holdEffect;
@ -4764,11 +4764,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)
if (gItemEffectTable[item - ITEM_POTION] == NULL && item != ITEM_ENIGMA_BERRY_E_READER)
return TRUE;
// Get item effect
if (item == ITEM_ENIGMA_BERRY)
if (item == ITEM_ENIGMA_BERRY_E_READER)
{
if (gMain.inBattle)
itemEffect = gEnigmaBerries[gActiveBattler].itemEffect;
@ -5305,10 +5305,10 @@ u8 GetItemEffectParamOffset(u16 itemId, u8 effectByte, u8 effectBit)
temp = gItemEffectTable[itemId - ITEM_POTION];
if (!temp && itemId != ITEM_ENIGMA_BERRY)
if (!temp && itemId != ITEM_ENIGMA_BERRY_E_READER)
return 0;
if (itemId == ITEM_ENIGMA_BERRY)
if (itemId == ITEM_ENIGMA_BERRY_E_READER)
{
temp = gEnigmaBerries[gActiveBattler].itemEffect;
}
@ -5419,7 +5419,7 @@ u8 *UseStatIncreaseItem(u16 itemId)
int i;
const u8 *itemEffect;
if (itemId == ITEM_ENIGMA_BERRY)
if (itemId == ITEM_ENIGMA_BERRY_E_READER)
{
if (gMain.inBattle)
itemEffect = gEnigmaBerries[gBattlerInMenuId].itemEffect;
@ -5484,7 +5484,7 @@ u16 GetEvolutionTargetSpecies(struct Pokemon *mon, u8 mode, u16 evolutionItem)
u16 upperPersonality = personality >> 16;
u8 holdEffect;
if (heldItem == ITEM_ENIGMA_BERRY)
if (heldItem == ITEM_ENIGMA_BERRY_E_READER)
holdEffect = gSaveBlock1Ptr->enigmaBerry.holdEffect;
else
holdEffect = ItemId_GetHoldEffect(heldItem);
@ -5858,7 +5858,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)
if (heldItem == ITEM_ENIGMA_BERRY_E_READER)
{
if (gMain.inBattle)
holdEffect = gEnigmaBerries[0].holdEffect;
@ -5951,7 +5951,7 @@ void MonGainEVs(struct Pokemon *mon, u16 defeatedSpecies)
}
heldItem = GetMonData(mon, MON_DATA_HELD_ITEM, 0);
if (heldItem == ITEM_ENIGMA_BERRY)
if (heldItem == ITEM_ENIGMA_BERRY_E_READER)
{
if (gMain.inBattle)
holdEffect = gEnigmaBerries[0].holdEffect;

View File

@ -3317,11 +3317,11 @@ static void PrintHeldItemName(void)
const u8 *text;
int x;
if (sMonSummaryScreen->summary.item == ITEM_ENIGMA_BERRY
if (sMonSummaryScreen->summary.item == ITEM_ENIGMA_BERRY_E_READER
&& IsMultiBattle() == TRUE
&& (sMonSummaryScreen->curMonIndex == 1 || sMonSummaryScreen->curMonIndex == 4 || sMonSummaryScreen->curMonIndex == 5))
{
text = ItemId_GetName(ITEM_ENIGMA_BERRY);
text = ItemId_GetName(ITEM_ENIGMA_BERRY_E_READER);
}
else if (sMonSummaryScreen->summary.item == ITEM_NONE)
{

View File

@ -127,9 +127,9 @@ static bool8 CheckPartyMonHasHeldItem(u16 item)
bool8 DoesPartyHaveEnigmaBerry(void)
{
bool8 hasItem = CheckPartyMonHasHeldItem(ITEM_ENIGMA_BERRY);
bool8 hasItem = CheckPartyMonHasHeldItem(ITEM_ENIGMA_BERRY_E_READER);
if (hasItem == TRUE)
GetBerryNameByBerryType(ItemIdToBerryType(ITEM_ENIGMA_BERRY), gStringVar1);
GetBerryNameByBerryType(ItemIdToBerryType(ITEM_ENIGMA_BERRY_E_READER), gStringVar1);
return hasItem;
}