Simplified pre-gen5 checks

This commit is contained in:
Eduardo Quezada D'Ottone 2022-07-21 16:36:07 -04:00
parent 56b9a50109
commit af72fb0d32

View File

@ -8706,20 +8706,12 @@ static u32 CalcAttackStat(u16 move, u8 battlerAtk, u8 battlerDef, u8 moveType, b
break;
#else
case ABILITY_PLUS:
if (IsBattlerAlive(BATTLE_PARTNER(battlerAtk)))
{
u32 partnerAbility = GetBattlerAbility(BATTLE_PARTNER(battlerAtk));
if (partnerAbility == ABILITY_MINUS)
MulModifier(&modifier, UQ_4_12(1.5));
}
if (IsBattlerAlive(BATTLE_PARTNER(battlerAtk)) && GetBattlerAbility(BATTLE_PARTNER(battlerAtk)) == ABILITY_MINUS)
MulModifier(&modifier, UQ_4_12(1.5));
break;
case ABILITY_MINUS:
if (IsBattlerAlive(BATTLE_PARTNER(battlerAtk)))
{
u32 partnerAbility = GetBattlerAbility(BATTLE_PARTNER(battlerAtk));
if (partnerAbility == ABILITY_PLUS)
MulModifier(&modifier, UQ_4_12(1.5));
}
if (IsBattlerAlive(BATTLE_PARTNER(battlerAtk)) && GetBattlerAbility(BATTLE_PARTNER(battlerAtk)) == ABILITY_PLUS)
MulModifier(&modifier, UQ_4_12(1.5));
break;
#endif
case ABILITY_FLOWER_GIFT: