~ubuntu-branches/ubuntu/intrepid/enigma/intrepid

« back to all changes in this revision

Viewing changes to data/levels/ss_esp66.lua

  • Committer: Bazaar Package Importer
  • Author(s): Erich Schubert
  • Date: 2005-08-28 15:30:09 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20050828153009-sky64kb6tcq37xt5
Tags: 0.92.1-1
* New upstream subversion checkout
* Remove menu.s3m, which we are allowed to distributed but not to modify
  also copyright notice is confusing... (Closes: #321669)
* Rebuild with new libzipios (Closes: #325405)
  I hope this works without a versioned build-dependency
* Added "enigma replaces enigma-data" for upgrades (Closes: #308558)
* Added notes about the fonts copyright.
* updated to policy 3.6.2.1 (no changes)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
--Esprit #066
2
 
 
3
 
levelw = 39
4
 
levelh = 37
5
 
 
6
 
create_world(levelw, levelh)
7
 
 
8
 
oxyd_default_flavor = "b"
9
 
fill_floor("fl-woven", 0, 0, levelw,levelh)
10
 
fill_floor("fl-abyss", 10, 13,19 ,11)
11
 
set_actor("ac-blackball", 9.5,2.5)
12
 
 
13
 
function renderLine( line, pattern)
14
 
    for i=1, strlen(pattern) do
15
 
      local c = strsub( pattern, i, i)
16
 
      if c == "#" then
17
 
         set_stone("st-bluegray",i-1,line)
18
 
      elseif c == "h" then
19
 
         set_stone("st-bluegray_hole", i-1,line)
20
 
      elseif c == "i" then
21
 
         set_stone("st-bluegray_hole", i-1,line)
22
 
         set_floor("fl-gradient",  i-1,  line, {type=4})
23
 
      elseif c == "j" then
24
 
         set_stone("st-bluegray_hole", i-1,line)
25
 
         set_floor("fl-gradient",  i-1,  line, {type=3})
26
 
      elseif c == "w" then
27
 
         set_stone("st-bluegray_hole", i-1,line)
28
 
         set_item("it-wormhole",i-1,line, {targetx="34.5",targety="33.5",strength=5,range= 0})           --
29
 
      elseif c == "W" then
30
 
         set_stone("st-bluegray_hole", i-1,line)
31
 
         set_item("it-wormhole",i-1,line, {targetx="10.5",targety="11.5",strength=5,range=0})               --
32
 
      elseif c == "k" then
33
 
         set_stone("st-bluegray_hole", i-1,line)
34
 
         set_item("it-key_a",i-1,line)
35
 
      elseif c == "l" then
36
 
         set_stone("st-key_a", i-1,line, {action="callback", target="door"})
37
 
      elseif c == "1" then
38
 
         set_item("it-coin1",i-1,line)
39
 
      elseif c == "2" then
40
 
         set_item("it-coin4",i-1,line)
41
 
      elseif c == "g" then
42
 
         set_stone("st-grate2",i-1,line)
43
 
         set_floor("fl-woven",i-1,line)
44
 
      elseif c == "n" then
45
 
         set_stone("st-grate2",i-1,line)
46
 
         set_item("it-coin1",i-1,line)
47
 
         set_floor("fl-woven",i-1,line)
48
 
      elseif c == "t" then
49
 
         set_stone("st-thief",i-1,line)
50
 
      elseif c == "u" then
51
 
         set_item("it-umbrella",i-1,line)
52
 
      elseif c == "3" then
53
 
         set_stone("st-oneway_black-e",i-1,line,{name="3"})
54
 
      elseif c == "4" then
55
 
         set_stone("st-oneway_black-n",i-1,line,{name="4"})
56
 
      elseif c == "5" then
57
 
         set_stone("st-oneway_black-e",i-1,line,{name="5"})
58
 
      elseif c == "6" then
59
 
         set_stone("st-oneway_black-n",i-1,line,{name="6"})
60
 
      elseif c == "7" then
61
 
         set_stone("st-oneway_black-w",i-1,line,{name="7"})
62
 
      elseif c == "8" then
63
 
         set_stone("st-oneway_black-w",i-1,line,{name="8"})
64
 
      elseif c == "9" then
65
 
         set_stone("st-oneway_black-n",i-1,line,{name="9"})
66
 
      elseif c == "0" then
67
 
         set_stone("st-oneway_black-n",i-1,line,{name="0"})
68
 
      elseif c == "a" then
69
 
         set_stone("st-oneway_black-n",i-1,line,{name="a"})
70
 
      elseif c == "b" then
71
 
         set_stone("st-oneway_black-n",i-1,line,{name="b"})
72
 
      elseif c == "c" then
73
 
         set_stone("st-oneway_black-e",i-1,line,{name="c"})
74
 
      elseif c == "d" then
75
 
         set_stone("st-oneway_black-s",i-1,line,{name="d"})
76
 
      elseif c == "e" then
77
 
         set_stone("st-oneway_black-w",i-1,line,{name="e"})
78
 
      elseif c == "f" then
79
 
         set_stone("st-oneway_black-w",i-1,line,{name="f"})
80
 
      elseif c=="A" then
81
 
         set_stone("st-coinslot", i-1,line,{target="s3", action="callback"})
82
 
      elseif c=="B" then
83
 
         set_stone("st-coinslot", i-1,line,{target="s4", action="callback"})
84
 
      elseif c=="C" then
85
 
         set_stone("st-coinslot", i-1,line,{target="s5", action="callback"})
86
 
      elseif c=="D" then
87
 
         set_stone("st-coinslot", i-1,line,{target="s6", action="callback"})
88
 
      elseif c=="E" then
89
 
         set_stone("st-coinslot", i-1,line,{target="s7", action="callback"})
90
 
      elseif c=="F" then
91
 
         set_stone("st-coinslot", i-1,line,{target="s8", action="callback"})
92
 
      elseif c=="G" then
93
 
         set_stone("st-coinslot", i-1,line,{target="s9", action="callback"})
94
 
      elseif c=="H" then
95
 
         set_stone("st-coinslot", i-1,line,{target="s0", action="callback"})
96
 
      elseif c=="I" then
97
 
         set_stone("st-coinslot", i-1,line,{target="sa", action="callback"})
98
 
      elseif c=="J" then
99
 
         set_stone("st-coinslot", i-1,line,{target="sb", action="callback"})
100
 
      elseif c=="K" then
101
 
         set_stone("st-coinslot", i-1,line,{target="sc", action="callback"})
102
 
      elseif c=="L" then
103
 
         set_stone("st-coinslot", i-1,line,{target="sd", action="callback"})
104
 
      elseif c=="M" then
105
 
         set_stone("st-coinslot", i-1,line,{target="se", action="callback"})
106
 
      elseif c=="N" then
107
 
         set_stone("st-coinslot", i-1,line,{target="sf", action="callback"})
108
 
      elseif c == "O" then
109
 
         oxyd( i-1, line)
110
 
        end
111
 
    end
112
 
end
113
 
 
114
 
renderLine(00, "#######################################")
115
 
renderLine(01, "#O     1             3               O#")
116
 
renderLine(02, "#u                 u A                #")
117
 
renderLine(03, "#           1        t                #")
118
 
renderLine(04, "#  ######4B#########################  #")
119
 
renderLine(05, "#  #O                5            O#  #")
120
 
renderLine(06, "#  #                 C             #  #")
121
 
renderLine(07, "#  #                 t             #  #")
122
 
renderLine(08, "#  #  ########D6#l###############  #  #")
123
 
renderLine(09, "#  #  #O hwk         t1        O#  #  #")
124
 
renderLine(10, "#  #  #  hhh         E          #  #  #")
125
 
renderLine(11, "tijt  #  hhh         7  1       #  #  #")
126
 
renderLine(12, "tijt  #  #####################  #  #  #")
127
 
renderLine(13, "tijt  #  #      tgt          #  #  #  #")
128
 
renderLine(14, "tijt  #  #      tgt          #  #  #  #")
129
 
renderLine(15, "tijt  #  #    tttgttttttt    #  #  #  #")
130
 
renderLine(16, "tijt  #  #    tngngngngnt    #2 #  #  #")
131
 
renderLine(17, "#  #  #  #    tgngngngngt    #  #  #  #")
132
 
renderLine(18, "#  F  #9G#    tngngngngnt    #H0#IatbJ#")
133
 
renderLine(19, "#  8  #  #    tgngngngngt    #  t  t  #")
134
 
renderLine(20, "thht  #  #    tngngngngnt    #  t  t  #")
135
 
renderLine(21, "thht  #  #    ttttttttttt    t  #  t  #")
136
 
renderLine(22, "thht  #  #                   t  #  #  #")
137
 
renderLine(23, "thht  t  #                   #  #  #  #")
138
 
renderLine(24, "thht  #  #####################  #  #  #")
139
 
renderLine(25, "thht  #              c          #  #  #")
140
 
renderLine(26, "#  #  #              K          #  #  #")
141
 
renderLine(27, "#  #  #O    1       1t    1    O#  #  #")
142
 
renderLine(28, "#  #  ###########ttt#########dL##  #  #")
143
 
renderLine(29, "#  #                 e             #  #")
144
 
renderLine(30, "#  #                 M             #  #")
145
 
renderLine(31, "#  #O 1      1       t 1          O#  #")
146
 
renderLine(32, "#  #################################  #")
147
 
renderLine(33, "#                    f           hhh  #")
148
 
renderLine(34, "#                    N           hhh  #")
149
 
renderLine(35, "#O     1       1     t           hWh O#")
150
 
renderLine(36, "#######################################")
151
 
 
152
 
 
153
 
oxyd_shuffle()
154
 
 
155
 
local flags = {0,0,0,0,1,1,0,0,0,0,0,1,1,1,0}
156
 
 
157
 
function door()
158
 
%flags[15] = 1 - %flags[15]
159
 
if %flags[15] == 0 then
160
 
        set_stone("st-bluegray",17,12)
161
 
    else
162
 
        enigma.KillStone(17,12)
163
 
end
164
 
end
165
 
 
166
 
function s3()
167
 
%flags[1] = 1 - %flags[1]
168
 
if %flags[1] == 0 then
169
 
        SendMessage("3","direction",EAST)
170
 
    else
171
 
        SendMessage("3","direction",WEST)
172
 
end
173
 
end
174
 
 
175
 
function s4()
176
 
%flags[2] = 1 - %flags[2]
177
 
if %flags[2] == 0 then
178
 
        SendMessage("4","direction",NORTH)
179
 
    else
180
 
        SendMessage("4","direction",SOUTH)
181
 
end
182
 
end
183
 
 
184
 
function s5()
185
 
%flags[3] = 1 - %flags[3]
186
 
if %flags[3] == 0 then
187
 
        SendMessage("5","direction",EAST)
188
 
    else
189
 
        SendMessage("5","direction",WEST)
190
 
end
191
 
end
192
 
 
193
 
function s6()
194
 
%flags[4] = 1 - %flags[4]
195
 
if %flags[4] == 0 then
196
 
        SendMessage("6","direction",NORTH)
197
 
    else
198
 
        SendMessage("6","direction",SOUTH)
199
 
end
200
 
end
201
 
 
202
 
function s7()
203
 
%flags[5] = 1 - %flags[5]
204
 
if %flags[5] == 0 then
205
 
        SendMessage("7","direction",EAST)
206
 
    else
207
 
        SendMessage("7","direction",WEST)
208
 
end
209
 
end
210
 
 
211
 
function s8()
212
 
%flags[6] = 1 - %flags[6]
213
 
if %flags[6] == 0 then
214
 
        SendMessage("8","direction",EAST)
215
 
    else
216
 
        SendMessage("8","direction",WEST)
217
 
end
218
 
end
219
 
 
220
 
function s9()
221
 
%flags[7] = 1 - %flags[7]
222
 
if %flags[7] == 0 then
223
 
        SendMessage("9","direction",NORTH)
224
 
    else
225
 
        SendMessage("9","direction",SOUTH)
226
 
end
227
 
end
228
 
 
229
 
function s0()
230
 
%flags[8] = 1 - %flags[8]
231
 
if %flags[8] == 0 then
232
 
        SendMessage("0","direction",NORTH)
233
 
    else
234
 
        SendMessage("0","direction",SOUTH)
235
 
end
236
 
end
237
 
 
238
 
function sa()
239
 
%flags[9] = 1 - %flags[9]
240
 
if %flags[9] == 0 then
241
 
        SendMessage("a","direction",NORTH)
242
 
    else
243
 
        SendMessage("a","direction",SOUTH)
244
 
end
245
 
end
246
 
 
247
 
function sb()
248
 
%flags[10] = 1 - %flags[10]
249
 
if %flags[10] == 0 then
250
 
        SendMessage("b","direction",NORTH)
251
 
    else
252
 
        SendMessage("b","direction",SOUTH)
253
 
end
254
 
end
255
 
 
256
 
function sc()
257
 
%flags[11] = 1 - %flags[11]
258
 
if %flags[11] == 0 then
259
 
        SendMessage("c","direction",EAST)
260
 
    else
261
 
        SendMessage("c","direction",WEST)
262
 
end
263
 
end
264
 
 
265
 
function sd()
266
 
%flags[12] = 1 - %flags[12]
267
 
if %flags[12] == 0 then
268
 
        SendMessage("d","direction",NORTH)
269
 
    else
270
 
        SendMessage("d","direction",SOUTH)
271
 
end
272
 
end
273
 
 
274
 
function se()
275
 
%flags[13] = 1 - %flags[13]
276
 
if %flags[13] == 0 then
277
 
        SendMessage("e","direction",EAST)
278
 
    else
279
 
        SendMessage("e","direction",WEST)
280
 
end
281
 
end
282
 
 
283
 
 
284
 
function sf()
285
 
%flags[14] = 1 - %flags[14]
286
 
if %flags[14] == 0 then
287
 
        SendMessage("f","direction",EAST)
288
 
    else
289
 
        SendMessage("f","direction",WEST)
290
 
end
291
 
end