Add range check to attack.