3
enigma.SetCompatibility("oxyd.magnum")
4
dofile(enigma.FindDataFile("levels/ant.lua"))
6
cells[" "]=cell{floor="fl-rock"}
7
cells["#"]=cell{stone="st-metal"}
8
cells["-"]=cell{floor="fl-rock",stone="st-oneway_white-e"}
9
cells["."]=cell{floor="fl-rock",item="it-seed"}
10
cells["/"]=cell{{{mirrorp, FALSE, FALSE, 4}}}
11
cells["<"]=cell{floor="fl-rock",stone="st-oneway_black-w"}
12
cells[">"]=cell{floor="fl-rock",stone="st-oneway_black-e"}
13
cells["'"]=cell{parent=cells[" "],item="it-dynamite"}
14
cells["A"]=cell{floor="fl-rock",stone="st-block"}
15
cells["B"]=cell{stone="st-bombs"}
16
cells["C"]=cell{floor="fl-rock",item="it-crack3"}
17
cells["D"]=cell{floor="fl-rock",stone="st-death_invisible"}
18
cells["E"]=cell{stone="st-thief"}
19
cells["G"]=cell{floor="fl-rock",stone="st-grate1"}
20
cells["I"] = cell{parent=cells[" "],stone={"st-stoneimpulse",{name="impulse1"}}}
21
cells["J"] = cell{parent=cells[" "],stone={"st-stoneimpulse",{name="impulse3"}}}
22
cells["H"] = cell{parent=cells[" "],stone={"st-stoneimpulse",{name="impulse2"}}}
23
cells["K"] = cell{parent=cells[" "],stone={"st-stoneimpulse",{name="impulse4"}}}
24
cells["L"] = cell{parent=cells[" "],stone={"st-laser", {on=FALSE, dir=WEST, name="laser1"}}}
25
cells["M"]=cell{{{mirror3, FALSE, FALSE, 4}}}
26
cells["O"]=cell{stone="st-oxyd"}
27
cells["P"]=cell{item={"it-trigger", {action="callback", target="ss11"}}}
28
cells["S"]=cell{floor="fl-space"}
29
cells["T"]=cell{stone={face="st-timer", attr={action="callback", target="doors", interval=2.0}}}
30
cells["W"]=cell{item={"it-vortex-open", {targetx=21.5, targety=52.5}}}
31
cells["X"]=cell{floor="fl-rock"}
32
cells["Y"]=cell{floor="fl-rock",stone="st-yinyang1"}
33
cells["^"]=cell{floor="fl-rock",stone="st-oneway_black-n"}
34
cells["a"]=cell{floor="fl-abyss"}
35
cells["b"]=cell{floor="fl-rock",item="it-blackbomb"}
36
cells["c"]=cell{floor="fl-rock",stone="st-brick"}
37
cells["d"]=cell{floor="fl-abyss",item="it-blackbomb"}
38
cells["f"]=cell{floor="fl-rock",item="it-flagblack"}
39
cells["g"]=cell{floor="fl-rock",stone="st-grate3"}
40
cells["h"]=cell{parent=cells[" "],stone={"st-door", {name="door7", type="v"}}}
41
cells["i"]=cell{item={"it-trigger", {action="callback", target="s1", invisible=1}}}
42
cells["j"]=cell{item={"it-trigger", {action="callback", target="s1", invisible=1}}}
43
cells["k"]=cell{floor="fl-rock", stone="st-knight"}
44
cells["l"] = cell{parent=cells[" "],stone={"st-laser", {on=FALSE, dir=EAST, name="laser2"}}}
45
cells["m"]=cell{floor="fl-metal"}
46
cells["n"]=cell{floor="fl-rock",stone="st-stoneimpulse"}
47
cells["o"]=cell{floor="fl-rock",stone="st-stoneimpulse-hollow"}
48
cells["p"]=cell{item={"it-trigger", {action="callback", target="ss10"}}}
49
cells["q"]=cell{item={"it-trigger", {action="onoff", target="laser2"}}}
50
cells["r"]=cell{parent=cells[" "],item="it-extralife",stone={"st-door", {name="door4", type="v"}}}
51
cells["s"]=cell{parent=cells[" "],item="it-hammer",stone={"st-door", {name="door6", type="v"}}}
52
cells["t"]=cell{item={"it-trigger", {action="onoff", target="laser1"}}}
53
cells["u"]=cell{parent=cells[" "],stone={"st-door", {name="door5", type="v"}}}
54
cells["v"]=cell{floor="fl-rock",stone="st-oneway_black-s"}
55
cells["w"]=cell{floor="fl-rock",stone="st-wood"}
56
cells["x"]=cell{parent=cells[" "],stone={"st-door", {name="door3", type="v"}}}
57
cells["y"]=cell{parent=cells[" "],item="it-extralife",stone={"st-door", {name="door2", type="v"}}}
58
cells["z"]=cell{parent=cells[" "],stone={"st-door", {name="door1", type="v"}}}
59
cells["|"]=cell{floor="fl-rock",stone="st-oneway_white-n"}
60
cells["+"] = cell{parent=cells[" "],stone="st-turnstile"}
61
cells["~"] = cell{parent=cells[" "],stone="st-turnstile-w"}
62
cells["*"] = cell{parent=cells[" "],stone="st-turnstile-e"}
63
cells["?"] = cell{parent=cells[" "],stone="st-turnstile-s"}
64
cells["�"] = cell{parent=cells[" "],stone="st-turnstile-n"}
66
"##########################################################" , -- 00
67
"# G # # # #SSSSSSSSSSSSSSS#" , -- 01
68
"# Gwccccg # # # # # # # # #SOSSSSSSSSSSSOS#" , -- 02
69
"# Gwwccccg # # # #SSSSSSSSSSSSSSS#" , -- 03
70
"# wwtccccgggg # # ############ #SSSSSSmmmmSSSSS#" , -- 04
71
"#GGccccccccMg L # # ############ #SSSSSSmmmmSSSSS#" , -- 05
72
"# ccccccccgg # # T z y x r u s# #SSSSSSmmmmSSSSS#" , -- 06
73
"# ccccccccgg # # ############ #SSSSSSSSSSSSSSS#" , -- 07
74
"# ccccccccgg # # ############ #SSSSSSSSSSSSSSS#" , -- 08
75
"# # # # #SSSSSSSSSSSSSSS#" , -- 09
76
"# # # # # # # # # #SOSSS#EkkE#SSOS#" , -- 10
77
"# # # #SSSSSK HSSSS#" , -- 11
78
"###########^###### ####################YY#######+*~+######" , -- 12
79
"# YYY # #aaaaaaaaaaaaaaaaaa# # J?Pp?I #" , -- 13
80
"# # #aaaaaaaaaaaaaaaaaa# # GGGGG #" , -- 14
81
"# # >a . X f a# # ##A## #" , -- 15
82
"# ###aCaaa aaaaaaa aa a# # # # #" , -- 16
83
"# w #a aaa w ' aa a# ######## ########" , -- 17
84
"# #a aaa aaCaaaaCaa a# ######## ########" , -- 18
85
"# -a wbbwbbbbbaa a# qooooooooooooooo#" , -- 19
86
"# #a aaa aa aaaadaa a# ###############n#" , -- 20
87
"# #a b BwbbbbbB a# ############### #" , -- 21
88
"# #aaaaaaaa baaaaaaaa# # #" , -- 22
89
"# #aaaaaaaa baaaaaaaa# #l /#" , -- 23
90
"###^############|###########BB######### #################" , -- 24
91
"# ^>^^>v>v^^ # # # D D D #" , -- 25
92
"# ^<>^>^v><v # # # D #" , -- 26
93
"# <><>v^><>v # # # D D D #" , -- 27
94
"# >v^^vv<^^v # # # D D #" , -- 28
95
"# v>^>v<vv>v ##### # # D D D #" , -- 29
96
"# v>^>v<vv<v ihj ~+ # D #" , -- 30
97
"# v>^>v<vv>v ##### ? # D D D D D #" , -- 31
98
"# v^>>v<^v^^ # # # D #" , -- 32
99
"# <v>>^^v>^v # # # # D D #" , -- 33
100
"# <>^v^<<v>v # # # # D D #" , -- 34
101
"# >>>><<v<^^ # # #.# D D#" , -- 35
102
"############################ ############################" , -- 36
103
"# # # # # # # # # #" , -- 37
104
"# # # # # # # # # #" , -- 38
105
"# # # # # # # # #" , -- 39
106
"# # # # # #### # � #" , -- 40
107
"# # # # # ### # #~+*# + ##" , -- 41
108
"# # # #### ## # # # # ? #" , -- 42
109
"# # # # # ### # ######## #" , -- 43
110
"# # ### # # # # #" , -- 44
111
"# # # # # # # # # # ##" , -- 45
112
"# #### # # ### # # # # # #" , -- 46
113
"# # # # �# # # # # #" , -- 47
114
"######### #####################~+#########################" , -- 48
116
"# # # #### # # aaaaaaa #" , -- 50
117
"# # # #### # # aaaaaaa #" , -- 51
118
"# # # #### # # aaaaaaa #" , -- 52
119
"# #################### aa aa w w #" , -- 53
120
"#aaaaaaaaaaaaaaaaaa#################### aa aa wwww#" , -- 54
121
"# #################### aa aa w w #" , -- 55
122
"# # # #### # # aaaaaaa #" , -- 56
123
"# # # #### # # aaaaaaa #" , -- 57
124
"# # # #### # # aaaaaaa #" , -- 58
126
"######### ###############+*###############################" , -- 60
127
"# ######? ############ ## # #" , -- 61
128
"# #### ########### ## # #" , -- 62
129
"# #### ######## ## #" , -- 63
130
"# # +*+*� +*######## ## #" , -- 64
131
"# ? ? +*? #### ## ## #" , -- 65
132
"# # +*+* � ##nn ### ## #" , -- 66
133
"# # ? ? ~+ # w# ### ## #" , -- 67
134
"# ############## ### # ## #" , -- 68
135
"# ############## ##### # ## #" , -- 69
136
"# #################### # ## #" , -- 70
137
"# #################### # ## #" , -- 71
138
"##########################################################" , -- 72
143
set_default_parent(cells[" "])
145
create_world_by_map(level,cells)
147
fill_floor("fl-swamp",39,37,18,11)
148
set_floor("fl-wood",40,42)
149
set_floor("fl-wood",41,42)
151
set_actor("ac-top", 10.5,17.5, {range=10, force=10})
153
set_item("it-blackbomb", 28,21)
154
set_item("it-key_a", 55,54)
155
set_item("it-puller-s", 20,64)
156
set_item("it-puller-w", 54,30)
157
set_item("it-puller-s", 36,47)
158
set_item("it-puller-s", 28,65)
159
set_item("it-ring", 37,47)
160
set_item("it-glasses", 30,66)
161
set_item("it-pipe-h", 44,64)
162
set_item("it-pipe-h", 44,66)
163
set_item("it-pipe-h", 44,67)
164
set_item("it-spring2", 30,67)
165
set_item("it-spring1", 18,47)
166
set_item("it-floppy", 52,66)
167
set_item("it-coin1", 7,47)
168
set_item("it-extralife", 6,47)
169
set_item("it-extralife",50,62)
170
set_item ("it-trigger",21,51, {action="callback", target="ss01"})
171
set_item ("it-trigger",25,51, {action="callback", target="ss02"})
172
set_item ("it-trigger",32,51, {action="callback", target="ss03"})
173
set_item ("it-trigger",36,51, {action="callback", target="ss04"})
174
set_item ("it-trigger",21,57, {action="callback", target="ss05"})
175
set_item ("it-trigger",25,57, {action="callback", target="ss06"})
176
set_item ("it-trigger",32,57, {action="callback", target="ss07"})
177
set_item ("it-trigger",36,57, {action="callback", target="ss08"})
178
set_item ("it-trigger",20,2, {action="open", target="vortex09", invisible=1})
179
set_item ("it-trigger",42,34, {action="open", target="vortex10", invisible=1})
180
set_item ("it-trigger",40,42, {action="open", target="vortex12", invisible=1})
181
set_item ("it-trigger",35,65, {action="open", target="vortex13", invisible=1})
182
set_item ("it-trigger", 1,38, {action="open", target="vortex14", invisible=1})
183
set_item ("it-trigger",39,70, {action="open", target="vortex15", invisible=1})
184
set_item ("it-trigger",56,62, {action="open", target="vortex16", invisible=1})
186
set_item("it-vortex-closed",21,56, {name="vortex01", targetx = 56.5, targety = 61.5})
187
set_item("it-vortex-closed",25,56, {name="vortex02", targetx = 39.5, targety = 71.5})
188
set_item("it-vortex-closed",32,56, {name="vortex03", targetx = 36.5, targety = 65.5})
189
set_item("it-vortex-closed",36,56, {name="vortex04", targetx = 41.5, targety = 54.5})
190
set_item("it-vortex-closed",21,52, {name="vortex05", targetx = 20.5, targety = 1.5})
191
set_item("it-vortex-closed",25,52, {name="vortex06", targetx = 1.5, targety = 37.5})
192
set_item("it-vortex-closed",32,52, {name="vortex07", targetx = 42.5, targety = 35.5})
193
set_item("it-vortex-closed",36,52, {name="vortex08", targetx = 41.5, targety = 42.5})
194
set_item("it-vortex-closed",20,1, {name="vortex09", targetx = 21.5, targety = 52.5})
195
set_item("it-vortex-closed",42,35, {name="vortex10", targetx = 32.5, targety = 52.5})
196
set_item("it-vortex-closed",41,54, {name="vortex11", targetx = 36.5, targety = 56.5})
197
set_item("it-vortex-closed",41,42, {name="vortex12", targetx = 36.5, targety = 52.5})
198
set_item("it-vortex-closed",36,65, {name="vortex13", targetx = 32.5, targety = 56.5})
199
set_item("it-vortex-closed", 1,37, {name="vortex14", targetx = 25.5, targety = 52.5})
200
set_item("it-vortex-closed",39,71, {name="vortex15", targetx = 25.5, targety = 56.5})
201
set_item("it-vortex-closed",56,61, {name="vortex16", targetx = 21.5, targety = 56.5})
203
set_stone("st-door-v",33,45, {name="door8"})
204
set_stone("st-coinslot",33,44, {action="openclose", target="door8"})
206
set_stone("st-door-v",19,44, {name="door9"})
207
set_stone("st-key_a", 20,47, {action="openclose", target="door9"})
208
set_stone("st-door-v",5,47, {name="door10"})
209
set_stone("st-floppy", 6,46, {action="openclose", target="door10"})
210
set_stone ("st-mail-e",17,40)
211
set_stone("st-switch", 39,54, {action="callback",target="s2"})
213
if (not difficult) then
214
set_stone("st-grate1",34,69)
215
set_stone("st-grate1",35,69)
225
SendMessage("door1", "openclose")
226
SendMessage("door2", "openclose")
227
SendMessage("door3", "openclose")
228
SendMessage("door4", "openclose")
229
SendMessage("door5", "openclose")
230
SendMessage("door6", "openclose")
233
local flags={0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
236
local x1,y1 = enigma.GetPos(enigma.GetNamedObject("black"))
237
local x2,y2 = enigma.GetPos(enigma.GetNamedObject("white"))
238
if ((x1==18) or (x1==19) or (x1==20) or (x2==18) or (x2==19) or (x2==20)) then
239
SendMessage("door7", "open")
241
SendMessage("door7", "close")
246
%flags[12] = 1-%flags[12]
247
if (%flags[12] == 1) then
248
SendMessage("vortex11", "open")
250
SendMessage("vortex11", "close")
255
%flags[1] = 1-%flags[1]
256
if (%flags[1] == 1) then
257
SendMessage("vortex01", "open")
259
SendMessage("vortex01", "close")
264
%flags[2] = 1-%flags[2]
265
if (%flags[2] == 1) then
266
SendMessage("vortex02", "open")
268
SendMessage("vortex02", "close")
273
%flags[3] = 1-%flags[3]
274
if (%flags[3] == 1) then
275
SendMessage("vortex03", "open")
277
SendMessage("vortex03", "close")
282
%flags[4] = 1-%flags[4]
283
if (%flags[4] == 1) then
284
SendMessage("vortex04", "open")
286
SendMessage("vortex04", "close")
291
%flags[5] = 1-%flags[5]
292
if (%flags[5] == 1) then
293
SendMessage("vortex05", "open")
295
SendMessage("vortex05", "close")
300
%flags[6] = 1-%flags[6]
301
if (%flags[6] == 1) then
302
SendMessage("vortex06", "open")
304
SendMessage("vortex06", "close")
309
%flags[7] = 1-%flags[7]
310
if (%flags[7] == 1) then
311
SendMessage("vortex07", "open")
313
SendMessage("vortex07", "close")
318
%flags[8] = 1-%flags[8]
319
if (%flags[8] == 1) then
320
SendMessage("vortex08", "open")
322
SendMessage("vortex08", "close")
327
%flags[9] = 1-%flags[9]
328
if (%flags[9] == 1) then
329
SendMessage("vortex09", "open")
331
SendMessage("vortex09", "close")
336
%flags[10] = 1-%flags[10]
337
if (%flags[10] == 1) then
338
SendMessage("impulse1", "trigger")
340
local x1,y1 = enigma.GetPos(enigma.GetNamedObject("black"))
341
local x2,y2 = enigma.GetPos(enigma.GetNamedObject("white"))
342
if not (((x1==50) and (y1==11)) or ((x2==50) and (y2==11))) then
343
SendMessage("impulse2", "trigger")
349
%flags[11] = 1-%flags[11]
350
if (%flags[11] == 1) then
351
SendMessage("impulse3", "trigger")
353
local x1,y1 = enigma.GetPos(enigma.GetNamedObject("black"))
354
local x2,y2 = enigma.GetPos(enigma.GetNamedObject("white"))
355
if not (((x1==49) and (y1==11)) or ((x2==49) and (y2==11))) then
356
SendMessage("impulse4", "trigger")
361
set_actor("ac-blackball", 29.5,15.5, {name="black"}) set_item("it-yinyang", 29,15)
362
set_actor("ac-whiteball", 9.5,65.5, {name="white"}) set_item("it-yinyang", 9,65)