Script editor Terrance Dicks gave Robert Holmes the task of writing a story set in a medieval castle, which was believed to be a difficult task. Holmes would reverse the roles in giving Dicks the setting of a lighthouse for Horror of Fang Rock in 1977. (DOC: Beginning the End)