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

« back to all changes in this revision

Viewing changes to data/levels/malla1.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
 
Require("levels/ant.lua")
3
 
multiplayer_mode()
4
 
 
5
 
 
6
 
cells={}
7
 
cells[" "]=cell{floor="fl-wood"}
8
 
cells["+"]=cell{item={"it-sensor", {action="callback", target="disable_conserve_level"}}}
9
 
cells["#"]=cell{stone="st-rock5"}
10
 
cells["A"]=cell{stone="st-black4"}
11
 
cells["a"]=cell{stone="st-white4"}
12
 
cells["B"]=cell{stone="st-mail-n"}
13
 
cells["b"]=cell{stone="st-mail-e"}
14
 
cells["C"]=cell{stone="st-mail-s"}
15
 
cells["c"]=cell{stone="st-turnstile", floor="fl-abyss"}
16
 
cells["D"]=cell{stone="st-turnstile-n", floor="fl-abyss"}
17
 
cells["d"]=cell{stone="st-turnstile-e", floor="fl-abyss"}
18
 
cells["E"]=cell{stone="st-turnstile-s", floor="fl-abyss"}
19
 
cells["e"]=cell{stone="st-turnstile-w", floor="fl-abyss"}
20
 
cells["F"]=cell{item="it-puller-n"}
21
 
cells["f"]=cell{item="it-puller-e"}
22
 
cells["G"]=cell{item="it-puller-s"}
23
 
cells["g"]=cell{item="it-puller-w"}
24
 
cells["H"]=cell{stone="st-stoneimpulse"}
25
 
cells["h"]=cell{stone={"st-fourswitch", {action="callback", target="mirrorswitch"}}}
26
 
cells["I"]=cell{stone="st-shogun-l"}
27
 
cells["i"]=cell{stone="st-shogun-m"}
28
 
cells["J"]=cell{stone="st-shogun-s", item={"it-shogun-l", {target="door2", action="openclose"}}}
29
 
cells["j"]=cell{stone="st-rotator_move-left"}
30
 
cells["k"]=cell{item={"it-document", {text="This is my first landscape, dedicated to my father. I hope you'll enjoy it!"}}}
31
 
cells["L"]=cell{stone={"st-laser-e", {name="laser", on=FALSE}}}
32
 
cells["l"]=cell{stone={"st-switch_white", {target="laser", on=FALSE, action="onoff"}}}
33
 
cells["N"]=cell{item="it-pipe-ne"}
34
 
cells["Q"]=cell{stone={"st-laserswitch", {action="callback", target="lasertrigger1"}}}
35
 
cells["q"]=cell{stone={"st-laserswitch", {action="callback", target="lasertrigger2"}}}
36
 
cells["R"]=cell{stone={"st-laserswitch", {action="callback", target="lasertrigger3"}}}
37
 
cells["r"]=cell{stone={"st-laserswitch", {action="callback", target="lasertrigger4"}}}
38
 
cells["S"]=cell{stone={"st-door", {type="v", name="door2"}}}
39
 
cells["s"]=cell{stone={"st-door", {type="h", name="door3"}}}
40
 
cells["T"]=cell{stone={"st-door", {type="v", name="door1"}}}
41
 
cells["t"]=cell{stone={"st-pmirror", {movable=0, transparent=0, orientation=2}}}
42
 
cells["U"]=cell{stone={"st-pmirror", {movable=0, transparent=1, orientation=4}}}
43
 
cells["u"]=cell{stone={"st-3mirror", {movable=0, transparent=0, orientation=1}}}
44
 
cells["V"]=cell{stone={"st-3mirror", {movable=0, transparent=0, orientation=2}}}
45
 
cells["v"]=cell{stone={"st-pmirror", {movable=1, transparent=0, orientation=1}}}
46
 
cells["w"]=cell{item={"it-trigger", {action="callback", target="trigger1"}}}
47
 
cells["X"]=cell{stone="st-grate2"}
48
 
cells["x"]=cell{stone="st-grate3"}
49
 
cells["Y"]=cell{stone={"st-pmirror", {movable=0, transparent=0, orientation=4, name="mirror1"}}}
50
 
cells["y"]=cell{stone={"st-switch_black", {action="callback", target="stonedoor"}}}
51
 
cells["Z"]=cell{item={"it-trigger", {action="callback", target="trigger2"}}}
52
 
cells["z"]=cell{item={"it-trigger", {action="callback", target="trigger3"}}}
53
 
cells["*"]=cell{stone={"st-door_c", {name="door4"}}}
54
 
cells[","]=cell{floor="fl-water"}
55
 
puzzles2 = {}
56
 
cells["?"]=cell{parent={{add_multicell, puzzles2}}}
57
 
 
58
 
 
59
 
if (difficult) then
60
 
cells["n"]=cell{item="it-pipe-sw"}
61
 
cells["P"]=cell{item="it-hammer"}
62
 
cells["p"]=cell{stone="st-stone_break"}
63
 
cells["K"]=cell{stone="st-knight"}
64
 
cells["$"]=cells["?"]
65
 
cells["m"]=cell{item="it-pipe-v"}
66
 
cells["M"]=cell{item="it-pipe-h"}
67
 
else
68
 
cells["n"]=cells[" "]
69
 
cells["P"]=cells[" "]
70
 
cells["p"]=cells[" "]
71
 
cells["K"]=cells[" "]
72
 
cells["m"]=cells[" "]
73
 
cells["M"]=cells[" "]
74
 
