!!! Changes made after submission: !!! Renamed property 'corridor' to 'corridor1' due to name collision with another segment !!! Moved code from extra submitted file into this one !!! added synonym 'boarded' to gamma_door !!! moved synonym 'boarded' to delta_door !!! fixed a couple of typos in output text !!! Added code to handle the name 'slot' for the doors, and to try putting the cards in the slots. !!! added some missing periods to descriptions !!! added openable and a before:Open to the box of donuts !!! changed wide_door.initial to describe (to kill errant newline in south_corridor) ! IF Whispers, Segment 10: katre and Duchess Object donuts "box of donuts" inside_base with name 'box' 'donut' 'donuts' 'of', author "katre and Duchess", description [; if (self.eaten_by) { print_ret "The empty box sits there, with ", (name) self.eaten_by, " staring at it."; } else { "A small box which says ~Hertz Donuts~ on the top, which probably contains about a dozen donuts."; } ], eaten_by nothing, before [; Take: if (self hasnt moved) { "The receptionist smacks your hand away from the box. ~Those are reserved for the researchers, thank you,~ she says."; } Open: !!! It's a box, the game should at least acknowledge trying to open it. -Rob if (self.eaten_by) "The donuts are all gone already. "; "The receptionist smacks your hand away from the box. ~Those are reserved for the researchers, thank you,~ she says."; ], initial [; east_corridor.e_final = pharma_closet; east_corridor.s_to = wide_door; "A box of donuts sits on the receptionist's desk."; ], has openable; ! This sets up connections Object wide_door "wide door" with name 'wide' 'door', author "katre and Duchess", description [; if (self in east_corridor) { "A wide door leads off to the south."; } else { "A wide door leads off to the north."; } ], describe [; if (self in east_corridor) { "^There is a wide door leading to the south."; } rtrue; ], before [; Open, Close: "The door is fixed open."; ], door_dir [; if (self in east_corridor) return s_to; return n_to; ], door_to [; if (self in east_corridor) return south_corridor; return east_corridor; ], found_in east_corridor south_corridor, has static door open openable; ! Supply closet area Object pharma_closet "Pharmaceutical Supplies, C-H" with author "katre and Duchess", describe [; print "The supply closet is dimly lit with a light bulb hanging on a string, just out of your reach. Cabinets rise up from the floors to the ceiling and line all four walls, making the room seem even more cramped than it really is. The dinged-up aluminum doors on the cabinets are tightly shut. There is a door leading back to the corridor to the south.^"; if (self hasnt visited) { print "^You quickly rummage around and find the cabinet that should contain the cetaphenyl.^"; } rtrue; ], s_to [; print "You head back into the corridor.^"; return east_corridor; ], has light; Object pharma_sign "sign" pharma_closet with author "katre and Duchess", name 'sign', description "A large sign on the wall reads ~MEDICAL DEPARTMENT ACCESS ONLY~", has static scenery; Object cabinet "cabinet" pharma_closet with author "katre and Duchess", name 'cabinet' 'cetaphenyl' 'rusty' 'rusted', description "The cabinet is huge and rusty.", with_key cabinet_key, has scenery openable ~open lockable locked container; Object cetaphenyl "bottle of cetaphenyl" cabinet with author "katre and Duchess", name 'bottle' 'of' 'cetaphenyl', description "A small dusty bottle, the label reads ~CETAPHENYL~.", before [; Take: "As you reach out to take the cetaphenyl [SOMETHING HAPPENS. HI MARKM!]"; ! put your stuff here, next guy ], has container ~open; ! The office area Class LabRoom with author "katre and Duchess", has light; Class LabKey with author "katre and Duchess", short_name "plastic card", description "A flat plastic card with a black stripe on the back.", before [; Insert: if (second has door) { <>; } ], ; Class LabDoor with author "katre and Duchess", corridor1 0, corridor_dir 0, lab 0, lab_dir 0, corridor_desc "A basic door.", lab_desc "A basic door.", parse_name [ wd n; wd = NextWord(); while (WordInProperty(wd, self, name) || (self in self.corridor1 && wd == 'slot')) { n++; wd = NextWord(); } return n; ], description [; if (self in self.corridor1) { print (string)self.corridor_desc; print_ret " There is a small slot above the handle."; } else { print_ret (string)self.lab_desc; } ], door_dir [; if (self in self.corridor1) { return self.lab_dir; } else { return self.corridor_dir; } ], door_to [; if (self in self.corridor1) { return self.lab; } else { return self.corridor1; } ], found_in [; if (location == self.corridor1 or self.lab) { rtrue; } else { rfalse; } ], react_before [; Go: if (noun.door_dir == self.door_dir()) { return self.open_by_myself(); } Enter: if (noun == self) { return self.open_by_myself(); } ], open_by_myself [ ks; if (self has open) rfalse; print "(first opening ", (the) self, ")^"; ks = keep_silent; keep_silent = true; ; keep_silent = ks; if (self hasnt open) rtrue; ], has scenery static door openable ~open lockable locked; Class LabResearcher with author "katre and Duchess", description [; print_ret (name) self, " stands about 6 feet tall, a thin, balding man wearing a white lab coat."; ], initial [; if (parent(self) ofclass LabRoom) { deadflag = 1; print_ret (name) self, " turns to you as you walk in. ", (string) self.kill_message; } print_ret (name) self, " stands around awkwardly."; ], orders [; NotUnderstood: print_ret (name) self, " says, ~Make sense, you.~"; default: print_ret (name) self, " says, ~I'm far too busy to think about that now.~"; ], life [; Answer, Ask, Tell: switch (second) { t_donut: if (donuts.eaten_by) { print_ret "~I hear ", (name) donuts.eaten_by, " got them all already, the pig.~"; } else { move self to parent(donuts); donuts.eaten_by = self; print "~Ooh, I love donuts.~^"; intercom.deactivate(); rtrue; } t_cetaphenyl: "~I'm afraid that's restricted information. What's your security clearance, anyway?~"; t_delta: "~It's such a shame, really, about my clone-brother.~"; default: print_ret (name) self, " says, ~I don't know about that, it's outside my specialty.~"; } default: print_ret (name) self, " says, ~I'm a very busy man, you know.~"; ], has animate proper; ! Conversational topics the researchers know about ! From http://www.firthworks.com/roger/infact/convers1.html Object Topics "conversational topics"; Object -> t_donut "donuts" with name 'donut' 'donuts'; Object -> t_cetaphenyl "cetaphenyl" with name 'cetaphenyl'; Object -> t_delta "Dr. Delta" with name 'doctor' 'delta' 'dog'; Object south_corridor "XPQ, Southern Base Corridor" with author "katre and Duchess", description "This corridor has one office on each side, and continues to the south. A door labelled ~Alpha Lab~ is to the west, and a door labelled ~Beta Lab~ is to the east. A wide door leads back north.", n_to wide_door, w_to alpha_door, e_to beta_door, s_to south_corridor_2, has light; ! Alpha office LabKey alpha_key "alpha key" with name 'alpha' 'card' 'plastic' 'keycard'; LabDoor alpha_door "door to Alpha Lab" with name 'alpha' 'door' 'lab', with_key alpha_key, corridor1 south_corridor, corridor_dir e_to, corridor_desc "A door to the west bears a sign saying ~Alpha Lab.~", lab alpha_lab, lab_dir w_to, lab_desc "A door to the east heads into the corridor.", ; LabRoom alpha_lab "Alpha Lab" with description "This cluttered space is filled with various springs and sprockets and strange contraptions. A door leads east to the corridor.", e_to alpha_door; Object alpha_desk "desk" alpha_lab with author "katre and Duchess", name 'desk', description "A sturdy desk sits in the middle of the room.", has static supporter; Object springs "springs" alpha_lab with author "katre and Duchess", name 'spring' 'springs' 'sprocket' 'sprockets' 'strange' 'contraption' 'contraptions', description "There are various weird springs and contraptions all over.", has scenery; LabResearcher doctor_able "Dr. Able" alpha_lab with name 'doctor' 'able' 'alpha', kill_message "~Ahh! My new assistant! Today we will be testing the effect of the new high-powered laser on human flesh.~ He quickly drags you over to the wall, straps you to some restraints, and says, ~According to theory, this won't hurt a bit.~ He is wrong.", has; ! Beta office LabKey beta_key "beta key" with name 'beta' 'keycard' 'card' 'plastic'; LabDoor beta_door "door to Beta Lab" with name 'beta' 'door' 'lab', with_key beta_key, corridor1 south_corridor, corridor_dir w_to, corridor_desc "A door to the east bears a sign saying ~Beta Lab.~", lab beta_lab, lab_dir e_to, lab_desc "A door to the west heads into the corridor.", ; LabRoom beta_lab "Beta Lab" with description "This cluttered space is filled with various bubbling flasks and hissing distillation equipment. A door leads west to the corridor.", w_to beta_door; Object beta_desk "desk" beta_lab with author "katre and Duchess", name 'desk', description "A sturdy desk sits in the middle of the room.", has static supporter; Object flasks "flasks" beta_lab with author "katre and Duchess", name 'flask' 'flasks' 'distillation' 'hissing' 'equipment', description "Many flasks sit around the room bubbling and boiling.", has scenery; LabResearcher doctor_baker "Dr. Baker" beta_lab with name 'doctor' 'baker' 'beta', kill_message "~Excellent, I've been waiting for you to come clean out the waste buckets.~ He shows you a three-foot deep bucket filled with curdled and stinky chemical waste. Very quickly, your eyes start to water. As you start to pass out, you notice your head is going to land right in the bucket...", has; ! Next corridor section Object south_corridor_2 "XPQ, Southern Base Corridor" with author "katre and Duchess", description "This corridor has one office on each side, and continues from north to south. A door labelled ~Gamma Lab~ is to the west, and the door to the east has been boarded up.", n_to south_corridor, w_to gamma_door, e_to delta_door, s_to south_corridor_3, has light; ! Gamma office LabKey gamma_key "gamma key" with name 'gamma' 'keycard' 'card' 'plastic'; LabDoor gamma_door "door to Gamma Lab" with name 'gamma' 'door' 'lab', with_key gamma_key, corridor1 south_corridor_2, corridor_dir e_to, corridor_desc "A door to the west bears a sign saying ~Gamma Lab.~", lab gamma_lab, lab_dir w_to, lab_desc "A door to the east heads into the corridor.", ; LabRoom gamma_lab "Gamma Lab" with description "This cluttered space is filled with medical diagrams and models. A complete skeleton leers at you from the corner. A door leads east to the corridor.", e_to gamma_door; Object gamma_desk "desk" gamma_lab with author "katre and Duchess", name 'desk', description "A sturdy desk sits in the middle of the room.", has static supporter; Object cabinet_key "cabinet key" gamma_desk with author "katre and Duchess", name 'cabinet' 'key', description "A small nondescript key, about 3 cm long.", has; Object skeleton "skeleton" gamma_lab with author "katre and Duchess", name 'skeleton' 'bone' 'bones' 'intact' 'complete', description "The intact skeleton stands in a corner, grinning at everyone in the room.", has scenery; Object medical_diagrams "diagrams" gamma_lab with author "katre and Duchess", name 'medical' 'diagram' 'model' 'teeth', description "There are several unsavory posters on the wall, and a clacking set of teeth sitting on the desk.", has scenery; LabResearcher doctor_charley "Dr. Charley" gamma_lab with name 'doctor' 'charley' 'gamma', kill_message "~Ah, my new vivisection candidate. Please take a deep sniff of this.~ He puts a sweet-smelling handkerchief up to your face, and you quickly fall asleep.", has; ! Delta door - closed off LabKey delta_key "delta key" with name 'delta' 'keycard' 'card' 'plastic'; Object delta_door "boarded door" south_corridor_2 with author "katre and Duchess", name 'door' 'delta' 'lab' 'boarded', description "This door is boarded up and won't open.", has scenery static door ~open; ! last corridor section Object south_corridor_3 "XPQ, Southern Base Corridor" with author "katre and Duchess", description "The corridor ends here. There is a door labelled ~Epsilon Lab~ to the west, and two smaller rooms to the south and east. The corridor extends back to the north, the way you came.", n_to south_corridor_2, w_to epsilon_door, e_to supply_door, s_to machine_room_door has light; ! Epsilon office LabKey epsilon_key "epsilon key" with name 'epsilon' 'keycard' 'card' 'plastic'; LabDoor epsilon_door "door to Epsilon Lab" with name 'epsilon' 'door' 'lab', with_key epsilon_key, corridor1 south_corridor_3, corridor_dir e_to, corridor_desc "A door to the west bears a sign saying ~Epsilon Lab.~", lab epsilon_lab, lab_dir w_to, lab_desc "A door to the east heads into the corridor.", ; LabRoom epsilon_lab "Epsilon Lab" with description "This cluttered space is filled with petri dishes and small ferns. A door leads east to the corridor.", e_to epsilon_door; Object epsilon_desk "desk" epsilon_lab with author "katre and Duchess", name 'desk', description "A sturdy desk sits in the middle of the room.", has static supporter; Object fern "fern" epsilon_lab with author "katre and Duchess", name 'fern' 'petri' 'dish', description "A small fern sits on the desk, with a collection of petri dishes surrounding it.", has scenery; LabResearcher doctor_echo "Dr. Echo" epsilon_lab with name 'doctor' 'echo' 'epsilon', kill_message "~Oh, wonderful, I need to test the toxicity of the latest bacteria.~ He then walks up to you and quickly injects you with a few ccs of some strange fluid. Luckily for him, it is very toxic.", has; Object supply_door "supply closet door" with author "katre and Duchess", name 'supply' 'closet' 'door', description [; if (self in south_corridor_3) { "A door leads east."; } else { "A door leads back to the west."; } ], door_dir [; if (self in south_corridor_3) return e_to; return w_to; ], door_to [; if (self in south_corridor_3) return supply_closet; return south_corridor_3; ], found_in supply_closet south_corridor_3, has scenery static door open; Object supply_closet "Supply Closet" with author "katre and Duchess", description "You are inside a small supply closet that is almost bare, except for an intercom attached to the wall and a sign next to it. There is a door leading back to the west.", w_to supply_door, has light; Object sign "sign" supply_closet with author "katre and Duchess", name 'sign' 'list', description [; print "A small sign tacked up on the wall:^"; font off; print " Physics - Alpha^"; print " Chemistry - Beta^"; print " Medicine - Gamma^"; print " xxxxxxxxxxxxxxxx^"; print " Biology - Epsilon^"; font on; rtrue; ], has static scenery; Object intercom "intercom" supply_closet with author "katre and Duchess", name 'intercom' 'speaker', description "A small white intercom, with five buttons, labelled ~ABLE~, ~BAKER~, ~CHARLEY~, blank, and ~ECHO~.", current_button nothing, connected_to nothing, add_to_scope [ o; if (self.connected_to && scope_reason == TALKING_REASON) { objectloop (o in self.connected_to && o has animate or talkable) { PlaceInScope(o); } } ], activate [button room o researcher; if (self.connected_to) { ; } button.is_on = true; self.current_button = button; self.connected_to = room; print (The) button, " lights up.^"; objectloop (o in room && o has animate or talkable) { researcher = o; } print_ret (name) researcher, " says, ~Yes, what is it?~"; ], deactivate [ button; self.current_button.is_on = false; button = self.current_button; self.current_button = nothing; self.connected_to = nothing; print_ret (The) button, " goes dark."; ], before [; Take: "That's fixed to the wall."; SwitchOn: "You'll need to specify who you want to talk to."; SwitchOff: if (self.current_button) { <>; } ], has static transparent scenery; Class IntercomButton with author "katre and Duchess", is_on false, connects_to nothing, before [; Push: if (self.is_on) { <>; } else { <>; } ], after [; SwitchOn: intercom.activate(self, self.connects_to); rtrue; SwitchOff: intercom.deactivate(); rtrue; ], has switchable ~proper; IntercomButton able_button "~ABLE~ button" intercom with name 'able' 'button', description "A small button with a label saying ~ABLE~.", connects_to alpha_lab; IntercomButton baker_button "~BAKER~ button" intercom with name 'baker' 'button', description "A small button with a label saying ~BAKER~.", connects_to beta_lab; IntercomButton charley_button "~CHARLEY~ button" intercom with name 'charley' 'button', description "A small button with a label saying ~CHARLEY~.", connects_to gamma_lab; Object blank_button "~BLANK~ button" intercom with author "katre and Duchess", name 'blank' 'button', description "A small button with a blank_label.", before [; Push: "Nothing happens."; ], after [; SwitchOn,SwitchOff: "Nothing happens."; ], has switchable; IntercomButton echo_button "~ECHO~ button" intercom with name 'echo' 'button', description "A small button with a label saying ~ECHO~.", connects_to epsilon_lab; Object machine_room_door "machine room door" with author "katre and Duchess", description [; if (self in south_corridor_3) { "A door leads south, with a sign that says ~MACHINE ROOM~."; } else { "A door leads back to the north."; } ], door_dir [; if (self in south_corridor_3) return s_to; return n_to; ], door_to [; if (self in south_corridor_3) return machine_room; return south_corridor_3; ], found_in machine_room south_corridor_3, has static door open scenery; Object machine_room "Machine Room" with author "katre and Duchess", description "This room is full of support machines used throughout the building. At this time, almost all of the machines are powered down and covered with dust cloths, except for one machine in the corner. There is a door to the north leading back to the corridor.", n_to machine_room_door, has light; Object old_machines "old machines" machine_room with author "katre and Duchess", name 'old' 'machine' 'machines' 'dust' 'cloth' 'cloths', description "The old machines don't seem to have power or supplies any more." has scenery; Object key_device "device" machine_room with author "katre and Duchess", name 'key' 'maker' 'device', description "A large device with a small control panel on the front.", initial "There is one device left that seems to have power.", has static transparent; Object key_control_panel "control panel" key_device with author "katre and Duchess", name 'control' 'panel' 'readout', description [; print "The control panel has a dial, a button, and a readout. The readout currently says "; if (key_device has general) { print "0"; } else { print "1"; } "."; ], has static; Object key_button "button" key_device with author "katre and Duchess", name 'button', description [; print "There is a "; if (parent(self) has general) { print "unlit"; } else { print "glowing green"; } " button on the control panel."; ], before [; Push: if (parent(self) has general) { "The device produces a small click but nothing further."; } else { give parent(self) general; move key_dial.choice.with_key to player; "A small plastic card shoots out of the device. You pick it up and put it in your pocket."; } ], has static; Object key_dial "dial" key_device with author "katre and Duchess", name 'dial', choice dial_alpha, description [; "The dial is currently set to ", (name) self.choice, "."; ], before [; Turn: self.choice = self.choice.next_setting; "You turn the dial to ", (name) self.choice, "."; Set,SetTo: "You need to keep turning the dial to set it."; ], has static; Object dial_alpha "alpha" key_dial with author "katre and Duchess", name 'alpha', with_key alpha_key, next_setting dial_beta; Object dial_beta "beta" key_dial with author "katre and Duchess", name 'beta', with_key beta_key, next_setting dial_gamma; Object dial_gamma "gamma" key_dial with author "katre and Duchess", name 'gamma', with_key gamma_key, next_setting dial_delta; Object dial_delta "delta" key_dial with author "katre and Duchess", name 'delta', with_key delta_key, next_setting dial_epsilon; Object dial_epsilon "epsilon" key_dial with author "katre and Duchess", name 'epsilon', with_key epsilon_key, next_setting dial_alpha; !!! The following was submitted as a separate file, seg10grammar.h. ! Taken from http://www.firthworks.com/roger/infact/convers1.html [ TopicScope; switch(scope_stage) { 1: rfalse; 2: ScopeWithin(Topics); rtrue; 3: "At the moment, even the simplest questions are confusing."; } ]; !Extend 'look' first ! * -> Look ! * 'up' scope=TopicScope 'in' noun -> Consult reverse; !Extend 'consult' first ! * noun 'about' scope=TopicScope -> Consult; Extend 'ask' first * creature 'about' scope=TopicScope -> Ask; Extend 'tell' first * creature 'about' scope=TopicScope -> Tell; !Extend 'answer' first ! * scope=TopicScope 'to' creature -> Answer;