Rearranged rest of item ids except for Key Items.

This commit is contained in:
ultima-soul 2021-07-02 22:43:50 -07:00
parent 9e0b866f09
commit 53e900a643
33 changed files with 11851 additions and 9637 deletions

View File

@ -383,10 +383,10 @@ PetalburgCity_Gym_EventScript_ShouldGiveEnigmaBerry:: @ 8204DCE
specialvar VAR_RESULT, IsEnigmaBerryValid
compare VAR_RESULT, FALSE
goto_if_eq PetalburgCity_Gym_EventScript_DontGiveEnigmaBerry
checkitem ITEM_ENIGMA_BERRY, 1
checkitem ITEM_ENIGMA_BERRY_E_READER, 1
compare VAR_RESULT, TRUE
goto_if_eq PetalburgCity_Gym_EventScript_DontGiveEnigmaBerry
checkpcitem ITEM_ENIGMA_BERRY, 1
checkpcitem ITEM_ENIGMA_BERRY_E_READER, 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:: @ 8204E17
return
PetalburgCity_Gym_EventScript_GiveEnigmaBerry:: @ 8204E1D
giveitem ITEM_ENIGMA_BERRY
giveitem ITEM_ENIGMA_BERRY_E_READER
compare VAR_RESULT, FALSE
goto_if_eq Common_EventScript_ShowBagIsFull
setvar VAR_ENIGMA_BERRY_AVAILABLE, 0

View File

Before

Width:  |  Height:  |  Size: 232 B

After

Width:  |  Height:  |  Size: 232 B

View File

Before

Width:  |  Height:  |  Size: 276 B

After

Width:  |  Height:  |  Size: 276 B

View File

@ -171,7 +171,7 @@
#define BATTLE_FRONTIER_ITEM_APICOT_BERRY 50
#define BATTLE_FRONTIER_ITEM_STARF_BERRY 51
#define BATTLE_FRONTIER_ITEM_LIECHI_BERRY 52
#define BATTLE_FRONTIER_ITEM_STICK 53
#define BATTLE_FRONTIER_ITEM_LEEK 53
#define BATTLE_FRONTIER_ITEM_LAX_INCENSE 54
#define BATTLE_FRONTIER_ITEM_AGUAV_BERRY 55
#define BATTLE_FRONTIER_ITEM_FIGY_BERRY 56

View File

@ -62,12 +62,12 @@
#define HOLD_EFFECT_FIRE_POWER 58
#define HOLD_EFFECT_DRAGON_POWER 59
#define HOLD_EFFECT_NORMAL_POWER 60
#define HOLD_EFFECT_UP_GRADE 61
#define HOLD_EFFECT_UPGRADE 61
#define HOLD_EFFECT_SHELL_BELL 62
#define HOLD_EFFECT_LUCKY_PUNCH 63
#define HOLD_EFFECT_METAL_POWDER 64
#define HOLD_EFFECT_THICK_CLUB 65
#define HOLD_EFFECT_STICK 66
#define HOLD_EFFECT_LEEK 66
// Gen4 hold effects.
#define HOLD_EFFECT_CHOICE_SCARF 67

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -834,7 +834,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