end
75
 
 
76
 
 
77
 
 
78
 
      level = {
79
 
      --            1         2         3
80
 
      --  012345678901234567890123456789012345678
81
 
         "#######################################",
82
 
         "# q      u  Q#    rxYx         #   #yM#",
83
 
         "#            #     xxx     ## W wW ##n#",
84
 
         "#L       U   X     x 1 v   # Wz Z#  Tm#",
85
 
         "#            #   $ A   ##### ### #  #k#",
86
 
         "# t      V  R#???? #  Fb..##     #  #K#",
87
 
         "#p############ ?N? #B###ecd#####C####0#",
88
 
         "#s## X #  ,,I# ?m? #  #  . .........###",
89
 
         "#mf# J H  j  X ????# 2# D. ec.. . ecd##",
90
 
         "#G###H #i# # X $   #  ..cN. . .ec. .  #",
91
 
         "#F#MPH   X # X     a    E+#ecdc ...#  #",
92
 
         "#0hM S   X   #     #l0#####.. EG ..##K#",
93
 
         "#####################################0#"
94
 
      --  012345678901234567890123456789012345678
95
 
      --            1         2         3
96
 
      }
97
 
 
98
 
 
99
 
stonedoorswitchgreen=0
100
 
function stonedoor()
101
 
    if (stonedoorswitchgreen==0) then
102
 
      stonedoorswitchgreen=1
103
 
      set_stone("st-grate2", 31,1)
104
 
    elseif (stonedoorswitchgreen==1) then
105
 
      stonedoorswitchgreen=0
106
 
      set_stone("st-rock5", 31,1)
107
 
    end
108
 
end
109
 
 
110
 
local switchesdoor1={0, 0, 0}
111
 
function trigger1 () triggerdoor1(1) end 
112
 
function trigger2 () triggerdoor1(2) end 
113
 
function trigger3 () triggerdoor1(3) end
114
 
doorsopen1=0
115
 
 
116
 
function triggerdoor1(num)
117
 
   %switchesdoor1[num] = 1-%switchesdoor1[num]
118
 
   alldoor1=1
119
 
   for x=1,3 do
120
 
      if (%switchesdoor1[x]==0) then
121
 
         alldoor1 = 0
122
 
        end
123
 
   end
124
 
   if (doorsopen1==0 and alldoor1==1) then
125
 
      enigma.SendMessage(d1, "open", nil)
126
 
      doorsopen1 = 1
127
 
   elseif (doorsopen1==1 and alldoor1==0) then
128
 
      enigma.SendMessage(d1, "close", nil)
129
 
      doorsopen1 = 0
130
 
   end
131
 
end
132
 
 
133
 
function mirrorswitch()
134
 
    mir=enigma.GetNamedObject("mirror1")
135
 
    enigma.SendMessage(mir, "turn", nil)
136
 
end
137
 
 
138
 
local switchesdoor3={0, 0, 0, 0}
139
 
function lasertrigger1 () triggerdoor3(1) end 
140
 
function lasertrigger2 () triggerdoor3(2) end 
141
 
function lasertrigger3 () triggerdoor3(3) end
142
 
function lasertrigger4 () triggerdoor3(4) end
143
 
doorsopen3=0
144
 
 
145
 
function triggerdoor3(num)
146
 
   %switchesdoor3[num] = 1-%switchesdoor3[num]
147
 
   allswitches3=1
148
 
   for x=1,4 do
149
 
      if (%switchesdoor3[x]==0) then
150
 
         allswitches3 = 0
151
 
        end
152
 
   end
153
 
   if (doorsopen3==0 and allswitches3==1) then
154
 
      enigma.SendMessage(d3, "open", nil)
155
 
      doorsopen3 = 1
156
 
   elseif (doorsopen3==1 and allswitches3==0) then
157
 
      enigma.SendMessage(d3, "close", nil)
158
 
      doorsopen3 = 0
159
 
   end
160
 
end
161
 
 
162
 
      oxyd_default_flavor = "d"
163
 
      set_default_parent(cells[" "])
164
 
      create_world_by_map(level)
165
 
 
166
 
      --       --  [PUZZLE] --
167
 
function scramble(x,y,d) enigma.AddScramble(x,y,d) end
168
 
enigma.SetScrambleIntensity(50)
169
 
scramble(14,5,"e")
170
 
scramble(15,5,"s")
171
 
scramble(18,8,"w")
172
 
scramble(17,8,"n")
173
 
 
174
 
function disable_conserve_level ()
175
 
enigma.ConserveLevel = FALSE
176
 
end
177
 
 
178
 
d1=enigma.GetNamedObject("door1")
179
 
d3=enigma.GetNamedObject("door3")
180
 
render_puzzles(puzzles2, puzzle2)
181
 
 
182
 
fill_floor("fl-water", 14,5, 4, 1)
183
 
fill_floor("fl-water", 17,5, 1, 4)
184
 
set_floor("fl-water",18,8)
185
 
 
186
 
set_floor("fl-abyss",25,9)
187
 
set_floor("fl-abyss",25,10)
188
 
set_floor("fl-wood",27,8)
189
 
set_floor("fl-wood",34,8)
190
 
set_floor("fl-wood",36,8)
191
 
 
192
 
if (not difficult) then
193
 
set_item("it-pipe-sw",25,5)
194
 
set_item("it-pipe-v",25,6)
195
 
set_item("it-pipe-v",25,7)
196
 
set_item("it-pipe-h",26,9)
197
 
set_item("it-pipe-h",26,9)
198
 
set_item("it-pipe-h",3,10)
199
 
set_item("it-pipe-h",33,7)
200
 
set_item("it-pipe-v",37,1)
201
 
end
202
 
 
203
 
oxyd_shuffle()
 
 
b'\\ No newline at end of file'