mirror of
https://github.com/rh-hideout/pokeemerald-expansion.git
synced 2026-05-01 04:37:18 -05:00
Add missing clear check for Defog
We usually want to check first before we remove any statuses.
This commit is contained in:
parent
7e0b1de2ae
commit
65a4d852fe
|
|
@ -9392,14 +9392,21 @@ static bool32 TryDefogClear(u32 battlerAtk, bool32 clear)
|
||||||
}
|
}
|
||||||
if (gBattleWeather & B_WEATHER_FOG)
|
if (gBattleWeather & B_WEATHER_FOG)
|
||||||
{
|
{
|
||||||
gBattleWeather &= ~B_WEATHER_FOG;
|
|
||||||
BattleScriptCall(BattleScript_FogEnded_Ret);
|
if (clear)
|
||||||
|
{
|
||||||
|
gBattleWeather &= ~B_WEATHER_FOG;
|
||||||
|
BattleScriptCall(BattleScript_FogEnded_Ret);
|
||||||
|
}
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
if (GetConfig(CONFIG_DEFOG_EFFECT_CLEARING) >= GEN_8 && (gFieldStatuses & STATUS_FIELD_TERRAIN_ANY))
|
if (GetConfig(CONFIG_DEFOG_EFFECT_CLEARING) >= GEN_8 && (gFieldStatuses & STATUS_FIELD_TERRAIN_ANY))
|
||||||
{
|
{
|
||||||
RemoveAllTerrains();
|
if (clear)
|
||||||
BattleScriptCall(BattleScript_TerrainEnds_Ret);
|
{
|
||||||
|
RemoveAllTerrains();
|
||||||
|
BattleScriptCall(BattleScript_TerrainEnds_Ret);
|
||||||
|
}
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user