From 1331931a42f75209b9d979757c4324055495d2d9 Mon Sep 17 00:00:00 2001 From: Hedara Date: Sun, 2 Mar 2025 10:42:12 +0100 Subject: [PATCH] Fixed Zacian/Zamazenta learning Iron head while already knowing it in Crowned form --- src/pokemon.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/pokemon.c b/src/pokemon.c index 6bec95c307..5340691b46 100644 --- a/src/pokemon.c +++ b/src/pokemon.c @@ -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;