I am currently thinking how to build a sheet for a powerful villain of my campaign.
This creature was created by an ancient people as a way to control artificial dragons and to kill powerful real dragons. They gave him a strong artificial dragon body the capacity to control this artificial dragons and excellent mind (strategy purpose). The creature, however, turned against its creators. They tried to defeat it, but it survived and to avoid death it merged with a powerful lich.
I was thinking a CR 26 to 30, with cool lair / boss features (like Demogorgon, Orcus, etc).
Which monster should I consider as a barebone?
How can I deal spellcasting related to the CR?