The best way of checking if the battle is over, is probably to track if there are any enemies left on the map. Add a hook to the destruction of battler, check if there are any more battlers still alive, and if there isn't: call the post battle cleanup.
This would supplement the current battle timeout, since it wouldn't properly handle maps where there are many enemies.
The best way of checking if the battle is over, is probably to track if there are any enemies left on the map. Add a hook to the destruction of battler, check if there are any more battlers still alive, and if there isn't: call the post battle cleanup.
This would supplement the current battle timeout, since it wouldn't properly handle maps where there are many enemies.