Skip to content

Commit

Permalink
Fixes z-move priority (#3690)
Browse files Browse the repository at this point in the history
* Fixes z-move priority

* consider prankster affected z moves

* consider only damaging moves
  • Loading branch information
AlexOn1ine authored Dec 11, 2023
1 parent 403843c commit 22280b4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/battle_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -4691,6 +4691,9 @@ s8 GetMovePriority(u32 battler, u16 move)
s8 priority;
u16 ability = GetBattlerAbility(battler);

if (gBattleStruct->zmove.toBeUsed[battler] && gBattleMoves[move].power != 0)
move = gBattleStruct->zmove.toBeUsed[battler];

priority = gBattleMoves[move].priority;
if (ability == ABILITY_GALE_WINGS
#if B_GALE_WINGS >= GEN_7
Expand Down

0 comments on commit 22280b4

Please sign in to comment.