Complex sentence: The German ship turned to starboard but "Dundee" turned to port to avoid a broadside, by when "Leopard" had been hit forty times.
Split into simpler sentences: The German ship turned to starboard but "Dundee" turned to port to avoid a broadside. By this time "Leopard" had been hit forty times.