From 0a040394f34d2d4e5386277649bbff450e3b3075 Mon Sep 17 00:00:00 2001 From: yenatch Date: Wed, 18 Apr 2018 22:18:34 -0400 Subject: physical/special type macros --- src/battle/calculate_base_damage.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/battle/calculate_base_damage.c') 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) { -- cgit v1.2.3