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

« back to all changes in this revision

Viewing changes to data/levels/siegfried96.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
 
--
2
 
--
3
 
 
4
 
levelw = 20
5
 
levelh = 13
6
 
 
7
 
create_world(levelw, levelh)
8
 
enigma.ConserveLevel = FALSE
9
 
oxyd_default_flavor = "d"
10
 
fill_floor("fl-samba")
11
 
 
12
 
function renderLine( line, pattern)
13
 
    for i=1, strlen(pattern) do
14
 
      local c = strsub( pattern, i, i)
15
 
      if c =="t" then
16
 
         set_stone("st-timeswitch",i-1,line)
17
 
      elseif c == "w" then
18
 
         set_stone("st-break_acwhite",i-1,line)
19
 
      elseif c == "1" then
20
 
         set_stone("st-timeswitch",i-1,line, {action="callback", target="callback1"})
21
 
      elseif c == "2" then
22
 
         set_stone("st-timeswitch",i-1,line, {action="callback", target="callback2"})
23
 
      elseif c == "3" then
24
 
         set_stone("st-timeswitch",i-1,line, {action="callback", target="callback3"})
25
 
      elseif c == "4" then
26
 
         set_stone("st-timeswitch",i-1,line, {action="callback", target="callback4"})
27
 
      elseif c == "5" then
28
 
         set_stone("st-timeswitch",i-1,line, {action="callback", target="callback5"})
29
 
      elseif c == "6" then
30
 
         set_stone("st-timeswitch",i-1,line, {action="callback", target="callback6"})
31
 
      elseif c == "7" then
32
 
         set_stone("st-timeswitch",i-1,line, {action="callback", target="callback7"})
33
 
      elseif c == "8" then
34
 
         set_stone("st-timeswitch",i-1,line, {action="callback", target="callback8"})
35
 
      elseif c == "9" then
36
 
         set_stone("st-timeswitch",i-1,line, {action="callback", target="callback9"})
37
 
      elseif c == "l" then
38
 
         set_attrib(laser(i-1,line, FALSE, NORTH), "name", "laser")
39
 
      elseif c == "A" then
40
 
         set_attrib(mirror3(i-1,line,0,0,2), "name", "mirror01")
41
 
      elseif c == "B" then
42
 
         set_attrib(mirrorp(i-1,line,0,1,3), "name", "mirror02")
43
 
      elseif c == "C" then
44
 
         set_attrib(mirror3(i-1,line,0,0,4), "name", "mirror03")
45
 
      elseif c == "D" then
46
 
         set_attrib(mirrorp(i-1,line,0,0,4), "name", "mirror04")
47
 
      elseif c == "E" then
48
 
         set_attrib(mirrorp(i-1,line,0,1,4), "name", "mirror05")
49
 
      elseif c == "F" then
50
 
         set_attrib(mirror3(i-1,line,0,1,1), "name", "mirror06")
51
 
      elseif c == "G" then
52
 
         set_attrib(mirrorp(i-1,line,0,0,1), "name", "mirror07")
53
 
      elseif c == "H" then
54
 
         set_attrib(mirrorp(i-1,line,0,1,2), "name", "mirror08")
55
 
      elseif c == "I" then
56
 
         set_attrib(mirror3(i-1,line,0,0,2), "name", "mirror09")
57
 
      elseif c == "K" then
58
 
         set_attrib(mirror3(i-1,line,0,0,2), "name", "mirror10")
59
 
      elseif c == "L" then
60
 
         set_attrib(mirror3(i-1,line,0,0,2), "name", "mirror11")
61
 
      elseif c == "M" then
62
 
         set_attrib(mirrorp(i-1,line,0,0,2), "name", "mirror12")
63
 
      elseif c == "N" then
64
 
         set_attrib(mirror3(i-1,line,0,0,1), "name", "mirror13")
65
 
      elseif c == "O" then
66
 
         set_attrib(mirrorp(i-1,line,0,1,4), "name", "mirror14")
67
 
      elseif c == "P" then
68
 
         set_attrib(mirror3(i-1,line,0,0,3), "name", "mirror15")
