making attack command also use ranged attacks