mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-11-16 19:47:35 +01:00
Review corrections
This commit is contained in:
parent
4794c63066
commit
503134167a
@ -70,7 +70,7 @@
|
||||
#define B_MULTI_HIT_CHANCE GEN_6 // In Gen5+, multi-hit moves have different %. See Cmd_setmultihitcounter for values.
|
||||
#define B_RECOIL_IF_MISS_DMG GEN_6 // In Gen5+, Jump Kick and Hi Jump Kick will always do half of the user's max HP when missing.
|
||||
#define B_PSYWAVE_DMG GEN_6 // Psywave's damage formula. See Cmd_psywavedamageeffect.
|
||||
#define B_BADGE_BOOST GEN_4 // In Gen4+, Gym Badges no longer boost a Pokémon's stats
|
||||
#define B_BADGE_BOOST GEN_6 // In Gen4+, Gym Badges no longer boost a Pokémon's stats
|
||||
|
||||
// Move settings
|
||||
#define B_FELL_STINGER_STAT_RAISE GEN_6 // In Gen7+, it raises Atk by 3 stages instead of 2 if it causes the target to faint.
|
||||
|
@ -4235,7 +4235,7 @@ u32 GetBattlerTotalSpeedStat(u8 battlerId)
|
||||
|
||||
// player's badge boost
|
||||
if (!(gBattleTypeFlags & (BATTLE_TYPE_LINK | BATTLE_TYPE_x2000000 | BATTLE_TYPE_FRONTIER))
|
||||
&& FlagGet(FLAG_BADGE03_GET)
|
||||
&& ShouldGetStatBadgeBoost(FLAG_BADGE03_GET, battlerId)
|
||||
&& GetBattlerSide(battlerId) == B_SIDE_PLAYER
|
||||
&& B_BADGE_BOOST == GEN_3)
|
||||
{
|
||||
|
@ -6937,10 +6937,11 @@ static u32 CalcAttackStat(u16 move, u8 battlerAtk, u8 battlerDef, u8 moveType, b
|
||||
break;
|
||||
}
|
||||
|
||||
// The attack stat of a Player's Pokémon is boosted by x1.1 (+10%) if they have the 1st 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.
|
||||
if (B_BADGE_BOOST == GEN_3)
|
||||
{
|
||||
if (ShouldGetStatBadgeBoost(FLAG_BADGE01_GET, battlerAtk) && !(IS_MOVE_SPECIAL(move)))
|
||||
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));
|
||||
@ -7078,12 +7079,13 @@ static u32 CalcDefenseStat(u16 move, u8 battlerAtk, u8 battlerDef, u8 moveType,
|
||||
if (IS_BATTLER_OF_TYPE(battlerDef, TYPE_ROCK) && WEATHER_HAS_EFFECT && gBattleWeather & WEATHER_SANDSTORM_ANY && !usesDefStat)
|
||||
MulModifier(&modifier, UQ_4_12(1.5));
|
||||
|
||||
// The defense stat of a Player's Pokémon is boosted by x1.1 (+10%) if they have the 5th 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.
|
||||
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_PHYSICAL(move)))
|
||||
if (ShouldGetStatBadgeBoost(FLAG_BADGE07_GET, battlerDef) && IS_MOVE_SPECIAL(move))
|
||||
MulModifier(&modifier, UQ_4_12(1.1));
|
||||
}
|
||||
|
||||
@ -7686,6 +7688,9 @@ bool32 SetIllusionMon(struct Pokemon *mon, u32 battlerId)
|
||||
|
||||
static 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))
|
||||
return FALSE;
|
||||
else if (GetBattlerSide(battlerId) != B_SIDE_PLAYER)
|
||||
|
Loading…
Reference in New Issue
Block a user