Fixes Dynamax dynamic move type (#5739)
This commit is contained in:
parent
51fbc80ac5
commit
3343a16a7c
1 changed files with 6 additions and 9 deletions
|
@ -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.
|
// Returns the appropriate Max Move or G-Max Move for a battler to use.
|
||||||
u16 GetMaxMove(u32 battler, u32 baseMove)
|
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
|
if (baseMove == MOVE_NONE) // for move display
|
||||||
{
|
{
|
||||||
return MOVE_NONE;
|
return MOVE_NONE;
|
||||||
|
@ -291,18 +294,12 @@ u16 GetMaxMove(u32 battler, u32 baseMove)
|
||||||
}
|
}
|
||||||
else if (gMovesInfo[baseMove].category == DAMAGE_CATEGORY_STATUS)
|
else if (gMovesInfo[baseMove].category == DAMAGE_CATEGORY_STATUS)
|
||||||
{
|
{
|
||||||
move = MOVE_MAX_GUARD;
|
return MOVE_MAX_GUARD;
|
||||||
}
|
|
||||||
else if (gBattleStruct->dynamicMoveType)
|
|
||||||
{
|
|
||||||
move = GetTypeBasedMaxMove(battler, gBattleStruct->dynamicMoveType & DYNAMIC_TYPE_MASK);
|
|
||||||
}
|
}
|
||||||
else
|
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.
|
// First value is for Fighting, Poison and Multi-Attack. The second is for everything else.
|
||||||
|
|
Loading…
Reference in a new issue