Skip to content

Commit

Permalink
Fixes z-move priority (rh-hideout#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 and PCG06 committed Dec 26, 2023
1 parent 75d68e9 commit f238fb7
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 @@ -4802,6 +4802,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;

// Max Guard check
Expand Down

0 comments on commit f238fb7

Please sign in to comment.