Before the Flood ( TV story ) Unique to this episode , as well as the BBC Wales " Doctor Who " series since it first aired in 2005 , the entire first scene of " Before the Flood " extensively broke the fourth wall by cutting over to the Doctor on board the TARDIS explaining the mechanics of a bootstrap paradox , a point integral to the story . This wouldn ' t be the last time the Doctor would break the Fourth Wall ; in " Heaven Sent " , he looks at the camera and says that " I ' m nothing without an audience . " Although , it is possible that the Doctor wasn ' t actually breaking the fourth wall and was instead talking to a confused Clara . It also featured the Doctor personally play the theme for " Doctor Who " for the first time on - screen , using an electric guitar ( which actor Peter Capaldi himself knew how to play and had personally selected from a guitar shop previously for a scene in " The Magician ' s Apprentice " ) . His musical pitches blended with that of the normal theme tune arrangement used in the title sequence . Despite the positive responses from fans , this version of the title sequence remained one - off . A notable aspect of the production was that part of the audio used to create the Fisher King ' s guttural roar and the voice of the Twelfth Doctor ' s hologram ghost were supplied by Corey Taylor , the lead singer of heavy metal band Slipknot . Synopsis . A twisted and vile survival plan is pieced together by an alien warlord called the Fisher King . The universe will feel the consequence . Can these events be stopped ? Can the Doctor ensure the future ' s coming and do the impossible ? Plot . At an unspecified point in time , the TARDIS flies through space . The Doctor addresses the audience directly , telling a story about a time traveller who has had many misadventures zipping around the history of the cosmos . At one point , he decided what was the point of time travel unless you get to meet your heroes . And so , the time traveller decides to meet his favourite musician , Ludwig van Beethoven . However , once he arrives in 18th century Germany , there is no sign of the composer whatsoever ; not even the Beethoven family has any idea who Ludwig is . Beethoven literally does not exist . The Doctor stops his story briefly , grabbing a bust of Beethoven and explains that this " never " really happened ; he ' s met Beethoven , who was very intense and loved arm - wrestling . ( He even got tips on how to play piano from Beethoven ) . The Doctor says he ' s trying to explain the Bootstrap Paradox with this hypothetical scenario , going to put the bust down ; however , he turns around and tells the audience to " Google it " if they want specifics . Placing the bust near an amp and clockwork squirrel , the Doctor explains that the time traveller panicked at the idea of a world without Beethoven ' s music . That ' s when the traveller remembered he brought sheet music for Beethoven to autograph . Copying out the music , the time traveller gets it published , effectively becoming Ludwig van Beethoven himself . And history manages to continue on with barely a feather ruffled . However , one little thing about this whole situation is still confusing . Grabbing his electric guitar , the Doctor turns on the amp attached to it . Tuning his guitar , the Doctor poses the question about how the music of Beethoven first originated . Did the time traveller create it , or did it simply exist without creation ? " " Who really composed Beethoven ' s Fifth ? " " With that question , the Doctor plays the opening bars on his electric guitar . In 1980 , the TARDIS materialises . The Doctor and O ' Donnell exit the TARDIS , noting that Bennett is still throwing up . When the Doctor notes that it usually happens with first - timers to time travel , O ' Donnell points out it ' s unlikely that Rose , Amy or Martha ever did that on their first trips ( likely because they had stronger stomachs ) . He notes that she knows a lot about him ; O ' Donnell explains that she used to be in army intelligence until she hung a coworker out a window for angering her . Bennett joins them , thinking his lunch made him ill ; he had shrimp . The Doctor explains that they ' ve arrived at the same location , only before the flood , on the day that the spaceship landed . O ' Donnell excuses herself to get a rock out of her boot , with the Doctor going ahead ; once the Doctor is out of sight , O ' Donnell giddily states the absurdity of the TARDIS interior to Bennett before regaining her composure . They quickly catch up to the Doctor , who has already found the spaceship ; he explains that it ' s basically a hearse . A body - bag is inside , but the strange writing isn ' t present . They are surprised by a very much alive Albar Prentis , whose sense of smell identifies their species . The Doctor notes he meet a Tivolian before , and is not a fan of the species . Prentis laughs , noting his species have a tendency to antagonise others . They ask about the body in the ship , to which Prentis explains is the body of the Fisher King , who ruled Tivoli for a decade before the Arcateenian s liberated them . However , the upset Tivolians ended up annoying them so much , that the benevolent species ended up enslaving them next . Bennett flatly states " " My first proper alien , and he ' s an idiot " " ; he thinks Tivolians are morons for favouring enslavement . Prentis continues his explanation ; in accordance to Arcateenian law , the body of the Fisher King is to be buried at a " savage , barren outpost . " The Doctor explains that it ' s the Earth , not the site that is considered such . He then explains about the future message , wondering if a special pen is what causes it ; Prentis tells him that Tivolians do not have such technology . Even the ship was given to him by the Arcateenians . Back in the future at the underwater base , Clara , Cass and Lunn see the Doctor ' s ghost is not hostile , just standing in place and muttering . Cass sees that the Doctor is utter something different from the other Ghosts ; " Moran , Prichard , Prentis , O ' Donnell , Clara , Bennett , Doctor , Cass . " It ' s a list of who dies in the order in which they are killed ; however , only the Doctor and Clara have realised this . Oddly , Lunn is missing from the list . When the Doctor contacts Clara and is informed about his ghost , he is badly shaken by this certain knowledge of his future . Clara forcefully encourages him to try to change events , but the Doctor argues that he cannot and ultimately accepts the eventuality that he must die to keep events in motion . He tries to get information from his ghost , but instead it unlocks the Faraday cage , releasing the other ghosts . The Doctor instructs them to go into the cage for their own protection , but to leave the phone outside so he can contact them in case the situation with the Ghosts changes . They comply , managing to evade the Ghosts . In the meantime , Prentis returns to his ship to find the Fisher King missing and the strange symbols have appeared . As soon as the writing has finished altering his mind , Prentis is surprised by the Fisher King and shot dead . The Doctor , O ' Donnell and Bennett rush back the hearse to stop the chain of events , but find they have been too slow to figure out the Fisher King ' s plans ; he faked his death to get away from the Arcateenians . Hearing a roar from the mighty monarch , the trio run into the buildings , hoping to avoid becoming Ghosts . Hearing the stomping , mechanical footsteps of the Fisher King pass by , O ' Donnell breathes a sigh of relief . However , when she moves to hide elsewhere , she is surprised by the Fisher King ; she screams in horror as the monster shoots her . The Doctor and Bennett rush to find O ' Donnell dying , and the Fisher King nowhere to be seen . As O ' Donnell dies , Bennett finally realises the list is the order in which they die . When asked who ' s next , the Doctor says Clara is . Bennett laughs , snidely asking the Doctor if getting closer to his name makes him scared . However , the Doctor says he is attempting to save Clara , not himself . Back in the TARDIS , the Doctor attempts to return to the future . TARDIS rocks violently briefly before refusing to move . They exit , finding themselves behind the building the TARDIS originally landed at ; hearing himself asking O ' Donnel where Bennett is , the Doctor realizes they ' ve moved 30 minutes back in time . The TARDIS won ' t let him leave ; he ' s locked in his own time - stream . They find Prentis alive , and the Doctor stops Bennett from trying to prevent his and O ' Donnell ' s deaths ; " " If you save them , then somebody that was supposed to be dead is alive . Then you really ARE seeing ghosts . " " It ' s obvious as Bennett looks at O ' Donnell that he loved her , leaving him saddened . Until past Doctor and Bennett attempt to leave , they have to remain hidden to avoid causing anymore complications via a paradox . Back in the future , O ' Donnell ' s ghost appears and steals Clara ' s phone ; having known about it before dying , she had an advantage that the others ghosts did not . Clara is furious , yelling for O ' Donnel to put her phone back ; however , she then realizes that the ghosts did not attempt to kill Lunn when they were being lured to the Faraday cage . Lunn explains that Cass didn ' t let him in the ship . Clara tells him that means he didn ' t see the writing and does not have the coordinates in his brain . The ghosts won ' t kill him since he won ' t turn into another ghost ; this frees him to get the phone back . Cass is confused , prompting Lunn to translate ; she gives a horrified " no " . She frantically signs , confusing Clara . She asks what Cass is saying ; Lunn says Cass is wondering if travelling with the Doctor has changed her as a person . Clara tells them that her travels with the Doctor have taught her to do what needs to be done , regardless if it might be dangerous . They open the door and Lunn creeps out silently . Clara tells Cass that she doesn ' t need to worry , Lunn will be fine . However , an upset Cass signs something offensive to Clara to voice her anger before going back inside the Farday cage . " " OK , did not need help to understand that one . " " Meanwhile , Lunn finds the phone inside the canteen ; however , this was a trap by the Ghosts to use him as bait to lure in the last two potential victims . When Lunn fails to return , Clara agrees to accompany Cass to search for him . However , they get separated ; Clara wastes a few moments calling for Cass before remembering that Cass is deaf and cannot hear her . Leaving Bennett in the TARDIS , the Doctor decides to go confront the vile Fisher King about the abominations he ' s created and the deaths he ' s violated . Finding the stasis chamber , the Doctor explains the future that the Fisher King engineered . He then comes face - to - face with the monstrous King , who knows that the Doctor is a Time Lord ; he knows that the Time Lords battled so greatly , that the entire universe felt the effects . Hearing to coordinates tick away in the Doctor ' s head , the Fisher King sees that he can make a strong transmitter out of the Doctor ; once enough Ghosts are created , the signal will reach the Fisher King ' s people , who will bring an armada to conquer Earth . The Doctor notes that plan could work , if only he hadn ' t erased the words on the ship . The Fisher King thinks he ' s bluffing ; however , the Doctor points out that any change to the future by preventing the Fisher King from conquer the Earth is better . Angered , the Fisher King decides to hold off on killing the Doctor until he can rewrite the words . Racing back to his ship , the Fisher King discovers that the writing still there . He realises the Doctor tricked him into moving away from the safety of the stasis chamber and has used one of the power cells ( shown as missing in the previous episode ) to destroy the dam wall , flooding the town and killing the Fisher King . Due to the imminent threat of the flood , TARDIS Security Protocol 712 activates with Bennett still inside , but the Doctor ' s whereabouts remain unknown as the town floods . ( Although there is one possibility as to where the old Time Lord went . . . ) After narrowly avoiding being killed by Moran ' s ghost , Clara and Cass regroup with Lunn in the hangar . The Ghosts converge in the room , but suddenly the chamber opens up and the Doctor springs out . " " Don ' t kiss me ; morning breath . " " The Doctor turns on his sonic sunglasses , causing the Fisher King ' s roar to come over the speakers . Clara asks what ' s happening , to which the Doctor explains it ' s the call of the Ghosts master , which is calling them to the source . It turns out to be coming from the Doctor ' s ghost , which vanishes once the Ghosts are all lured into the Faraday Cage . Later , the Doctor has put the sonic sunglasses on Clara to erase the coordinates from her memory ; even though the threat has passed , if she dies and becomes a ghost , that will cause trouble . He then does the same for Cass . The Doctor then mentions that the erase might have affected some of her other memories ( such as addresses and how to eat ) ; he then wonders where Bennett got to as he needs a memory wipe as well . It turns out Bennett is staring at O ' Donnell ' s ghost in the Faraday cage ; he wonders what will happen to them . The Doctor informs Bennett that UNIT will cut the cage out and toss into space , where the lack of a magnetic field will cause the ghosts to die . Bennett asks Lunn to translate that both Cass and Lunn should admit their love to each other . Lunn complies , surprising Cass , who kisses him full on the lips with passion . The Doctor and Clara leave in the TARDIS . The Doctor tells Clara that the order the people would die in was entirely fictional after O ' Donnell , but he placed Clara ' s name second to motivate himself to action . Keeping Lunn off the list was a hint about his immunity to being targeted by the ghosts . Clara asks the Doctor how he knew what to make his ghost ' s hologram say . He informs her that he only knew what he had to do because he found out through future knowledge of what had been done . He begins to explain to her the idea of the bootstrap paradox . . . Story notes . Filming locations . Caerwent Training Area Home video releases . DVD releases . " Before the Flood " was released on DVD as part of " Doctor Who : Series 9 , Part 1 " on November 2 in region 2 and November 3 in region 1 . Blu - ray releases . " Before the Flood " was released on Blu - ray as part of " Doctor Who : Series 9 , Part 1 " on November 2 in region 2 and November 3 in region 1 .