Added ranged battle animation detection.
Fixed bug with enemy units unable to initiate attack due to incorrect reference to attackTargets unit and dist.