! ---------------------------------------------------------------------------- ! Museum 961111 One of the standard Inform 6 example games ! ! created: 20.12.95 ! translated to Inform 6: 11.11.96 ! ! This "game" is a compendium of solved exercises from the Designer's ! Manual. Room numbers are section numbers within the Third Edition. ! Many of these exercises are difficult, and so is some of the code below. ! ---------------------------------------------------------------------------- Constant Story "MUSEUM OF INFORM"; Constant Headline "^An Interactive Companion to the Designer's Manual (Third Edition)^"; ! The game is meant to be experimented with, so we always define: Constant DEBUG; Release 2; Serial "961111"; Replace DrawStatusLine; Include "Parser"; ! -------------------------------------------------------------------------- Object samples_bag "samples bag" with description "A capacious SACK_OBJECT (see section 20).", name "samples" "bag", article "your", when_closed "Your samples bag lies on the floor.", when_open "Your samples bag lies open on the floor.", has container open openable; Constant SACK_OBJECT = samples_bag; Include "VerbLib"; ! -------------------------------------------------------------------------- Attribute crewmember; Property weight 10; Class Key with name "key"; ! -------------------------------------------------------------------------- Object Foyer "Foyer" has light with description "The foyer of the magnificent Museum of Inform. A flight of stairs sweeps upward to Chapters V and VI, and corridors fan out on this level into Chapter IV. These run:^ ^ north into Room 10 (the Halls of Sense and Direction), ^ south along Corridor 12 (doors) to Room 13 (switches), ^ @00 to Room 11 (the Wonderful World of Containers) ^ and @01 to Room 14 (which houses larger exhibits).^^ (And a plain ladder descends into the basement; you can also step out onto a balcony.)", e_to Room11, u_to Second_Floor, n_to Room10, s_to Corridor12, w_to Room14, d_to basement, out_to balcony; Object -> "map" with name "map" "ground" "floor", initial "A map of the ground floor is embossed in one wall.", description [; font off; print "^+------------------------------------------+ ^| (mirror) | ^| Weights Room 10 --- Room 10a | ^| Room senses directions | ^| | | | ^| Room 14 --- Foyer --- Room 11 | ^| (changing (you are here) containers | ^| character) | | ^| | | ^| Room 15 --- Corridor 12 | ^| (MS room) (door, curator) | ^| (Bible) | | ^| Switches Hall 13 | ^| (chasm) | ^| | | ^| Far Side of Room 13 | ^+------------------------------------------+^"; font on; ], has static; ! -------------------------------------------------------------------------- Object basement "Museum Basement" with u_to Foyer, description "Once Room 17, this space has been abandoned by the curators, who have simply sprayed its walls with moth-repellent and abandoned it.", before [; Smell: "Napthalene."; ]; ! -------------------------------------------------------------------------- Object Room10 "Hall of Senses" with description "This is Room 10, north of the foyer. If you try going further north, a string will be printed instead. The exit to the @00 has a routine attached, and randomly leads either to the Directions Room or back to the foyer.", s_to Foyer, n_to "This string is the ~n_to~ value for this room.", e_to [; if (random(2)==1) return Foyer; return Room10a; ], has light; Object -> "TRAP lever" with name "trap" "lever", before [; Pull, Push: if (self has on) <>; <>; ], after [; SwitchOn: move orange_cloud to location; "Clunk! An orange cloud suddenly descends upon you."; SwitchOff: remove orange_cloud; "Click! The orange cloud vanishes."; ], has switchable static; Object -> "gold watch" with name "gold" "watch", description "The watch has no hands, oddly.", react_before [; Listen: if (noun==0 or self) "The watch ticks loudly."; ]; Object -> "sprig of lavender" with name "sprig" "of" "lavender", react_before [; Smell: if (noun==0 or self) "Lavender-perfume. Ahh!"; ]; Object orange_cloud "orange cloud" with name "orange" "cloud", react_before [; Look: "You can't see for the orange cloud surrounding you."; Go, Exit: "You wander round in circles, choking."; Smell: if (noun==0 or self) "Cinnamon? No, nutmeg."; ], has scenery; ! -------------------------------------------------------------------------- ! For east-west reflection ! -------------------------------------------------------------------------- Lowstring east_str "east"; Lowstring west_str "west"; [ NormalWorld; string 0 east_str; string 1 west_str; e_obj.door_dir = e_to; w_obj.door_dir = w_to; ]; [ ReversedWorld; string 0 west_str; string 1 east_str; w_obj.door_dir = e_to; e_obj.door_dir = w_to; ]; Object Room10a "Hall of Directions" with name "mirror", description "An annexe to Room 10: the main exit is back @01, and there's a curiously misty mirror on the north wall. Also, there's an exit in the fourth, ~hyper~ dimension (which is only visible in the weird geometry of this room).", initial [; move hyper to compass; StartDaemon(hyper); ], w_to Room10, n_to [; print "Walking through the mirror is confusing...^"; if (self has general) NormalWorld(); else ReversedWorld(); if (self has general) give self ~general; else give self general; <>; ], in_to [; print "Amazing! Your body corkscrews as you pass.^"; return Room11; ], has light; Object hyper "hyper-dimensional direction" with name "hyper" "fourth" "dimension", article "the", door_dir in_to, daemon [; if (location ~= Room10a) { remove self; StopDaemon(self); } ], has scenery; ! -------------------------------------------------------------------------- Object Room11 "Wonderful World of Containers" with description "This is Room 11, @00 of the foyer. You notice a typical piece of scenery which turns out to be a supporter: a mantelpiece.", w_to Foyer, has light; Object -> "bearded psychiatrist" with name "bearded" "doctor" "psychiatrist" "psychologist" "shrink", initial "A bearded psychiatrist has you under observation.", life [; "He is fascinated by your behaviour, but makes no attempt to interfere with it."; ], react_after [; Insert: print "~Subject puts ", (a) noun, " in ", (the) second, ". Interesting.~^"; PutOn: print "~Subject puts ", (a) noun, " in ", (the) second, ". Interesting.~^"; ], react_before [; Take, Remove: print "~Subject feels lack of ", (the) noun, ". Suppressed Oedipal complex? Mmm.~^"; ], has animate; Object -> "mantelpiece" with name "mantel" "mantle" "piece" "mantelpiece" has scenery supporter; Object -> "green ball" with name "green" "ball"; Object -> "red cone" with name "red" "cone"; Object -> "blue pyramid" with name "blue" "pyramid"; Object -> "plain shopping bag (which can only hold 2 things)" with name "plain" "shopping" "bag", capacity 2, has container open; Object -> "glass box with a lid" with name "glass" "box" "with" "lid" has container transparent openable open; Object -> "steel box with a lid" with name "steel" "box" "with" "lid" has container openable open; Key -> bolted_key "bolted key" with name "bolted"; Object -> "toothed bag" with name "toothed" "bag", description "A capacious bag with a toothed mouth.", before [; LetGo: "The bag defiantly bites itself shut on your hand until you desist."; Close: "The bag resists all attempts to close it."; ], after [; Receive: "The bag wriggles hideously as it swallows ", (the) noun, "."; ], has container open; Object -> "bolted cupboard" with name "bolted" "cupboard", describe [; if (self hasnt open) "^A pretty typical shut cupboard is bolted to one wall."; "^Bolted up on one wall is an open cupboard."; ], with_key bolted_key has locked container openable lockable static; Object -> "portable television set" with name "tv" "television" "set" "portable", initial "A portable television set has two sub-objects attached: a power button and a screen.", before [; SwitchOn: <>; SwitchOff: <>; Examine: <>; ], has transparent; Object -> -> power_button "power button" with name "power" "button" "switch", after [; SwitchOn, SwitchOff: <>; ], has switchable; Object -> -> screen "television screen" with name "screen", before [; Examine: if (power_button hasnt on) "The screen is black."; "The screen writhes with a strange Japanese cartoon."; ]; Object -> "macrame bag" with name "macrame" "bag" "string" "net" "sack", react_before [; Examine, Search, Listen, Smell: ; default: if (inp1>1 && inp1 in self) print_ret (The) inp1, " is tucked away in the bag."; if (inp2>1 && inp2 in self) print_ret (The) inp2, " is tucked away in the bag."; ], describe [; print "^A macrame bag hangs from the ceiling, shut tight"; if (child(self)==0) "."; print ". Inside you can make out "; WriteListFrom(child(self), ENGLISH_BIT); "."; ], has container transparent static; Object -> -> "music box" with name "music" "box" "musical", description "Attractively lacquered.", react_before [; Listen: if (noun==0 or self) "The musical box chimes some Tchaikovsky."; ]; ! -------------------------------------------------------------------------- Object Corridor12 "Corridor 12" with description "Runs south of the foyer. A side exit leads @01 to Room 15, the manuscripts room.", n_to Foyer, s_to Oak_Door, w_to Room15, has light; Object -> "sinister curator" with name "sinister" "curator", initial [; if (self hasnt general) "A sinister curator leans against the wall, asleep."; "The curator is here, casting menacing looks."; ], daemon [ i p j n k; if (random(3)~=1 || self hasnt general) rfalse; p=parent(self); objectloop (i in compass) { j=p.(i.door_dir); if (ZRegion(j)==1 && j hasnt door) n++; } if (n==0) rfalse; k=random(n); n=0; objectloop (i in compass) { j=p.(i.door_dir); if (ZRegion(j)==1 && j hasnt door) n++; if (n==k) { move self to j; if (p==location) "^The curator stalks away."; if (j==location) "^The curator stalks in."; rfalse; } } ], orders [; if (self hasnt general) "The curator only snores."; "He raises a skeletal finger to his lips. ~Shh!~"; ], life [; WakeOther: if (self hasnt general) { give self general; move self to Foyer; "He wakes and rouses to his feet, pushes past you and stalks away."; } default: "He rears back with disdain."; ], has animate; Object Oak_Door "oaken door" with name "oak" "door" "oaken", description "Despite appearances, there is no key to this door.", door_dir [; if (location==Corridor12) return s_to; return n_to; ], door_to [; if (location==Corridor12) return Room13; return Corridor12; ], describe [; if (self has open) "^The oaken door stands open."; if (self hasnt locked) "^The corridor ends in an oaken door."; ], found_in Corridor12 Room13 has static door openable lockable; ! -------------------------------------------------------------------------- Object Room15 "Manuscripts Room" with description "This is Room 15, adjoining a corridor to the @00.", e_to Corridor12, has light; Object -> "black Tyndale Bible" with name "bible" "black" "book", initial "A black Bible rests on a spread-eagle lectern.", description "A splendid foot-high Bible, which must have survived the burnings of 1520.", before [ w x; Consult: wn = consult_from; w = NextWord(); switch(w) { 'matthew': x="Gospel of St Matthew"; 'mark': x="Gospel of St Mark"; 'luke': x="Gospel of St Luke"; 'john': x="Gospel of St John"; default: "There are only the four Gospels."; } if (consult_words==1) "You read the ", (string) x, " right through."; w = TryNumber(wn); if (w==-1000) "I was expecting a chapter number in the ", (string) x, "."; "Chapter ", (number) w, " of the ", (string) x, " is too sacred for you to understand now."; ]; ! -------------------------------------------------------------------------- Object Room13 "Switches Hall" with description "This is Room 13, at the south end of a long corridor leading north. Progress further south is blocked by a chasm.", n_to Oak_Door, s_to PlankBridge, has light; Object -> "Gotham City searchlight" with name "gotham" "city" "search" "light" "template" "searchlight", article "the", description "It has some kind of template on it.", when_on "The old city searchlight shines out a bat against the alabaster ceiling of the Museum.", when_off "The old Gotham city searchlight has been lovingly restored and housed here." has switchable static; Object -> "basement light switch" with name "basement" "light" "switch", after [; SwitchOn: give basement light; "Click!"; SwitchOff: give basement ~light; "Click!"; ], has switchable static; Object -> PlankBridge "plank bridge" with description "Extremely fragile and precarious.", name "precarious" "fragile" "wooden" "plank" "bridge", when_open "A precarious plank bridge spans the chasm.", door_to [; if (children(player)~=0) { deadflag=1; "You step gingerly across the plank, which bows under your weight. But your meagre possessions are the straw which breaks the camel's back! There is a horrid crack..."; } print "You step gingerly across the plank, grateful that you're not burdened.^"; if (location==Room13) return FarSide; return Room13; ], door_dir [; if (location==Room13) return s_to; return n_to; ], found_in Room13 FarSide, has static door open; Object FarSide "Far Side of Chasm in Room 13" with description "This side of the chasm is dull and dusty after all.", n_to PlankBridge, has light; ! -------------------------------------------------------------------------- Object Room14 "Large Exhibits Room" with description "This is Room 14, @01 of the foyer, which gives onto the Weights Room to the north.", e_to Foyer, n_to Weights_Room, has light; Object -> "hypnotic portrait" with name "hypnotic" "portrait" "warthog" "picture" "of" "hog", initial "A somewhat hypnotic full-length portrait of a warthog hangs on the wall.", before [; Examine: ; print "^...and somehow, so do you...^"; ChangePlayer(hog); <>; ], has static; Object -> "Louis XV chair" with name "louis" "xv" "quinze" "chair", initial "A valuable Louis XV chair takes pride of place.", has enterable supporter; Object -> car "little red car" with name "little" "red" "car" "kar1", description "Large enough to sit inside. Among the controls is a prominent on/off switch. The numberplate is KAR 1.", when_on "The red car sits here, its engine still running.", when_off "A little red car is parked here.", before [; PushDir: AllowPushDir(); rtrue; Go: if (car has on) { Achieved(1); "Brmm! Brmm!"; } print "(The ignition is off at the moment.)^"; ], after [; PushDir: "The car rolls very slowly as you push it."; ], has switchable enterable static container open; Object -> -> "small note" with name "small" "note", description " !!!! FROBOZZ MAGIC CAR COMPANY !!!!^ ^Hello, Driver!^ ^Instructions for use:^ ^Switch on the ignition and off you go!^ ^Warranty:^ ^This car is guaranteed against all defects for a period of 76 milliseconds from date of purchase or until used, whichever comes first.^ ^Good Luck!"; Object -> "Giant" with name "giant", initial "A Giant is here. (And you know the old legend... push a Giant, become a Giant!)", before [; Push: ChangePlayer(self); <>; Take: rtrue; ], number 0, orders [; if (player==self) { if (actor~=self) "You only become tongue-tied and gabble."; if (action==##Push && noun==selfobj) { ChangePlayer(selfobj); <>; } rfalse; } Attack: "The Giant looks at you with doleful eyes. ~Me not be so bad!~"; default: "The Giant is unable to comprehend your instructions."; ], has animate; ! -------------------------------------------------------------------------- Object "Caldera" with description "An old volcanic crater of mud and ash, from which there is nowhere to go.", has light; Object -> hog "Warthog" with name "wart" "hog" "warthog", description "Muddy, sniffing and grunting.", number, orders [; if (player~=self || actor~=self) rfalse; ! So now we have just the case where the player ! is currently the warthog, ordering himself about: Go, Look, Examine, Eat, Smell, Taste, Touch: rfalse; default: "Warthogs can't do anything as tricky as that!"; ], has animate proper; Object -> "red berry" with name "red" "berry" "magic", initial "A magic red berry is half-uncovered in the mud.", before [; Smell, Taste, Touch: print "The blood-smell of the berry brings you back, back...^"; ChangePlayer(selfobj); <>; ]; ! -------------------------------------------------------------------------- Constant CARRYING_STRENGTH = 500; Constant HEAVINESS_THRESHOLD = 100; Object Weights_Room "Weights Room" with description "This is an annexe, south of Room 14. In here (though nowhere else) objects have given weights, and you can carry only a limited total weight. (Items from elsewhere in the museum all weigh 10 zobs, regardless of what they are.) The longer you carry heavy objects, the more tired you become, until you're forced to drop them; your strength recovers once you're carrying only a light load.", initial [; weight_monitor.activate(); ], s_to Room14, has light; Object -> "feather" with name "feather", weight 1; Object -> "iron anvil" with name "iron" "anvil", article "an", weight 300; Object -> "five-zob weight" with name "five" "zob" "weight", weight 5; Object -> "ten-zob weight" with name "ten" "zob" "weight", weight 10; Object -> "twenty-zob weight" with name "twenty" "zob" "weight", weight 20; Object -> "fifty-zob weight" with name "fifty" "zob" "weight", weight 50; Object -> "hundred-zob weight" with name "hundred" "zob" "weight", weight 100; [ WeightOf obj t i; t = obj.weight; objectloop (i in obj) t = t + WeightOf(i); return t; ]; Object weight_monitor with players_strength, warning_level 5, activate [; self.players_strength = CARRYING_STRENGTH; StartDaemon(self); ], daemon [ w s b bw; if (location ~= Weights_Room) { StopDaemon(self); return; } s = self.players_strength - WeightOf(player) + HEAVINESS_THRESHOLD; if (s<0) s=0; if (s>CARRYING_STRENGTH) s=CARRYING_STRENGTH; self.players_strength = s; if (s==0) { bw=-1; objectloop(b in player) if (WeightOf(b) > bw) { bw = WeightOf(b); w=b; } self.players_strength = self.players_strength + bw; print "^Exhausted with carrying so much, you decide to discard ", (the) w, ": "; <>; } w=s/100; if (w==self.warning_level) return; self.warning_level = w; switch(w) { 3: "^You are feeling a little tired."; 2: "^You possessions are weighing you down."; 1: "^Carrying so much weight is wearing you out."; 0: "^You're nearly exhausted enough to drop everything at an inconvenient moment."; } ]; ! -------------------------------------------------------------------------- Constant SUNRISE 360; ! i.e., 6 am Constant SUNSET 1140; ! i.e., 7 pm Global day_state = 2; Object balcony "Balcony" with description [; print "An open-air balcony on the cliffside wall of the cathedral-like Museum, hundreds of feet above "; if (day_state==1) "sunlit plains of farms and settlements."; "a darkling plain. Dim light from the walls above is the only beacon in this vast night."; ], in_to Foyer, cant_go "The only way is back inside.", each_turn [ f; if (the_time >= SUNRISE && the_time < SUNSET) f=1; if (day_state == f) return; if (day_state==2) { day_state = f; return; } day_state = f; if (f==1) "^The sun rises, illuminating the landscape!"; "^As the sun sets, the landscape is plunged into darkness."; ], has light; Object -> "giant clock" with name "giant" "clock" "face" "clockface" "clock-face", before [; Examine: "According to the giant clockface on the wall above, it is now ", the_time/60, ":", (the_time%60)/10, the_time%10, "."; default: "The giant clock-face is too high above you."; ], react_after [; Look: new_line; ; ], has static concealed; Object -> moth "moth" with name "moth", initial "A catchable moth flits about."; [ GoMothGo; if (moth in player) { remove moth; "As your eyes try to adjust, you feel a ticklish sensation and hear a tiny fluttering sound."; } ]; Object -> "Commander Data" with name "data" "commander", orders [; "~I regret that I am only here to make an example work elsewhere. Please proceed upstairs to 10 Forward to see.~"; ], has proper animate crewmember; ! ========================================================================== Object Second_Floor "Mezzanine" with description "Halfway up the marble staircase of the building, a second floor mezzanine which leads south into Grammar Hall (an extension purpose-built for the Room 16 exhibition).", d_to Foyer, s_to Grammar_Hall, u_to Third_Floor, has light; Object -> "map" with name "map" "mezzanine" "level", initial "A map of the mezzanine level is embossed in one wall.", description [; font off; print "^+------------------------------------------+ ^| | ^| | ^| | ^| | ^| Mezzanine | ^| (you are here) | ^| | | ^| | | ^| Grammar Hall 16 | ^| (telepathy, clock) | ^| (Charlotte, Dan) --- Ten Forward | ^| | (replicator) | ^| Liberator (computer) | ^| Bridge (tricorder) | ^| (Zen) | ^+------------------------------------------+^"; font on; ], has static; Object -> "Room 16 exhibition leaflet" with name "leaflet" "exhibition" "guide" "room" "sixteen", initial "An exhibition leaflet has fallen to the floor.", description "Among the rare & fascinating exhibits in Room 16 are:...^^ Telekinetic (and telepathic) Martha. In the telepathy booth, you can speak to her as though she were in Room 16 with you -- but she's not, she is far away. Tell her to ~look~ to find out where, and you can also ask her to give you things (by telekinesis).^^ Charlotte, who is playing Simon Says. She'll obey instructions you give as long as you preface it with ~simon says~. (Though she only knows how to wave, or how to clap many times (just tell her a number).)^^ Dyslexic Dan knows how to take and drop things and how to perform an inventory, but unfortunately confuses Take and Drop orders.^^ The alarm clock can be told ~on~, ~off~ or a time of day (to set its alarm to)."; ! -------------------------------------------------------------------------- Object Grammar_Hall "Grammar Hall" has light, with description "The main exhibit on the second floor: Room 16, south of the mezzanine. A Jeffreys Tube runs @00 into a Star Trek: The Next Generation room, while a hexagonal corridor to the south leads to the bridge of the spaceship ~Liberator~.", n_to Second_Floor, e_to Star_Trek, s_to Blakes_Seven; Object -> booth "telepathy booth" with name "booth" "telepathy", initial "A telepathy booth stands invitingly open: ~Talk To Telekinetic Martha~.", has enterable static; Object -> "Charlotte" with name "charlotte" "charlie" "chas", number 0, grammar [; give self ~general; wn=verb_wordnum; if (NextWord()=='simon' && NextWord()=='says') { give self general; verb_wordnum=verb_wordnum+2; } self.number=TryNumber(verb_wordnum); if (self.number~=-1000) { action=##Clap; noun=0; second=0; rtrue; } ], orders [ i; if (self hasnt general) "Charlotte sticks her tongue out."; WaveHands: "Charlotte waves energetically."; Clap: if (self.number==0) "Charlotte folds her arms."; for (i=0:i100) "^^Charlotte's a bit out of breath now."; "^^~Easy!~ says Charlotte."; default: "~Don't know how,~ says Charlotte."; ], initial "Charlotte wants to play Simon Says.", has animate female proper crewmember; Object -> "Dyslexic Dan" with name "dan" "dyslexic", grammar [; if (verb_word == 'take') { verb_wordnum++; return 'drop'; } if (verb_word == 'drop') { verb_wordnum++; return 'take'; } ], orders [; Take: "~What,~ says Dan, ~ you want me to take ", (the) noun, "?~"; Drop: "~What,~ says Dan, ~ you want me to drop ", (the) noun, "?~"; Inv: "~That I can do,~ says Dan. ~I'm empty-handed.~"; default: "~Don't know how,~ says Dan."; ], initial "Dyslexic Dan is here.", has animate proper crewmember; [ PrintTime x; print (x/60), ":", (x%60)/10, (x%60)%10; ]; Object -> "alarm clock" with name "alarm" "clock", article "an", number 480, description [; print "The alarm is "; if (self has general) print "on, "; else print "off, but "; "the clock reads ", (PrintTime) the_time, " and the alarm is set for ", (PrintTime) self.number, "."; ], react_after [; Inv: if (self in player) { new_line; <>; } Look: if (self in location) { new_line; <>; } ], daemon [; if (the_time >= self.number && the_time <= self.number+3 && self has general) "^Beep! Beep! The alarm goes off."; ], grammar [; return 'alarm,'; ], orders [; SwitchOn: give self general; StartDaemon(self); "~Alarm set.~"; SwitchOff: give self ~general; StopDaemon(self); "~Alarm cancelled.~"; SetTo: self.number=noun; <>; default: "~Commands are on, off or a time of day only, pliz.~"; ], life [; Ask, Answer, Tell: "[Try ~clock, something~ to address the clock.]"; ], has talkable; ! -------------------------------------------------------------------------- Object Blakes_Seven "Spaceship Liberator: Bridge" has light, with description "The great serried bridge of the alien spaceship Liberator, captured by Blake's group of revolutionary criminals on the run from the oppressive Earth Federation. (Don't worry -- it's just a convincing replica, and the museum still lies back north.)", n_to Grammar_Hall; Object -> "informative plaque" with name "informative" "plaque", article "an", description "[Among the commands which Zen was often given by the hard-pressed Liberator crew were:^^ zen, scan 360 orbital^ zen, speed standard by six^ zen, clear the neutron blasters for firing^ zen, raise the force wall^ zen, set course for centauro]", has static; Object -> "Zen" with name "zen" "flight" "computer", initial "Square lights flicker unpredictably across a hexagonal fascia on one wall, indicating that the flight computer Zen is on-line.", grammar [; return -'zen,'; ], orders [; Show: "The main screen shows a starfield, turning through ", noun, " degrees."; Go: "~Confirmed.~ The ship turns to a new bearing."; SetTo: if (noun==0) "~Confirmed.~ The ship comes to a stop."; if (noun>12) "~Standard by ", (number) noun, " exceeds design tolerances.~"; "~Confirmed.~ The ship's engines step to standard by ", (number) noun, "."; Take: if (noun~=force_wall) "~Please clarify.~"; "~Force wall raised.~"; Drop: if (noun~=blasters) "~Please clarify.~"; "~Battle-computers on line. Neutron blasters cleared for firing.~"; NotUnderstood: "~Language banks unable to decode.~"; default: "~Information. That function is unavailable.~"; ], has talkable proper static; Object -> -> force_wall "force wall" with name "force" "wall" "shields"; Object -> -> blasters "neutron blasters" with name "neutron" "blasters"; ! -------------------------------------------------------------------------- Object "Captain Picard" with name "captain" "picard", has proper animate crewmember; Object Star_Trek "10 Forward" has light, with description "The starswept observation lounge forward of deck 10 of the Starship Enterprise, where many milkshakes have been consumed in crisis situations. (It's only a replica, of course, and the museum lies back @01.)", w_to Grammar_Hall; Object -> "informative plaque" with name "informative" "plaque", article "an", description "[The computer, called just ~computer~, is useful for locating crew-members: try ~computer, where is commander data~, or ~...captain picard~, or any of the other people who can be found in the Museum.^^ The tricorder will scan something if you tell it the name of whom or what you wish to scan.^^ The replicator is a superior drinks machine: for instance, Captain Picard is fond of saying ~replicator, tea earl grey~. There's also brandy and distilled water.]", has static; Object -> "computer" with name "computer", initial "The computer, of course, always responds to your voice here.", grammar [; return 'stc,'; ], orders [; Examine: if (parent(noun)==0) "~", (name) noun, " is no longer aboard this demonstration game.~"; "~", (name) noun, " is in ", (name) parent(noun), ".~"; default: "The computer's only really good for locating the crew."; ], life [; Ask, Answer, Tell: "The computer is too simple."; ], has talkable static; Object -> "tricorder" with name "tricorder", grammar [; return 'tc,'; ], orders [; Examine: if (noun==player) "~You radiate life signs.~"; print "~", (The) noun, " radiates "; if (noun hasnt animate) print "no "; "life signs.~"; default: "The tricorder bleeps. It can only accept commands ~tricorder, ~."; ], life [; Ask, Answer, Tell: "The tricorder is too simple."; ], has talkable; Object -> "replicator" with name "replicator", initial "A replicator (i.e. Star Trek drinks machine) occupies a niche in one wall.", grammar [; return 'rc,'; ], orders [; Give: "The replicator serves up a cup of ", (name) noun, " which you drink eagerly."; default: "The replicator is unable to oblige. You must give it the name of a drink it knows about."; ], life [; Ask, Answer, Tell: "The replicator has no conversation skill."; ], has talkable static; Object -> -> "Earl Grey tea" with name "earl" "grey" "tea"; Object -> -> "Aldebaran brandy" with name "aldebaran" "brandy"; Object -> -> "distilled water" with name "distilled" "water"; ! -------------------------------------------------------------------------- Object "Sealed Room" with description "I'm in a sealed room, like a squash court without a door, maybe six or seven yards across", has light; Object -> "fish" with name "fish"; Key -> "cadmium key" with name "cadmium", after [; Drop: remove self; "The key smashes into smithereens!"; ]; Object -> martha "Martha" has animate female concealed proper crewmember with name "martha", orders [ r; r=parent(self); Give: if (noun notin r) "~That's beyond my telekinesis.~"; if (noun==self) "~Teleportation's too hard for me.~"; move noun to player; "~Here goes...~ and Martha's telekinetic talents magically bring ", (the) noun, " to your hands."; Look: print "~", (string) r.description; if (children(r)==1) ". There's nothing here but me.~"; print ". I can see "; WriteListFrom(child(r),CONCEAL_BIT+ENGLISH_BIT); ".~"; default: "~Afraid I can't help you there.~"; ], life [; Ask: "~You're on your own this time.~"; Tell: "Martha clucks sympathetically."; Answer: "~I'll be darned,~ Martha replies."; ]; ! ========================================================================== Object Third_Floor "Third Floor" with name "trapdoor", description "Atop the marble staircase, this third floor foyer fans out into Rooms from Chapter V. These run:^ ^ south to Corridor 22 (inventories) and the List Property Office, ^ @00 to Room 24 (Curious Names), ^ @01 to Room 28, which is divided by a glass window.^ ^Only a very rickety ladder goes further up, through an open trapdoor to the roof.", d_to Second_Floor, u_to roof, e_to Room24, w_to window_w, s_to Corridor22, has light; Object -> "map" with name "map" "third" "floor", initial "A map of the third floor is embossed in one wall.", description [; font off; print "^+------------------------------------------+ ^| | ^| (glass | ^| window) | ^| ! | ^| Room ! 28 --- Stairs --- Room 24 | ^| ! (you are here) Names | ^| | | | ^| | Museum Cafe | ^| Corridor 22 | ^| (Inventories) | ^| / | @@92 | ^| / | @@92 | ^| Room 23 W --- Room 23 --- Room 23 E | ^| (listing List Property (I Ching) | ^| machine) Office | ^+------------------------------------------+^"; font on; ], has static; Object -> "Lexicon" with name "lexicon", initial "On the top step is a discarded Lexicon of verbs.", description "(The lexicon has the number 27 written on the spine.)^^ Inside are many familiar verbs that you regularly use when navigating through Inform games. There are also some special ones, only available in the Museum...^^ ~megalook~ : like ~look~ but much fuller;^ ~threefold ~ : this doesn't actually do anything, but it shows how a verb can be parsed which has three objects, not just 0 to 2 as usual;^ ~time