!============================================================================ Constant Story "The Black Hand"; Constant Headline "^An ~Adventures of Henry~ Prototype ^by Zach Tomaszewski, Jennifer Kaneshiro and Neil Phan.^"; Global day = 1; !1 = Monday Global time = 0; !1 = morning; 2 = noon; 3 = afternoon; 4 = evening; 5 = night; !Global x; !for object loops Include "Parser"; Include "VerbLib"; Include "SmartCantGo"; Include "SmartDirs"; !============================================================================ !attribs Attribute legible; !capable of being read ! The game object classes Class Room !a location with cant_go [; SmartCantGo(); ], before [; VagueGo: return SmartVagueGo(); ], has light; Class Prop; !a small object !! ! A Prop that supports things, but cannot be picked up !! Class Furniture class Prop with before [; Take: print_ret (The) self, " is too heavy to take with you."; Push, Pull, PushDir: print "You "; switch (action) { ##Pull: print "pull"; ##Push: print "push"; default: print "shove"; } print " ", (the) self, " around a little, but it doesn't seem to be of much use.^"; rtrue; ], has supporter static; !! ! Some prop with text or printing on it; not necessarily paper! !! Class Document class Prop with before [; Read: "Though you carefully read ", (the) self, ", you don't learn anything new."; ], has legible; !! ! A scenery object that cannot be taken or used. Presumably fixed in place. ! Supports no interaction beyond looking at it, and by default its ! description states that there is nothing special about the object !! Class Background with description [; "You notice nothing special about ", (the) self, ".";], before [; Examine: return false; default: print_ret "You don't need to worry about ", (the) self, "."; ], has scenery static; !! ! A living character other than the player !! Class NPC with life [; Answer,Order,Tell: print_ret "Just use t[alk] [to] ", (the) self, "."; ], has animate; !============================================================================ !Game methods [DeathMessage ; if (deadflag == 3) { "This concludes the current prototype implementation of The Black Hand. Thank you for playing"; } ]; !! ! Prints the time as a string (eg, "It is Monday afternoon.") ! Will also verify that DAY and TIME are legitimate values by %-ing them. ! If capital is set to true, will print "It..", otherwise "it...". [printTime capital; if (capital){ print "It is now "; }else{ print "it is "; } if (TIME > 4) { DAY++; } TIME = TIME % 5; !wrap the time DAY = DAY % 6; switch (DAY){ 1: print "Monday"; 2: print "Tuesday"; 3: print "Wednesday"; 4: print "Thursday"; 5: print "Friday"; 6: print "Saturday"; 0: print "Sunday"; } switch (TIME){ 0: print " morning."; 1: print ", around noon."; 2: print " afternoon."; 3: print " evening."; 4: print " night."; } rtrue; ]; !pronoun printing methods from DM4, Exercise 62 ![ PronounAcc i; ! if (i hasnt animate || i has neuter) print "it"; ! else { if (i has female) print "her"; else print "him"; } ]; [ PronounNom i; if (i hasnt animate || i has neuter) print "it"; else { if (i has female) print "she"; else print "he"; } ]; ![ CPronounNom i; ! if (i hasnt animate || i has neuter) print "It"; ! else { if (i has female) print "She"; else print "He"; } ]; !===================================================================== !game objects !the DrugCo envelopes Class envelope(3) class Document with name 'envelope' 'empty' 'envelopes//p', short_name "plastic envelope", plural "plastic envelopes", description "An envelope of transparent yellow plastic with the DrugCo logo on it.", add_to_scope black_logo, has container transparent openable; !on all envelopes Background black_logo "DrugCo logo" with name 'logo' 'drugco', description "The DrugCo logo is of a hand holding a flaming torch. The flame looks blown back by an unseen wind, and the hand is rather shadowy and poorly lit.", has concealed; !in henry's envelope Document black_docs "DrugCo documents" with name 'drugco' 'documents' 'docs', description "These miscellaneous documents are from your recent drug experiment. They include a copy of the release form you signed, a checklist of possible side-effects to watch for (such as headache, nausea, insomnia, etc.), DrugCo contact information, and receipt for the money you were paid to participate.", has pluralname; !== HENRY's HOUSE ======= Room henrys "Your Apartment" with description "You've been pretty busy lately, and so haven't gotten around to cleaning things up. It's amazing how much mess can fit into such a small apartment. The bed is unmade, your desk is covered in old mail and other papers, and you haven't vacuumed the floor in a very long time. Your main door is to the south.", s_to [; !small plot hack to allow user to decide when to go if (DAY == 1 && TIME == 0) { !!first time to try leaving print "As you head to the door, your phone rings. It's Sandy! But she sounds frantic and close to tears. ^^~Henry, I didn't know who to call. I think something terrible has happened to Stan! Can you come over, please?~ ^^She gives you Stan's address. You hang up, and head to Stan's.^^^"; TIME++; return stan_doorstep; }else if (DAY == 2 && TIME == 0) { !Tuesday morning print "You get dressed and head over to Phil's.^"; return phil_doorstep; }else if (TIME >= 4) { !evening or later "It's getting too late to go out exploring. Besides, you're exhausted from your long day, and need some sleep if you're going to think clearly about what's happened."; } ], before[; Sleep: if (TIME >= 4){ DAY++; TIME = 0; !to next morning print "You drop into bed, hoping you get a better night's sleep than you did last night. ^^^^^^^^^^^^^^^^^^^^^ Your sleep is not peaceful, however. Again, you are plagued by strange, ethereal dreams... a falling rubiks cube... rushing water... brown snow... a falling fishbowl... a rose... rust on walls... and finally, just before you wake, a black-gloved hand... reaching for a doorknob.... ^^^^^^^^^^^^^^^^^^^^"; printTime(true); if (DAY == 2) { " And Tuesday is the day you're supposed to meet Phil for some hoops. Maybe Phil will have some clues as to what's been going on lately."; } rtrue; } ]; Furniture -> hbed "bed" with name 'bed', description "Your bed is wrinkled and unmade.", article "your"; Furniture -> hdesk "desk" with name 'desk', description "Your desk is covered in old bills and letters.", article "your"; Document -> -> home_letter "letter from home" with name 'home' 'letter' 'from' 'cousin' 'bad' 'news', description "A letter you got from your cousin a couple weeks ago with a lot of bad news.", before [; Read: "~Dear Henry,^^ I just wanted to say I'm sorry to hear about your mother's illness. I stopped by the hospital a couple days ago and they've moved her to a feeding tube. She's still pretty stable, but the doctors still say it's unlikely she'll recover. ^^ Your dad has lost his job. My dad--your uncle Bill--has been helping him out a bit, but he just can't seem to find any other work. It's probably due to his age--most companies only want to hire young college grads these days. ^^ Sorry this is such a short letter, but I wanted to say ~hi~ and wish you the best with your studies.^ ^ your cousin ^ Pat~"; ]; Document -> -> "stack of bills" with name 'stack' 'bills' 'bill', description "This a pile of bills you have to pay as soon as you can get some money with which to pay them. You have bills for the phone, rent, electricity, and cable. These all seem like essential services for a young college student."; Document -> -> "extra bill" with name 'bill' 'extra' 'storage' 'locker', description "This bill is for a large storage locker where you keep your wood-working tools and some spare furniture after you moved to this smaller apartment. You could save money by getting rid of this locker, but sometimes it seems like taking a break to go do some wood-working is the only thing that keeps you sane."; Document -> -> "notice from landlord" with name 'notice' 'landlord' 'eviction' 'note', description "A polite-yet-threatening note from you landlord.", before [; Read: "~Henry--^ You're a good tenant--you're quiet, and you don't cause any trouble. But you're two months behind on your rent! If you don't pay up soon, I'm afraid I'm going to have to find someone more dependable to rent your apartment to. ^ --Sal.~^^ (Well, at least the experiment money will get Sal off your back for a month or two.)"; ]; Document -> -> "official letter" with name 'official' 'letter' 'school', description "An official letter from your university explaining that you will be losing your scholarship next semester.", before [; Read: "~Dear Henry Johnson:^ ^ We regret to inform you that due to certain budgetary considerations we will be unable to extend your scholarship into the coming semester. At the end of the current term, your financial assistance package will come to an end.^ ^ We regret any inconvenience this may cause you. Please contact the financial aid office if you have any questions.^ ^ Sincerely,^ ^ R. M. Pedille, Vice President^ Financial Aid Office~"; ]; Prop -> -> "clock" with name 'time' 'clock' 'watch' 'alarm', description [; print "It's your digital alarm clock, which tells you "; printTime(false); "";], has supporter; Document -> -> -> "sticky note" with name 'sticky' 'post-it' 'note' 'reminder', description "It's a reminder that you promised to play basketball with Phil on Tuesday.", before [; Read: "~Hoops with Phil, Tues 10am.~"; ]; Document -> "wood-working magazines" with name 'wood' 'working' 'woodworking' 'wood-working' 'magazines' 'mags', description "These magazines are aimed at the wood-working enthusiast, such as yourself. Titles include ~Carpentry Today~, ~Fine Woodworking~, and ~The Hobby Carver~.", before [; Read: "You flip through the magazines for a while, but then remember you have more important things to be doing right now."; ], has pluralname; !== STAN'S HOUSE ======== Room stan_doorstep "At Stan's Door Step" with name 'doorstep' 'step' 'stan', description [; if (self hasnt visited) { "You arrive at Stan's house and find Sandy sitting on the front steps sobbing. You notice that, to the north, Stan's door is standing ajar."; }else { "All seems quiet outside of Stan's house."; } ], n_to stan_door, s_to [; if (TestScope(sandy)){ if (stan_house.envelope_found == false) { "Sandy stops you. ~What do you think happened to Stan? Won't you help me look for clues?~"; }else { TIME = TIME + 2; print "Sandy stops you. ~Wait, we can't just leave! I'll call the police.~ ^^ The police arrive and investigate the scene. They question you for a couple hours, but eventually let you go. ^^ Sandy asks you to walk her home, and you agree. ^^"; move sandy to sandy_doorstep; return sandy_doorstep; } }else { print "You head back to your place.^^"; return henrys; } ], has ; Room stan_house "Inside Stan's House" with name 'house' 'room', description "Stan's place is a mess. Papers are strewn all over the house, and the furniture has been overturned. You can see broken glass and a dead goldfish on the floor. The door you came in through is to the south. ^^On a wall, you see a black hand print and a message in big, black letters: ~You can't escape the Black Hand!~ ^^There's no sign of Stan.", envelope_found false, before[; SearchLocation: if (self.envelope_found == false){ move envelope.create() to self; print "You look around, searching through the strewn papers and among the scattered furniture. Peeking out from behind the dresser, you find an odd plastic envelope.^"; self.envelope_found = true; return true; }else { "Further searching reveals nothing new."; } CallFor: if (noun == police) { print "You call the police.^^ The police arrive about 15 minutes later and investigate the scene. They question you for over an hour, but eventually let you go. ^^ Sandy asks you to walk her home, and you agree. ^^"; TIME = TIME + 2; move sandy to sandy_doorstep; playerTo(sandy_doorstep); return true; } ], after[; Search, Examine: if (self.envelope_found == false) { if (noun == stans_furn) { self.envelope_found = true; move envelope.create() to self; "^However, while you're looking, you do happen to find an odd envelope partly concealed by the dresser."; }else if (noun == stans_papers) { self.envelope_found = true; move envelope.create() to self; "^However, during your search through them, you do happen to find an odd envelope among the papers."; } } ], s_to stan_door, has ; Background -> "broken glass" with name 'broken' 'glass' 'shards', description "It's a lot of broken glass. Looking closer, the carpet under the glass is wet and there is gravel strewn around. Looks like someone upset the goldfish bowl."; Background -> "goldfish bowl gravel" with name 'gravel' 'sand'; Background -> "carpet" with name 'carpet' 'rug'; Background -> stans_papers "Stan's papers" with name 'paper' 'papers', description "They're just old school papers and books and notes of Stan's. There doesn't seem to be particularly special documents among them.", before [; Read: "You don't have time to read through all of Stan's papers. Besides, they don't look important enough to bother with."; ]; Furniture -> stans_furn "Stan's furniture" with name 'furniture' 'bed' 'chair' 'dresser' 'table' 'chairs', description "Stan's bed has been torn apart, his dresser rifled through, his table and chairs overturned. Looks like someone was either looking for something or trying to destroy Stan's stuff in a hurry.", has scenery; Background -> "dead goldfish" with name 'goldfish' 'gold' 'fish', description "Well, it's too late to help the goldfish. It's dead, and beginning to dry out."; Document -> "message" with name 'hand' 'handprint' 'print' 'message' 'wall' 'black', description "The message is written in thick black ink. The hand print is thick and lacks fingerprints. It looks like whoever pressed their inky hand to the wall was wearing a glove when they did it.", before[; Read: "~You can't escape the Black Hand!~"; ], has concealed scenery; Object stan_door "Stan's door" with name 'stan^s' 'door', description [; if (self in stan_house) { "It's the door you came in through."; }else{ "It's the door to Stan's house."; } ], found_in stan_doorstep stan_house, react_before[; Go: if (self in stan_doorstep && noun == n_obj){ <>; }else if (self in stan_house && noun == s_obj && self has open){ move sandy to stan_doorstep; print "Sandy follows you outside.^"; } ], before [; Open: if (self in stan_doorstep){ !since door already ajar, just go in print "You push open the door and make your way into Stan's house. As you do, you notice that the door was not forced open. Sandy follows you in.^"; move sandy to stan_house; PlayerTo(stan_house, false); rtrue; }else { return false; !treat normally } ], door_to [; if (self in stan_doorstep) return stan_house; else return stan_doorstep; ], door_dir[; if(self in stan_house) return s_to; else return n_to; ], has door openable open proper static scenery; !=== NPCs (SANDY) ======================= NPC sandy "Sandy" with name 'sandy' 'friend' 'girl' , description "Sandy is a female friend you met at the DrugCo experiment.", talkCount 0, life[; Talk: self.talkCount = self.talkCount + 1; if(self in stan_doorstep){ if(self.talkCount == 1){ print_ret "~Thanks for coming Henry. I've called you because Stan is missing! I called Stan this morning and he didn't answer his phone so I stopped by his house and he's not here. His front door was ajar and the place was a big mess, very unusual for him. I didn't call the police yet; I've only called you Henry. I didn't touch anything in the house either.~"; }else { "~What should we do now Henry? What do you think happened to Stan?~"; } }else if (self in stan_house){ if(stan_house.envelope_found == true){ print_ret "~I think we should call the police, Henry.~"; }else { print_ret "~I don't know Henry, but I'm scared. Should we search for clues or something?~"; } }else if (self in sandy_doorstep) { "~Thanks for walking me home, Henry. You want to come in for a little while?~"; }else if (self in sandy_house){ "~Why don't you hang out for a bit. I'll make us something to eat... or maybe order out.~"; }else { "~I don't know, Henry.~"; } Ask: switch (second) { 'envelope': "~I have one of those too. We all got them at the experiment. I think I threw mine away.~"; 'wall', 'black', 'hand', 'message': "~It's freaky! What or who do you suppose the Black Hand is?.~"; 'logo': "~I don't remember what it looks like. Maybe I could tell you more if I took a look at something with the logo on it.~"; 'gold', 'fish', 'goldfish': "~I gave Stan the goldfish as a house-warming gift.~"; 'stan': "~Stan and I have been good friends for as long as I can remember. We dated briefly in high school, but we learned that we don't do 'couple' as well as we do 'best friends'.~ Sandy's smile fades. ~Oh, I wish we could find out what's happened to Stan! I just hope he's okay. What could have happened to him!?~"; 'drugco', 'experiment': "~It was rather a strange experiment, but it seemed relatively harmless.~"; 'dream', 'catcher', 'dreamcatcher': "~My great-grandfather was Native American. My family still has one he made, though I think it's in my parent's attic right now. Still, dreamcatchers mean a lot to me.~"; 'dreams', 'sleep', 'night', 'nights', 'nightmares': "Sandy looks distracted. ~Well, now that you mention it, I have had trouble sleeping lately... but I can never remember what I dreamt about.~"; 'flowers', 'roses', 'birthday', 'happy', 'vase': "~Yes, it was by birthday a couple days ago.~"; 'phil', 'card': "~Really! You know Phil? We're very close.~"; 'photos', 'photo', 'frames', 'pictures': "Sandy points out who is who among the friends and family in all of her photos. You remember a couple of names, but not many."; default: "~There's not much I can tell you about that that you don't already know, Henry.~"; } Show: if (noun ofclass envelope || noun == black_logo){ "~That's interesting... the hand holding the torch is rather dark in this picture. Do you think there might be some sort of connection between DrugCo and the Black Hand?.~"; }else{ "~That's interesting, Henry. Is this important?~"; } Give: "~No thanks, Henry. I think you should keep it.~"; ], has female proper; !== SANDY'S APARTMENT =========== Room sandy_doorstep "Outside Sandy's Apartment" with description "You're in the hallway of Sandy's apartment building, standing in front of her door. You can go down in the elevator, or east into Sandy's.", d_to [; print "You leave Sandy's apartment building and head home.^"; Time = Time + 2; playerTo(henrys); return true; ], e_to sandy_door; Background -> "dreamcatcher" with name 'dream' 'catcher' 'dreamcatcher', description "It is a small, silver dreamcatcher hanging from a nail in the door. A dreamcatcher is a small sort of circular web, traditionally woven by Native Americans. It catches bad dreams, but lets good dreams through."; Object sandy_door "Sandy's door" with name 'sandy^s' 'door', initial [; if (self in sandy_doorstep){ "A dreamcatcher hangs on Sandy's door."; }], description [; if (self in sandy_house) { "It's the door you came in through."; }else{ "It's the door to Sandy's house. There is a dreamcatcher hanging on it."; } ], found_in sandy_doorstep sandy_house, react_before[; Go: if (self in sandy_doorstep && noun == e_obj){ <>; }else if (self in sandy_house && noun == w_obj && self has open){ if (sandy_house.overwhelmed < 3){ "You can't leave until you say goodbye to Sandy. She should be back out soon. Might as well have a look around while you wait."; }else if (sandy_house.overwhelmed < 6) { "Sandy asks you to stay a little longer, and so you agree... for now."; }else { print "You let yourself out.^"; } } ], before [; Open: if (self in sandy_doorstep){ if (TestScope(sandy)){ print "Sandy unlocks the door, and you follow her inside.^ ^~Welcome! Sorry it's such a mess. Make yourself at home. Help yourself to anything in the fridge. I'll be just a couple minutes.~ Sandy goes into the bathroom, leaving you alone for a while.^^"; give self ~locked; give self ~open; !after passing through remove sandy; PlayerTo(sandy_house); rtrue; } }else { return false; !treat normally } ], door_to [; if (self in sandy_doorstep) return sandy_house; else{ give self locked; !locks behind you return sandy_doorstep; } ], door_dir[; if(self in sandy_house) return w_to; else return e_to; ], has door openable open proper static lockable locked; Room sandy_house "Inside Sandy's Apartment" with description "Sandy lives in a tiny, cluttered studio apartment. A small counter divides the kitchen from the main living area. There is a day bed, covered in cushions, in the far corner. Her shelves and coffee table are covered with magazines and books and photos. The bathroom door is the north, and the main door is to the west.", w_to sandy_door, n_to "The bathroom door is locked right now.", overwhelmed 0, each_turn [; if (phil_card.read == true) { self.overwhelmed++; } switch (self.overwhelmed){ 2: "^(You can't believe Sandy is being so nice to you while also seeing Phil. It's playing on your mind.)"; 3: move sandy to sandy_house; "^Sandy comes back out of the bathroom. ~Hey, Henry. Thanks again for walking me home. Stan's disappearance has me pretty scared.~"; 4: "^(You just can't stop thinking about Sandy and Phil.)"; 6: print "^You have to give this whole 'Sandy and Phil' thing some thought. You make an excuse that you're getting very tired-- it is getting late--and head home.^^"; TIME = TIME + 1; PlayerTo(henrys); return true; default: return false; !do nothing } ]; Background -> "furniture" with name 'furniture' 'coffee' 'table' 'shelves' 'day' 'bed' 'couch' 'cushions' 'sink'; Background -> "bathroom door" with name 'bathroom' 'door'; Background -> "Sandy's photos" with name 'photos' 'photographs' 'pictures' 'photo' 'picture', with description "You spend a couple minutes looking at Sandy's extended family and various friends.", has proper; Background -> "books and magazines" with name 'books' 'magazines', description "Sandy has a wide variety of reading material scattered about.", before [; Read: "You read for a while, to pass the time."; ], has pluralname legible; Background -> "refrigerator" with name 'fridge' 'refrigerator' 'freezer' 'icebox', description "Sandy has a very small fridge!", before [; Open, Search: "You take a peek in Sandy's fridge, but it's pretty barren. You don't find anything particularly appetizing."; ], has container openable; Object -> "kitchen counter" !like furniture, but complete stationary with name 'kitchen' 'counter', has supporter static scenery; Prop -> -> "glass vase" with name 'vase' 'glass', description "It is a small but pretty clear glass vase.", has container open transparent; Prop -> -> -> "flowers" with name 'flowers' 'roses', description "It's a nice bouquet of flowers, including a few roses.", has pluralname; Document -> -> -> phil_card "card" with name 'card' 'phil' 'phil^s', description "It's a small white card with writing on it, probably from whomever sent the flowers.", read false, before [; Read: self.read = true; "~Sandy--^ Happy Birthday! Hope this year is as wonderful to you as you are to me. Call me. ^ Love, Phil~ ^^ Looks like your best friend Phil is putting the moves on Sandy!"; ]; !== PHIL's HOUSE ========== Room phil_doorstep "Outside Phil's House" with description "Phil lives in a small one-bedroom house in the cheap part of town. It's still impressive that he can afford the rent on the place. His door is to the north, or you can leave to the south.", name 'outside' 'hallway' 'doorstep', n_to phil_door, s_to [; if (phil_door has locked) { !haven't gone in yet "You haven't caught up with Phil yet. Try knocking on his door to the north."; }else { deadflag = 3; "You should find a phone and report Phil's death to the police. With a confirmed death, things are getting very serious now. ^^ Maybe Sandy knows something about who killed Phil, since it sounds like they've been seeing each other lately. Besides, you need to talk to someone about just finding your best friend slain on his own kitchen floor. You head to Sandy's place."; } ], has ; Object phil_door "Phil's door" with name 'door' 'house' 'apartment' 'knob' 'damage' 'lock' 'plate' 'wood' 'phil^s', description "Phil's door looks like it has been attacked with a crowbar. The lock plate is twisted, and the wood around the door knob is gouged.", found_in phil_house phil_doorstep, talkCount 0, before[; Knock: switch (self.talkCount) { 0: print "~Hello, Phil! Hurry up and open the door, man! It's 10:30 already.~^^ There's no answer from within.^"; 1: print "~Damn it, Phil. Open up!~^"; default: print "There's still no answer.^ ^~Something's not right. Phil wouldn't leave without me.~^" ; } self.talkCount++; rtrue; Open: if (self has locked){ "You try to open the door, but it's stuck. It doesn't seem locked, but jammed, probably due to the damage done to the door knob."; }else { return false; } Unlock: "It's not locked. The door is just stuck."; Attack: give self ~locked; give self open; "With a mighty shove, you force the door open."; ], door_to [; if (self in phil_doorstep) return phil_house; else return phil_doorstep; ], door_dir[; if(self in phil_house) return s_to; else return n_to; ], has static door openable locked scenery proper; Room phil_house "Phil's Kitchen" with description "You've just entered Phil's house. You're standing in the kitchen. His house is a mess. Dishes are piled in his sink and open cans and cereal boxes stand on the counter. There is some sort of dark smudge one of the cabinet doors. You can see that, through the west door, his living room is in similar disarray.", name 'inside' 'house' 'room' 'apartment' 'kitchen', s_to [; if (phil_message.seen == true || phil_living.envelope_found == true){ return phil_doorstep; }else { "Surely there's some clue here that ties Phil's death to Stan's disappearance. Yet this will probably be your only chance to find it! You decide you can't leave just yet."; }], w_to phil_living, before [; CallFor: if (noun == police){ "You try to call the police using Phil's phone, but there's no dial tone. Either the line has been cut, or Phil neglected to pay his last phone bill."; } ], has ; Background -> phil_message "kitchen cabinet" with name 'cabinet' 'door' 'smudge' 'hand' 'print' 'message' 'mark' 'black', description "Looking closer at the smudge on the cabinet, you realize it is a black hand print! Once again, it is thick and without fingerprints.", seen false, before [; Examine: self.seen = true; return false; ]; Background "Phil's mess" with name 'dishes' 'sink' 'cans' 'cereal' 'boxes' 'counter' 'mess' 'cd' 'cds' 'textbooks' 'papers' 'bike' 'stuff' 'parts' 'bicycle', found_in phil_house phil_living, has proper; Background phil_body "Phil's body" with name 'phil' 'carcass' 'body' 'corpse', initial [; if (self.seen == true){ "Phil lies dead in the middle of the kitchen floor."; }else{ self.seen = true; "Yet the most obvious thing in the room is in the middle of the kitchen floor. It's Phil, and he's dead."; }], seen false, description "Phil's is dead. It looks as though he has been strangled. Hand prints are visible around his neck.", found_in phil_house, before [; Examine: return false; Search: "You don't find anything on Phil or in his pockets, not even his Rubiks Cube."; default: "You better not mess with the body--this is a crime scene."; ], has proper ~scenery container transparent; Background -> "Phil's neck" with name 'neck' 'phil^s' 'prints' 'hand', description "Dark imprints encircle Phil's neck where someone apparently choked him to death. It could be that the prints are so dark because whoever killed Phil was wearing inky gloves when they did it.", has concealed; Room phil_living "Phil's Living Room" with description "Phil's living in its usually messy state. All of his various accumulated junk is scattered all over--his disassembled bike, his threadbare couch, his CDs, a couple tattered textbooks and other papers, and other stuff too difficult to identify. Sadly, it seems Phil will now never learn how to clean up after himself.", e_to phil_house, envelope_found false, before [; CallFor: if (noun == police){ "You try to call the police using Phil's phone, but there is no dial tone. Either the line has been cut, or Phil neglected to pay his last phone bill."; } SearchLocation: if (self.envelope_found == false){ self.envelope_found = true; move envelope.create() to self; "Your search uncovers yet another empty DrugCo envelope, this time under the couch."; }else { rfalse; } ], after [; Search, LookUnder, Examine: if (noun == phil_couch) { print "^"; <>; } ]; Furniture -> phil_couch "Phil's couch" with name 'couch' 'threadbare' 'sofa' 'seat', description "Phil's couch has nearly reached the end of its useful lifespan. It is currently half-buried under papers and stray bicycle parts.", has proper scenery; !============================================================================ [Initialise henv; !setup henry location = henrys; TIME = 0; DAY = 1; !setup sandy move sandy to stan_doorstep; !put an envelope on henry's desk henv = envelope.create(); move black_docs to henv; move henv to hdesk; "^^^~Hey, Henry!~ ^^Someone is calling your name. You turn to see Phil Phillips, your best friend. As always, he's carrying his Rubiks Cube around with him, turning it in his hand as he talks. ^~Henry, I got the answer to all your money troubles. Follow me, my man!~ ^^ Phil explains that DrugCo, a large pharmaceutical company, is paying college students such as yourselves to participate in a brief study of a new drug that aids concentration. For three hours of participation, they'll pay $200 each. Strapped for cash, you agree to join Phil. ^^ When you arrive at the campus lab, you see, among the dozen or so other students gathered for the test, a cute girl you've seen around campus--Sandy. Phil starts up a conversation with her while you all wait. Introductions are soon made all around. She's accompanied by a tall, quiet guy named Stan. ^^ The experiment goes smoothly. Men in white lab coats ask you to fill out various paperwork first. Then they hand out a single pill to each student. You spend the rest of the time completing reflex, hand-eye coordination, and memory tests. You just got paid $200 to play games for 3 hours! ^^ As the four of you leave the experiment, you exchange phone numbers. All told, it was a pleasant evening. You head home, planning a good night's sleep so you can get caught up on all your homework during this week of spring break. ^^^^^^^^^^^^^^^^^^^^ However, your sleep is not restful at all. You are troubled by vibrant, incoherent dreams that you have difficulty remembering... birds flying... Sandy talking... a fish bowl falling from a table... water dripping from a faucet... Stan laughing... brown snow... the words ~can't escape~... scurrying rats... and, just before you wake, a black-gloved hand... reaching.... ^^^^^^^^^^^ "; ]; !============================================================================ ! Standard and extended grammars and subs Include "Grammar"; [ReadSub; print_ret (The) self, " is unreadable."; ]; [SearchLocationSub; "You search around for anything you may have overlooked earlier, but you don't find anything new."; ]; Object police with name 'police', before [; CallFor: "You can't call the police from here."; default: "You can't see any such thing."; ], found_in [; return location;], has pluralname animate concealed; !for easy parsing [CallForSub; print"You call for ", (the) noun, ", but either "; PronounNom(noun); print " doesn't hear you or "; PronounNom(noun); " is ignoring you."; ]; [ TalkSub; if (noun == player) print_ret "Nothing you hear surprises you."; if (RunLife(noun,##Talk) ~= false) return; ! consult life[; Talk: ] print_ret "At the moment, you can't think of anything to say."; ]; [KnockSub; "You knock on it, but doing so achieves nothing."; ]; ! == Grammer extensions === Verb 'talk' 't//' 'converse' 'chat' 'gossip' * 'to'/'with' creature -> Talk * creature -> Talk * 'to'/'with' creature 'about' topic -> Ask; Verb 'call' * creature -> CallFor * 'for'/'to' creature -> CallFor; Verb 'knock' * noun -> Knock * 'on' noun -> Knock; Verb 'kick' * noun -> Attack; Verb 'force' * noun -> Attack; Verb 'pound' * noun -> Attack * 'on' noun -> Attack; Extend 'read' first * legible -> Read; Extend 'search' first * -> SearchLocation * 'room'/'location' -> SearchLocation; Extend 'look' * 'around' -> SearchLocation; !============================================================================