The Doctor's latest regeneration has proven more unstable than his previous ones. His two assistants, Tegan and Nyssa, help him recuperate on the tranquil planet of Castrovalva. Adric has been captured by the Master, who is taking advantage of the Doctor's weakened state to ensnare him in an elaborate trap whose recursive nature threatens to destroy his mind. As the Doctor begins to recover he realises that the Master's trap for Adric is even more intricate than he could have imagined and that he will stop at nothing to gain his revenge over the Doctor.