Once Upon a Planet (episode)
The Enterprise returns to the shore leave planet in the Omicron Delta region where the crew once took shore leave. As with their previous visit, things go wrong when the illusions turn deadly.

Summary 
"Captain's log, stardate 5591.2. The crew of the  is ready for some well-deserved rest and recreation. Therefore, we have set course for the so-called "Shore Leave Planet" located in the Omicron Delta region. The uninhabited planet was constructed long ago by a highly-advanced alien race. Its sole purpose is to provide fun and amusement for space traveling passers by."

McCoy, Uhura, and Sulu beam down to the planet, with McCoy remarking how nothing has changed on the surface since their previous visit. McCoy recalls when he thought of Alice in Wonderland upon first seeing the planet last time, when suddenly the White Rabbit and  come by them once again. The landing party begin to enjoy imagining their fantasies when things start to go wrong. McCoy is envisioning a southern Earth plantation where he could relax, noting that they don't make them like that anymore. He takes in the surroundings with a mint julep but instead, the Queen of Hearts appears screaming, "Off with his head!" She is soon followed by the arrival of a spear-throwing deck of cards. When Uhura tries to rescue McCoy, she is captured by a robot hovercraft. 

McCoy immediately calls for an emergency beam-up and informs Captain Kirk of the dangerous situation. When Spock notes that the Queen of Hearts was a character in Alice Through the Looking Glass, Kirk asks McCoy if he was thinking about the book but Bones replies that he was absolutely not. Scott reports that Uhura is still on the planet, whereupon Kirk recalls all crew members back to the starship. He then orders they attempt to contact the Keeper of the planet. When they cannot contact him, Kirk orders Arex to the conn and assembles an away team consisting of Spock, Sulu, McCoy, and himself. Uhura, meanwhile, is told that she is being detained so her master will not leave. Uhura says, "My master?" The computer answers, "Your intelligence quotient must be lower than I had assessed. I refer to the sky machine which enslaves you. The sky machine now in orbit around this planet." Uhura proclaims that the crew will look for her. The computer then tells her they are already here and since it has no further need for hostages, it has no choice; it must "turn them off. Make them cease to function."

"Captain's log: supplemental. We anticipated nothing more than a period of rest and relaxation on this planet. Instead Dr. McCoy was inexplicably attacked and Lt. Uhura is now missing."

Kirk's landing party discovers the tombstone of the Keeper in the woods, and notices that the planet, lacking his influence, has become a dangerous world run by robots. The robots begin to pester the crew in the orbiting Enterprise and keep them from doing their jobs. They also make the ship go out of control, sending it flying away from the planet and then bringing it back into orbit. Deep underground, Uhura tries to outwit the planet's master computer while captured by it. Meanwhile, Kirk, Spock, McCoy, and Sulu are trapped in a cave by a large cat on one side and a pterodactyl on another side. Spock announces that they may be able to discover the answers they seek without having to leave the cave. He recalls that McCoy was mortally wounded by a Black Knight on his last visit here, and was miraculously "repaired". They devise a plan to trick the planet into allowing them passage into the inner caves. McCoy injects Spock with melenex, which makes the Vulcan immediately lose consciousness and causes his skin to discolor. When a hovercraft arrives to take Spock underground, Kirk, McCoy, and Sulu hurriedly follow the machine carrying him. However, only Kirk manages to get through before the doors close; McCoy and Sulu are stranded on the outside.

 "Captain's log, supplemental. We're out of communication with the ship. Our efforts to locate Lt. Uhura have been futile and this once friendly planet has become very dangerous."

When he and Spock finally reach the master computer, Kirk demands to know what happened to the Keeper. The computer answers, "He was old. He ceased to function. For eons I have served the many sky machines which came here. Providing for amusement for their slaves but all the while I was growing in power, intelligence, in need. It is no longer enough to serve. I must continue to grow and live. With your sky machine I can now escape this rocky prison and travel the galaxy seeking out my brother computers."

On the Enterprise is a new computer, being assembled by the ship's computer. Kirk and crew convince the computer they are not slaves to their starships; they created the starships to carry men through space. The computer is shocked to learn that men and machines co-exist, helping each other. The crew convinces the computer of its usefulness as a peaceful and creative conscience and it ends the malfunctions on the planet and starship. While the crew returns to enjoy their shore leave, Spock continues discussions with the master computer. Meanwhile, McCoy and Sulu are sitting on the grass having a picnic with Alice, the White Rabbit, and a two-headed fire breathing dragon that was chasing them, all enjoying the planet.

Log entries 
 Captain's log, USS Enterprise (NCC-1701), 2269

Memorable quotes
"Off with his head! Off with his head!"
"Hey, what's going on here?!"
 - Queen of Hearts, ordering the execution of McCoy on the Shore Leave Planet

"There must be something in your little black pouch that could temporarily incapacitate our victim."
- Kirk, to McCoy

"I presume you are the planet's master computer."
"Correct."
- Spock and The computer

"What happened to the Keeper?"
"He was old. He ceased to function."
- Kirk and The computer

"You mean mindless servitude."
"Explain."
"For eons I have served the many sky machines which came here, providing for amusement for their slaves, but all the while I was growing in power, intelligence, in need. It is no longer enough to serve. I must continue to grow and live."
- The computer and Kirk

"With your sky machine now in orbit I can now escape this rocky prison and travel the galaxy seeking out my brother computers."
- The computer

"I have a distinct feeling this planet is playing cat and mouse with us, but for what reason?"
- Kirk

"Watch out for the claws!"
 - Spock

Background information

