summaryrefslogtreecommitdiff
path: root/src/pokemon.c
diff options
context:
space:
mode:
authorPikalaxALT <PikalaxALT@users.noreply.github.com>2019-09-05 09:06:31 -0400
committerGitHub <noreply@github.com>2019-09-05 09:06:31 -0400
commit1e1a4076f0e1378b4e3424513fa43533d773272c (patch)
tree53163abdfd81490e1e2aeef89d85a83336b5c4ff /src/pokemon.c
parent5c7eac713423fc72e90965ce828fe3c969089ff1 (diff)
parenteb0b73c14e662e2d682837a78c78c868697fc5e8 (diff)
Merge pull request #798 from GriffinRichards/constants-baction
Use misc battle constants
Diffstat (limited to 'src/pokemon.c')
-rw-r--r--src/pokemon.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/pokemon.c b/src/pokemon.c
index f5e79243e..074ee2d19 100644
--- a/src/pokemon.c
+++ b/src/pokemon.c
@@ -3197,13 +3197,13 @@ s32 CalculateBaseDamage(struct BattlePokemon *attacker, struct BattlePokemon *de
if ((sideStatus & SIDE_STATUS_REFLECT) && gCritMultiplier == 1)
{
- if ((gBattleTypeFlags & BATTLE_TYPE_DOUBLE) && CountAliveMonsInBattle(2) == 2)
+ if ((gBattleTypeFlags & BATTLE_TYPE_DOUBLE) && CountAliveMonsInBattle(BATTLE_ALIVE_DEF_SIDE) == 2)
damage = 2 * (damage / 3);
else
damage /= 2;
}
- if ((gBattleTypeFlags & BATTLE_TYPE_DOUBLE) && gBattleMoves[move].target == 8 && CountAliveMonsInBattle(2) == 2)
+ if ((gBattleTypeFlags & BATTLE_TYPE_DOUBLE) && gBattleMoves[move].target == 8 && CountAliveMonsInBattle(BATTLE_ALIVE_DEF_SIDE) == 2)
damage /= 2;
// moves always do at least 1 damage.
@@ -3244,13 +3244,13 @@ s32 CalculateBaseDamage(struct BattlePokemon *attacker, struct BattlePokemon *de
if ((sideStatus & SIDE_STATUS_LIGHTSCREEN) && gCritMultiplier == 1)
{
- if ((gBattleTypeFlags & BATTLE_TYPE_DOUBLE) && CountAliveMonsInBattle(2) == 2)
+ if ((gBattleTypeFlags & BATTLE_TYPE_DOUBLE) && CountAliveMonsInBattle(BATTLE_ALIVE_DEF_SIDE) == 2)
damage = 2 * (damage / 3);
else
damage /= 2;
}
- if ((gBattleTypeFlags & BATTLE_TYPE_DOUBLE) && gBattleMoves[move].target == 8 && CountAliveMonsInBattle(2) == 2)
+ if ((gBattleTypeFlags & BATTLE_TYPE_DOUBLE) && gBattleMoves[move].target == 8 && CountAliveMonsInBattle(BATTLE_ALIVE_DEF_SIDE) == 2)
damage /= 2;
// are effects of weather negated with cloud nine or air lock