Merge pull request #2418 from LOuroboros/zPP

Made Z-Moves unusable without PP
This commit is contained in:
ghoulslash 2022-11-28 09:52:28 -05:00 committed by GitHub
commit 1037613b0e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -165,12 +165,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;