The Doctor and Martha have stopped off in Milky-Pink City for a holiday but things have gone badly wrong. The resort, populated by robots, eager to please, has not received any visitors for years. As a consequence the robots have fallen out over who should pamper the newcomers and begun to fight. Then, blaming the two holiday makers they have turned on them. The Doctor has managed to escape summary execution by playing the robots a song from Martha’s iPod, setting the whole city dancing. Weaving their way through the exuberant robots they get back to the TARDIS as the Doctor speculates that their hosts will soon begin to start making music of their own.
As they had waited to be executed the Doctor had tried to distract Martha with the tale of the Starship Brilliant which had mysteriously vanished from its maiden voyage. Now she says that she wants to see what happened to it. At first the Doctor is skeptical but eventually accedes to her idea, while still warning her that they are duty bound not to interfere with established historical events. He also points out that being on a spaceship that vanished immediately prior to an intergalactic war could be quite dangerous. Nevertheless he sets the controls…
Martha wakes up in the engine room of the Brilliant. The Doctor is giving her a cup of tea and she remembers an explosion in the TARDIS control room. The TARDIS apparently crashed into the ship, possibly due to an unmentored warp core, the Doctor says. Then she realizes she is being watched by six men in leather aprons and brightly coloured Bermuda shorts. When the Doctor says they are probably more afraid of the newcomers than the other way round Martha reminds him he said the same thing about the lions in Kenya. The Doctor takes her over to thank the men for the tea but they cower in the darkness. To put them at ease Martha uses psychic notepaper to show that they are inspectors looking at the engines. It is at this point that they notice that none of the men has a mouth.
Where their mouths should be are small round holes, possibly to prevent these lowest of the low answering back to any superiors. They are little more than slaves. One of the men gestures for the Doctor to follow him and shows him an inspection window into the engines. The Doctor immediately understands the problem. He says that the experimental drive of the starship is a century ahead of its time. Its technology allows the ship to push against the time vortex and bounce back in and out of the space-time continuum, thereby avoiding the time-consuming business of actually travelling through space. Unfortunately the drive seems to have stalled. The engineers have alerted the captain but not received any answer. The Doctor is still determined not to alter history but agrees to go and speak to the captain for a few minutes.
However, the transmat to the bridge is stuck as if something was coming the other way but very slowly. Walking back past the TARDIS they get to the door out of the engine rooms but they are blocked by something that resembles thick scrambled egg. It is a ‘sort of time fungus’ produced where time chunks don’t meet. The Doctor says that the TARDIS produces a lot of it and that a ship like the Brilliant would too, only it shouldn’t be on the inside. He uses his sonic screwdriver to create a resonance that weakens the substance enough for Martha to push through to the other side.
The Doctor has told her to wait for him and not to wander off. She does this but time passes and there is no sign of him following her through the ‘scrambled egg’. She is on a corridor, varnished wood and plush red carpet, but cramped and not extravagant. After a long while she is confronted by a robot, the starship’s steward, Gabriel. He asks for her room number (she tells him it is 28) when he informs her that stowaways are to be executed. He leads her up to the cocktail lounge. When she protests that she is waiting for a man he tactfully responds that he will return and tell her ‘gentleman’ where she is.
In the cocktail lounge she finds a dozen tubby, tentacled creatures, either orange or pale blue, looking out onto the stars. Despite her friendly overtures they regard her in an offhand manner. Martha obtains a cocktail (all she recognizes is water so she makes do with that) and makes her way to the observation window. She is finally spoken to by an orange alien, Mrs. Wingsworth, who says that people on the ship are unnerved by the fact that the ship has just been invaded. Martha is bemused by the fact that Mrs. Wingsworth finds the prospect of the invaders killing some of the passengers ‘delicious fun’.
Three burly humanoids enter the bar carrying heavy guns. They have crudely painted skull and crossbones on their chests. They shoot Gabriel immediately, obliterating him completely. When they remove their domed helmets Martha is astonished to see that the pirates are all badgers.
When the Doctor comes through the curtain of scrambled egg Gabriel is waiting for him, looking burnt and twisted. He recognizes Gabriel as a Bondoux 56 and immediately strikes up a conversation. He finds that nearly four hours have passed since Gabriel encountered Martha, while to the Doctor it is less than thirty seconds since he saw her. The engine room must be in a different pocket of time from the rest of the ship, and worse, the scrambled egg makes it impossible to go back the other way. Gabriel escorts him to the cocktail lounge where he encounters two badger faced pirates: Joss, a female wearing lipstick, and Archie. They are both surprised to see Gabriel because it was destroyed by Dash when they arrived. The Doctor has barely had time to note that the badgers’ pirate accents are similar to those in old movies when they shoot and destroy Gabriel again.
The Doctor tries to befriend the badgers with a joke that falls flat and is asked where he has just come from. He says he was hiding. Archie wants to kill him but Joss wants to see where and why he was hiding, though if the answers are not to her liking she says that Archie can shoot him. The doctor is confident that he can escape but wants to find out what the badgers are up to. He shows them the door blocked with scrambled egg and when he tells them that the engine rooms are on the other side their eyes light up in a way that shows him they have come to steal the experimental drive. When Archie fails to blast his way in the Doctor tells him that passage through the blockage is only one way. Joss finds it unfair that people could come out of the engine room but she cannot go in so she fires her gun a t the ceiling, bringing down the fire door to block the corridor.
Joss and Archie lead the Doctor to the bar where he recognizes a dozen Balumins being held prisoner by the other badger, Dash. Mrs. Wingsworth approaches to ask if he is Martha’s friend the Doctor. The pirates tell her to be quiet but she carries on talking. As the Doctor explains that this will only antagonize them she agrees, commenting on how boring the badgers are and rolling her eyes (as if it proves the point)while they shoot and kill her.
Three hours earlier. Martha asks the badger that killed Gabriel who he is. He introduces himself as Dashiel. When Martha wonders who would call their child Dashiel Archibald tells her they were grown in a lab. The pirates demand to know where the engines are. The pirates announce that they are the first of a thousand-strong force and Captain Florence will murder all the passengers unless they help. All three are perturbed by the failure of the other 997 to arrive. Their inability to raise Captain Florence on the radio is making them anxious. Dash and Joss leave to search the ship while Archie guards the prisoner.
Martha begins to build a rapport with the badger. He says they are not pirates; Captain Florence says they are venture capitalists. Realising that her guard is not clever or experienced Martha gets him to drink a cocktail in order to get him drunk but he promptly spits it out. Then she offers him something to eat from a tray of canapés. He adores the pineapple and cheese on sticks. This is so much better than his normal diet (whatever is recycled from the toilet) that he cannot hide his delight. She tells him to hand round the canapés to the other passengers which he does, growing more pleased as each alien accepts the food. When Mrs. Wingsworth asks for more Martha apologises, all the food is gone, but then Archie produces the tray and it is mysteriously full again.
Before Martha can solve this puzzle Dash and Joss return. They have failed to get access to either the bridge or the engines. Archie introduces them to the canapés and they too are astonished by the idea of food that is actually pleasant to eat. Unfortunately this sets Mrs. Wingsworth laughing. She insults them by saying that they were grown for menial labour and shouldn’t expect anything nice to eat. This gives them the excuse they need and they kill her where she stands.
Three hours later. The Doctor notes that the other Balumins are not really upset by Mrs. Wingsworth’s death. He quickly establishes that the badgers are after the experimental drive. He tries to engage them in drinks but they suggest he tries a canapé. Archie recommends the ‘ones with sticks’ but adds the fact that the sticks are not edible. The Doctor also notes that the tray of food is replenishing itself without anyone noticing how. Mrs. Wingsworth returns to the bar but nobody is surprised to see that she is no longer dead. When the Doctor asks her she says that every time they kill her she wakes up in her berth. She also complains that the berths are not as luxurious as she was promised and very cramped. Archie is disgruntled that the Balumin keep coming back to life. He says that Martha was better because she stayed dead.
Three hours earlier (continued). After the murder of Mrs. Windsworth another blue alien was killed. Martha had grabbed a gun from Joss. She suggested that the other pirates were not coming and that these three were alone, causing them to feel anxious and afraid. When Mrs. Wingsworth sauntered in the badgers and Martha were equally amazed. Archie used the diversion to regain the gun. Dashiel shot at Martha but she held up the silver canapé tray reflecting the blow at Joss, killing her instantly. She fled down to the engine room but was cornered there by Archie. After a brief struggle she realized she had been stabbed with a dagger and promptly died.
The Doctor wants to see Martha’s body but he is told it has gone. Mrs. Wingsworth tells him it is what happens which he takes to mean it was put overboard for health reasons. He imagines the anger and resentment of her family when he returns to tell them the news. Resolving to get on with things he sets off to find the Brilliant’s captain. Dash reminds him that he is a prisoner The Doctor says he needs to sort the mess out and scornfully points out the pirates’ lack of achievement. Dash says that he has killed a lot of aliens (and does away with another to prove his point) but they won’t stay dead. The Doctor, tired of this, offers to fix their guns so that people stay dead. Using his sonic screwdriver he offers to change their guns’ settings. Dash doesn’t trust the Doctor but consents to use the device himself. However, when they shoot some Balumin to test the guns they don’t work at all. The Doctor tells Dash that he disabled the power cells, causing the badger to rush at him with a dagger. The Doctor sidesteps and Dash knocks himself unconscious when his head hits the observation window.
The Doctor sets off to the bridge, taking Mrs. Wingsworth with him. Archie comes too. On the way they pass the pirates’ boarding vessel, lodged in the hull of the ship and surrounded by the sealant which the ship uses to close up damage. The Doctor is impressed by the small maneuverable craft and wonders what became of the rest of the attack force. In the glove compartment are eight gold earrings like those that the pirates are wearing. The Doctor tells Mrs. Wingsworth that there was a tradition for old time pirates to wear such things so that when they died their colleagues could claim the earring if they provided a decent burial. Archie says Martha didn’t have an earring so he took her key and shows the Doctor a TARDIS key on a chain. The Doctor takes it and says he intends to find Martha’s body. Mrs. Wingsworth says there isn’t one to find. She says that when she dies she wakes up again in her berth and Archie adds that when the pirates die the end up back at their shuttle.
This is a surprise to the Doctor, who thought that the Balumin had some sort of regenerative metabolism but Archie tells him that after Joss was killed her body vanished as if by transmat when no-one was looking and she woke up where the Doctor is standing. After that the pirate badgers killed each other for a while to get the earrings that re-appeared in their ears even if they had been taken out. The Doctor turns and runs towards the engine rooms.
He uses his screwdriver to raise the fire door a couple of feet and rolls under it before throwing himself into Martha’s arms. Gabriel is with her. The Doctor returns her TARDIS key while pondering on what is going on. He knows that when anyone dies they return to a start point like a player in a board game. It is the same technology and principle as the self-replenishing canapés. The Doctor thinks that the ship is in an incomplete time loop and keeps skipping the missing part. It tries to restore things but occasional imperfections creep in: the extra pirate earrings, a scar on Martha’s stomach where she was stabbed, damage to Gabriel. The problem is that every time it repairs damage it has to use energy. When the energy runs out the starship will explode. The Doctor resolves to find the captain.
In the crew quarters Martha sees the pirate car next to the gash in the ship’s side. She can’t help but think of the sailors sucked into space before the seal was complete. Archie is actually sorry about that now. Gabriel tells the Doctor that the officers are on the bridge, in a protective capacity. Martha is outraged that the passengers were left at the mercy of the pirates. When Gabriel opens the door there is another scrambled egg barrier in the way. The Doctor sets about removing it. This time Martha insists that she step through it together with the Doctor. When they do, however, they step into a wall of electricity and are gone.
When they wake up the scar on Martha’s stomach has gone but they are still on the bridge. The officer’s, all extremely handsome, are disappointed that they survived. The Doctor and Martha are trapped between the walls of scrambled egg and electricity. The captain, a beautiful woman of indeterminate age, is surprised by their human appearance. She speculates on ways of killing them but the Doctor points out that he knows a lot and could be very useful. The captain considers this and allows them to come through to the bridge where the Doctor takes an interest in the computer screens. On one of them he can see the pirate ship, a huge vessel with spikes that Martha assumes to be weaponry. It is surrounded by tiny droplets, frozen in time. The Doctor can see something ‘beautiful’ that the crew cannot. He tells them to broaden their perspective to show Kodicek fluctuations above zero point one. Doing this shows the pirate vessel and the droplets (actually hundreds of boarding vessels) caught in tendrils of a pink-blue haze, a stasis wave. The Doctor thinks that the new drive was employed to evade the pirates attack and the ship is now caught in a loop. The crew is surprised to find the door blocked by the scrambled egg and by the fact that they are in a time pocket. To them it is only four minutes since the attack began. To them the rest of the universe looks frozen, to the universe it appears that the Brilliant simply vanished.
The Doctor is just telling them that they cannot escape when there is a crash and the three badger pirates burst through the barrier. They say they were worried about the Doctor because two days for them have passed since he left them. The captain notices their weapons, which the Doctor says don’t work, just as the pirates start indiscriminately killing the humans. A full scale battle begins in the bridge and the Doctor and Martha leap into the transmat cabinet. As the Doctor expresses his shock that it is still working the combatants wipe each other out. The Doctor says they will all be alive again soon but he has a plan to stop further fighting.
Coming back out of the transmat booth they are confronted by wreckage and charred corpses but as soon as they turn their backs the ship discreetly corrects the situation: the bridge is pristine and the crew and pirates are sitting in captivity between the restored electric barrier and the wall. Trying to force their way through the electricity they find it is now a force field and the Doctor tells them he has made some changes. He then proceeds to collect all their weapons and turn them into a Teasmade. He asks the badgers how they got through the scrambled egg. They tell him that Archie knew they had to make vibrations so they requested Mrs. Wingsworth to ask Gabriel to create a device that would resonate enough to allow them through.
The captives demand to be released but only the badgers have learned enough to ask nicely and are soon freed. They concede that they broke onto the bridge to avenge the Doctor and Martha’s perceived deaths which they now admit was wrong. The Captain, Georgina Wet-Eleven, can’t understand why he is taking the badgers’ side over the humans when he knows that they are a specially created slave race like the mouthless men in engineering. The badgers were created to do the thieving required by a faction that saw the war coming. Like all extinct species on Earth, their DNA was collected for one day being recreated but less scrupulous minds have been using the genetic information. He also points out that the Starship Brilliant is an experimental vessel disguised as a luxury cruise liner. The passengers are not human, therefore their berths are more cramped than the crew’s quarters and the crew’s first thought when the pirates attacked was not to save the passengers but to defend the ship.
Dash asks if he can get in touch with the pirate ship Mandelbrot Sett but the Doctor says they are in another time zone. Archie and Joss are pleased because Captain Florence would not be happy with what has been going on. The badgers produce the empty silver trays that held the canapés. Once everyone has closed their eyes the trays are replenished. Once Archibald has handed some around to the Doctor and Martha he heads off to the imprisoned Captain Georgina. When she accepts this offer the Doctor decrees that a truce has been declared. The crew is released and a pleasant party atmosphere soon develops.
Nevertheless, the Doctor is still worried. He discusses the energy drain on the ship’s engine created by the imperfect time loop and the eventual implosion of the ship. He thinks he can get them out of the loop but that would deliver them to the pirate ship and Captain Florence does not take prisoners. He is also worried that saving the ship will change established history. To do anything, however, he needs to get to the engine rooms. He reprograms the Brilliant’s engines from the bridge then declares he needs to use the transmat to get to the engines. With the time differential in place it will be a long and painful journey.
So painful that a human would have died, the Doctor experiences agony in the transmat but ultimately arrives in one piece. As he steps from the booth he sees himself leaving the engine room through the wall of scrambled egg. After a cup of tea from the mouthless men he sets about examining the instruments. Then he re-enters the TARDIS with the intention of using it to nudge the Brilliant out of the loop, which is when a brilliant idea strikes him. Pulling cables from beneath the grating in the floor he connects them to the starship’s engines, with some help from the engineers. He offers them a ride in the TARDIS as he sets off to complete the next part of his plan but they refuse to cross the threshold. Taking off with the doors open he makes a short hop but when he rematerializes things are not as he expects. The engine room is empty of engineers, the experimental drive has been stolen and the walls are a mish-mash of space-car sized sealant patches. He realizes he is running late, the pirates have been aboard, and the engineers are dead. Locking the door of the TARDIS he rushes off to find Martha.
The scrambled egg has vanished. The starship is littered with dead Balumin. The bridge has been smashed and human corpses, including the captain, are strewn around. Only Mrs. Wingsworth survives, saying that Martha told her to find the Doctor and that everyone was killed by the pirates and nobody has come back to life.
After the Doctor leaves the bridge the frozen image of the pirate ship on the screens begins to move. Archie tries to deflect the assault by telling his captain, over the intercom, how good life is on the Brilliant but dozens of space cars smash into the starship. Crew tumble out into the vacuum of space and Martha is rescued from a similar fate by Mrs. Wingsworth. The horde of pirates begins a spree of pillage and murder as they invade. Martha is tracked down and dragged to the bridge where Dash and Archie are trying to explain the miracle of the replenishing food, without success. Corpses litter the bridge and Martha realizes the first three badgers are now prisoners. Dash is executed, Captain Georgina forces the pirates to kill her, and Martha is put into a space car, as are Joss and Archie. Martha pleads for the rest of the human crew to be shown mercy and the pirates agree not to shoot them but reverse their cars out of the hull causing the humans to be sucked out into space.
Martha realizes on the journey across that the pirate ship is much larger than she had imagined, the weapons she thought were spiking out of the hull are vast towers as big as the hospital where she had worked. They land inside a hangar deck and are taken by lift to Captain Florence’s command centre. They arrive in time to see the pirate ship fire a beam of energy into the Brilliant, blowing it to pieces.
The hangars of the Mandelbrot Sett have room for a million space cars, though enough have been lost to leave spaces. The TARDIS materializes into one of these. He Doctor and Mrs. Wingsworth emerge and meet two sentry badgers. The Doctor cheerily tells them he has an appointment with the captain. This confuses the sentries enough to let them pass through to the lift and on to the bridge. On the way up Mrs. Wingsworth tells the Doctor that, unlike the other Balumin, she was not trying to escape the war but was getting away from her family who have always treated her as a rather dull and uninteresting creature. When the Doctor points out all the amazing things she has done recently she says her family wouldn’t be interested and he sympathises, remarking that nobody chooses their family and the achievement is surviving them, sometimes.
They arrive on the bridge at the moment the Brilliant is destroyed and hear Martha’s distraught shout that the pirates have killed the Doctor. He contradicts her with a cheery comment that they missed and announces that everything will be sorted out. Captain Florence steps forward and punches him to the floor but he responds by telling her he has come to offer them all a better life. Her immediate reaction is to kill Mrs. Wingsworth and then have her crew track down the Doctor’s vessel which she orders to be jettisoned and used for target practice. Archie has tried to intervene, explaining the wonders of food that actually tastes nice and Captain Florence demands to know about canapés. Archie struggles to explain further until Captain Florence reminds him that the Brilliant and its wonders have been destroyed, and then she shoots him in the back.
Martha is shocked but the Doctor tells her everything will be all right.
He asks the Captain what her clients will do when they find out that the Brilliant has been destroyed. She laughs and says they have taken the experimental drive. The Doctor tells her that what they took was the control panel and that the drive itself was a huge engine inside. The Captain says her orders were to get the drive or blow up the ship and she has done both. The Doctor pours scorn on this. He tells her that the information she has makes her dangerous to her clients and they will be killed after they report back; they used badgers to do their dirty work because they are seen as a worthless life form. He tells her to take the money they have already been paid in advance and make a run for it but Florence says they haven’t been paid anything yet. This seems to underline the Doctor’s point.
This angers the Captain so much that she lunges at the Doctor but he dodges away. When she reaches for her gun he shows her that he has taken it. She expects him to shoot her but he offers her another way. He asks how badgers settle disputes and she suggests a duel. She draws her dagger and the Doctor pulls out a similar one that he took from Dash earlier.
His nimble footwork make Florence seem slow and clumsy and over the course of the duel Martha notices the badger crew are switching allegiance to the Doctor. After one particular struggle he throws her to the floor and when she stands up her dagger is protruding from her chest. Despite his offer of help Martha can see that the Captain is moments from death. Florence grabs a gun from one of her crew and tells the Doctor he can live if he kisses her boots. He merely asks Martha what time it is. She tells him it is twenty eight minutes past four. He turns to Florence and says if she strikes him down he will return more powerful than before. She shoots him.
He wakes up with Mrs. Wingsworth offering him a cup of tea in the engine room of the Brilliant. The TARDIS is there as are Archie, Dash and the engineers. He says he is relieved because he hadn’t been fully certain that his plan would work.
On the badger ship Stanley has assumed command and orders Martha and Joss to be shot. None of the pirates’ guns will work. This is when they notice that the Captain’s body has vanished and the Starship Brilliant reappearing in space in front of them. The Doctor hails them and tells the badgers to come over for a party. Captain Florence arrives on her bridge once more. Martha realizes that the Doctor didn’t jump them out of the time loop as she had thought but made it larger to include the pirate vessel. She tells Captain Florence that there is nothing she can do to harm them now. The Captain agrees and says she might as well go to the party with them, but Martha needs to show her how to eat canapés.
The party is a great success with humans, Balumin and badgers getting along well. The Doctor tells Martha that he used the TARDIS to complete the loop and that things will say this way forever. If people die they will come back every hour or so and if food runs out it will be replaced. Later, however, he tells her he is going to leave. Martha asks what will happen to the creatures that stay and he tells her that they will never escape. He decides to offer them a choice. He informs them that he is leaving and he will take anyone who wishes to return to the life of the universe, with death and war on the way, but with things getting done. He lets them know that if they choose to stay they will live on in safety forever but never know anyone or anything outside the confines of the ship. It is their choice and they have one hour to make it. Then he leads Martha in one last dance.