Complex sentence: Once the most important castle of the Livonian Order, it was the official residence for the masters of the order, it was partly destroyed during the Great Northern War.
Split into simpler sentences: Once the most important castle of the Livonian Order, it was the official residence for the masters of the order. It was partly destroyed during the Great Northern War.