~ubuntu-branches/ubuntu/saucy/enigma/saucy

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
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<el:level xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://enigma-game.org/schema/level/1 level.xsd" xmlns:el="http://enigma-game.org/schema/level/1">
  <el:protected>
    <el:info el:type="level">
      <el:identity el:title="OxydLink 95" el:subtitle="Oxyd Link 95" el:id="siegfried103"/>
      <el:version el:score="1" el:release="1" el:revision="0" el:status="released"/>
      <el:author  el:name="Siegfried Fennig" el:email="" el:homepage=""/>
      <el:copyright>Copyright © 2004 Siegfried Fennig</el:copyright>
      <el:license el:type="GPL version 2" el:open="true"/>
      <el:compatibility el:enigma="0.92" el:engine="oxyd1">
      </el:compatibility>
      <el:modes el:easy="false" el:single="true" el:network="true"/>
      <el:comments>
        <el:code>Lua 5.1 and XML converted by Leveladministrators</el:code>
      </el:comments>
      <el:score el:easy="-" el:difficult="-"/>
    </el:info>
    <el:luamain><![CDATA[
levelw = 20
levelh = 13

create_world(levelw, levelh)
enigma.ConserveLevel = FALSE
oxyd_default_flavor = "d"
fill_floor("fl-samba")

function renderLine( line, pattern)
    for i=1, strlen(pattern) do
      local c = strsub( pattern, i, i)
      if c =="B" then
         set_stone("st-block", i-1,line)
      elseif c == "w" then
         set_stone("st-wood",i-1,line)
      elseif c == "y" then
         set_stone("st-yinyang1",i-1,line)
      elseif c == "s" then
         set_stone("st-rock1",i-1,line)
      elseif c == "W" then
         set_stone("st-oneway_white-w",i-1,line)
      elseif c == "#" then
         set_floor("fl-abyss",i-1,line)
      elseif c == "x" then
         set_item("it-blackbomb",i-1,line)
      elseif c == "X" then
         set_stone("st-bombs",i-1,line)
      elseif c == "S" then
         set_stone("st-switch",i-1,line, {action="callback", target="sw1"})
      elseif c == "1" then
         set_stone("st-door",i-1,line, {name="door1", type="v"})
      elseif c == "2" then
         set_stone("st-door",i-1,line, {name="door2", type="h"})
      elseif c == "c" then
         set_item("it-crack3",i-1,line)
      elseif c == "Y" then
         f1( i-1, line)
      elseif c == "o" then
         oxyd( i-1, line)
      elseif c == "a" then
         set_actor("ac-blackball", i-.5,line+.5)
         set_item("it-yinyang", i-1, line+.5)
      elseif c == "b" then
         set_actor("ac-whiteball", i-.5,line+.5)
         set_item("it-yinyang", i-1, line+.5)
        end
    end
end

function f1( x, y)
        set_stone("st-grate1", x, y)
        set_floor("fl-abyss", x, y)
end

function sw1()
    SendMessage("door1", "openclose")
    SendMessage("door2", "openclose")
end

--                        1
--              01234567890123456789
renderLine(00, "####################")
renderLine(01, "o#Y################S")
renderLine(02, "# 1x#########o# c  #")
renderLine(03, "Y2Yx#  yw   ### YY #")
renderLine(04, "# #x  ## ##    yYY #")
renderLine(05, "#xxxB W  ## ###   y#")
renderLine(06, "Yx###### ## ###### #")
renderLine(07, "YyxxxB  accb   y   #")
renderLine(08, "Yxxsssss ###### ## #")
renderLine(09, " X sssss ###### ## #")
renderLine(10, "oXxxx          y   #")
renderLine(11, "###################o")
renderLine(12, "####################")
--              01234567890123456789
--                        1
oxyd_shuffle()
    ]]></el:luamain>
    <el:i18n>
      <el:string el:key="title">
        <el:english el:translate="false"/>
      </el:string>
    </el:i18n>
  </el:protected>
</el:level>