SHARE
TWEET

Crowther Inform 7

a guest May 27th, 2014 24 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. "Adventure" by William Crowther, ported by Chris Conley
  2.  
  3. [       This is intended to be a faithful Inform 7 port of Crowther's original Colossal Cave,
  4.          the game that inspired Woods to make a version of his own and launched a genre.        ]
  5.  
  6. The story headline is "Colossal Cave".
  7. The story genre is "Fantasy".
  8. The story creation year is 1976.
  9. The release number is 3.
  10. The release subnumber is always 14.
  11.  
  12. [       In release 3.14, I have:
  13.          - further cleaned up the code;
  14.          - added a [/b] shortcut for ending the boldfacing in the room long descriptions;
  15.          - written more comments and better heading names;
  16.          - normalized the tables to line up under the new elastic tabs option;
  17.          - added syntax to support naturalistic truth value names, thanks to Ron Newcomb;
  18.          - folded in some of Emily Short's Locksmith extension, to reduce memory footprint;
  19.          - adjusted for Inform build 6L02, including:
  20.                  - made all in-world text adaptive, and
  21.                  - added a "change the style" command to adopt a random tense and viewpoint.    ]
  22.  
  23. Use no deprecated features.
  24. Use BRIEF room descriptions.
  25. Use no scoring.
  26. [Use memory economy.]
  27.  
  28. Release along with a website and the source text.
  29.  
  30. BOOK ONE - ALTERATIONS
  31.  
  32. Part I - Directions
  33.  
  34. Chapter 1 - New directions
  35.  
  36. upstream is a direction. The opposite of upstream is downstream.
  37. downstream is a direction. The opposite of downstream is upstream.
  38.  
  39. forward is a direction. The opposite of forward is back.
  40.         Understand "continue/onward/onwards/forwards" as forward.
  41. back is a direction. The opposite of back is forward.
  42.  
  43. Chapter 2 - Old directions
  44.  
  45. Understand "inward/inwards" as inside.
  46.  
  47. Understand the command "exit" as something new.
  48.         Understand "exit/leave" as outside.
  49.  
  50. Understand "upward/upwards/above" as up.
  51.  
  52. Understand "downwards/downward" as down.
  53.  
  54. Part II - Verbs
  55.  
  56. Chapter 0 - Unlocking and locking (adapted from Locksmith by Emily Short)
  57.  
  58. Section 0.1 - regular unlocking
  59.  
  60. Understand the command "unlock" as something new.
  61. Understand "unlock [something] with [something]" as unlocking it with.
  62.  
  63. The right second rule is listed instead of the can't unlock without the
  64. correct key rule in the check unlocking it with rulebook.
  65.  
  66. This is the right second rule:
  67.         if the second noun does not unlock the noun:
  68.                 say "I don't know how to lock or unlock such a thing. " (A) instead.
  69.  
  70. Section 0.2 - unlocking keylessly
  71.  
  72. Understand "unlock [something]" as unlocking keylessly.
  73.  
  74. Unlocking keylessly is an action applying to one thing.
  75. The unlocking keylessly action has an object called the key unlocked with.
  76.  
  77. Check an actor unlocking keylessly (this is the check keylessly unlocking rule):
  78.         abide by the can't unlock without a lock rule;
  79.         abide by the can't unlock what's already unlocked rule;
  80.         now the key unlocked with is the second noun.
  81.  
  82. Carry out an actor unlocking keylessly (this is the standard keylessly unlocking rule):
  83.         if the person asked is the player:
  84.                 say "(with [the key unlocked with])[command clarification break]" (A);
  85.         try the person asked unlocking the noun with the key unlocked with.
  86.  
  87. Section 0.3 - regular locking
  88.  
  89. Understand the command "lock" as something new.
  90. Understand "lock [something] with [something]" as locking it with.
  91.  
  92. The right second rule is listed instead of the can't lock without the correct
  93. key rule in the check locking it with rulebook.
  94.  
  95. Section 0.4 - locking keylessly
  96.  
  97. Understand "lock [something]" as locking keylessly.
  98.  
  99. Locking keylessly is an action applying to one thing.
  100. The locking keylessly action has an object called the key locked with.
  101.  
  102. Check an actor locking keylessly (this is the check keylessly locking rule):
  103.         abide by the can't lock without a lock rule;
  104.         abide by the can't lock what's already locked rule;
  105.         abide by the can't lock what's open rule;
  106.         now the key locked with is the second noun.
  107.        
  108. Carry out an actor locking keylessly (this is the standard keylessly locking rule):
  109.         if the person asked is the player:
  110.                 say "(with [the key locked with])[command clarification break]" (A);
  111.         try the person asked locking the noun with the key locked with.
  112.        
  113. Chapter 1 - Providing synonyms for some verbs
  114.  
  115. Understand "go to/towards/toward/by/along/through" or "goto" as "[goto]".
  116.         Understand "[door]", "go [door]", "[goto] [door]" as entering.
  117.  
  118. Understand "extinguish [something]" as switching off.
  119.         Understand the command "off" as "extinguish".
  120.  
  121. Understand the command "stab" as "attack".
  122.  
  123. Understand the commands "travel" or "proceed" or "explore"
  124.  or "follow" as "go".
  125.  
  126. Understand the command "lift" as "unlock".
  127.  
  128. Chapter 2 - Unimplementing many verbs
  129.  
  130. Understand the commands "adjust", "answer", "ask", "attach", "awake",
  131.  "awaken" as something new.
  132. Understand the commands "burn", "buy" as something new.
  133. Understand the commands "chop", "clear", "consult", "cross", "cut",
  134.  "climb" as something new.
  135. [Advent only uses "climb" for movement between a couple of rooms,
  136.  so there is no need for a general-purpose climbing verb;
  137.  it only clutters up those simple cases.]
  138. Understand the commands "display", "drag", "disrobe", "doff",
  139.  "don" as something new.
  140. Understand the command "embrace" as something new.
  141. Understand the commands "fasten", "feed", "feel" as something new.
  142. Understand the command "give" as something new.
  143. Understand the commands "hear", "hug" as something new.
  144. Understand the command "insert" as something new.
  145. Understand the command "kiss" as something new.
  146. Understand the command "listen" as something new.
  147. Understand the command "move" as something new.
  148. Understand the command "offer" as something new.
  149. Understand the commands "pay", "present", "press", "prune", "pull",
  150.  "purchase", "push" as something new.
  151. Understand the commands "read", "remove", "rotate" as something new.
  152. Understand the commands "say", "scale", "screw", "search", "set", "shift",
  153.  "shout", "show", "sit", "slice", "sleep", "smell", "sniff", "sorry", "speak",
  154.   "squash", "squeeze", "stand", "swing" as something new.
  155. Understand the commands "taste", "tell", "think", "tie",
  156.  "twist" as something new.
  157. Understand the commands "uncover," "unscrew" as something new.
  158. Understand the commands "wake", "wreck" as something new.
  159. Understand the commands "y", "yes" as something new.
  160.  
  161. Chapter 3 - Simplifying other verbs
  162.  
  163. [       Inform's default entering behavior unnecessarily complicates
  164.          a simple movement keyword from the original.                           ]
  165. Understand nothing as entering.
  166.         Understand "enter" as going.
  167.  
  168. Understand the command "take" as something new.
  169.         Understand "take [things]" as taking.
  170.         Understand "take inventory" as taking inventory.
  171.  
  172. Understand the commands "carry", "wear", "get" as something new.
  173.         Understand "get [things]" as taking.
  174.         Understand the commands "keep", "pickup", "carry", "catch",
  175.          "steal", "capture", "find", "wear", "where" as "get".
  176.  
  177. Understand nothing as dropping.
  178.         Understand "drop [things preferably held]" as dropping.
  179.         Understand the command "discard" as something new.
  180.         Understand the commands "discard", "release", "free",
  181.          "dump" as "drop".
  182.  
  183. Understand the command "light" as something new.
  184.         Understand "light [something]" as switching on.
  185.         Understand the command "on" as "light".
  186.        
  187. [       Waiting isn't original, but it's so fundamental that >WAIT might as well
  188.          perform the same function as >LOOK.                                                            ]
  189. Understand the commands "l", "wait", "z" as something new.
  190.         Understand "look" as looking.
  191.         Understand the commands "l", "wait", "z" as "look".
  192.         Understand "look at [something]", "l at [something]",
  193.          "look [something]", "l [something]" as examining.
  194.  
  195. Understand nothing as waving.
  196.         Understand "wave [something]" as waving.
  197.         Understand the commands "calm", "shake", "cleave" as "wave".
  198.        
  199. Understand nothing as touching.
  200.         Understand the command "touch" as "examine".
  201.  
  202. Understand the commands "open", "close" as something new.
  203.         Understand the command "open" as "unlock".
  204.         Understand the command "close" as "lock".
  205.         [The original made no distinction between locked and closed,
  206.          nor between open and unlocked.]
  207.        
  208. Understand the commands "nothing" and "hold" as something new.
  209.         Understand "nothing", "hold" as thinking.
  210.         Thinking about is an action applying to one thing.
  211.                 Understand "hold [something]" as thinking about.
  212.                 Instead of thinking about something, try thinking.
  213.                 [No, "hold" is not synonymous with "get".
  214.                  They provoke the same response, too. A bit misleading.]
  215.  
  216. Understand the command "put" as something new.
  217.         Understand "put down [things preferably held]"
  218.          and "put [things preferably held] down" as dropping.
  219.         [The other "put" syntax in Inform involves wearing, containers,
  220.         and supporters, none of which are modeled in this early ADVENT.]
  221.        
  222. Understand nothing as turning.
  223.         Understand "turn [something] on"
  224.          and "turn on [something]" as switching on.
  225.         Understand "turn [something] off"
  226.          and "turn off [something]" as switching off.
  227.         [These syntaxes are fine for switching on and off,
  228.          but the action of turning, as in rotating something, is unimplemented.]
  229.  
  230. Chapter 4 - Extending the remaining verbs
  231.  
  232. Section 4.1 - looking
  233.        
  234. [       The room description should be displayed at the end of certain turns.   ]
  235. look later is a truth state that varies.  
  236.         When play begins, we should look later.
  237.         Before going nowhere, we should look later.
  238.         After going, going by keyword, retreating:
  239.                 we should look later.
  240.  
  241. Every turn when we should look later, try looking.
  242.  
  243. The looking action has a truth state called looked intentionally.
  244.  
  245. [       By default, assume the looking action is player-intended; rules can
  246.         indicate otherwise by stating "we should look later". There's no
  247.         other way to tell the two situations apart...                                                   ]
  248. Setting action variables for looking:
  249.         we have looked intentionally unless we must look later.
  250.  
  251. [       ...and it's the only way to know whether to issue this reminder (that
  252.         closely examining objects is not implemented):                                          ]
  253. Before looking when we have looked intentionally,
  254.         say "Sorry, but I am not allowed to give more detail. I will repeat the long description of [our] location."
  255.  
  256. After looking, we no longer must look later.
  257.        
  258. Section 4.2 - examining
  259.                
  260. [       The original did not allow examining anything, just printed the above
  261.         error message. Besides, there's no useful information to be gleaned
  262.         from things in this simple world model, anyway.                                         ]
  263. Instead of examining something which is not a backdrop, try looking.
  264.  
  265. Does the player mean doing something other than examining to a backdrop:
  266.         it is unlikely.
  267.  
  268. Section 4.3 - dropping
  269.  
  270. [       Crowther always displayed the initial appearance of everything in a room.       ]
  271. After dropping something:
  272.         now the noun is not handled;
  273.         continue the action.
  274.  
  275. Part III - Kinds
  276.  
  277. A room is usually dark.
  278.  
  279. [       Basically, the first time you enter a room, and every 5th round thereafter,
  280.          Crowther prints the long description rather than the short one.
  281.          Yes, this value is calculated for every room and stored for the entire game.   ]
  282. Every room has a number called the description print count.
  283.  
  284. Every room has a text called the short description.
  285. To decide whether (R - a room) lacks a short description:
  286.         if the short description of R is "", decide yes;
  287.         otherwise decide no.
  288.  
  289. Part IV - Rules
  290.  
  291. Chapter 1 - Darkness and light
  292.  
  293. [       The player didn't look around after turning on the lamp in the original.        ]
  294. Rule for printing the announcement of light: do nothing.
  295.        
  296. Rule for printing the announcement of darkness: do nothing.
  297.  
  298. Chapter 2 - Hints
  299.  
  300. [       A few hints are provided after failing to solve specific puzzles --
  301.         but only after provoking 3 parser errors in a row.                              ]
  302. The count of sequential parser errors is a number that varies.
  303.  
  304. The first after printing a parser error rule:
  305.         increment the count of sequential parser errors.
  306.  
  307. [       Every turn rules only fire after a command has been successfully parsed;
  308.         this means that an error message was not just printed,
  309.         and so we can reset the number of error messages printed in a row.              ]
  310. Every turn: now the count of sequential parser errors is 0.
  311.  
  312. To pose the question (proposition - a text)
  313.  with affirmative response (hint text - a text):
  314.         if the count of sequential parser errors is 3:
  315.                 now the count of sequential parser errors is 0;
  316.                 say "[line break][proposition][paragraph break]  ";
  317.                 if the player consents:
  318.                         say "[hint text][paragraph break]";
  319.                 otherwise:
  320.                         say "OK."
  321.        
  322. Chapter 3 - Crowther's messages
  323.  
  324. To say confusion:
  325.         if a random chance of 1 in 5 succeeds:
  326.                 say "I don't understand that! ";
  327.         otherwise if a random chance of 1 in 5 succeeds:
  328.                 say "What? ";
  329.         otherwise:
  330.                 say "I don't know that word. "
  331.  
  332. To say dunno:
  333.         say "I don't know how to apply that word here. ";
  334.         we will look later.
  335.  
  336. To say infromout:
  337.         say "I don't know in from out [here]. Use compass points or name something in the general direction you want to go. ";
  338.         we will look later.
  339.  
  340. To happen is a verb.
  341. To say nothinghap:
  342.         say "Nothing [happen].";
  343.         we will look later.
  344.  
  345. Section 3.1 - you must name something more substantial
  346.  
  347. The basic accessibility rule response (A) is "[dunno]".
  348.  
  349. Section 3.2 - eating
  350.  
  351. The can't eat unless edible rule response (A) is "[There] [are] nothing here to eat."
  352. The standard report eating rule response (A) is "Eaten!"
  353.  
  354. Section 3.3 - taking
  355.  
  356. The standard report taking rule response (A) is "OK."
  357. The can't take other people rule response (A) is "[serious]".
  358. The can't take what's fixed in place rule response (A) is "[serious]".
  359. The can't take what's already taken rule response (A) is "[We] [are] already carrying [regarding the noun][them]! ".
  360. To say serious: say "You can't be serious! ".
  361.  
  362. Section 3.4 - dropping
  363.  
  364. The can't drop what's not held rule response (A) is "[We] [aren't] carrying [regarding the noun][them]!"
  365. The standard report dropping rule response (A) is "OK."
  366.  
  367. Section 3.5 - going
  368.  
  369. The can't go that way rule response (A) is "[if the noun is sixfold]There [are] no way to go that direction.[otherwise if the noun is inside or the noun is outside][infromout][otherwise][dunno][end if]".
  370. The block vaguely going rule response (A) is "Where? ".
  371.  
  372. Definition: a direction is sixfold
  373.  if it is north
  374.  or it is south
  375.  or it is east
  376.  or it is west
  377.  or it is up
  378.  or it is down.
  379.  
  380. Section 3.6 - taking inventory
  381.  
  382. The print empty inventory rule response (A) is "[We] [are] carrying nothing."
  383. The print standard inventory rule response (A) is "[We] [are] carrying".
  384. The list writer internal rule response (D) is "lit".
  385.  
  386. Section 3.7 - misc
  387.  
  388. The parser error internal rule response (B) is "All I understood was you wanted to ".
  389. The parser error internal rule response (E) is "[confusion]".
  390. The parser error internal rule response (H) is "[We] [can] only [parser command so far] one thing at a time. ".
  391. The parser error internal rule response (K) is "[confusion]".
  392. The parser error internal rule response (N) is "I don't know that word. ".
  393. The parser error internal rule response (R) is "[confusion]".
  394. The parser error internal rule response (U) is "[confusion]".
  395. The parser error internal rule response (V) is "[confusion]".
  396. The parser error internal rule response (X) is "[confusion]".
  397. The parser nothing error internal rule response (B) is "[dunno]".
  398. The parser clarification internal rule response (E) is "[Parser command so far] what? ".
  399. The yes or no question internal rule response (A) is "Please respond yes or no. "
  400.  
  401. The can't reach inside rooms rule response (A) is "[confusion]".
  402.  
  403. The report rubbing rule response (A) is "Peculiar. Nothing unexpected [happen]. ".
  404.  
  405. The block drinking rule response (A) is "There [are] no drinkable water [here]. ".
  406.  
  407. The can't exit when not inside anything rule response (A) is "[infromout]".
  408.  
  409. The report jumping rule response (A) is "[dunno]".
  410.  
  411. The block thinking rule response (A) is "OK."
  412.  
  413. The report waving things rule response (A) is "[nothinghap]".
  414.  
  415. Chapter 4 - Room headings and descriptions
  416.  
  417. [       First, an abbreviation for [roman type] to mark the end of the
  418.         boldfacing at the start of all of the room descriptions.                                        ]
  419. To say /b -- running on: (- style roman; -).
  420.        
  421. [       These next two rules obviously modify two rules from the Standard
  422.         Rules, to change the way the looking action prints the name and
  423.         description of a previously visited room in BRIEF mode only.                    ]
  424.  
  425. Section 4a - room headings
  426.  
  427. Crowther's room description heading rule is listed instead of
  428.  the room description heading rule in the carry out looking rulebook.
  429.  
  430. [       Normally this rule does nothing -- unless the game is in the
  431.         default BRIEF mode, and the room has a short description provided,
  432.         and the number of times the room has been described is not an
  433.         even multiple of 5. In that case, it prints the short description.              ]
  434. This is the Crowther's room description heading rule:
  435.         say bold type;
  436.         if the visibility level count is 0:
  437.                 begin the printing the name of a dark room activity;
  438.                 end the printing the name of a dark room activity;
  439.         otherwise if the visibility ceiling is the location:
  440.                 if the description print count of the location is 5:
  441.                         now the description print count of the location is 0;
  442.                         [To prevent overflow.]
  443.                 if set to abbreviated room descriptions and
  444.                  we haven't looked intentionally:
  445.                         say "[visibility ceiling]";
  446.                 if set to sometimes abbreviated room descriptions:
  447.                         if we have looked intentionally
  448.                          or the description print count of the location is 0
  449.                          or the location lacks a short description:
  450.                                 say "";
  451.                         otherwise:
  452.                                 say the short description of the location;
  453.         unless we have looked intentionally
  454.          or the description print count of the location is 0
  455.          or the location lacks a short description:
  456.                 say line break;
  457.         say run paragraph on with special look spacing.
  458.  
  459. Section 4b - room descriptions
  460.  
  461. To proceed is a verb.
  462.  
  463. Crowther's room description body text rule is listed instead of
  464.  the room description body text rule in the carry out looking rulebook.
  465.  
  466. [       If the heading rule has printed the short description, this second
  467.         rule does nothing; otherwise this rule prints the long description.     ]
  468. This is the Crowther's room description body text rule:
  469.         if the visibility level count is 0:
  470.                 begin the printing the description of a dark room activity;
  471.                 if handling the printing the description of a dark room activity:
  472.                         now the prior named object is nothing;
  473.                         say "[It] [are] pitch black. If [we] [proceed] [we] [are] likely to fall into a pit." (A);
  474.                 end the printing the description of a dark room activity;
  475.         otherwise if the visibility ceiling is the location:
  476.                 if we have looked intentionally:
  477.                         say "[description of the location][line break]";
  478.                         continue the action;
  479.                 if set to abbreviated room descriptions:
  480.                         say roman type;
  481.                         continue the action;
  482.                 if set to sometimes abbreviated room descriptions
  483.                  and the location is visited:
  484.                         increment the description print count of the location;
  485.                         if the description print count of the location is 1
  486.                          or the location lacks a short description:
  487.                                 say "[description of the location][line break]";
  488.                         otherwise:
  489.                                 say roman type;
  490.                         continue the action;
  491.                 otherwise:
  492.                         increment the description print count of the location;
  493.                         say "[description of the location][line break]";
  494.  
  495. Chapter 5 - Closing, locking, unlocking
  496.  
  497. The can't lock what's already locked rule is not listed in the check locking it with rulebook.  
  498. The can't lock what's open rule is not listed in the check locking it with rulebook.
  499.  
  500. The can't unlock what's already unlocked rule is not listed in the check unlocking it with rulebook.
  501.  
  502. Chapter 6 - Switching on, switching off
  503.  
  504. The can't switch on what's already on rule is not listed in the check switching on rulebook.
  505. The can't switch off what's already off rule is not listed in the check switching off rulebook.
  506.  
  507. Chapter 7 - Going west
  508.  
  509. [       Suggesting an abbreviation for a command;
  510.          one of the more obscure features of the original.      ]
  511. The full west count is a number that varies.
  512.  
  513. After reading a command
  514.  when the player's command exactly matches the regular expression "west":
  515.         unless the full west count is 10:
  516.                 increment the full west count;
  517.         otherwise:
  518.                 say "If you prefer, simply type w rather than west.";
  519.         continue the action.
  520.  
  521. BOOK TWO - LOCATIONS
  522.  
  523. Part I - Outdoors
  524.  
  525. Sylvan relates one room to various rooms.
  526.         The verb to be forestwise from implies the sylvan relation.
  527.         The verb to lead forestwise to implies the reversed sylvan relation.
  528. Depressive relates one room to various rooms.
  529.         The verb to be depressive from implies the depressive relation.
  530. Buildwise relates one room to various rooms.
  531.         The verb to be buildwise from implies the buildwise relation.
  532.         The verb to lead buildwise to implies the reversed buildwise relation.
  533.  
  534. A keyword is a kind of value.
  535.         The keywords are defined by the Table of Keywords.
  536.  
  537. Table of Keywords
  538. Name    Relevant relation
  539. fores   the sylvan relation
  540. depression      the depressive relation
  541. bld     the buildwise relation
  542.  
  543. Understand "depressed" as depression.
  544. Understand "build/building/house" as bld.
  545. Understand "forest" as fores.
  546.  
  547. Chapter 1 - Road
  548.  
  549. To flow is a verb.
  550.  
  551. End of Road is a room.
  552.         "[We] [are] standing at the end of a road[/b] before a small brick building. Around [us] [regarding it][are] a forest. A small stream [regarding it][flow] out of the building and down a gully."
  553.         The short description is "[We]['re] at End of Road again."
  554.  
  555. To slope is a verb.
  556.  
  557. Hill in Road is west from End of Road.
  558.         "[We] [singular have] walked up a hill,[/b] still in the forest. The road [now] [regarding it][slope] back down the other side of the hill. There [are] a building in the distance."
  559.         The short description is "[We]['re] at Hill in Road."
  560.         Forward is End of Road.
  561.         End of Road is buildwise from Hill in Road.
  562.         Down from Hill in Road, north from Hill in Road,
  563.          and back from Hill in Road are west from End of Road.
  564.         [North, down, and back in Hill in Road are non-symmetrical map connections:
  565.          south, up, and forward in End of Road do not lead back to Hill in Road.]
  566.         Understand "road" as east when the location is Hill in Road.
  567.         Understand "road" as west when the location is End of Road.
  568.        
  569. Chapter 2 - Building
  570.  
  571. The Building is east from End of Road.
  572.         "[We] [are] inside a building,[/b] a well house for a large spring."
  573.         The short description is "[We]['re] inside Building."
  574.         Outside is End of Road.
  575.         Building is buildwise from End of Road.
  576.        
  577.         Instead of going downstream in the Building:
  578.                 say "The stream [flow] out through a pair of 1 foot diameter sewer pipes. It [would are] advisable to use the door."
  579.                
  580.         Understand "outdoor/outdoors" as outside
  581.          when the location is the Building.
  582.          [The only place "outdo" is recognized in the original.]
  583.         Understand "door/gate" as west when the location is the Building.
  584.         Understand "stream" as downstream when the location is the Building.
  585.         Understand "door/gate" as east when the location is End of Road.
  586.                
  587.         [       This next rule allows the verb ">ENTER" to travel between
  588.                 End of Road and Building; anywhere else, it acts as a
  589.                 synonym for "go".                                                                               ]
  590.         Rule for supplying a missing noun when going
  591.          and the player's command includes "enter":
  592.                 if the location is End of Road, now the noun is east instead;
  593.                 if the location is Building, now the noun is west instead;
  594.                 continue the action.
  595.                
  596.         Some keys are in the building. "[There] [regarding keys][are] some keys on the ground [here]."
  597.        
  598.                 To say nokeys: say "[We] [have] no keys!"
  599.        
  600.                 The first check locking keylessly rule:
  601.                         if the location does not enclose the keys, say nokeys instead.
  602.                 The first check unlocking keylessly rule:
  603.                         if the location does not enclose the keys, say nokeys instead.
  604.        
  605.                 Before unlocking keylessly the keys,
  606.                         say "[We] [can't unlock] the keys." instead.
  607.        
  608.                 Rule for supplying a missing second noun
  609.                  when unlocking something with, locking something with:
  610.                         now the second noun is the keys.
  611.  
  612.         The lamp is a device in the building.
  613.                 "[There] [are] a shiny brass lantern nearby."
  614.                 Understand "lantern" as the lamp.
  615.                
  616.                 After switching on the lamp:
  617.                         now the lamp is lit; say "[Our] [lamp] [are] [now] on."
  618.                        
  619.                 After switching off the lamp:
  620.                         now the lamp is not lit; say "[Our] [lamp] [are] [now] off."
  621.                        
  622.                 To happen is a verb.
  623.                 Instead of rubbing the lamp,
  624.                         say "Rubbing the electric lamp [are not] particularly rewarding. Anyway, nothing exciting [happen]."
  625.                        
  626.                 Does the player mean switching on the lamp: it is very likely.
  627.                 Does the player mean switching off the lamp: it is very likely.
  628.  
  629.                 After reading a command
  630.                  when the player's command matches "light"
  631.                  and the location does not enclose the lamp:
  632.                         say "[We] [have] no source of light."; stop the action.
  633.  
  634.         The food is an edible, ambiguously plural thing in the Building.
  635.                 "There [are] food [here]."
  636.                 Understand "ration/rations" as the food.
  637.                
  638.         A bottle is a thing in the Building with printed name "bottle of water".
  639.                 "There [are] a[if the bottle is empty]n[end if] [bottle] [here]."
  640.                 The bottle can be empty or full.
  641.                 Understand "water" and "bottle of water" as the bottle
  642.                  when the bottle is full.
  643.                  
  644.                 Instead of drinking the full bottle:
  645.                         empty the bottle saying "The bottle of water [are] [now] empty."
  646.                        
  647.                 Instead of pouring the bottle:
  648.                         empty the bottle saying "[Our] bottle [regarding bottle][are] empty and the ground [are] wet."
  649.                         [No, pouring the bottle doesn't fail if it's already empty.
  650.                          The message technically works in either case.]
  651.                
  652.                 To empty the bottle saying (T - a text):
  653.                         now the bottle is empty;
  654.                         now the printed name of the bottle is "empty bottle";
  655.                         say T.
  656.                        
  657. Chapter 3 - Valley
  658.  
  659. The Valley is south from End of Road.
  660.         "[We] [are] in a valley[/b] in the forest beside a stream tumbling along a rocky bed."
  661.         The short description is "[We]['re] in Valley."
  662.         Upstream is End of Road.
  663.         Downstream from End of Road,
  664.          down from End of Road are north from Valley.
  665.         Understand "gully/stream" as south when the location is End of Road.
  666.        
  667. Chapter 4 - Forests
  668.  
  669. A forest is a kind of room. A forest is usually privately-named.
  670.         The printed name of a forest is usually "Forest".
  671.         The short description of a forest is usually "[We]['re] in Forest."
  672.         Understand "valley" as down when the location is a forest.
  673.  
  674. Forest 1 is a forest, south from Hill in Road.
  675.         "[We] [are] in open forest,[/b] with a deep valley to one side."
  676.         East, down is Valley. West, south is Forest 1.
  677.         Forest 1 is north from End of Road, forestwise from Valley,
  678.          forestwise from End of Road, and forestwise from Hill in Road.
  679.         East from Valley is east from Forest 1.
  680.         Instead of going west in Forest 1, we must look later.
  681.         Instead of going south in Forest 1, we must look later.
  682.  
  683. Forest 2 is a forest, north of Forest 1.
  684.         "[We] [are] in open forest[/b] near both a gorge and a road."
  685.         North is the End of Road. East, west, down is the Valley.
  686.         Forest 2 is forestwise from Forest 1, forestwise from Forest 2.
  687.         Forward from Forest 1, back from Forest 1 are south from Forest 2.
  688.         Instead of going to Forest 2 from Forest 1
  689.          when a random chance of 1 in 2 succeeds, we must look later.
  690.        
  691. Chapter 5 - Slit in streambed
  692.  
  693. The Slit in Streambed is south of the Valley. To splash is a verb.
  694.         "At [our] feet all the water of the stream[/b] [regarding it][splash] into a 2 inch slit in the rock. Downstream the streambed [are] bare rock."
  695.         The short description is "[We]['re] at Slit in Streambed."
  696.         North, upstream is the Valley. West, east is Forest 1.
  697.         Streambed is below the Valley. Up is nowhere.
  698.         Streambed leads forestwise to Forest 1.
  699.         It leads buildwise to End of Road.
  700.        
  701.         To fit is a verb.
  702.         Before going down in Streambed:
  703.                 we will look later;
  704.                 say "[We] [don't fit] down a two inch hole!" instead.
  705.                
  706.         Understand "stream/slit" as down when the location is Streambed.
  707.         Understand "bed/rock/streambed" as south
  708.          when the location is Streambed.
  709.         [The original would parse "streambed" as "strea" and so print the
  710.          "two inch hole" error message, but considering the word appears
  711.          in the room description, allowing it seems fair.]
  712.        
  713. Chapter 6 - Outside the grate
  714.        
  715. Stream's End is south from Streambed.  To lead is a verb.
  716.         "[We] [are] in a 20 foot depression[/b] floored with bare dirt. Set into the dirt [regarding it][are] a strong steel grate mounted in concrete. A dry streambed [lead] into the depression."
  717.         The short description is "[We]['re] Outside Grate." The printed name is "Outside Grate".
  718.         North and upstream is Streambed. South, east, west is Forest 1.
  719.         Down from Streambed is north from Stream's End.
  720.         Stream's End leads forestwise to Forest 1.
  721.         It leads buildwise to End of Road.
  722.         Stream's End is depressive from End of Road
  723.          and depressive from Valley.
  724.         Understand "gully" as north when the location is Stream's End.
  725.        
  726.         Rule for supplying a missing noun when going
  727.          and the player's command includes "enter"
  728.          and the location is Stream's End: now the noun is down instead.
  729.  
  730.         The grate is a locked, closed, lockable door unlocked by the keys. The grate is down from Stream's End.
  731.                 "[The grate] [are] [if open]open[otherwise]locked[end if]."
  732.                 Before going inside in Stream's End, try going down instead.
  733.                 Before going downstream in Stream's End,
  734.                         try going down instead.
  735.                 Before going through the locked grate:
  736.                         we will look later;
  737.                         say "[We] [can't go] [if the location is Stream's End]in [end if]through a locked steel grate!" instead.
  738.                
  739.                 Unlocking keylessly the locked grate is attempting entry.
  740.                 Unlocking the locked grate with is attempting entry.
  741.                 Before attempting entry when the location encloses the keys:
  742.                 [The original was forgiving in its world model.]
  743.                         now the grate is open;
  744.                         now the grate is unlocked;
  745.                         say "[The grate] [are] [now] unlocked." instead.
  746.                
  747.                 Locking keylessly the unlocked grate is cave-sealing.
  748.                 Locking the unlocked grate with is cave-sealing.
  749.                 Before cave-sealing when the location encloses the keys:
  750.                         now the grate is closed;
  751.                         now the grate is locked;
  752.                         say "[The grate] [are] [now] locked." instead.
  753.                
  754.                 Unlocking keylessly the unlocked grate is acting ungrateful.
  755.                 Unlocking the unlocked grate with is acting ungrateful.
  756.                 Locking keylessly the locked grate is acting ungrateful.
  757.                 Locking the locked grate with is acting ungrateful.
  758.                 Before acting ungrateful when the location encloses the keys:
  759.                         say "The grate was already [if the grate is unlocked]un[end if]locked." instead.
  760.                
  761.                 Does the player mean unlocking keylessly the grate: it is likely.
  762.                 Does the player mean locking keylessly the grate: it is likely.
  763.  
  764.                 Rule for supplying a missing noun when locking keylessly,
  765.                  unlocking keylessly, locking something with,
  766.                  unlocking something with:
  767.                         if the grate is in the location, now the noun is the grate;
  768.                         otherwise say "There [are] nothing here with a lock!" instead.
  769.  
  770.                 After printing a parser error when the locked grate is in the location,
  771.                  pose the question "Are you trying to get into the cave? "
  772.                  with affirmative response "The grate is very solid and has a hardened steel lock. [We] [cannot enter] without a key, and there [regarding them][are] no keys nearby. I would recommend looking elsewhere for the keys."
  773.  
  774. Part II - Cave Preamble
  775.  
  776. Xyzzy-link relates one room to another.
  777.         The verb to be xyzzy-linked with implies the xyzzy-link relation.
  778. Pitwise relates one room to various rooms.
  779.         The verb to be pitwise from implies the pitwise relation.
  780. Debrisness relates one room to various rooms.
  781.         The verb to be debrisward from implies the debrisness relation.
  782.  
  783. Table of Keywords (continued)
  784. Name    Relevant relation
  785. xyzzy   the xyzzy-link relation
  786. pit-word        the pitwise relation
  787. debrisroom      the debrisness relation
  788.  
  789. Understand "debris" or "debris room" as debrisroom.
  790. Understand "pit" as pit-word.
  791.  
  792. Chapter 1 - Below the grate
  793.  
  794. The Entryway is a privately-named room, inside from the grate.
  795.         The description is "[We] [are] in a small chamber[/b] beneath a 3x3 steel grate to the surface. A low crawl over cobbles [regarding it][lead] inward to the west."
  796.         The short description is "[We]['re] Below the Grate."
  797.         The printed name is "Below the Grate".
  798.         Instead of going by keyword bld in Entryway, try going outside.
  799.        
  800. Chapter 2 - Cobble crawl
  801.  
  802. Cobble Crawl is west of Entryway.
  803.         "[We] [are] crawling over cobbles[/b] in a low passage. [There] [are] a dim light at the east end of the passage."
  804.         The short description is "[We]['re] in Cobble Crawl."
  805.         Outside is Entryway.
  806.         Understand "surface/null/nowhere" as outside
  807.          when the location is Cobble Crawl.
  808.         Understand "cobble/crawl" and "cobble crawl" as west
  809.          when the location is Entryway.
  810.  
  811.         A small wicker cage is in the Cobble Crawl.
  812.                 "There [are] a small wicker cage discarded nearby."
  813.        
  814. Chapter 3 - Debris room
  815.  
  816. The Debris Room is inside from Cobble Crawl. To become is a verb. To say is a verb.
  817.         "[We] [are] in a debris room,[/b] filled with stuff washed in from the surface. A low wide passage with cobbles [regarding it][become] plugged with mud and debris here, but an awkward canyon [lead] upward and west.[paragraph break]A note on the wall [say] [']Magic word XYZZY[']."
  818.         The short description is "[We]['re] in Debris Room."
  819.         East is Cobble Crawl. Outside is nowhere.
  820.         Building is xyzzy-linked with Debris Room.
  821.         Stream's End is depressive from Debris Room.
  822.         Debris Room is debrisward from Entryway,
  823.          debrisward from Cobble Crawl.
  824.         Understand "passage/passageway" as "[passa]".
  825.         Understand "[passa]" and "low/crawl/cobble" and "cobble crawl"
  826.          as east when the location is Debris Room.
  827.         Understand "dark" as inside when the location is Cobble Crawl.
  828.  
  829.         A black rod is in Debris room. To lie is a verb.
  830.                 "A three foot [black rod] with a rusty star on an end [lie] nearby."
  831.        
  832. Chapter 4 - Awkward sloping canyon
  833.  
  834. The Awkward Sloping East/West Canyon is west of Debris Room.
  835.         "[We] [are] in an awkward sloping east/west canyon.[/b]".
  836.         Down is Debris Room.
  837.         Inside from Debris Room is east from Awkward Sloping.
  838.         Stream's End is depressive from Awkward Canyon.
  839.         Debris Room is debrisward from Awkward Canyon.
  840.         Understand "canyon" as west when the location is Debris Room.
  841.        
  842. Chapter 5 - Bird chamber
  843.  
  844. The Bird Chamber is west of the Awkward Canyon. In Bird Chamber are a scenery, privately-named, plural-named thing called walls. To exit is a verb.
  845.         "[We] [are] in a splendid chamber[/b] thirty feet high. The [walls] [are] frozen rivers of orange stone. An awkward canyon and a good passage [exit] from east and west sides of the chamber."
  846.         The short description is "[We]['re] in Bird Chamber."
  847.         Inside from Awkward Canyon, up from Awkward Canyon
  848.          are east from Bird Chamber.
  849.         Stream's End is depressive from Bird Chamber.
  850.         Debris Room is debrisward from Bird Chamber.
  851.         Understand "canyon" as east when the location is Bird Chamber.
  852.  
  853.         A little bird is a thing in the Chamber.
  854.                 "A cheerful [little bird] [are] sitting [here] singing."
  855.                
  856.                 To approach is a verb. To catch is a verb.
  857.                 Check taking the little bird when the little bird is not held:
  858.                         if the player carries the rod,
  859.                                 say "The bird was unafraid when [we] entered, but as [we] [approach] [it] [become] disturbed and [we] [cannot catch] it." instead;
  860.                         if the player does not carry the cage,
  861.                                 say "[We] [can catch] the bird, but [we] [cannot carry] it." instead;
  862.  
  863.                 To try is a verb.
  864.                 After printing a parser error when the little bird is in the location
  865.                  and the rod is carried,
  866.                  pose the question "Are you trying to catch the bird? "
  867.                  with affirmative response "The bird [are] frightened right [now] and [we] [cannot catch] it no matter what [we] [try]. Perhaps [we] [might try] later."
  868.  
  869.                 To disappear is a verb.
  870.                 Before attacking the little bird:
  871.                         say "[The little bird] [are] [now] dead. Its body [disappear].";
  872.                         now the little bird is nowhere;
  873.                         stop the action.
  874.                        
  875. Chapter 6 - Top of small pit
  876.  
  877. The Top of Small is west of the Bird Chamber. To end is a verb.
  878.         "At [our] feet [regarding it][are] a small pit[/b] breathing traces of white mist. An east passage [end] here except for a small crack leading on."
  879.         The short description is "[We]['re] at Top of Small Pit."
  880.         The printed name is "Top of Small Pit".
  881.         Stream's End is depressive from Top of Small.
  882.         Debris Room is debrisward from Top of Small.
  883.         Top of Small is pitwise from Entryway, pitwise from Cobble Crawl,
  884.          pitwise from Debris Room, pitwise from Awkward,
  885.          and pitwise from Bird Chamber.
  886.          
  887.         Instead of going west in Top of Small,
  888.                 say "The crack [are] far too small for [us] to follow."
  889.                
  890.         Understand "[passa]" as east when the location is Top of Small.
  891.         Understand "crack" as west when the location is Top of Small.
  892.         Understand "[passa]" as west when the location is Bird Chamber.
  893.        
  894.         Some rough stone steps are an open unopenable door, below the Top of Small.
  895.                 "Rough stone steps [regarding steps][lead] [if the location is Top of Small]down into the pit[otherwise]up the dome[end if]."
  896.                
  897.                 Instead of going by keyword pit-word in Top of Small,
  898.                         try going down.
  899.  
  900. Part III - Hall of Mists, East
  901.  
  902. Chapter 1 - The hall
  903.  
  904. The Hall of Mists is west from the steps. To blow is a verb.
  905.         "[We] [are] at one end of a vast hall[/b] stretching forward out of sight to the west. There [regarding them][are] openings to either side. Nearby, a wide stone staircase [regarding it][lead] downward. The hall [are] filled with wisps of white mist swaying to and fro almost as if alive. A cold wind [blow] up the staircase. There [are] a passage at the top of a dome behind [us]."  
  906.         The short description is "[We]['re] in Hall of Mists."
  907.         Instead of going by keyword pit-word in Hall of Mists, try going east.
  908.         Instead of going up in Hall of Mists, try going east.
  909.         Understand "dome" and "[passa]" as east when the location is Mists.
  910.        
  911. Chapter 2 - Nugget of gold room
  912.  
  913. The Nugget of Gold Room is south from the Hall of Mists.
  914.         "This [are] a low room[/b] with a crude note on the wall. [It] [say] [']You won't get it up the steps[']."
  915.         The short description is "[We]['re] in Nugget of Gold Room."
  916.         Outside from Nugget Room,
  917.          back from Nugget Room are south from Hall of Mists.
  918.         Understand "hall" as north when the location is Gold Room.
  919.         Understand "left" as south when the location is the Hall of Mists.
  920.  
  921.         The sparkling gold nugget is in the Gold Room.
  922.                 "There [are] a sparkling nugget of gold here!"
  923.                 Understand "sparkling/-- nugget of gold" as the gold nugget.
  924.                 [Later code puts every thing in scope;
  925.                  to avoid spurious "Which did you mean?" messages,
  926.                  the nugget is code-named without the word "of".]
  927.        
  928.                 Before going through the steps
  929.                  when the sparkling nugget is carried:
  930.                         we will look later;
  931.                         if the location is Hall of Mists,
  932.                                 say "The dome [are] unclimbable." instead;
  933.                         if the location is Top of Small,
  934.                                 end the story saying "[We]['re] at the bottom of the pit with a broken neck."
  935.                                 [Originally, this death was bugged: after going down the steps
  936.                                  with the nugget, the original printed "I don't understand that!"
  937.                                  in an endless loop. Woods' version corrected this.]
  938.  
  939. Chapter 3 - East bank of fissure
  940.  
  941. The East Bank of Fissure is west from the Hall of Mists.
  942.         "[We] [are] on the east bank of a fissure[/b] slicing clear across the hall. The mist [regarding it][are] quite thick here, and the fissure [are] too wide to jump."
  943.         The short description is "[We]['re] on East Bank of Fissure."
  944.         East Bank is forward from the Hall of Mists.
  945.         Understand "hall" as east when the location is the East Bank.
  946.         Understand "hall" as west when the location is Hall of Mists.
  947.  
  948.         The fissure-door is a privately-named, closed, unopenable scenery door,
  949.          west from the East Bank. To span is a verb.
  950.                 The initial appearance is "A crystal bridge [now] [span] the fissure."
  951.                 The printed name is "fissure".
  952.                
  953.                 Does the player mean doing something with the fissure-door:
  954.                         it is unlikely.
  955.                        
  956.                 Instead of jumping in East Bank, try going west.
  957.                 Instead of going inside in the East Bank, try going west.
  958.                
  959.                 Before going through the closed fissure-door:
  960.                         we will look later;
  961.                         say "There [are] no way across the fissure." instead.
  962.                        
  963.                 Instead of going forward in the East Bank,
  964.                         end the story saying "Game is over".
  965.                         [That's right, "forward" killed the player here, even with the bridge.
  966.                          Might as well keep it; it's an obscure action anyway.]
  967.                          
  968.                 Understand "fissure" as the fissure-door.
  969.                 Understand "bridge" as the fissure-door
  970.                  when the fissure-door is open.
  971.                 Understand "magic/over/across" as west
  972.                  when the location is the East Bank.
  973.                
  974.                 Instead of striking the fissure-door:
  975.                         now the fissure-door is open;
  976.                         now the fissure-door is not scenery;
  977.                         say "[initial appearance of the fissure-door][line break]".
  978.        
  979. Part IV - Mountain King's Domain
  980.  
  981. Y2ness relates one room to one room.
  982.         The verb to be Y2wards from implies the Y2ness relation.
  983. Plugh-linkage relates one room to another.
  984.         The verb to be plugh-linked with implies the plugh-linkage relation.
  985.  
  986. Table of Keywords (continued)
  987. Name    Relevant Relation
  988. plugh   the plugh-linkage relation
  989. whytoo  the Y2ness relation
  990.  
  991. Understand "y2" as whytoo.
  992.  
  993. Chapter 1 - Hall of the mountain king
  994.  
  995. The Hall of Mt King is below the Hall of Mists. "[We] [are] in the Hall of the Mountain King,[/b] with passages off in all directions."
  996.         The short description is "[We]['re] in Hall of Mt King."
  997.         East from the Hall of Mt King is north from the Hall of Mists.
  998.         Understand "stair/stairs/staircase" as "[stair]".
  999.         Understand "[stair]" as east when the location is Mt King.
  1000.         Understand "[stair]" as down when the location is Mists.
  1001.  
  1002.         To bar is a verb.
  1003.         The huge green fierce snake is an animal in Mt King. "[A huge green fierce snake] [bar] the way!"
  1004.        
  1005.                 Going north in Mt King is moving dangerously.
  1006.                 Going west in Mt King is moving dangerously.
  1007.                 Going south in Mt King is moving dangerously.
  1008.                 Going forward in Mt King is moving dangerously.
  1009.        
  1010.                 To get by is a verb.
  1011.                 Before moving dangerously when the snake is obvious:
  1012.                         we will look later;
  1013.                         say "[We] [can't get by] the snake." instead.
  1014.        
  1015.                 To work is a verb.
  1016.                 Instead of attacking the snake:
  1017.                         say "Attacking the snake both [don't work] and [are] very dangerous."
  1018.        
  1019.                 To drive is a verb. To attack is a verb.
  1020.                 Instead of dropping the little bird when the snake is obvious:
  1021.                         say "[The little bird] [attack] the green snake, and in an astounding flurry [drive] the snake away.";
  1022.                         now the snake is nowhere;
  1023.                         now the little bird is in Mt King;
  1024.                         now the little bird is not handled.
  1025.  
  1026.         To kill is a verb. To avoid is a verb.
  1027.         After printing a parser error when the snake is in the location,
  1028.          pose the question "Are you trying to attack or avoid the snake? "
  1029.          with affirmative response "[We] [can't kill] the snake, or [drive] it away, or [avoid] it, or anything like that. [There] [are] a way to get by, but [we] [don't have] the necessary resources right now."
  1030.        
  1031. Chapter 2 - Low passage
  1032.  
  1033. The Low N/S Passage is north from Mt King.
  1034.         "[We] [are] in a low N/S passage[/b] at a hole in the floor."
  1035.         Outside from the Low Passage is north from Mt King.
  1036.         Understand "hall" as south when the location is Low Passage.
  1037.         Understand "hole" as down when the location is Low Passage.
  1038.         Understand "left" as north when the location is Mt King.
  1039.  
  1040.         Some silver bars are in the Low Passage. "[There] [regarding bars][are] bars of silver [here]!"
  1041.                 Understand "bars of silver" as the silver.
  1042.        
  1043. Chapter 3 - Side chambers
  1044.  
  1045. The South Side Chamber is south from Mt King.
  1046.         "[We] [are] in the south side chamber.[/b]".
  1047.         Outside from South Side Chamber is south from Mt King.
  1048.         Understand "hall" as north when the location is South Chamber.
  1049.         Understand "right" as south when the location is Mt King.
  1050.  
  1051.         Some precious jewelry is in the South Chamber. "There [are] precious jewelry here!"
  1052.  
  1053. The West Side Chamber is west from Mt King. To continue is a verb.
  1054.         "[We] [are] in the west side chamber[/b] of Hall of Mt King. A passage [regarding it][continue] west and up [here]."
  1055.         Outside from West Side Chamber is west from Mt King.
  1056.         Forward from Mt King is east from West Side Chamber.
  1057.         Understand "hall" as east when the location is West Chamber.
  1058.  
  1059.         Some coins are in the West Chamber. "There [regarding coins][are] many coins [here]!"  
  1060.        
  1061. Chapter 4 - Y2 area
  1062.  
  1063. Y2 is north from N/S Passage.
  1064.         "[We] [are] in a large room,[/b] with a passage to the south, a passage to the west, and a wall of broken rock to the east. [There] [are] a large [']Y-2['] on a rock in rooms center."
  1065.         The short description is "[We]['re] at Y2."
  1066.         Y2 is plugh-linked with Building.
  1067.         After looking in Y2 when a random chance of 1 in 4 succeeds:
  1068.                 say "A hollow voice [say] 'Plugh'."
  1069.  
  1070. Down from Jumble of Rock is east from Y2.
  1071.         "[We] [are] in a jumble of rock,[/b] with cracks everywhere."
  1072.         Above is Hall of Mists.
  1073.         Y2wards from Hall of Mists is Jumble of Rock.
  1074.         Understand "wall/broken/broke" as east when the location is Y2.
  1075.  
  1076. Window on Pit is west from Y2.
  1077.         "[We] [are] at a window on a huge pit,[/b] which [regarding it][go] up and down out of sight. A floor [are] indistinctly visible over 50 feet below. Directly opposite [us] and 25 feet away there [are] a similar window."
  1078.         The short description is "[We]['re] at Window on Pit."
  1079.        
  1080.         Instead of going by keyword whytoo in Window on Pit,
  1081.                 try going east.
  1082.  
  1083. Chapter 5 - Rough tunnels
  1084.  
  1085. The Dirty Passage is below Low N/S Passage.
  1086.         "[We] [are] in a dirty broken passage.[/b] To the east [regarding it][are] a crawl. To the west [are] a large passage. Above [us] [regarding it][are] a hole to another passage."
  1087.         The short description is "[We]['re] in Dirty Passage."
  1088.         Understand "hole" as up when the location is Dirty Passage.
  1089.  
  1090. The Pit Ledge is east from the Dirty Passage.
  1091.         "[We] [are] on the brink of a small clean climbable pit.[/b] A crawl [regarding it][lead] west."
  1092.         Understand "crawl" as west when the location is Pit Ledge.
  1093.         Understand "crawl" as east when the location is the Dirty Passage.
  1094.  
  1095. Bottom of Pit is below the Pit Ledge. To enter is a verb.
  1096.         "[We] [are] on the bottom of a small pit[/b] with a little stream, which [regarding it][enter] and exit through tiny slits."
  1097.         Instead of going by keyword pit-word in Pit Ledge, try going down.
  1098.         Understand "climb" as up when the location is Bottom of Pit.
  1099.         Understand "climb" as down when the location is Pit Ledge.
  1100.  
  1101. The Dusty Rock Room is west from the Dirty Passage.
  1102.         "[We] [are] in a large room full of dusty rocks.[/b] [There] [are] a big hole in the floor. [There] [are] cracks everywhere, and a passage leading east."
  1103.         The short description is "[We]['re] in Dusty Rock Room."
  1104.         Understand "hole/floor" as down when the location is Dusty Room.
  1105.  
  1106. Part V - Hall of Mists, West
  1107.  
  1108. Chapter 1 - West side of mists
  1109.  
  1110. The West Side of the Fissure is inside from the fissure-door.
  1111.         "[We] [are] on the west side of the fissure[/b] in the Hall of Mists."
  1112.         Instead of retreating in West of Fissure, try going outside.
  1113.         Understand "hall" as outside when the location is West Fissure.
  1114.         [Probably an oversight, but "east" never leads across from the West Side
  1115.          in the original.]
  1116.  
  1117.         [       The original doesn't mention the bridge when on the west side.  ]
  1118.         Rule for choosing notable locale objects for West of Fissure:
  1119.                 set the locale priority of the fissure-door to 0;
  1120.                 continue the activity.
  1121.        
  1122.         There are some diamonds in West of Fissure. "[There] [regarding diamonds][are] [diamonds] [here]!"
  1123.  
  1124. West End of Hall of Mists is west from West Fissure.
  1125.         "[We] [are] at the west end of Hall of Mists.[/b] A low wide crawl [regarding it][continue] west and another [go] north. To the south [are] a little passage 6 feet off the floor."
  1126.         The short description is "[We]['re] at West End of Hall of Mists."
  1127.  
  1128. Chapter 2 - Low wide passages
  1129.  
  1130. [       Surprisingly enough, Crowther implemented the low wide passage
  1131.         as two different rooms, each north of a different room. Any movement
  1132.         verb teleports the player to the other place.                                                   ]
  1133.  
  1134. A low wide passage is a kind of room.
  1135.         The printed name of a low wide passage is usually "Low Wide Passage".
  1136.         The description of a low wide passage is usually "[We] [singular have] crawled through a very low wide passage[/b] parallel to and north of the Hall of Mists."
  1137.         Every low wide passage has a room called the connected room.
  1138.        
  1139.         Instead of going, going by keyword, retreating
  1140.          in a low wide passage (called the venue):
  1141.                 move the player to the connected room of the venue,
  1142.                  without printing a room description;
  1143.                 we must look later.
  1144.  
  1145. Low Wide Passage 1 is a low wide passage, north from West End of Mists.
  1146.         The connected room is West Side of the Fissure.
  1147.  
  1148. Low Wide Passage 2 is a low wide passage, north from West Side of the Fissure.
  1149.         The connected room is West End of Mists.
  1150.                
  1151. Chapter 3 - Long hall
  1152.  
  1153. East End of Long Hall is west from West End of Mists. To slant is a verb.
  1154.         "[We] [are] at the east end of a very long hall[/b] apparently without side chambers. To the east a low wide crawl [regarding it][slant] up. To the north a round two foot hole [slant] down."
  1155.         The short description is "[We]['re] at East End of Long Hall."
  1156.         Up is West End of Mists.
  1157.         Understand "crawl" as west when the location is West End of Mists.
  1158.  
  1159. West End of Long Hall is west from East End of Long.
  1160.         "[We] [are] at the west end of a very long featureless hall.[/b]".
  1161.         Outside from West of Long is west from East of Long.
  1162.  
  1163. Part VI - A-mazing
  1164.  
  1165. A mazing room is a kind of room.
  1166.         The printed name of a mazing room is usually "Maze".
  1167.         The description of a mazing room is usually "[We] [are] in a maze[/b] of twisty little passages, all alike."
  1168.  
  1169. A dead end is a kind of room.
  1170.         The printed name of a dead end is usually "Dead End".
  1171.         The description of a dead end is usually "Dead End[/b]".
  1172.        
  1173. Chapter 1 - Main maze
  1174.  
  1175. Maze 1 is a mazing room. West from Maze 1 is up from West End of Mists.
  1176.         Instead of going south in West End of Mists, try going up.
  1177.         [Positioning Maze 1 south from West End of Mists wrecks the Inform 7 index map.
  1178.          Mapping Maze 1 up, instead, places the whole maze on a level above the rest of
  1179.          the game world, producing a much more readable map.
  1180.          This has no effect in-game, so we might as well.]
  1181.         Understand "climb" and "[passa]" as up
  1182.          when the location is West End of Hall of Mists.
  1183.  
  1184. Maze 2 is a mazing room, east of Maze 1.
  1185.  
  1186. Maze 3 is a mazing room, south of Maze 1.
  1187.         North is Maze 1.
  1188.         East from Maze 3 is south from Maze 2.
  1189.  
  1190. Maze 4 is a mazing room. East from Maze 2 is north from Maze 4.
  1191.         Index map with Maze 4 mapped southeast from Maze 2.
  1192.        
  1193. Deadend 1 is a dead end. Outside from Deadend 1 is east from Maze 4.
  1194. Deadend 2 is a dead end. Outside from Deadend 2 is south from Maze 4.  
  1195. Deadend 3 is a dead end. Outside from Deadend 3 is below Maze 3.
  1196.  
  1197. Maze 5 is a mazing room.
  1198.  
  1199. Maze 6 is a mazing room, below Maze 5.
  1200.         West is Maze 5.
  1201.         East of Maze 6 is south of Maze 3.
  1202.         Index map with Maze 6 mapped southwest of Maze 3.
  1203.  
  1204. Maze 7 is a mazing room. West from Maze 5 is west from Maze 7.
  1205.  
  1206. Maze 8 is a mazing room, south of Maze 6.
  1207.         West is Maze 7.
  1208.  
  1209. Maze 9 is a mazing room. Above Maze 8 is north from Maze 9.
  1210.         West from Maze 9 is south from Maze 7.
  1211.  
  1212. Deadend 4 is a dead end. Outside from Deadend 4 is south of Maze 9.
  1213.  
  1214. Maze A is a mazing room, east of Maze 8.
  1215.  
  1216. Deadend 5 is a dead end. Outside from Deadend 5 is below Maze A.
  1217.  
  1218. Chapter 2 - End of the maze
  1219.  
  1220. Brink of Pit is east of Maze A. To climb is a verb. To get is a verb.
  1221.         "[We] [are] on the brink of a thirty foot pit[/b] with a massive orange column down one wall. [We] [could climb] down here but [we] [could not get] back up. The maze [regarding it][continue] at this level."
  1222.         The short description is "[We]['re] at Brink of Pit."
  1223.         Down is Bird Chamber. Up from Bird Chamber is nowhere.
  1224.         Understand "climb" as down when the location is Brink of Pit.
  1225.  
  1226. Deadend 6 is a dead end. West of Deadend 6 is south of Brink of Pit.
  1227.         Outside from Deadend 6 is south of Brink of Pit.
  1228.         Index map with Deadend 6 mapped southeast of Brink of Pit.
  1229.  
  1230. Part VII - Under Construction
  1231.  
  1232. Crossness relates one room to one room.
  1233.         The verb to be towards crossover from implies the crossness relation.
  1234. Bedquiltness relates one room to one room.
  1235.         The verb to be towards bedquilt from implies the bedquiltness relation.
  1236. Slabness relates one room to one room.
  1237.         The verb to be towards slabroom from implies the slabness relation.
  1238.  
  1239. Table of Keywords (continued)
  1240. Name    Relevant Relation
  1241. cross   the crossness relation
  1242. bedqu   the bedquiltness relation
  1243. slabroom        the slabness relation
  1244.  
  1245. Understand "slab" or "slab room" as slabroom.
  1246. Understand "bedquilt" as bedqu.
  1247. Understand "crossover" as cross.
  1248.  
  1249. To transport the player randomly to (main place - a room)
  1250.  with likelihood (MN - a number) or to (second place - a room):
  1251.         let destinations be MN copies of the main place;
  1252.         add the second place to destinations;
  1253.         go to a room at random from destinations.
  1254.        
  1255. To transport the player randomly to (main place - a room)
  1256.  with likelihood (MN - a number) or to (second place - a room)
  1257.  with likelihood (SN - a number) or to (third place - a room):
  1258.         let destinations be MN copies of the main place;
  1259.         add SN copies of the second place to destinations;
  1260.         add the third place to destinations;
  1261.         go to a room at random from destinations.
  1262.        
  1263. To decide what list of rooms is (N - a number) copies of (R - a room):
  1264.         let L be a list of rooms;
  1265.         repeat with X running from 1 to N:
  1266.                 add R to L;
  1267.         decide on L.
  1268.                
  1269. To go to a room at random from (LR - a list of rooms):
  1270.         sort LR in random order;
  1271.         if entry 1 in LR is the location,
  1272.                 say "[We] [singular have] crawled around in some little holes and wound up back in the main passage.";
  1273.         move the player to entry 1 in LR, without printing a room description;
  1274.         we must look later.
  1275.        
  1276. Chapter 1 - Crossover
  1277.  
  1278. The Crossover is west of the West Chamber.
  1279.         "[We] [are] at a crossover[/b] of a high N/S passage and a low E/W one."
  1280.         South is the Hall of Mists.
  1281.         Crossover is below West Chamber. Up is nowhere.
  1282.         West from Crossover is down from East End of Long Hall,
  1283.          north from the East End of Long Hall.
  1284.         Crossover is towards crossover from Hall of Mists.
  1285.        
  1286. Deadend 7 is a dead end, north from Crossover.
  1287.         Outside from Deadend 7 is north from Crossover.
  1288.        
  1289. Chapter 2 - Complex junction
  1290.  
  1291. Complex Junction is below Dusty Rock Room. To join is a verb.
  1292.         "[We] [are] at a complex junction.[/b] A low hands and knees passage from the north [regarding it][join] a higher crawl from the east to make a walking passage going west. There [are] also a large room above. The air [are] damp [here].[paragraph break]A sign in midair [here] [say] [']Cave under construction beyond this point. Proceed at own risk.[']".
  1293.         Understand "climb/room" as up when the location is Complex Junction.
  1294.        
  1295. Chapter 3 - Bedquilt
  1296.  
  1297. Bedquilt is west from Complex Junction.
  1298.         "[We] [are] in Bedquilt,[/b] a long east/west passage with holes everywhere. To explore at random select north, south, up, or down."
  1299.         Bedquilt is towards bedquilt from Dusty Rock Room.
  1300.        
  1301.         Instead of going south in Bedquilt:
  1302.                 transport the player randomly to Bedquilt with likelihood 4
  1303.                  or to Slab Room;
  1304.                 rule succeeds.
  1305.                
  1306.         Instead of going up in Bedquilt:
  1307.                 transport the player randomly to Bedquilt with likelihood 8
  1308.                  or to Secret N/S Canyon with likelihood 1 or to Dusty Room;
  1309.                 rule succeeds.
  1310.        
  1311. Chapter 4 - Swiss room
  1312.  
  1313. Northeast from Swiss Cheese Room is west from Bedquilt. To resemble is a verb.
  1314.         "[We] [are] in a room whose [walls] [resemble] swiss cheese.[/b] Obvious passages [go] west, east, ne, and nw. Part of the room [regarding it][are] occupied by a large bedrock block."
  1315.         The short description is "[We]['re] in Swiss Cheese Room."
  1316.        
  1317.         Instead of going north in Swiss Cheese:
  1318.                 transport the player randomly to Swiss Cheese with likelihood 6
  1319.                  or to Junction Canyon with likelihood 3 or to Large Low;
  1320.                 rule succeeds.
  1321.                
  1322.         Instead of going south in Swiss Cheese:
  1323.                 transport the player randomly to Swiss Cheese with likelihood 4
  1324.                  or to Tall Canyon;
  1325.                 rule succeeds.
  1326.                 [This last random movement actually existed in the original,
  1327.                  but could never execute; due to a buggy GOTO statement,
  1328.                  going south in Swiss crashed the program.]
  1329.        
  1330. Chapter 5 - Twopit area
  1331.  
  1332. The Twopit Room is west from Swiss Cheese. To make is a verb.
  1333.         "[We] [are] in the Twopit Room.[/b] The floor [here] [regarding it][are] littered with thin rock slabs, which [regarding them][make] it easy to descend the pits. [There] [are] a path [here] bypassing the the pits to connect passages from east and west. There [regarding them][are] holes all over, but the only big one [regarding it][are] on the wall directly over the east pit where [we] [can't get] to it."
  1334.         The short description is "[We]['re] in Twopit Room."
  1335.  
  1336. The Large Low Room is northeast from Twopit.
  1337.         "[We] [are] in a large low room.[/b] Crawls [regarding them][lead] N, SE, and SW."
  1338.  
  1339. Dead End Crawl is north from Large Low. "Dead End Crawl.[/b]"
  1340.  
  1341. Chapter 6 - Slab room
  1342.  
  1343. The Slab Room is north from Swiss Cheese. To bend is a verb.
  1344.         "[We] [are] in a large low circular chamber[/b] whose floor [regarding it][are] an immense slab fallen from the ceiling (slab room). East and west there once were large passages, but [regarding them][they] [are] [now] filled with boulders. Low small passages [go] north and south, and the south one quickly [regarding it][bend] west around the boulders."
  1345.         The short description is "[We]['re] in Slab Room."
  1346.         Slab Room is towards slabroom from Bedquilt.
  1347.  
  1348. Part VIII - Secrets
  1349.  
  1350. Secretness relates one room to one room.
  1351.         The verb to be towards secret from implies the secretness relation.
  1352. Canyonness relates one room to one room.
  1353.         The verb to be towards canyon from implies the canyonness relation.
  1354.  
  1355. Table of Keywords (continued)
  1356. Name    Relevant Relation
  1357. secre   the secretness relation
  1358. canyo   the canyonness relation
  1359.  
  1360. Understand "canyon" as canyo. Understand "secret" as secre.
  1361.  
  1362. Chapter 1 - Secret north/south canyon
  1363.  
  1364. Secret NS Canyon is above the Slab Room.
  1365.         "[We] [are] in a secret NS canyon[/b] above a large room."
  1366.         Index map with Secret NS Canyon mapped southwest of West Side Chamber.
  1367.        
  1368. Chapter 2 - East/west canyon
  1369.  
  1370. West from E/W Canyon is south from Secret NS Canyon. To cross is a verb.
  1371.         "[We] [are] in Secret Canyon[/b] which [here] [regarding it][run] E/W. [It] [cross] over a very tight canyon 15 feet below. If [we] [go] down [we] [may not are] able to get back up."
  1372.         The printed name is "Secret Canyon".
  1373.         East is Hall of Mt King.
  1374.         E/W Canyon is towards secret from the Hall of Mt King.
  1375.         Index map with E/W Canyon mapped southeast from Secret NS Canyon.
  1376.        
  1377. Chapter 3 - Secret canyon
  1378.  
  1379. The Junction Canyon is a room.
  1380.         "[We] [are] in Secret Canyon[/b] at a junction of three canyons, bearing north, south, and se. The north one [regarding it][are] as tall as the other two combined."
  1381.         The printed name is "Secret Canyon".
  1382.         Up is Dusty Room. Southeast is Bedquilt.
  1383.         Northwest from Bedquilt is nowhere.
  1384.        
  1385. Chapter 4 - Secret north/south Canyon
  1386.  
  1387. The Secret N/S Canyon is south from Junction Canyon.
  1388.         "[We] [are] in a secret N/S canyon[/b] above a sizable passage."
  1389.  
  1390. Chapter 5 - Wide place
  1391.  
  1392. The Wide Place is below E/W Canyon.
  1393.         "[We] [are] at a wide place[/b] in a very tight N/S canyon."
  1394.         Up is nowhere.
  1395.  
  1396. Too Tight is south from Wide Place.
  1397.         "The canyon [here] [become] too tight[/b] to go further south."
  1398.  
  1399. Chapter 6 - Tall east/west canyon
  1400.  
  1401. East from Tall E/W Canyon is north from the Wide Place. To seem is a verb.
  1402.         "[We] [are] in a tall E/W canyon.[/b] A low tight crawl [regarding it][go] 3 feet north and [seem] to open up."
  1403.         North is Swiss Cheese Room.
  1404.         Tall Canyon is towards canyon from Swiss Cheese.
  1405.  
  1406. South from Boulders is west from Tall Canyon. To run is a verb.
  1407.         "The canyon [run] into a mass of boulders[/b] - dead end."
  1408.         Index map with Boulders mapped southwest from Swiss.
  1409.  
  1410. Part IX - Multi-Room Handling
  1411.  
  1412. Chapter 1 - Backdrops
  1413.  
  1414. To detour is a verb.
  1415. Some trees are a backdrop.
  1416.         The description is "The trees of the forest [regarding trees][are] large hardwood oak and maple, with an occasional grove of pine or spruce. [There] [are] quite a bit of undergrowth, largely birch and ash saplings plus nondescript bushes of various sorts. [This] time of year visibility [are] quite restricted by all the leaves, but travel [are] quite easy if [we] [detour] around the spruce and berry bushes."
  1417.         They are in End of Road, Hill in Road, Forest 1, Forest 2, Valley,
  1418.          Streambed, and Stream's End.
  1419.          
  1420. To say This:
  1421.         if the story tense is present tense or the story tense is perfect tense:
  1422.                 say "This";
  1423.         otherwise:
  1424.                 say "That".
  1425.  
  1426. The mistiness is a privately-named backdrop.
  1427.         The description is "Mist is a white vapor, usually water, seen from time to time in caverns. It [can are] found anywhere but is frequently a sign of a deep pit leading down to water."
  1428.         It is in the Top of Small, Hall of Mists, East Fissure, and West Fissure.
  1429.         Understand "mist" as the mistiness.
  1430.  
  1431. Understand "[trees]" and "[mistiness]" as examining.
  1432. [       To allow >TREES and >MIST to simply print a block of text, as in the original.  ]
  1433.        
  1434. The crawlability marker is a privately-named backdrop.
  1435.         It is in West End of Mists, Dirty Passage, Pit Ledge, Entryway,
  1436.          and Debris Room.
  1437.         [This allows ">CRAWL" alone to work as a movement keyword in certain areas,
  1438.         and elsewhere to function as a synonym for "go".]
  1439.  
  1440. Chapter 2 - Regions
  1441.  
  1442. Outdoors is a region.
  1443.         End of Road, Hill in Road, Valley, Streambed, Stream's End, Forest 1,
  1444.          and Forest 2 are in Outdoors.
  1445.         End of Road, Hill in Road, Forest 1, Forest 2, Valley, Streambed,
  1446.          Stream's End, Building, Entryway, and Cobble Crawl are lighted.
  1447.  
  1448. Preliminary Cave is a region.
  1449.         Cobble Crawl, Bird Chamber, Awkward Canyon, Debris Room,
  1450.          Top of Small, and Entryway are in Preliminary Cave.
  1451.  
  1452. Deep Cave is a region.
  1453.  
  1454.         Misty Area is a region in Deep Cave.
  1455.                 Hall of Mists, East Bank of Fissure, Gold Room, West Fissure,
  1456.                  West End of Mists, Low Wide 1, Low Wide 2, East of Long,
  1457.                  and West of Long are in Misty Area.
  1458.  
  1459.         Mountain King's Domain is a region in Deep Cave.
  1460.                 Hall of Mt King, Low N/S, Y2, West Chamber, South Chamber,
  1461.                  Crossover, Jumble of Rock, Window on Pit, and Deadend 7
  1462.                  are in King's Domain.
  1463.  
  1464.                 Rough Tunnels is a region in Mountain King's Domain.
  1465.                         Dirty Passage, Pit Ledge, Dusty Room, and Bottom of Pit
  1466.                          are in Rough Tunnels.
  1467.  
  1468.         Mazy is a region in Deep Cave.
  1469.                 Maze 1, Maze 2, Maze 3, Maze 4, Maze 5, Maze 6, Maze 7, Maze 8,
  1470.                  Maze 9, Maze A, Deadend 1, Deadend 2, Deadend 3, Deadend 4,
  1471.                  Deadend 5, Deadend 6, and Brink of Pit are in Mazy.
  1472.  
  1473.         Construction is a region in Deep Cave.
  1474.                 Complex Junction, Bedquilt, Swiss Cheese, Twopit Room, Large Low,
  1475.                  Dead End Crawl, and Slab Room are in Construction.
  1476.  
  1477.         Secrets is a region in Deep Cave.
  1478.                 Secret NS Canyon, E/W Canyon, Junction Canyon, Secret N/S Canyon,
  1479.                  Wide Place, Too Tight, Tall Canyon, and Boulders are in Secrets.
  1480.  
  1481. BOOK THREE - FRUSTRATIONS
  1482.  
  1483. Part I - Defining the Obstacles
  1484.  
  1485. The dwarf clock is a number that varies.
  1486.  
  1487. The little axe is a thing. "There [are] a little axe [here]."
  1488.                        
  1489. A dwarf is a kind of person. There are 3 dwarves.
  1490.         The printed name of a dwarf is always "dwarf".
  1491.         A dwarf has a room called old location.
  1492.         A dwarf has a number called patrol position.
  1493.         A dwarf can be curious. [Following the player.]
  1494.         A dwarf can be angry. [Attacking this turn.]
  1495.         A dwarf can be victorious. [Successfully hit the player with a knife.]
  1496.         A dwarf can be killed.
  1497.         The dwarf patrol route is a list of rooms that varies.
  1498.                 The dwarf patrol route is {Dirty Passage, Low N/S Passage, Hall of Mt King, West Side Chamber, Crossover, East End of Long Hall, West End of Mists, West of Fissure, East of Fissure, Hall of Mists, Hall of Mt King, Low N/S Passage, Dirty Passage, End of Road, End of Road, End of Road, End of Road, End of Road, End of Road, End of Road, End of Road, End of Road, End of Road, End of Road, End of Road, End of Road, End of Road, End of Road}.
  1499.                 [Surprisingly enough, the dwarves walk along a preset pattern,
  1500.                 rather than appearing randomly as they do in later versions.]
  1501.  
  1502.  
  1503. [       Dwarves patrol the sequence staggered with only 1 room between them.    ]
  1504. When play begins:
  1505.         let N be 2;
  1506.         repeat with D running through dwarves:
  1507.                 now the patrol position of D is 2 plus N;
  1508.                 increase N by 2.
  1509.        
  1510. Part II - Behavior
  1511.  
  1512. Chapter 1 - Of dwarves
  1513.  
  1514. To decide if the dwarves are awake:
  1515.         if the player has been in the Hall of Mists, decide yes;
  1516.         decide no.
  1517.  
  1518. To throw is a verb. To curse is a verb.
  1519.  
  1520. [       Looking serves as Crowther's "Every turn" rule: all game logic is
  1521.         contained within one big loop after printing the room description.
  1522.         Any turn that doesn't produce a room description is effectively either
  1523.         a parser error or an action out of world.                                                       ]
  1524. Before looking:
  1525.         if the dwarves are menacing and the axe is off-stage:
  1526.                 if a random chance of 1 in 20 succeeds:
  1527.                         move the little axe to the location;
  1528.                         say "A little dwarf [optional have]just walked around a corner, [participlate the verb see] [us], [participlate the verb throw] a little axe at [us] which [optional have][participlate the verb miss], [participlate the verb curse], and [participlate the verb run] away.";
  1529.                         now dwarf clock is 2;
  1530.                 continue the action;
  1531.         otherwise if the axe is on-stage:
  1532.                 update dwarf status.
  1533.                
  1534. To say optional have:
  1535.         if the story tense is:
  1536.                 -- present tense:
  1537.                         stop;
  1538.                 -- perfect tense:
  1539.                         say "[if the prior named object is plural-named]have[otherwise]has[end if] ";
  1540.                 -- past perfect tense:
  1541.                         say "had ";
  1542.                 -- otherwise:
  1543.                         say "[have] ";
  1544.                
  1545. To say participlate (V - a verb) :
  1546.         if the story tense is:
  1547.                 -- present tense:
  1548.                         say "[adapt V in past tense]";
  1549.                 -- otherwise:
  1550.                         say "[past participle of V]";
  1551.                
  1552. To decide if the dwarves are menacing:
  1553.         if the dwarves are awake and (the player is in Deep Cave
  1554.          or the new location is regionally in Deep Cave), decide yes;
  1555.          otherwise decide no.
  1556. To decide if the dwarves do not menace:
  1557.         if the dwarves are menacing, decide no;
  1558.         otherwise decide yes.
  1559.  
  1560. The new location is a room that varies.
  1561.  
  1562. Setting action variables for going:
  1563.         if the noun is a direction:
  1564.                 now the new location is the room noun from the location;
  1565.         otherwise if the noun is a door:
  1566.                 now the new location is the other side of the noun.
  1567.                
  1568. Every turn: now the new location is the location.
  1569.  
  1570. [       This complex block of AI code is basically lifted wholesale from
  1571.         Crowther's FORTRAN implementation.                                              ]
  1572. To miss is a verb. To hit is a verb.
  1573. To update dwarf status:
  1574.         increment dwarf clock;
  1575.         repeat with D running through not killed dwarves:
  1576.                 now D is not angry;
  1577.                 if (patrol position of D + dwarf clock) is less than 9, next;
  1578.                 [Dwarves don't appear right away after being awakened.]
  1579.                 if (patrol position of D + dwarf clock) is greater than 23
  1580.                  and D is not curious, next;
  1581.                 [Disable incurious dwarves after a while.]
  1582.                 now the old location of D is the location of D;
  1583.                 if D is not curious or the dwarves do not menace:
  1584.                 [Each dwarf follows the patrol route when not following the player,
  1585.                  or after the player has left the main cave area.]
  1586.                         move D to entry (patrol position of D + dwarf clock - 8)
  1587.                          of dwarf patrol route;
  1588.                         if D is in End of Road, now D is nowhere;
  1589.                         [End of Road is a sentinel value indicating the end of the patrol.]
  1590.                         now D is not curious;
  1591.                         if D is not in the location and the old location of D is not the location:
  1592.                                 next;
  1593.                                 [This dwarf hasn't found the player, so try the next dwarf.]
  1594.                 now D is curious;
  1595.                 [This dwarf has found the player; time to start following!]
  1596.                 move D to the location;
  1597.                 if the old location of D is the location of D:
  1598.                 [The dwarf hasn't moved this turn, and so decides to attack.]
  1599.                         now D is angry;
  1600.                         if a random chance of 1 in 10 succeeds, now D is victorious;
  1601.         if there is a curious dwarf:
  1602.                 say "There [if there is exactly one curious dwarf][are] a threatening little dwarf[otherwise][regarding curious dwarves][are] [number of curious dwarves] threatening little dwarves[end if] in the room with [us]!";
  1603.                 if there is an angry dwarf:
  1604.                         if there is exactly one angry dwarf,
  1605.                                 say "One sharp nasty knife [are] thrown at [us]!";
  1606.                         otherwise say "[number of angry dwarves] of them throw knives at [us]!";
  1607.                         if there is a victorious dwarf:
  1608.                                 if there is exactly one angry dwarf, say "He [get] [us]!";
  1609.                                 otherwise say "[number of victorious dwarves] of them [get] [us].";
  1610.                                 end the story saying "Games over";
  1611.                         otherwise:
  1612.                                 if there is exactly one angry dwarf, say "It [miss]!";
  1613.                                 otherwise say "None of them [hit] [us]!";
  1614.         continue the action.
  1615.  
  1616.  
  1617. [       The preceding rule has already printed the dwarves' presence and action lines,
  1618.         so the paragraph writing activity shouldn't mention them.                                       ]
  1619. Rule for writing a paragraph about a dwarf:
  1620.         repeat with D running through dwarves in the location:
  1621.                 set the locale priority of D to 0.
  1622.        
  1623. To block is a verb.
  1624. Before going:
  1625.         let intended destination be a room;
  1626.         if the noun is a direction,
  1627.                 let intended destination be the room noun from the location;
  1628.         if the noun is a door,
  1629.                 let intended destination be the other side of the noun;
  1630.         repeat with D running through curious dwarves:
  1631.                 if the intended destination is the old location of D:
  1632.                         we will look later;
  1633.                         say "A little dwarf with a big knife [block] [our] way." instead.
  1634.                
  1635. Chapter 2 - Towards dwarves
  1636.  
  1637. Does the player mean taking a dwarf: it is very unlikely.
  1638. Does the player mean attacking a dwarf: it is very likely.
  1639.  
  1640. The block attacking rule is not listed in any rulebook.
  1641.  
  1642. Check attacking when the noun is not a curious dwarf:
  1643.         say "There [are] nothing here to attack." instead.
  1644.  
  1645. [       Typing "> ATTACK" alone should work in the presence of dwarves. ]
  1646. Rule for supplying a missing noun when attacking:
  1647.         if a dwarf is curious, now the noun is a random curious dwarf;
  1648.         if a dwarf is in the location and the noun is nothing,
  1649.                 now the noun is a random dwarf in the location.
  1650.  
  1651. To dodge is a verb.
  1652. Instead of attacking a dwarf (called the target):
  1653.         if a random chance of 6 in 10 succeeds:
  1654.                 say "[We] killed a little dwarf.";
  1655.                 now the target is killed;
  1656.                 now the target is not curious;
  1657.                 now the target is not angry;
  1658.                 now the target is nowhere;
  1659.         otherwise:
  1660.                 say "[We] [attack] a little [random dwarf], but he [dodge] out of the way.";
  1661.         we will look later.
  1662.        
  1663. BOOK FOUR - AUGMENTATIONS
  1664.  
  1665. Part I - Text
  1666.  
  1667. Chapter 1 - The introduction
  1668.  
  1669. print the intro is a truth state that varies.
  1670. When play begins, we must print the intro.
  1671.  
  1672. After printing the banner text when we must print the intro:
  1673.         we no longer must print the intro;
  1674.         say "[line break]Welcome to Adventure!! Would you like instructions?[paragraph break]  ";
  1675.         if the player consents:
  1676.                 say line break;
  1677.                 say "Somewhere nearby is Colossal Cave, where others have found fortunes in treasure and gold, though it is rumored that some who enter are never seen again. Magic is said to work in the cave. I will be your eyes and hands. Direct me with commands of 1 or 2 words.";
  1678.                 say "(Errors, suggestions, complaints to Crowther)[line break](If stuck type HELP for some hints)";
  1679.                 say paragraph break;
  1680.         otherwise:
  1681.                 say line break;
  1682.         say "(Type ABOUT for details about this specific Inform 7 implementation.)";
  1683.  
  1684. Chapter 2 - Help
  1685.  
  1686. Understand "help" or "what" as requesting help.
  1687. Requesting help is an action out of world applying to nothing.
  1688. Carry out requesting help:
  1689.         say "I know of places, actions, and things. Most of my vocabulary describes places and is used to move [us] there. To move try words like forest, building, downstream, enter, east, west, north, south, up, or down. I know about a few special objects, like a black rod hidden in the cave. These objects can be manipulated using one of the action words that I know. Usually you will need to give both the object and action words (in either order), but sometimes I can infer the object from the verb alone. The objects have side effects - for instance, the rod scares the bird.
  1690.         [paragraph break]Usually people having trouble moving just need to try a few more words. Usually people trying to manipulate an object are attempting something beyond their (or my!) capabilities and should try a completely different tack.
  1691.         [paragraph break]To speed the game [we] can sometimes move long distances with a single word. For instance, [']building['] usually gets you to the building from anywhere above ground except when lost in the forest. Also, note that cave passages turn a lot, and that leaving a room to the north does not guarantee entering the next from the south. Good luck!"
  1692.  
  1693. [       This arcane block is to parse ">?" as ">HELP".  ]
  1694. After reading a command:
  1695.         let T be text;
  1696.         let T be the player's command;
  1697.         replace the regular expression "^\s*\?" in T with "help";
  1698.         change the text of the player's command to T.
  1699.                
  1700. Chapter 3 - About
  1701.  
  1702. Understand "about" as requesting the about info.
  1703. Requesting the about info is an action out of world.
  1704. Carry out requesting the about info:
  1705.                 say "This is release [no line break][release number].[no line break][release subnumber] of the Inform 7 version of Will Crowther's Adventure, ported by Chris Conley.
  1706.                 [paragraph break]I started this project for two reasons: first, to learn Inform 7; second, to create a source text that could serve as a useful reference for future learners. It's grown much larger than I'd originally planned, but I've gotten it now to a shape I'm happy with.
  1707.                 [paragraph break]My main design goal was to reproduce the output text and functional world model of Crowther's original program as closely as feasible, while still keeping most of the helpful features of a modern IF engine. So, features that don't detract from the core gameplay of the original, such as commands like UNDO and INVENTORY and a parser capable of understanding commands more complex than >VERB NOUN, remain implemented by default in this Inform version.
  1708.                 [paragraph break]Credit is owed to Will Crowther and Don Woods, for obvious reasons; to Graham Nelson and Emily Short, for making this possible; to Dennis G. Jerz, for the original inspiration; to Ron Newcomb, for his comment style and more readable truth state naming conventions; to my testers, Cheryl Lewis, Paul Laroquod, Finn Rosenloev, Laura Still, Kelly Belz, Chelsea Donahue, and Tony Portillo; and to Owen Williams and Oskat Forest Park, for facilitating much of the initial work on this project.
  1709.                 [paragraph break]For fun, try >CHANGE THE STYLE."
  1710.                
  1711. Chapter 4 - Changing style
  1712.  
  1713. Changing the style is an action out of world.
  1714. Understand "change the/-- style/story" as changing the style.
  1715. Carry out changing the style:
  1716.         now the story tense is a random grammatical tense;
  1717.         now the story viewpoint is a random narrative viewpoint;
  1718. Report changing the style: Say "OK, I will now speak in [story viewpoint], [story tense]."
  1719.  
  1720. Chapter 5 - Adapting for edge cases in English
  1721.  
  1722. To say regarding it: now the prior named object is nothing.
  1723.  
  1724. Some plural-placeholder are a privately-named thing.
  1725. To say regarding them: now the prior named object is the plural-placeholder.
  1726.  
  1727. [       'Have' has two main functions in English:
  1728.          as a normal verb, indicating possession; and as a helping verb.
  1729.          The former can be doubled up for the perfect tenses
  1730.          ("He has had the coin", "I had had some string"); the latter can not.          ]
  1731. To say singular have:
  1732.         if the story tense is:
  1733.                 -- past perfect tense: 
  1734.                         say "had";
  1735.                 -- perfect tense:
  1736.                         say "[adapt the verb have in present tense]";
  1737.                 -- otherwise:
  1738.                         say "[have]";
  1739.  
  1740. Part II - New Ways of Going
  1741.  
  1742. Chapter 1 - Going in darkness
  1743.  
  1744. Before going, going by keyword, retreating when in darkness
  1745.  and a random chance of 1 in 4 succeeds:
  1746.         end the story saying "[We] fell into a pit and broke every bone in [our] body!" instead.
  1747.         [Actually dying in darkness is surprisingly not guaranteed. And yes,
  1748.          even traveling via magic words or back into lighted rooms can kill the player.]
  1749.  
  1750. Chapter 2 - Going by keyword
  1751.  
  1752. Going by keyword is an action applying to one value.
  1753.         Understand "[goto] [keyword]" or "[keyword]" or "enter [keyword]"
  1754.          or "go [keyword]" as going by keyword.
  1755.  
  1756. The cave-keyword is a keyword. Understand "cave" as cave-keyword.
  1757.  
  1758. Check going by keyword:
  1759.         if the keyword understood is the cave-keyword:
  1760.                 if the location is Building or the location is in Outdoors
  1761.                  and the location is not Stream's End:
  1762.                         instead say "I don't know where the cave is, but hereabouts no stream can run on the surface for long. I would try the stream.";
  1763.                 otherwise:
  1764.                         instead say "I need more detailed instructions to do that.";
  1765.         otherwise:
  1766.                 choose the row with the name of the keyword understood
  1767.                  from the Table of Keywords;
  1768.                 unless a room relates to the location by the relevant relation entry:
  1769.                         if the keyword understood is xyzzy:
  1770.                                 we will look later;
  1771.                                 say nothinghap instead;
  1772.                                 [Xyzzy gets its own special error message.]
  1773.                         otherwise:
  1774.                                 say "[dunno][line break]" instead;
  1775.                 otherwise:
  1776.                         now the new location is
  1777.                          (the room which relates to the location by the relevant relation entry);
  1778.                         continue the action.
  1779.  
  1780. Carry out going by keyword:
  1781.         if the keyword understood is depression
  1782.          and the location is in preliminary cave and the grate is closed:
  1783.                 move the player to Entryway,
  1784.                  without printing a room description;
  1785.         otherwise:
  1786.                 move the player to the new location,
  1787.                  without printing a room description.
  1788.  
  1789. Chapter 3 - Going back
  1790.  
  1791. Retreating is an action applying to nothing.
  1792.         Understand the commands "back", "return",
  1793.          and "retreat" as something new.
  1794.         Understand "retreat" as retreating.
  1795.         Understand "go back" as retreating.
  1796.         Understand the commands "back", "return" as "retreat".
  1797.  
  1798. The prior location is a room that varies.
  1799.         Setting action variables for going:
  1800.                 now the prior location is the location.
  1801.         Setting action variables for going by keyword:
  1802.                 now the prior location is the location.
  1803.         Setting action variables for retreating:
  1804.                 now the new location is the prior location.
  1805.  
  1806. Check retreating:
  1807.         if the room back from the location is a room, try going back instead;
  1808.         [So that rooms with a "back" direction defined use it properly.]
  1809.         if the number of visited rooms is 1,
  1810.                 say "[We] [haven't] gone anywhere yet!" instead.
  1811.                 [Not authentic; going "back" on the first turn was bugged,
  1812.                  with infinite thrashing-about-in-darkness results.]
  1813.  
  1814. Carry out retreating:
  1815.         let the temp location be the location;
  1816.         [To properly account for ">GO BACK. GO BACK".]
  1817.         move the player to the prior location,
  1818.          without printing a room description;
  1819.         now the prior location is the temp location.
  1820.  
  1821. Part III - Adding New Verbs
  1822.        
  1823. Singing is an action applying to nothing.
  1824.         Understand "sing" as singing. Report singing: say "[nothinghap]".
  1825.  
  1826. Striking is an action applying to one thing.
  1827.         Understand "strike [something]" as striking.
  1828.         Carry out striking: say nothinghap instead.
  1829.        
  1830. Understand the command "pour" as something new.
  1831.         Understand "pour [something preferably held]" as pouring.
  1832.         Pouring is an action applying to one thing.
  1833.         To pour is a verb.
  1834.         Carry out pouring: say "[We] [can't pour] that." instead.
  1835.  
  1836. Understand the command "throw" as something new.
  1837.         Understand "throw [text]" and "throw" as a mistake
  1838.          ("I have trouble with the word [']throw['] because [we] can throw a thing or throw at a thing. Please use drop or attack instead.").
  1839.  
  1840. Understand "dig [text]" and "dig" and "excavate [text]" and "excavate" as a mistake
  1841.  ("Digging without a shovel is quite impractical: even with a shovel progress is unlikely.").
  1842. [The synonym in the original was spelled "EXCIV", but I assume that was a typo;
  1843.  Woods corrected this.]
  1844.  
  1845. Understand "blast [text]" and "blast" as a mistake
  1846.  ("Blasting requires dynamite.")
  1847.  
  1848. Understand "lost [text]" and "lost" as a mistake
  1849.  ("I'm as confused as you are.")
  1850.  
  1851. Understand "enter stream/streambed/water" as a mistake
  1852.  ("[Our] feet are now wet.")
  1853.  
  1854. Understand "opensesame" and "open sesame" as a mistake
  1855.  ("Good try, but that is an old worn-out magic word.")
  1856.  
  1857. To say unsure facing:
  1858.         say "I am unsure how [we] [are] facing. Use compass points or nearby objects."
  1859.        
  1860.         Understand "turn" as a mistake ("[unsure facing]").
  1861.         Understand "right" and "[goto] right" and "go right" as a mistake
  1862.          ("[unsure facing]") when the location is not Mt King.
  1863.        
  1864.         Understand "left" and "[goto] left" and "go left" as a mistake
  1865.          ("[unsure facing]") when the location is not Hall of Mists
  1866.           and the location is not Mt King.
  1867.        
  1868.         Check going forward
  1869.          when the room forward from the location is nowhere:
  1870.                 say unsure facing instead.
  1871.        
  1872. [       The original allowed typing any verb+direction pair, such as
  1873.         ">CRAWL W" or even ">E ATTACK", to move. "Go" was effectively
  1874.         a dummy verb.                                                                                                   ]
  1875. After reading a command when the player's command includes " [direction] "
  1876.  and the player's command does not include " all":
  1877.         let M be indexed text;
  1878.         let M be the matched text;
  1879.         if M is "down" and the player's command includes "put",
  1880.                 continue the action;
  1881.                 [">PUT DOWN" a thing should not be parsed as movement.]
  1882.         if M is "up" and the player's command includes "cover/pick",
  1883.                 continue the action;
  1884.                 [Nor should ">COVER UP" and ">PICK UP" something.]
  1885.         change the text of the player's command to M.
  1886.        
  1887. [       "Crawl" gets its own special disambiguation message, possibly
  1888.         because in some areas it can refer to specific rooms or directions,
  1889.         and otherwise it is a sensible synonym for "go".                                        ]      
  1890. After reading a command
  1891.  when the player's command matches the regular expression "crawl"
  1892.  and the location is uncrawlable:
  1893.         we will look later;
  1894.         say "Which way?" instead.
  1895.                        
  1896. To decide if the location is uncrawlable:
  1897.         if the crawlability marker is in the location, decide no;
  1898.         otherwise decide yes.
  1899.        
  1900. Part IV - The Parser
  1901.  
  1902. The knife is a thing. Understand "knives/boulder/weapon" as the knife.
  1903. [The player could refer to this thing, but not manipulate it.]
  1904.  
  1905. [       This next section deserves further explanation. The original executable
  1906.         printed two different error messages when a mentioned object was
  1907.         not found in the location; the usual "I don't understand that!", similar
  1908.         to inform, when the vocabulary was not known to the parser; and this
  1909.         message, when the object indeed existed, just not in the current
  1910.         location. Duplicating the same functionality here in Inform 7
  1911.         unfortunately requires some hacking at the I6 level.                                    ]
  1912. After deciding the scope of the player:
  1913.         repeat with R running through portable things:
  1914.                 place R in scope.
  1915.        
  1916. After reading a command
  1917.  when the player's command includes "[something distant]"
  1918.  and the player's command does not include " all/it/him/her/them/abstract/gonear":
  1919.         say "I see no [matched text] here." instead;
  1920.                
  1921. Definition: a thing is distant:
  1922.         if it is a dwarf and there is a curious dwarf, no;
  1923.         if it is held, no;
  1924.         if it is in the location, no;
  1925.         yes.
  1926.                
  1927. Does the player mean doing something with a distant thing:
  1928.         it is unlikely.
  1929.  
  1930. Before asking which do you mean when everything matched is distant:
  1931.         let L be the list of matched things;
  1932.         sort L in random order;
  1933.         now the noun is entry 1 in L instead.
  1934.         [To prevent "Which did you mean, the dwarf or the dwarf or the dwarf?",
  1935.          etc., when all such duplicates are out of sight.]
  1936.                
  1937. Definition: a thing is matched if it fits the parse list.
  1938.        
  1939. To decide whether (N - a thing) fits the parse list:
  1940.         (- (FindInParseList({N})) -)
  1941.  
  1942. Include (-
  1943. [ FindInParseList obj i k marker;
  1944.         marker = 0;
  1945.         for (i=1 : i<=number_of_classes : i++) {
  1946.         while (((match_classes-->marker) ~= i) && ((match_classes-->marker) ~= -i)) marker++;
  1947.         k = match_list-->marker;
  1948.         if (k==obj) rtrue;
  1949.         }
  1950.         rfalse;
  1951. ];
  1952. -)
  1953.  
  1954. [       Typing the name of a scenery thing leads to its description being printed;
  1955.          of a door, to travelling through it; every other thing must follow a verb.             ]
  1956. After reading a command when the player's command matches "[something obvious]":
  1957.         say "What do you want to do with the [player's command]?" instead.
  1958.        
  1959. Definition:
  1960.         a thing is obvious if it is not scenery
  1961.          and it is not distant
  1962.          and it is not a door.
  1963.  
  1964. [       The original featured no "me/myself" object.    ]
  1965. After reading a command when the player's command includes "[yourself]"
  1966.  and the player's command does not include " all":
  1967.         replace the matched text with "gibberish".
  1968.                
  1969. The floor is a backdrop. The floor is everywhere.
  1970.         Understand "room/rock" as the floor.
  1971.         Instead of doing something with the floor, say "[dunno][line break]".
  1972.        
  1973.         Before taking the floor:
  1974.                 we will look later;
  1975.                 say "I can only tell you what you see as you move about and manipulate things. I cannot tell you where remote things are." instead.
  1976.  
  1977. Part V - Test Cases
  1978.  
  1979. Test cave with "e / get all / west / south / south / south / open / down".
  1980.  
  1981. Test puzzle with "e / get lamp / xyzzy / light / e / get cage / w / get rod / w / w / drop rod / get bird, rod / w / d / d".
  1982.  
  1983. Test canyon with "e / get lamp / plugh / light / e / up / d / secret / w / d / s".
  1984.  
  1985. Test battle with "e / get lamp / xyzzy / light / w / w / w / d / abstract axe to mists".
  1986.  
  1987. Part VI - Writing with Inform
  1988.  
  1989. Chapter 1 - Truth States as 'We' Commands (adapted from "The Parser" by Ron Newcomb)
  1990.  
  1991. [ It's always difficult to name truth states because nothing reads naturally other than a letter: if x is true.  These phrases allow us to name a truth state after an imperative sentence, and the optional adverbs allow us to imply how the variable is being used. ]
  1992. To decide if we still/should/need/must/have/-- (bool - a truth state): (- ({bool}) -).
  1993. To decide if we can't/shouldn't/haven't (bool - a truth state): (- (~~({bool})) -).
  1994. To decide if we do/can/have not (bool - a truth state): (- (~~({bool})) -).
  1995. To we will/should/just/now/still/may/must/have (bool - a truth state) again/--: (- {bool} = true; -);
  1996. To we no/do longer/not have/must/-- (bool - a truth state): (- {bool} = false; -).
  1997. To we needn't/shouldn't/won't/haven't (bool - a truth state): (- {bool} = false; -).
  1998. To we will/should/may/must/have (bool - a truth state) if (c - a condition): (- {bool} = ({c}); -);
  1999. To we will/should/may/must/have (bool - a truth state) unless (c - a condition): (- {bool} = (~~({c})); -);
RAW Paste Data
Top