Does the stronghold deploy troops with the timer bar when enemies are within range or does it work upon being destroyed?