Attack function integrated