brick break gen 4 and 5 config. clears aurora veil
This commit is contained in:
parent
294fecd57c
commit
96fd8e696b
2 changed files with 26 additions and 7 deletions
|
@ -152,6 +152,7 @@
|
|||
#define B_MEMENTO_FAIL GEN_7 // In Gen4+, Memento fails if there is no target or if the target is protected or behind substitute. But not if Atk/Sp. Atk are at -6.
|
||||
#define B_GLARE_GHOST GEN_7 // In Gen4+, Glare can hit Ghost-type Pokémon normally.
|
||||
#define B_SKILL_SWAP GEN_7 // In Gen4+, Skill Swap triggers switch-in abilities after use.
|
||||
#define B_BRICK_BREAK GEN_7 // In Gen4+, you can destroy your own side's screens. In Gen 5+, screens are not removed if the target is immune.
|
||||
|
||||
// Ability settings
|
||||
#define B_ABILITY_WEATHER GEN_7 // In Gen6+, ability-induced weather lasts 5 turns. Before, it lasted until the battle ended or until it was changed by a move or a different weather-affecting ability.
|
||||
|
|
|
@ -13103,14 +13103,32 @@ static void Cmd_snatchsetbattlers(void)
|
|||
|
||||
static void Cmd_removelightscreenreflect(void) // brick break
|
||||
{
|
||||
u8 opposingSide = GetBattlerSide(gBattlerAttacker) ^ BIT_SIDE;
|
||||
u8 side;
|
||||
bool32 failed;
|
||||
|
||||
if (gSideTimers[opposingSide].reflectTimer || gSideTimers[opposingSide].lightscreenTimer)
|
||||
#if B_BRICK_BREAK >= GEN_4
|
||||
side = GetBattlerSide(gBattlerAttacker);
|
||||
#else
|
||||
side = GetBattlerSide(gBattlerAttacker) ^ BIT_SIDE;
|
||||
#endif
|
||||
|
||||
#if B_BRICK_BREAK >= GEN_5
|
||||
failed = (gMoveResultFlags & MOVE_RESULT_NO_EFFECT);
|
||||
#else
|
||||
failed = FALSE;
|
||||
#endif
|
||||
|
||||
if (!failed
|
||||
&& (gSideTimers[side].reflectTimer
|
||||
|| gSideTimers[side].lightscreenTimer
|
||||
|| gSideTimers[side].auroraVeilTimer))
|
||||
{
|
||||
gSideStatuses[opposingSide] &= ~(SIDE_STATUS_REFLECT);
|
||||
gSideStatuses[opposingSide] &= ~(SIDE_STATUS_LIGHTSCREEN);
|
||||
gSideTimers[opposingSide].reflectTimer = 0;
|
||||
gSideTimers[opposingSide].lightscreenTimer = 0;
|
||||
gSideStatuses[side] &= ~(SIDE_STATUS_REFLECT);
|
||||
gSideStatuses[side] &= ~(SIDE_STATUS_LIGHTSCREEN);
|
||||
gSideStatuses[side] &= ~(SIDE_STATUS_AURORA_VEIL);
|
||||
gSideTimers[side].reflectTimer = 0;
|
||||
gSideTimers[side].lightscreenTimer = 0;
|
||||
gSideTimers[side].auroraVeilTimer = 0;
|
||||
gBattleScripting.animTurn = 1;
|
||||
gBattleScripting.animTargetsHit = 1;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue