ghosts are supposed to go after the tower once all the villagers are dead
If there are too many enemies, the current auto-attack prefers targeting ghosts to protect villagers first rather than the twoer itself, unless it’s dealing with crabs that have already damaged the tower. adjust it so that crabs become the top priority as soon as they enter a certain perimeter