Inform - Resources - Examples

Back to List

Inventory
Complete

Backward
Forward

Plain
Coloured
Gaudy

This code
in plain text

Browsing Advent.inf

6. The caves open up: The Hall of Mists (lines 712-860)

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   


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.