mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2025-02-25 13:45:29 +01:00
misty terrain blocks toxic spikes
This commit is contained in:
parent
f050168c55
commit
5e250853c6
@ -5867,8 +5867,7 @@ static void Cmd_switchineffects(void)
|
|||||||
}
|
}
|
||||||
else if (!(gSideStatuses[GetBattlerSide(gActiveBattler)] & SIDE_STATUS_TOXIC_SPIKES_DAMAGED)
|
else if (!(gSideStatuses[GetBattlerSide(gActiveBattler)] & SIDE_STATUS_TOXIC_SPIKES_DAMAGED)
|
||||||
&& (gSideStatuses[GetBattlerSide(gActiveBattler)] & SIDE_STATUS_TOXIC_SPIKES)
|
&& (gSideStatuses[GetBattlerSide(gActiveBattler)] & SIDE_STATUS_TOXIC_SPIKES)
|
||||||
&& IsBattlerGrounded(gActiveBattler)
|
&& IsBattlerGrounded(gActiveBattler))
|
||||||
&& !(gFieldStatuses & STATUS_FIELD_MISTY_TERRAIN))
|
|
||||||
{
|
{
|
||||||
gSideStatuses[GetBattlerSide(gActiveBattler)] |= SIDE_STATUS_TOXIC_SPIKES_DAMAGED;
|
gSideStatuses[GetBattlerSide(gActiveBattler)] |= SIDE_STATUS_TOXIC_SPIKES_DAMAGED;
|
||||||
if (IS_BATTLER_OF_TYPE(gActiveBattler, TYPE_POISON)) // Absorb the toxic spikes.
|
if (IS_BATTLER_OF_TYPE(gActiveBattler, TYPE_POISON)) // Absorb the toxic spikes.
|
||||||
@ -5884,7 +5883,8 @@ static void Cmd_switchineffects(void)
|
|||||||
if (!(gBattleMons[gActiveBattler].status1 & STATUS1_ANY)
|
if (!(gBattleMons[gActiveBattler].status1 & STATUS1_ANY)
|
||||||
&& !IS_BATTLER_OF_TYPE(gActiveBattler, TYPE_STEEL)
|
&& !IS_BATTLER_OF_TYPE(gActiveBattler, TYPE_STEEL)
|
||||||
&& GetBattlerAbility(gActiveBattler) != ABILITY_IMMUNITY
|
&& GetBattlerAbility(gActiveBattler) != ABILITY_IMMUNITY
|
||||||
&& !(gSideStatuses[GetBattlerSide(gActiveBattler)] & SIDE_STATUS_SAFEGUARD))
|
&& !(gSideStatuses[GetBattlerSide(gActiveBattler)] & SIDE_STATUS_SAFEGUARD)
|
||||||
|
&& !(gFieldStatuses & STATUS_FIELD_MISTY_TERRAIN))
|
||||||
{
|
{
|
||||||
if (gSideTimers[GetBattlerSide(gActiveBattler)].toxicSpikesAmount >= 2)
|
if (gSideTimers[GetBattlerSide(gActiveBattler)].toxicSpikesAmount >= 2)
|
||||||
gBattleMons[gActiveBattler].status1 |= STATUS1_TOXIC_POISON;
|
gBattleMons[gActiveBattler].status1 |= STATUS1_TOXIC_POISON;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user