The Practical Joker ( episode ) After passing through a strange space energy cloud , the " Enterprise " s computer gains an artificial intelligence that is relentlessly bent on making practical jokes on the crew . Summary . The is soon attacked and damaged by three Romulan vessels lying in wait on the far side of the asteroid . Scotty wants to fight but since they are outnumbered and their shields are unable to withstand another attack Captain Kirk thinks that discretion is the better part of valor . When Uhura establishes contact , the Romulan Commander claims the Federation vessel had trespassed into Romulan space in defiance of their own treaty . Kirk claims they did no such thing and he will file a detailed report with the Federation . The Romulan tells Kirk that the punishment for such a transgression is death . Kirk leaves and the Romulans go after him . Sulu reports an unidentified energy field has appeared in their path and the captain thinks it is just the thing to shake the Romulans . He then orders the crew to batten down , they are going through . The " Enterprise " manages to shake the Romulans , but unknown to the crew , a cloud enters the " Enterprise " s computer systems . They leave , and Scott gets to work repairing the damaged systems . As the crew toasts their narrow escape , their glasses leak , and Dr . McCoy comments that they have a practical joker in their midst . Then , during the dinner , Kirk ' s silverware bends . Spock is embarrassed when a new microscope that has suddenly appeared at his science station leaves black rings around his eyes , Scott is pelted with fruits and pies from a food synthesizer , much to the amusement of Arex and M ' Ress and Kirk discovers a message on the back of one of his clean uniforms that reads " Kirk is a jerk . " The situation puts the entire crew on edge . They discover the source of the jokes when outrageous laughter is heard over the ship ' s intercom . Spock pinpoints the source as the " Enterprise " itself . Kirk orders all hands to their stations to get to the bottom it . M ' Ress reports that Sulu , McCoy , and Uhura are inside a recreation room and do not answer the call to station . The three officers however , don ' t hear the call . Kirk realizes that the three crewmembers have been trapped and orders Scott to shut down the computer ' s logic circuits . Kirk then orders the computer to release the trapped officers and is shocked when it tells Kirk to say " " Please . " " Scott meanwhile , is unable to shut down the logic circuits because the gravity has been shut off . Spock thinks if Scott backs off , the computer will feel less threatened and it works . Spock figures out that the subatomic particles from the energy field have invaded the computer circuits much the same way bacteria infect living matter . As a result , the " Enterprise " is having the electronic equivalent of a nervous breakdown . In the recreation room , the three officers are subjected to a snow storm and are freezing to death . Soon the bridge ' s air is replaced by laughing gas , which causes pain to Vulcan s . The ship finally releases McCoy and the others from the recreation room and Kirk lets them know how good it is to have them back , alive and well . Sulu reports that the navigation controls are not responding but they are coming about to a new heading , right into the Neutral Zone . This provokes another Romulan attack on the " Enterprise " . The ship then plays a practical joke on the Romulans by creating a giant balloon shaped like the " Enterprise " out from the shuttlebay and tricks them into firing on it , knowing they fear disgrace more than death . The " Enterprise " escapes , but the furious Romulans give chase . Kirk appears to be very concerned about passing through the same energy field they previously encountered , and cries out in terror when the ship changes course to do so . This is all a ruse , however ; Kirk has guessed that another pass through the cloud might reverse the effect on the ship ' s computer , and was only pretending to be afraid . The computer is returned to normal , after a final statement from the Practical Joker : " " You tricked me Kirk . How could you ? " " Spock reports that all effects have been reversed . Uhura reports strange transmissions from the Romulan warships , which followed them through the field . It seems they are beginning to be affected by the same symptoms as Kirk ' s crew was . McCoy asks , " " Should we tell them how they can reverse the effects of the field , Jim ? " " Kirk says , " " Yes , but later . Let ' s not spoil their fun just yet , " " and everyone on the bridge gets a good laugh . Memorable quotes . " " A cold - blooded ambush ! Let ' s give the heathens a fight they won ' t soon forget ! " " " " Go ahead and laugh ! Big joke ! I ' ll bet you two are responsible for this , eh ? " " " " Hey , wait a minute ! We didn ' t cause this to happen ! " " " " Tell that to the captain ! I ' m reporting the both of you just as soon as I . . . ! " " " " Captain , crewmembers McCoy , Sulu , and Uhura are still in the recreation room and do not answer the call to stations . " " " " Spock , quiz the central computer about McCoy and the others . " " " " Yes , captain . Question : why are we unable to communicate with crewmembers McCoy , Sulu , and Uhura ? " " " " Answer : that is for me to know and for you to find out . " " " " Did I hear that right ? " " " " Affirmative . The dysfunction is more severe than I thought . " " " " Okay , whoever you are ! So we fell for your juvenile joke ! Now get us out ! ! " " " " I order you to release crewmembers McCoy , Sulu , and Uhura immediately . " " " " Say please . " " " " P - l - e - a - s - e . " " " " Say . . . pretty . . . please . . . with sugar on . " " " " Time for a nap , old girl . Captain ' s orders . " " " " We ' re giving it a mighty go with the crowbars though ! " " " " It ' s no - o - t fair - r - r - r - r - r . . . " " " " Turn off those food synthesizers ! We ' re knee - deep in desserts and they ' re still pouring out ! " " Links and references . References . Arex and M ' Ress ' lunch ; ambush ; apple ; audio tape ; bacteria ; balloon ; banana ; ; blizzard ( whiteout ) ; bluff ; " Bones " ; crowbar ; dessert ; energy field ; ; fog ; food synthesizer ; fork ; general alert ; grape ; grilled cheese ; heathen ; " Henry IV , Part I " ; humidification system ; ice ; kidnapping ; knee ; laughing gas ( nitrous oxide ) ; logic ; main computer ( aka central computer ) ; nap ; nervous breakdown ; odds ; officer ' s mess ; orange ; pear ; pie ; pineapple ; pitcher ; platter ; polarity reversal ; power tool ; practical joke r ; recreation room ; Romulan s ; Romulan battle cruiser ; Romulan Neutral Zone ; rye ; Saurian brandy ; seagull ; scatterbrain ; service chute ; snow ; space dust ; Spanish language ; subatomic particle ; sugar ; swim ; table ; toast ; trap ; trespassing ; trick glass ; type 4 asteroid ; Vulcan s ; vulture ; walk ; woods Unused references . Hot fudge sundae ; Vending machine ;