Fixes speed calculation order (#7064)
This commit is contained in:
parent
b3752e13d8
commit
99997c49fc
@ -4699,6 +4699,10 @@ u32 GetBattlerTotalSpeedStatArgs(u32 battler, u32 ability, enum ItemHoldEffect h
|
||||
{
|
||||
u32 speed = gBattleMons[battler].speed;
|
||||
|
||||
// stat stages
|
||||
speed *= gStatStageRatios[gBattleMons[battler].statStages[STAT_SPEED]][0];
|
||||
speed /= gStatStageRatios[gBattleMons[battler].statStages[STAT_SPEED]][1];
|
||||
|
||||
// weather abilities
|
||||
if (HasWeatherEffect())
|
||||
{
|
||||
@ -4726,10 +4730,6 @@ u32 GetBattlerTotalSpeedStatArgs(u32 battler, u32 ability, enum ItemHoldEffect h
|
||||
else if (ability == ABILITY_UNBURDEN && gDisableStructs[battler].unburdenActive)
|
||||
speed *= 2;
|
||||
|
||||
// stat stages
|
||||
speed *= gStatStageRatios[gBattleMons[battler].statStages[STAT_SPEED]][0];
|
||||
speed /= gStatStageRatios[gBattleMons[battler].statStages[STAT_SPEED]][1];
|
||||
|
||||
// player's badge boost
|
||||
if (!(gBattleTypeFlags & (BATTLE_TYPE_LINK | BATTLE_TYPE_RECORDED_LINK | BATTLE_TYPE_FRONTIER))
|
||||
&& ShouldGetStatBadgeBoost(B_FLAG_BADGE_BOOST_SPEED, battler)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user