Skip to content

Commit

Permalink
Fixed Hidden Power damage category for PSS < GEN_4
Browse files Browse the repository at this point in the history
  • Loading branch information
Hedara committed Jul 28, 2024
1 parent 1cf2592 commit 8780d36
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/battle_util.c
Original file line number Diff line number Diff line change
Expand Up @@ -10828,6 +10828,7 @@ bool32 ShouldGetStatBadgeBoost(u16 badgeFlag, u32 battler)

u8 GetBattleMoveCategory(u32 moveId)
{
u8 moveType;
if (gBattleStruct != NULL && gBattleStruct->zmove.active && !IS_MOVE_STATUS(moveId))
return gBattleStruct->zmove.activeCategory;
if (gBattleStruct != NULL && IsMaxMove(moveId)) // TODO: Might be buggy depending on when this is called.
Expand All @@ -10839,10 +10840,14 @@ u8 GetBattleMoveCategory(u32 moveId)

if (IS_MOVE_STATUS(moveId))
return DAMAGE_CATEGORY_STATUS;
else if (gMovesInfo[moveId].type < TYPE_MYSTERY)
return DAMAGE_CATEGORY_PHYSICAL;
else
return DAMAGE_CATEGORY_SPECIAL;
{
GET_MOVE_TYPE(moveId, moveType);
if (moveType < TYPE_MYSTERY)
return DAMAGE_CATEGORY_PHYSICAL;
else
return DAMAGE_CATEGORY_SPECIAL;
}
}

static bool32 TryRemoveScreens(u32 battler)
Expand Down

0 comments on commit 8780d36

Please sign in to comment.