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
|
|
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
|
(Misc4 ^Opaque)
{define "CommonKeys"
(#ATTACK
"Killed by %i at (%u,%u)" From ,Class From ,Image From ,Loc (PopUp 4)
LoseLevel
)
('BACK IgnoreKey LocateMe)
('UP N Move)
('DOWN S Move)
('LEFT W Move)
('RIGHT E Move)
}
(&SetTransforms dup =@Transforms $Transform swap 0 swap SetInventory)
($Man
Player Input
(Image "MAN")
(Help
"This is the player character."
"Push arrows to move or push enter to fly."
"See the \iTransform:0\ icon the inventory tells you how many times you can fly."
)
^Opaque
(Height 100)
(Density 500)
(Strength 2)
(Weight 1)
(Climb 50)
(INIT Level &SetTransforms)
{CommonKeys}
('ENTER
@Transforms if
@Transforms 1 - &SetTransforms
Destroy .
$Bat Loc 0 Dir Create .
then
)
(HIT From #TOUCH Dir 0 ,Send)
)
($Bat
Player Input
(Image "BAT")
(Help
"This is the player character, flying."
"Push arrows to move or push enter to walk."
"(Changing from flying to walking does not use up any \iTransform:0\)"
)
^Opaque
(Height 100)
(Density 500)
(Strength 1)
(Weight 1)
(Climb 100)
{CommonKeys}
('ENTER
ObjBelow ,Height 50 le if
$Man Loc 0 Dir Create .
Destroy .
then
)
)
($Floor
(Image "FLOOR")
(Help "There is nothing here.")
(Density 2000)
)
($Wall
(Image "WALL")
(Help "Impassable.")
^Opaque
(Density 1000)
(Height 200)
(Weight 100)
)
($Pillar
(Image "PILLAR")
(Help "Impassable, but pumpkins and ghosts can see through it.")
(Density 999)
(Height 200)
(Weight 80)
)
($Stone
(Image "STONE")
(Help "Impassable.")
^Opaque
(Density 999)
(Height 160)
(Weight 80)
)
($Door
(Image "CDOOR" "ODOOR")
(Help
"The goal of the game is to go through this door."
"You need all of the red vials in order to open the door."
)
^Opaque
(Density 1001)
(Height 200)
(Weight 100)
(Arrivals InPlace)
(:init Image if 0 else 200 then =Height)
(INIT =:init)
(CREATE =:init)
(#OPEN 1 =Image =:init)
(ARRIVED $Man Loc ObjClassAt $Bat Loc ObjClassAt lor if WinLevel then)
)
($RedVial
(Image "VIALR")
(Help "Collect all red vials to open the door and wake the ghosts.")
^Opaque
(Density 500)
(Height 150)
(#TOUCH Destroy . $RedVial #NoOp 0 0 Broadcast lnot if 0 #OPEN 0 0 Broadcast . then bit21)
)
($CyanVial
(Image "VIALC")
(Help "Push this cyan vial into spikes to destroy them (and the vial).")
^Opaque
(Density 500)
(Height 150)
Shovable
(Weight 1)
(HIT
From $UpSpikes is if
From ,Destroy .
1 =Departed
bit15
then
)
(DEPARTED Destroy .)
)
($Transform
(Image "TRNSFORM")
(Help "Collecting this allows you to fly.")
^Opaque
(Density 450)
(Height 75)
(#TOUCH @Transforms 1 + &SetTransforms Destroy . bit21)
)
($Block
(Image "BLOCK")
(Help "Can be pushed.")
^Opaque
(Density 600)
(Height 150)
Shovable
(Weight 1)
)
($ClayPot
(Image "CLAYPOT")
(Help "Can be pushed, and you can also fly over it.")
^Opaque
(Density 600)
(Height 75)
Shovable
(Weight 1)
)
($BlockSpecial
(Image "SPBLOCK")
(Help "Can be pushed; destroys spikes it touches (without destroying itself).")
^Opaque
(Density 600)
(Height 150)
Shovable
(Weight 1)
(HIT
From $UpSpikes is if
From ,Destroy .
bit15
then
)
)
($Spikes
(Image "DSPIKE")
(Help
"This spikes can only be walked on once; after that the spikes are raised."
"It is possible to fly over the spikes without triggering them."
)
(Density 1500)
(PLAYERMOVING
From Coloc From $Man is land if
Destroy .
$UpSpikes Loc 0 0 Create .
then
)
)
($UpSpikes
(Image "UPSPIKE")
(Help
"You cannot walk here, but you can fly over these spikes."
"The spikes can be removed by a Cyan Vial or Special Block."
)
(Density 1500)
(Height 75)
)
($Arrow
(Image "ARROWE" "ARROWN" "ARROWW" "ARROWS")
(Help "Disallows passing through in the opposite direction.")
(Density 1500)
(:init Image 1 lsh =Dir)
(INIT =:init)
(CREATE =:init)
(PLAYERMOVING Target From ,Dir Dir 4 bxor eq land)
)
($Pumpkin
(Image "PUMPKIN")
(Help
"Kills you if it sees you in any of the four directions."
"Some objects can block its view."
)
^Opaque
(Density 600)
(Height 150)
(:init Image 3 band 2 * =Dir)
(INIT =:init)
(CREATE =:init)
(BEGIN_TURN (P Rook if F ,^Opaque again F #ATTACK next) .)
)
($Ghost
(Image
"SGHOSTE" "SGHOSTN" "SGHOSTW" "SGHOSTS"
"WGHOSTE" "WGHOSTN" "WGHOSTW" "WGHOSTS"
)
(Help
"Kills you if it sees you."
"Some objects can block its view."
"They cannot see you while sleeping; it wakes up if all red vials are collected."
)
^Opaque
(Density 600)
(Height 150)
(:init Image 3 band 2 * =Dir)
(INIT =:init)
(CREATE =:init)
(BEGIN_TURN
Image 4 - 2 * From Seek eq if
(P if F ,^Opaque again F #ATTACK) .
then
)
(#OPEN Image 4 bor =Image)
)
|