diff --git a/include/moves.h b/include/moves.h index e385dbfd5..b2ee36426 100644 --- a/include/moves.h +++ b/include/moves.h @@ -16,7 +16,7 @@ u32 GetMoveHitCount(struct PokemonMove *move); s32 GetMovePower(struct PokemonMove *move); s32 GetMoveAccuracy(struct PokemonMove *move, u32 accuracyType); u32 GetMoveMaxPP(struct PokemonMove *move); -u32 GetMoveUnk12(struct PokemonMove *move); +u32 GetMoveMaxPowerBoost(struct PokemonMove *move); u8 GetMoveCriticalHitChance(struct PokemonMove *move); bool8 MoveCannotHitFrozen(struct PokemonMove *move); bool8 MoveDealsDirectDamage(struct PokemonMove *move); diff --git a/src/code_8048480.c b/src/code_8048480.c index e8a11c122..ee75d2caf 100644 --- a/src/code_8048480.c +++ b/src/code_8048480.c @@ -212,7 +212,7 @@ void sub_80485B0(struct DungeonEntity *param_1, struct DungeonEntity * param_2) register struct PokemonMove *movePtr2 asm("r5"); // r5 u8 cVar8; s32 movePowerBoost; - s32 moveUnk12; + s32 maxPowerBoost; isMoveBoosted = FALSE; cVar8 = 1; @@ -226,10 +226,10 @@ void sub_80485B0(struct DungeonEntity *param_1, struct DungeonEntity * param_2) { if(GetMovePower(movePtr2) == 0) continue; movePowerBoost = movePtr1->powerBoost; - moveUnk12 = GetMoveUnk12(movePtr2); + maxPowerBoost = GetMoveMaxPowerBoost(movePtr2); movePtr1->powerBoost += cVar8; - if(movePtr1->powerBoost >= moveUnk12) - movePtr1->powerBoost = moveUnk12; + if(movePtr1->powerBoost >= maxPowerBoost) + movePtr1->powerBoost = maxPowerBoost; if(movePowerBoost != movePtr1->powerBoost) isMoveBoosted = TRUE; }