69
 
      elseif c == "Q" then
70
 
         set_attrib(mirrorp(i-1,line,0,0,2), "name", "mirror16")
71
 
      elseif c == "o" then
72
 
         oxyd( i-1, line)
73
 
      elseif c == "a" then
74
 
         set_actor("ac-blackball", i, line+.5)
75
 
        end
76
 
    end
77
 
end
78
 
renderLine(00, "tt8ttttttttttttttttt")
79
 
renderLine(01, "t  to o o o o owwwwt")
80
 
renderLine(02, "1  twwwwwwwwwwwwwwwt")
81
 
renderLine(03, "2  twwwwwwwwwwwwwwwt")
82
 
renderLine(04, "3  twwwwwwwwwwwwwwwt")
83
 
renderLine(05, "4  tABwwCwDwEwFwwwwt")
84
 
renderLine(06, "5  twwwwwwwwwwwwwwwt")
85
 
renderLine(07, "6a tGHIwKwLwMwNwwwwt")
86
 
renderLine(08, "t  twwwwwwwwwwwwwwwt")
87
 
renderLine(09, "7  twOwwPwQwwwwwwwwt")
88
 
renderLine(10, "t  twwwwwwwwwwwwwwwt")
89
 
renderLine(11, "t  twwwwwwwwwwwwwwwt")
90
 
renderLine(12, "tt9ttltttttttttttttt")
91
 
 
92
 
oxyd_shuffle()
93
 
 
94
 
switch1 = 0
95
 
switch2 = 0
96
 
switch3 = 0
97
 
switch4 = 0
98
 
switch5 = 0
99
 
switch6 = 0
100
 
switch7 = 0
101
 
switch8 = 0
102
 
switch9 = 0
103
 
 
104
 
function switchaction()
105
 
    lasera=enigma.GetNamedObject("laser")
106
 
    if switch8 == 1 or switch9 == 1 then
107
 
       SendMessage(lasera, "on")
108
 
    end
109
 
    if switch8 == 0 and switch9 == 0 then
110
 
       SendMessage(lasera, "off")
111
 
    end
112
 
    mir1=enigma.GetNamedObject("mirror01")
113
 
    mir2=enigma.GetNamedObject("mirror02")
114
 
    if switch1 == 1 or switch4 == 1 then
115
 
       SendMessage(mir1, "mirror-east")
116
 
       SendMessage(mir2, "mirror-east")
117
 
    end
118
 
    if switch1 == 0 and switch4 == 0 then
119
 
       SendMessage(mir1, "mirror-west")
120
 
       SendMessage(mir2, "mirror-north")
121
 
    end
122
 
    mir3=enigma.GetNamedObject("mirror03")
123
 
    if switch2 == 1 or switch4 == 1 then
124
 
       SendMessage(mir3, "mirror-north")
125
 
    end
126
 
    if switch2 == 0 and switch4 == 0 then
127
 
       SendMessage(mir3, "mirror-east")
128
 
    end
129
 
    mir4=enigma.GetNamedObject("mirror04")
130
 
    if switch3 == 1 or switch4 == 1 then
131
 
       SendMessage(mir4, "mirror-south")
132
 
    end
133
 
    if switch3 == 0 and switch4 == 0 then
134
 
       SendMessage(mir4, "mirror-east")
135
 
    end
136
 
    mir5=enigma.GetNamedObject("mirror05")
137
 
    if switch4 == 1 or switch5 == 1 then
138
 
       SendMessage(mir5, "mirror-west")
139
 
    end
140
 
    if switch4 == 0 and switch5 == 0 then
141
 
       SendMessage(mir5, "mirror-east")
142
 
    end
143
 
    mir6=enigma.GetNamedObject("mirror06")
144
 
    if switch4 == 1 then
145
 
       SendMessage(mir6, "mirror-west")
146
 
    end
147
 
    if switch4 == 0 then
148
 
       SendMessage(mir6, "mirror-south")
149
 
    end
150
 
    mir7=enigma.GetNamedObject("mirror07")
151
 
    mir8=enigma.GetNamedObject("mirror08")
