Made Z-Moves unusable without PP

This commit is contained in:
LOuroboros 2022-10-29 11:32:44 -03:00
parent 93dd8786ee
commit bdd082f869

View file

@ -166,12 +166,20 @@ bool32 IsViableZMove(u8 battlerId, u16 move)
u32 item;
u16 holdEffect;
u16 species;
int moveSlotIndex;
species = gBattleMons[battlerId].species;
item = gBattleMons[battlerId].item;
for (moveSlotIndex = 0; moveSlotIndex < MAX_MON_MOVES; moveSlotIndex++)
{
if (gBattleMons[battlerId].moves[moveSlotIndex] == move && gBattleMons[battlerId].pp[moveSlotIndex] == 0)
return FALSE;
}
if (gBattleStruct->zmove.used[battlerId])
return FALSE;
species = gBattleMons[battlerId].species;
item = gBattleMons[battlerId].item;
if (gBattleTypeFlags & (BATTLE_TYPE_SAFARI | BATTLE_TYPE_WALLY_TUTORIAL | BATTLE_TYPE_FRONTIER))
return FALSE;