Skip to content

Commit

Permalink
Fix move category and category icon when PSS is off (#5786)
Browse files Browse the repository at this point in the history
  • Loading branch information
ravepossum authored Dec 8, 2024
1 parent 6e63525 commit fd397e9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions src/battle_controller_player.c
Original file line number Diff line number Diff line change
Expand Up @@ -1759,7 +1759,6 @@ static void MoveSelectionDisplayMoveDescription(u32 battler)
u16 move = moveInfo->moves[gMoveSelectionCursor[battler]];
u16 pwr = gMovesInfo[move].power;
u16 acc = gMovesInfo[move].accuracy;
u8 cat = gMovesInfo[move].category;

u8 pwr_num[3], acc_num[3];
u8 cat_desc[7] = _("CAT: ");
Expand Down Expand Up @@ -1796,7 +1795,7 @@ static void MoveSelectionDisplayMoveDescription(u32 battler)
if (gCategoryIconSpriteId == 0xFF)
gCategoryIconSpriteId = CreateSprite(&gSpriteTemplate_CategoryIcons, 38, 64, 1);

StartSpriteAnim(&gSprites[gCategoryIconSpriteId], cat);
StartSpriteAnim(&gSprites[gCategoryIconSpriteId], GetBattleMoveCategory(move));

CopyWindowToVram(B_WIN_MOVE_DESCRIPTION, COPYWIN_FULL);
}
Expand Down
2 changes: 1 addition & 1 deletion src/battle_util.c
Original file line number Diff line number Diff line change
Expand Up @@ -11212,7 +11212,7 @@ u8 GetBattleMoveCategory(u32 moveId)

if (IS_MOVE_STATUS(moveId))
return DAMAGE_CATEGORY_STATUS;
return gTypesInfo[GetMoveType(gCurrentMove)].damageCategory;
return gTypesInfo[GetMoveType(moveId)].damageCategory;
}

static bool32 TryRemoveScreens(u32 battler)
Expand Down

0 comments on commit fd397e9

Please sign in to comment.