Added target selection and attacking functionality