The 1986 series of Doctor Who, a 14-part arc split up into four individual segments known collectively as The Trial of a Time Lord, is one of the shining examples of a deeply troubled production, perhaps best summed up by the writer of the final segment dying before he had completed the script, the script editor finishing it but the producer then getting cold feet about the original ending and deciding to change it, and the script editor being so incensed by this that he withdrew permission to use his version of the final episode and walked out on the production, meaning a new writing team had to be brought in to write a new conclusion without knowing anything about what was originally meant to happen with just days to spare.
Remarkably, despite all that, the biggest on-screen evidence of this behind-the-scenes chaos is not in that final segment. It's in the second one, usually referred to as Mindwarp, so named because of a piece of machinery that, well, warps peoples' minds. The Doctor is subjected to this machine at the conclusion of the first part of the story, and spends the remainder of the serial acting very oddly.
However, matters are compounded by the fact that this story is being played as evidence in the Doctor's trial. The Doctor later accuses his prosecutor, the Valeyard, of having tampered with this evidence to show him in the worst possible light. Combined with the Doctor's claim that his odd behaviour after being subjected to the Mindwarp machine was a ruse to try and escape, this means any of the following explanations as to what is going on could be correct:
- The Doctor was fried by the Mindwarp machine.
- The Doctor is only pretending to have been fried by the Mindwarp machine (the explanation the Doctor claims in the courtroom to be real, but he is still suffering from amnesia at this stage, and this version of events appears to be contradicted later on).
- The Doctor is only pretending to have been fried by the Mindwarp machine, but the events shown on-screen have been distorted to portray him in the worst possible light.
This might not be such a problem, were it not for the fact that the show never explains exactly how 'real' the events of the story are, and that Colin Baker himself was not aware of this - writer Philip Martin could not be contacted during production, and Baker was unable to get an explanation out of the director, producer or script editor, leaving him to guess at what the script's intention was. It appears that Martin's intention was that the Mindwarp machine had blended the Doctor's personality with that of King Yrcanos' (the warlord played by BRIAN BLESSED in the story), who was the last to be subjected by the machine in an attempt to pacify him.
The lack of clarity as to what is real and what is not is not helped by later developments. The Doctor's companion Peri is killed off at the end of the story when Crozier transplants Kiv's brain into her body; however, producer John Nathan-Turner later got cold feet about this and decided to retroactively reveal that she had actually survived at the end of the final segment and her death had been another of the Valeyard's fabrications, seemingly without checking to see how this tallied with the rest of the story. (It may have been the intention that the scenes in Mindwarp were distorted to show the Doctor in a worse light, but were not actually completely fabricated; this also causes problems in the third segment, Terror of the Vervoids.) The upshot of all this is a fairly unique example of the Unreliable Narrator trope, where nobody was actually sure how unreliable the narrator was meant to be, if at all.