Complex sentence: The sorcerer built a castle of iron in the Pyrenees to keep knights and ladies he had captured as a diversion for his nephew Roger, a pagan knight.
Split into simpler sentences: The sorcerer built a castle of iron in the Pyrenees where he kept various captured knights and ladies. He captured these so they may act as a diversion for his nephew Roger, a pagan knight.