Your Units will return to your Base without attacking a hostile Commander or Alliance in the following cases:
1. Your opponent activates a Base Protection item.
2. Your opponent relocates their Base - or any other target location - to different coordinates on the Map.
3. A targeted Resource Cache runs out of Resources and becomes empty before the sent Units arrive to capture it.
4. Your opponent loses control over the Cache your Units were sent to attack. It is impossible to attack a vacant Resource Cache.
In order to minimize damages, some players choose to leave their Caches before incoming Attacks arrive.