152
 
    if switch1 == 1 or switch6 == 1 then
153
 
       SendMessage(mir7, "mirror-west")
154
 
       SendMessage(mir8, "mirror-east")
155
 
    end
156
 
    if switch1 == 0 and switch6 == 0 then
157
 
       SendMessage(mir7, "mirror-south")
158
 
       SendMessage(mir8, "mirror-west")
159
 
    end
160
 
    mir9 =enigma.GetNamedObject("mirror09")
161
 
    mir13=enigma.GetNamedObject("mirror13")
162
 
    if switch6 == 1 then
163
 
       SendMessage(mir9,  "mirror-north")
164
 
       SendMessage(mir13, "mirror-west")
165
 
    end
166
 
    if switch6 == 0 then
167
 
       SendMessage(mir9,  "mirror-west")
168
 
       SendMessage(mir13, "mirror-south")
169
 
    end
170
 
    mir10=enigma.GetNamedObject("mirror10")
171
 
    if switch2 == 1 or switch6 == 1 then
172
 
       SendMessage(mir10, "mirror-south")
173
 
    end
174
 
    if switch2 == 0 and switch6 == 0 then
175
 
       SendMessage(mir10, "mirror-west")
176
 
    end
177
 
    mir11=enigma.GetNamedObject("mirror11")
178
 
    if switch3 == 1 or switch6 == 1 then
179
 
       SendMessage(mir11, "mirror-north")
180
 
    end
181
 
    if switch3 == 0 and switch6 == 0 then
182
 
       SendMessage(mir11, "mirror-west")
183
 
    end
184
 
    mir12=enigma.GetNamedObject("mirror12")
185
 
    if switch5 == 1 or switch6 == 1 then
186
 
       SendMessage(mir12, "mirror-east")
187
 
    end
188
 
    if switch5 == 0 and switch6 == 0 then
189
 
       SendMessage(mir12, "mirror-west")
190
 
    end
191
 
    mir14=enigma.GetNamedObject("mirror14")
192
 
    if switch1 == 1 or switch7 == 1 then
193
 
       SendMessage(mir14, "mirror-south")
194
 
    end
195
 
    if switch1 == 0 and switch7 == 0 then
196
 
       SendMessage(mir14, "mirror-east")
197
 
    end
198
 
    mir15=enigma.GetNamedObject("mirror15")
199
 
    if switch2 == 1 or switch7 == 1 then
200
 
       SendMessage(mir15, "mirror-west")
201
 
    end
202
 
    if switch2 == 0 and switch7 == 0 then
203
 
       SendMessage(mir15, "mirror-north")
204
 
    end
205
 
    mir16=enigma.GetNamedObject("mirror16")
206
 
    if switch3 == 1 or switch7 == 1 then
207
 
       SendMessage(mir16, "mirror-east")
208
 
    end
209
 
    if switch3 == 0 and switch7 == 0 then
210
 
       SendMessage(mir16, "mirror-west")
211
 
    end
212
 
end
213
 
 
214
 
function callback1 (ison)
215
 
     switch1=ison
216
 
     switchaction()
217
 
end
218
 
 
219
 
function callback2 (ison)
220
 
     switch2=ison
221
 
     switchaction()
222
 
end
223
 
 
224
 
function callback3 (ison)
225
 
     switch3=ison
226
 
     switchaction()
227
 
end
228
 
 
229
 
function callback4 (ison)
230
 
     switch4=ison
231
 
     switchaction()
232
 
end
233
 
 
234
 
function callback5 (ison)
235
 
     switch5=ison
236
 
     switchaction()
237
 
end
238
 
 
239
 
function callback6 (ison)
240
 
     switch6=ison
241
 
     switchaction()
242
 
end
243
 
 
244
 
function callback7 (ison)
245
 
     switch7=ison
246
 
     switchaction()
247
 
end
248
 
 
249
 
function callback8 (ison)
250
 
     switch8=ison
251
 
     switchaction()
252
 
end
253
 
 
254
 
function callback9 (ison)
255
 
     switch9=ison
256
 
     switchaction()
257
 
end