Fixed erroneous uses of non e-reader Enigma Berries (#2839)
This commit is contained in:
parent
d922ac43e9
commit
e176fd285e
3 changed files with 6 additions and 6 deletions
|
@ -8172,7 +8172,7 @@ u32 GetBattlerHoldEffect(u8 battlerId, bool32 checkNegating)
|
|||
return gBattleStruct->debugHoldEffects[battlerId];
|
||||
else
|
||||
#endif
|
||||
if (gBattleMons[battlerId].item == ITEM_ENIGMA_BERRY)
|
||||
if (gBattleMons[battlerId].item == ITEM_ENIGMA_BERRY_E_READER)
|
||||
return gEnigmaBerries[battlerId].holdEffect;
|
||||
else
|
||||
return ItemId_GetHoldEffect(gBattleMons[battlerId].item);
|
||||
|
@ -8181,7 +8181,7 @@ u32 GetBattlerHoldEffect(u8 battlerId, bool32 checkNegating)
|
|||
//
|
||||
static u32 GetBattlerItemHoldEffectParam(u8 battlerId, u16 item)
|
||||
{
|
||||
if (item == ITEM_ENIGMA_BERRY)
|
||||
if (item == ITEM_ENIGMA_BERRY_E_READER)
|
||||
return gEnigmaBerries[battlerId].holdEffectParam;
|
||||
else
|
||||
return ItemId_GetHoldEffectParam(item);
|
||||
|
@ -8189,7 +8189,7 @@ static u32 GetBattlerItemHoldEffectParam(u8 battlerId, u16 item)
|
|||
|
||||
u32 GetBattlerHoldEffectParam(u8 battlerId)
|
||||
{
|
||||
if (gBattleMons[battlerId].item == ITEM_ENIGMA_BERRY)
|
||||
if (gBattleMons[battlerId].item == ITEM_ENIGMA_BERRY_E_READER)
|
||||
return gEnigmaBerries[battlerId].holdEffectParam;
|
||||
else
|
||||
return ItemId_GetHoldEffectParam(gBattleMons[battlerId].item);
|
||||
|
|
|
@ -199,7 +199,7 @@ bool32 IsViableZMove(u8 battlerId, u16 move)
|
|||
holdEffect = gBattleStruct->debugHoldEffects[battlerId];
|
||||
else
|
||||
#endif
|
||||
if (item == ITEM_ENIGMA_BERRY)
|
||||
if (item == ITEM_ENIGMA_BERRY_E_READER)
|
||||
return FALSE; // HoldEffect = gEnigmaBerries[battlerId].holdEffect;
|
||||
else
|
||||
holdEffect = ItemId_GetHoldEffect(item);
|
||||
|
|
|
@ -6543,7 +6543,7 @@ u16 GetEvolutionTargetSpecies(struct Pokemon *mon, u8 mode, u16 evolutionItem, s
|
|||
partnerSpecies = GetMonData(tradePartner, MON_DATA_SPECIES, 0);
|
||||
partnerHeldItem = GetMonData(tradePartner, MON_DATA_HELD_ITEM, 0);
|
||||
|
||||
if (partnerHeldItem == ITEM_ENIGMA_BERRY)
|
||||
if (partnerHeldItem == ITEM_ENIGMA_BERRY_E_READER)
|
||||
partnerHoldEffect = gSaveBlock1Ptr->enigmaBerry.holdEffect;
|
||||
else
|
||||
partnerHoldEffect = ItemId_GetHoldEffect(partnerHeldItem);
|
||||
|
@ -7213,7 +7213,7 @@ void MonGainEVs(struct Pokemon *mon, u16 defeatedSpecies)
|
|||
u8 bonus;
|
||||
|
||||
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;
|
||||
|
|
Loading…
Reference in a new issue