An alien intelligence has invaded the TARDIS and rendered the First Doctor invisible, leaving Dodo Chaplet and Steven Taylor incredulous. They step outside into a strange realm where the Doctor reappears, saying he recognizes the place they are in. They have come to the realm of the Celestial Toymaker, an eternal being of infinite power who sets games and traps for the unwary so that they become his toys and playthings. The TARDIS is removed to prevent their escape and hidden with hundreds of facsimiles to prevent detection. The Doctor and the Toymaker have faced each other before, and the Toymaker abducts his old adversary to another place. The Doctor appears in the Toymaker’s study where he is given the Trilogic game, a ten piece Tower of Hanoi puzzle whose pieces must all be moved and remounted in a precisely correct 1023 move sequence to ensure success at the game. Screens are placed in the two rooms which transmit the progress of the Doctor to his friends and vice versa. When the Doctor tries to communicate with his friends he is rendered invisible, unable to offer any advice or support. The game is advanced automatically to a further stage, with the Toymaker warning the Doctor that both parties must finish their tasks at the same time to win the game. A similar transgression later leads to him being made mute.
Steven and Dodo face different challenges. The first to appear are two clowns, Joey and Clara, full of childish tricks and a rather dangerous game of Blind Man's Buff based on buzzed clues which is not as simple as it first seems. The clowns are made to replay the game when it is clear they are cheating, and the second time round Joey loses his footing on an obstacle course and the challengers are transformed into twisted dolls on the floor. Steven and Dodo then venture down a corridor into another chamber with three beautiful chairs and a challenge from living playing cards, the King and Queen of Hearts, along with a Knave and a Joker. An adjoining room has a further four chairs and Steven deduces from a rhyme that six of the seven chairs are deadly to sit on. Seven mannequins are provided to be used for testing on the chairs. The King and Queen play alongside them, and some of the mannequins are destroyed as seats are proven unsafe and eliminated. Dodo herself sits in the freezing chair and starts to freeze, only being rescued in the nick of time. The King and Queen, however, perish when they sit in a chair, with Cyril the Knave and the Joker having abandoned them to their games.
The next hurdle for Steven and Dodo are the comical Sgt. Rugg and Mrs. Wiggs, who hold court in a kitchen. They challenge them to hunt the thimble – or rather the key to the exit door – beyond which the TARDIS is presumed to be. Rugg and Wiggs are soon fighting, hurling crockery and food around, and in the chaos Dodo finds the key inside the large pie which Mrs Wiggs was making. She and Steven depart and enter another room with the dancing floor. There they encounter the three mannequins not destroyed by the chairs, who transform into ballerinas, and start to dance. At the far end of the floor is indeed the TARDIS. Sgt Rugg and Mrs Wiggs turn up too, determined to please the Toymaker and stop Steven and Dodo from reaching their craft. Steven and Dodo get trapped as partners with two of the dolls, and only manage to free themselves by swapping their partners for each other. They pelt on to the TARDIS, leaving Wiggs and Rugg to their fates, but the Police Box is once more a fake.
With the Doctor making good progress with the Trilogic Game, the Toymaker now chooses Cyril the schoolboy to take on his companions. Dodo and Steven now find themselves in a vast game of hopscotch against the schoolboy, who delights in tricks and traps to prevent them winning. The TARDIS is the alluring prize at the end of the game, and to reach it you need to win dice throws, relying on luck, and avoid the electrified spaces beyond the proper squares. It is, however, Cyril who literally falls foul of his own traps when he slips on a square he has made booby-trapped and is electrocuted. Dodo and Steven thus are at the TARDIS.
In the Toymaker’s study at the same time, the Doctor is at the final stage of the Trilogic Game. He has been returned to visibility and voice, and holds the final piece of the puzzle in his hand. The three friends are now reunited, with Steven and Dodo sent into the TARDIS for safety while the Toymaker challenges the Doctor to complete the Game. The Doctor realizes that when he makes the move and the Game is won, the Toymaker’s domain will disappear – and the TARDIS with it. He cleverly orders the last piece to move using the Toymaker’s voice, allowing them to depart while the Toymaker’s world is destroyed. The Doctor celebrates with a sweet from a bag given to Dodo by Cyril, but it leaves him in agony...