Updated IsViableZMove

This commit is contained in:
LOuroboros 2022-09-24 08:50:48 -03:00 committed by GitHub
parent 29c3f57772
commit 64405250ae
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