mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2025-01-18 17:34:20 +01:00
More review corrections
This commit is contained in:
parent
682d29b088
commit
00bc6ab96b
@ -4236,8 +4236,7 @@ u32 GetBattlerTotalSpeedStat(u8 battlerId)
|
|||||||
// player's badge boost
|
// player's badge boost
|
||||||
if (!(gBattleTypeFlags & (BATTLE_TYPE_LINK | BATTLE_TYPE_x2000000 | BATTLE_TYPE_FRONTIER))
|
if (!(gBattleTypeFlags & (BATTLE_TYPE_LINK | BATTLE_TYPE_x2000000 | BATTLE_TYPE_FRONTIER))
|
||||||
&& ShouldGetStatBadgeBoost(FLAG_BADGE03_GET, battlerId)
|
&& ShouldGetStatBadgeBoost(FLAG_BADGE03_GET, battlerId)
|
||||||
&& GetBattlerSide(battlerId) == B_SIDE_PLAYER
|
&& GetBattlerSide(battlerId) == B_SIDE_PLAYER)
|
||||||
&& B_BADGE_BOOST == GEN_3)
|
|
||||||
{
|
{
|
||||||
speed = (speed * 110) / 100;
|
speed = (speed * 110) / 100;
|
||||||
}
|
}
|
||||||
|
@ -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.
|
// 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.
|
// 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))
|
if (ShouldGetStatBadgeBoost(FLAG_BADGE01_GET, battlerAtk) && IS_MOVE_PHYSICAL(move))
|
||||||
MulModifier(&modifier, UQ_4_12(1.1));
|
MulModifier(&modifier, UQ_4_12(1.1));
|
||||||
if (ShouldGetStatBadgeBoost(FLAG_BADGE07_GET, battlerAtk) && IS_MOVE_SPECIAL(move))
|
if (ShouldGetStatBadgeBoost(FLAG_BADGE07_GET, battlerAtk) && IS_MOVE_SPECIAL(move))
|
||||||
MulModifier(&modifier, UQ_4_12(1.1));
|
MulModifier(&modifier, UQ_4_12(1.1));
|
||||||
}
|
|
||||||
|
|
||||||
return ApplyModifier(modifier, atkStat);
|
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.
|
// 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.
|
// 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))
|
if (ShouldGetStatBadgeBoost(FLAG_BADGE05_GET, battlerDef) && IS_MOVE_PHYSICAL(move))
|
||||||
MulModifier(&modifier, UQ_4_12(1.1));
|
MulModifier(&modifier, UQ_4_12(1.1));
|
||||||
if (ShouldGetStatBadgeBoost(FLAG_BADGE07_GET, battlerDef) && IS_MOVE_SPECIAL(move))
|
if (ShouldGetStatBadgeBoost(FLAG_BADGE07_GET, battlerDef) && IS_MOVE_SPECIAL(move))
|
||||||
MulModifier(&modifier, UQ_4_12(1.1));
|
MulModifier(&modifier, UQ_4_12(1.1));
|
||||||
}
|
|
||||||
|
|
||||||
return ApplyModifier(modifier, defStat);
|
return ApplyModifier(modifier, defStat);
|
||||||
}
|
}
|
||||||
@ -7690,8 +7684,7 @@ bool8 ShouldGetStatBadgeBoost(u16 badgeFlag, u8 battlerId)
|
|||||||
{
|
{
|
||||||
if (B_BADGE_BOOST != GEN_3)
|
if (B_BADGE_BOOST != GEN_3)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
else if (gBattleTypeFlags & (BATTLE_TYPE_LINK | BATTLE_TYPE_EREADER_TRAINER | BATTLE_TYPE_x2000000 | BATTLE_TYPE_FRONTIER))
|
||||||
if (gBattleTypeFlags & (BATTLE_TYPE_LINK | BATTLE_TYPE_EREADER_TRAINER | BATTLE_TYPE_x2000000 | BATTLE_TYPE_FRONTIER))
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
else if (GetBattlerSide(battlerId) != B_SIDE_PLAYER)
|
else if (GetBattlerSide(battlerId) != B_SIDE_PLAYER)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user