Complex sentence: Beverley had been attached by the Scots in 1321 during the Wars of Scottish Independence and had had to be ransomed from the Scots in early 1322, and other than the simple gates and ditches, the town was undefended.
Split into simpler sentences: Beverley had been attacked by the Scots in 1321 during the Wars of Scottish Independence and been ransomed from the Scots in early 1322. Other than the simple gates and ditches, the town was undefended.