diff options
author | yenatch <yenatch@gmail.com> | 2018-04-18 22:18:34 -0400 |
---|---|---|
committer | yenatch <yenatch@gmail.com> | 2018-04-18 22:18:52 -0400 |
commit | 0a040394f34d2d4e5386277649bbff450e3b3075 (patch) | |
tree | 20794fecd9af5df292cfa1973739e54607241465 /src/battle/calculate_base_damage.c | |
parent | e0e2f0218d5d558a375ae972ab8b5eb225784051 (diff) |
physical/special type macros
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 8dc4108d9..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 < TYPE_MYSTERY) + 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) { |