mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2025-01-22 19:30:17 +01:00
Added a check for the Mega Bracelet in CanMegaEvolve
This commit is contained in:
parent
acf9bb0a17
commit
aa4c28dcf3
@ -7834,6 +7834,13 @@ bool32 CanMegaEvolve(u8 battlerId)
|
||||
u8 partnerPosition = GetBattlerPosition(BATTLE_PARTNER(battlerId));
|
||||
struct MegaEvolutionData *mega = &(((struct ChooseMoveStruct*)(&gBattleResources->bufferA[gActiveBattler][4]))->mega);
|
||||
|
||||
#ifdef ITEM_EXPANSION
|
||||
// Check if Player has a Mega Bracelet
|
||||
if ((GetBattlerPosition(battlerId) == B_POSITION_PLAYER_LEFT || (!(gBattleTypeFlags & BATTLE_TYPE_MULTI) && GetBattlerPosition(battlerId) == B_POSITION_PLAYER_RIGHT))
|
||||
&& !CheckBagHasItem(ITEM_MEGA_BRACELET, 1))
|
||||
return FALSE;
|
||||
#endif
|
||||
|
||||
// Check if trainer already mega evolved a pokemon.
|
||||
if (mega->alreadyEvolved[battlerPosition])
|
||||
return FALSE;
|
||||
|
Loading…
x
Reference in New Issue
Block a user