diff --git a/src/battle_dynamax.c b/src/battle_dynamax.c index 073e2c55bcbd..e0b782d12cd4 100644 --- a/src/battle_dynamax.c +++ b/src/battle_dynamax.c @@ -280,7 +280,10 @@ static u16 GetTypeBasedMaxMove(u32 battler, u32 type) // Returns the appropriate Max Move or G-Max Move for a battler to use. u16 GetMaxMove(u32 battler, u32 baseMove) { - u32 move = baseMove; + u32 moveType; + SetTypeBeforeUsingMove(baseMove, battler); + GET_MOVE_TYPE(baseMove, moveType); + if (baseMove == MOVE_NONE) // for move display { return MOVE_NONE; @@ -291,18 +294,12 @@ u16 GetMaxMove(u32 battler, u32 baseMove) } else if (gMovesInfo[baseMove].category == DAMAGE_CATEGORY_STATUS) { - move = MOVE_MAX_GUARD; - } - else if (gBattleStruct->dynamicMoveType) - { - move = GetTypeBasedMaxMove(battler, gBattleStruct->dynamicMoveType & DYNAMIC_TYPE_MASK); + return MOVE_MAX_GUARD; } else { - move = GetTypeBasedMaxMove(battler, gMovesInfo[baseMove].type); + return GetTypeBasedMaxMove(battler, moveType); } - - return move; } // First value is for Fighting, Poison and Multi-Attack. The second is for everything else.