If The Ultimate Foe brings The Trial of a Time Lord to a slightly disappointing conclusion, the somewhat chaotic nature of the scripting of the story is probably the reason why.
Eric Saward had commissioned Robert Holmes to write the two concluding episodes. Holmes was mid-way through episode thirteen when he was hospitalized and sadly, he was to pass away shortly afterwards. With Holmes in hospital, Saward completed episode thirteen and, working from Holmes’ story outline, wrote the concluding episode.
JNT wasn’t happy with Saward’s ending (the Doctor and the Valeyard were trapped, apparently for ever, in a Time Vent) and asked for it to be changed. Saward refused and then resigned as script editor, taking his script with him. He also attempted to stop his section of episode thirteen from being used, but was unsuccessful.
Pip and Jane Baker were commissioned to write a new concluding episode. For copyright reasons they couldn’t be given any details of Saward’s script. So all they had to go on was episode thirteen and to make matters worse they had only a few days to deliver a workable episode.
Holmes’ section of episode thirteen runs up until the Doctor enters the Matrix. After that (with one exception) the rest was scripted by Saward. What’s interesting about Holmes’ scenes is how he takes yet another opportunity to tarnish the reputation of the Time Lords. Holmes had started this process some ten years earlier with The Deadly Assassin. And in many ways, The Ultimate Foe is really The Deadly Assassin II.
Episode thirteen answers some of the unanswered questions from The Mysterious Planet (although it’s debatable how many people actually remembered the points that are tidied up). Glitz and Mel are called as star witnesses and the Master pops up. I love the reveal of Ainley on the Matrix screen as well as his comment that he’s been sat in the Matrix watching everything and “enjoying myself enormously”.

All of the Time Lords’ dirty schemes are revealed (they’re somewhat complicated it has to be said) and there then follows a scene which could have been a game-changer in the direction of the series.
MASTER: You have an endearing habit of blundering into these things, Doctor, and the High Council took full advantage of your blunder.
INQUISITOR: Explain that.
MASTER: They made a deal with the Valeyard, or as I’ve always known him, the Doctor, to adjust the evidence, in return for which he was promised the remainder of the Doctor’s regenerations.
VALEYARD: This is clearly
DOCTOR: Just a minute! Did you call him the Doctor?
MASTER: There is some evil in all of us, Doctor, even you. The Valeyard is an amalgamation of the darker sides of your nature, somewhere between your twelfth and final incarnation. And I may say, you do not improve with age.
The origin of the Valeyard is something of a mystery and is never addressed. There was further mileage in an evil anti-Doctor (possibly taking over from the Master as the Doctor’s main nemesis) but it was never explored again (on television at least). But these two episodes do give Michael Jayston a chance to flex his acting muscles (and lose the hat!) and whilst the Valeyard never develops beyond a fairly stereotypical villain, Jayston does give him a bit of class.

Given the scripting race against time, episode fourteen is actually a lot better than it could have been. There’s some nice set-pieces (the Doctor apparantly convicted in a fake trial room and the unmasking of Popplewick aka the Valeyard) but the Valeyard’s ultimate plan (to assassinate various key Time Lords) is a little less than impressive. But there’s some prime examples of the Bakers unique use of the English language to enjoy – “a megabyte modem” and “there’s nothing you can do to prevent the catharsis of spurious morality” amongst others.
And then it’s all over. The Doctor is free to go and leaves with Mel (paradoxically before he’s actually met her!) and the Valeyard lives to cackle another day. Colin Baker’s final words “carrot juice, carrot juice, carrot juice” are perhaps not the most impressive last words he could have had – but, of course, it wasn’t planned to be his final story.
Over the last three weeks or so, I’ve really enjoyed revisiting all of Colin Baker’s stories for the first time in a number of years. He was something of a victim of circumstances and had things been different he could have gone on for several more years and really established himself as one of the best Doctors. But even given his rather compromised stint, there’s still plenty to enjoy in S22 and S23 and it’s with a little regret that I bid him farewell.