Fix Grassy Terrain bad loop

This commit is contained in:
DizzyEggg 2020-06-29 18:26:53 +02:00
parent 5ddb4634f5
commit 5a2d9fe9fe
3 changed files with 5 additions and 3 deletions

View file

@ -6913,7 +6913,9 @@ BattleScript_MoveUsedPsychicTerrainPrevents::
waitmessage 0x40
goto BattleScript_MoveEnd
BattleScript_GrassyTerrainLoop::
BattleScript_GrassyTerrainHeals::
setbyte gBattleCommunication, 0
BattleScript_GrassyTerrainLoop:
copyarraywithindex gBattlerAttacker, gBattlerByTurnOrder, gBattleCommunication, 0x1
checkgrassyterrainheal BS_ATTACKER, BattleScript_GrassyTerrainLoopIncrement
printstring STRINGID_GRASSYTERRAINHEALS

View file

@ -302,7 +302,7 @@ extern const u8 BattleScript_SpectralThiefSteal[];
extern const u8 BattleScript_StatUpMsg[];
extern const u8 BattleScript_DefiantActivates[];
extern const u8 BattleScript_PowderMoveNoEffect[];
extern const u8 BattleScript_GrassyTerrainLoop[];
extern const u8 BattleScript_GrassyTerrainHeals[];
extern const u8 BattleScript_VCreateStatLoss[];
extern const u8 BattleScript_SpikyShieldEffect[];
extern const u8 BattleScript_KingsShieldEffect[];

View file

@ -1308,7 +1308,7 @@ u8 DoFieldEndTurnEffects(void)
{
if (gFieldTimers.grassyTerrainTimer == 0 || --gFieldTimers.grassyTerrainTimer == 0)
gFieldStatuses &= ~(STATUS_FIELD_GRASSY_TERRAIN);
BattleScriptExecute(BattleScript_GrassyTerrainLoop);
BattleScriptExecute(BattleScript_GrassyTerrainHeals);
effect++;
}
gBattleStruct->turnCountersTracker++;