mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2025-01-13 15:13:42 +01:00
Merge pull request #2193 from AsparagusEduardo/BE_plusMinus
Config for Plus and Minus interaction
This commit is contained in:
commit
a51acab9e3
@ -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.
|
||||
|
@ -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));
|
||||
|
Loading…
x
Reference in New Issue
Block a user