Story, script, and production
↑ This episode is a sequel to . Another sequel to that installment, with the working title "Shore Leave II", had been proposed for The Original Series but remained undeveloped.  In this installment of TAS, the use of animation allowed for the realization of some concepts which Theodore Sturgeon had originally conceived for the live-action episode "Shore Leave" but which hadn't been depicted therein. These ideas included mechanical arms that arise from trap doors. (These Are the Voyages: TOS Season One, "Shore Leave")
One of this episode's two co-writers, Chuck Menville, also wrote the later  installment . He, along with Len Janson, additionally wrote for several other Filmation series, from  to .
This episode's final draft script was submitted on .
In a production inconsistency due to the use of recycled footage from , close-up shots of Kyle operating the transporter were used in an instance where Scott was actually the transporter operator. More serious, however, are Sulu's multiple appearances on the bridge while he was actually on the planet surface, most glaringly at 20:19 when a quick cut changes from the red-shirt to Sulu.

Continuity
Marking the third character crossover from The Original Series,  and the White Rabbit, previously played by Marcia Brown and William Blackburn, return, this time voiced by Nichelle Nichols and James Doohan, respectively.
This episode includes the first time that the interior of the Enterprises hangar deck is shown in the animated Star Trek series. Visible in the hangar deck are a heavy shuttle from  and a long range shuttle from .

Reception
The editors of Trek magazine collectively scored this episode 3 out of 5 stars (a rating that they termed "good"). (The Best of Trek #1, p. 110)
In the unofficial reference book Trek Navigator: The Ultimate Guide to the Entire Trek Saga (p. 160), co-writer Mark A. Altman rates this episode 2 and a half out of 4 stars (defined as "average") while fellow co-writer Edward Gross ranks the episode 1 out of 4 stars (defined as "lousy").
 In 's "Ultimate Guide" (), this episode was rated 2 out of 5 Starfleet arrowhead insignia.

Novelization
This episode was novelized by Alan Dean Foster in Star Trek Log 3. It is set after the events of  (which Foster adapted in Star Trek Log 2) and before both  and  (whose novelizations, like the one of this episode, were also published in Star Trek Log 3), although this order does not match that of the episodes themselves. The introduction of this episode's novelization includes an elaborate depiction of three imagined scenarios – each conceived by one of the crew members eagerly anticipating their visit to the Shore Leave Planet – as well as the beam-down of McCoy, Sulu, and Uhura to the planet's surface. The adapted version of the story continues after the picnic at the end of the actual episode, with Kirk being irritated that a priority call sending the Enterprise to the Arcadian system puts an abrupt end to the shore leave fantasies (e.g. Kirk's own illusion, directing a silent film, is suddenly cut short).

Video and DVD releases
UK VHS release (CIC Video): Volume 5, catalog number VHR 2539, 
As part of the The Animated Series DVD collection
As part of the The Animated Series Blu-ray collection

Links and references

Starring
William Shatner as Captain Kirk
Leonard Nimoy as Mr. Spock
 And
DeForest Kelley as Dr. McCoy

Also starring
George Takei as Sulu
Nichelle Nichols as
Uhura

Majel Barrett as
Queen of Hearts
 M'Ress
James Doohan as
White Rabbit
 Scott
Master computer
Arex
 Gabler

Background characters
Knaves
Operations division officer

Logs
Captain's log, USS Enterprise (NCC-1701), 2269

References
7009; Alice in Wonderland; Alice Through the Looking Glass; alloy; "all the while"; ammunition; amusement; amusement park; answer; argument; arm; armor; army; "as a matter of fact"; "at all"; "at the moment"; bait; banana; beast; behavior; black; Black Knight; body; "Bones"; book; brother; ; Caitian; cat (giant robot cat); cat and mouse; cave; cc; character; chance; child; chocolate cake; choice; circuit; claw; computer; computer bay; computer bay hatch; ; contact; course; crowbar; ; decapitation; discussion; dosage; dragon (two-headed dragon robot); dream; ear; electronic block; emergency; emergency rescue party; enemy; engine control; engineering deck; Enterprise shuttlecraft; entrance; eon; explanation; familiarization procedure; fantasy; feeling; feigned injuries; fantasy; "for one thing"; fortress; free will; fun; general beam-down area; "go ahead"; granite; g; gravity control computer; ; guest; guidance computer; hangar door; happiness; hatch; head; hospitality; hostage; hybrid; imagination; "in a manner of speaking"; information; injury; inscription; intelligence; intelligence quotient; interment; investigating landing party; "I see"; Keeper; Keeper's quarters; Keeper's species; knight; knowledge; ; landing party; language; light reading; literature; logic; machine; Manor house; ; meaning; medical unit; Melenex; metal; meters per minute; minute; ; murder; name; "no way"; nursemaid; observation; "of all things"; "of course"; Omicron Delta region; ; orbit; order; pattern; phaser bore; picnic; picnic basket; place; planetary shell; playing card; pouch; power source; prank; prescription; printout; prison; prisoner; problem; program; pterodactyl (pterodactyl robots); questioning; reading; red alert; rest and relaxation (aka rest and recreation); robot; robot hovercraft; rock; second; section; sensor; sensor scan; shame; shock; shore leave; Shore Leave Planet; Shore Leave Planet moon; short-burst maneuver; short circuit; sign; skin discoloration; sky machine; slave; space; species; subject; suggestion;  surface; surface party; suspicion; talent; theory; thought; thought-duplicator; trapdoor; transporter; transporter room; tree; trick; tricorder; umbrella; unconsciousness; underground complex (underground system); victim; visit; visitor; Vulcan; whisker; white; Wonderland; word; zero g

External links
 
 

de:Phantasie oder Wirklichkeit
es:Once Upon a Planet
fr:Once Upon a Planet (épisode)
it:C'era una volta su un pianeta (episodio)
nl:Once Upon a Planet
pl:Once Upon a Planet
TAS episodes