Inform - Resources - Examples

Back to List

Inventory
Complete

Backward
Forward

Plain
Coloured
Gaudy

This code
in plain text

Browsing Advent.inf

21. Witt's End: Cave under construction (lines 2257-2312)

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   


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.