forked from historicalsource/arthur
-
Notifications
You must be signed in to change notification settings - Fork 0
/
basil.zil
289 lines (275 loc) · 6.54 KB
/
basil.zil
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
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
;"***************************************************************************"
; "game : Arthur"
; "file : BASIL.ZIL"
; "auth : $Author: DEB $"
; "date : $Date: 15 May 1989 19:43:24 $"
; "revs : $Revision: 1.41 $"
; "vers : 1.0"
;"---------------------------------------------------------------------------"
; "Basilisk Puzzle"
; "Copyright (C) 1989 Infocom, Inc. All rights reserved."
;"***************************************************************************"
;"***************************************************************************"
; "ROOMS & ROOM ACTIONS"
;"***************************************************************************"
;"---------------------------------------------------------------------------"
; "RM-BAS-LAIR"
;"---------------------------------------------------------------------------"
<ROOM RM-BAS-LAIR
(LOC ROOMS)
(DESC "basilisk's lair")
(FLAGS FL-LIGHTED FL-INDOORS)
(SYNONYM LAIR)
(ADJECTIVE BASILISK)
(OWNER CH-BASILISK)
(NE PER RT-EXIT-BAS-LAIR)
(IN PER RT-EXIT-BAS-LAIR)
(SE TO RM-CAVE)
(OUT TO RM-CAVE)
(GLOBAL LG-WALL)
(ACTION RT-RM-BAS-LAIR)
(THINGS
STONE (STATUE STATUES KNIGHT KNIGHTS) RT-PS-STATUES
NE (TUNNEL TUNNELS) RT-PS-TUNNEL
)
>
<ROUTINE RT-RM-BAS-LAIR ("OPT" (CONTEXT <>))
<COND
(<MC-CONTEXT? ,M-F-LOOK ,M-V-LOOK ,M-LOOK>
<COND
(<MC-CONTEXT? ,M-LOOK>
<TELL "You are" standing " in">
)
(T
<TELL "The tunnel widens out into">
)
>
<TELL
" a chamber full of grotesque statues. Upon closer examination, you realize
with horror that they are knights who have been turned into stone. The tunnel
takes a turn to the "
>
<COND
(<EQUAL? ,OHERE ,RM-HOT-ROOM>
<TELL "sou">
)
(T
<TELL "nor">
)
>
<TELL "theast">
<COND
(<IN? ,CH-BASILISK ,RM-BAS-LAIR>
<FSET ,CH-BASILISK ,FL-SEEN>
<THIS-IS-IT ,CH-BASILISK>
<COND
(<FSET? ,CH-BASILISK ,FL-ALIVE>
<TELL
", but the passage into the mountain is blocked by a sleeping basilisk"
>
)
(T
<TELL
", and in the middle of the room is a basilisk made of solid stone"
>
)
>
)
>
<TELL "." CR>
<RFALSE>
)
(<MC-CONTEXT? ,M-ENTER>
<SETG GL-PICTURE-NUM ,K-PIC-BASILISK-LAIR>
<COND
(<EQUAL? ,GL-WINDOW-TYPE ,K-WIN-PICT>
<RT-UPDATE-PICT-WINDOW>
)
>
<RFALSE>
)
(<MC-CONTEXT? ,M-ENTERED>
<COND
(<AND <IN? ,CH-BASILISK ,RM-BAS-LAIR>
<FSET? ,CH-BASILISK ,FL-ALIVE>
>
<RT-QUEUE ,RT-I-BASILISK-1 <+ ,GL-MOVES 1>>
<THIS-IS-IT ,CH-BASILISK>
<TELL
"|The noise of your entry awakens the basilisk, who begins to cast around
bleary-eyed for the source of the sound." CR
>
)
>
)
(<MC-CONTEXT? ,M-BEG>
<COND
(<AND <VERB? TELL>
,P-CONT
>
<RFALSE>
)
(<AND <SPEAKING-VERB?>
<FSET? ,CH-BASILISK ,FL-ALIVE>
>
<THIS-IS-IT ,CH-BASILISK>
<TELL
"Making noise only seems to help the basilisk find you faster." CR
>
)
>
)
(.CONTEXT
<RFALSE>
)
>
>
<ROUTINE RT-EXIT-BAS-LAIR ("OPT" (QUIET <>))
<COND
(<AND <FSET? ,CH-BASILISK ,FL-ALIVE>
<NOT .QUIET>
>
<TELL
"As you try to step over" the ,CH-BASILISK ", it looks up at you and you are
turned to stone in mid-step. You topple to the floor and shatter, although by
the time you hit the ground you are too dead to care.|"
>
<RT-END-OF-GAME>
)
(T
<RETURN ,RM-HOT-ROOM>
)
>
>
<ROUTINE RT-PS-STATUES ("OPT" (CONTEXT <>) (ART <>) (CAP? <>))
<FSET ,PSEUDO-OBJECT ,FL-PLURAL>
<FCLEAR ,PSEUDO-OBJECT ,FL-VOWEL>
<COND
(<MC-CONTEXT? ,M-OBJDESC>
<COND
(.ART
<PRINT-ARTICLE ,PSEUDO-OBJECT .ART .CAP?>
)
>
<COND
(<EQUAL? .ART <> ,K-ART-THE ,K-ART-A ,K-ART-ANY>
<COND
(.ART
<TELL " ">
)
>
<TELL "statues">
)
>
)
(.CONTEXT
<RFALSE>
)
>
>
;"---------------------------------------------------------------------------"
; "CH-BASILISK"
;"---------------------------------------------------------------------------"
<OBJECT CH-BASILISK
(LOC RM-BAS-LAIR)
(DESC "basilisk")
(FLAGS FL-ALIVE FL-NO-DESC FL-OPEN FL-SEARCH FL-TRY-TAKE)
(SYNONYM BASILISK)
(ACTION RT-CH-BASILISK)
>
<ROUTINE RT-CH-BASILISK ("OPT" (CONTEXT <>))
<COND
(<MC-CONTEXT? ,M-WINNER>
<COND
(<FSET? ,CH-BASILISK ,FL-ALIVE>
<THIS-IS-IT ,CH-BASILISK>
<TELL
"Making noise only seems to help the basilisk find you faster." CR
>
)
>
)
(.CONTEXT
<RFALSE>
)
(<AND <VERB? TELL>
,P-CONT
>
<RFALSE>
)
(<AND <TOUCH-VERB?>
<FSET? ,CH-BASILISK ,FL-ALIVE>
>
<TELL
"As you approach" the ,CH-BASILISK ", it looks up at you and you are turned
to stone in mid-step. You topple to the floor and shatter, although by the
time you hit the ground you are too dead to care.|"
>
<RT-END-OF-GAME>
)
(<VERB? TAKE>
<TELL
The ,CH-BASILISK " is firmly rooted to the floor of the cave." CR
>
)
(<VERB? EXAMINE>
<FSET ,CH-BASILISK ,FL-SEEN>
<TELL
The ,CH-BASILISK " looks like either a large lizard or a small dragon."
>
<COND
(<NOT <FSET? ,CH-BASILISK ,FL-ALIVE>>
<TELL " It has turned to solid stone.">
)
>
<CRLF>
)
>
>
<ROUTINE RT-I-BASILISK-1 ()
<COND
(<MC-HERE? ,RM-BAS-LAIR>
<RT-QUEUE ,RT-I-BASILISK-2 <+ ,GL-MOVES 1>>
<TELL
"|The basilisk turns towards you. Its glance is about to fall upon you." CR
>
)
>
>
<ROUTINE RT-I-BASILISK-2 ()
<COND
(<MC-HERE? ,RM-BAS-LAIR>
<TELL
"|The basilisk's eye falls upon you and suddenly your feet feel very cold.
Glancing down, you see with horror that they have turned to stone. The
deadening sensation quickly works its way up your legs. A terrified cry forms
in your throat, but it never makes it out of your mouth. In an instant, the
petrification is complete.|"
>
<RT-END-OF-GAME>
)
>
>
<ROUTINE RT-KILL-BASILISK ()
<FCLEAR ,CH-BASILISK ,FL-ALIVE>
<RT-DEQUEUE ,RT-I-BASILISK-1>
<RT-DEQUEUE ,RT-I-BASILISK-2>
<THIS-IS-IT ,CH-BASILISK>
<TELL
"The glint of the highly-polished shield attracts the basilisk's attention.
Slowly it turns its head towards you, and then suddenly it catches a glimpse
of its own reflection. The life immediately drains out of the creature, and
you realize with fascination that it has turned itself into stone.|"
>
<RT-SCORE-MSG 0 2 5 2>
<SETG GL-UPDATE-WINDOW <BOR ,GL-UPDATE-WINDOW ,K-UPD-DESC>>
<COND
(<EQUAL? ,GL-WINDOW-TYPE ,K-WIN-DESC>
<RT-UPDATE-DESC-WINDOW>
)
>
<RTRUE>
>
;"***************************************************************************"
; "end of file"
;"***************************************************************************"