<?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="Shark" el:subtitle="" el:id="duffy169"/>
      <el:version el:score="1" el:release="1" el:revision="0" el:status="released"/>
      <el:author  el:name="Jacob Scott" el:email="" el:homepage=""/>
      <el:copyright>Copyright © 2007 Jacob Scott</el:copyright>
      <el:license el:type="GPL v2.0 or above" el:open="true"/>
      <el:compatibility el:enigma="0.92">
      </el:compatibility>
      <el:modes el:easy="false" el:single="true" el:network="false"/>
      <el:score el:easy="-" el:difficult="-"/>
    </el:info>
    <el:luamain><![CDATA[
rooms_wide=6
rooms_high=2

levelw=1+(19*rooms_wide)
levelh=1+(12*rooms_high)

create_world( levelw, levelh)

fill_floor("fl-water", 0,0,levelw,levelh)

function renderLine( line, pattern)
    for i=1, strlen(pattern) do
        local c = strsub( pattern, i, i)
        if c =="#" then
            set_stone( "st-death", i-1, line)
        elseif c == "o" then
            oxyd( i-1, line)
            fill_floor("fl-metal", i-1,line, 1,1)
        elseif c == "*" then
            set_stone( "st-greenbrown", i-1, line)
        elseif c == "!" then
            fill_floor("fl-water", i-1,line, 1,1)
        elseif c=="z" then
            set_actor("ac-blackball", i-.5,line+.5, {player=0})
            fill_floor("fl-metal", i-1,line, 1,1)
        elseif c == "s" then
            set_item("it-spring1",i-1,line)
            fill_floor("fl-metal", i-1,line,1,1)
        elseif c=="+" then
            set_stone( "st-wood", i-1, line)
        elseif c=="x" then
            fill_floor("fl-metal", i-1,line, 1,1)
        elseif c == "R" then
            set_stone("st-bolder", i-1,line, {name="bolder1",direction=EAST})
        elseif c == "S" then
            set_stone("st-bolder", i-1,line, {name="bolder2",direction=SOUTH})
        elseif c == "U" then
            set_stone("st-bolder", i-1,line, {direction=NORTH})
        elseif c == "u" then
            set_item("it-trigger", i-1,line, {action="callback", target="funccb1"})
        elseif c == "r" then
            set_item("it-trigger", i-1,line, {action="callback", target="funccb2"})
        elseif c == "d" then
            set_item("it-trigger", i-1,line, {action="callback", target="funccb3"})
        elseif c == "l" then
            set_item("it-trigger", i-1,line, {action="callback", target="funccb4"})
        elseif c == "N" then
            set_item("it-trigger", i-1,line, {action="callback", target="funccb5"})
        elseif c == "t" then
            set_item("it-trigger", i-1,line, {invisible=1,action="callback", target="funccb1"})
        elseif c == "w" then
            set_item("it-trigger", i-1,line, {invisible=1,action="callback", target="funccb2"})
        elseif c == "f" then
            set_item("it-trigger", i-1,line, {invisible=1,action="callback", target="funccb3"})
        elseif c == "y" then
            set_item("it-trigger", i-1,line, {invisible=1,action="callback", target="funccb4"})
        elseif c=="e" then
            set_stone("st-oneway", i-1,line, {orientation=enigma.EAST})
        elseif c == "F" then
            set_item("it-flagblack",i-1,line)
            fill_floor("fl-metal", i-1,line, 1,1)
        end
    end    
end

-- Floor:  " "
-- Border: "#"
-- Oxyd:   "o"

renderLine(00,"###################################################################################################################")
renderLine(01,"#wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwf#")
renderLine(02,"#wR                d           xx     r               d            x                                             f#")
renderLine(03,"#w                             xxx      xxx        xx    xxxx     xx           xxx                  xxxx    r  d f#")
renderLine(04,"#wxxxxx            xx           xx    xxxxx        xxx    xxx     xxxx         xxx   xx      xxx     xxx         f#")
renderLine(05,"#wxxxxx  xxxx      xx                 xxxx                        xxxx              xxxx     xxxxx         xxxx  f#")
renderLine(06,"#wxzxsx  xFFx   xx              xxx                 xxxxx     r             xxx     xxxx  d  xxxx           xxx  f#")
renderLine(07,"#wxxxxx  xxxx   xx   r xxxx   xxxxx   u      xxx    x   x                   xxx     xxx       xx            xxx  f#")
renderLine(08,"#wxxxxx         xx     xxxx     xxxx        xxxxx   x r x     u      xx    xxxx                       xxx        f#")
renderLine(09,"#w                 r u xxxx                 xxxxx       x            xxx   xxx            r         xxxxx   u xx f#")
renderLine(10,"#w                                           xxxx   xxxxx            xxx                             xxx      xx f#")
renderLine(11,"#w wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwf x f#")
renderLine(12,"## ##########################################################################################################f x f#")
renderLine(13,"#* *******fyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy x f#")
renderLine(14,"#  f xxxo*      xxxxx    d                 l                                        xxx                          f#")
renderLine(15,"#  f xxxo*       xxx                          x                               xxxx  xxx                          f#")
renderLine(16,"#  f *****  xxx                       xxx   xxx           xxx                 xxx                      xxx   xxx f#")
renderLine(17,"#  f        xxx      xx    xxx       xxxxx  xxx      d   xxxxx             x  xxxx  l  xxx             xxx   xxx y#")
renderLine(18,"# Ny  xxx   xxx      xxx l  xxx     xxxx                  xx     xxx      xxx          xxx             xxx   xxx y#")
renderLine(19,"# St  xxx           xxx    xxxx               x      xx          xxx      xxx          xxx         xxx           y#")
renderLine(20,"# Ut  xxx                   xxx   xxx        xxx     xx         xx     xx                    xxx   xxx           y#")
renderLine(21,"# Ut  xxx                         xxx       xxxx     xx                xx           u        xxx   xxx         l y#")
renderLine(22,"# Ut  xxx                         xxx                                                        xxx                 y#")
renderLine(23,"# Utyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyuyyyyyyyyylyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy#")
renderLine(24,"###################################################################################################################")

oxyd_shuffle()

bolder1=enigma.GetNamedObject("bolder1")
bolder2=enigma.GetNamedObject("bolder2")

d=0

function funccb1()
    if d==0 then
        set_attribs(enigma.GetNamedObject("bolder1"), {direction=NORTH})
    end
end

function funccb2()
    if d==0 then
        set_attribs(enigma.GetNamedObject("bolder1"), {direction=EAST})
    end
end

function funccb3()
    if d==0 then
        set_attribs(enigma.GetNamedObject("bolder1"), {direction=SOUTH})
    end
end

function funccb4()
    if d==0 then
        set_attribs(enigma.GetNamedObject("bolder1"), {direction=WEST})
    end
end

function funccb5()
    if d==0 then
        set_attribs(enigma.GetNamedObject("bolder1"), {direction=NORTH})
        set_attribs(enigma.GetNamedObject("bolder2"), {direction=NORTH})
    end
    d=1
end
    ]]></el:luamain>
    <el:i18n>
      <el:string el:key="title">
        <el:english el:translate="false"/>
      </el:string>
    </el:i18n>
  </el:protected>
</el:level>

