!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ! X-Files Interactive Fiction ! ! Written by Tom Beadle for CIS 490a - Prof. Maxim ! ! X-Files is based on characters created by Chris Carter ! ! I have not asked for permission to use the characters, ! ! but I am also not going to distribute this for profit ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Constant Story "Examination"; Constant Headline "^An Interactive Fiction game by Tom Beadle ^Based on characters created by Chris Carter^^"; Include "parser"; Include "verblib"; Include "grammar"; Attribute credit; [ JimmySub; "How on Earth would you do that?!?"; ]; !!!!!!!! !! Verb used to jimmy the front door of the house with a credit card. (open door will also work) Verb "jimmy" * noun -> Jimmy * noun "open" -> Jimmy * "open" noun -> Jimmy; !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ! The objects used when Mulder is outside of the house ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!! !! Start the game outside in front of the house [ Initialise; location = outside; print "^It's a beautiful summer day in D.C. The sun is shining in the blue sky, but Mulder's world will be gray until he finds out what happened to his partner. Fortunately, he has received a lead on her whereabouts leading him to this place.^^^"; ]; !!!!!!!! !! Setting for initial location--outside the house Object outside "Outside" has light with name "outside", description "The beat-up house you're standing in front of seems abandoned, but for some reason, it does seem like someone's been here recently. ^The shades are drawn on all the windows making it impossible to peer in."; !!!!!!!! !! Mailbox that is outside the house !! The player has to "go" to the mailbox in order to look at the mail in it. Object mailbox "mailbox" outside has supporter static enterable with name "mailbox" "mail-box" "box", initial "There's an overstuffed mailbox on the side of the road.", description "The mailbox is overflowing with mail. Whoever lives here must not check it too often.", before [; Enter: if(player notin mailbox) { move player to mailbox; "You mosey on up to the mailbox."; } else "You're already there."; ]; !!!!!!!! !! The mail contained in the mailbox !! The player can not examine it if he is not at the mailbox. !! In the mail will be the credit card to be used to open the front door Object mail "mail" outside has concealed static with name "mail" "letters", description [; if(player notin mailbox) "You don't have good enough eyes to see the mail from here."; else "You begin to peruse the mail and see an assortment of items, from 'Victoria Secrets' catalogs to 'The Journal of the American Medical Association'. It seems like the intended recipient likes to use plastic to buy things from all the credit card bills and pre-approved credit cards he's receiving."; ], before [; Take: "You can't take all of the mail with you."; ]; !!!!!!!! !! Credit card that will be used to open the front door !! Player can not see it unless he is up to the mailbox !! Player can only take one card !! Credit attribute is used to signify that the player has a credit card Object credit_card "credit card" outside has concealed with name "credit" "credit-card" "credit-cards" "card" "cards", description [; if(player notin mailbox) "Where do you see that?"; "Those look kind of handy, now, don't they?"; ], before [; Take: if(player notin mailbox) "What are you talking about? There's none of those here!"; if(player has credit) "No more than one per person please!"; else give player credit; move credit_card to player; "You take a credit card from the mail. Isn't that a felony?!? Oh well, as long as you don't use it to buy those videos that you like, Mulder."; Drop: if(player has credit) { give player ~credit; "You drop off the precious plastic that you had so wrongfully stolen."; } "You don't have any credit-cards."; ]; !!!!!!!! !! The front door of the house !! The door is initally locked but can be "jimmy"'d open if the player has a credit card !! If the player opens the door, he enters the front room of the house Object front_door "front door" outside has static enterable supporter with name "door" "front-door" "house" "front", initial "The front door of the house is closed to the public.", description "The door seems to be locked to keep people like you out. But you sure would like to see what's inside.", before [; Enter: if(player in self) "You're already at the front door. You had better hurry up and do something before the owner comes home."; move player to front_door; "You quietly wander up to the front door of the house."; Jimmy, Open: if(player hasnt credit) { if(player notin self) "Even if you had a card in hand right now, you couldn't jimmy the door from way over here."; "You dont' have any credit-cards right now."; } if(player notin self) "You can't do that from way over here."; print "You with your FBI skills manage to jimmy open the door and walk in to the old house.^"; PlayerTo(front_room); rtrue; ]; !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ! The objects for the first room once Mulder is inside the house. ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!! !! The front room of the house that is entered when Mulder comes in the front door of the house Object front_room "Front Room" has light with name "front room", description "The front room of this house seems pretty normal with some nice furnishings."; !!!!!!!! !! A tv located in the front room used basically for scenery. Object tv "tv" front_room has static with name "tv" "t.v." "television", initial "A blank big-screen tv is positioned against one wall.", description "This sure would like nice in your apartment."; !!!!!!!! !! A shelf located next to the tv that holds a huge amount of videotapes Object shelf "shelf" front_room has static supporter with name "shelf" "bookshelf" "videoshelf" "shelves", initial "Near the tv there are a few shelves loaded with videotapes.", description "The shelves contain apparently every episode of some show you've never heard of: The X-Files. They look kind of interesting."; !!!!!!!! !! A videotape of X-Files episodes. There are many located on the shelf but only one can be !! taken at a time. Object video "X-Files video" front_room has concealed with name "video" "tape" "videotape" "x-files" "tapes", description "There appears to be a couple of episodes of this 'X-Files' show on each tape. They look pretty good from the cover of the tape.", before [; Take: if(parent(self) == player) "The owner might notice if you take more than one tape. You don't want to do that."; move self to player; "You pocket one of the tapes as a souvenir to check out later."; ]; !!!!!!!! !! A couch located across from the tv that Mulder is allowed to sit in. !! He is not allowed to take it with him, but is allowed to move it in the room, uncovering a !! a trap door beneath it. The general attribute is set if it is covering the trapdoor. !! The end table at the end of the couch must be moved (its general attribute not set) in order !! to be able to move the couch. !! Mulder is not able to move the couch back to its original position when the trap door is !! open (its enterable attribute is set). !! Looking under the couch while it is covering the trapdoor gives a hint that there is !! something under it. Object couch "couch" front_room has static enterable general, with name "couch" "love-seat", initial "Pushed in a corner is a nice couch that looks pretty comfortable.", description [; if(self has general) "It's kind of weird that the couch is off-centered from the tv, don't you think?"; "The couch is in a much better spot to watch tv than it was originally."; ], before [; Enter: "You take a nice, cozy squat in someone else's couch for the time being."; Push, Pull: if(endtable hasnt general) { if(self has general) { give self ~general; give trap_door ~concealed; "You move the couch over a bit and uncover what appears to be a latched door in the floor, kind of like a trap-door."; } else { if(trap_door hasnt general) "You can't move the couch over the trap-door while it's open!"; else { give self general; give trap_door concealed; "You move the couch back to where it was originally covering the trap-door."; } } } else "You'd be able to move the couch a bit if that end-table weren't in the way."; LookUnder: if(self has general) "You see something kind of interesting under there, but you can't quite tell what it is."; Take: "What? Are you going to just strap it on your back or something?!?!"; ]; !!!!!!!! !! An endtable located at the end of the couch. !! It must be moved (have its general attribute not set) before the couch can be moved !! It can not be moved back if the couch is already moved out (has its general attribute not !! set). Object endtable "end-table" front_room has static general supporter with name "end" "table" "endtable" "end-table", initial "At the end of the couch there's a nice little end-table, perfect for holding a Dr. Pepper while watching tv. Too bad you don't have any right now.", description [; if(self has general) "The table is situated right next to the couch, waiting for someone to use it. But remember, Mulder, you have a job to do."; "The table is moved a little off to the side so that it's not right next to the couch any more."; ], before [; Push, Pull: if(couch has general) { if(self has general) { give self ~general; "With your huge muscles, you drag the table away from the couch out into the middle of the room."; } else { give self general; "You manage to push the little table back to its original position next to the couch."; } } "You can't quite reach to put the table back in its original position because the couch is moved in your way."; Take: "You don't need another end-table in your apartment."; ]; !!!!!!!! !! A trap door leading down into a basement located underneath the couch when the player enters !! the room. !! It is inaccessible until the couch is moved. It must then be opened in order for the player !! to go downstairs. !! It is hidden until the couch is moved. Object trap_door "trap door" front_room has concealed static general, ! has general attribute when door is closed ! has enterable attribute when you can enter it with name "trap-door" "trap" "door" "latch" "trapdoor" "stairs", initial "There is a trap-door beneath where the couch used to be.", description [; if(self has concealed) "You can't see any such thing."; else { if(self has general) "I wonder what's behind door number 2."; "You see a stairway leading down in to a secret area of the house."; } ], before [; Open, Pull: if(self has concealed) "You can't see any such thing."; else { give self ~general; give self enterable; "You open up the sqeaky door hoping nothing bad is waiting behind it. There appears to be a stairway leading downstairs."; } Close, Push: if(self has concealed) "You can't see any such thing."; else { give self general; give self ~enterable; "You close the trap-door, too scared to see what's down there."; } Enter: if(self has concealed) "You can't see any such thing."; if(self hasnt enterable) "You, unlike some extraterrestrials, can not go through closed doors."; else { print "You manage to get your whole body through the trap-door in the floor and wander down the stairs in to another room.^^"; PlayerTo(basement); rtrue; } ]; !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ! The room Mulder enters after going down the stairs under the trap door ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!! !! The main object for the basement--just gives a description of the room that is entered. Object basement "Basement" has light with description "The basement room that you're in is lit, but there is a doorway in to complete darkness in the next room. This room seems sort of like a laundry room for the owner. There is a washer and drier as well as a door to the hamper for dirty clothes. A refrigerator is located across the room for refreshments."; !!!!!!!! !! A washing machine and drier located against one wall of the basement. Gives a brief !! description of the gown and costume lying on them. Object washer "washer and drier" basement has concealed static with name "washer" "washing-machine" "drier" "clothes", description "You see a washer and drier off to one side of the room with some interesting clothes laying on them. There's a white doctor's gown but there's also the most realistic-looking alien costume you've ever seen. Seems kind of strange, doesn't it?"; !!!!!!!! !! The gown and costume object that is located on top of the washer and drier. Only described !! to give some description of the basement. They may not be taken with the player. Object costume "gown and costume" basement has concealed static with name "gown" "costume" "alien" "doctor", description "It's kind of eerie to see a doctor's gown and an alien costume together. You wonder what could they possibly have to do with each other.", before [; Take: "You had better not take those out of here. They could be used for evidence of something later."; ]; !!!!!!!! !! A refrigerator object in the basement. It contains one can of Dr. Pepper at the beginning !! of the game. It can be opened and closed to take or put back the can. The can will be !! used by the player to stand on in order to get into the "hamper". Object refrigerator "refrigerator" basement has concealed static container with name "refrigerator" "fridge", description [; if(self hasnt open) "The refrigerator next to the washing machine is closed at the moment. I wonder what good stuff is inside!"; "The fridge is open and gives you the reassurance you need: a refrigerator containing nothing but a single can of Dr. Pepper. Just what you need in a time like this."; ], before [; Open: if(self hasnt open) { give self open; if(parent(pepper) == refrigerator) "You open the refrigerator to see it holds one can of Dr. Pepper. Doesn't it seem weird that whoever lives here knows exactly all the things that you like?"; "You open up the now empty refrigerator."; } else "It's already open, Einstein!"; Close: if(self has open) { give self ~open; "You close the refrigerator."; } "It's already closed."; ]; !!!!!!!! !! A can of Dr. Pepper initially located in the closed refrigerator. It will not be recognized !! by the Inform interpreter until the refrigerator is opened. It can then be "taken," !! "drank," or "put back". !! The general attribute is set when the can is full and is removed after the player drinks it. !! The "drop" procedure is executed when the user puts the can on the floor so that he can !! stand on it to crawl into the "hamper". It is not given a supporter attribute at this !! point because I have made it so that the player can just "go hamper" once the can is on !! the ground (parent(pepper) == basement). Object pepper "Dr. Pepper" refrigerator has concealed general with name "Pepper" "Dr.Pepper" "Dr." "can", description [; if(self hasnt moved) "There's a can of cold Dr. Pepper in the fridge."; "That can of Dr. Pepper sure looks good, doesn't it?"; ], before [; Take: if(parent(self) == player) "There's no more left."; else { move self to player; if(self has general) "You quickly grab the full can of Dr. Pepper."; "You grab the empty can of Dr. Pepper, wishing it was full again."; } Drink: if(parent(self) ~= player) "You don't have one in your hand right now."; if(self hasnt general) "You already drank this one."; give self ~general; "You quickly drink it all down."; Drop: move pepper to basement; "You put the can on the floor just under the door to the hamper."; ]; !!!!!!!! !! This object is an impassible doorway into darkness that the player can not enter. It is !! only given to distract the player from the solution to exiting this room. Object doorway "doorway" basement has static concealed with name "door" "doorway" "darkness", description "It's pitch black past the doorway. You can't see a single thing. I don't really think you want to go back there.", before [; Enter: "I wouldn't go there if I were you, Mulder."; ]; !!!!!!!! !! The hamper that the player can crawl into and through once the can of Dr. Pepper has been !! placed on the ground ("drop"ped). It can be open or closed so that the player can see !! the secret pathway. Once it is open, it is made "enterable" so that the player can "go !! hamper" to get to the next room. Object hamper "hamper" basement has static concealed container with name "hamper" "chute" "hamper-door", description [; if(self hasnt enterable) "You don't even want to know what kind of smelly clothes are behind the hamper door!"; "The open hamper door reveals a secret path that you can crawl through to get to another room."; ], before [; Open: if(self hasnt open) { give self enterable; give self open; "You open up the door to the hamper expecting to see clothes, but instead you see a pathway that can be crawled through to get to another room. You can't quite see what's in that room though."; } "It's already open."; Close: if(self has open) { give self ~enterable; give self ~open; "You close the hamper, unsure of what's in that other room. It's not like you, Mulder, to turn away from a good adventure."; } "It's already closed, but you might want to check out that other room in case Scully's there."; Enter: if(self hasnt enterable) "The hamper's not open for you to go through."; if(parent(pepper) ~= basement) "You can't reach quite high enough to get through the hamper door."; print "You manage to crawl through the mysterious hamper into the next room and see a very peculiar scene.^^"; PlayerTo(examination); rtrue; ]; !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ! The final room of the game. Mulder sees Scully behind a one-way mirror that he can break ! ! with the chair in the room. He must turn on the switch in order to see her. ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!! !! The main object for the room. It just gives a introduction to the listing of objects in the !! room when the player types 'look'. Object examination "Examination Room" has light with description "You look around this strange scene and see a few items of interest."; !!!!!!!! !! A large one-way mirror that the player can not see through initially. There is complete !! darkness on the other side (until the player turns the switch on the console 'on'). !! The chair can be thrown at the glass after the player has turned the switch on to see what's !! on the other side. The enterable attribute for the glass is set after the glass has been !! broken so that the player can 'go' through it into the medical room. !! The general attribute is set when the glass is broken to give a more detailed description of !! it when it is 'examined'. Object mirror "glass" examination has static with name "glass" "mirror" "pane" "window", initial "A large pane of glass covers much of one wall.", description [; if(self has general) print "Broken glass is scattered everywhere.^"; else print "It doesn't really look like normal glass for some reason.^"; if(light_switch hasnt on) "It's complete darkness on the other side."; else "The glass appears to be a one-way mirror so that the guy can investigate his victims without them seeing him in this room. On the other side you see Scully strapped to a surgery bed, apparently unconscious. You unfortunately don't see any way to get to the other side."; ], before [; ThrownAt: if(noun == chair && light_switch has general) { give self general; give self enterable; give medical_room enterable; "You heave the chair across the room and slam it into the glass pane, shattering it into millions of pieces. You are careful enough not to throw it all the way to land on Scully, though (that would be kind of painful for her)."; } if(noun == chair && light_switch hasnt general) "You can't see what's in there. I wouldn't thow anything into it before you're sure of what lies beyond."; "You can't throw that at the glass."; Enter: if(self has general) { deadflag = 2; "You jump into the medical room and unstrap Scully from the bed. You manage to wake her up and find your way out of this creepy house. You set a stake-out for the owner of the house so that the fake abductions will finally stop.^^ Congratulations!!"; } "You can't go through solid glass, Mulder!"; ]; !!!!!!!! !! An object to represent a console that the owner uses to experiment on his 'patient'. !! Examining the console 'move's the light switch to 'examination' so that the light swithc !! can then be seen, examined, and turned on/off. Object console "console" examination has static supporter with name "console" "board", initial "Some sort of console is situated in front of the glass facing it.", description "The console has lots of buttons, switches and things on it that are labeled mostly with medical terms--all except for the good ol' power switch.", before [; Examine: move light_switch to examination; ]; !!!!!!!! !! A chair object that is by the console. !! The player is allowed to 'sit in' it, but this does nothing of benefit. !! The chair is 'ThrownAt' the glass in order to break it and free Scully. Object chair "chair" examination has enterable supporter with name "chair", initial "A cozy-looking chair is positioned in front of the console.", description "The chair reminds you of the captain's chair from an old sci-fi movie.", before [; Enter: "You take a seat in the comfortable 'captain's chair' at the console."; ]; !!!!!!!! !! A power switch located on the console. It turns on the lights to the medical_room. !! It is initially given no parent so that it is not seen at all until the player examines the !! console. At that time, the light_switch is given 'examination' as a parent so that the !! player can examine it and turn it on/off. !! The general attribute is set the first time the switch is turned on so that, before the !! player throws the chair through the glass, he must have seen what's on the other side !! (have seen it with the lights on). !! Turning on the switch also gives the medical_room 'examination' as a parent so that it can !! be examined, etc. Turning it off removes the parent. Object light_switch "switch" has static concealed switchable with name "button" "power" "light" "switch" "light-switch", description "On the console is a switch labeled 'power'.", before [; SwitchOn: if(self hasnt on) { move medical_room to examination; give self general; give self on; "You turn on the 'power' switch and see what looks like a medical room on the other side of the glass. Scully is strapped to a bed, apparently unconscious. The room looks like the descriptions of where people say they have been taken during an alien abduction...like where they do experiments on humans...Could it be that this guy has been faking abductions and just bringing the people here?"; } SwitchOff: if(self has on) { move medical_room to medical_room; give self ~on; "What are you doing? Are you going to leave Scully there to die?"; } ]; !!!!!!!! !! The ending place for the game. It actually be won by using 'go medical-room' or 'go glass'. !! This object was included separately so that the player could examine the room independently !! of the glass. !! The object is unrecognized while the light switch is off by giving it no parent. When the !! switch is turned on, 'examination' becomes its parent so that it can be 'examine'd, etc. Object medical_room "medical room" has static light with name "medical-room" "medical room" "examination" "Scully", initial "Scully is still strapped down in that room on the other side of the glass.", description "Scully is strapped to a medical bed underneath several bright lights. There are lots of surgical tools lying around the room. It looks just like all the descriptions of alien testing labs that abductees have told you about.", before [; Enter: if(mirror has general) { deadflag = 2; "You jump into the medical room and unstrap Scully from the bed. You manage to wake her up and find your way out of this creepy house. You set a stake-out for the owner of the house so that the fake abductions will finally stop.^^ Congratulations!!"; } "You can't go through solid glass, Mulder!"; ];