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];
|
return gBattleStruct->debugHoldEffects[battlerId];
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
if (gBattleMons[battlerId].item == ITEM_ENIGMA_BERRY)
|
if (gBattleMons[battlerId].item == ITEM_ENIGMA_BERRY_E_READER)
|
||||||
return gEnigmaBerries[battlerId].holdEffect;
|
return gEnigmaBerries[battlerId].holdEffect;
|
||||||
else
|
else
|
||||||
return ItemId_GetHoldEffect(gBattleMons[battlerId].item);
|
return ItemId_GetHoldEffect(gBattleMons[battlerId].item);
|
||||||
|
@ -8181,7 +8181,7 @@ u32 GetBattlerHoldEffect(u8 battlerId, bool32 checkNegating)
|
||||||
//
|
//
|
||||||
static u32 GetBattlerItemHoldEffectParam(u8 battlerId, u16 item)
|
static u32 GetBattlerItemHoldEffectParam(u8 battlerId, u16 item)
|
||||||
{
|
{
|
||||||
if (item == ITEM_ENIGMA_BERRY)
|
if (item == ITEM_ENIGMA_BERRY_E_READER)
|
||||||
return gEnigmaBerries[battlerId].holdEffectParam;
|
return gEnigmaBerries[battlerId].holdEffectParam;
|
||||||
else
|
else
|
||||||
return ItemId_GetHoldEffectParam(item);
|
return ItemId_GetHoldEffectParam(item);
|
||||||
|
@ -8189,7 +8189,7 @@ static u32 GetBattlerItemHoldEffectParam(u8 battlerId, u16 item)
|
||||||
|
|
||||||
u32 GetBattlerHoldEffectParam(u8 battlerId)
|
u32 GetBattlerHoldEffectParam(u8 battlerId)
|
||||||
{
|
{
|
||||||
if (gBattleMons[battlerId].item == ITEM_ENIGMA_BERRY)
|
if (gBattleMons[battlerId].item == ITEM_ENIGMA_BERRY_E_READER)
|
||||||
return gEnigmaBerries[battlerId].holdEffectParam;
|
return gEnigmaBerries[battlerId].holdEffectParam;
|
||||||
else
|
else
|
||||||
return ItemId_GetHoldEffectParam(gBattleMons[battlerId].item);
|
return ItemId_GetHoldEffectParam(gBattleMons[battlerId].item);
|
||||||
|
|
|
@ -199,7 +199,7 @@ bool32 IsViableZMove(u8 battlerId, u16 move)
|
||||||
holdEffect = gBattleStruct->debugHoldEffects[battlerId];
|
holdEffect = gBattleStruct->debugHoldEffects[battlerId];
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
if (item == ITEM_ENIGMA_BERRY)
|
if (item == ITEM_ENIGMA_BERRY_E_READER)
|
||||||
return FALSE; // HoldEffect = gEnigmaBerries[battlerId].holdEffect;
|
return FALSE; // HoldEffect = gEnigmaBerries[battlerId].holdEffect;
|
||||||
else
|
else
|
||||||
holdEffect = ItemId_GetHoldEffect(item);
|
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);
|
partnerSpecies = GetMonData(tradePartner, MON_DATA_SPECIES, 0);
|
||||||
partnerHeldItem = GetMonData(tradePartner, MON_DATA_HELD_ITEM, 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;
|
partnerHoldEffect = gSaveBlock1Ptr->enigmaBerry.holdEffect;
|
||||||
else
|
else
|
||||||
partnerHoldEffect = ItemId_GetHoldEffect(partnerHeldItem);
|
partnerHoldEffect = ItemId_GetHoldEffect(partnerHeldItem);
|
||||||
|
@ -7213,7 +7213,7 @@ void MonGainEVs(struct Pokemon *mon, u16 defeatedSpecies)
|
||||||
u8 bonus;
|
u8 bonus;
|
||||||
|
|
||||||
heldItem = GetMonData(mon, MON_DATA_HELD_ITEM, 0);
|
heldItem = GetMonData(mon, MON_DATA_HELD_ITEM, 0);
|
||||||
if (heldItem == ITEM_ENIGMA_BERRY)
|
if (heldItem == ITEM_ENIGMA_BERRY_E_READER)
|
||||||
{
|
{
|
||||||
if (gMain.inBattle)
|
if (gMain.inBattle)
|
||||||
holdEffect = gEnigmaBerries[0].holdEffect;
|
holdEffect = gEnigmaBerries[0].holdEffect;
|
||||||
|
|
Loading…
Reference in a new issue