Inform - Resources - Examples

Back to List

Inventory
Complete

Plain
Coloured
Gaudy

Browsing Advent.inf

This is the complete source code of the example game Advent.inf.

0001  !% -S~D
0002   
0003  ! ------------------------------------------------------------------------------
0004  !  Advent 060321        A classic and one of the standard Inform 6 example games
0005  !
0006  !
0007  !                                  Adapted to Inform 5: 17.05.1994 to 24.05.1994
0008  !                 Modernised to Inform 5.5 and library 5/12 or later: 20.12.1995
0009  !                    Modernised to Inform 6 and library 6/1 or later: 11.11.1996
0010  !                    A few bugs removed and companion text rewritten: 09.12.1996
0011  !                                Some very minor bugs indeed removed: 24.02.1997
0012  !                                                    And another two: 04.09.1997
0013  !                 [RF] Source reformatted and very minor bug removed: 02.09.2004
0014  !                     [RF] Added teleportation, also minor bug fixes: 21.03.2006
0015  ! ------------------------------------------------------------------------------
0016   
0017  ! Constant TEST_VERSION;
0018   
0019  Constant Story "ADVENTURE";
0020  Constant Headline
0021      "^The Interactive Original^
0022        By Will Crowther (1976) and Don Woods (1977)^
0023        Reconstructed in three steps by:^
0024        Donald Ekman, David M. Baggett (1993) and Graham Nelson (1994)^
0025        [In memoriam Stephen Bishop (1820?-1857): GN]^^";
0026  Serial "060321";
0027  Release 9;
0028   
0029  ! Adventure's IFID -- see http://babel.ifarchive.org/
0030  Array UUID_ARRAY string "UUID://E9FD3D87-DD2F-4005-B332-23557780B64E//"; #Ifdef UUID_ARRAY; #Endif;
0031   
0032  Constant AMUSING_PROVIDED;
0033  Constant MAX_CARRIED   = 7;
0034  Constant MAX_SCORE     = 350;
0035  Constant MAX_TREASURES = 15;
0036   
0037  Include "Parser";
0038  Include "VerbLib";
0039   
0040  Attribute nodwarf;                      ! Room is no-go area for dwarves
0041  Attribute treasure_found;               ! Treasure object has been found
0042  Attribute multitude;                    ! Used only by COUNT
0043   
0044  Global caves_closed;                    ! true when cave is closing
0045  Global canyon_from;                     ! Which canyon to return to
0046  Global treasures_found;                 ! Count of treasures found
0047  Global deaths;                          ! Counts of deaths/resurrections
0048  Global dark_warning;                    ! true after warning about dark pits
0049  Global feefie_count;                    ! fee/fie/foe/foo sequencer
0050   
0051  ! ------------------------------------------------------------------------------
0052  !   Rules for treasures, which will be scattered all over the game
0053  ! ------------------------------------------------------------------------------
0054   
0055  Class   Treasure
0056    with  after [;
0057            Take:
0058              if (location == Inside_Building)
0059                  score = score - self.depositpoints;
0060              score = score + 5;
0061              if (noun hasnt treasure_found) {
0062                  give noun treasure_found;
0063                  treasures_found++;
0064                  score = score + 2;
0065              }
0066              "Taken!";
0067            Insert:
0068              score = score - 5;  ! (in case put inside the wicker cage)
0069            Drop:
0070              score = score - 5;
0071              if (location == Inside_Building) {
0072                  score = score + self.depositpoints;
0073                  "Safely deposited.";
0074              }
0075          ],
0076          depositpoints 10;
0077   
0078  ! ------------------------------------------------------------------------------
0079  !   The outside world
0080  ! ------------------------------------------------------------------------------
0081   
0082  Class   Room;
0083   
0084  Class   Aboveground
0085    class Room
0086    has   light nodwarf;
0087   
0088  Class   Scenic
0089    has   scenery;
0090   
0091  Aboveground At_End_Of_Road "At End Of Road"
0092    with  name 'end' 'of' 'road' 'street' 'path' 'gully',
0093          description
0094              "You are standing at the end of a road before a small brick building.
0095               Around you is a forest.
0096               A small stream flows out of the building and down a gully.",
0097          w_to At_Hill_In_Road,
0098          u_to At_Hill_In_Road,
0099          e_to Inside_Building,
0100          d_to In_A_Valley,
0101          s_to In_A_Valley,
0102          n_to In_Forest_1,
0103          in_to Inside_Building;
0104   
0105  Scenic  "well house"
0106    with  name 'well' 'house' 'brick' 'building' 'small' 'wellhouse',
0107          description "It's a small brick building. It seems to be a well house.",
0108          found_in At_End_Of_Road At_Hill_In_Road Inside_Building,
0109          before [;
0110            Enter:
0111              if (location == At_Hill_In_Road && Inside_Building hasnt visited)
0112                  "It's too far away.";
0113              <<Teleport Inside_Building>>;
0114          ];
0115   
0116  Scenic  Stream "stream"
0117    with  name 'stream' 'water' 'brook' 'river' 'lake' 'small' 'tumbling'
0118               'splashing' 'babbling' 'rushing' 'reservoir',
0119          found_in At_End_Of_Road In_A_Valley At_Slit_In_Streambed In_Pit
0120                   In_Cavern_With_Waterfall At_Reservoir Inside_Building,
0121          before [;
0122            Drink:
0123              "You have taken a drink from the stream.
0124               The water tastes strongly of minerals, but is not unpleasant.
0125               It is extremely cold.";
0126            Take:
0127              if (bottle notin player)
0128                  "You have nothing in which to carry the water.";
0129              <<Fill bottle>>;
0130            Insert:
0131              if (second == bottle) <<Fill bottle>>;
0132              "You have nothing in which to carry the water.";
0133            Receive:
0134              if (noun == ming_vase) {
0135                  remove ming_vase;
0136                  move shards to location;
0137                  score = score - 5;
0138                  "The sudden change in temperature has delicately shattered the vase.";
0139              }
0140              if (noun == bottle) <<Fill bottle>>;
0141              remove noun;
0142              if (noun ofclass Treasure) score = score - 5;
0143              print_ret (The) noun, " washes away with the stream.";
0144          ];
0145   
0146  Scenic  "road"
0147    with  name 'road' 'street' 'path' 'dirt',
0148          description "The road is dirt, not yellow brick.",
0149          found_in At_End_Of_Road At_Hill_In_Road In_Forest_2;
0150   
0151  Scenic  "forest"
0152    with  name 'forest' 'tree' 'trees' 'oak' 'maple' 'grove' 'pine' 'spruce'
0153               'birch' 'ash' 'saplings' 'bushes' 'leaves' 'berry' 'berries'
0154               'hardwood',
0155          description
0156              "The trees of the forest are large hardwood oak and maple,
0157               with an occasional grove of pine or spruce.
0158               There is quite a bit of undergrowth,
0159               largely birch and ash saplings plus nondescript bushes of various sorts.
0160               This time of year visibility is quite restricted by all the leaves,
0161               but travel is quite easy if you detour around the spruce and berry bushes.",
0162          found_in At_End_Of_Road At_Hill_In_Road In_A_Valley In_Forest_1 In_Forest_2,
0163    has   multitude;
0164   
0165  ! ------------------------------------------------------------------------------
0166   
0167  Aboveground At_Hill_In_Road "At Hill In Road"
0168    with  name 'hill' 'in' 'road',
0169          description
0170              "You have walked up a hill, still in the forest.
0171               The road slopes back down the other side of the hill.
0172               There is a building in the distance.",
0173          e_to At_End_Of_Road,
0174          n_to At_End_Of_Road,
0175          d_to At_End_Of_Road,
0176          s_to In_Forest_1;
0177   
0178  Scenic  -> "hill"
0179    with  name 'hill' 'bump' 'incline',
0180          description "It's just a typical hill.";
0181   
0182  Scenic  -> "other side of hill"
0183    with  name 'side' 'other' 'of',
0184          article "the",
0185          description "Why not explore it yourself?";
0186   
0187  ! ------------------------------------------------------------------------------
0188   
0189  Aboveground Inside_Building "Inside Building"
0190    with  name 'inside' 'building' 'well' 'house' 'wellhouse',
0191          description
0192              "You are inside a building, a well house for a large spring.",
0193          cant_go
0194              "The stream flows out through a pair of 1 foot diameter sewer pipes.
0195               The only exit is to the west.",
0196          before [;
0197            Enter:
0198              if (noun == Spring or SewerPipes)
0199                  "The stream flows out through a pair of 1 foot diameter sewer pipes.
0200                   It would be advisable to use the exit.";
0201            Xyzzy:
0202              if (In_Debris_Room hasnt visited) rfalse;
0203              PlayerTo(In_Debris_Room);
0204              rtrue;
0205            Plugh:
0206              if (At_Y2 hasnt visited) rfalse;
0207              PlayerTo(At_Y2);
0208              rtrue;
0209          ],
0210          w_to At_End_Of_Road,
0211          out_to At_End_Of_Road,
0212          in_to "The pipes are too small.";
0213   
0214  Scenic  -> Spring "spring"
0215    with  name 'spring' 'large',
0216          description
0217              "The stream flows out through a pair of 1 foot diameter sewer pipes.";
0218   
0219  Scenic  -> SewerPipes "pair of 1 foot diameter sewer pipes"
0220    with  name 'pipes' 'pipe' 'one' 'foot' 'diameter' 'sewer' 'sewer-pipes',
0221          description "Too small. The only exit is to the west.";
0222   
0223  Object  -> set_of_keys "set of keys"
0224    with  name 'keys' 'key' 'keyring' 'set' 'of' 'bunch',
0225          description "It's just a normal-looking set of keys.",
0226          initial "There are some keys on the ground here.",
0227          before [;
0228            Count:
0229              "A dozen or so keys.";
0230          ];
0231   
0232  Object  -> tasty_food "tasty food"
0233    with  name 'food' 'ration' 'rations' 'tripe' 'yummy' 'tasty' 'delicious' 'scrumptious',
0234          article "some",
0235          description "Sure looks yummy!",
0236          initial "There is tasty food here.",
0237          after [;
0238            Eat:
0239              "Delicious!";
0240          ],
0241    has   edible;
0242   
0243  Object  -> brass_lantern "brass lantern"
0244    with  name 'lamp' 'headlamp' 'headlight' 'lantern' 'light' 'shiny' 'brass',
0245          when_off "There is a shiny brass lamp nearby.",
0246          when_on "Your lamp is here, gleaming brightly.",
0247          daemon [ t;
0248              if (self hasnt on) {
0249                  StopDaemon(self);
0250                  rtrue;
0251              }
0252              t = --(self.power_remaining);
0253              if (t == 0) give self ~on ~light;
0254              if (self in player || self in location) {
0255                  if (t == 0) {
0256                      print "Your lamp has run out of power.";
0257                      if (fresh_batteries notin player && location hasnt light) {
0258                          deadflag = 3;
0259                          " You can't explore the cave without a lamp.
0260                           So let's just call it a day.";
0261                      }
0262                      else
0263                          self.replace_batteries();
0264                      new_line;
0265                      rtrue;
0266                  }
0267                  if (t == 30) {
0268                      print "Your lamp is getting dim.";
0269                      if (fresh_batteries.have_been_used)
0270                          " You're also out of spare batteries.
0271                           You'd best start wrapping this up.";
0272                      if (fresh_batteries in VendingMachine && Dead_End_14 has visited)
0273                          " You'd best start wrapping this up,
0274                           unless you can find some fresh batteries.
0275                           I seem to recall there's a vending machine in the maze.
0276                           Bring some coins with you.";
0277                      if (fresh_batteries notin VendingMachine or player or location)
0278                          " You'd best go back for those batteries.";
0279                      new_line;
0280                      rtrue;
0281                  }
0282              }
0283          ],
0284          before [;
0285            Examine:
0286              print "It is a shiny brass lamp";
0287              if (self hasnt on) ". It is not currently lit.";
0288              if (self.power_remaining < 30) ", glowing dimly.";
0289              ", glowing brightly.";
0290            Burn:
0291              <<SwitchOn self>>;
0292            Rub:
0293              "Rubbing the electric lamp is not particularly rewarding.
0294               Anyway, nothing exciting happens.";
0295            SwitchOn:
0296              if (self.power_remaining <= 0)
0297                  "Unfortunately, the batteries seem to be dead.";
0298            Receive:
0299              if (noun == old_batteries)
0300                  "Those batteries are dead; they won't do any good at all.";
0301              if (noun == fresh_batteries) {
0302                  self.replace_batteries();
0303                  rtrue;
0304              }
0305              "The only thing you might successfully put in the lamp
0306               is a fresh pair of batteries.";
0307          ],
0308          after [;
0309            SwitchOn:
0310              give self light;
0311              StartDaemon(self);
0312            SwitchOff:
0313              give self ~light;
0314          ],
0315          replace_batteries [;
0316              if (fresh_batteries in player or location) {
0317                  remove fresh_batteries;
0318                  fresh_batteries.have_been_used = true;
0319                  move old_batteries to location;
0320                  self.power_remaining = 2500;
0321                  "I'm taking the liberty of replacing the batteries.";
0322              }
0323          ],
0324          power_remaining 330,
0325    has   switchable;
0326   
0327  Object  -> bottle "small bottle"
0328    with  name 'bottle' 'jar' 'flask',
0329          initial "There is an empty bottle here.",
0330          before [;
0331            LetGo:
0332              if (noun in bottle)
0333                  "You're holding that already (in the bottle).";
0334            Receive:
0335              if (noun == stream or Oil)
0336                  <<Fill self>>;
0337              else
0338                  "The bottle is only supposed to hold liquids.";
0339            Fill:
0340              if (child(bottle) ~= nothing)
0341                  "The bottle is full already.";
0342              if (stream in location || Spring in location) {
0343                  move water_in_the_bottle to bottle;
0344                  "The bottle is now full of water.";
0345              }
0346              if (Oil in location) {
0347                  move oil_in_the_bottle to bottle;
0348                  "The bottle is now full of oil.";
0349              }
0350              "There is nothing here with which to fill the bottle.";
0351            Empty:
0352              if (child(bottle) == nothing)
0353                  "The bottle is already empty!";
0354              remove child(bottle);
0355              "Your bottle is now empty and the ground is now wet.";
0356          ],
0357    has   container open;
0358   
0359  Object  water_in_the_bottle "bottled water"
0360    with  name 'bottled' 'water' 'h2o',
0361          article "some",
0362          description "It looks like ordinary water to me.",
0363          before [;
0364            Drink:
0365              remove water_in_the_bottle;
0366              <<Drink Stream>>;
0367          ];
0368   
0369  Object  oil_in_the_bottle "bottled oil"
0370    with  name 'oil' 'bottled' 'lubricant' 'grease',
0371          article "some",
0372          description "It looks like ordinary oil to me.",
0373          before [;
0374            Drink:
0375              <<Drink Oil>>;
0376          ];
0377   
0378  ! ------------------------------------------------------------------------------
0379   
0380  Aboveground In_Forest_1 "In Forest"
0381    with  name 'forest',
0382          description "You are in open forest, with a deep valley to one side.",
0383          e_to In_A_Valley,
0384          d_to In_A_Valley,
0385          n_to In_Forest_1,
0386          w_to In_Forest_1,
0387          s_to In_Forest_1,
0388          initial [;
0389              if (random(2) == 1) PlayerTo(In_Forest_2, 1);
0390          ];
0391   
0392  Aboveground In_Forest_2 "In Forest"
0393    with  description "You are in open forest near both a valley and a road.",
0394          n_to At_End_Of_Road,
0395          e_to In_A_Valley,
0396          w_to In_A_Valley,
0397          d_to In_A_Valley,
0398          s_to In_Forest_1;
0399   
0400  Aboveground In_A_Valley "In A Valley"
0401    with  description
0402              "You are in a valley in the forest beside a stream tumbling along a rocky bed.",
0403          n_to At_End_Of_Road,
0404          e_to In_Forest_1,
0405          w_to In_Forest_1,
0406          u_to In_Forest_1,
0407          s_to At_Slit_In_Streambed,
0408          d_to At_Slit_In_Streambed,
0409          name 'valley';
0410   
0411  Scenic  -> "streambed"
0412    with  name 'bed' 'streambed' 'rock' 'small' 'rocky' 'bare' 'dry';
0413   
0414  ! ------------------------------------------------------------------------------
0415   
0416  Aboveground At_Slit_In_Streambed "At Slit In Streambed"
0417    with  name 'slit' 'in' 'streambed',
0418          description
0419              "At your feet all the water of the stream splashes into a 2-inch slit in the rock.
0420               Downstream the streambed is bare rock.",
0421          n_to In_A_Valley,
0422          e_to In_Forest_1,
0423          w_to In_Forest_1,
0424          s_to Outside_Grate,
0425          d_to "You don't fit through a two-inch slit!",
0426          in_to "You don't fit through a two-inch slit!";
0427   
0428  Scenic  -> "2-inch slit"
0429    with  name 'slit' 'two' 'inch' '2-inch',
0430          description
0431              "It's just a 2-inch slit in the rock, through which the stream is flowing.",
0432          before [;
0433            Enter:
0434              "You don't fit through a two-inch slit!";
0435          ];
0436   
0437  ! ------------------------------------------------------------------------------
0438   
0439  Aboveground Outside_Grate "Outside Grate"
0440    with  name 'outside' 'grate',
0441          description
0442              "You are in a 20-foot depression floored with bare dirt.
0443               Set into the dirt is a strong steel grate mounted in concrete.
0444               A dry streambed leads into the depression.",
0445          e_to In_Forest_1,
0446          w_to In_Forest_1,
0447          s_to In_Forest_1,
0448          n_to At_Slit_In_Streambed,
0449          d_to [;
0450              if (Grate hasnt locked && Grate hasnt open) {
0451                  print "(first opening the grate)^";
0452                  give Grate open;
0453              }
0454              return Grate;
0455          ];
0456   
0457  Scenic  -> "20-foot depression"
0458    with  name 'depression' 'dirt' 'twenty' 'foot' 'bare' '20-foot',
0459          description "You're standing in it.";
0460   
0461  Object  -> Grate "steel grate"
0462    with  name 'grate' 'lock' 'gate' 'grille' 'metal' 'strong' 'steel' 'grating',
0463          description "It just looks like an ordinary grate mounted in concrete.",
0464          with_key set_of_keys,
0465          door_dir [;
0466              if (location == Below_The_Grate) return u_to;
0467              return d_to;
0468          ],
0469          door_to [;
0470              if (location == Below_The_Grate) return Outside_Grate;
0471              return Below_The_Grate;
0472          ],
0473          describe [;
0474              if (self has open) "^The grate stands open.";
0475              if (self hasnt locked) "^The grate is unlocked but shut.";
0476              rtrue;
0477          ],
0478          found_in Below_The_Grate Outside_Grate,
0479    has   static door openable lockable locked;
0480   
0481  ! ------------------------------------------------------------------------------
0482  !   Facilis descensus Averno...
0483  ! ------------------------------------------------------------------------------
0484   
0485  Room    Below_The_Grate "Below the Grate"
0486    with  name 'below' 'grate',
0487          description
0488              "You are in a small chamber beneath a 3x3 steel grate to the surface.
0489               A low crawl over cobbles leads inward to the west.",
0490          w_to In_Cobble_Crawl,
0491          u_to Grate,
0492    has   light;
0493   
0494  Scenic  "cobbles"
0495    with  name 'cobble' 'cobbles' 'cobblestones' 'cobblestone' 'stones' 'stone',
0496          description "They're just ordinary cobbles.",
0497          found_in In_Cobble_Crawl In_Debris_Room Below_The_Grate,
0498    has   multitude;
0499   
0500  ! ------------------------------------------------------------------------------
0501   
0502  Room    In_Cobble_Crawl "In Cobble Crawl"
0503    with  name 'cobble' 'crawl',
0504          description
0505              "You are crawling over cobbles in a low passage.
0506               There is a dim light at the east end of the passage.",
0507          e_to Below_The_Grate,
0508          w_to In_Debris_Room,
0509    has   light;
0510   
0511  Object  -> wicker_cage "wicker cage"
0512    with  name 'cage' 'small' 'wicker',
0513          description "It's a small wicker cage.",
0514          initial "There is a small wicker cage discarded nearby.",
0515          after [;
0516            Open:
0517              if (little_bird notin self) rfalse;
0518              print "(releasing the little bird)^";
0519              <<Release little_bird>>;
0520          ],
0521    has   container open openable transparent;
0522   
0523  ! ------------------------------------------------------------------------------
0524   
0525  Room    In_Debris_Room "In Debris Room"
0526    with  name 'debris' 'room',
0527          description
0528              "You are in a debris room filled with stuff washed in from the surface.
0529               A low wide passage with cobbles becomes plugged with mud and debris here,
0530               but an awkward canyon leads upward and west.
0531               ^^
0532               A note on the wall says, ~Magic word XYZZY.~",
0533          e_to In_Cobble_Crawl,
0534          u_to In_Awkward_Sloping_E_W_Canyon,
0535          w_to In_Awkward_Sloping_E_W_Canyon,
0536          before [;
0537            Xyzzy:
0538              PlayerTo(Inside_Building);
0539              rtrue;
0540          ],
0541    has   nodwarf;
0542   
0543  Scenic  -> "debris"
0544    with  name 'debris' 'stuff' 'mud',
0545          description "Yuck.";
0546   
0547  Scenic  -> "note"
0548    with  name 'note',
0549          description "The note says ~Magic word XYZZY~.";
0550   
0551  Object  -> black_rod "black rod with a rusty star on the end"
0552    with  name 'rod' 'star' 'black' 'rusty' 'star' 'three' 'foot' 'iron',
0553          description "It's a three foot black rod with a rusty star on an end.",
0554          initial
0555              "A three foot black rod with a rusty star on one end lies nearby.",
0556          before [;
0557            Wave:
0558              if (location == West_Side_Of_Fissure or On_East_Bank_Of_Fissure) {
0559                  if (caves_closed) "Peculiar. Nothing happens.";
0560                  if (CrystalBridge notin nothing) {
0561                      remove CrystalBridge;
0562                      give CrystalBridge absent;
0563                      West_Side_Of_Fissure.e_to = nothing;
0564                      On_East_Bank_Of_Fissure.w_to = nothing;
0565                      "The crystal bridge has vanished!";
0566                  }
0567                  else {
0568                      move CrystalBridge to location;
0569                      give CrystalBridge ~absent;
0570                      West_Side_Of_Fissure.e_to = CrystalBridge;
0571                      On_East_Bank_Of_Fissure.w_to = CrystalBridge;
0572                      "A crystal bridge now spans the fissure.";
0573                  }
0574              }
0575              "Nothing happens.";
0576          ];
0577   
0578  ! ------------------------------------------------------------------------------
0579   
0580  Room    In_Awkward_Sloping_E_W_Canyon "Sloping E/W Canyon"
0581    with  name 'sloping' 'e/w' 'canyon',
0582          description "You are in an awkward sloping east/west canyon.",
0583          d_to In_Debris_Room,
0584          e_to In_Debris_Room,
0585          u_to In_Bird_Chamber,
0586          w_to In_Bird_Chamber,
0587    has   nodwarf;
0588   
0589  ! ------------------------------------------------------------------------------
0590  !   The little bird in its natural habitat
0591  ! ------------------------------------------------------------------------------
0592   
0593  Room    In_Bird_Chamber "Orange River Chamber"
0594    with  name 'orange' 'river' 'chamber',
0595          description
0596              "You are in a splendid chamber thirty feet high.
0597               The walls are frozen rivers of orange stone.
0598               An awkward canyon and a good passage exit from east and west sides of the chamber.",
0599          e_to In_Awkward_Sloping_E_W_Canyon,
0600          w_to At_Top_Of_Small_Pit,
0601    has   nodwarf;
0602   
0603  Object  -> little_bird "little bird"
0604    with  name 'cheerful' 'mournful' 'little' 'bird',
0605          initial "A cheerful little bird is sitting here singing.",
0606          before [;
0607            Examine:
0608              if (self in wicker_cage)
0609                  "The little bird looks unhappy in the cage.";
0610              "The cheerful little bird is sitting here singing.";
0611            Insert:
0612              if (second == wicker_cage)
0613                  <<Catch self>>;
0614              else
0615                  "Don't put the poor bird in ", (the) second, "!";
0616            Drop, Remove:
0617              if (self in wicker_cage) {
0618                  print "(The bird is released from the cage.)^^";
0619                  <<Release self>>;
0620              }
0621            Take, Catch:
0622              if (self in wicker_cage)
0623                  "You already have the little bird.
0624                   If you take it out of the cage it will likely fly away from you.";
0625              if (wicker_cage notin player)
0626                  "You can catch the bird, but you cannot carry it.";
0627              if (black_rod in player)
0628                  "The bird was unafraid when you entered,
0629                   but as you approach it becomes disturbed and you cannot catch it.";
0630              move self to wicker_cage;
0631              give wicker_cage ~open;
0632              "You catch the bird in the wicker cage.";
0633            Release:
0634              if (self notin wicker_cage)
0635                  "The bird is not caged now.";
0636              give wicker_cage open;
0637              move self to location;
0638              if (Snake in location) {
0639                  remove Snake;
0640                  "The little bird attacks the green snake,
0641                   and in an astounding flurry drives the snake away.";
0642              }
0643              if (Dragon in location) {
0644                  remove self;
0645                  "The little bird attacks the green dragon,
0646                   and in an astounding flurry gets burnt to a cinder.
0647                   The ashes blow away.";
0648              }
0649              "The little bird flies free.";
0650          ],
0651          life [;
0652            Give:
0653              "It's not hungry. (It's merely pinin' for the fjords).
0654               Besides, I suspect it would prefer bird seed.";
0655            Order, Ask, Answer:
0656              "Cheep! Chirp!";
0657            Attack:
0658              if (self in wicker_cage)
0659                  "Oh, leave the poor unhappy bird alone.";
0660              remove self;
0661              "The little bird is now dead. Its body disappears.";
0662          ],
0663    has   animate;
0664   
0665  ! ------------------------------------------------------------------------------
0666   
0667  Room    At_Top_Of_Small_Pit "At Top of Small Pit"
0668    with  name 'top' 'of' 'small' 'pit',
0669          description
0670              "At your feet is a small pit breathing traces of white mist.
0671               A west passage ends here except for a small crack leading on.
0672               ^^
0673               Rough stone steps lead down the pit.",
0674          e_to In_Bird_Chamber,
0675          w_to "The crack is far too small for you to follow.",
0676          d_to [;
0677              if (large_gold_nugget in player) {
0678                  deadflag = 1;
0679                  "You are at the bottom of the pit with a broken neck.";
0680              }
0681              return In_Hall_Of_Mists;
0682          ],
0683          before [;
0684            Enter:
0685              if (noun == PitCrack)
0686                  "The crack is far too small for you to follow.";
0687          ],
0688    has   nodwarf;
0689   
0690  Scenic  -> "small pit"
0691    with  name 'pit' 'small',
0692          description "The pit is breathing traces of white mist.";
0693   
0694  Scenic  -> PitCrack "crack"
0695    with  name 'crack' 'small',
0696          description "The crack is very small -- far too small for you to follow.";
0697   
0698  Scenic  "mist"
0699    with  name 'mist' 'vapor' 'wisps' 'white',
0700          description
0701              "Mist is a white vapor, usually water, seen from time to time in caverns.
0702               It can be found anywhere but is frequently a sign of a deep pit leading down to water.",
0703          found_in
0704              At_Top_Of_Small_Pit In_Hall_Of_Mists On_East_Bank_Of_Fissure
0705              At_Window_On_Pit_1 At_West_End_Of_Hall_Of_Mists In_Misty_Cavern
0706              In_Mirror_Canyon At_Reservoir At_Window_On_Pit_2 On_Sw_Side_Of_Chasm;
0707   
0708  ! ------------------------------------------------------------------------------
0709  !   The caves open up: The Hall of Mists
0710  ! ------------------------------------------------------------------------------
0711   
0712  Room    In_Hall_Of_Mists "In Hall of Mists"
0713    with  name 'hall' 'of' 'mists',
0714          description
0715              "You are at one end of a vast hall stretching forward out of sight to the west.
0716               There are openings to either side.
0717               Nearby, a wide stone staircase leads downward.
0718               The hall is filled with wisps of white mist swaying to and fro almost as if alive.
0719               A cold wind blows up the staircase.
0720               There is a passage at the top of a dome behind you.
0721               ^^
0722               Rough stone steps lead up the dome.",
0723          initial [;
0724              if (self has visited) rfalse;
0725              score = score + 25;
0726          ],
0727          s_to In_Nugget_Of_Gold_Room,
0728          w_to On_East_Bank_Of_Fissure,
0729          d_to In_Hall_Of_Mt_King,
0730          n_to In_Hall_Of_Mt_King,
0731          u_to [;
0732              if (large_gold_nugget in player) "The dome is unclimbable.";
0733              return At_Top_Of_Small_Pit;
0734          ];
0735   
0736  Scenic  -> "wide stone staircase"
0737    with  name 'stair' 'stairs' 'staircase' 'wide' 'stone',
0738          description "The staircase leads down.";
0739   
0740  Scenic  -> "rough stone steps"
0741    with  name 'stair' 'stairs' 'staircase' 'rough' 'stone',
0742          description "The rough stone steps lead up the dome.",
0743    has   multitude;
0744   
0745  Scenic  -> "dome"
0746    with  name 'dome',
0747          before [;
0748            Examine:
0749              if (large_gold_nugget in player)
0750                  "I'm not sure you'll be able to get up it with what you're
0751                   carrying.";
0752              "It looks like you might be able to climb up it.";
0753            Climb:
0754              MovePlayer(u_obj);
0755              rtrue;
0756          ];
0757   
0758  ! ------------------------------------------------------------------------------
0759   
0760  Room    In_Nugget_Of_Gold_Room "Low Room"
0761    with  name 'low' 'room',
0762          description
0763              "This is a low room with a crude note on the wall:
0764               ^^
0765               ~You won't get it up the steps~.",
0766          n_to In_Hall_Of_Mists;
0767   
0768  Scenic  -> "note"
0769    with  name 'note' 'crude',
0770          description "The note says, ~You won't get it up the steps~.";
0771   
0772  Treasure -> large_gold_nugget "large gold nugget"
0773    with  name 'gold' 'nugget' 'large' 'heavy',
0774          description "It's a large sparkling nugget of gold!",
0775          initial "There is a large sparkling nugget of gold here!";
0776   
0777  ! ------------------------------------------------------------------------------
0778   
0779  Class   FissureRoom
0780    class Room
0781    with  before [;
0782            Jump:
0783              if (CrystalBridge hasnt absent)
0784                  "I respectfully suggest you go across the bridge instead of jumping.";
0785              deadflag = 1;
0786              "You didn't make it.";
0787          ],
0788          d_to "The fissure is too terrifying!";
0789   
0790  FissureRoom On_East_Bank_Of_Fissure "On East Bank of Fissure"
0791    with  name 'east' 'e//' 'bank' 'side' 'of' 'fissure',
0792          description
0793              "You are on the east bank of a fissure slicing clear across the hall.
0794               The mist is quite thick here, and the fissure is too wide to jump.",
0795          e_to In_Hall_Of_Mists,
0796          w_to "The fissure is too wide.";
0797   
0798  FissureRoom West_Side_Of_Fissure "West Side of Fissure"
0799    with  name 'west' 'w//' 'bank' 'side' 'of' 'fissure',
0800          description
0801              "You are on the west side of the fissure in the hall of mists.",
0802          w_to At_West_End_Of_Hall_Of_Mists,
0803          e_to "The fissure is too wide.",
0804          n_to At_West_End_Of_Hall_Of_Mists,
0805          before [;
0806            Go:
0807              if (location == West_Side_Of_Fissure && noun == n_obj)
0808                  print
0809                      "You have crawled through a very low wide passage
0810                       parallel to and north of the hall of mists.^";
0811          ];
0812   
0813  Treasure -> "diamonds"
0814    with  name 'diamond' 'diamonds' 'several' 'high' 'quality',
0815          article "some",
0816          description "They look to be of the highest quality!",
0817          initial "There are diamonds here!",
0818    has   multitude;
0819   
0820  Object  CrystalBridge "crystal bridge"
0821    with  name 'crystal' 'bridge',
0822          description "It spans the fissure, thereby providing you a way across.",
0823          initial "A crystal bridge now spans the fissure.",
0824          door_dir [;
0825              if (location == West_Side_Of_Fissure) return e_to;
0826              return w_to;
0827          ],
0828          door_to [;
0829              if (location == West_Side_Of_Fissure) return On_East_Bank_Of_Fissure;
0830              return West_Side_Of_Fissure;
0831          ],
0832          found_in On_East_Bank_Of_Fissure West_Side_Of_Fissure,
0833    has   static door open absent;
0834   
0835  Scenic  "fissure"
0836    with  name 'wide' 'fissure',
0837          description "The fissure looks far too wide to jump.",
0838          found_in On_East_Bank_Of_Fissure West_Side_Of_Fissure;
0839   
0840  ! ------------------------------------------------------------------------------
0841   
0842  Room    At_West_End_Of_Hall_Of_Mists "At West End of Hall of Mists"
0843    with  name 'west' 'w//' 'end' 'of' 'hall' 'mists',
0844          description
0845              "You are at the west end of the hall of mists.
0846               A low wide crawl continues west and another goes north.
0847               To the south is a little passage 6 feet off the floor.",
0848          s_to Alike_Maze_1,
0849          u_to Alike_Maze_1,
0850          e_to West_Side_Of_Fissure,
0851          w_to At_East_End_Of_Long_Hall,
0852          n_to West_Side_Of_Fissure,
0853          before [;
0854            Go:
0855              if (noun == n_obj)
0856                  print
0857                      "You have crawled through a very low wide passage
0858                       parallel to and north of the hall of mists.^";
0859          ];
0860   
0861  ! ------------------------------------------------------------------------------
0862  !   Long Hall to the west of the Hall of Mists
0863  ! ------------------------------------------------------------------------------
0864   
0865  Room    At_East_End_Of_Long_Hall "At East End of Long Hall"
0866    with  name 'east' 'e//' 'end' 'of' 'long' 'hall',
0867          description
0868              "You are at the east end of a very long hall apparently without side chambers.
0869               To the east a low wide crawl slants up.
0870               To the north a round two foot hole slants down.",
0871          e_to At_West_End_Of_Hall_Of_Mists,
0872          u_to At_West_End_Of_Hall_Of_Mists,
0873          w_to At_West_End_Of_Long_Hall,
0874          n_to Crossover,
0875          d_to Crossover;
0876   
0877  ! ------------------------------------------------------------------------------
0878   
0879  Room    At_West_End_Of_Long_Hall "At West End of Long Hall"
0880    with  name 'west' 'w//' 'end' 'of' 'long' 'hall',
0881          description
0882              "You are at the west end of a very long featureless hall.
0883               The hall joins up with a narrow north/south passage.",
0884          e_to At_East_End_Of_Long_Hall,
0885          s_to Different_Maze_1,
0886          n_to Crossover;
0887   
0888  ! ------------------------------------------------------------------------------
0889   
0890  Room    Crossover "N/S and E/W Crossover"
0891    with  name 'n/s' 'and' 'e/w' 'crossover',
0892          description
0893              "You are at a crossover of a high N/S passage and a low E/W one.",
0894          w_to At_East_End_Of_Long_Hall,
0895          n_to Dead_End_7,
0896          e_to In_West_Side_Chamber,
0897          s_to At_West_End_Of_Long_Hall;
0898   
0899  Scenic  -> "crossover"
0900    with  name 'crossover' 'over' 'cross',
0901          description "You know as much as I do at this point.";
0902   
0903  ! ------------------------------------------------------------------------------
0904  !   Many Dead Ends will be needed for the maze below, so define a class:
0905  ! ------------------------------------------------------------------------------
0906   
0907  Class   DeadendRoom
0908    with  short_name "Dead End",
0909          description "You have reached a dead end.",
0910          cant_go "You'll have to go back the way you came.";
0911   
0912  DeadendRoom Dead_End_7
0913    with  s_to Crossover,
0914          out_to Crossover;
0915   
0916  ! ------------------------------------------------------------------------------
0917  !   The Hall of the Mountain King and side chambers
0918  ! ------------------------------------------------------------------------------
0919   
0920  Room    In_Hall_Of_Mt_King "Hall of the Mountain King"
0921    with  name 'hall' 'of' 'mountain' 'king',
0922          description
0923              "You are in the hall of the mountain king, with passages off in all directions.",
0924          cant_go "Well, perhaps not quite all directions.",
0925          u_to In_Hall_Of_Mists,
0926          e_to In_Hall_Of_Mists,
0927          n_to Low_N_S_Passage,
0928          s_to In_South_Side_Chamber,
0929          w_to In_West_Side_Chamber,
0930          sw_to In_Secret_E_W_Canyon,
0931          before [;
0932            Go:
0933              if (Snake in self && (noun == n_obj or s_obj or w_obj ||
0934                                   (noun == sw_obj && random(100) <= 35)))
0935                  "You can't get by the snake.";
0936          ];
0937   
0938  Object  -> Snake "snake"
0939    with  name 'snake' 'cobra' 'asp' 'huge' 'fierce' 'green' 'ferocious'
0940               'venemous' 'venomous' 'large' 'big' 'killer',
0941          description "I wouldn't mess with it if I were you.",
0942          initial "A huge green fierce snake bars the way!",
0943          life [;
0944            Order, Ask, Answer:
0945              "Hiss!";
0946            ThrowAt:
0947              if (noun == axe) <<Attack self>>;
0948              <<Give noun self>>;
0949            Give:
0950              if (noun == little_bird) {
0951                  remove little_bird;
0952                  "The snake has now devoured your bird.";
0953              }
0954              "There's nothing here it wants to eat (except perhaps you).";
0955            Attack:
0956              "Attacking the snake both doesn't work and is very dangerous.";
0957            Take:
0958              deadflag = 1;
0959              "It takes you instead. Glrp!";
0960          ],
0961    has   animate;
0962   
0963  ! ------------------------------------------------------------------------------
0964   
0965  Room    Low_N_S_Passage "Low N/S Passage"
0966    with  name 'low' 'n/s' 'passage',
0967          description
0968              "You are in a low N/S passage at a hole in the floor.
0969               The hole goes down to an E/W passage.",
0970          s_to In_Hall_Of_Mt_King,
0971          d_to In_Dirty_Passage,
0972          n_to At_Y2;
0973   
0974  Treasure -> "bars of silver"
0975    with  name 'silver' 'bars',
0976          article "some",
0977          description "They're probably worth a fortune!",
0978          initial "There are bars of silver here!";
0979   
0980  ! ------------------------------------------------------------------------------
0981   
0982  Room    In_South_Side_Chamber "In South Side Chamber"
0983    with  name 'south' 's//''side' 'chamber',
0984          description "You are in the south side chamber.",
0985          n_to In_Hall_Of_Mt_King;
0986   
0987  Treasure -> "precious jewelry"
0988    with  name 'jewel' 'jewels' 'jewelry' 'precious' 'exquisite',
0989          article "some",
0990          description "It's all quite exquisite!",
0991          initial "There is precious jewelry here!";
0992   
0993  ! ------------------------------------------------------------------------------
0994   
0995  Room    In_West_Side_Chamber "In West Side Chamber"
0996    with  name 'west' 'w//' 'wide' 'chamber',
0997          description
0998              "You are in the west side chamber of the hall of the mountain king.
0999               A passage continues west and up here.",
1000          w_to Crossover,
1001          u_to Crossover,
1002          e_to In_Hall_Of_Mt_King;
1003   
1004  Treasure -> rare_coins "rare coins"
1005    with  name 'coins' 'rare',
1006          article "many",
1007          description "They're a numismatist's dream!",
1008          initial "There are many coins here!",
1009    has   multitude;
1010   
1011  ! ------------------------------------------------------------------------------
1012  !   The Y2 Rock Room and environs, slightly below
1013  ! ------------------------------------------------------------------------------
1014   
1015  Room    At_Y2 "At ~Y2~"
1016    with  name 'y2',
1017          description
1018              "You are in a large room, with a passage to the south,
1019               a passage to the west, and a wall of broken rock to the east.
1020               There is a large ~Y2~ on a rock in the room's center.",
1021          after [;
1022            Look:
1023              if (random(100) <= 25) print "^A hollow voice says, ~Plugh.~^";
1024          ],
1025          before [;
1026            Plugh:
1027              PlayerTo(Inside_Building);
1028              rtrue;
1029            Plover:
1030              if (In_Plover_Room hasnt visited) rfalse;
1031              if (egg_sized_emerald in player) {
1032                  move egg_sized_emerald to In_Plover_Room;
1033                  score = score - 5;
1034              }
1035              PlayerTo(In_Plover_Room);
1036              rtrue;
1037          ],
1038          s_to Low_N_S_Passage,
1039          e_to Jumble_Of_Rock,
1040          w_to At_Window_On_Pit_1;
1041   
1042  Scenic  -> "~Y2~ rock"
1043    with  name 'rock' 'y2',
1044          description "There is a large ~Y2~ painted on the rock.",
1045    has   supporter;
1046   
1047  ! ------------------------------------------------------------------------------
1048   
1049  Room    Jumble_Of_Rock "Jumble of Rock"
1050    with  name 'jumble' 'of' 'rock',
1051          description "You are in a jumble of rock, with cracks everywhere.",
1052          d_to At_Y2,
1053          u_to In_Hall_Of_Mists;
1054   
1055  ! ------------------------------------------------------------------------------
1056   
1057  Room    At_Window_On_Pit_1 "At Window on Pit"
1058    with  name 'window' 'on' 'pit' 'east' 'e//',
1059          description
1060              "You're at a low window overlooking a huge pit, which extends up out of sight.
1061               A floor is indistinctly visible over 50 feet below.
1062               Traces of white mist cover the floor of the pit, becoming thicker to the right.
1063               Marks in the dust around the window would seem to indicate that someone has been here recently.
1064               Directly across the pit from you and 25 feet away
1065               there is a similar window looking into a lighted room.
1066               A shadowy figure can be seen there peering back at you.",
1067          before [;
1068            WaveHands:
1069              "The shadowy figure waves back at you!";
1070          ],
1071          cant_go "The only passage is back east to Y2.",
1072          e_to At_Y2;
1073   
1074  Class   PitScenic
1075    with  found_in At_Window_On_Pit_1 At_Window_On_Pit_2,
1076    has   scenery;
1077   
1078  PitScenic "window"
1079    with  name 'window' 'low',
1080          description "It looks like a regular window.",
1081    has   openable;
1082   
1083  PitScenic "huge pit"
1084    with  name 'pit' 'deep' 'large',
1085          description
1086              "It's so deep you can barely make out the floor below,
1087               and the top isn't visible at all.";
1088   
1089  PitScenic "marks in the dust"
1090    with  name 'marks' 'dust',
1091          description "Evidently you're not alone here.",
1092    has   multitude;
1093   
1094  PitScenic "shadowy figure"
1095    with  name 'figure' 'shadow' 'person' 'individual' 'shadowy' 'mysterious',
1096          description
1097              "The shadowy figure seems to be trying to attract your attention.";
1098   
1099  ! ------------------------------------------------------------------------------
1100   
1101  Room    In_Dirty_Passage "Dirty Passage"
1102    with  name 'dirty' 'passage',
1103          description
1104              "You are in a dirty broken passage.
1105               To the east is a crawl.
1106               To the west is a large passage.
1107               Above you is a hole to another passage.",
1108          e_to On_Brink_Of_Pit,
1109          u_to Low_N_S_Passage,
1110          w_to In_Dusty_Rock_Room;
1111   
1112  ! ------------------------------------------------------------------------------
1113   
1114  Room    On_Brink_Of_Pit "Brink of Pit"
1115    with  name 'brink' 'of' 'pit',
1116          description
1117              "You are on the brink of a small clean climbable pit.
1118               A crawl leads west.",
1119          w_to In_Dirty_Passage,
1120          d_to In_Pit,
1121          in_to In_Pit;
1122   
1123  Scenic  -> "small pit"
1124    with  name 'pit' 'small' 'clean' 'climbable',
1125          description "It looks like you might be able to climb down into it.",
1126          before [;
1127            Climb, Enter:
1128              MovePlayer(d_obj);
1129              rtrue;
1130          ];
1131   
1132  ! ------------------------------------------------------------------------------
1133   
1134  Room    In_Pit "In Pit"
1135    with  name 'in' 'pit',
1136          description
1137              "You are in the bottom of a small pit with a little stream,
1138               which enters and exits through tiny slits.",
1139          u_to On_Brink_Of_Pit,
1140          d_to "You don't fit through the tiny slits!",
1141    has   nodwarf;
1142   
1143  Scenic  -> "tiny slits"
1144    with  name 'slit' 'slits' 'tiny',
1145          description "The slits form a complex pattern in the rock.",
1146    has   multitude;
1147   
1148  ! ------------------------------------------------------------------------------
1149   
1150  Room    In_Dusty_Rock_Room "In Dusty Rock Room"
1151    with  name 'dusty' 'rock' 'room',
1152          description
1153              "You are in a large room full of dusty rocks.
1154               There is a big hole in the floor.
1155               There are cracks everywhere, and a passage leading east.",
1156          e_to In_Dirty_Passage,
1157          d_to At_Complex_Junction;
1158   
1159  Scenic  -> "dusty rocks"
1160    with  name 'rocks' 'boulders' 'stones' 'rock' 'boulder' 'stone' 'dusty' 'dirty',
1161          description "They're just rocks. (Dusty ones, that is.)",
1162          before [;
1163            LookUnder, Push, Pull:
1164              "You'd have to blast your way through.";
1165          ],
1166    has   multitude;
1167   
1168  ! ------------------------------------------------------------------------------
1169  !   A maze of twisty little passages, all alike...
1170  ! ------------------------------------------------------------------------------
1171   
1172  Class   MazeRoom
1173    with  short_name "Maze",
1174          description "You are in a maze of twisty little passages, all alike.",
1175          out_to "Easier said than done.";
1176   
1177  MazeRoom Alike_Maze_1
1178    with  u_to At_West_End_Of_Hall_Of_Mists,
1179          n_to Alike_Maze_1,
1180          e_to Alike_Maze_2,
1181          s_to Alike_Maze_4,
1182          w_to Alike_Maze_11;
1183   
1184  MazeRoom Alike_Maze_2
1185    with  w_to Alike_Maze_1,
1186          s_to Alike_Maze_3,
1187          e_to Alike_Maze_4;
1188   
1189  MazeRoom Alike_Maze_3
1190    with  e_to Alike_Maze_2,
1191          d_to Dead_End_3,
1192          s_to Alike_Maze_6,
1193          n_to Dead_End_13;
1194   
1195  MazeRoom Alike_Maze_4
1196    with  w_to Alike_Maze_1,
1197          n_to Alike_Maze_2,
1198          e_to Dead_End_1,
1199          s_to Dead_End_2,
1200          u_to Alike_Maze_14,
1201          d_to Alike_Maze_14;
1202   
1203  MazeRoom Alike_Maze_5
1204    with  e_to Alike_Maze_6,
1205          w_to Alike_Maze_7;
1206   
1207  MazeRoom Alike_Maze_6
1208    with  e_to Alike_Maze_3,
1209          w_to Alike_Maze_5,
1210          d_to Alike_Maze_7,
1211          s_to Alike_Maze_8;
1212   
1213  DeadendRoom Dead_End_1
1214    with  w_to Alike_Maze_4,
1215          out_to Alike_Maze_4;
1216   
1217  DeadendRoom Dead_End_2
1218    with  w_to Alike_Maze_4,
1219          out_to Alike_Maze_4;
1220   
1221  DeadendRoom Dead_End_3
1222    with  u_to Alike_Maze_3,
1223          out_to Alike_Maze_3;
1224   
1225  MazeRoom Alike_Maze_7
1226    with  w_to Alike_Maze_5,
1227          u_to Alike_Maze_6,
1228          e_to Alike_Maze_8,
1229          s_to Alike_Maze_9;
1230   
1231  MazeRoom Alike_Maze_8
1232    with  w_to Alike_Maze_6,
1233          e_to Alike_Maze_7,
1234          s_to Alike_Maze_8,
1235          u_to Alike_Maze_9,
1236          n_to Alike_Maze_10,
1237          d_to Dead_End_12;
1238   
1239  MazeRoom Alike_Maze_9
1240    with  w_to Alike_Maze_7,
1241          n_to Alike_Maze_8,
1242          s_to Dead_End_4;
1243   
1244  DeadendRoom Dead_End_4
1245    with  w_to Alike_Maze_9,
1246          out_to Alike_Maze_9;
1247   
1248  MazeRoom Alike_Maze_10
1249    with  w_to Alike_Maze_8,
1250          n_to Alike_Maze_10,
1251          d_to Dead_End_5,
1252          e_to At_Brink_Of_Pit;
1253   
1254  DeadendRoom Dead_End_5
1255    with  u_to Alike_Maze_10,
1256          out_to Alike_Maze_10;
1257   
1258  ! ------------------------------------------------------------------------------
1259   
1260  Room    At_Brink_Of_Pit "At Brink of Pit"
1261    with  name 'brink' 'of' 'pit',
1262          description
1263              "You are on the brink of a thirty foot pit with a massive orange column down one wall.
1264               You could climb down here but you could not get back up.
1265               The maze continues at this level.",
1266          d_to In_Bird_Chamber,
1267          w_to Alike_Maze_10,
1268          s_to Dead_End_6,
1269          n_to Alike_Maze_12,
1270          e_to Alike_Maze_13;
1271   
1272  Scenic  -> "massive orange column"
1273    with  name 'column' 'massive' 'orange' 'big' 'huge',
1274          description "It looks like you could climb down it.",
1275          before [;
1276            Climb:
1277              MovePlayer(d_obj);
1278              rtrue;
1279          ];
1280   
1281  Scenic  -> "pit"
1282    with  name 'pit' 'thirty' 'foot' 'thirty-foot',
1283          description "You'll have to climb down to find out anything more...",
1284          before [;
1285            Climb:
1286              MovePlayer(d_obj);
1287              rtrue;
1288          ];
1289   
1290  DeadendRoom Dead_End_6
1291    with  e_to At_Brink_Of_Pit,
1292          out_to At_Brink_Of_Pit;
1293   
1294  ! ------------------------------------------------------------------------------
1295  !   A line of three vital junctions, east to west
1296  ! ------------------------------------------------------------------------------
1297   
1298  Room    At_Complex_Junction "At Complex Junction"
1299    with  name 'complex' 'junction',
1300          description
1301              "You are at a complex junction.
1302               A low hands and knees passage from the north joins a higher crawl from the east
1303               to make a walking passage going west.
1304               There is also a large room above.
1305               The air is damp here.",
1306          u_to In_Dusty_Rock_Room,
1307          w_to In_Bedquilt,
1308          n_to In_Shell_Room,
1309          e_to In_Anteroom;
1310   
1311  ! ------------------------------------------------------------------------------
1312   
1313  Room    In_Bedquilt "Bedquilt"
1314    with  name 'bedquilt',
1315          description
1316              "You are in bedquilt, a long east/west passage with holes everywhere.
1317               To explore at random select north, south, up, or down.",
1318          e_to At_Complex_Junction,
1319          w_to In_Swiss_Cheese_Room,
1320          s_to In_Slab_Room,
1321          u_to In_Dusty_Rock_Room,
1322          n_to At_Junction_Of_Three,
1323          d_to In_Anteroom,
1324          before [ destiny;
1325            Go:
1326              if (noun == s_obj or d_obj && random(100) <= 80) destiny = 1;
1327              if (noun == u_obj && random(100) <= 80)          destiny = 1;
1328              if (noun == u_obj && random(100) <= 50) destiny = In_Secret_N_S_Canyon_1;
1329              if (noun == n_obj && random(100) <= 60)          destiny = 1;
1330              if (noun == n_obj && random(100) <= 75) destiny = In_Large_Low_Room;
1331              if (destiny == 1)
1332                  "You have crawled around in some little holes and wound up back
1333                   in the main passage.";
1334              if (destiny == 0) rfalse;
1335              PlayerTo(destiny);
1336              rtrue;
1337          ];
1338   
1339  ! ------------------------------------------------------------------------------
1340   
1341  Room    In_Swiss_Cheese_Room "In Swiss Cheese Room"
1342    with  name 'swiss' 'cheese' 'room',
1343          description
1344              "You are in a room whose walls resemble swiss cheese.
1345               Obvious passages go west, east, ne, and nw.
1346               Part of the room is occupied by a large bedrock block.",
1347          w_to At_East_End_Of_Twopit_Room,
1348          s_to In_Tall_E_W_Canyon,
1349          ne_to In_Bedquilt,
1350          nw_to In_Oriental_Room,
1351          e_to In_Soft_Room,
1352          before [;
1353            Go:
1354              if ((noun == s_obj && random(100) <= 80) ||
1355                  (noun == nw_obj && random(100) <= 50))
1356                  "You have crawled around in some little holes and wound up
1357                   back in the main passage.";
1358          ];
1359   
1360  Scenic  -> "bedrock block"
1361    with  name 'block' 'bedrock' 'large',
1362          description "It's just a huge block.",
1363          before [;
1364            LookUnder, Push, Pull, Take:
1365              "Surely you're joking.";
1366          ];
1367   
1368  ! ------------------------------------------------------------------------------
1369  !   The Twopit Room area
1370  ! ------------------------------------------------------------------------------
1371  !   Possible heights for the plant:
1372  ! ------------------------------------------------------------------------------
1373   
1374  Constant TINY_P = 0;
1375  Constant TALL_P = 1;
1376  Constant HUGE_P = 2;
1377   
1378  Room    At_West_End_Of_Twopit_Room "At West End of Twopit Room"
1379    with  name 'west' 'w//' 'end' 'of' 'twopit' 'room',
1380          description
1381              "You are at the west end of the twopit room.
1382               There is a large hole in the wall above the pit at this end of the room.",
1383          e_to At_East_End_Of_Twopit_Room,
1384          w_to In_Slab_Room,
1385          d_to In_West_Pit,
1386          u_to "It is too far up for you to reach.",
1387          before [;
1388            Enter:
1389              if (noun == HoleAbovePit_1) "It is too far up for you to reach.";
1390          ];
1391   
1392  Object  PlantStickingUp "beanstalk"
1393    with  name 'plant' 'beanstalk' 'stalk' 'bean' 'giant' 'tiny' 'little'
1394               'murmuring' 'twelve' 'foot' 'tall' 'bellowing',
1395          describe [;
1396              if (Plant.height == TALL_P)
1397                  "The top of a 12-foot-tall beanstalk is poking out of the west pit.";
1398              "There is a huge beanstalk growing out of the west pit up to the hole.";
1399          ],
1400          before [;
1401            Examine:
1402              RunRoutines(self, describe);
1403              rtrue;
1404            Climb:
1405              if (Plant.height == HUGE_P) <<Climb Plant>>;
1406          ],
1407          found_in At_West_End_Of_Twopit_Room At_East_End_Of_Twopit_Room,
1408    has   absent static;
1409   
1410  Scenic  HoleAbovePit_1 "hole above pit"
1411    with  name 'hole' 'large' 'above' 'pit',
1412          description
1413              "The hole is in the wall above the pit at this end of the room.",
1414          found_in In_West_Pit At_West_End_Of_Twopit_Room;
1415   
1416  ! ------------------------------------------------------------------------------
1417   
1418  Room    In_West_Pit "In West Pit"
1419    with  name 'in' 'west' 'pit',
1420          description
1421              "You are at the bottom of the western pit in the twopit room.
1422               There is a large hole in the wall about 25 feet above you.",
1423          before [;
1424            Climb:
1425              if (noun == Plant) rfalse;
1426              if (Plant.height == TINY_P)
1427                  "There is nothing here to climb.
1428                   Use ~up~ or ~out~ to leave the pit.";
1429          ],
1430          u_to At_West_End_Of_Twopit_Room,
1431    has   nodwarf;
1432   
1433  Object  -> Plant "plant"
1434    with  name 'plant' 'beanstalk' 'stalk' 'bean' 'giant' 'tiny' 'little'
1435               'murmuring' 'twelve' 'foot' 'tall' 'bellowing',
1436          describe [;
1437              switch (self.height) {
1438                TINY_P:
1439                  "There is a tiny little plant in the pit, murmuring ~Water, water, ...~";
1440                TALL_P:
1441                  "There is a 12-foot-tall beanstalk stretching up out of the pit, bellowing ~Water!! Water!!~";
1442                HUGE_P:
1443                  "There is a gigantic beanstalk stretching all the way up to the hole.";
1444              }
1445          ],
1446          before [;
1447            Climb:
1448              switch (self.height) {
1449                TINY_P:
1450                  "It's just a little plant!";
1451                TALL_P:
1452                  print
1453                      "You have climbed up the plant and out of the pit.^";
1454                  PlayerTo(At_West_End_Of_Twopit_Room);
1455                  rtrue;
1456                HUGE_P:
1457                  print
1458                      "You clamber up the plant and scurry through the hole at the top.^";
1459                  PlayerTo(In_Narrow_Corridor);
1460                  rtrue;
1461              }
1462            Take:
1463              "The plant has exceptionally deep roots and cannot be pulled free.";
1464            Water:
1465              if (bottle notin player)
1466                  "You have nothing to water the plant with.";
1467              switch (child(bottle)) {
1468                nothing:
1469                  "The bottle is empty.";
1470                oil_in_the_bottle:
1471                  remove oil_in_the_bottle;
1472                  "The plant indignantly shakes the oil off its leaves and asks, ~Water?~";
1473              }
1474              remove water_in_the_bottle;
1475              switch ((self.height)++) {
1476                TINY_P:
1477                  print
1478                      "The plant spurts into furious growth for a few seconds.^^";
1479                  give PlantStickingUp ~absent;
1480                TALL_P:
1481                  print
1482                      "The plant grows explosively, almost filling the bottom of the pit.^^";
1483                HUGE_P:
1484                  print
1485                      "You've over-watered the plant! It's shriveling up! It's, it's...^^";
1486                  give PlantStickingUp absent;
1487                  remove PlantStickingUp;
1488                  self.height = TINY_P;
1489              }
1490              <<Examine self>>;
1491            Oil:
1492              <<Water self>>;
1493            Examine:
1494              self.describe();
1495              rtrue;
1496          ],
1497          height TINY_P;
1498   
1499  ! ------------------------------------------------------------------------------
1500   
1501  Room    At_East_End_Of_Twopit_Room "At East End of Twopit Room"
1502    with  name 'east' 'e//' 'end' 'of' 'twopit' 'room',
1503          description
1504              "You are at the east end of the twopit room.
1505               The floor here is littered with thin rock slabs, which make it easy to descend the pits.
1506               There is a path here bypassing the pits to connect passages from east and west.
1507               There are holes all over,
1508               but the only big one is on the wall directly over the west pit where you can't get to it.",
1509          e_to In_Swiss_Cheese_Room,
1510          w_to At_West_End_Of_Twopit_Room,
1511          d_to In_East_Pit;
1512   
1513  Scenic  -> "thin rock slabs"
1514    with  name 'slabs' 'slab' 'rocks' 'stairs' 'thin' 'rock',
1515          description "They almost form natural stairs down into the pit.",
1516          before [;
1517            LookUnder, Push, Pull, Take:
1518              "Surely you're joking. You'd have to blast them aside.";
1519          ],
1520    has   multitude;
1521   
1522  ! ------------------------------------------------------------------------------
1523   
1524  Room    In_East_Pit "In East Pit"
1525    with  name 'in' 'east' 'e//' 'pit',
1526          description
1527              "You are at the bottom of the eastern pit in the twopit room.
1528               There is a small pool of oil in one corner of the pit.",
1529          u_to At_East_End_Of_Twopit_Room,
1530    has   nodwarf;
1531   
1532  Scenic  -> Oil "pool of oil"
1533    with  name 'pool' 'oil' 'small',
1534          description "It looks like ordinary oil.",
1535          before [;
1536            Drink:
1537              "Absolutely not.";
1538            Take:
1539              if (bottle notin player)
1540                  "You have nothing in which to carry the oil.";
1541              <<Fill bottle>>;
1542            Insert:
1543              if (second == bottle) <<Fill bottle>>;
1544              "You have nothing in which to carry the oil.";
1545          ];
1546   
1547  Scenic  "hole above pit"
1548    with  name 'hole' 'large' 'above' 'pit',
1549          description "The hole is in the wall above you.",
1550          found_in In_East_Pit At_East_End_Of_Twopit_Room;
1551   
1552  ! ------------------------------------------------------------------------------
1553   
1554  Room    In_Slab_Room "Slab Room"
1555    with  name 'slab' 'room',
1556          description
1557              "You are in a large low circular chamber
1558               whose floor is an immense slab fallen from the ceiling (slab room).
1559               East and west there once were large passages, but they are now filled with boulders.
1560               Low small passages go north and south, and the south one quickly bends west around the boulders.",
1561          s_to At_West_End_Of_Twopit_Room,
1562          u_to In_Secret_N_S_Canyon_0,
1563          n_to In_Bedquilt;
1564   
1565  Scenic  -> "slab"
1566    with  name 'slab' 'immense',
1567          description "It is now the floor here.",
1568          before [;
1569            LookUnder, Push, Pull, Take:
1570              "Surely you're joking.";
1571          ];
1572   
1573  Scenic  -> "boulders"
1574    with  name 'boulder' 'boulders' 'rocks' 'stones',
1575          description "They're just ordinary boulders.",
1576    has   multitude;
1577   
1578  ! ------------------------------------------------------------------------------
1579  !   A small network of Canyons, mainly Secret
1580  ! ------------------------------------------------------------------------------
1581   
1582  Room    In_Secret_N_S_Canyon_0 "Secret N/S Canyon"
1583    with  name 'secret' 'n/s' 'canyon' '0//',
1584          description
1585              "You are in a secret N/S canyon above a large room.",
1586          d_to In_Slab_Room,
1587          s_to In_Secret_Canyon,
1588          n_to In_Mirror_Canyon,
1589          before [;
1590            Go:
1591              if (noun == s_obj) canyon_from = self;
1592          ];
1593   
1594  Room    In_Secret_N_S_Canyon_1 "Secret N/S Canyon"
1595    with  name 'secret' 'n/s' 'canyon' '1//',
1596          description "You are in a secret N/S canyon above a sizable passage.",
1597          n_to At_Junction_Of_Three,
1598          d_to In_Bedquilt,
1599          s_to Atop_Stalactite;
1600   
1601  Room    At_Junction_Of_Three "Junction of Three Secret Canyons"
1602    with  name 'junction' 'of' 'three' 'secret' 'canyons',
1603          description
1604              "You are in a secret canyon at a junction of three canyons, bearing north, south, and se.
1605               The north one is as tall as the other two combined.",
1606          se_to In_Bedquilt,
1607          s_to In_Secret_N_S_Canyon_1,
1608          n_to At_Window_On_Pit_2;
1609   
1610  Room    In_Large_Low_Room "Large Low Room"
1611    with  name 'large' 'low' 'room',
1612          description
1613              "You are in a large low room. Crawls lead north, se, and sw.",
1614          sw_to In_Sloping_Corridor,
1615          se_to In_Oriental_Room,
1616          n_to Dead_End_Crawl;
1617   
1618  Room    Dead_End_Crawl "Dead End Crawl"
1619    with  name 'dead' 'end' 'crawl',
1620          description "This is a dead end crawl.",
1621          s_to In_Large_Low_Room,
1622          out_to In_Large_Low_Room;
1623   
1624  Room    In_Secret_E_W_Canyon "Secret E/W Canyon Above Tight Canyon"
1625    with  name 'secret' 'e/w' 'canyon' 'above' 'tight' 'canyon',
1626          description
1627              "You are in a secret canyon which here runs E/W.
1628               It crosses over a very tight canyon 15 feet below.
1629               If you go down you may not be able to get back up.",
1630          e_to In_Hall_Of_Mt_King,
1631          w_to In_Secret_Canyon,
1632          before [;
1633            Go:
1634              if (noun == w_obj) canyon_from = self;
1635          ],
1636          d_to In_N_S_Canyon;
1637   
1638  Room    In_N_S_Canyon "N/S Canyon"
1639    with  name 'n/s' 'canyon',
1640          description "You are at a wide place in a very tight N/S canyon.",
1641          s_to Canyon_Dead_End,
1642          n_to In_Tall_E_W_Canyon;
1643   
1644  Room    Canyon_Dead_End "Canyon Dead End"
1645    with  description "The canyon here becomes too tight to go further south.",
1646          n_to In_N_S_Canyon;
1647   
1648  Room    In_Tall_E_W_Canyon "In Tall E/W Canyon"
1649    with  name 'tall' 'e/w' 'canyon',
1650          description
1651              "You are in a tall E/W canyon. A low tight crawl goes 3 feet north
1652               and seems to open up.",
1653          e_to In_N_S_Canyon,
1654          w_to Dead_End_8,
1655          n_to In_Swiss_Cheese_Room;
1656   
1657  ! ------------------------------------------------------------------------------
1658   
1659  Room    Atop_Stalactite "Atop Stalactite"
1660    with  name 'atop' 'stalactite',
1661          description
1662              "A large stalactite extends from the roof and almost reaches the floor below.
1663               You could climb down it, and jump from it to the floor,
1664               but having done so you would be unable to reach it to climb back up.",
1665          n_to In_Secret_N_S_Canyon_1,
1666          d_to [;
1667              if (random(100) <= 40) return Alike_Maze_6;
1668              if (random(100) <= 50) return Alike_Maze_9;
1669              return Alike_Maze_4;
1670          ],
1671          before [;
1672            Jump, Climb:
1673              <<Go d_obj>>;
1674          ];
1675   
1676  Scenic  -> "stalactite"
1677    with  name 'stalactite' 'stalagmite' 'stalagtite' 'large',
1678          description
1679              "You could probably climb down it, but you can forget coming back up.",
1680          before [;
1681            LookUnder, Push, Take:
1682              "Do get a grip on yourself.";
1683          ];
1684   
1685  ! ------------------------------------------------------------------------------
1686  !   Here be dragons
1687  ! ------------------------------------------------------------------------------
1688   
1689  Room    In_Secret_Canyon "Secret Canyon"
1690    with  name 'secret' 'canyon',
1691          description
1692              "You are in a secret canyon which exits to the north and east.",
1693          e_to [;
1694              if (canyon_from == In_Secret_E_W_Canyon) return canyon_from;
1695              if (Dragon in location)
1696                  "The dragon looks rather nasty. You'd best not try to get by.";
1697              return In_Secret_E_W_Canyon;
1698          ],
1699          n_to [;
1700              if (canyon_from == In_Secret_N_S_Canyon_0) return canyon_from;
1701              if (Dragon in location)
1702                  "The dragon looks rather nasty. You'd best not try to get by.";
1703              return In_Secret_N_S_Canyon_0;
1704          ],
1705          out_to [;
1706              return canyon_from;
1707          ],
1708          before [;
1709              if (action == ##Yes && Dragon.is_being_attacked) {
1710                  remove Dragon;
1711                  move DragonCorpse to location;
1712                  Dragon.is_being_attacked = false;
1713                  "Congratulations! You have just vanquished a dragon with your bare hands!
1714                   (Unbelievable, isn't it?)";
1715              }
1716              if (action == ##No && Dragon.is_being_attacked) {
1717                  Dragon.is_being_attacked = false;
1718                  "I should think not.";
1719              }
1720              Dragon.is_being_attacked = false;
1721          ];
1722   
1723  Object  -> Dragon "dragon"
1724    with  name 'dragon' 'monster' 'beast' 'lizard' 'huge' 'green' 'fierce' 'scaly'
1725               'giant' 'ferocious',
1726          description "I wouldn't mess with it if I were you.",
1727          initial "A huge green fierce dragon bars the way!",
1728          life [;
1729            Attack:
1730              self.is_being_attacked = true;
1731              "With what? Your bare hands?";
1732            Give:
1733              "The dragon is implacable.";
1734            ThrowAt:
1735              if (noun ~= axe)
1736                  "You'd probably be better off using your bare hands than that thing!";
1737              move axe to location;
1738              "The axe bounces harmlessly off the dragon's thick scales.";
1739          ],
1740          is_being_attacked false,
1741    has   animate;
1742   
1743  Treasure -> "Persian rug"
1744    with  name 'rug' 'persian' 'persian' 'fine' 'finest' 'dragon^s',
1745          describe [;
1746              if (Dragon in location)
1747                  "The dragon is sprawled out on the Persian rug!";
1748              "The Persian rug is spread out on the floor here.";
1749          ],
1750          before [;
1751            Take:
1752              if (Dragon in location)
1753                  "You'll need to get the dragon to move first!";
1754          ],
1755          depositpoints 14;
1756   
1757  Object  DragonCorpse "dragon's body"
1758    with  name 'dragon' 'corpse' 'dead' 'dragon^s' 'body',
1759          initial "The body of a huge green dead dragon is lying off to one side.",
1760          before [;
1761            Attack:
1762              "You've already done enough damage!";
1763          ],
1764    has   static;
1765   
1766  ! ------------------------------------------------------------------------------
1767  !   And more of the Alike Maze
1768  ! ------------------------------------------------------------------------------
1769   
1770  DeadendRoom Dead_End_8
1771    with  description "The canyon runs into a mass of boulders -- dead end.",
1772          s_to In_Tall_E_W_Canyon,
1773          out_to In_Tall_E_W_Canyon;
1774   
1775  MazeRoom Alike_Maze_11
1776    with  n_to Alike_Maze_1,
1777          w_to Alike_Maze_11,
1778          s_to Alike_Maze_11,
1779          e_to Dead_End_9,
1780          ne_to Dead_End_10;
1781   
1782  DeadendRoom Dead_End_9
1783    with  w_to Alike_Maze_11,
1784          out_to Alike_Maze_11;
1785   
1786  DeadendRoom Dead_End_10
1787    with  s_to Alike_Maze_3,
1788          out_to Alike_Maze_3;
1789   
1790  MazeRoom Alike_Maze_12
1791    with  s_to At_Brink_Of_Pit,
1792          e_to Alike_Maze_13,
1793          w_to Dead_End_11;
1794   
1795  MazeRoom Alike_Maze_13
1796    with  n_to At_Brink_Of_Pit,
1797          w_to Alike_Maze_12,
1798          nw_to Dead_End_13;
1799   
1800  DeadendRoom Dead_End_11
1801    with  e_to Alike_Maze_12,
1802          out_to Alike_Maze_12;
1803   
1804  DeadendRoom Dead_End_12
1805    with  u_to Alike_Maze_8,
1806          out_to Alike_Maze_8;
1807   
1808  MazeRoom Alike_Maze_14
1809    with  u_to Alike_Maze_4,
1810          d_to Alike_Maze_4;
1811   
1812  DeadendRoom Dead_End_13
1813    class Room
1814    with  name 'pirate^s' 'dead' 'end' 'treasure' 'chest',
1815          se_to Alike_Maze_13,
1816          out_to Alike_Maze_13,
1817          description "This is the pirate's dead end.",
1818          initial [;
1819              StopDaemon(Pirate);
1820              if (treasure_chest in self && treasure_chest hasnt moved)
1821                  "You've found the pirate's treasure chest!";
1822          ],
1823    has   nodwarf;
1824   
1825  Treasure -> treasure_chest "treasure chest"
1826    with  name 'chest' 'box' 'treasure' 'riches' 'pirate' 'pirate^s' 'treasure',
1827          description
1828              "It's the pirate's treasure chest, filled with riches of all kinds!",
1829          initial "The pirate's treasure chest is here!",
1830          depositpoints 12;
1831   
1832  ! ------------------------------------------------------------------------------
1833  !   Above the beanstalk: the Giant Room and the Waterfall
1834  ! ------------------------------------------------------------------------------
1835   
1836  Room    In_Narrow_Corridor "In Narrow Corridor"
1837    with  name 'narrow' 'corridor',
1838          description
1839              "You are in a long, narrow corridor stretching out of sight to the west.
1840               At the eastern end is a hole through which you can see a profusion of leaves.",
1841          d_to In_West_Pit,
1842          w_to In_Giant_Room,
1843          e_to In_West_Pit,
1844          before [;
1845            Jump:
1846              deadflag = 1;
1847              "You fall and break your neck!";
1848          ];
1849   
1850  Scenic  -> "leaves"
1851    with  name 'leaf' 'leaves' 'plant' 'tree' 'stalk' 'beanstalk' 'profusion',
1852          article "some",
1853          description
1854              "The leaves appear to be attached to the beanstalk you climbed to get here.",
1855          before [;
1856            Count:
1857              "69,105.";                  ! (I thank Rene Schnoor for counting them)
1858          ];
1859   
1860  ! ------------------------------------------------------------------------------
1861   
1862  Room    At_Steep_Incline "Steep Incline Above Large Room"
1863    with  name 'steep' 'incline' 'above' 'large' 'room',
1864          description
1865              "You are at the top of a steep incline above a large room.
1866               You could climb down here, but you would not be able to climb up.
1867               There is a passage leading back to the north.",
1868          n_to In_Cavern_With_Waterfall,
1869          d_to In_Large_Low_Room;
1870   
1871  ! ------------------------------------------------------------------------------
1872   
1873  Room    In_Giant_Room "Giant Room"
1874    with  name 'giant' 'room',
1875          description
1876              "You are in the giant room.
1877               The ceiling here is too high up for your lamp to show it.
1878               Cavernous passages lead east, north, and south.
1879               On the west wall is scrawled the inscription, ~Fee fie foe foo~ [sic].",
1880          s_to In_Narrow_Corridor,
1881          e_to At_Recent_Cave_In,
1882          n_to In_Immense_N_S_Passage;
1883   
1884  Scenic  -> "scrawled inscription"
1885    with  name 'inscription' 'writing' 'scrawl' 'scrawled',
1886          description "It says, ~Fee fie foe foo [sic].~";
1887   
1888  Treasure -> golden_eggs "nest of golden eggs"
1889    with  name 'eggs' 'egg' 'nest' 'golden' 'beautiful',
1890          description "The nest is filled with beautiful golden eggs!",
1891          initial "There is a large nest here, full of golden eggs!",
1892          depositpoints 14,
1893    has   multitude;
1894   
1895  ! ------------------------------------------------------------------------------
1896   
1897  Room    At_Recent_Cave_In "Recent Cave-in"
1898    with  description "The passage here is blocked by a recent cave-in.",
1899          s_to In_Giant_Room;
1900   
1901  ! ------------------------------------------------------------------------------
1902   
1903  Room    In_Immense_N_S_Passage "Immense N/S Passage"
1904    with  name 'immense' 'n/s' 'passage',
1905          description "You are at one end of an immense north/south passage.",
1906          s_to In_Giant_Room,
1907          n_to [;
1908              if (RustyDoor has locked) <<Open RustyDoor>>;
1909              if (RustyDoor hasnt open) {
1910                  give RustyDoor open;
1911                  print "(first wrenching the door open)^";
1912              }
1913              return RustyDoor;
1914          ];
1915   
1916  Object  -> RustyDoor "rusty door"
1917    with  name 'door' 'hinge' 'hinges' 'massive' 'rusty' 'iron',
1918          description "It's just a big iron door.",
1919          when_closed "The way north is barred by a massive, rusty, iron door.",
1920          when_open "The way north leads through a massive, rusty, iron door.",
1921          door_to In_Cavern_With_Waterfall,
1922          door_dir n_to,
1923          before [;
1924            Open:
1925              if (self has locked)
1926                  "The hinges are quite thoroughly rusted now and won't budge.";
1927            Close:
1928              if (self has open)
1929                  "With all the effort it took to get the door open,
1930                   I wouldn't suggest closing it again.";
1931              "No problem there -- it already is.";
1932            Oil:
1933              if (bottle in player && oil_in_the_bottle in bottle) {
1934                  remove oil_in_the_bottle;
1935                  give self ~locked openable;
1936                  "The oil has freed up the hinges so that the door will now move,
1937                   although it requires some effort.";
1938              }
1939              else
1940                  "You have nothing to oil it with.";
1941            Water:
1942              if (bottle in player && water_in_the_bottle in bottle) {
1943                  remove water_in_the_bottle;
1944                  give self locked ~open;
1945                  "The hinges are quite thoroughly rusted now and won't budge.";
1946              }
1947              else
1948                  "You have nothing to water it with.";
1949          ],
1950          after [;
1951            Open:
1952              "The door heaves open with a shower of rust.";
1953          ],
1954    has   static door locked;
1955   
1956  ! ------------------------------------------------------------------------------
1957   
1958  Room    In_Cavern_With_Waterfall "In Cavern With Waterfall"
1959    with  name 'cavern' 'with' 'waterfall',
1960          description
1961              "You are in a magnificent cavern with a rushing stream,
1962               which cascades over a sparkling waterfall into a roaring whirlpool
1963               which disappears through a hole in the floor.
1964               Passages exit to the south and west.",
1965          s_to In_Immense_N_S_Passage,
1966          w_to At_Steep_Incline;
1967   
1968  Scenic  -> "waterfall"
1969    with  name 'waterfall' 'whirlpool' 'sparkling' 'whirling',
1970          description "Wouldn't want to go down in in a barrel!";
1971   
1972  Treasure -> trident "jeweled trident"
1973    with  name 'trident' 'jeweled' 'jewel-encrusted' 'encrusted' 'fabulous',
1974          description "The trident is covered with fabulous jewels!",
1975          initial "There is a jewel-encrusted trident here!",
1976          depositpoints 14;
1977   
1978  ! ------------------------------------------------------------------------------
1979  !   The caves around Bedquilt
1980  ! ------------------------------------------------------------------------------
1981   
1982  Room    In_Soft_Room "In Soft Room"
1983    with  name 'soft' 'room',
1984          description
1985              "You are in the soft room.
1986               The walls are covered with heavy curtains, the floor with a thick pile carpet.
1987               Moss covers the ceiling.",
1988          w_to In_Swiss_Cheese_Room;
1989   
1990  Scenic  -> "carpet"
1991    with  name 'carpet' 'shag' 'pile' 'heavy' 'thick',
1992          description "The carpet is quite plush.";
1993   
1994  Scenic  -> "curtains"
1995    with  name 'curtain' 'curtains' 'heavy' 'thick',
1996          description "They seem to absorb sound very well.",
1997          before [;
1998            Take:
1999              "Now don't go ripping up the place!";
2000            LookUnder, Search:
2001              "You don't find anything exciting behind the curtains.";
2002          ];
2003   
2004  Scenic  -> "moss"
2005    with  name 'moss' 'typical' 'everyday',
2006          description "It just looks like your typical, everyday moss.",
2007          before [;
2008            Take:
2009              "It crumbles to nothing in your hands.";
2010          ],
2011    has   edible;
2012   
2013  Object  -> velvet_pillow "velvet pillow"
2014    with  name 'pillow' 'velvet' 'small',
2015          description "It's just a small velvet pillow.",
2016          initial "A small velvet pillow lies on the floor.";
2017   
2018  ! ------------------------------------------------------------------------------
2019   
2020  Room    In_Oriental_Room "Oriental Room"
2021    with  name 'oriental' 'room',
2022          description
2023              "This is the oriental room.
2024               Ancient oriental cave drawings cover the walls.
2025               A gently sloping passage leads upward to the north, another passage leads se,
2026               and a hands and knees crawl leads west.",
2027          w_to In_Large_Low_Room,
2028          se_to In_Swiss_Cheese_Room,
2029          u_to In_Misty_Cavern,
2030          n_to In_Misty_Cavern;
2031   
2032  Scenic  -> "ancient oriental drawings"
2033    with  name 'paintings' 'drawings' 'art' 'cave' 'ancient' 'oriental',
2034          description "They seem to depict people and animals.",
2035    has   multitude;
2036   
2037  Treasure -> ming_vase "ming vase"
2038    with  name 'vase' 'ming' 'delicate',
2039          description "It's a delicate, precious, ming vase!",
2040          after [;
2041            Drop:
2042              if (velvet_pillow in location) {
2043                  print "(coming to rest, delicately, on the velvet pillow)^";
2044                  rfalse;
2045              }
2046              remove ming_vase;
2047              move shards to location;
2048              "The ming vase drops with a delicate crash.";
2049          ],
2050          before [;
2051            Attack:
2052              remove ming_vase;
2053              move shards to location;
2054              "You have taken the vase and
2055              hurled it delicately to the ground.";
2056            Receive:
2057              "The vase is too fragile to use as a container.";
2058          ],
2059          depositpoints 14;
2060   
2061  Object  shards "some worthless shards of pottery"
2062    with  name 'pottery' 'shards' 'remains' 'vase' 'worthless',
2063          description
2064              "They look to be the remains of what was once a beautiful vase.
2065               I guess some oaf must have dropped it.",
2066          initial "The floor is littered with worthless shards of pottery.",
2067    has   multitude;
2068   
2069  ! ------------------------------------------------------------------------------
2070   
2071  Room    In_Misty_Cavern "Misty Cavern"
2072    with  name 'misty' 'cavern',
2073          description
2074              "You are following a wide path around the outer edge of a large cavern.
2075               Far below, through a heavy white mist, strange splashing noises can be heard.
2076               The mist rises up through a fissure in the ceiling.
2077               The path exits to the south and west.",
2078          s_to In_Oriental_Room,
2079          w_to In_Alcove;
2080   
2081  Scenic  -> "fissure"
2082    with  name 'fissure' 'ceiling',
2083          description "You can't really get close enough to examine it.";
2084   
2085  ! ------------------------------------------------------------------------------
2086  !   Plovers and pyramids
2087  ! ------------------------------------------------------------------------------
2088   
2089  Room    In_Alcove "Alcove"
2090    with  name 'alcove',
2091          description
2092              "You are in an alcove.
2093               A small northwest path seems to widen after a short distance.
2094               An extremely tight tunnel leads east.
2095               It looks like a very tight squeeze.
2096               An eerie light can be seen at the other end.",
2097          nw_to In_Misty_Cavern,
2098          e_to [ j;
2099              j = children(player);
2100              if (j == 0 || (j == 1 && egg_sized_emerald in player))
2101                  return In_Plover_Room;
2102              "Something you're carrying won't fit through the tunnel with you.
2103               You'd best take inventory and drop something.";
2104          ];
2105   
2106  ! ------------------------------------------------------------------------------
2107   
2108  Room    In_Plover_Room "Plover Room"
2109    with  name 'plover' 'room',
2110          description
2111              "You're in a small chamber lit by an eerie green light.
2112               An extremely narrow tunnel exits to the west.
2113               A dark corridor leads northeast.",
2114          ne_to In_Dark_Room,
2115          w_to [ j;
2116              j = children(player);
2117              if (j == 0 || (j == 1 && egg_sized_emerald in player))
2118                  return In_Alcove;
2119              "Something you're carrying won't fit through the tunnel with you.
2120               You'd best take inventory and drop something.";
2121          ],
2122          before [;
2123            Plover:
2124              if (egg_sized_emerald in player) {
2125                  move egg_sized_emerald to In_Plover_Room;
2126                  score = score - 5;
2127              }
2128              PlayerTo(At_Y2);
2129              rtrue;
2130            Go:
2131              if (noun == out_obj)
2132                  <<Go w_obj>>;
2133          ],
2134    has   light;
2135   
2136  Treasure -> egg_sized_emerald "emerald the size of a plover's egg"
2137    with  name 'emerald' 'egg-sized' 'egg' 'sized' 'plover^s',
2138          article "an",
2139          description "Plover's eggs, by the way, are quite large.",
2140          initial "There is an emerald here the size of a plover's egg!",
2141          depositpoints 14;
2142   
2143  ! ------------------------------------------------------------------------------
2144   
2145  Room    In_Dark_Room "The Dark Room"
2146    with  name 'dark' 'room',
2147          description
2148              "You're in the dark-room. A corridor leading south is the only exit.",
2149          s_to In_Plover_Room,
2150    has   nodwarf;
2151   
2152  Object  -> "stone tablet"
2153    with  name 'tablet' 'massive' 'stone',
2154          initial
2155  		    "A massive stone tablet imbedded in the wall reads:
2156  		     ~Congratulations on bringing light into the dark-room!~",
2157    has   static;
2158   
2159  Treasure -> "platinum pyramid"
2160    with  name 'platinum' 'pyramid' 'platinum' 'pyramidal',
2161          description "The platinum pyramid is 8 inches on a side!",
2162          initial "There is a platinum pyramid here, 8 inches on a side!",
2163          depositpoints 14;
2164   
2165  ! ------------------------------------------------------------------------------
2166  !   North of the complex junction: a long up-down corridor
2167  ! ------------------------------------------------------------------------------
2168   
2169  Room    In_Arched_Hall "Arched Hall"
2170    with  name 'arched' 'hall',
2171          description
2172              "You are in an arched hall.
2173               A coral passage once continued up and east from here, but is now blocked by debris.
2174               The air smells of sea water.",
2175          d_to In_Shell_Room;
2176   
2177  ! ------------------------------------------------------------------------------
2178   
2179  Room    In_Shell_Room "Shell Room"
2180    with  name 'shell' 'room',
2181          description
2182              "You're in a large room carved out of sedimentary rock.
2183               The floor and walls are littered with bits of shells imbedded in the stone.
2184               A shallow passage proceeds downward, and a somewhat steeper one leads up.
2185               A low hands and knees passage enters from the south.",
2186          u_to In_Arched_Hall,
2187          d_to In_Ragged_Corridor,
2188          s_to [;
2189              if (giant_bivalve in player) {
2190                  if (giant_bivalve has open)
2191                      "You can't fit this five-foot oyster through that little passage!";
2192                  else
2193                      "You can't fit this five-foot clam through that little passage!";
2194              }
2195              return At_Complex_Junction;
2196          ];
2197   
2198  Object  -> giant_bivalve "giant clam"
2199    with  name 'giant' 'clam' 'oyster' 'bivalve',
2200          describe [;
2201              if (self.has_been_opened)
2202                  "There is an enormous oyster here with its shell tightly closed.";
2203              "There is an enormous clam here with its shell tightly closed.";
2204          ],
2205          before [;
2206            Examine:
2207              if (location == At_Ne_End or At_Sw_End)
2208                  "Interesting.
2209                   There seems to be something written on the underside of the oyster:
2210                   ^^
2211                   ~There is something strange about this place,
2212                   such that one of the curses I've always known now has a new effect.~";
2213              "A giant bivalve of some kind.";
2214            Open:
2215              "You aren't strong enough to open the clam with your bare hands.";
2216            Unlock:
2217              if (second ~= trident)
2218                  print_ret (The) second, " isn't strong enough to open the clam.";
2219              if (self.has_been_opened)
2220                  "The oyster creaks open, revealing nothing but oyster inside.
2221                   It promptly snaps shut again.";
2222              self.has_been_opened = true;
2223              move pearl to In_A_Cul_De_Sac;
2224              "A glistening pearl falls out of the clam and rolls away.
2225               Goodness, this must really be an oyster.
2226               (I never was very good at identifying bivalves.)
2227               Whatever it is, it has now snapped shut again.";
2228            Attack:
2229              "The shell is very strong and is impervious to attack.";
2230          ],
2231          has_been_opened false;
2232   
2233  Treasure pearl "glistening pearl"
2234    with  name 'pearl' 'glistening' 'incredible' 'incredibly' 'large',
2235          description "It's incredibly large!",
2236          initial "Off to one side lies a glistening pearl!",
2237          depositpoints 14;
2238   
2239  ! ------------------------------------------------------------------------------
2240   
2241  Room    In_Ragged_Corridor "Ragged Corridor"
2242    with  name 'ragged' 'corridor',
2243          description "You are in a long sloping corridor with ragged sharp walls.",
2244          u_to In_Shell_Room,
2245          d_to In_A_Cul_De_Sac;
2246   
2247  Room    In_A_Cul_De_Sac "Cul-de-Sac"
2248    with  name 'cul-de-sac' 'cul' 'de' 'sac',
2249          description "You are in a cul-de-sac about eight feet across.",
2250          u_to In_Ragged_Corridor,
2251          out_to In_Ragged_Corridor;
2252   
2253  ! ------------------------------------------------------------------------------
2254  !   Witt's End: Cave under construction
2255  ! ------------------------------------------------------------------------------
2256   
2257  Room    In_Anteroom "In Anteroom"
2258    with  name 'anteroom',
2259          description
2260              "You are in an anteroom leading to a large passage to the east.
2261               Small passages go west and up.
2262               The remnants of recent digging are evident.",
2263          u_to At_Complex_Junction,
2264          w_to In_Bedquilt,
2265          e_to At_Witts_End;
2266   
2267  Object  -> "sign"
2268    with  name 'sign' 'witt' 'company' 'construction',
2269          initial
2270              "A sign in midair here says ~Cave under construction beyond this point.
2271               Proceed at own risk. [Witt Construction Company]~",
2272          before [;
2273            Take:
2274              "It's hanging way above your head.";
2275          ],
2276    has   static;
2277   
2278  Object  -> "recent issues of ~Spelunker Today~"
2279    with  name 'magazines' 'magazine' 'issue' 'issues' 'spelunker' 'today',
2280          article "a few",
2281          description "I'm afraid the magazines are written in Dwarvish.",
2282          initial "There are a few recent issues of ~Spelunker Today~ magazine here.",
2283          after [;
2284            Take:
2285              if (location == At_Witts_End) score--;
2286            Drop:
2287              if (location == At_Witts_End) {
2288                  score++;
2289                  "You really are at wit's end.";
2290              }
2291          ],
2292    has   multitude;
2293   
2294  ! ------------------------------------------------------------------------------
2295   
2296  Room    At_Witts_End "At Witt's End"
2297    with  name 'witt^s' 'witts' 'end',
2298          description
2299              "You are at Witt's End. Passages lead off in *all* directions.",
2300          w_to
2301              "You have crawled around in some little holes
2302               and found your way blocked by a recent cave-in.
2303               You are now back in the main passage.",
2304          before [;
2305            Go:
2306              if (noun ~= w_obj && random(100) <= 95)
2307                  "You have crawled around in some little holes and wound up
2308                   back in the main passage.";
2309              PlayerTo(In_Anteroom);
2310              rtrue;
2311          ];
2312   
2313  ! ------------------------------------------------------------------------------
2314  !   North of the secret canyons, on the other side of the pit
2315  ! ------------------------------------------------------------------------------
2316   
2317  Room    In_Mirror_Canyon "In Mirror Canyon"
2318    with  name 'mirror' 'canyon',
2319          description
2320              "You are in a north/south canyon about 25 feet across.
2321               The floor is covered by white mist seeping in from the north.
2322               The walls extend upward for well over 100 feet.
2323               Suspended from some unseen point far above you,
2324               an enormous two-sided mirror is hanging parallel to and midway between the canyon walls.
2325               ^^
2326               A small window can be seen in either wall, some fifty feet up.",
2327          s_to In_Secret_N_S_Canyon_0,
2328          n_to At_Reservoir;
2329   
2330  Object  -> "suspended mirror"
2331    with  name 'mirror' 'massive' 'enormous' 'hanging' 'suspended' 'dwarves^'
2332               'two-sided' 'two' 'sided',
2333          description
2334              "The mirror is obviously provided for the use of the dwarves who,
2335               as you know, are extremely vain.",
2336          initial
2337              "The mirror is obviously provided for the use of the dwarves,
2338               who as you know, are extremely vain.",
2339          before [;
2340            Attack, Remove:
2341              "You can't reach it from here.";
2342          ],
2343    has   static;
2344   
2345  ! ------------------------------------------------------------------------------
2346   
2347  Room    At_Window_On_Pit_2 "At Window on Pit"
2348    with  name 'window' 'on' 'pit' 'west' 'w//',
2349          description
2350              "You're at a low window overlooking a huge pit, which extends up out of sight.
2351               A floor is indistinctly visible over 50 feet below.
2352               Traces of white mist cover the floor of the pit, becoming thicker to the left.
2353               Marks in the dust around the window would seem to indicate that someone has been here recently.
2354               Directly across the pit from you and 25 feet away
2355               there is a similar window looking into a lighted room.
2356               A shadowy figure can be seen there peering back at you.",
2357          w_to At_Junction_Of_Three,
2358          cant_go "The only passage is back west to the junction.",
2359          before [;
2360            Jump:
2361              deadflag = 1;
2362              "You jump and break your neck!";
2363            WaveHands:
2364              "The shadowy figure waves back at you!";
2365          ];
2366   
2367  ! ------------------------------------------------------------------------------
2368   
2369  Room    At_Reservoir "At Reservoir"
2370    with  name 'reservoir',
2371          description
2372              "You are at the edge of a large underground reservoir.
2373               An opaque cloud of white mist fills the room and rises rapidly upward.
2374               The lake is fed by a stream, which tumbles out of a hole in the wall about 10 feet overhead
2375               and splashes noisily into the water somewhere within the mist.
2376               The only passage goes back toward the south.",
2377          s_to In_Mirror_Canyon,
2378          out_to In_Mirror_Canyon,
2379          before [;
2380            Swim:
2381              "The water is icy cold, and you would soon freeze to death.";
2382          ];
2383   
2384  ! ------------------------------------------------------------------------------
2385  !   The Chasm and the Troll Bridge
2386  ! ------------------------------------------------------------------------------
2387   
2388  Room    In_Sloping_Corridor "Sloping Corridor"
2389    with  name 'sloping' 'corridor',
2390          description
2391              "You are in a long winding corridor sloping out of sight in both directions.",
2392          d_to In_Large_Low_Room,
2393          u_to On_Sw_Side_Of_Chasm,
2394          cant_go "The corridor slopes steeply up and down.";
2395   
2396  Room    On_Sw_Side_Of_Chasm "On SW Side of Chasm"
2397    with  name 'southwest' 'sw' 'side' 'of' 'chasm',
2398          description
2399              "You are on one side of a large, deep chasm.
2400               A heavy white mist rising up from below obscures all view of the far side.
2401               A southwest path leads away from the chasm into a winding corridor.",
2402          ne_to CrossRicketyBridge,
2403          sw_to In_Sloping_Corridor,
2404          d_to In_Sloping_Corridor,
2405          cant_go "The path winds southwest.",
2406          before [;
2407            Jump:
2408              if (RicketyBridge in self)
2409                  "I respectfully suggest you go across the bridge instead of jumping.";
2410              deadflag = 1;
2411              "You didn't make it.";
2412          ];
2413   
2414  [ CrossRicketyBridge;
2415      if (Troll.has_caught_treasure || Troll in nothing) {
2416          Troll.has_caught_treasure = false;
2417          if (Bear.is_following_you) {
2418              remove Bear;
2419              remove self;
2420              give Wreckage ~absent;
2421              remove RicketyBridge;
2422              give RicketyBridge absent;
2423              StopDaemon(Bear);
2424              deadflag = 1;
2425              "Just as you reach the other side, the bridge buckles beneath the weight of the bear,
2426               which was still following you around.
2427               You scrabble desperately for support,
2428               but as the bridge collapses you stumble back and fall into the chasm.";
2429          }
2430          return RicketyBridge;
2431      }
2432      if (Troll in location) "The troll refuses to let you cross.";
2433      move Troll to location;
2434      "The troll steps out from beneath the bridge and blocks your way.";
2435  ];
2436   
2437  Object  -> RicketyBridge "rickety bridge"
2438    with  name 'bridge' 'rickety' 'unstable' 'wobbly' 'rope',
2439          description "It just looks like an ordinary, but unstable, bridge.",
2440          describe [;
2441              print
2442                  "A rickety wooden bridge extends across the chasm, vanishing into the mist.
2443                   ^^
2444                   A sign posted on the bridge reads, ~Stop! Pay troll!~^";
2445              if (Troll notin location)
2446                  "The troll is nowhere to be seen.";
2447              rtrue;
2448          ],
2449          door_dir [;
2450              if (location == On_Sw_Side_Of_Chasm) return ne_to;
2451              return sw_to;
2452          ],
2453          door_to [;
2454              if (location == On_Sw_Side_Of_Chasm) return On_Ne_Side_Of_Chasm;
2455              return On_Sw_Side_Of_Chasm;
2456          ],
2457          found_in On_Sw_Side_Of_Chasm On_Ne_Side_Of_Chasm,
2458    has   static door open;
2459   
2460  Object  -> -> Troll "burly troll"
2461    with  name 'troll' 'burly',
2462          description
2463              "Trolls are close relatives with rocks and have skin as tough as that of a rhinoceros.",
2464          initial
2465              "A burly troll stands by the bridge
2466               and insists you throw him a treasure before you may cross.",
2467          life [;
2468            Attack:
2469              "The troll laughs aloud at your pitiful attempt to injure him.";
2470            ThrowAt, Give:
2471              if (noun ofclass Treasure) {
2472                  remove noun;
2473                  move self to RicketyBridge;
2474                  self.has_caught_treasure = true;
2475                  score = score - 5;
2476                  "The troll catches your treasure and scurries away out of sight.";
2477              }
2478              if (noun == tasty_food)
2479                  "Gluttony is not one of the troll's vices. Avarice, however, is.";
2480              "The troll deftly catches ", (the) noun,
2481                  ", examines it carefully, and tosses it back, declaring,
2482                  ~Good workmanship, but it's not valuable enough.~";
2483            Order:
2484              "You'll be lucky.";
2485            Answer, Ask:
2486              "Trolls make poor conversation.";
2487          ],
2488          has_caught_treasure false,
2489    has   animate;
2490   
2491  Object  Wreckage "wreckage of bridge"
2492    with  name 'wreckage' 'wreck' 'bridge' 'dead' 'bear',
2493          initial
2494              "The wreckage of the troll bridge (and a dead bear)
2495               can be seen at the bottom of the chasm.",
2496          before [;
2497              "The wreckage is too far below.";
2498          ],
2499          found_in On_Sw_Side_Of_Chasm On_Ne_Side_Of_Chasm,
2500    has   static absent;
2501   
2502  ! ------------------------------------------------------------------------------
2503   
2504  Room    On_Ne_Side_Of_Chasm "On NE Side of Chasm"
2505    with  name 'northeast' 'ne' 'side' 'of' 'chasm',
2506          description
2507              "You are on the far side of the chasm.
2508               A northeast path leads away from the chasm on this side.",
2509          sw_to CrossRicketyBridge,
2510          ne_to In_Corridor,
2511          before [;
2512            Jump:
2513              if (RicketyBridge in self)
2514                  "I respectfully suggest you go across the bridge instead of jumping.";
2515              deadflag = 1;
2516              "You didn't make it.";
2517          ],
2518    has   nodwarf;
2519   
2520  Room    In_Corridor "In Corridor"
2521    with  name 'corridor',
2522          description
2523              "You're in a long east/west corridor.
2524               A faint rumbling noise can be heard in the distance.",
2525          w_to On_Ne_Side_Of_Chasm,
2526          e_to At_Fork_In_Path,
2527    has   nodwarf;
2528   
2529  ! ------------------------------------------------------------------------------
2530  !   The Volcano
2531  ! ------------------------------------------------------------------------------
2532   
2533  Room    At_Fork_In_Path "At Fork in Path"
2534    with  name 'fork' 'in' 'path',
2535          description
2536              "The path forks here. The left fork leads northeast.
2537               A dull rumbling seems to get louder in that direction.
2538               The right fork leads southeast down a gentle slope.
2539               The main corridor enters from the west.",
2540          w_to In_Corridor,
2541          ne_to At_Junction_With_Warm_Walls,
2542          se_to In_Limestone_Passage,
2543          d_to In_Limestone_Passage,
2544    has   nodwarf;
2545   
2546  ! ------------------------------------------------------------------------------
2547   
2548  Room    At_Junction_With_Warm_Walls "At Junction With Warm Walls"
2549    with  name 'junction' 'with' 'warm' 'walls',
2550          description
2551              "The walls are quite warm here.
2552               From the north can be heard a steady roar,
2553               so loud that the entire cave seems to be trembling.
2554               Another passage leads south, and a low crawl goes east.",
2555          s_to At_Fork_In_Path,
2556          n_to At_Breath_Taking_View,
2557          e_to In_Chamber_Of_Boulders,
2558    has   nodwarf;
2559   
2560  ! ------------------------------------------------------------------------------
2561   
2562  Room    At_Breath_Taking_View "At Breath-Taking View"
2563    with  name 'breath-taking' 'breathtaking' 'breath' 'taking' 'view',
2564          description
2565              "You are on the edge of a breath-taking view.
2566               Far below you is an active volcano, from which great gouts of molten lava come surging  out,
2567               cascading back down into the depths.
2568               The glowing rock fills the farthest reaches of the cavern with a blood-red glare,
2569               giving everything an eerie, macabre appearance.
2570               The air is filled with flickering sparks of ash and a heavy smell of brimstone.
2571               The walls are hot to the touch,
2572               and the thundering of the volcano drowns out all other sounds.
2573               Embedded in the jagged roof far overhead
2574               are myriad twisted formations composed of pure white alabaster,
2575               which scatter the murky light into sinister apparitions upon the walls.
2576               To one side is a deep gorge, filled with a bizarre chaos of tortured rock
2577               which seems to have been crafted by the devil himself.
2578               An immense river of fire crashes out from the depths of the volcano,
2579               burns its way through the gorge, and plummets into a bottomless pit far off to your left.
2580               To the right, an immense geyser of blistering steam erupts continuously
2581               from a barren island in the center of a sulfurous lake, which bubbles ominously.
2582               The far right wall is aflame with an incandescence of its own,
2583               which lends an additional infernal splendor to the already hellish scene.
2584               A dark, forboding passage exits to the south.",
2585          s_to At_Junction_With_Warm_Walls,
2586          out_to At_Junction_With_Warm_Walls,
2587          d_to "Don't be ridiculous!",
2588          before [;
2589            Jump:
2590              <<Go d_obj>>;
2591          ],
2592    has   light;
2593   
2594  Scenic  -> "active volcano"
2595    with  name 'volcano' 'rock' 'active' 'glowing' 'blood' 'blood-red' 'red'
2596               'eerie' 'macabre',
2597          description
2598              "Great gouts of molten lava come surging out of the volcano
2599               and go cascading back down into the depths.
2600               The glowing rock fills the farthest reaches of the cavern with a blood-red glare,
2601               giving everything an eerie, macabre appearance.";
2602   
2603  Scenic  -> "sparks of ash"
2604    with  name 'spark' 'sparks' 'ash' 'air' 'flickering',
2605          description
2606              "The sparks too far away for you to get a good look at them.",
2607    has   multitude;
2608   
2609  Scenic  -> "jagged roof"
2610    with  name 'roof' 'formations' 'light' 'apparaitions' 'jagged' 'twsited'
2611               'murky' 'sinister',
2612          description
2613              "Embedded in the jagged roof far overhead are myriad twisted formations
2614               composed of pure white alabaster,
2615               which scatter the murky light into sinister apparitions upon the walls.";
2616   
2617  Scenic  -> "deep gorge"
2618    with  name 'gorge' 'chaos' 'rock' 'deep' 'bizarre' 'tortured',
2619          description
2620              "The gorge is filled with a bizarre chaos of tortured rock
2621               which seems to have been crafted by the devil himself.";
2622   
2623  Scenic  -> "river of fire"
2624    with  name 'river' 'fire' 'depth' 'pit' 'fire' 'fiery' 'bottomless',
2625          description
2626              "The river of fire crashes out from the depths of the volcano,
2627               burns its way through the gorge, and plummets into a bottomless pit far off to your left.";
2628   
2629  Scenic  -> "immense geyser"
2630    with  name 'geyser' 'steam' 'island' 'lake' 'immense' 'blistering' 'barren'
2631               'sulfrous' 'sulferous' 'sulpherous' 'sulphrous' 'bubbling',
2632          description
2633              "The geyser of blistering steam erupts continuously from a barren island
2634               in the center of a sulfurous lake, which bubbles ominously.";
2635   
2636  ! ------------------------------------------------------------------------------
2637   
2638  Room    In_Chamber_Of_Boulders "In Chamber of Boulders"
2639    with  name 'chamber' 'of' 'boulders',
2640          description
2641              "You are in a small chamber filled with large boulders.
2642               The walls are very warm, causing the air in the room to be almost stifling from the heat.
2643               The only exit is a crawl heading west, through which is coming a low rumbling.",
2644          w_to At_Junction_With_Warm_Walls,
2645          out_to At_Junction_With_Warm_Walls,
2646    has   nodwarf;
2647   
2648  Scenic  -> "boulders"
2649    with  name 'boulder' 'boulders' 'rocks' 'stones',
2650          description "They're just ordinary boulders. They're warm.",
2651          before [;
2652            LookUnder, Push, Pull:
2653              "You'd have to blast them aside.";
2654          ],
2655    has   multitude;
2656   
2657  Treasure -> "rare spices"
2658    with  name 'spices' 'spice' 'rare' 'exotic',
2659          article "a selection of",
2660          before [;
2661            Smell, Examine:
2662              "They smell wonderfully exotic!";
2663          ],
2664          depositpoints 14,
2665    has   multitude;
2666   
2667  ! ------------------------------------------------------------------------------
2668   
2669  Room    In_Limestone_Passage "In Limestone Passage"
2670    with  name 'limestone' 'passage',
2671          description
2672              "You are walking along a gently sloping north/south passage
2673               lined with oddly shaped limestone formations.",
2674          n_to At_Fork_In_Path,
2675          u_to At_Fork_In_Path,
2676          s_to In_Front_Of_Barren_Room,
2677          d_to In_Front_Of_Barren_Room,
2678    has   nodwarf;
2679   
2680  Scenic  -> "limestone formations"
2681    with  name 'formations' 'shape' 'shapes' 'lime' 'limestone' 'stone' 'oddly'
2682               'shaped' 'oddly-shaped',
2683          description
2684              "Every now and then a particularly strange shape catches your eye.",
2685    has   multitude;
2686   
2687  ! ------------------------------------------------------------------------------
2688  !   If you go down to the woods today...
2689  ! ------------------------------------------------------------------------------
2690   
2691  Room    In_Front_Of_Barren_Room "In Front of Barren Room"
2692    with  name 'front' 'of' 'entrance' 'to' 'barren' 'room',
2693          description
2694              "You are standing at the entrance to a large, barren room.
2695               A sign posted above the entrance reads: ~Caution! Bear in room!~",
2696          w_to In_Limestone_Passage,
2697          u_to In_Limestone_Passage,
2698          e_to In_Barren_Room,
2699          in_to In_Barren_Room,
2700    has   nodwarf;
2701   
2702  Scenic  -> "caution sign"
2703    with  name 'sign' 'barren' 'room' 'caution',
2704          description "The sign reads, ~Caution! Bear in room!~";
2705   
2706  ! ------------------------------------------------------------------------------
2707   
2708  Room    In_Barren_Room "In Barren Room"
2709    with  name 'in' 'barren' 'room',
2710          description
2711              "You are inside a barren room.
2712               The center of the room is completely empty except for some dust.
2713               Marks in the dust lead away toward the far end of the room.
2714               The only exit is the way you came in.",
2715          w_to In_Front_Of_Barren_Room,
2716          out_to In_Front_Of_Barren_Room,
2717    has   nodwarf;
2718   
2719  Scenic  -> "dust"
2720    with  name 'dust' 'marks',
2721          description "It just looks like ordinary dust.";
2722   
2723  Object  -> Bear "large cave bear"
2724    with  name 'bear' 'large' 'tame' 'ferocious' 'cave',
2725          describe [;
2726              if (self.is_following_you)
2727                  "You are being followed by a very large, tame bear.";
2728              if (self.is_friendly == false)
2729                  "There is a ferocious cave bear eyeing you from the far end of the room!";
2730              if (location == In_Barren_Room)
2731                  "There is a gentle cave bear sitting placidly in one corner.";
2732              "There is a contented-looking bear wandering about nearby.";
2733          ],
2734          life [;
2735            Attack:
2736              if (axe in player) <<ThrowAt axe self>>;
2737              if (self.is_friendly)
2738                  "The bear is confused; he only wants to be your friend.";
2739              "With what? Your bare hands? Against *his* bear hands??";
2740            ThrowAt:
2741              if (noun ~= axe) <<Give noun self>>;
2742              if (self.is_friendly)
2743                  "The bear is confused; he only wants to be your friend.";
2744              move axe to location;
2745              axe.is_near_bear = true;
2746              "The axe misses and lands near the bear where you can't get at it.";
2747            Give:
2748              if (noun == tasty_food) {
2749                  axe.is_near_bear = false;
2750                  remove tasty_food;
2751                  self.is_friendly = true;
2752                  "The bear eagerly wolfs down your food, after which he seems to calm down considerably
2753                   and even becomes rather friendly.";
2754              }
2755              if (self.is_friendly)
2756                  "The bear doesn't seem very interested in your offer.";
2757              "Uh-oh -- your offer only makes the bear angrier!";
2758            Order, Ask, Answer:
2759              "This is a Bear of very little brain.";
2760          ],
2761          before [;
2762            Examine:
2763              print "The bear is extremely large, ";
2764              if (self.is_friendly) "but appears to be friendly.";
2765              "and seems quite ferocious!";
2766            Take, Catch:
2767              if (self.is_friendly == false) "Surely you're joking!";
2768              if (golden_chain has locked)
2769                  "The bear is still chained to the wall.";
2770              self.is_following_you = true;
2771              StartDaemon(self);
2772              "Ok, the bear's now following you around.";
2773            Drop, Release:
2774              if (self.is_following_you == false) "What?";
2775              self.is_following_you = false;
2776              StopDaemon(self);
2777              if (Troll in location) {
2778                  remove Troll;
2779                  "The bear lumbers toward the troll, who lets out a startled shriek and scurries away.
2780                   The bear soon gives up the pursuit and wanders back.";
2781              }
2782              "The bear wanders away from you.";
2783          ],
2784          daemon [;
2785              if (location == thedark) rfalse;
2786              if (self in location) {
2787                  if (location == At_Breath_Taking_View)
2788                      "^The bear roars with delight.";
2789                  rfalse;
2790              }
2791              move self to location;
2792              "^The bear lumbers along behind you.";
2793          ],
2794          is_following_you false,
2795          is_friendly false,
2796    has   animate;
2797   
2798  Treasure -> golden_chain "golden chain"
2799    with  name 'chain' 'links' 'shackles' 'solid' 'gold' 'golden' 'thick' 'chains',
2800          description "The chain has thick links of solid gold!",
2801          describe [;
2802              if (self has locked)
2803                  "The bear is held back by a solid gold chain.";
2804              "A solid golden chain lies in coils on the ground!";
2805          ],
2806          with_key set_of_keys,
2807          before [;
2808            Take:
2809              if (self has locked) {
2810                  if (Bear.is_friendly) "It's locked to the friendly bear.";
2811                  "It's locked to the ferocious bear!";
2812              }
2813            Unlock:
2814              if (Bear.is_friendly == false)
2815                  "There is no way to get past the bear to unlock the chain,
2816                   which is probably just as well.";
2817            Lock:
2818              if (self hasnt locked) "The mechanism won't lock again.";
2819          ],
2820          after [;
2821            Unlock:
2822              "You unlock the chain, and set the tame bear free.";
2823          ],
2824          depositpoints 14,
2825    has   lockable locked;
2826   
2827  ! ------------------------------------------------------------------------------
2828  !   The Different Maze
2829  ! ------------------------------------------------------------------------------
2830   
2831  Class   DiffmazeRoom
2832    with  short_name "Maze";
2833   
2834  DiffmazeRoom Different_Maze_1
2835    with  description "You are in a maze of twisty little passages, all different.",
2836          s_to Different_Maze_3,
2837          sw_to Different_Maze_4,
2838          ne_to Different_Maze_5,
2839          se_to Different_Maze_6,
2840          u_to Different_Maze_7,
2841          nw_to Different_Maze_8,
2842          e_to Different_Maze_9,
2843          w_to Different_Maze_10,
2844          n_to Different_Maze_11,
2845          d_to At_West_End_Of_Long_Hall;
2846   
2847  DiffmazeRoom Different_Maze_2
2848    with  description "You are in a little maze of twisting passages, all different.",
2849          sw_to Different_Maze_3,
2850          n_to Different_Maze_4,
2851          e_to Different_Maze_5,
2852          nw_to Different_Maze_6,
2853          se_to Different_Maze_7,
2854          ne_to Different_Maze_8,
2855          w_to Different_Maze_9,
2856          d_to Different_Maze_10,
2857          u_to Different_Maze_11,
2858          s_to Dead_End_14;
2859   
2860  DiffmazeRoom Different_Maze_3
2861    with  description "You are in a maze of twisting little passages, all different.",
2862          w_to Different_Maze_1,
2863          se_to Different_Maze_4,
2864          nw_to Different_Maze_5,
2865          sw_to Different_Maze_6,
2866          ne_to Different_Maze_7,
2867          u_to Different_Maze_8,
2868          d_to Different_Maze_9,
2869          n_to Different_Maze_10,
2870          s_to Different_Maze_11,
2871          e_to Different_Maze_2;
2872   
2873  DiffmazeRoom Different_Maze_4
2874    with  description "You are in a little maze of twisty passages, all different.",
2875          nw_to Different_Maze_1,
2876          u_to Different_Maze_3,
2877          n_to Different_Maze_5,
2878          s_to Different_Maze_6,
2879          w_to Different_Maze_7,
2880          sw_to Different_Maze_8,
2881          ne_to Different_Maze_9,
2882          e_to Different_Maze_10,
2883          d_to Different_Maze_11,
2884          se_to Different_Maze_2;
2885   
2886  DiffmazeRoom Different_Maze_5
2887    with  description "You are in a twisting maze of little passages, all different.",
2888          u_to Different_Maze_1,
2889          d_to Different_Maze_3,
2890          w_to Different_Maze_4,
2891          ne_to Different_Maze_6,
2892          sw_to Different_Maze_7,
2893          e_to Different_Maze_8,
2894          n_to Different_Maze_9,
2895          nw_to Different_Maze_10,
2896          se_to Different_Maze_11,
2897          s_to Different_Maze_2;
2898   
2899  DiffmazeRoom Different_Maze_6
2900    with  description "You are in a twisting little maze of passages, all different.",
2901          ne_to Different_Maze_1,
2902          n_to Different_Maze_3,
2903          nw_to Different_Maze_4,
2904          se_to Different_Maze_5,
2905          e_to Different_Maze_7,
2906          d_to Different_Maze_8,
2907          s_to Different_Maze_9,
2908          u_to Different_Maze_10,
2909          w_to Different_Maze_11,
2910          sw_to Different_Maze_2;
2911   
2912  DiffmazeRoom Different_Maze_7
2913    with  description "You are in a twisty little maze of passages, all different.",
2914          n_to Different_Maze_1,
2915          se_to Different_Maze_3,
2916          d_to Different_Maze_4,
2917          s_to Different_Maze_5,
2918          e_to Different_Maze_6,
2919          w_to Different_Maze_8,
2920          sw_to Different_Maze_9,
2921          ne_to Different_Maze_10,
2922          nw_to Different_Maze_11,
2923          u_to Different_Maze_2;
2924   
2925  DiffmazeRoom Different_Maze_8
2926    with  description "You are in a twisty maze of little passages, all different.",
2927          e_to Different_Maze_1,
2928          w_to Different_Maze_3,
2929          u_to Different_Maze_4,
2930          sw_to Different_Maze_5,
2931          d_to Different_Maze_6,
2932          s_to Different_Maze_7,
2933          nw_to Different_Maze_9,
2934          se_to Different_Maze_10,
2935          ne_to Different_Maze_11,
2936          n_to Different_Maze_2;
2937   
2938  DiffmazeRoom Different_Maze_9
2939    with  description "You are in a little twisty maze of passages, all different.",
2940          se_to Different_Maze_1,
2941          ne_to Different_Maze_3,
2942          s_to Different_Maze_4,
2943          d_to Different_Maze_5,
2944          u_to Different_Maze_6,
2945          nw_to Different_Maze_7,
2946          n_to Different_Maze_8,
2947          sw_to Different_Maze_10,
2948          e_to Different_Maze_11,
2949          w_to Different_Maze_2;
2950   
2951  DiffmazeRoom Different_Maze_10
2952    with  description "You are in a maze of little twisting passages, all different.",
2953          d_to Different_Maze_1,
2954          e_to Different_Maze_3,
2955          ne_to Different_Maze_4,
2956          u_to Different_Maze_5,
2957          w_to Different_Maze_6,
2958          n_to Different_Maze_7,
2959          s_to Different_Maze_8,
2960          se_to Different_Maze_9,
2961          sw_to Different_Maze_11,
2962          nw_to Different_Maze_2;
2963   
2964  DiffmazeRoom Different_Maze_11
2965    with  description "You are in a maze of little twisty passages, all different.",
2966          sw_to Different_Maze_1,
2967          nw_to Different_Maze_3,
2968          e_to Different_Maze_4,
2969          w_to Different_Maze_5,
2970          n_to Different_Maze_6,
2971          d_to Different_Maze_7,
2972          se_to Different_Maze_8,
2973          u_to Different_Maze_9,
2974          s_to Different_Maze_10,
2975          ne_to Different_Maze_2;
2976   
2977  ! ------------------------------------------------------------------------------
2978   
2979  DeadendRoom Dead_End_14
2980    class Room
2981    with  name 'dead' 'end' 'near' 'vending' 'machine',
2982          short_name "Dead End, near Vending Machine",
2983          description
2984              "You have reached a dead end. There is a massive vending machine here.
2985               ^^
2986               Hmmm... There is a message here scrawled in the dust in a flowery script.",
2987          n_to Different_Maze_2,
2988          out_to Different_Maze_2,
2989    has   nodwarf;
2990   
2991  Scenic  -> "message in the dust"
2992    with  name 'message' 'scrawl' 'writing' 'script' 'scrawled' 'flowery',
2993          description
2994              "The message reads, ~This is not the maze where the pirate leaves
2995               his treasure chest.~";
2996   
2997  Scenic  -> VendingMachine "vending machine"
2998    with  name 'machine' 'slot' 'vending' 'massive' 'battery' 'coin',
2999          description
3000              "The instructions on the vending machine read,
3001               ~Insert coins to receive fresh batteries.~",
3002          before [;
3003            Receive:
3004              if (noun == rare_coins) {
3005                  move fresh_batteries to location;
3006                  remove rare_coins;
3007                  "Soon after you insert the coins in the coin slot,
3008                   the vending machine makes a grinding sound, and a set of fresh batteries falls at your feet.";
3009              }
3010              "The machine seems to be designed to take coins.";
3011            Attack:
3012              "The machine is quite sturdy and survives your attack without getting so much as a scratch.";
3013            LookUnder:
3014              "You don't find anything under the machine.";
3015            Search:
3016              "You can't get inside the machine.";
3017            Take:
3018              "The vending machine is far too heavy to move.";
3019          ];
3020   
3021  Object  fresh_batteries "fresh batteries" VendingMachine
3022    with  name 'batteries' 'battery' 'fresh',
3023          description
3024              "They look like ordinary batteries. (A sepulchral voice says, ~Still going!~)",
3025          initial "There are fresh batteries here.",
3026          before [;
3027            Count:
3028              "A pair.";
3029          ],
3030          have_been_used false;
3031   
3032  Object  old_batteries "worn-out batteries"
3033    with  name 'batteries' 'battery' 'worn' 'out' 'worn-out',
3034          description "They look like ordinary batteries.",
3035          initial "Some worn-out batteries have been discarded nearby.",
3036          before [;
3037            Count:
3038              "A pair.";
3039          ];
3040   
3041  ! ------------------------------------------------------------------------------
3042  !   Dwarves!
3043  ! ------------------------------------------------------------------------------
3044   
3045  Object  dwarf "threatening little dwarf"
3046    with  name 'dwarf' 'threatening' 'nasty' 'little' 'mean',
3047          description
3048              "It's probably not a good idea to get too close.
3049               Suffice it to say the little guy's pretty aggressive.",
3050          initial "A threatening little dwarf hides in the shadows.",
3051          number 5,
3052          daemon [;
3053              if (location == thedark) return;
3054              if (self.number == 0) {
3055                  StopDaemon(self);
3056                  return;
3057              }
3058              if (parent(self) == nothing) {
3059                  if (location has nodwarf || location has light) return;
3060                  if (random(100) <= self.number) {
3061                      if (Bear in location || Troll in location) return;
3062                      new_line;
3063                      if (Dragon in location) {
3064                          self.number--;
3065                          "A dwarf appears, but with one casual blast the dragon vapourises him!";
3066                      }
3067                      move self to location;
3068                      "A threatening little dwarf comes out of the shadows!";
3069                  }
3070                  return;
3071              }
3072              if (parent(self) ~= location) {
3073                  if (location == thedark) return;
3074                  if (location has nodwarf || location has light) return;
3075                  if (random(100) <= 96 && parent(self) ~= In_Mirror_Canyon) {
3076                      move self to location;
3077                      print "^The dwarf stalks after you...^";
3078                  }
3079                  else {
3080                      remove self;
3081                      return;
3082                  }
3083              }
3084              if (random(100) <= 75) {
3085                  new_line;
3086                  if (self.has_thrown_axe == false) {
3087                      move axe to location;
3088                      self.has_thrown_axe = true;
3089                      remove self;
3090                      "The dwarf throws a nasty little axe at you, misses,
3091                       curses, and runs away.";
3092                  }
3093                  if (location == In_Mirror_Canyon)
3094                      "The dwarf admires himself in the mirror.";
3095                  print "The dwarf throws a nasty little knife at you, ";
3096                  if (random(1000) <= 95) {
3097                      deadflag = 1;
3098                      "and hits!";
3099                  }
3100                  "but misses!";
3101              }
3102              if (random(3) == 1) {
3103                  remove self;
3104                  "^Tiring of this, the dwarf slips away.";
3105              }
3106          ],
3107          before [;
3108            Kick:
3109              "You boot the dwarf across the room. He curses, then gets up and brushes himself off.
3110               Now he's madder than ever!";
3111          ],
3112          life [;
3113            ThrowAt:
3114              if (noun == axe) {
3115                  if (random(3) ~= 1) {
3116                      remove self;
3117                      move axe to location;
3118                      self.number--;
3119                      "You killed a little dwarf! The body vanishes in a cloud of greasy black smoke.";
3120                  }
3121                  move axe to location;
3122                  "Missed! The little dwarf dodges out of the way of the axe.";
3123              }
3124              <<Give noun second>>;
3125            Give:
3126              if (noun == tasty_food)
3127                  "You fool, dwarves eat only coal! Now you've made him *really* mad!";
3128              "The dwarf is not at all interested in your offer. (The reason being,
3129               perhaps, that if he kills you he gets everything you have anyway.)";
3130            Attack:
3131              "Not with your bare hands. No way.";
3132          ],
3133          has_thrown_axe false,
3134    has   animate;
3135   
3136  Object  axe "dwarvish axe"
3137    with  name 'axe' 'little' 'dwarvish' 'dwarven',
3138          description "It's just a little axe.",
3139          initial "There is a little axe here.",
3140          before [;
3141              if (~~self.is_near_bear) rfalse;
3142            Examine:
3143              "It's lying beside the bear.";
3144            Take:
3145              "No chance. It's lying beside the ferocious bear, quite within harm's way.";
3146          ],
3147          is_near_bear false;
3148   
3149  ! ------------------------------------------------------------------------------
3150  !   Two brushes with piracy
3151  ! ------------------------------------------------------------------------------
3152   
3153  Object  pirate
3154    with  daemon [ obj booty_nearby;
3155              if (random(100) > 2 || location == thedark or In_Secret_Canyon ||
3156                  location has light || location has nodwarf) return;
3157              if (dwarf in location)
3158                  "^A bearded pirate appears, catches sight of the dwarf and runs away.";
3159              objectloop (obj ofclass Treasure && obj in player or location)
3160                  booty_nearby = true;
3161              if (booty_nearby == false) {
3162                  if (self.has_been_spotted) return;
3163                  self.has_been_spotted = true;
3164                  if (self.has_stolen_something) StopDaemon(self);
3165                  "^There are faint rustling noises from the darkness behind you.
3166                   As you turn toward them, you spot a bearded pirate.
3167                   He is carrying a large chest.
3168                   ^^
3169                   ~Shiver me timbers!~ he cries, ~I've been spotted!
3170                   I'd best hie meself off to the maze to hide me chest!~
3171                   ^^
3172                   With that, he vanishes into the gloom.";
3173              }
3174              if (self.has_stolen_something) return;
3175              self.has_stolen_something = true;
3176              if (self.has_been_spotted) StopDaemon(self);
3177              objectloop (obj ofclass Treasure && obj in player or location) {
3178                  if (obj in player) score = score - 5;
3179                  move obj to Dead_End_13;
3180              }
3181              "^Out from the shadows behind you pounces a bearded pirate!
3182               ~Har, har,~ he chortles. ~I'll just take all this booty and hide it away
3183               with me chest deep in the maze!~
3184               He snatches your treasure and vanishes into the gloom.";
3185          ],
3186          has_stolen_something false,
3187          has_been_spotted false;
3188   
3189  ! ----------------------------------------------------------------------------
3190  !   The cave is closing now...
3191  ! ----------------------------------------------------------------------------
3192   
3193  Object  cave_closer
3194    with  daemon [;
3195              if (treasures_found < MAX_TREASURES) return;
3196              StopDaemon(self);
3197              caves_closed = true;
3198              score = score + 25;
3199              remove CrystalBridge;
3200              give Grate locked ~open;
3201              remove set_of_keys;
3202              StopDaemon(dwarf);
3203              StopDaemon(pirate);
3204              remove Troll;
3205              remove Bear;
3206              remove Dragon;
3207              StartTimer(endgame_timer, 25);
3208              "^A sepulchral voice reverberating through the cave says, ~Cave
3209               closing soon. All adventurers exit immediately through main office.~";
3210          ];
3211   
3212  Object  endgame_timer
3213    with  time_left 0,
3214          time_out [;
3215              score = score + 10;
3216              while (child(player)) remove child(player);
3217              move bottle to At_Ne_End;
3218              if (child(bottle)) remove child(bottle);
3219              move giant_bivalve to At_Ne_End;
3220              move brass_lantern to At_Ne_End;
3221              move black_rod to At_Ne_End;
3222              move little_bird to At_Sw_End;
3223              move velvet_pillow to At_Sw_End;
3224              print
3225                  "^The sepulchral voice intones, ~The cave is now closed.~
3226                   As the echoes fade, there is a blinding flash of light
3227                   (and a small puff of orange smoke). . .
3228                   ^^
3229                   As your eyes refocus, you look around...^";
3230              PlayerTo(At_Ne_End);
3231          ];
3232   
3233  ! ------------------------------------------------------------------------------
3234  !   The End Game
3235  ! ------------------------------------------------------------------------------
3236   
3237  Room    At_Ne_End "NE End of Repository"
3238    with  name 'northeast' 'ne' 'end' 'of' 'repository',
3239          description
3240              "You are at the northeast end of an immense room, even larger than the giant room.
3241               It appears to be a repository for the ~Adventure~ program.
3242               Massive torches far overhead bathe the room with smoky yellow light.
3243               Scattered about you can be seen a pile of bottles (all of them empty),
3244               a nursery of young beanstalks murmuring quietly, a bed of oysters,
3245               a bundle of black rods with rusty stars on their ends, and a collection of brass lanterns.
3246               Off to one side a great many dwarves are sleeping on the floor, snoring loudly.
3247               A sign nearby reads: ~Do not disturb the dwarves!~",
3248          sw_to At_Sw_End,
3249    has   light;
3250   
3251  Object  -> "enormous mirror"
3252    with  name 'mirror' 'enormous' 'huge' 'big' 'large' 'suspended' 'hanging'
3253               'vanity' 'dwarvish',
3254          description "It looks like an ordinary, albeit enormous, mirror.",
3255          initial
3256              "An immense mirror is hanging against one wall, and stretches to the other end of the room,
3257               where various other sundry objects can be glimpsed dimly in the distance.",
3258          before [;
3259            Attack:
3260              print
3261                  "You strike the mirror a resounding blow,
3262                   whereupon it shatters into a myriad tiny fragments.^^";
3263              SleepingDwarves.wake_up();
3264              rtrue;
3265          ],
3266          found_in At_Ne_End At_Sw_End,
3267    has   static;
3268   
3269  Scenic  -> "collection of adventure game materials"
3270    with  name 'stuff' 'junk' 'materials' 'torches' 'objects' 'adventure'
3271               'repository' 'massive' 'sundry',
3272          description
3273              "You've seen everything in here already, albeit in somewhat different contexts.",
3274          before [;
3275            Take:
3276              "Realizing that by removing the loot here you'd be ruining the game for future players,
3277               you leave the ~Adventure~ materials where they are.";
3278          ];
3279   
3280  Scenic  -> SleepingDwarves "sleeping dwarves"
3281    with  name 'dwarf' 'dwarves' 'sleeping' 'snoring' 'dozing' 'snoozing',
3282          article "hundreds of angry",
3283          description "I wouldn't bother the dwarves if I were you.",
3284          before [;
3285            Take:
3286              "What, all of them?";
3287          ],
3288          life [;
3289            WakeOther:
3290              print
3291                  "You prod the nearest dwarf, who wakes up grumpily,
3292                   takes one look at you, curses, and grabs for his axe.^^";
3293              self.wake_up();
3294              rtrue;
3295            Attack:
3296              self.wake_up();
3297              rtrue;
3298          ],
3299          wake_up [;
3300              deadflag = 1;
3301              "The resulting ruckus has awakened the dwarves.
3302               There are now dozens of threatening little dwarves in the room with you!
3303               Most of them throw knives at you! All of them get you!";
3304          ],
3305    has   animate multitude;
3306   
3307  ! ------------------------------------------------------------------------------
3308   
3309  Room    At_Sw_End "SW End of Repository"
3310    with  name 'southwest' 'sw' 'end' 'of' 'repository',
3311          description
3312              "You are at the southwest end of the repository.
3313               To one side is a pit full of fierce green snakes.
3314               On the other side is a row of small wicker cages, each of which contains a little sulking bird.
3315               In one corner is a bundle of black rods with rusty marks on their ends.
3316               A large number of velvet pillows are scattered about on the floor.
3317               A vast mirror stretches off to the northeast.
3318               At your feet is a large steel grate, next to which is a sign which reads,
3319               ~TREASURE VAULT. Keys in main office.~",
3320          d_to RepositoryGrate,
3321          ne_to At_Ne_End,
3322    has   light;
3323   
3324  Object  -> RepositoryGrate "steel grate"
3325    with  name 'ordinary' 'steel' 'grate' 'grating',
3326          description "It just looks like an ordinary steel grate.",
3327          when_open "The grate is open.",
3328          when_closed "The grate is closed.",
3329          door_dir d_to,
3330          door_to Outside_Grate,
3331          with_key nothing,
3332    has   static door locked openable;
3333   
3334  Scenic  -> "collection of adventure game materials"
3335    with  name 'pit' 'snake' 'snakes' 'fierce' 'green' 'stuff' 'junk' 'materials'
3336               'adventure' 'repository' 'massive' 'sundry',
3337          description
3338              "You've seen everything in here already, albeit in somewhat different contexts.",
3339          before [;
3340            Take:
3341              "Realizing that by removing the loot here you'd be ruining the game for future players,
3342               you leave the ~Adventure~ materials where they are.";
3343          ];
3344   
3345  Object  -> black_mark_rod "black rod with a rusty mark on the end"
3346    with  name 'rod' 'black' 'rusty' 'mark' 'three' 'foot' 'iron' 'explosive'
3347               'dynamite' 'blast',
3348          description "It's a three foot black rod with a rusty mark on an end.",
3349          initial
3350              "A three foot black rod with a rusty mark on one end lies nearby.",
3351          before [;
3352            Wave:
3353              "Nothing happens.";
3354          ];
3355   
3356  ! ------------------------------------------------------------------------------
3357  !   Some entry points
3358  ! ------------------------------------------------------------------------------
3359   
3360  [ Initialise;
3361      location = At_End_Of_Road;
3362      score = 36;
3363      StartDaemon(dwarf);
3364      StartDaemon(pirate);
3365      StartDaemon(cave_closer);
3366      "^^^^^Welcome to Adventure!^
3367            (Please type HELP for instructions and information.)^^";
3368  ];
3369   
3370  [ PrintRank;
3371      print ", earning you the rank of ";
3372      if (score >= 348) "Grandmaster Adventurer!";
3373      if (score >= 330) "Master, first class.";
3374      if (score >= 300) "Master, second class.";
3375      if (score >= 200) "Junior Master.";
3376      if (score >= 130) "Seasoned Adventurer.";
3377      if (score >= 100) "Experienced Adventurer.";
3378      if (score >= 35)  "Adventurer.";
3379      if (score >= 10)  "Novice.";
3380                        "Amateur.";
3381  ];
3382   
3383  [ DarkToDark;
3384      if (dark_warning == false) {
3385          dark_warning = true;
3386          "It is now pitch dark. If you proceed you will likely fall into a pit.";
3387      }
3388      if (random(4) == 1) {
3389          deadflag = 1;
3390          "You fell into a pit and broke every bone in your body!";
3391      }
3392      rfalse;
3393  ];
3394   
3395  [ UnknownVerb word
3396      obj;
3397      objectloop (obj ofclass Room) {
3398          if (obj has visited && WordInProperty(word, obj, name)) {
3399              verb_wordnum = 0;
3400              return 'go';
3401          }
3402      }
3403      rfalse;
3404  ];
3405   
3406  ! ------------------------------------------------------------------------------
3407  !   Resurrection
3408  ! ------------------------------------------------------------------------------
3409   
3410  [ AfterLife o;
3411      if (deadflag == 3) {
3412          deadflag = 1;
3413          rfalse;
3414      }
3415      print "^^";
3416      if (caves_closed)
3417          "It looks as though you're dead. Well, seeing as how it's so close to closing time anyway,
3418           I think we'll just call it a day.";
3419      switch (deaths) {
3420        0:
3421          print
3422              "Oh dear, you seem to have gotten yourself killed.
3423               I might be able to help you out, but I've never really done this before.
3424               Do you want me to try to reincarnate you?^^";
3425        1:
3426          print
3427              "You clumsy oaf, you've done it again!
3428               I don't know how long I can keep this up.
3429               Do you want me to try reincarnating you again?^^";
3430        2:
3431          print
3432              "Now you've really done it! I'm out of orange smoke!
3433               You don't expect me to do a decent reincarnation without any orange smoke, do you?^^";
3434      }
3435      print "> ";
3436      if (YesOrNo() == false) {
3437          switch (deaths) {
3438            0: "Very well.";
3439            1: "Probably a wise choice.";
3440            2: "I thought not!";
3441          }
3442      }
3443      switch (deaths) {
3444        0:
3445          print
3446              "All right. But don't blame me if something goes wr......
3447               ^^^^
3448               --- POOF!! ---
3449               ^^
3450               You are engulfed in a cloud of orange smoke.
3451               Coughing and gasping, you emerge from the smoke and find that you're....^";
3452        1:
3453          print
3454              "Okay, now where did I put my orange smoke?.... >POOF!<
3455               ^^
3456               Everything disappears in a dense cloud of orange smoke.^";
3457        2:
3458          "Okay, if you're so smart, do it yourself! I'm leaving!";
3459      }
3460      deaths++;
3461      score = score - 10;
3462      if (location ~= thedark) {
3463          while (child(player)) {
3464              o = child(player);
3465              move o to location;
3466              if (o ofclass Treasure) score = score - 5;
3467          }
3468      }
3469      else {
3470          while (child(player)) {
3471              o = child(player);
3472              move o to real_location;
3473              if (o ofclass Treasure) score = score - 5;
3474          }
3475      }
3476      move brass_lantern to At_End_Of_Road;
3477      give brass_lantern ~on ~light;
3478      remove dwarf;
3479      deadflag = 0;
3480      PlayerTo(Inside_Building);
3481  ];
3482   
3483  ! ------------------------------------------------------------------------------
3484  !   Menu-driven help (not really a part of the game itself)
3485  ! ------------------------------------------------------------------------------
3486   
3487  [ HelpMenu;
3488      if (menu_item == 0) {
3489          item_width = 8;
3490          item_name = "About Adventure";
3491          if (deadflag == 2) return 4;
3492          else               return 3;
3493      }
3494      if (menu_item == 1) {
3495          item_width = 6;
3496          item_name = "Instructions";
3497      }
3498      if (menu_item == 2) {
3499          item_width = 4;
3500          item_name = "History";
3501      }
3502      if (menu_item == 3) {
3503          item_width = 6;
3504          item_name = "Authenticity";
3505      }
3506      if (menu_item == 4) {
3507          item_width = 7;
3508          item_name = "Did you know...";
3509      }
3510  ];
3511   
3512  [ HelpInfo;
3513      if (menu_item == 1) {
3514          print
3515              "I know of places, actions, and things.
3516               You can guide me using commands that are complete sentences.
3517               To move, try commands like ~enter,~ ~east,~ ~west,~ ~north,~ ~south,~
3518               ~up,~ ~down,~ ~enter building,~ ~climb pole,~ etc.^^";
3519          print
3520              "I know about a few special objects, like a black rod hidden in the cave.
3521               These objects can be manipulated using some of the action words that I know.
3522               Usually you will need to give a verb followed by an object
3523               (along with descriptive adjectives when desired),
3524               but sometimes I can infer the object from the verb alone.
3525               Some objects also imply verbs; in particular, ~inventory~ implies ~take inventory~,
3526               which causes me to give you a list of what you're carrying.
3527               The objects have side effects; for instance, the rod scares the bird.^^";
3528          print
3529              "Many commands have abbreviations.
3530               For example, you can type ~i~ in place of ~inventory,~
3531               ~x object~ instead of ~examine object,~ etc.^^";
3532          print
3533              "Usually people having trouble moving just need to try a few more words.
3534               Usually people trying unsuccessfully to manipulate an object are attempting
3535               something beyond their (or my!) capabilities and should try a completely different tack.^^";
3536          print
3537              "Note that cave passages turn a lot, and that leaving a room to the north
3538               does not guarantee entering the next from the south.^^";
3539          print
3540              "If you want to end your adventure early, type ~quit~.
3541               To suspend your adventure such that you can continue later, type ~save,~
3542               and to resume a saved game, type ~restore.~
3543               To see how well you're doing, type ~score~.
3544               To get full credit for a treasure, you must have left it safely in the building,
3545               though you get partial credit just for locating it.
3546               You lose points for getting killed, or for quitting, though the former costs you more.
3547               There are also points based on how much (if any) of the cave you've managed to explore;
3548               in particular, there is a large bonus just for getting in
3549               (to distinguish the beginners from the rest of the pack),
3550               and there are other ways to determine whether you've been through
3551               some of the more harrowing sections.^^";
3552          print
3553              "If you think you've found all the treasures, just keep exploring for a while.
3554               If nothing interesting happens, you haven't found them all yet.
3555               If something interesting *does* happen, it means you're getting a bonus
3556               and have an opportunity to garner many more points in the master's section.^^";
3557          "Good luck!";
3558      }
3559      if (menu_item == 2) {
3560          print
3561              "Perhaps the first adventurer was a mulatto slave named Stephen Bishop, born about 1820:
3562               `slight, graceful, and very handsome'; a `quick, daring, enthusiastic' guide
3563               to the Mammoth Cave in the Kentucky karst.
3564               The story of the Cave is a curious microcosm of American history.
3565               Its discovery is a matter of legend dating back to the 1790s;
3566               it is said that a hunter, John Houchin, pursued a wounded bear to a large pit
3567               near the Green River and stumbled upon the entrance.
3568               The entrance was thick with bats and by the War of 1812 was intensively mined for guano,
3569               dissolved into nitrate vats to make saltpetre for gunpowder.
3570               After the war prices fell; but the Cave became a minor side-show when a dessicated
3571               Indian mummy was found nearby, sitting upright in a stone coffin, surrounded by talismans.
3572               In 1815, Fawn Hoof, as she was nicknamed after one of the charms,
3573               was taken away by a circus, drawing crowds across America
3574               (a tour rather reminiscent of Don McLean's song `The Legend of Andrew McCrew').
3575               She ended up in the Smithsonian but by the 1820s the Cave was being called
3576               one of the wonders of the world, largely due to her posthumous efforts.^^";
3577          print
3578              "By the early nineteenth century European caves were big tourist attractions,
3579               but hardly anyone visited the Mammoth, `wonder of the world' or not.
3580               Nor was it then especially large (the name was a leftover from the miners,
3581               who boasted of their mammoth yields of guano).
3582               In 1838, Stephen Bishop's owner bought up the Cave.
3583               Stephen, as (being a slave) he was invariably called, was by any standards a remarkable man:
3584               self-educated in Latin and Greek, he became famous as the `chief ruler' of his underground realm.
3585               He explored and named much of the layout in his spare time, doubling the known map in a year.
3586               The distinctive flavour of the Cave's names -- half-homespun American, half-classical --
3587               started with Stephen: the River Styx, the Snowball Room, Little Bat Avenue, the Giant Dome.
3588               Stephen found strange blind fish, snakes, silent crickets, the remains of cave bears
3589               (savage, playful creatures, five feet long and four high, which became extinct
3590               at the end of the last Ice Age), centuries-old Indian gypsum workings and ever more cave.
3591               His 1842 map, drafted entirely from memory, was still in use forty years later.^^";
3592          print
3593              "As a tourist attraction (and, since Stephen's owner was a philanthropist,
3594               briefly a sanatorium for tuberculosis, owing to a hopeless medical theory)
3595               the Cave became big business: for decades nearby caves were hotly seized
3596               and legal title endlessly challenged.
3597               The neighbouring chain, across Houchins Valley in the Flint Ridge,
3598               opened the Great Onyx Cave in 1912.
3599               By the 1920s, the Kentucky Cave Wars were in full swing.
3600               Rival owners diverted tourists with fake policemen, employed stooges
3601               to heckle each other's guided tours, burned down ticket huts,
3602               put out libellous and forged advertisements.
3603               Cave exploration became so dangerous and secretive that finally in 1941 the U.S. Government
3604               stepped in, made much of the area a National Park and effectively banned caving.
3605               The gold rush of tourists was, in any case, waning.^^";
3606          print
3607              "Convinced that the Mammoth and Flint Ridge caves were all linked in a huge chain,
3608               explorers tried secret entrances for years, eventually winning official backing.
3609               Throughout the 1960s all connections from Flint Ridge -- difficult and water-filled tunnels
3610               -- ended frustratingly in chokes of boulders.
3611               A `reed-thin' physicist, Patricia Crowther, made the breakthrough in 1972
3612               when she got through the Tight Spot and found a muddy passage:
3613               it was a hidden way into the Mammoth Cave.^^";
3614          print
3615              "Under the terms of his owner's will, Stephen Bishop was freed in 1856,
3616               at which time the cave boasted 226 avenues, 47 domes, 23 pits and 8 waterfalls.
3617               He died a year later, before he could buy his wife and son.
3618               In the 1970s, Crowther's muddy passage was found on his map.^^";
3619          print
3620              "The Mammoth Cave is huge, its full extent still a matter of speculation
3621               (estimates vary from 300 to 500 miles).
3622               Although this game has often been called ~Colossal Cave~,
3623               it is actually a simulation of the Bedquilt Cave region.
3624               Here is Will Crowther's story of how it came about:^^";
3625          print
3626              "~I had been involved in a non-computer role-playing game called Dungeons and Dragons
3627               at the time, and also I had been actively exploring in caves --
3628               Mammoth Cave in Kentucky in particular.
3629               Suddenly, I got involved in a divorce, and that left me a bit pulled apart in various ways.
3630               In particular I was missing my kids.
3631               Also the caving had stopped, because that had become awkward,
3632               so I decided I would fool around and write a program that was a re-creation
3633               in fantasy of my caving, and also would be a game for the kids,
3634               and perhaps some aspects of the Dungeons and Dragons that I had been playing.^^";
3635          print
3636              "~My idea was that it would be a computer game that would not be intimidating
3637               to non-computer people, and that was one of the reasons why I made it so that
3638               the player directs the game with natural language input, instead of more standardized commands.
3639               My kids thought it was a lot of fun.~
3640               [Quoted in ~Genesis II: Creation and Recreation with Computers~, Dale Peterson (1983).]^^";
3641          print
3642              "Crowther's original FORTRAN program had five or so treasures, but no formal scoring.
3643               The challenge was really to explore, though there was opposition from for instance the snake.
3644               Like the real Bedquilt region, Crowther's simulation has a map on about four levels
3645               of depth and is rich in geological detail.
3646               A good example is the orange column which descends to the Orange River Rock room
3647               (where the bird lives): the real column is of orange travertine,
3648               a beautiful mineral found in wet limestone.^^";
3649          print
3650              "The game's language is loaded with references to caving, to `domes' and `crawls'.
3651               A `slab room', for instance, is a very old cave whose roof has begun to break away
3652               into sharp flakes which litter the floor in a crazy heap.
3653               The program's use of the word `room' for all manner of caves and places
3654               seems slightly sloppy in everyday English, but is widespread in American caving
3655               and goes back as far as Stephen Bishop: so the Adventure-games usage of the word `room'
3656               to mean `place' may even be bequeathed from him.^^";
3657          print
3658              "The game took its decisive step toward puzzle-solving when Don Woods, a student at Stanford,
3659               debugged and expanded it.
3660               He tripled the number of treasures and added the non-geological zones:
3661               everything from the Troll Bridge onward, together with most of the antechambers on the Bedquilt level.
3662               All of the many imitations and extensions of the original Adventure
3663               are essentially based on Woods's 350-point edition.
3664               (Many bloated, corrupted or enhanced -- it depends how you see it --
3665               versions of the game are in Internet circulation, and the most useful way to identify them
3666               is by the maximum attainable score.
3667               Many versions exist scoring up to around the 400s and 500s, and one up to 1000.
3668               Woods himself continues to release new versions of his game;
3669               most of the other extenders haven't his talent.)^^";
3670          print
3671              "Although the game has veered away from pure simulation, a good deal of it remains realistic.
3672               Cavers do turn back when their carbide lamps flicker;
3673               there are indeed mysterious markings and initials on the cave walls, some left by the miners,
3674               some by Bishop, some by 1920s explorers.
3675               Of course there isn't an active volcano in central Kentucky, nor are there dragons and dwarves.
3676               But even these embellishments are, in a sense, derived from tradition:
3677               like most of the early role-playing games, `Adventure' owes much to J. R. R. Tolkien's
3678               `The Hobbit', and the passage through the mountains and Moria of `The Lord of the Rings'
3679               (arguably its most dramatic and atmospheric passage).
3680               Tolkien himself, the most successful myth-maker of the twentieth century,
3681               worked from the example of Icelandic, Finnish and Welsh sagas.^^";
3682          print
3683              "By 1977 tapes of `Adventure' were being circulated widely, by the Digital user group DECUS,
3684               amongst others: taking over lunchtimes and weekends wherever it went... but that's another story.
3685               (Tracy Kidder's fascinating book `The Soul of a New Machine', a journalist's-eye-view
3686               of a mainframe computer development group, catches it well.)^^";
3687          "This is a copy at third or fourth hand: from Will Crowther's original
3688           to Donald Woods's 350-point edition to Donald Ekman's PC port to
3689           David M. Baggett's excellent TADS version (1993), to this.^^";
3690      }
3691      if (menu_item == 3) {
3692          print
3693              "This port is fairly close to the original.
3694               The puzzles, items and places of Woods's original 350-point version are exactly those here.^^";
3695          print
3696              "I have added a few helpful messages, such as ~This is a dead end.~, here and there:
3697               and restored some ~initial position~ messages from objects, such as the (rather lame)
3698               ^^  There is tasty food here.^^
3699               from source files which are certainly early but of doubtful provenance.
3700               They seem to sit well with the rest of the text.^^";
3701          print
3702              "The scoring system is the original, except that you no longer lose 4 points for quitting
3703               (since you don't get the score if you quit an Inform game, this makes no difference)
3704               and, controversially, I award 5 points for currently carrying a treasure, as some early 1980s ports did.
3705               The rank names are tidied up a little.
3706               The only significant rule change is that one cannot use magic words
3707               until their destinations have been visited.^^";
3708          print
3709              "The dwarves are simpler in their movements, but on the other hand I have added
3710               a very few messages to make them interact better with the rest of the game.
3711               The probabilities are as in the original game.^^";
3712          print
3713              "In the original one could type the name of a room to visit it:
3714               for the sake of keeping the code small, I have omitted this feature, but with some regrets.
3715               [RF: this feature incorporated into Release 9.]^^";
3716          print
3717              "The text itself is almost everywhere preserved intact, but I've corrected some
3718               spelling and grammatical mistakes (and altered a couple of utterly misleading and gnomic remarks).
3719               The instructions have been slightly altered (for obvious reasons) but are basically as written.^^";
3720          "A good source for details is David Baggett's source code, which is circulated on the Internet.";
3721      }
3722      print "Did you know that...^^";
3723      print
3724          "The five dwarves have a 96% chance of following you, except into light, down pits or
3725           when admiring themselves: and the nasty little knives are 9.5% accurate.^^";
3726      print "Dragons burn up dwarves (perhaps because dwarves eat only coal).^^";
3727      print
3728          "The bear (who likes the volcano) is too heavy for the bridge...
3729           and you can go back to the scene after being resurrected.^^";
3730      print
3731          "You can slip past the snake into the secret E/W canyon, 35% of the time at any rate.
3732           And walking about in the dark is not all that gruesome:
3733           it carries only a 25% risk of falling down a pit.^^";
3734      print "The vase does not like being immersed.^^";
3735      print "Shadowy figures can wave to each other.^^";
3736      print "Watering the hinges of the door rusts them up again.^^";
3737      print
3738          "When the cave closes, the grate is locked and the keys are thrown away,
3739           creatures run off and the crystal bridge vanishes...^^";
3740      print
3741          "...and a completely useless hint is written on the giant oyster's shell in the end game.
3742           (To make this hint slightly fairer, I've altered one word and placed suggestions elsewhere in the game.)^^";
3743      "The last lousy point can be won by... but no. That would be telling.";
3744  ];
3745   
3746  [ HelpSub;
3747      if (deadflag ~= 2)
3748          DoMenu(
3749              "There is information provided on the following:^
3750              ^     Instructions for playing
3751              ^     A historical preface
3752              ^     How authentic is this edition?^", HelpMenu, HelpInfo);
3753      else
3754          DoMenu(
3755              "There is information provided on the following:^
3756              ^     Instructions for playing
3757              ^     A historical preface
3758              ^     How authentic is this edition?
3759              ^     Did you know...^", HelpMenu, HelpInfo);
3760  ];
3761   
3762  [ Amusing; HelpSub(); ];
3763   
3764  Verb 'help'
3765      *                       -> Help;
3766   
3767  ! ------------------------------------------------------------------------------
3768  !   Grammar: the usual grammar and some extensions
3769  ! ------------------------------------------------------------------------------
3770   
3771  Include "Grammar";
3772   
3773  ! ------------------------------------------------------------------------------
3774   
3775  [ OffSub;
3776      if (brass_lantern notin player) "You have no lamp.";
3777      <<SwitchOff brass_lantern>>;
3778  ];
3779   
3780  [ OnSub;
3781      if (brass_lantern notin player) "You have no lamp.";
3782      <<SwitchOn brass_lantern>>;
3783  ];
3784   
3785  Verb 'off'
3786      *                       -> Off;
3787   
3788  Verb 'on'
3789      *                       -> On;
3790   
3791  ! ------------------------------------------------------------------------------
3792   
3793  [ CatchSub; "You can't catch ", (the) noun, "."; ];
3794   
3795  [ ReleaseSub; "You can't release ", (the) noun, "."; ];
3796   
3797  Verb 'catch' 'capture'
3798      * creature              -> Catch
3799      * creature 'with' held  -> Catch;
3800   
3801  Verb 'release' 'free'
3802      * creature              -> Release;
3803   
3804  ! ------------------------------------------------------------------------------
3805   
3806  [ WaterSub;
3807      if (bottle in player) <<Empty bottle>>;
3808      "Water? What water?";
3809  ];
3810   
3811  [ OilSub;
3812      if (bottle in player) <<Empty bottle>>;
3813      "Oil? What oil?";
3814  ];
3815   
3816  Verb 'water'
3817      * noun                  -> Water;
3818   
3819  Verb 'oil' 'grease' 'lubricate'
3820      * noun                  -> Oil;
3821   
3822  Verb 'pour' 'douse'
3823      * 'water' 'on' noun     -> Water
3824      * 'oil' 'on' noun       -> Oil
3825      * noun                  -> Empty;
3826   
3827  ! ------------------------------------------------------------------------------
3828   
3829  [ BlastSub;
3830      if (location ~= At_Sw_End or At_Ne_End) "Frustrating, isn't it?";
3831      if (location == At_Sw_End && parent(black_mark_rod) == At_Ne_End) {
3832          score = score + 35;
3833          deadflag = 2;
3834          "There is a loud explosion, and a twenty-foot hole appears in the far wall,
3835           burying the dwarves in the rubble.
3836           You march through the hole and find yourself in the main office,
3837           where a cheering band of friendly elves carry the conquering adventurer off into the sunset.";
3838      }
3839      if (location == At_Ne_End && parent(black_mark_rod) == At_Sw_End) {
3840          score = score + 20;
3841          deadflag = 1;
3842          "There is a loud explosion, and a twenty-foot hole appears in the far wall,
3843           burying the snakes in the rubble.
3844           A river of molten lava pours in through the hole, destroying everything in its path, including you!";
3845      }
3846      deadflag = 1;
3847      "There is a loud explosion, and you are suddenly splashed across the walls of the room.";
3848  ];
3849   
3850  [ BlastWithSub;
3851      if (second ~= black_mark_rod) "Blasting requires dynamite.";
3852      "Been eating those funny brownies again?";
3853  ];
3854   
3855  Verb 'blast'
3856      *                       -> Blast
3857      * noun 'with' held      -> BlastWith;
3858   
3859  ! ------------------------------------------------------------------------------
3860   
3861  [ XyzzySub; "Nothing happens."; ];
3862   
3863  [ PlughSub; "Nothing happens."; ];
3864   
3865  [ PloverSub; "Nothing happens."; ];
3866   
3867  [ FeeSub; FthingSub(0); ];
3868   
3869  [ FieSub; FthingSub(1); ];
3870   
3871  [ FoeSub; FthingSub(2); ];
3872   
3873  [ FooSub; FthingSub(3); ];
3874   
3875  [ FthingSub i;
3876      if (feefie_count ~= i) {
3877          feefie_count = 0;
3878          "Get it right, dummy!";
3879      }
3880      if (feefie_count++ == 3) {
3881          feefie_count = 0;
3882          if (golden_eggs in In_Giant_Room) "Nothing happens.";
3883          if ((golden_eggs in player) || (golden_eggs in location))
3884              print "The nest of golden eggs has vanished!^";
3885          else
3886              print "Done!";
3887          if (golden_eggs in player) score = score - 5;
3888          if (golden_eggs in Inside_Building)
3889              score = score - golden_eggs.depositpoints;
3890          move golden_eggs to In_Giant_Room;
3891          if (location == In_Giant_Room)
3892              "^^A large nest full of golden eggs suddenly appears out of nowhere!";
3893      }
3894      else
3895          "Ok.";
3896  ];
3897   
3898  [ OldMagicSub; "Good try, but that is an old worn-out magic word."; ];
3899   
3900  Verb 'xyzzy'
3901      *                       -> Xyzzy;
3902   
3903  Verb 'plugh'
3904      *                       -> Plugh;
3905   
3906  Verb 'plover'
3907      *                       -> Plover;
3908   
3909  Verb 'fee'
3910      *                       -> Fee;
3911   
3912  Verb 'fie'
3913      *                       -> Fie;
3914   
3915  Verb 'foe'
3916      *                       -> Foe;
3917   
3918  Verb 'foo'
3919      *                       -> Foo;
3920   
3921  Verb 'sesame' 'shazam' 'hocus' 'abracadabra' 'foobar' 'open-sesame' 'frotz'
3922      *                       -> OldMagic;
3923   
3924  Extend 'say' first
3925      * 'blast'               -> Blast
3926      * 'xyzzy'               -> Xyzzy
3927      * 'plugh'               -> Plugh
3928      * 'plover'              -> Plover
3929      * 'fee'                 -> Fee
3930      * 'fie'                 -> Fie
3931      * 'foe'                 -> Foe
3932      * 'foo'                 -> Foo
3933      * 'sesame'/'shazam'/'hocus'/'abracadabra'/'foobar'/'open-sesame'/'frotz'
3934                              -> OldMagic;
3935   
3936  ! ------------------------------------------------------------------------------
3937   
3938  [ CountSub;
3939      if (noun has multitude) "There are a multitude.";
3940      "I see one (1) ", (name) noun, ".";
3941  ];
3942   
3943  [ KickSub;  <<Attack noun>>; ];         ! For kicking dwarves
3944   
3945  [ UseSub; "You'll have to be a bit more explicit than that."; ];
3946   
3947  Verb 'count'
3948      * noun                  -> Count;
3949   
3950  Verb 'kick'
3951      * noun                  -> Kick;
3952   
3953  Verb 'use'
3954      *                       -> Use;
3955   
3956  ! ------------------------------------------------------------------------------
3957  !   Teleportation (uses also UnknownVerb entry point)
3958  ! ------------------------------------------------------------------------------
3959   
3960  [ TeleportScope
3961      obj;
3962      switch (scope_stage) {
3963        1:    rfalse;
3964        2:    objectloop (obj ofclass Room)
3965                  if (obj has visited) PlaceInScope(obj);
3966              rtrue;
3967        3:    return L__M(##Go, 2);
3968      }
3969  ];
3970   
3971  [ TeleportSub;
3972      if (noun == location) "But you're already here!";
3973      PlayerTo(noun);
3974  ];
3975   
3976  Extend 'go'
3977      * scope=TeleportScope       -> Teleport
3978      * 'to' scope=TeleportScope  -> Teleport;
3979   
3980  #Ifndef DEBUG;
3981   
3982  Verb 'goto'
3983      * scope=TeleportScope       -> Teleport;
3984   
3985  #Endif;
3986   
3987  ! ------------------------------------------------------------------------------
3988  !   In the test version: no dwarves or pirates, and magic words work from the start
3989  ! ------------------------------------------------------------------------------
3990   
3991  #Ifdef TEST_VERSION;
3992   
3993  [ XdetermSub;
3994      StopDaemon(dwarf);
3995      StopDaemon(pirate);
3996      give In_Debris_Room visited;
3997      give At_Y2 visited;
3998      give In_Plover_Room visited;
3999  ];
4000   
4001  Verb 'xdeterm'
4002      *                       -> Xdeterm;
4003   
4004  #Endif;
4005   
4006  ! ------------------------------------------------------------------------------


Last updated 23 June 2004. This site is no longer supported; information may be out of date.
Maintained as a historical archive by the Interactive Fiction Technology Foundation. Copyright 1993-2018 IFTF, CC-BY-SA unless otherwise noted.
This page was originally managed by Graham Nelson (graham@gnelson.demon.co.uk) assisted by C Knight.