!!! Changes made after submission: !!! Changed up_to and down_to to u_to and d_to !!! added location check for output in station_lights daemon !!! added newline to tunnels message !!! moved braces to the right places in station_lights.react_before !!! more detailed information terminal analysis of the ray gun -Rob ! IF-Whispers 1 ! Segment 6 ! by Admiral Jota ! Started: 07-29-05 - Finished: 07-31-05 ! This next object just exists to fix a bug with the popcorn (it couldn't be ! removed from the kettle, but still had to react to Give, Show, and Eat). Still ! sub-optimal because couldn't figure out the intended value of second for the ! action_to_be, preventing me from actually generating replacement actions for ! Give and Show. Object oily_substance kettle with name 'oil' 'oily' 'substance' 'residue', author "Jota", short_name [; if (kettle has general) { if (popcorn in kettle) print "oily residue"; else print "oily substance mixed with corn kernels"; } else print "oily substance"; return 1; ], before [; Take, Remove, Examine: if (popcorn in kettle) { "The oil is just a thin film on the bottom of the kettle."; } "The oil is just a thick film on the bottom of the kettle."; default: <<(action) kettle>>; ], react_before [; Take: if (noun == popcorn && onotheld_mode) { if (action_to_be == ##Eat) { action = ##Eat; return popcorn.before(); } if (action_to_be == ##Give or ##Show) { "It's not really practical to take the popcorn out of the kettle, so you might as well just offer the whole kettle."; } } ], has scenery; ! This object slightly modifies the behavior of the button that summons the ! monorail car, to make it consistent with the controls on the car itself. ! It also handles the entrance to the elevator. Object station_lights "light fixtures" deserted_station with name 'light' 'fixtures' 'lights', author "Jota", description "They're covered in grime and dust, but they still shed a weak and intermittent illumination over your surroundings.", before [; Examine: rfalse; default: "The light fixtures are high out of reach."; ], describe [; station_elevator.door_to = inside_elevator; self.describe = "^Dingy light fixtures flicker high above you."; return self.describe(); ], react_before [; Push: if (noun ~= station_button) rfalse; if (flatbed_car in deserted_station) { "Nothing seems to happen."; } StartDaemon(self); Go: if (noun == n_obj) { PlayerTo(inside_elevator); rtrue; } Enter: if (noun == station_elevator) { PlayerTo(inside_elevator); rtrue; } ], daemon [; if (self.number == 0) { self.number++; return; } self.number = 0; StopDaemon(self); move flatbed_car to transport_tunnel; if (player in flatbed_car) { PlayerTo(flatbed_car); StartDaemon(control_lever); } if (location == deserted_station or transport_tunnel) "^The car lurches and accelerates away from the platform."; ], number 0, has pluralname light; ! I'm not using up_to for anything, but I'm defining it in case you want ! to do anything with it (by overwriting mine). I'm told the elevator is ! supposed to go up to the surface. Object inside_elevator "Elevator" with author "Jota", description "The interior of this elevator has been badly vandalized. The walls are covered with graffiti, and the control panel seems to be in bad shape as well. To the south, the doors lead back out.", s_to deserted_station, out_to deserted_station, u_to 0, has light; Object elevator_walls "walls" inside_elevator with name 'walls' 'graffiti' 'graffitti' 'grafitti' 'grafiti', author "Jota", description [; print "You look at a random piece of graffiti.^^"; style underline; switch (random(14)) { 0: print "Blitheads do it with parrots"; 1: print "Grue knew XYZZY"; 2: print "Jota wuz here"; 3: print "The Great Cat will return again!"; 4: print "VULCS GO HOME!"; 5: print "Isaac + Laverne"; 6: print "mV"; 7: print "Where have all the holos gone? Long time passing"; 8: print "FRELL"; 9: print "tHis Nott Lok Lik RmE nEmoR"; 10: print "Down with monkeys!"; 11: print "KIRK SHOT FIRST"; 12: print "Thor sucks Goauld "; default: style roman; print "This one is illegible"; } style roman; "."; ], has pluralname scenery; Object elevator_panel "control panel" inside_elevator with name 'control' 'panel' 'controls' 'slot' 'buttons' 'button' 'lights' 'light', author "Jota", description [; print "It looks like the control panel was has been freshly demolished, perhaps by some energy weapon. You can see what must have once been buttons and lights, but they're completely unusable now."; if (identity_card hasnt moved) { " You notice there's still a plastic card half sticking out of a slot along one side of the panel."; } else ""; ], before [; Push, SwitchOn: "The controls are useless now."; Search: <>; ], has scenery; ! It should never actually be possible to request information on the ID card ! from the information terminal, since it has to be inside the terminal for it ! to work, but I wanted to demonstration how the terminal_information field ! worked anyway. Object identity_card "plastic card" inside_elevator with name 'plastic' 'identity' 'identification' 'id' 'card' 'magnetic' 'strip' 'stripe', author "Jota", description [; if (self has moved) { "A cheap piece of blue plastic with the name ~Harry Nodles~ printed on one side and a magnetic stripe on the other."; } "A piece of blue plastic. You can't see much of it from here."; ], terminal_information [; print "A standard identity card, indicating that you are Harry Nodles."; ], has concealed; ! This is just here to set up the open_the_east routine that links the ! (previous author's) monorail terminus to the (my) next area. But since ! it's here, I'll use it to add a couple responses, too. Object monorail_tunnels "tunnels" monorail_terminus with name 'tunnels', author "Jota", description "Tunnels lead off in every direction.", describe [; monorail_terminus.open_the_east = self.open_the_east; self.describe = "^Tunnels lead off in every direction."; return self.describe(); ], open_the_east [; monorail_terminus.e_to = monorail_tunnels.terminus_e_to; ], terminus_e_to [; if (tunnel_maze_middle has general) { print "You follow the now-familiar tunnels through the underground city.^"; return tunnel_maze_middle; } print "You head east into the twisting tunnels, confident that this is where the uniformed woman who shot you must have gone.^"; return tunnel_maze_start; ], react_before [; Attack: if (noun == sick_vagrant) "But how?"; Sing: "You find yourself involuntarily humming the Quick-Pop jingle."; Kiss: if (noun == sick_vagrant) { print "That seems like a seriously bad idea."; if (popcorn has on) { " Who knows what might happen if he catches a whiff of that popcorn on your breath?"; } ""; } ], has static pluralname; ! The maze is a ruse. You just keep going east to get out of it. Everything ! else in it is just to make it look more maze-y. Object tunnel_maze_start "Underground City" with author "Jota", description "You are in a maze of twisty little tunnels, all alike.", w_to [; print "You manage to work your way back to where you just came from. Congratulations.^"; return monorail_terminus; ], e_to [; print "You press on, nearly sure that what you're looking for is in this direction.^"; return tunnel_maze_middle; ], cant_go [; return tunnel_maze_middle.cant_go(); ], has light; Object tunnel_maze_middle "Underground City" with author "Jota", description "You are in a maze of twisty little tunnels, all alike.", w_to [; if (self has general) return monorail_terminus; print "You turn back, looking for the way you came in.^"; return tunnel_maze_start; ], e_to [; if (self has general) return outside_community_center; print "You keep going, in the vain hope that it will eventually lead you "; style underline; print "somewhere"; style roman; print ".^"; return tunnel_maze_end; ], cant_go [ progress; if (self has general) { "You're sure that's not the right way."; } print "You wander through the tunnels aimlessly.^"; switch (location) { tunnel_maze_start: progress = 1; tunnel_maze_middle: progress = 2; tunnel_maze_end: progress = 3; } switch (random(progress+3)) { 6: PlayerTo(tunnel_maze_end); 5: PlayerTo(tunnel_maze_middle); 4: PlayerTo(tunnel_maze_start); 3: PlayerTo(monorail_terminus); default: PlayerTo(tunnel_maze_lost); } ], has light; ! Feel free to replace the before rule if you want to put stuff in the can. ! Also, this provides another terminal_information example. Object soda_can "aluminum can" tunnel_maze_middle with name 'soda' 'can' 'aluminum' 'zap' 'cola', author "Jota", description "According to the logo on the side, this can once contained triple-caffeinated Zap Cola.", before [; Receive: "That seems like a silly thing to try to stuff inside a soda can."; ], terminal_information [; print "An aluminum can manufactured by Poly-Slurp Ltd. for the containment of Zap cola. This can is redeemable for a five-cent deposit at any participating retailer."; ], has container open; Object tunnel_maze_end "Underground City" with author "Jota", description "You are in a maze of twisty little tunnels, all alike.", w_to [; print "You wander back, following paths you're sure you've been through already.^"; return tunnel_maze_middle; ], e_to [; print "You finally emerge from the warren of tunnels.^"; return outside_community_center; ], cant_go [; return tunnel_maze_middle.cant_go(); ], has light; Object tunnel_maze_lost "Underground City" with author "Jota", description "You are in a maze of twisty little tunnels, all alike.", cant_go [; PlayerTo(tunnel_maze_start); ], has light; ! I'm providing a handful of direction properties, in case you'd like to ! override any of them. (I'd suggest setting n_to to something, at least, ! for obvious reasons.) Object outside_community_center "Community Center (outside)" with author "Jota", description "The tunnels open up here, at what must have once been a busy intersection. Most of the buildings surrounding you are boarded up, but the one to the north is open. A sign next to the door says, ~Bitterenders' Community Center~. You can still recognize the tunnel that brought you here, to the west.", w_to [ o; ! This code effectively collapses the maze into one room (including ! consolidating anything the player might have dropped in a misguided ! attempt to map the maze), since at this point the player must have ! already solve it, and there's no point in wasting time on it again. give tunnel_maze_middle general; objectloop (o) { if ((o in tunnel_maze_start || o in tunnel_maze_lost || o in tunnel_maze_end) && o hasnt scenery && o hasnt concealed) { move o to tunnel_maze_middle; } } print "You follow the now-familiar tunnels back through the underground city."; return tunnel_maze_middle; ], e_to 0, n_to 0, sw_to 0, se_to 0, in_to 0, d_to 0, cant_go "The city is a maze of abandoned tunnels. Without some notion of where you need to go, you could get quite lost.", has light; Object community_center_buildings "buildings and tunnels" outside_community_center with name 'buildings' 'building' 'tunnels' 'tunnel' 'bitterenders' 'bitterenders^' 'community' 'center' 'sign' 'boarded' 'boarded-up', author "Jota", description "You are surrounded by boarded up buildings, most likely abandoned, with tunnels snaking out between them in all directions. The Bitterenders' Community Center to the north looks like it's still open.", has scenery; ! The information terminal is intended as a source of generic infodumps. ! If you (or any later author) would like the terminal to respond to any ! of your objects, then provide those objects with a terminal_information ! routine that prints the text the voice should say about it. See the ! identity_card and soda_can objects for examples. Object information_terminal "information terminal" outside_community_center with name 'poly' 'poly-brain' 'brain' 'battered' 'information' 'info' 'info-terminal' 'terminal' 'computer' 'steel' 'box' 'large' 'black' 'scanner' 'scanning' 'panel' 'speaker' 'grille' 'grill' 'slot' 'big' 'letters', author "Jota", description [; print "The terminal is a steel box mounted about shoulder-height. The front of it features a large black scanning panel, a smaller speaker grille, and a slot for a magnetic card. Big letters at the top proclaim that this is a ~POLY-BRAIN INFO-TERMINAL~. Smaller writing below that appears to provide instructions.^"; if (identity_card in self) "^A plastic card is partially sticking out of the slot."; rtrue; ], before [; Receive: if (noun ~= identity_card) { "You try to stick ", (the) noun, " into the slot on the info-terminal, but it doesn't quite fit."; } SwitchOn, SwitchOff: "There's no obvious power switch. Perhaps you should take a look at the instructions."; Touch, Push: if (identity_card notin self) "Nothing happens. Perhaps you need to do something to activate it first."; "A blue light plays over your hand. After a moment, a metallic voice speaks: ~A humanoid hand. Fingerprints do not match those stored on this identity card, Harry Nodles.~"; ], after [; Receive: if (noun == identity_card) "You insert the card into the slot on the info-terminal. After a moment, a metallic voice speaks: ~Thank you for choosing a Poly-Brain information terminal. Please display the object you desire information about to the scanning panel.~"; ], life [ o; Give, Show: if (identity_card notin self) "Nothing happens. Perhaps you need to do something to activate it first."; print "A blue light plays over ", (the) noun, " in your hands. After a moment, a metallic voice speaks: ~"; switch (noun) { leaflet: print "A political tract advocating a contra-indicated philosophy. Read with caution."; city_map: print "A hand-drawn diagram, possibly intended to represent portions of this city."; quantity_of_kernels: print "Fourteen thousand, five hundred and three kernels of genetically modified corn."; ! If you'd like to bust the player for possession of illegal ! weapons, override call_police (but make sure to still have ! it print out some text for the voice to say). ray_gun: self.call_police(); milky_poison, toxin_vial: print "Di-emelyne tetra-zytrate, a poisonous substance known to cause rapid deterioration of the body resembling extremely advanced age, ultimately resulting in death. Poly-Brain Ltd. recommends strongly against the consumption of di-emelyne tetra-zytrate."; charred_notes: print "A damaged text regarding the Karaktus event, a global ashfall during the Oligocene epoch which caused the extinction of a number of large mammals. Its cause is unknown, although confirmed to be neither volcanic nor meteoritic."; ! The kettle shouldn't be available at this point unless it's ! full of poisoned popcorn, but I'll check its status just in ! case. kettle: print "An iron pot containing"; objectloop (o in kettle) { if (o ~= popcorn && o ~= oily_substance) print (a) o, ", "; } if (popcorn in kettle) { print " six hundred, forty-nine popped kernels of genetically modified corn, twenty-six unpopped kernels of genetically modified corn"; if (popcorn has general) { print ", a minute quantity of di-emelyne tetra-zytrate"; } print " and"; } else if (kettle has general) { print " six hundred, seventy-five unpopped kernels of genetically modified corn and"; } print " a small quantity of vegetable oil."; if (popcorn has general) print " Poly-Brain Ltd. recommends strongly against the consumption of di-emelyne tetra-zytrate."; default: if (noun provides terminal_information) { PrintOrRun(noun, terminal_information); } else { print "Error. Some databanks inaccessible. Please contact a qualified Poly-Brain Ltd. service engineer."; } } "~"; Kiss: if (identity_card notin self) "Nothing happens. Perhaps you need to do something to activate it first."; "A blue light plays over your face. After a moment, a metallic voice speaks: ~A pair of humanoid lips, slightly chapped.~"; Ask, Tell, Answer: "Nothing happens. The terminal doesn't appear to be equipped to handle spoken queries."; ], orders [; "Nothing happens. The terminal doesn't appear to be equipped to handle spoken queries."; ], call_police [; !!! Extra description added, just to kind of match the quality of !!! the other scanner analyses. -Rob print "Prototype model XPQ-2900 high energy, hand-held, photon cannon. Contains nuclear power source and focusing optics encased in a shielded polysilicate shell. "; print "A thermal energy weapon. The possession of such weapons within city limits requires a class three munitions permit."; ], describe "^A battered information terminal slumps against a wall to the south.", has animate static container open neuter; ! Out of the objects mentioned above (aside from the ones I introduced myself), ! I'm pretty sure the player *must* have the raygun in order to reach the ! point. She may or may not have the kettle with popcorn in it (which can't ! be removed) depending on how an earlier puzzle was solved, but if she does ! have it, it *will* be poisoned. If she has the kettle, she'll also have the ! map. I'm presuming there's a good chance she'll have the poison, although I ! don't actually know. As for everything else, I have no idea. Object terminal_instructions "instructions" outside_community_center with name 'smaller''writing' 'instructions', author "Jota", description "~To receive information regarding an object, first insert your identity card into the slot, then display the item in question to the scanner.~", has scenery pluralname;