Inform - Resources - Examples

Back to List

Inventory
Complete

Backward
Forward

Plain
Coloured
Gaudy

This code
in plain text

Browsing Advent.inf

17. Above the beanstalk: the Giant Room and the Waterfall (lines 1836-1977)

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   


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.