updated the ranged attack AI