mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2025-02-22 04:04:15 +01:00
Merge pull request #2110 from Sneed69/gen8rattled
Gen 8 Intimidate triggers Rattled
This commit is contained in:
commit
f63a451517
@ -7925,7 +7925,7 @@ BattleScript_DrizzleActivates::
|
|||||||
call BattleScript_WeatherFormChanges
|
call BattleScript_WeatherFormChanges
|
||||||
end3
|
end3
|
||||||
|
|
||||||
BattleScript_DefiantActivates::
|
BattleScript_AbilityRaisesDefenderStat::
|
||||||
pause B_WAIT_TIME_SHORT
|
pause B_WAIT_TIME_SHORT
|
||||||
call BattleScript_AbilityPopUp
|
call BattleScript_AbilityPopUp
|
||||||
statbuffchange 0, NULL
|
statbuffchange 0, NULL
|
||||||
|
@ -308,7 +308,7 @@ extern const u8 BattleScript_MistySurgeActivates[];
|
|||||||
extern const u8 BattleScript_ElectricSurgeActivates[];
|
extern const u8 BattleScript_ElectricSurgeActivates[];
|
||||||
extern const u8 BattleScript_SpectralThiefSteal[];
|
extern const u8 BattleScript_SpectralThiefSteal[];
|
||||||
extern const u8 BattleScript_StatUpMsg[];
|
extern const u8 BattleScript_StatUpMsg[];
|
||||||
extern const u8 BattleScript_DefiantActivates[];
|
extern const u8 BattleScript_AbilityRaisesDefenderStat[];
|
||||||
extern const u8 BattleScript_PowderMoveNoEffect[];
|
extern const u8 BattleScript_PowderMoveNoEffect[];
|
||||||
extern const u8 BattleScript_GrassyTerrainHeals[];
|
extern const u8 BattleScript_GrassyTerrainHeals[];
|
||||||
extern const u8 BattleScript_VCreateStatLoss[];
|
extern const u8 BattleScript_VCreateStatLoss[];
|
||||||
|
@ -181,7 +181,7 @@
|
|||||||
#define B_FLASH_FIRE_FROZEN GEN_7 // In Gen5+, Flash Fire can trigger even when frozen, when it couldn't before.
|
#define B_FLASH_FIRE_FROZEN GEN_7 // In Gen5+, Flash Fire can trigger even when frozen, when it couldn't before.
|
||||||
#define B_SYNCHRONIZE_NATURE GEN_8 // In Gen8, if a Pokémon with Synchronize is leading the party, it's 100% guaranteed that wild Pokémon will have the same ability, as opposed to 50% previously.
|
#define B_SYNCHRONIZE_NATURE GEN_8 // In Gen8, if a Pokémon with Synchronize is leading the party, it's 100% guaranteed that wild Pokémon will have the same ability, as opposed to 50% previously.
|
||||||
#define B_SYNCHRONIZE_TOXIC GEN_8 // In Gen5+, if a Pokémon with Synchronize is badly poisoned, the opponent will also become badly poisoned. Previously, the opponent would become regular poisoned.
|
#define B_SYNCHRONIZE_TOXIC GEN_8 // In Gen5+, if a Pokémon with Synchronize is badly poisoned, the opponent will also become badly poisoned. Previously, the opponent would become regular poisoned.
|
||||||
#define B_UPDATED_INTIMIDATE GEN_8 // In Gen8, Intimidate doesn't work on opponents with the Inner Focus, Scrappy, Own Tempo or Oblivious abilities.
|
#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.
|
||||||
|
|
||||||
// Item settings
|
// 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.
|
#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.
|
||||||
|
@ -1575,12 +1575,22 @@ void PrepareStringBattle(u16 stringId, u8 battler)
|
|||||||
gBattleScripting.stickyWebStatDrop = 0;
|
gBattleScripting.stickyWebStatDrop = 0;
|
||||||
gBattlerAbility = gBattlerTarget;
|
gBattlerAbility = gBattlerTarget;
|
||||||
BattleScriptPushCursor();
|
BattleScriptPushCursor();
|
||||||
gBattlescriptCurrInstr = BattleScript_DefiantActivates;
|
gBattlescriptCurrInstr = BattleScript_AbilityRaisesDefenderStat;
|
||||||
if (targetAbility == ABILITY_DEFIANT)
|
if (targetAbility == ABILITY_DEFIANT)
|
||||||
SET_STATCHANGER(STAT_ATK, 2, FALSE);
|
SET_STATCHANGER(STAT_ATK, 2, FALSE);
|
||||||
else
|
else
|
||||||
SET_STATCHANGER(STAT_SPATK, 2, FALSE);
|
SET_STATCHANGER(STAT_SPATK, 2, FALSE);
|
||||||
}
|
}
|
||||||
|
#if B_UPDATED_INTIMIDATE >= GEN_8
|
||||||
|
else if (stringId == STRINGID_PKMNCUTSATTACKWITH && targetAbility == ABILITY_RATTLED
|
||||||
|
&& CompareStat(gBattlerTarget, STAT_SPEED, MAX_STAT_STAGE, CMP_LESS_THAN))
|
||||||
|
{
|
||||||
|
gBattlerAbility = gBattlerTarget;
|
||||||
|
BattleScriptPushCursor();
|
||||||
|
gBattlescriptCurrInstr = BattleScript_AbilityRaisesDefenderStat;
|
||||||
|
SET_STATCHANGER(STAT_SPEED, 1, FALSE);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
gActiveBattler = battler;
|
gActiveBattler = battler;
|
||||||
BtlController_EmitPrintString(BUFFER_A, stringId);
|
BtlController_EmitPrintString(BUFFER_A, stringId);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user