mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-11-17 03:57:38 +01:00
fix sand spit + primal weather
This commit is contained in:
parent
e66820e646
commit
791a899eed
@ -5028,20 +5028,21 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 move
|
||||
if (!(gMoveResultFlags & MOVE_RESULT_NO_EFFECT)
|
||||
&& !gProtectStructs[gBattlerAttacker].confusionSelfDmg
|
||||
&& TARGET_TURN_DAMAGED
|
||||
&& !(WEATHER_HAS_EFFECT && gBattleWeather & WEATHER_SANDSTORM_ANY)
|
||||
&& TryChangeBattleWeather(battler, ENUM_WEATHER_SANDSTORM, TRUE)
|
||||
&& !(WEATHER_HAS_EFFECT && gBattleWeather & WEATHER_PRIMAL_ANY))
|
||||
&& !(WEATHER_HAS_EFFECT && gBattleWeather & WEATHER_SANDSTORM_ANY))
|
||||
{
|
||||
gBattleScripting.battler = gActiveBattler = battler;
|
||||
BattleScriptPushCursor();
|
||||
gBattlescriptCurrInstr = BattleScript_SandSpitActivates;
|
||||
effect++;
|
||||
}
|
||||
else if (WEATHER_HAS_EFFECT && gBattleWeather & WEATHER_PRIMAL_ANY)
|
||||
{
|
||||
BattleScriptPushCursor();
|
||||
gBattlescriptCurrInstr = BattleScript_BlockedByPrimalWeatherRet;
|
||||
effect++;
|
||||
if (WEATHER_HAS_EFFECT && gBattleWeather & WEATHER_PRIMAL_ANY)
|
||||
{
|
||||
BattleScriptPushCursor();
|
||||
gBattlescriptCurrInstr = BattleScript_BlockedByPrimalWeatherRet;
|
||||
effect++;
|
||||
}
|
||||
else if (TryChangeBattleWeather(battler, ENUM_WEATHER_SANDSTORM, TRUE))
|
||||
{
|
||||
gBattleScripting.battler = gActiveBattler = battler;
|
||||
BattleScriptPushCursor();
|
||||
gBattlescriptCurrInstr = BattleScript_SandSpitActivates;
|
||||
effect++;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case ABILITY_PERISH_BODY:
|
||||
|
Loading…
Reference in New Issue
Block a user