@ -758,7 +758,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];
@ -802,7 +802,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++)
{
@ -3936,7 +3936,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);
@ -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)
if (gBattleMons[battler1].item == ITEM_ENIGMA_BERRY_E_READER)
{
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)
if (gBattleMons[battler2].item == ITEM_ENIGMA_BERRY_E_READER)
{
holdEffect = gEnigmaBerries[battler2].holdEffect;
holdEffectParam = gEnigmaBerries[battler2].holdEffectParam;

View File

@ -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)
if (gLastUsedItem == ITEM_ENIGMA_BERRY_E_READER)
{
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)
if (hword == ITEM_ENIGMA_BERRY_E_READER)
{
if (gLinkPlayers[gBattleScripting.multiplayerId].id == gPotentialItemEffectBattler)
{

View File

@ -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)
if (gBattleMons[gBattlerTarget].item == ITEM_ENIGMA_BERRY_E_READER)
{
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)
if (item == ITEM_ENIGMA_BERRY_E_READER)
holdEffect = gEnigmaBerries[gBattlerAttacker].holdEffect;
else
holdEffect = ItemId_GetHoldEffect(item);
@ -1253,7 +1253,7 @@ static void Cmd_critcalc(void)
+ (gBattleMoves[gCurrentMove].effect == EFFECT_POISON_TAIL)
+ (holdEffect == HOLD_EFFECT_SCOPE_LENS)
+ 2 * (holdEffect == HOLD_EFFECT_LUCKY_PUNCH && gBattleMons[gBattlerAttacker].species == SPECIES_CHANSEY)
+ 2 * (holdEffect == HOLD_EFFECT_STICK && gBattleMons[gBattlerAttacker].species == SPECIES_FARFETCHD);
+ 2 * (holdEffect == HOLD_EFFECT_LEEK && gBattleMons[gBattlerAttacker].species == SPECIES_FARFETCHD);
if (critChance >= ARRAY_COUNT(sCriticalHitChance))
critChance = ARRAY_COUNT(sCriticalHitChance) - 1;
@ -1642,7 +1642,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;
@ -1684,7 +1684,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;
@ -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
|| gBattleMons[gBattlerTarget].item == ITEM_ENIGMA_BERRY_E_READER
|| 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)
if (item == ITEM_ENIGMA_BERRY_E_READER)
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)
if (item == ITEM_ENIGMA_BERRY_E_READER)
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)
if (gBattleMons[gBattlerAttacker].item == ITEM_ENIGMA_BERRY_E_READER)
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)
if (gBattleMons[gBattlerTarget].item == ITEM_ENIGMA_BERRY_E_READER)
{
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)
if (gBattleMons[gBattlerTarget].item == ITEM_ENIGMA_BERRY_E_READER)
{
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
|| 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

@ -135,7 +135,7 @@ const u16 gBattleFrontierHeldItems[] =
ITEM_APICOT_BERRY,
ITEM_STARF_BERRY,
ITEM_LIECHI_BERRY,
ITEM_STICK,
ITEM_LEEK,
ITEM_LAX_INCENSE,
ITEM_AGUAV_BERRY,
ITEM_FIGY_BERRY,

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);
@ -1028,7 +1028,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);
@ -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)
if (gBattleMons[battlerId].item == ITEM_ENIGMA_BERRY_E_READER)
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)
if (gLastUsedItem == ITEM_ENIGMA_BERRY_E_READER)
{
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)
if (atkItem == ITEM_ENIGMA_BERRY_E_READER)
{
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)
if (defItem == ITEM_ENIGMA_BERRY_E_READER)
{
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)
if (gBattleMons[battlerId].item == ITEM_ENIGMA_BERRY_E_READER)
{
battlerHoldEffect = gEnigmaBerries[battlerId].holdEffect;
battlerHoldEffectParam = gEnigmaBerries[battlerId].holdEffectParam;

View File

@ -1340,7 +1340,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

@ -962,7 +962,7 @@ const struct FacilityMon gBattleFrontierMons[NUM_FRONTIER_MONS] =
[FRONTIER_MON_FARFETCHD] = {
.species = SPECIES_FARFETCHD,
.moves = {MOVE_SLASH, MOVE_KNOCK_OFF, MOVE_SWORDS_DANCE, MOVE_AGILITY},
.itemTableId = BATTLE_FRONTIER_ITEM_STICK,
.itemTableId = BATTLE_FRONTIER_ITEM_LEEK,
.evSpread = F_EV_SPREAD_SP_DEFENSE | F_EV_SPREAD_DEFENSE | F_EV_SPREAD_HP,
.nature = NATURE_RELAXED
},

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -2681,7 +2681,7 @@ const struct BaseStats gBaseStats[] =
.evYield_SpAttack = 0,
.evYield_SpDefense = 0,
.item1 = ITEM_NONE,
.item2 = ITEM_STICK,
.item2 = ITEM_LEEK,
.genderRatio = PERCENT_FEMALE(50),
.eggCycles = 20,
.friendship = 70,

View File

@ -78,7 +78,7 @@ const struct Evolution gEvolutionTable[NUM_SPECIES][EVOS_PER_MON] =
{EVO_ITEM, ITEM_FIRE_STONE, SPECIES_FLAREON},
{EVO_FRIENDSHIP_DAY, 0, SPECIES_ESPEON},
{EVO_FRIENDSHIP_NIGHT, 0, SPECIES_UMBREON}},
[SPECIES_PORYGON] = {{EVO_TRADE_ITEM, ITEM_UP_GRADE, SPECIES_PORYGON2}},
[SPECIES_PORYGON] = {{EVO_TRADE_ITEM, ITEM_UPGRADE, SPECIES_PORYGON2}},
[SPECIES_OMANYTE] = {{EVO_LEVEL, 40, SPECIES_OMASTAR}},
[SPECIES_KABUTO] = {{EVO_LEVEL, 40, SPECIES_KABUTOPS}},
[SPECIES_DRATINI] = {{EVO_LEVEL, 30, SPECIES_DRAGONAIR}},

File diff suppressed because it is too large Load Diff

View File

@ -165,7 +165,7 @@ bool8 HasAtLeastOneBerry(void)
{
u16 i;
for (i = FIRST_BERRY_INDEX; i < ITEM_BRIGHT_POWDER; i++)
for (i = FIRST_BERRY_INDEX; i <= LAST_BERRY_INDEX; i++)
{
if (CheckBagHasItem(i, 1) == TRUE)
{

View File

@ -1479,7 +1479,7 @@ static void OpenContextMenu(u8 unused)
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);
@ -1491,7 +1491,7 @@ static void OpenContextMenu(u8 unused)
}
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);
@ -1503,7 +1503,7 @@ static void OpenContextMenu(u8 unused)
}
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

@ -600,7 +600,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

@ -277,7 +277,7 @@ u8 GetLRKeysPressedAndHeld(void)
bool8 sub_8122148(u16 itemId)
{
if (itemId != ITEM_ENIGMA_BERRY)
if (itemId != ITEM_ENIGMA_BERRY_E_READER)
return TRUE;
else if (gSaveBlock1Ptr->location.mapGroup == MAP_GROUP(TRADE_CENTER) && gSaveBlock1Ptr->location.mapNum == MAP_NUM(TRADE_CENTER))
return FALSE;

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

@ -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)
if (heldItem == ITEM_ENIGMA_BERRY_E_READER)
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)
if (attacker->item == ITEM_ENIGMA_BERRY_E_READER)
{
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)
if (defender->item == ITEM_ENIGMA_BERRY_E_READER)
{
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)
if (heldItem == ITEM_ENIGMA_BERRY_E_READER)
{
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)
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;
@ -5260,10 +5260,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;
}
@ -5374,7 +5374,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;
@ -5439,7 +5439,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);
@ -5802,7 +5802,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;
@ -5895,7 +5895,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

@ -3311,11 +3311,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

@ -126,9 +126,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;
}