mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2025-01-19 01:44:20 +01:00
Terrains freeze the game after player mon faints (#3016)
This commit is contained in:
parent
9506b205e6
commit
a0881b8e8d
@ -2056,6 +2056,8 @@ static bool32 EndTurnTerrain(u32 terrainFlag, u32 stringTableId)
|
||||
{
|
||||
if (gFieldStatuses & terrainFlag)
|
||||
{
|
||||
if (terrainFlag & STATUS_FIELD_GRASSY_TERRAIN)
|
||||
BattleScriptExecute(BattleScript_GrassyTerrainHeals);
|
||||
if (!(gFieldStatuses & STATUS_FIELD_TERRAIN_PERMANENT) && --gFieldTimers.terrainTimer == 0)
|
||||
{
|
||||
gFieldStatuses &= ~terrainFlag;
|
||||
@ -2065,11 +2067,9 @@ static bool32 EndTurnTerrain(u32 terrainFlag, u32 stringTableId)
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = stringTableId;
|
||||
BattleScriptExecute(BattleScript_TerrainEnds);
|
||||
}
|
||||
}
|
||||
if (terrainFlag & STATUS_FIELD_GRASSY_TERRAIN)
|
||||
BattleScriptExecute(BattleScript_GrassyTerrainHeals);
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user