diff --git a/include/constants/battle_config.h b/include/constants/battle_config.h index 183e8aec66..566a239822 100644 --- a/include/constants/battle_config.h +++ b/include/constants/battle_config.h @@ -231,6 +231,7 @@ #define B_UPDATED_INTIMIDATE GEN_8 // In Gen8, Intimidate doesn't work on opponents with the Inner Focus, Scrappy, Own Tempo or Oblivious abilities. It also activates Rattled. #define B_OBLIVIOUS_TAUNT GEN_7 // In Gen6+, Pokémon with Oblivious can't be taunted. #define B_STURDY GEN_7 // In Gen5+, Sturdy causes the Pokémon to have 1 HP remaining if another Pokémon's attack or confusion damage would have brought it from full health to 0 HP. +#define B_PLUS_MINUS_INTERACTION GEN_7 // In Gen5+, Plus and Minus can be activated with themselves and the opposite ability. Before, only the opposing ability could activate it. // Item settings #define B_HP_BERRIES GEN_7 // In Gen4+, berries which restore hp activate immediately after HP drops to half. In Gen3, the effect occurs at the end of the turn. diff --git a/src/battle_util.c b/src/battle_util.c index defbbb6a00..e13b5b3780 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -8694,6 +8694,7 @@ static u32 CalcAttackStat(u16 move, u8 battlerAtk, u8 battlerDef, u8 moveType, b if (moveType == TYPE_GRASS && gBattleMons[battlerAtk].hp <= (gBattleMons[battlerAtk].maxHP / 3)) MulModifier(&modifier, UQ_4_12(1.5)); break; + #if B_PLUS_MINUS_INTERACTION >= GEN_5 case ABILITY_PLUS: case ABILITY_MINUS: if (IsBattlerAlive(BATTLE_PARTNER(battlerAtk))) @@ -8703,6 +8704,16 @@ static u32 CalcAttackStat(u16 move, u8 battlerAtk, u8 battlerDef, u8 moveType, b MulModifier(&modifier, UQ_4_12(1.5)); } break; + #else + case ABILITY_PLUS: + 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)) && GetBattlerAbility(BATTLE_PARTNER(battlerAtk)) == ABILITY_PLUS) + MulModifier(&modifier, UQ_4_12(1.5)); + break; + #endif case ABILITY_FLOWER_GIFT: if (gBattleMons[battlerAtk].species == SPECIES_CHERRIM && IsBattlerWeatherAffected(battlerAtk, B_WEATHER_SUN) && IS_MOVE_PHYSICAL(move)) MulModifier(&modifier, UQ_4_12(1.5));