Merge pull request #2349 from LOuroboros/patch-2

Updated IsViableZMove
This commit is contained in:
Eduardo Quezada D'Ottone 2022-09-24 08:57:57 -03:00 committed by GitHub
commit 88f22e92ff
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -174,10 +174,8 @@ bool32 IsViableZMove(u8 battlerId, u16 move)
if (gBattleTypeFlags & (BATTLE_TYPE_SAFARI | BATTLE_TYPE_WALLY_TUTORIAL | BATTLE_TYPE_FRONTIER))
return FALSE;
#ifdef ITEM_Z_RING
if ((GetBattlerPosition(battlerId) == B_POSITION_PLAYER_LEFT || (!(gBattleTypeFlags & BATTLE_TYPE_MULTI) && GetBattlerPosition(battlerId) == B_POSITION_PLAYER_RIGHT)) && !CheckBagHasItem(ITEM_Z_RING, 1))
if ((GetBattlerPosition(battlerId) == B_POSITION_PLAYER_LEFT || (!(gBattleTypeFlags & BATTLE_TYPE_MULTI) && GetBattlerPosition(battlerId) == B_POSITION_PLAYER_RIGHT)) && !CheckBagHasItem(ITEM_Z_POWER_RING, 1))
return FALSE;
#endif
if (mega->alreadyEvolved[battlerPosition])
return FALSE; // Trainer has mega evolved