mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2025-02-21 11:43:37 +01:00
Merge pull request #1746 from ghoulslash/sand_spit
Fix sand spit + primal weather
This commit is contained in:
commit
16f97f4b48
@ -5045,20 +5045,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…
x
Reference in New Issue
Block a user