Inform - Resources - Examples

Back to List

Inventory
Complete

Backward
Forward

Plain
Coloured
Gaudy

This code
in plain text

Browsing Advent.inf

19. Plovers and pyramids (lines 2089-2164)

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   


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.