--- /dev/null
+!% -SD\r
+\r
+!============================================================================\r
+Constant Story "Captain Fate";\r
+Constant Headline\r
+ "^A simple Inform example\r
+ ^by Roger Firth and Sonja Kesserich.^";\r
+!Release 1; Serial "020428"; ! IBG first edition (public beta)\r
+!Release 2; Serial "020827"; ! IBG second edition\r
+Release 3; Serial "040804"; ! for keeping track of public releases\r
+\r
+Constant MANUAL_PRONOUNS;\r
+Constant MAX_SCORE 2;\r
+Constant OBJECT_SCORE 1;\r
+Constant ROOM_SCORE 1;\r
+\r
+Replace MakeMatch; ! required by pname.h\r
+Replace Identical;\r
+Replace NounDomain;\r
+Replace TryGivenObject;\r
+\r
+Include "Parser";\r
+Include "pname"; ! pname.h is from the Archive\r
+\r
+Object LibraryMessages ! must be defined between Parser and VerbLib\r
+ with before [;\r
+ Buy: "Petty commerce interests you only on COUNTED occasions.";\r
+ Dig: "Your keen senses detect NOTHING underground worth your\r
+ immediate attention.";\r
+ Pray: "You won't need to bother almighty DIVINITIES to save\r
+ the day.";\r
+ Sing: "Alas! That is not one of your many superpowers.";\r
+ Sleep: "A hero is ALWAYS on the watch.";\r
+ Sorry: "Captain FATE prefers ACTION over apologies.";\r
+ Strong: "An unlikely vocabulary for a HERO like you.";\r
+ Swim: "You quickly turn all your ATTENTION towards locating a\r
+ suitable place to EXERCISE your superior strokes,\r
+ but alas! you find none.";\r
+ Miscellany:\r
+ if (lm_n == 19)\r
+ if (clothes has worn)\r
+ "In your secret identity's outfit, you manage most\r
+ efficaciously to look like a two-cent loser, a\r
+ good-for-nothing wimp.";\r
+ else\r
+ "Now that you are wearing your costume, you project\r
+ the image of power UNBOUND, of ballooned,\r
+ multicoloured MUSCLE, of DASHING yet MODEST chic.";\r
+ if (lm_n == 38)\r
+ "That's not a verb you need to SUCCESSFULLY save the day.";\r
+ if (lm_n == 39)\r
+ "That's not something you need to refer to in order to\r
+ SAVE the day.";\r
+ ];\r
+\r
+Include "VerbLib";\r
+\r
+!============================================================================\r
+! Object classes\r
+\r
+Class Room\r
+ with description "UNDER CONSTRUCTION",\r
+ has light;\r
+\r
+Class Appliance\r
+ with before [;\r
+ Take,Pull,Push,PushDir:\r
+ "Even though your SCULPTED adamantine muscles are up to the task,\r
+ you don't favour property damage.";\r
+ ],\r
+ has scenery;\r
+\r
+!============================================================================\r
+! The game objects\r
+\r
+Room street "On the street"\r
+ with name 'city' 'buildings' 'skyscrapers' 'shops' 'apartments' 'cars',\r
+ description [;\r
+ if (player in booth)\r
+ "From this VANTAGE point, you are rewarded with a broad view\r
+ of the sidewalk and the entrance to Benny's cafe.";\r
+ else\r
+ "On one side -- which your HEIGHTENED sense of direction\r
+ indicates is NORTH -- there's an open cafe now serving\r
+ lunch. To the south, you can see a phone booth.";\r
+ ],\r
+ before [;\r
+ Go:\r
+ if (player in booth && noun == n_obj) <<Exit booth>>;\r
+ ],\r
+ n_to [; <<Enter outside_of_cafe>>; ],\r
+ s_to [; <<Enter booth>>; ],\r
+ in_to "But which way?",\r
+ cant_go\r
+ "No time now for exploring! You'll move much faster in your\r
+ Captain FATE costume.";\r
+\r
+Object "pedestrians" street\r
+ with name 'passing' 'people' 'pedestrians',\r
+ description\r
+ "They're just PEOPLE going about their daily HONEST business.",\r
+ before [;\r
+ Examine:\r
+ return false;\r
+ default:\r
+ "The passing pedestrians are of NO concern to you.";\r
+ ],\r
+ has animate pluralname scenery;\r
+\r
+Appliance booth "phone booth" street\r
+ with name 'old' 'red' 'picturesque' 'phone' 'booth' 'cabin'\r
+ 'telephone' 'box',\r
+ description\r
+ "It's one of the old picturesque models, a red cabin with room\r
+ for one caller.",\r
+ before [;\r
+ Open:\r
+ "The booth is already open.";\r
+ Close:\r
+ "There's no way to close this booth.";\r
+ ],\r
+ after [;\r
+ Enter:\r
+ "With implausible celerity, you dive inside the phone booth.";\r
+ ],\r
+ has enterable container open;\r
+\r
+Appliance "sidewalk" street\r
+ with name 'sidewalk' 'pavement' 'street',\r
+ article "the",\r
+ description\r
+ "You make a quick surveillance of the sidewalk and discover much\r
+ to your surprise that it looks JUST like any other sidewalk in\r
+ the CITY!";\r
+\r
+Appliance outside_of_cafe "Benny's cafe" street\r
+ with name 'benny^s' 'cafe' 'entrance',\r
+ description\r
+ "The town's favourite for a quick snack, Benny's cafe has a 50's\r
+ ROCKETSHIP look.",\r
+ before [;\r
+ Enter:\r
+ print "With an impressive mixture of hurry and nonchalance you\r
+ step into the open cafe.^";\r
+ PlayerTo(cafe);\r
+ return true;\r
+ ],\r
+ has enterable proper;\r
+\r
+!----------------------------------------------------------------------------\r
+\r
+Room cafe "Inside Benny's cafe"\r
+ with description\r
+ "Benny's offers the FINEST selection of pastries and sandwiches.\r
+ Customers clog the counter, where Benny himself manages to\r
+ serve, cook and charge without missing a step. At the north side\r
+ of the cafe you can see a red door connecting with the toilet.",\r
+ before [;\r
+ Go: ! The player is about to depart. Is he making for the street?\r
+ if (noun ~= s_obj) return false;\r
+ if (benny.coffee_not_paid == true ||\r
+ benny.key_not_returned == true) {\r
+ print "Just as you are stepping into the street, the big hand\r
+ of Benny falls on your shoulder.";\r
+ if (benny.coffee_not_paid == true &&\r
+ benny.key_not_returned == true)\r
+ "^^~Hey! You've got my key and haven't paid for the\r
+ coffee. Do I look like a chump?~ You apologise as only a\r
+ HERO knows how to do and return inside.";\r
+ if (benny.coffee_not_paid == true)\r
+ "^^~Just waidda minute here, Mister,~ he says.\r
+ ~Sneaking out without paying, are you?~ You quickly\r
+ mumble an excuse and go back into the cafe. Benny\r
+ returns to his chores with a mistrusting eye.";\r
+ if (benny.key_not_returned == true)\r
+ "^^~Just where you think you're going with the toilet\r
+ key?~ he says. ~You a thief?~ As Benny forces you back\r
+ into the cafe, you quickly assure him that it was only\r
+ a STUPEFYING mistake.";\r
+ }\r
+ if (costume has worn) {\r
+ deadflag = 5; ! you win!\r
+ "You step onto the sidewalk, where the passing pedestrians\r
+ recognise the rainbow EXTRAVAGANZA of Captain FATE's costume\r
+ and cry your name in awe as you JUMP with sensational\r
+ momentum into the BLUE morning skies!";\r
+ }\r
+ ],\r
+ first_time_out false, ! Captain Fate's first appearance?\r
+ after [;\r
+ Go: ! The player has just arrived. Did he come from the toilet?\r
+ if (noun ~= s_obj) return false;\r
+ if (costume has worn && self.first_time_out == false) {\r
+ self.first_time_out = true;\r
+ StartDaemon(customers);\r
+ }\r
+ ],\r
+ s_to street,\r
+ n_to toilet_door;\r
+\r
+Appliance counter "counter" cafe\r
+ with name 'counter' 'bar',\r
+ article "the",\r
+ description\r
+ "The counter is made of an astonishing ALLOY of metals,\r
+ STAIN-PROOF, SPILL-RESISTANT and VERY EASY to clean. Customers\r
+ enjoy their snacks with UTTER tranquillity, safe in the notion\r
+ that the counter can take it all.",\r
+ before [;\r
+ Receive:\r
+ <<Give noun benny>>;\r
+ ],\r
+ has supporter;\r
+\r
+Object food "Benny's snacks" cafe\r
+ with name 'food' 'pastry' 'pastries' 'sandwich' 'sandwiches' 'snack'\r
+ 'snacks' 'doughnut',\r
+ before [; "There is no time for FOOD right now."; ],\r
+ has scenery proper;\r
+\r
+Object menu "menu" cafe\r
+ with name 'informative' 'menu' 'board' 'picture' 'writing',\r
+ description\r
+ "The menu board lists Benny's food and drinks, along with their\r
+ prices. Too bad you've never learnt how to read, but luckily\r
+ there is a picture of a big cup of coffee among the\r
+ incomprehensible writing.",\r
+ before [;\r
+ Take:\r
+ "The board is mounted on the wall behind Benny. Besides, it's\r
+ useless WRITING.";\r
+ ],\r
+ has scenery;\r
+\r
+Object customers "customers" cafe\r
+ with name 'customers' 'people' 'customer' 'men' 'women',\r
+ description [;\r
+ if (costume has worn)\r
+ "Most seem to be concentrating on their food, but some do\r
+ look at you quite blatantly. Must be the MIND-BEFUDDLING\r
+ colours of your costume.";\r
+ else\r
+ "A group of HELPLESS and UNSUSPECTING mortals, the kind\r
+ Captain FATE swore to DEFEND the day his parents choked on a\r
+ DEVIOUS slice of RASPBERRY PIE.";\r
+ ],\r
+ life [;\r
+ Ask,Tell,Answer:\r
+ if (costume has worn)\r
+ "People seem to MISTRUST the look of your FABULOUS costume.";\r
+ else\r
+ "As John Covarth, you attract LESS interest than Benny's\r
+ food.";\r
+ Kiss:\r
+ "There's no telling what sorts of MUTANT bacteria these\r
+ STRANGERS may be carrying around.";\r
+ Attack:\r
+ "Mindless massacre of civilians is the qualification for\r
+ VILLAINS. You are SUPPOSED to protect the likes of these\r
+ people.";\r
+ ],\r
+ orders [;\r
+ "These people don't appear to be of the cooperative sort.";\r
+ ],\r
+ number_of_comments 0, ! for counting the customer comments\r
+ daemon [;\r
+ if (location ~= cafe) return;\r
+ if (self.number_of_comments == 0) {\r
+ self.number_of_comments = 1;\r
+ print "^Nearby customers glance at your costume with open\r
+ curiosity.^";\r
+ }\r
+ if (random(2) == 1) { ! do this 50% of the time\r
+ self.number_of_comments = self.number_of_comments + 1;\r
+ switch (self.number_of_comments) {\r
+ 2: "^~Didn't know there was a circus in town,~ comments one\r
+ customer to another. ~Seems like the clowns have the\r
+ day off.~";\r
+ 3: "^~These fashion designers don't know what to do to show\r
+ off,~ snorts a fat gentleman, looking your way. Those\r
+ within earshot try to conceal their smiles.";\r
+ 4: "^~Must be carnival again,~ says a man to his wife, who\r
+ giggles, stealing a peek at you. ~Time sure flies.~";\r
+ 5: "^~Bad thing about big towns~, comments someone to his\r
+ table companion, ~is you get the damnedest bugs coming\r
+ out from toilets.~";\r
+ 6: "^~I sure WISH I could go to work in my pyjamas,~ says a\r
+ girl in an office suit to some colleagues. ~It looks SO\r
+ comfortable.~";\r
+ default: StopDaemon(self);\r
+ }\r
+ }\r
+ ],\r
+ has scenery animate pluralname;\r
+\r
+Object benny "Benny" cafe\r
+ with name 'benny',\r
+ description\r
+ "A deceptively FAT man of uncanny agility, Benny entertains his\r
+ customers crushing coconuts against his forehead when the mood\r
+ strikes him.",\r
+ coffee_asked_for false, ! has player asked for a coffee?\r
+ coffee_not_paid false, ! is Benny waiting to be paid?\r
+ key_not_returned false, ! is Benny waiting for the key?\r
+ life [;\r
+ Give:\r
+ switch (noun) {\r
+ clothes:\r
+ "You NEED your unpretentious John Covarth clothes.";\r
+ costume:\r
+ "You NEED your stupendous ACID-PROTECTIVE suit.";\r
+ toilet_key:\r
+ self.key_not_returned = false;\r
+ move toilet_key to benny;\r
+ "Benny nods as you ADMIRABLY return his key.";\r
+ coin:\r
+ remove coin;\r
+ self.coffee_not_paid = false;\r
+ print "With marvellous ILLUSIONIST gestures, you produce the\r
+ coin from the depths of your ";\r
+ if (costume has worn) print "BULLET-PROOF costume";\r
+ else print "ordinary street clothes";\r
+ " as if it had dropped on the counter from Benny's ear!\r
+ People around you clap politely. Benny takes the coin\r
+ and gives it a SUSPICIOUS bite. ~Thank you, sir. Come\r
+ back anytime,~ he says.";\r
+ }\r
+ Attack:\r
+ if (costume has worn) {\r
+ deadflag = 4;\r
+ print "Before the horror-stricken eyes of the surrounding\r
+ people, you MAGNIFICENTLY jump OVER the counter and\r
+ attack Benny with REMARKABLE, albeit NOT sufficient,\r
+ speed. Benny receives you with a TREACHEROUS upper-cut\r
+ that sends your GRANITE JAW flying through the cafe.^^\r
+ ~These guys in pyjamas think they can bully innocent\r
+ folk,~ snorts Benny, as the EERIE hands of DARKNESS\r
+ engulf your vision and you lose consciousness.";\r
+ }\r
+ else\r
+ "That would be an unlikely act for MEEK John Covarth.";\r
+ Kiss:\r
+ "This is no time for MINDLESS infatuation.";\r
+ Ask,Tell,Answer:\r
+ "Benny is too busy for idle chit-chat.";\r
+ ],\r
+ orders [; ! handles ASK BENNY FOR X and BENNY, GIVE ME XXX\r
+ Give:\r
+ if (second ~= player or nothing) "Benny looks at you strangely.";\r
+ switch (noun) {\r
+ toilet_key:\r
+ if (toilet_key in player) "But you DO have the key already.";\r
+ if (self.coffee_asked_for == true)\r
+ if (toilet_key in self) {\r
+ move toilet_key to player;\r
+ self.key_not_returned = true;\r
+ "Benny tosses the key to the rest rooms on the\r
+ counter, where you grab it with a dextrous and\r
+ precise movement of your HYPER-AGILE hand.";\r
+ }\r
+ else\r
+ "~Last place I saw that key, it was in YOUR\r
+ possession,~ grumbles Benny. ~Be sure to return it\r
+ before you leave.~";\r
+ else\r
+ "~Toilet is only fer customers,~ he grumbles, looking\r
+ pointedly at a menu board behind him.";\r
+ coffee:\r
+ if (self.coffee_asked_for == true)\r
+ "One coffee should be enough.";\r
+ move coffee to counter;\r
+ self.coffee_asked_for = self.coffee_not_paid = true;\r
+ "With two gracious steps, Benny places his world-famous\r
+ Cappuccino in front of you.";\r
+ food:\r
+ "Food will take too much time, and you must change NOW.";\r
+ menu:\r
+ "With only the smallest sigh, Benny nods towards the menu\r
+ on the wall behind him.";\r
+ default:\r
+ "~I don't think that's on the menu, sir.~";\r
+ }\r
+ ],\r
+ has scenery animate male proper transparent;\r
+\r
+Object coffee "cup of coffee" benny\r
+ with name 'cup' 'of' 'coffee' 'steaming' 'cappuccino'\r
+ 'cappucino' 'capuccino' 'capucino',\r
+ description [;\r
+ if (self in benny)\r
+ "The picture on the menu board SURE looks good.";\r
+ else\r
+ "It smells delicious.";\r
+ ],\r
+ before [;\r
+ Take,Drink,Taste:\r
+ if (self in benny) "You should ask Benny for one first.";\r
+ else {\r
+ move self to benny;\r
+ print "You pick up the cup and swallow a mouthful. Benny's\r
+ WORLDWIDE REPUTATION is well deserved. Just as you\r
+ finish, Benny takes away the empty cup.";\r
+ if (benny.coffee_not_paid == true)\r
+ " ~That will be one quidbuck, sir.~";\r
+ else\r
+ "";\r
+ }\r
+ Buy:\r
+ if (coin in player) <<Give coin benny>>;\r
+ else "You have no money.";\r
+ Smell:\r
+ "If your HYPERACTIVE pituitary glands are to be trusted,\r
+ it's Colombian.";\r
+ ];\r
+\r
+Object outside_of_toilet "toilet" cafe\r
+ with name 'toilet' 'bath' 'rest' 'room' 'bathroom' 'restroom',\r
+ before [;\r
+ Enter:\r
+ if (toilet_door has open) {\r
+ PlayerTo(toilet);\r
+ return true;\r
+ }\r
+ else\r
+ "Your SUPERB deductive mind detects that the DOOR is\r
+ CLOSED.";\r
+ Examine:\r
+ if (toilet_door has open)\r
+ "A brilliant thought flashes through your SUPERLATIVE\r
+ brain: detailed examination of the toilet would be\r
+ EXTREMELY facilitated if you entered it.";\r
+ else\r
+ "With a TREMENDOUS effort of will, you summon your\r
+ unfathomable ASTRAL VISION and project it FORWARD towards\r
+ the closed door... until you remember that it's\r
+ Dr Mystere who's the one with mystic powers.";\r
+ Open:\r
+ <<Open toilet_door>>;\r
+ Close:\r
+ <<Close toilet_door>>;\r
+ Take,Push,Pull:\r
+ "That would be PART of the building.";\r
+ ],\r
+ has scenery openable enterable;\r
+\r
+Object toilet_door\r
+ with pname '.x' 'red' '.x' 'toilet' 'door',\r
+ short_name [;\r
+ if (location == cafe) print "door to the toilet";\r
+ else print "door to the cafe";\r
+ return true;\r
+ ],\r
+ description [;\r
+ if (location == cafe)\r
+ "A red door with the unequivocal black man-woman silhouettes\r
+ marking the entrance to hygienic facilities. There is a\r
+ scribbled note stuck on its surface.";\r
+ else\r
+ "A red door with no OUTSTANDING features.";\r
+ ],\r
+ found_in cafe toilet,\r
+ before [ ks;\r
+ Open:\r
+ if (self hasnt locked || toilet_key notin player) return false;\r
+ ks = keep_silent; keep_silent = true;\r
+ <Unlock self toilet_key>; keep_silent = ks;\r
+ return true;\r
+ Lock:\r
+ if (self hasnt open) return false;\r
+ print "(first closing ", (the) self, ")^";\r
+ ks = keep_silent; keep_silent = true;\r
+ <Close self>; keep_silent = ks;\r
+ return false;\r
+ ],\r
+ after [ ks;\r
+ Unlock:\r
+ if (self has locked) return false;\r
+ print "You unlock ", (the) self, " and open it.^";\r
+ ks = keep_silent; keep_silent = true;\r
+ <Open self>; keep_silent = ks;\r
+ return true;\r
+ Open:\r
+ give toilet light;\r
+ Close:\r
+ give toilet ~light;\r
+ ],\r
+ door_dir [;\r
+ if (location == cafe) return n_to;\r
+ else return s_to;\r
+ ],\r
+ door_to [;\r
+ if (location == cafe) return toilet;\r
+ else return cafe;\r
+ ],\r
+ with_key toilet_key,\r
+ has scenery door openable lockable locked;\r
+\r
+Object toilet_key "toilet key" benny\r
+ with pname '.x' 'toilet' 'key',\r
+ article "the",\r
+ invent [;\r
+ if (clothes has worn) print "the CRUCIAL key";\r
+ else print "the used and IRRELEVANT key";\r
+ return true;\r
+ ],\r
+ description\r
+ "Your SUPRA PERCEPTIVE senses detect nothing of consequence\r
+ about the toilet key.",\r
+ before [;\r
+ if (self in benny)\r
+ "You SCAN your surroundings with ENHANCED AWARENESS,\r
+ but fail to detect any key.";\r
+ Drop:\r
+ "Benny is trusting you to look after that key.";\r
+ ];\r
+\r
+Object "scribbled note" cafe\r
+ with name 'scribbled' 'note',\r
+ description [;\r
+ if (self.read_once == false) {\r
+ self.read_once = true;\r
+ "You apply your ENHANCED ULTRAFREQUENCY vision to the note\r
+ and squint in concentration, giving up only when you see the\r
+ borders of the note begin to blacken under the incredible\r
+ intensity of your burning stare. You reflect once more how\r
+ helpful it would've been if you'd ever learnt to read.\r
+ ^^A kind old lady passes by and explains:\r
+ ~You have to ask Benny for the key, at the counter.~^^\r
+ You turn quickly and begin, ~Oh, I KNOW that, but...~^^\r
+ ~My pleasure, son,~ says the lady, as she exits the cafe.";\r
+ }\r
+ else\r
+ "The scorched undecipherable note holds no SECRETS from\r
+ you NOW! Ha!";\r
+ ],\r
+ read_once false, ! has the player read the note once?\r
+ before [;\r
+ Take:\r
+ "No reason to start collecting UNDECIPHERABLE notes.";\r
+ ],\r
+ has scenery;\r
+\r
+!----------------------------------------------------------------------------\r
+\r
+Room toilet "Unisex toilet"\r
+ with description\r
+ "A surprisingly CLEAN square room covered with glazed-ceramic\r
+ tiles, featuring little more than a lavatory and a light switch.\r
+ The only exit is south, through the door and into the cafe.",\r
+ s_to toilet_door,\r
+ has ~light scored;\r
+\r
+Appliance light_switch "light switch" toilet\r
+ with name 'light' 'switch',\r
+ description\r
+ "A notorious ACHIEVEMENT of technological SCIENCE, elegant yet\r
+ EASY to use.",\r
+ before [;\r
+ Push:\r
+ if (self has on) <<SwitchOff self>>;\r
+ else <<SwitchOn self>>;\r
+ ],\r
+ after [;\r
+ SwitchOn:\r
+ give self light;\r
+ "You turn on the light in the toilet.";\r
+ SwitchOff:\r
+ give self ~light;\r
+ "You turn off the light in the toilet.";\r
+ ],\r
+ has switchable ~on;\r
+\r
+Appliance lavatory "lavatory" toilet\r
+ with name 'lavatory' 'wc' 'toilet' 'loo' 'bowl' 'can' 'john' 'bog',\r
+ before [;\r
+ Examine,Search,LookUnder:\r
+ if (coin in self) {\r
+ move coin to parent(self);\r
+ "The latest user CIVILLY flushed it after use, but failed to\r
+ pick up the VALUABLE coin that fell from his pants.";\r
+ }\r
+ Receive:\r
+ "While any other MORTALS might unwittingly throw just about\r
+ ANYTHING into ", (the) self, ", you remember the WISE teachings\r
+ of your mentor, Duke ELEGANT, about elderly plumbing and rising\r
+ waters.";\r
+ ];\r
+\r
+Object coin "valuable coin" lavatory\r
+ with name 'valuable' 'coin' 'silver' 'quidbuck',\r
+ description "It's a genuine SILVER QUIDBUCK.",\r
+ before [;\r
+ Drop:\r
+ if (self notin player) return false;\r
+ "Such a valuable coin? Har, har! This must be a demonstration of\r
+ your ULTRA-FLIPPANT jesting!";\r
+ ],\r
+ after [;\r
+ Take:\r
+ "You crouch into the SLEEPING DRAGON position and deftly, with\r
+ PARAMOUNT STEALTH, you pocket the lost coin.";\r
+ ],\r
+ has scored;\r
+\r
+!============================================================================\r
+! The player's possessions\r
+\r
+Object clothes "your clothes"\r
+ with name 'ordinary' 'street' 'clothes' 'clothing',\r
+ description\r
+ "Perfectly ORDINARY-LOOKING street clothes for a NOBODY like\r
+ John Covarth.",\r
+ before [;\r
+ Wear:\r
+ if (self has worn)\r
+ "You are already dressed as John Covarth.";\r
+ else\r
+ "The town NEEDS the power of Captain FATE, not the anonymity\r
+ of John Covarth.";\r
+ Change,Disrobe:\r
+ if (self hasnt worn)\r
+ "Your KEEN eye detects that you're no longer wearing them.";\r
+ switch (location) {\r
+ street:\r
+ if (player in booth)\r
+ "Lacking Superman's super-speed, you realise that it\r
+ would be awkward to change in plain view of the passing\r
+ pedestrians.";\r
+ else\r
+ "In the middle of the street? That would be a PUBLIC\r
+ SCANDAL, to say nothing of revealing your secret\r
+ identity.";\r
+ cafe:\r
+ "Benny allows no monkey business in his establishment.";\r
+ toilet:\r
+ if (toilet_door has open)\r
+ "The door to the bar stands OPEN at tens of curious eyes.\r
+ You'd be forced to arrest yourself for LEWD conduct.";\r
+ print "You quickly remove your street clothes and bundle them\r
+ up together into an INFRA MINUSCULE pack ready for easy\r
+ transportation. ";\r
+ if (toilet_door has locked) {\r
+ give clothes ~worn; give costume worn;\r
+ "Then you unfold your INVULNERABLE-COTTON costume and\r
+ turn into Captain FATE, defender of free will, adversary\r
+ of tyranny!";\r
+ }\r
+ else {\r
+ deadflag = 3;\r
+ "Just as you are slipping into Captain FATE's costume,\r
+ the door opens and a young woman enters. She looks at\r
+ you and starts screaming, ~RAPIST! NAKED RAPIST IN THE\r
+ TOILET!!!~^^\r
+ Everybody in the cafe quickly comes to the rescue, only\r
+ to find you ridiculously jumping on one leg while trying\r
+ to get dressed. Their laughter brings a QUICK END to\r
+ your crime-fighting career!";\r
+ }\r
+ thedark:\r
+ "Last time you changed in the dark, you wore the suit inside\r
+ out!";\r
+ default: ! this _should_ never happen...\r
+ "There must be better places to change your clothes!";\r
+ }\r
+ ],\r
+ has clothing proper pluralname;\r
+\r
+Object costume "your costume"\r
+ with name 'captain' 'captain^s' 'fate' 'fate^s' 'costume' 'suit',\r
+ description\r
+ "STATE OF THE ART manufacture, from chemically reinforced 100%\r
+ COTTON-lastic(tm).",\r
+ before [;\r
+ Wear:\r
+ if (self has worn)\r
+ "You are already dressed as Captain FATE.";\r
+ else\r
+ "First you'd have to take off your commonplace unassuming\r
+ John Covarth INCOGNITO street clothes.";\r
+ Change,Disrobe:\r
+ if (self has worn)\r
+ "You need to wear your costume to FIGHT crime!";\r
+ else\r
+ "But you're not yet wearing it!";\r
+ Drop:\r
+ "Your UNIQUE Captain FATE multi-coloured costume? The most\r
+ coveted clothing ITEM in the whole city? Certainly NOT!";\r
+ ],\r
+ has clothing proper;\r
+\r
+!============================================================================\r
+! Entry point routines\r
+\r
+[ Initialise;\r
+ #Ifdef DEBUG; pname_verify(); #Endif; ! suggested by pname.h\r
+ location = street;\r
+ move costume to player;\r
+ move clothes to player; give clothes worn;\r
+ lookmode = 2;\r
+ "^^Impersonating mild mannered John Covarth, assistant help boy at an\r
+ insignificant drugstore, you suddenly STOP when your acute hearing\r
+ deciphers a stray radio call from the POLICE. There's some MADMAN\r
+ attacking the population in Granary Park! You must change into your\r
+ Captain FATE costume fast...!^^";\r
+];\r
+\r
+[ DeathMessage;\r
+ if (deadflag == 3) print "Your secret identity has been revealed";\r
+ if (deadflag == 4) print "You have been SHAMEFULLY defeated";\r
+ if (deadflag == 5) print "You fly away to SAVE the DAY";\r
+];\r
+\r
+[ InScope person item;\r
+ if (person == player && location == thedark && real_location == toilet) {\r
+ PlaceInScope(light_switch);\r
+ PlaceInScope(toilet_door);\r
+ }\r
+ if (person == player && location == thedark)\r
+ objectloop (item in parent(player))\r
+ if (item has moved) PlaceInScope(item);\r
+ return false;\r
+];\r
+\r
+!============================================================================\r
+! Standard and extended grammar\r
+\r
+Include "Grammar";\r
+\r
+[ ChangeSub;\r
+ if (noun has pluralname) print "They're";\r
+ else print "That's";\r
+ " not something you must change to save the day.";\r
+];\r
+\r
+Verb 'change' 'exchange' 'swap' 'swop'\r
+ * noun -> Change;\r
+\r
+Extend 'ask'\r
+ * creature 'for' topic -> AskFor;\r
+\r
+!============================================================================\r
--- /dev/null
+!% -SD\r
+\r
+!===============================================================================\r
+Constant Story "Heidi";\r
+Constant Headline\r
+ "^A simple Inform example\r
+ ^by Roger Firth and Sonja Kesserich.^";\r
+Constant MAX_CARRIED 1;\r
+\r
+Include "Parser";\r
+Include "VerbLib";\r
+\r
+!===============================================================================\r
+! The game objects\r
+\r
+Object before_cottage "In front of a cottage"\r
+ with description\r
+ "You stand outside a cottage. The forest stretches east.",\r
+ e_to forest,\r
+ has light;\r
+\r
+Object forest "Deep in the forest"\r
+ with description\r
+ "Through the dense foliage, you glimpse a building to the west.\r
+ A track heads to the northeast.",\r
+ w_to before_cottage,\r
+ ne_to clearing,\r
+ has light;\r
+\r
+Object bird "baby bird" forest\r
+ with description "Too young to fly, the nestling tweets helplessly.",\r
+ name 'baby' 'bird' 'nestling',\r
+ has ;\r
+\r
+Object clearing "A forest clearing"\r
+ with description\r
+ "A tall sycamore stands in the middle of this clearing.\r
+ The path winds southwest through the trees.",\r
+ sw_to forest,\r
+ u_to top_of_tree,\r
+ has light;\r
+\r
+Object nest "bird's nest" clearing\r
+ with description "The nest is carefully woven of twigs and moss.",\r
+ name 'bird^s' 'nest' 'twigs' 'moss',\r
+ has container open;\r
+\r
+Object tree "tall sycamore tree" clearing\r
+ with description\r
+ "Standing proud in the middle of the clearing,\r
+ the stout tree looks easy to climb.",\r
+ name 'tall' 'sycamore' 'tree' 'stout' 'proud',\r
+ has scenery;\r
+\r
+Object top_of_tree "At the top of the tree"\r
+ with description "You cling precariously to the trunk.",\r
+ d_to clearing,\r
+ has light;\r
+\r
+Object branch "wide firm bough" top_of_tree\r
+ with description "It's flat enough to support a small object.",\r
+ name 'wide' 'firm' 'flat' 'bough' 'branch',\r
+ each_turn [; if (nest in branch) deadflag = 2; ],\r
+ has static supporter;\r
+\r
+!===============================================================================\r
+! Entry point routines\r
+\r
+[ Initialise; location = before_cottage; ];\r
+\r
+!===============================================================================\r
+! Standard and extended grammar\r
+\r
+Include "Grammar";\r
+\r
+!===============================================================================\r
--- /dev/null
+!% -SD\r
+\r
+!===============================================================================\r
+Constant Story "Heidi";\r
+Constant Headline\r
+ "^A simple Inform example\r
+ ^by Roger Firth and Sonja Kesserich.^";\r
+Constant MAX_CARRIED 1;\r
+\r
+Include "Parser";\r
+Include "VerbLib";\r
+\r
+!===============================================================================\r
+! The game objects\r
+\r
+Object before_cottage "In front of a cottage"\r
+ with description\r
+ "You stand outside a cottage. The forest stretches east.",\r
+ e_to forest,\r
+ in_to "It's such a lovely day -- much too nice to go inside.",\r
+ cant_go "The only path lies to the east.",\r
+ has light;\r
+\r
+Object cottage "tiny cottage" before_cottage\r
+ with description "It's small and simple, but you're very happy here.",\r
+ name 'tiny' 'cottage' 'home' 'house' 'hut' 'shed' 'hovel',\r
+ before [;\r
+ Enter:\r
+ print_ret "It's such a lovely day -- much too nice to go inside.";\r
+ ],\r
+ has scenery;\r
+\r
+Object forest "Deep in the forest"\r
+ with description\r
+ "Through the dense foliage, you glimpse a building to the west.\r
+ A track heads to the northeast.",\r
+ w_to before_cottage,\r
+ ne_to clearing,\r
+ has light;\r
+\r
+Object bird "baby bird" forest\r
+ with description "Too young to fly, the nestling tweets helplessly.",\r
+ name 'baby' 'bird' 'nestling',\r
+ before [;\r
+ Listen:\r
+ print "It sounds scared and in need of assistance.^";\r
+ return true;\r
+ ],\r
+ has ;\r
+\r
+Object clearing "A forest clearing"\r
+ with description\r
+ "A tall sycamore stands in the middle of this clearing.\r
+ The path winds southwest through the trees.",\r
+ sw_to forest,\r
+ u_to top_of_tree,\r
+ has light;\r
+\r
+Object nest "bird's nest" clearing\r
+ with description "The nest is carefully woven of twigs and moss.",\r
+ name 'bird^s' 'nest' 'twigs' 'moss',\r
+ has container open;\r
+\r
+Object tree "tall sycamore tree" clearing\r
+ with description\r
+ "Standing proud in the middle of the clearing,\r
+ the stout tree looks easy to climb.",\r
+ name 'tall' 'sycamore' 'tree' 'stout' 'proud',\r
+ before [;\r
+ Climb:\r
+ PlayerTo(top_of_tree);\r
+ return true;\r
+ ],\r
+ has scenery;\r
+\r
+Object top_of_tree "At the top of the tree"\r
+ with description "You cling precariously to the trunk.",\r
+ d_to clearing,\r
+ after [;\r
+ Drop:\r
+ move noun to clearing;\r
+ return false;\r
+ ],\r
+ has light;\r
+\r
+Object branch "wide firm bough" top_of_tree\r
+ with description "It's flat enough to support a small object.",\r
+ name 'wide' 'firm' 'flat' 'bough' 'branch',\r
+ each_turn [; if (bird in nest && nest in branch) deadflag = 2; ],\r
+ has static supporter;\r
+\r
+!===============================================================================\r
+! Entry point routines\r
+\r
+[ Initialise; location = before_cottage; ];\r
+\r
+!===============================================================================\r
+! Standard and extended grammar\r
+\r
+Include "Grammar";\r
+\r
+!===============================================================================\r
--- /dev/null
+!% -SD\r
+\r
+!============================================================================\r
+Constant Story "William Tell";\r
+Constant Headline\r
+ "^A simple Inform example\r
+ ^by Roger Firth and Sonja Kesserich.^";\r
+!Release 1; Serial "020428"; ! IBG first edition (public beta)\r
+!Release 2; Serial "020827"; ! IBG second edition\r
+Release 3; Serial "040804"; ! for keeping track of public releases\r
+\r
+Constant MAX_SCORE = 3;\r
+\r
+Include "Parser";\r
+Include "VerbLib";\r
+\r
+!============================================================================\r
+! Object classes\r
+\r
+Class Room\r
+ has light;\r
+\r
+Class Prop\r
+ with before [;\r
+ Examine:\r
+ return false;\r
+ default:\r
+ print_ret "You don't need to worry about ", (the) self, ".";\r
+ ],\r
+ has scenery;\r
+\r
+Class Furniture\r
+ with before [;\r
+ Take,Pull,Push,PushDir:\r
+ print_ret (The) self, " is too heavy for that.";\r
+ ],\r
+ has static supporter;\r
+\r
+Class Arrow\r
+ with name 'arrow' 'arrows//p',\r
+ article "an",\r
+ plural "arrows",\r
+ description "Just like all your other arrows -- sharp and true.",\r
+ before [;\r
+ Drop,Give,ThrowAt:\r
+ print_ret "Your arrows are sharp, and you guard them carefully.";\r
+ ];\r
+\r
+Class NPC\r
+ with life [;\r
+ Answer,Ask,Order,Tell:\r
+ print_ret "Just use T[ALK] [TO ", (the) self, "].";\r
+ ],\r
+ has animate;\r
+\r
+!============================================================================\r
+! The game objects\r
+\r
+Room street "A street in Altdorf"\r
+ with description [;\r
+ print "The narrow street runs north towards the town square.\r
+ Local folk are pouring into the town through the gate to the\r
+ south, shouting greetings, offering produce for sale,\r
+ exchanging news, enquiring with exaggerated disbelief about\r
+ the prices of the goods displayed by merchants whose stalls\r
+ make progress even more difficult.^";\r
+ if (self hasnt visited)\r
+ print "^~Stay close to me, son,~ you say,\r
+ ~or you'll get lost among all these people.~^";\r
+ ],\r
+ n_to below_square,\r
+ s_to\r
+ "The crowd, pressing north towards the square,\r
+ makes that impossible.";\r
+\r
+Prop "south gate" street\r
+ with name 'south' 'southern' 'wooden' 'gate',\r
+ description "The large wooden gate in the town walls is wide open.";\r
+\r
+Prop "assorted stalls"\r
+ with name 'assorted' 'stalls',\r
+ description "Food, clothing, mountain gear; the usual stuff.",\r
+ found_in street below_square,\r
+ has pluralname;\r
+\r
+Prop "produce" !! added\r
+ with name 'goods' 'produce' 'food' 'clothing' 'mountain' 'gear' 'stuff',\r
+ description "Nothing special catches your eye.",\r
+ found_in street below_square,\r
+ has pluralname;\r
+\r
+Prop "merchants"\r
+ with name 'merchant' 'merchants' 'trader' 'traders',\r
+ description\r
+ "A few crooks, but mostly decent traders touting their wares\r
+ with raucous overstatement.",\r
+ found_in street below_square,\r
+ has animate pluralname;\r
+\r
+Prop "local people"\r
+ with name 'people' 'folk' 'local' 'crowd',\r
+ description "Mountain folk, just like yourself.",\r
+ found_in [; return true; ],\r
+ has animate pluralname;\r
+\r
+!----------------------------------------------------------------------------\r
+\r
+Room below_square "Further along the street"\r
+ with description\r
+ "People are still pushing and shoving their way from the southern\r
+ gate towards the town square, just a little further north.\r
+ You recognise the owner of a fruit and vegetable stall.",\r
+ n_to south_square,\r
+ s_to street;\r
+\r
+Furniture stall "fruit and vegetable stall" below_square\r
+ with name 'fruit' 'veg' 'vegetable' 'stall' 'table',\r
+ description\r
+ "It's really only a small table, with a big heap of potatoes,\r
+ some carrots and turnips, and a few apples.",\r
+ before [;\r
+ Search:\r
+ <<Examine self>>;\r
+ ],\r
+ has scenery;\r
+\r
+Prop "potatoes" below_square\r
+ with name 'potato' 'potatoes' 'spuds',\r
+ description\r
+ "Must be a particularly early variety... by some 300 years!",\r
+ has pluralname;\r
+\r
+Prop "fruit and vegetables" below_square\r
+ with name 'carrot' 'carrots' 'turnip' 'turnips' 'apples' 'vegetables',\r
+ description "Fine locally grown produce.",\r
+ has pluralname;\r
+\r
+NPC stallholder "Helga" below_square\r
+ with name 'stallholder' 'greengrocer' 'monger' 'shopkeeper' 'merchant'\r
+ 'owner' 'Helga' 'dress' 'scarf' 'headscarf',\r
+ description\r
+ "Helga is a plump, cheerful woman,\r
+ concealed beneath a shapeless dress and a spotted headscarf.",\r
+ initial [;\r
+ print "Helga pauses from sorting potatoes\r
+ to give you a cheery wave.^";\r
+ if (location hasnt visited) {\r
+ move apple to player;\r
+ print "^~Hello, Wilhelm, it's a fine day for trade! Is this\r
+ young Walter? My, how he's grown. Here's an apple for him\r
+ -- tell him to mind that scabby part, but the rest's good\r
+ enough. How's Frau Tell? Give her my best wishes.~^";\r
+ }\r
+ ],\r
+ times_spoken_to 0, ! for counting the conversation topics\r
+ life [;\r
+ Kiss:\r
+ print_ret "~Ooh, you saucy thing!~";\r
+ Talk:\r
+ self.times_spoken_to = self.times_spoken_to + 1;\r
+ switch (self.times_spoken_to) {\r
+ 1: score = score + 1;\r
+ print_ret "You warmly thank Helga for the apple.";\r
+ 2: print_ret "~See you again soon.~";\r
+ default:\r
+ return false;\r
+ }\r
+ ],\r
+ has female proper;\r
+\r
+!----------------------------------------------------------------------------\r
+\r
+Room south_square "South side of the square"\r
+ with description\r
+ "The narrow street to the south has opened onto the town square,\r
+ and resumes at the far side of this cobbled meeting place.\r
+ To continue along the street towards your destination --\r
+ Johansson's tannery -- you must walk north across the square,\r
+ in the middle of which you see Gessler's hat set on that\r
+ loathsome pole. If you go on, there's no way you can avoid\r
+ passing it. Imperial soldiers jostle rudely through the throng,\r
+ pushing, kicking and swearing loudly.",\r
+ n_to mid_square,\r
+ s_to below_square;\r
+\r
+Prop "hat on a pole" !! changed\r
+ with name 'hat' 'pole',\r
+ before [;\r
+ default:\r
+ print_ret "You're too far away at the moment.";\r
+ ],\r
+ found_in south_square north_square;\r
+\r
+Prop "Gessler's soldiers"\r
+ with name 'soldier' 'soldiers' 'guard' 'guards', !! added\r
+ description "They're uncouth, violent men, not from around here.",\r
+ before [;\r
+ FireAt:\r
+ print_ret "You're outnumbered many times.";\r
+ Talk:\r
+ print_ret "Such scum are beneath your contempt.";\r
+ ],\r
+ found_in south_square mid_square north_square marketplace,\r
+ has animate pluralname proper;\r
+\r
+!----------------------------------------------------------------------------\r
+\r
+Room mid_square "Middle of the square"\r
+ with description\r
+ "There is less of a crush in the middle of the square; most\r
+ people prefer to keep as far away as possible from the pole\r
+ which towers here, topped with that absurd ceremonial hat. A\r
+ group of soldiers stands nearby, watching everyone who passes.",\r
+ n_to north_square,\r
+ s_to south_square,\r
+ warnings_count 0, ! for counting the soldier's warnings\r
+ before [;\r
+ Go:\r
+ if (noun == s_obj) {\r
+ self.warnings_count = 0;\r
+ pole.has_been_saluted = false;\r
+ }\r
+ if (noun == n_obj) {\r
+ if (pole.has_been_saluted == true) {\r
+ print "^~Be sure to have a nice day.~^";\r
+ return false;\r
+ } ! end of (pole has_been_saluted)\r
+ else {\r
+ self.warnings_count = self.warnings_count + 1;\r
+ switch (self.warnings_count) {\r
+ 1: print_ret "A soldier bars your way. ^^\r
+ ~Oi, you, lofty; forgot yer manners, didn't you?\r
+ How's about a nice salute for the vogt's hat?~";\r
+ 2: print_ret "^~I know you, Tell, yer a troublemaker,\r
+ ain't you? Well, we don't want no bovver here,\r
+ so just be a good boy and salute the friggin'\r
+ hat. Do it now: I ain't gonna ask you again...~";\r
+ default:\r
+ print "^~OK, ";\r
+ style underline; print "Herr"; style roman;\r
+ print " Tell, now you're in real trouble. I asked you\r
+ nice, but you was too proud and too stupid. I\r
+ think it's time that the vogt had a little word\r
+ with you.~\r
+ ^^\r
+ And with that the soldiers seize you and Walter\r
+ and, while the sergeant hurries off to fetch\r
+ Gessler, the rest drag you roughly towards the\r
+ old lime tree growing in the marketplace.^";\r
+ move apple to son;\r
+ PlayerTo(marketplace);\r
+ return true;\r
+ } ! end of switch\r
+ } ! end of (pole has_NOT_been_saluted)\r
+ } ! end of (noun == n_obj)\r
+ ];\r
+\r
+Furniture pole "hat on a pole" mid_square !! changed\r
+ with name 'wooden' 'pole' 'pine' 'hat' 'black' 'red' 'brim' 'feathers',\r
+ description\r
+ "The pole, the trunk of a small pine some few inches in diameter,\r
+ stands about nine or ten feet high. Set carefully on top is\r
+ Gessler's ludicrous black and red leather hat, with a widely\r
+ curving brim and a cluster of dyed goose feathers.",\r
+ has_been_saluted false,\r
+ before [;\r
+ FireAt: !! added\r
+ print_ret "Tempting, but you're not looking for trouble.";\r
+ Salute:\r
+ self.has_been_saluted = true;\r
+ print_ret "You salute the hat on the pole. ^^\r
+ ~Why, thank you, sir,~ sneers the soldier.";\r
+ ],\r
+ has scenery;\r
+\r
+!----------------------------------------------------------------------------\r
+\r
+Room north_square "North side of the square"\r
+ with description\r
+ "A narrow street leads north from the cobbled square. In its\r
+ centre, a little way south, you catch a last glimpse of the pole\r
+ and hat.",\r
+ n_to [;\r
+ deadflag = 3;\r
+ print_ret "With Walter at your side, you leave the square by the\r
+ north street, heading for Johansson's tannery.";\r
+ ],\r
+ s_to "You hardly feel like going through all that again.";\r
+\r
+!----------------------------------------------------------------------------\r
+\r
+Room marketplace "Marketplace near the square"\r
+ with description\r
+ "Altdorf's marketplace, close by the town square, has been hastily\r
+ cleared of stalls. A troop of soldiers has pushed back the crowd\r
+ to leave a clear space in front of the lime tree, which has been\r
+ growing here for as long as anybody can remember. Usually it\r
+ provides shade for the old men of the town, who gather below to\r
+ gossip, watch the girls, and play cards. Today, though, it\r
+ stands alone... apart, that is, from Walter, who has been lashed\r
+ to the trunk. About forty yards away, you are restrained by two\r
+ of the vogt's men.",\r
+ cant_go "What? And leave your son tied up here?";\r
+\r
+Object tree "lime tree" marketplace\r
+ with name 'lime' 'tree',\r
+ description "It's just a large tree.",\r
+ before [;\r
+ FireAt:\r
+ if (BowOrArrow(second) == true) {\r
+ deadflag = 3;\r
+ print_ret "Your hand shakes a little, and your arrow flies\r
+ high, hitting the trunk a few inches above Walter's\r
+ head.";\r
+ }\r
+ return true;\r
+ ],\r
+ has scenery;\r
+\r
+NPC governor "governor" marketplace\r
+ with name 'governor' 'vogt' 'Hermann' 'Gessler',\r
+ description\r
+ "Short, stout but with a thin, mean face, Gessler relishes the\r
+ power he holds over the local community.",\r
+ initial [;\r
+ print "Gessler is watching from a safe distance,\r
+ a sneer on his face.^";\r
+ if (location hasnt visited)\r
+ print "^~It appears that you need to be taught a lesson,\r
+ fool. Nobody shall pass through the square without paying\r
+ homage to His Imperial Highness Albert; nobody, hear me?\r
+ I could have you beheaded for treason, but I'm going to\r
+ be lenient. If you should be so foolish again, you can\r
+ expect no mercy, but this time, I'll let you go free...\r
+ just as soon as you demonstrate your archery skills by\r
+ hitting this apple from where you stand. That shouldn't\r
+ prove too difficult; here, sergeant, catch. Balance it on\r
+ the little bastard's head.~^";\r
+ ],\r
+ life [;\r
+ Talk:\r
+ print_ret "You cannot bring yourself to speak to him.";\r
+ ],\r
+ before [;\r
+ FireAt:\r
+ if (BowOrArrow(second) == true) {\r
+ deadflag = 3;\r
+ print_ret "Before the startled soldiers can react, you turn\r
+ and fire at Gessler; your arrow pierces his heart,\r
+ and he dies messily. A gasp, and then a cheer,\r
+ goes up from the crowd.";\r
+ }\r
+ return true;\r
+ ],\r
+ has male;\r
+\r
+!============================================================================\r
+! The player's possessions\r
+\r
+Object bow "bow"\r
+ with name 'bow',\r
+ description "Your trusty yew bow, strung with flax.",\r
+ before [;\r
+ Drop,Give,ThrowAt:\r
+ print_ret "You're never without your trusty bow.";\r
+ ]\r
+ has clothing;\r
+\r
+Object quiver "quiver"\r
+ with name 'quiver',\r
+ description\r
+ "Made of goatskin, it usually hangs over your left shoulder.",\r
+ before [;\r
+ Drop,Give,ThrowAt:\r
+ print_ret "But it was a present from Hedwig, your wife.";\r
+ ],\r
+ has container open clothing;\r
+\r
+Arrow "arrow" quiver;\r
+Arrow "arrow" quiver;\r
+Arrow "arrow" quiver;\r
+\r
+NPC son "your son"\r
+ with name 'son' 'your' 'boy' 'lad' 'Walter',\r
+ description [;\r
+ if (location == marketplace)\r
+ print_ret "He stares at you, trying to appear brave and\r
+ remain still. His arms are pulled back and tied behind\r
+ the trunk, and the apple nestles amid his blond hair.";\r
+ else\r
+ print_ret "A quiet, blond lad of eight summers, he's fast\r
+ learning the ways of mountain folk.";\r
+ ],\r
+ life [;\r
+ Give:\r
+ score = score + 1;\r
+ move noun to self;\r
+ print_ret "~Thank you, Papa.~";\r
+ Talk:\r
+ if (location == marketplace)\r
+ print_ret "~Stay calm, my son, and trust in God.~";\r
+ else\r
+ print_ret "You point out a few interesting sights.";\r
+ ],\r
+ before [;\r
+ Examine,Listen,Salute,Talk:\r
+ return false;\r
+ FireAt:\r
+ if (location == marketplace) {\r
+ if (BowOrArrow(second) == true) {\r
+ deadflag = 3;\r
+ print_ret "Oops! Surely you didn't mean to do that?";\r
+ }\r
+ return true;\r
+ }\r
+ else\r
+ return false;\r
+ default:\r
+ if (location == marketplace)\r
+ print_ret "Your guards won't permit it.";\r
+ else\r
+ return false;\r
+ ],\r
+ found_in [; return true; ],\r
+ has male proper scenery transparent;\r
+\r
+Object apple "apple"\r
+ with name 'apple',\r
+ description [;\r
+ if (location == marketplace)\r
+ print_ret "At this distance you can barely see it.";\r
+ else\r
+ print_ret "The apple is blotchy green and brown.";\r
+ ],\r
+ before [;\r
+ Drop:\r
+ print_ret "An apple is worth quite a bit --\r
+ better hang on to it.";\r
+ Eat:\r
+ print_ret "Helga intended it for Walter...";\r
+ FireAt:\r
+ if (location == marketplace) {\r
+ if (BowOrArrow(second) == true) {\r
+ score = score + 1;\r
+ deadflag = 2;\r
+ print_ret "Slowly and steadily, you place an arrow in\r
+ the bow, draw back the string, and take aim with\r
+ more care than ever in your life. Holding your\r
+ breath, unblinking, fearful, you release the\r
+ arrow. It flies across the square towards your\r
+ son, and drives the apple against the trunk of\r
+ the tree. The crowd erupts with joy;\r
+ Gessler looks distinctly disappointed.";\r
+ }\r
+ return true;\r
+ }\r
+ else\r
+ return false;\r
+ ];\r
+\r
+!============================================================================\r
+! Entry point routines\r
+\r
+[ Initialise;\r
+ location = street;\r
+ lookmode = 2; ! like the VERBOSE command\r
+ move bow to player;\r
+ move quiver to player; give quiver worn;\r
+ player.description =\r
+ "You wear the traditional clothing of a Swiss mountaineer.";\r
+ print_ret "^^\r
+ The place: Altdorf, in the Swiss canton of Uri. The year is 1307,\r
+ at which time Switzerland is under rule by the Emperor Albert of\r
+ Habsburg. His local governor -- the vogt -- is the bullying\r
+ Hermann Gessler, who has placed his hat atop a wooden pole in\r
+ the centre of the town square; everybody who passes through the\r
+ square must bow to this hated symbol of imperial might.\r
+ ^^\r
+ You have come from your cottage high in the mountains,\r
+ accompanied by your younger son, to purchase provisions. You are\r
+ a proud and independent man, a hunter and guide, renowned both\r
+ for your skill as an archer and, perhaps unwisely (for his soldiers\r
+ are everywhere), for failing to hide your dislike of the vogt.\r
+ ^^\r
+ It's market-day: the town is packed with people from the\r
+ surrounding villages and settlements.^";\r
+];\r
+\r
+[ DeathMessage; print "You have screwed up a favourite folk story"; ];\r
+\r
+!============================================================================\r
+! Standard and extended grammar\r
+\r
+Include "Grammar";\r
+\r
+!----------------------------------------------------------------------------\r
+\r
+[ TalkSub;\r
+ if (noun == player) print_ret "Nothing you hear surprises you.";\r
+ if (RunLife(noun,##Talk) ~= false) return; ! consult life[; Talk: ]\r
+ print_ret "At the moment, you can't think of anything to say.";\r
+];\r
+\r
+Verb 'talk' 't//' 'converse' 'chat' 'gossip'\r
+ * 'to'/'with' creature -> Talk\r
+ * creature -> Talk;\r
+\r
+!----------------------------------------------------------------------------\r
+\r
+[ BowOrArrow o;\r
+ if (o == bow or nothing || o ofclass Arrow) return true;\r
+ print "That's an unlikely weapon, isn't it?^";\r
+ return false;\r
+];\r
+\r
+[ FireAtSub;\r
+ if (noun == nothing)\r
+ print_ret "What, just fire off an arrow at random?";\r
+ if (BowOrArrow(second) == true)\r
+ print_ret "Unthinkable!";\r
+];\r
+\r
+Verb 'fire' 'shoot' 'aim'\r
+ * -> FireAt\r
+ * noun -> FireAt\r
+ * 'at' noun -> FireAt\r
+ * 'at' noun 'with' noun -> FireAt\r
+ * noun 'with' noun -> FireAt\r
+ * noun 'at' noun -> FireAt reverse;\r
+\r
+Extend 'attack' replace\r
+ * noun -> FireAt;\r
+\r
+!----------------------------------------------------------------------------\r
+\r
+[ SaluteSub;\r
+ if (noun has animate) print_ret (The) noun, " acknowledges you.";\r
+ print_ret (The) noun, " takes no notice.";\r
+];\r
+\r
+Verb 'bow' 'nod' 'kowtow' 'genuflect'\r
+ * 'at'/'to'/'towards' noun -> Salute;\r
+\r
+Verb 'salute' 'greet' 'acknowledge'\r
+ * noun -> Salute;\r
+\r
+Extend 'give'\r
+ * 'homage' 'to' noun -> Salute;\r
+\r
+Extend 'wave'\r
+ * 'at' noun -> Salute;\r
+\r
+!----------------------------------------------------------------------------\r
+\r
+[ UntieSub; print_ret "You really shouldn't try that."; ];\r
+\r
+Verb 'untie' 'unfasten' 'unfix' 'free' 'release'\r
+ * noun -> Untie;\r
+\r
+!============================================================================\r