Can you exit the loop to prevent the extra attack? Look at the break statement.