mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2025-01-29 14:53:55 +01:00
Use CountAliveMonsInBattle constants
This commit is contained in:
parent
c647a8329f
commit
eb0b73c14e
@ -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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user