Inform - Resources - Examples

Back to List

Inventory
Complete

Backward
Forward

Plain
Coloured
Gaudy

This code
in plain text

Browsing Advent.inf

20. North of the complex junction: a long up-down corridor (lines 2169-2252)

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   


Last updated 23 June 2004. This web site has not been fully supported since April 2008. Information may be out of date. This page was originally managed by Graham Nelson (graham@gnelson.demon.co.uk) assisted by C Knight.