diff options
author | PikalaxALT <pikalaxalt@gmail.com> | 2018-04-21 15:52:57 -0400 |
---|---|---|
committer | PikalaxALT <pikalaxalt@gmail.com> | 2018-04-21 15:52:57 -0400 |
commit | bf79edbd8b5b398921d4094abfe44d16c4a182a1 (patch) | |
tree | 5ad51360de30eda07c4e1df0bed5e74076bceadb /src/battle/calculate_base_damage.c | |
parent | 1a63f6607e187a58973cff05eb150fd66f77b9b9 (diff) | |
parent | 18f6c5c9d460c019453227abe033d84f1feb6310 (diff) |
Merge branch 'master' into watanabe
Diffstat (limited to 'src/battle/calculate_base_damage.c')
-rw-r--r-- | src/battle/calculate_base_damage.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/battle/calculate_base_damage.c b/src/battle/calculate_base_damage.c index 5e63ee92c..d983e47a4 100644 --- a/src/battle/calculate_base_damage.c +++ b/src/battle/calculate_base_damage.c @@ -170,7 +170,7 @@ s32 CalculateBaseDamage(struct BattlePokemon *attacker, struct BattlePokemon *de if (attackerHoldEffect == gHoldEffectToType[i][0] && type == gHoldEffectToType[i][1]) { - if (type <= 8) + if (TYPE_IS_PHYSICAL(type)) attack = (attack * (attackerHoldEffectParam + 100)) / 100; else spAttack = (spAttack * (attackerHoldEffectParam + 100)) / 100; @@ -221,7 +221,7 @@ s32 CalculateBaseDamage(struct BattlePokemon *attacker, struct BattlePokemon *de if (gBattleMoves[gCurrentMove].effect == EFFECT_EXPLOSION) defense /= 2; - if (type < TYPE_MYSTERY) // is physical + if (TYPE_IS_PHYSICAL(type)) // type < TYPE_MYSTERY { if (gCritMultiplier == 2) { @@ -271,7 +271,7 @@ s32 CalculateBaseDamage(struct BattlePokemon *attacker, struct BattlePokemon *de if (type == TYPE_MYSTERY) damage = 0; // is ??? type. does 0 damage. - if (type > TYPE_MYSTERY) // is special? + if (TYPE_IS_SPECIAL(type)) // type > TYPE_MYSTERY { if (gCritMultiplier == 2) { |