diff options
author | Marcus Huderle <huderlem@gmail.com> | 2018-04-19 20:01:57 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-19 20:01:57 -0700 |
commit | a55b14d47def2735f7ec274ccf64b6e2d8805320 (patch) | |
tree | b70298ac8785cbe3b5ec6a39da4453f20da34a69 /src/battle/calculate_base_damage.c | |
parent | f6ed2ff9c31d7912e2dc259ddc10e17f0ecbbd1f (diff) | |
parent | 39710a12cbb854f2cc50ea2955c9f94b6b5e6024 (diff) |
Merge pull request #597 from yenatch/type-mystery
physical/special type macros and move gBattleMoves to c
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) { |