fixed checking for attack range