-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathcloak-of-darkness.storyarc
More file actions
133 lines (114 loc) · 4.32 KB
/
Copy pathcloak-of-darkness.storyarc
File metadata and controls
133 lines (114 loc) · 4.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
game
title "Cloak of Darkness"
headline "A basic IF demonstration."
author "Roger Firth"
release 3
serial "221116"
UUID 2a1f8e63-9b07-4c2d-8f3a-5e1d6042b7c9
start foyer
// The classic Cloak of Darkness, a 1:1 port of Roger Firth's reference
// implementation (the PunyInform cloak.inf, release 3): three rooms, three
// objects, two points. The original shows the score on its status line, so
// this port summons one; the two `award 1` sites self-sum the max of 2.
// One knowing divergence, truer to Firth's spec than to his code: an action
// aimed at something unseen in the dark ("x message") disturbs the sawdust
// here, where the Inform parser rejected it before any rule could run.
summon.statusline
counter disturbed
on start
say "Hurrying through the rainswept November night, you're glad to see
the bright lights of the Opera House. It's surprising that there
aren't more people about but, hey, what do you expect in a cheap
demo game...?"
room foyer
name "Foyer of the Opera House"
desc "You are standing in a spacious hall, splendidly decorated in red
and gold, with glittering chandeliers overhead. The entrance from
the street is to the north, and there are doorways south and west."
south bar
west cloakroom
on go north
say "You've only just arrived, and besides, the weather outside
seems to be getting worse."
stop
room cloakroom
name "Cloakroom"
desc "The walls of this small room were clearly once lined with hooks,
though now only one remains. The exit is a door to the east."
east foyer
thing hook of supporter in cloakroom
name "small brass hook"
words >small, >brass, hook, peg
scenery
on examine
if hook holds cloak
say "It's just a small brass hook, with a cloak hanging on it."
else
say "It's just a small brass hook, screwed to the wall."
stop
thing cloak in player
name "velvet cloak"
words >handsome, >dark, >black, >velvet, >satin, cloak
desc "A handsome cloak, of velvet trimmed with satin, and slightly
spattered with raindrops. Its blackness is so deep that it
almost seems to suck light from the room."
wearable
worn
// The cloak is the light switch: while it is anywhere on the player the
// bar stays dark, and it may only be put down in the cloakroom. The
// first hang on the hook is worth a point (award pays once by itself).
on drop, put
if here is not cloakroom
say "This isn't the best place to leave a smart cloak lying
around."
stop
continue
on after take
now bar is not lit
on after drop, put
if here is cloakroom
now bar is lit
if second is hook
award 1
room bar
name "Foyer bar"
desc "The bar, much rougher than you'd have guessed after the opulence
of the foyer to the north, is completely empty. There seems to be
some sort of message scrawled in the sawdust on the floor."
north foyer
lit false
// In the dark, going anywhere but north gropes badly (two disturbances,
// instant ruin) and any other action risks one; look and inventory pass
// through untouched, and the meta verbs never reach the room at all
// (out-of-world, as in the original).
on go
if here is not lit
if way is not north
change disturbed to disturbed + 2
say "Blundering around in the dark isn't a good idea!"
stop
continue
on look, inventory
continue
on other
if here is not lit
disturbed++
say "In the dark? You could easily disturb something!"
stop
continue
thing message in bar
name "scrawled message"
words message, sawdust, floor
scenery
on examine
if disturbed < 2
award 1
say "The message, neatly marked in the sawdust, reads..."
finish "*** You have won ***"
else
say "The message has been carelessly trampled, making it
difficult to read. You can just distinguish the words..."
death "*** You have lost ***"
stop
verb "hang"
put noun on noun