Constant Story "Lost?"; Constant Headline "^You wake up, tossed in a corner, hugging a toilet bowl^^ You have been robbed, your money and wallet is gone, you awake to find yourself here, in a bathroom. Well at least whoever did this left you with the keys to your ford pinto. Apparently they didn't have a use for it.^^ Self Titled - A Snowboarding adventure^ - Version 1.0^ By Jeremiah Condon (2002) - Last Compiled: Oct-16-2002^"; Constant MAX_SCORE 100; ! This constant is the last compile date and can be set by the Inform compiler. Serial "021014"; global elkseen = false; global cleanface = false; global girlatcounter = true; ! This constant is set by you and tells which release of your game you are ! working on. It's a good idea to make backups of your program on a regular ! basis. When you have completed your game, start incrementing the Release value ! every time you fix bugs or make changes so that players know which release ! works and which one doesn't. ! Release 1; ! The Include statement allows Inform to open other files that are important to ! your program. The following files, "Parser" and "VerbLib" are the foundation ! of the Inform parser. DON'T REMOVE THESE LINES!!! ! Include "Parser"; Include "VerbLib"; !------------------------------------------------------------------------------- ! Initialise !------------------------------------------------------------------------------- [ Initialise; location = Bathroom; ]; ! ! The following function is called by Inform when the player types SCORE or when ! the player ends the game. As you can see, each range of points has a different ! string printed. You can modify this function to suit your own story. Remember, ! the constant MAX_SCORE contains the value that is used by Inform to represent ! "You have scored out of ", so you want both the Constant ! and this function to be synchronized. ! [ PrintRank; print ", earning you the rank of "; if (score >= 100) "the greatest."; if (score >= 80) "above average."; if (score >= 60) "average."; if (score >= 40) "below average."; if (score >= 20) "the barely living."; "the living dead."; ]; ! ---------------------------------------------------------------------------- ! Locations ! ! In this section we will define our locations. These are "Objects" to Inform ! and contain the following elements. ! ! - object name ! The object name represents the variable or handle of the object. ! - short description ! The short description is the description printed in bold before the ! normal description. ! - initial description ! The initial description is printed only once when the location is first ! entered by the player. ! - normal description ! The normal description is printed everytime the player enters the location. ! - directional properties (tells which direction player can move) (optional) ! These include n_to, ne_to, e_to, up_to, in_to, etc. and are followed by ! another location object name. ! - properties ! Properties are functions that you can add to an object that help determine ! events and actions. ! - attributes ! Attributes are True/False values that help you remember certain states of ! an object or event, such as whether the lights are on or not. The positive ! value is represented as "light" and the negative would be "~light". There ! are standard attributes used by Inform and you can add your own as well. ! ! Actually, there's more than this, but we'll add the complicated stuff later! ! ! ---------------------------------------------------------------------------- Verb "help" *-> help; [ HelpSub; print "You scream ~HELP~ ^^A booming voice cries out^~Examine everything~"; if (cleanface == false) "^...and use the sink, your quite dirty."; else if (elkseen == false && sline2 > 10) "^Have you seen that deer head, that thing is HUGE!"; ]; !door should start out locked, there should be a mirror, and you can wash your face. Object Bathroom "Bathroom" with description "You awake to find yourself on the floor of a rather unclean public restroom.^^ Other than the bathroom stalls, you see a single mirror and sink ^ Door to the west", w_to [; if (cleanface == true) { return Foyer; } else "It may be wise to wash up before you leave the bathroom, you never know who could be out there."; ], has light; Object -> "Mirror" with name "Mirror" with description "This is the mirror in the bathroom", before [; Examine: if (cleanface == true) "Lookin good."; "Your face is all bloody. You may want to use the sink to wash your face."; Use: "you can't use that"; ], has scenery; Object -> "Sink" with name "Sink" "Wash" "Soap" with description "A nice porcilan sink(SP) perfect for cleaning bloody faces", has scenery; [sink; if (cleanface == false) rtrue; rfalse; ]; Verb "use" *noun=Sink-> Use; [ UseSub; if (cleanface == false) { cleanface = true; "You turn on the sink and wash your face^^ You feel clean and refreshed."; } ]; Object Kitchen "Kitchen" !This area should be blocked by the girl until you look at moose head with description "You are in the kitchen, I don't think you are supposed to be here.^ Down to basement or South to the counter.", s_to KCounter, d_to Basement, has light; Object -> "Cheese" with name "Cheese" "trap" with article "some", !cheese is on a mouse trap description "Looks like cheese on a trap for a mouse, probably not a wise idea to try and take it. ^South to the Fireplace area or North to the Kitchen.", before [; take: remove self; score = score - 10; "Ouch, looks like the trap gets more than just mice^ The cheese went flying across the room and is now somewhere under the stove"; ]; Object KCounter "Food Counter" with description "This is the food counter", s_to Fireplace, n_to [; if (elkseen == true) return kitchen; "The girl says ~You can't get back here!~^~Were you going to order something or not?~"; ], has light; Object -> "Cute Girl" with name "Girl", description "She looks to be about your age and good looking. Hey, maybe if you knew where you were and how you got there you would be in a better position to talk to her. (And your breath kinda smells)", before [;Attack: deadflag = 1; print "The Girl looks angry. Then she kills you. Didn't see that one coming did you?"; ], each_turn [; if (elkseen == true && girlatcounter == true) { print "The girl, now apparenly distraught over your lack of hunting knowledge, decides to head over to the bar. Perhaps you can sneak into the kitchen without anyone seeing now."; move self to bar; girlatcounter = false; } ], has animate; Object Fireplace "Fireplace" with description "A great giant Fireplace with some kind of deer head on it. The large, dark rooom is lit by the fire in the fireplace. The light dances around the room, casting shadows onto the natural wood furniture.^ North to the Food Counter, East to the Foyer", n_to KCounter, e_to Foyer, has light; Object -> "deer head" with name "deer" "head" "animal", before [; Examine: if (elkseen == true) "Well it is quite large and deer like."; elkseen = true; score = score + 30; "You say to yourself, wow... that is one large deer head. You hear the girl at the food counter exclaim, what are you some kind of idiot? That is an ELK head! She probably wouldn't appreciate anything you had to say back to her."; ], has scenery; Object -> "Fireplace" with name "fireplace" "fire" "place" "fire place", before [; Examine: "The warm glow of the fireplace reminds you of home"; ], has scenery supporter; Object Seating "Seating for Bar" with description "This is the seating area for the bar, looks like normally it would be a great place to drink. There are quite a few tables here. All looking towards the stage. Doesn't look like much is going to go on here tonight, no band, a few people, but mostlly employees.^ South to the Bar, West to the foyer", s_to Bar, w_to Foyer, has light; Object -> Tables with name "Tables" "Seating" with description "Lots of tables for people to eat and drink, looks like they clean up crew has quite a job to do tonight.", before [; examine: move Wallet to Seating; Wallet.Description(); ], has scenery; Object -> Room with name "Room" "Setting" with description "Lots of tables for people to eat and drink, looks like they clean up crew has quite a job to do tonight.", before [; examine: move Wallet to Seating; Wallet.Description(); ], has scenery; Object Wallet "Wallet" with name "Wallet" with description "It appears to be your wallet in the corner under a table", after [; Examine: "Well the cash and credit cards are gone, but at least your license is here"; Take: score = score + 30; ]; Object Foyer "Foyer" with initial "From the main foyer you can see everything.^ It is a huge room with lots of wood and a fireplace, perhaps it is a lodge atop a snowboarding hill? You see that it is snowing gently outside and the ski lift is not in operation, it doesn't matter anyway because the only thing on your mind right now is getting out of here.^ NW to the counter, West to the fireplace, North east to the bathroom, East to the Seating area, Southeast to the bar, and South to outside", description "The foyer", nw_to KCounter, w_to Fireplace, ne_to Bathroom, e_to Seating, se_to Bar, s_to outside, has light; Object Bar "Bar" with description "This is where you would buy drinks, but I don't think you can get any right now.^ North to the Seating area, West to the Foyer.", n_to Seating, w_to Foyer, nw_to Foyer, has light; Object -> "Lots of alcohol" with name "beer" "alcohol", after [; take: "I don't think the bartender would appreciate that.";]; Object Basement "The basement" with description "The basement^ Up to the kitchen", u_to kitchen, has light; Object -> snowboarding_boots "snowboarding boots" with name "boots" "gear"; Object DFromLodge "Snowboard Hill, near the lodge" with description "Well you are doing good so far, you have not fallen yet.^ Obvious exit, west", u_to [; "Unless you can defy gravity, I don't think you are getting back up there.";], w_to WFromLodge, e_to [; "There are trees blocking your way";], s_to [; "There are trees blocking your way";], n_to [; "There are trees blocking your way";], has light; Object WFromLodge "Snowboard Hill: Turn Right!" with description "The path turns right (south) here, if you don't turn you will run into those trees!", u_to [; "Unless you can defy gravity, I don't think you are getting back up there.";], s_to [; if (snowboarding_boots notin Burton_Snowboard ) { move Burton_Snowboard to outside; print "You lean backwards to turn, but something feels funny! At the last minute you realize that you should have stolen some boots to go with your nice new snowboard. You feel the cold hard sensation of the snow, you put up a good fight but...^^You Run into the trees, fearing for your life you hold onto anything that you can...^^ Suddenly you find yourself back in the lodge, you must have hit some kind of warp zone."; return Foyer; } score = score + 40; return BHill; ], e_to [; "There are trees blocking your way";], w_to [; "There are trees blocking your way";], n_to [; "There are trees blocking your way";], has light; Object BHill "Bottom of the hill" with description "You made it to the bottom, You can see the Lodge at the top of the hill, the ski lift and the parking lot to the south.", s_to [; deadflag = 2; "You get into your ford pinto and drive home happy you are gone from there, well he got away with 2 (maxed) credit cards and 30 bucks. I think you got the better end of this deal.";], has light; Object outside "Theft Racks" with description "It is really cold out here, there are some snowboards on the racks still^ You hear an click of the door behind you and wish that you would have propped the door open^ looks like the only way to go is down!", n_to [; print "You must have made some impression on that girl because she let you back in"; return Foyer; ], d_to [; if (Burton_Snowboard has worn) { print "So you are braving the hill, looks pretty big, good luck."; return DFromLodge; } "You creep closer and closer to the edge, the closer you get the more you realize going down would be a bad idea in your current condition, finally at the edge you can see the slope, that must be 80 degrees. it would not be wise to traverse that hill on foot, I would recommend lots of alcohol or a snowboard, either way, that looks difficult!"; ], has light; Object -> Burton_Snowboard "Burton Snowboard" with name "burton" "custom" "snowboard" "board", before [; Examine: "It is a newer looking Burton Custom snowboard."; Wear, PutOn: move self to player; ], has supporter, has clothing; Include "Grammar";