<?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="Dialers" el:subtitle="" el:id="edward05"/>
      <el:version el:score="1" el:release="1" el:revision="1" el:status="released"/>
      <el:author  el:name="Edward" el:email="" el:homepage=""/>
      <el:copyright>Copyright © 2006 Edward</el:copyright>
      <el:license el:type="Donated to Enigma under the projects license" el:open="true"/>
      <el:compatibility el:enigma="0.92">
      </el:compatibility>
      <el:modes el:easy="true" el:single="true" el:network="false"/>
      <el:comments>
        <el:code>Lua 5.1 and XML converted by Leveladministrators</el:code>
      </el:comments>
      <el:score el:easy="2:13" el:difficult="2:18"/>
    </el:info>
    <el:luamain><![CDATA[
create_world(20,13)

fill_floor("fl-abyss")
oxyd_default_flavor = "a"
doorcounter = 0

function renderLine(line,pattern)
    for i=1, strlen(pattern) do
        local c=strsub(pattern,i,i)

        if c=="#" then
            set_stone("st-plain",i-1,line)
        elseif c=="." then
            set_floor("fl-metal",i-1,line)
        elseif c=="X" then
            oxyd(i-1,line)

        elseif c=="0" then
            set_stone("st-fourswitch",i-1,line,{action="open",target="d0"})
        elseif c=="1" then
            set_stone("st-fourswitch",i-1,line,{action="open",target="d1"})
        elseif c=="2" then
            set_stone("st-fourswitch",i-1,line,{action="open",target="d2"})
        elseif c=="3" then
            set_stone("st-fourswitch",i-1,line,{action="open",target="d3"})
        elseif c=="4" then
            set_stone("st-fourswitch",i-1,line,{action="open",target="d4"})
        elseif c=="5" then
            set_stone("st-fourswitch",i-1,line,{action="open",target="d5"})
        elseif c=="F" then
            set_stone("st-fourswitch",i-1,line)

        elseif c=="O" then
            set_item("it-vortex-open",i-1,line,{name="15B",targetx=17.5,targety=2.5})
            set_floor("fl-metal",i-1,line)
        elseif c=="o" then
            set_item("it-vortex-open",i-1,line,{name="18C",targetx=14.5,targety=1.5})
            set_floor("fl-metal",i-1,line)
        elseif c=="Q" then
            set_item("it-vortex-open",i-1,line,{targetx=1.5,targety=11.5})
            set_floor("fl-metal",i-1,line)
        elseif c=="q" then
            set_item("it-vortex-open",i-1,line,{targetx=10.5,targety=7.5})
            set_stone("st-door_a",i-1,line,{name="blocker"})
            set_floor("fl-metal",i-1,line)

        elseif c=="v" then
            set_floor("fl-gradient1",i-1,line,{type=1})
        elseif c=="^" then
            set_floor("fl-gradient1",i-1,line,{type=2})
        elseif c==">" then
            set_floor("fl-gradient1",i-1,line,{type=3})
        elseif c=="<" then
            set_floor("fl-gradient1",i-1,line,{type=4})
        elseif c=="l" then
            set_floor("fl-gradient1",i-1,line,{type=5})
        elseif c=="L" then
            set_floor("fl-gradient1",i-1,line,{type=7})
        elseif c=="r" then
            set_floor("fl-gradient1",i-1,line,{type=6})
        elseif c=="R" then
            set_floor("fl-gradient1",i-1,line,{type=8})
        elseif c=="a" then
            set_floor("fl-gradient1",i-1,line,{type=9})
        elseif c=="b" then
            set_floor("fl-gradient1",i-1,line,{type=10})
        elseif c=="c" then
            set_floor("fl-gradient1",i-1,line,{type=11})
        elseif c=="d" then
            set_floor("fl-gradient1",i-1,line,{type=12})

        elseif c=="D" then
            set_stone("st-door-v",i-1,line,{name="d"..tostring(5-doorcounter)})
            doorcounter = doorcounter + 1
            if (not difficult) then
                set_floor("fl-abyss",i-1,line, {friction=0} )
            else
                set_floor("fl-abyss",i-1,line, {friction=0.1} )
            end

        elseif c=="x" then
            set_item("it-trigger",i-1,line,{action="open",target="blocker"})

        elseif c=="-" then
            if not difficult then
                set_floor("fl-abyss",i-1,line, {friction=0})
            else
                set_floor("fl-abyss",i-1,line, {friction=0.1})
            end
        end
    end
end

renderLine(00,"########X###########")
renderLine(01,"#x#54320.....QO# X #")
renderLine(02,"#-DDDDDD.......#XoX#")
renderLine(03,"###FFFF1X......# X #")
renderLine(04,"#lr   lvvvvvvvr#####")
renderLine(05,"#>< lvad^^^^^bcvvvr#")
renderLine(06,"#>< L^^R#####L^^^b<#")
renderLine(07,"#><     #X.X#    ><#")
renderLine(08,"#>cvvvvr#####lvvva<#")
renderLine(09,"#L^^^^bcvvvvvad^^^R#")
renderLine(10,"######L^^^^^^^R#####")
renderLine(11,"#.q# ###########    ")
renderLine(12,"####                ")

set_item("it-spoon",1,11)

set_actor("ac-blackball",1.5,4.5,{player=0})
set_actor("ac-bug",5,6)
    ]]></el:luamain>
    <el:i18n>
      <el:string el:key="title">
        <el:english el:translate="true"/>
      </el:string>
    </el:i18n>
  </el:protected>
</el:level>
