mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2025-01-13 23:23:43 +01:00
Fixed erroneous uses of non e-reader Enigma Berries (#2839)
This commit is contained in:
parent
03f6fe635f
commit
023cc4d38d
@ -8194,7 +8194,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);
|
||||
@ -8203,7 +8203,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);
|
||||
@ -8211,7 +8211,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…
x
Reference in New Issue
Block a user