More review corrections

This commit is contained in:
LOuroboros 2020-10-21 16:39:06 -03:00
parent 682d29b088
commit 00bc6ab96b
2 changed files with 10 additions and 18 deletions

View file

@ -4236,8 +4236,7 @@ u32 GetBattlerTotalSpeedStat(u8 battlerId)
// player's badge boost
if (!(gBattleTypeFlags & (BATTLE_TYPE_LINK | BATTLE_TYPE_x2000000 | BATTLE_TYPE_FRONTIER))
&& ShouldGetStatBadgeBoost(FLAG_BADGE03_GET, battlerId)
&& GetBattlerSide(battlerId) == B_SIDE_PLAYER
&& B_BADGE_BOOST == GEN_3)
&& GetBattlerSide(battlerId) == B_SIDE_PLAYER)
{
speed = (speed * 110) / 100;
}

View file

@ -6939,13 +6939,10 @@ static u32 CalcAttackStat(u16 move, u8 battlerAtk, u8 battlerDef, u8 moveType, b
// The offensive stats of a Player's Pokémon are boosted by x1.1 (+10%) if they have the 1st badge and 7th badges.
// Having the 1st badge boosts physical attack while having the 7th badge boosts special attack.
if (B_BADGE_BOOST == GEN_3)
{
if (ShouldGetStatBadgeBoost(FLAG_BADGE01_GET, battlerAtk) && IS_MOVE_PHYSICAL(move))
MulModifier(&modifier, UQ_4_12(1.1));
if (ShouldGetStatBadgeBoost(FLAG_BADGE07_GET, battlerAtk) && IS_MOVE_SPECIAL(move))
MulModifier(&modifier, UQ_4_12(1.1));
}
if (ShouldGetStatBadgeBoost(FLAG_BADGE01_GET, battlerAtk) && IS_MOVE_PHYSICAL(move))
MulModifier(&modifier, UQ_4_12(1.1));
if (ShouldGetStatBadgeBoost(FLAG_BADGE07_GET, battlerAtk) && IS_MOVE_SPECIAL(move))
MulModifier(&modifier, UQ_4_12(1.1));
return ApplyModifier(modifier, atkStat);
}
@ -7081,13 +7078,10 @@ static u32 CalcDefenseStat(u16 move, u8 battlerAtk, u8 battlerDef, u8 moveType,
// The defensive stats of a Player's Pokémon are boosted by x1.1 (+10%) if they have the 5th badge and 7th badges.
// Having the 5th badge boosts physical defense while having the 7th badge boosts special defense.
if (B_BADGE_BOOST == GEN_3)
{
if (ShouldGetStatBadgeBoost(FLAG_BADGE05_GET, battlerDef) && IS_MOVE_PHYSICAL(move))
MulModifier(&modifier, UQ_4_12(1.1));
if (ShouldGetStatBadgeBoost(FLAG_BADGE07_GET, battlerDef) && IS_MOVE_SPECIAL(move))
MulModifier(&modifier, UQ_4_12(1.1));
}
if (ShouldGetStatBadgeBoost(FLAG_BADGE05_GET, battlerDef) && IS_MOVE_PHYSICAL(move))
MulModifier(&modifier, UQ_4_12(1.1));
if (ShouldGetStatBadgeBoost(FLAG_BADGE07_GET, battlerDef) && IS_MOVE_SPECIAL(move))
MulModifier(&modifier, UQ_4_12(1.1));
return ApplyModifier(modifier, defStat);
}
@ -7690,8 +7684,7 @@ bool8 ShouldGetStatBadgeBoost(u16 badgeFlag, u8 battlerId)
{
if (B_BADGE_BOOST != GEN_3)
return FALSE;
if (gBattleTypeFlags & (BATTLE_TYPE_LINK | BATTLE_TYPE_EREADER_TRAINER | BATTLE_TYPE_x2000000 | BATTLE_TYPE_FRONTIER))
else if (gBattleTypeFlags & (BATTLE_TYPE_LINK | BATTLE_TYPE_EREADER_TRAINER | BATTLE_TYPE_x2000000 | BATTLE_TYPE_FRONTIER))
return FALSE;
else if (GetBattlerSide(battlerId) != B_SIDE_PLAYER)
return FALSE;