1 ! ============================================================================ !
2 ! Cloak of Darkness - a simple demonstration of Interactive Fiction
3 ! This version for Inform written by Roger Firth on 17Sep99
4 ! Copyright (C) 1999 Roger Firth
5 ! Copying and distribution, with or without modification, are permitted in
6 ! any medium without royalty provided the copyright notice and this notice
8 ! ============================================================================ !
10 Constant Story "Cloak of Darkness";
11 Constant Headline "^A basic IF demonstration.^";
12 Constant MANUAL_PRONOUNS;
18 ! ============================================================================ !
20 Object foyer "Foyer of the Opera House"
22 "You are standing in a spacious hall, splendidly decorated in red
23 and gold, with glittering chandeliers overhead. The entrance from
24 the street is to the north, and there are doorways south and west.",
28 "You've only just arrived, and besides, the weather outside
29 seems to be getting worse.",
32 Object cloakroom "Cloakroom"
34 "The walls of this small room were clearly once lined with hooks,
35 though now only one remains. The exit is a door to the east.",
39 Object hook "small brass hook" cloakroom
40 with name 'small' 'brass' 'hook' 'peg',
42 print "It's just a small brass hook, ";
43 if (self == parent(cloak)) "with a cloak hanging on it.";
44 "screwed to the wall.";
46 has scenery supporter;
48 Object bar "Foyer bar"
50 "The bar, much rougher than you'd have guessed after the opulence
51 of the foyer to the north, is completely empty. There seems to
52 be some sort of message scrawled in the sawdust on the floor.",
56 if (self hasnt light && noun ~= n_obj) {
57 message.number = message.number + 2;
58 "Blundering around in the dark isn't a good idea!";
61 if (self hasnt light) {
62 message.number = message.number + 1;
63 "In the dark? You could easily disturb something!";
68 Object cloak "velvet cloak"
69 with name 'handsome' 'dark' 'black' 'velvet' 'satin' 'cloak',
71 "A handsome cloak, of velvet trimmed with satin, and slightly
72 spattered with raindrops. Its blackness is so deep that it
73 almost seems to suck light from the room.",
76 if (location == cloakroom) {
78 if (action == ##PutOn && self has general) {
84 "This isn't the best place to leave a smart cloak
88 Take: give bar ~light;
92 Object message "scrawled message" bar
93 with name 'message' 'sawdust' 'floor',
95 if (self.number < 2) {
98 print "The message, neatly marked in the sawdust, reads...";
102 print "The message has been carelessly trampled, making it
103 difficult to read. You can just distinguish the words...";
111 move cloak to player;
113 "^^Hurrying through the rainswept November night, you're glad to see the
114 bright lights of the Opera House. It's surprising that there aren't more
115 people about but, hey, what do you expect in a cheap demo game...?^^";
118 [ DeathMessage; print "You have lost"; ];
120 ! ============================================================================ !
124 Verb 'hang' * held 'on' noun -> PutOn;
126 ! ============================================================================ !