Skip to content

Commit

Permalink
Fixed Zacian/Zamazenta learning Iron head while already knowing (#6365)
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexOn1ine authored Mar 2, 2025
2 parents 5bd50e1 + 1331931 commit 17ff3e1
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/pokemon.c
Original file line number Diff line number Diff line change
Expand Up @@ -2002,6 +2002,19 @@ u16 MonTryLearningNewMove(struct Pokemon *mon, bool8 firstMove)
}
}

// Handler for if Zacian or Zamazenta should learn Iron Head
// since it transforms in the Behemoth Blade/Bash move in
// battle in the Crowned forms.
if (learnset[sLearningMoveTableID].move == MOVE_IRON_HEAD && (species == SPECIES_ZAMAZENTA_CROWNED || species == SPECIES_ZACIAN_CROWNED))
{
for (u32 accessor = MON_DATA_MOVE1; accessor <= MON_DATA_MOVE4; accessor++)
{
u32 move = GetMonData(mon, accessor);
if (move == MOVE_BEHEMOTH_BLADE || move == MOVE_BEHEMOTH_BASH)
return MOVE_NONE;
}
}

if (learnset[sLearningMoveTableID].level == level)
{
gMoveToLearn = learnset[sLearningMoveTableID].move;
Expand Down

0 comments on commit 17ff3e1

Please sign in to comment.