Use CountAliveMonsInBattle constants
This commit is contained in:
+4
-4
@@ -3197,13 +3197,13 @@ s32 CalculateBaseDamage(struct BattlePokemon *attacker, struct BattlePokemon *de
|
|||||||
|
|
||||||
if ((sideStatus & SIDE_STATUS_REFLECT) && gCritMultiplier == 1)
|
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);
|
damage = 2 * (damage / 3);
|
||||||
else
|
else
|
||||||
damage /= 2;
|
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;
|
damage /= 2;
|
||||||
|
|
||||||
// moves always do at least 1 damage.
|
// 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 ((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);
|
damage = 2 * (damage / 3);
|
||||||
else
|
else
|
||||||
damage /= 2;
|
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;
|
damage /= 2;
|
||||||
|
|
||||||
// are effects of weather negated with cloud nine or air lock
|
// are effects of weather negated with cloud nine or air lock
|
||||||
|
|||||||
Reference in New Issue
Block a user