<?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="Little Bit of Everything" el:subtitle="" el:id="duffy34"/>
      <el:version el:score="1" el:release="1" el:revision="1" el:status="released"/>
      <el:author  el:name="Jacob Scott" el:email="" el:homepage=""/>
      <el:copyright>Copyright © 2003 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="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[
rooms_wide=4
rooms_high=4

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

create_world( levelw, levelh)
enigma.TwoPlayerGame = 1

fill_floor("fl-rough", 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-greenbrown", i-1, line)
        elseif c =="w" then
            set_stone( "st-glass", i-1, line)
        elseif c =="m" then
            set_stone( "st-brick", i-1, line)
        elseif c =="B" then
            set_stone( "st-brownie", i-1, line)
        elseif c =="R" then
            set_stone( "st-rock6", i-1, line)
        elseif c =="x" then
            set_stone( "st-rock5", i-1, line)
        elseif c =="n" then
            set_stone( "st-rock4", i-1, line)
        elseif c =="v" then
            set_stone( "st-rock3", i-1, line)
        elseif c ==";" then
            set_stone( "st-metal", i-1, line)
        elseif c =="/" then
            set_stone( "st-rock1", i-1, line)
        elseif c =="H" then
            set_stone( "st-bluegray", i-1, line)
        elseif c=="t" then
            set_stone( "st-actorimpulse",i-1,line)
        elseif c == "o" then
            oxyd( i-1, line)
        elseif c == "!" then
            abyss(i-1,line)
        elseif c=="+" then
            set_stone( "st-wood", i-1, line)
        elseif c == "=" then
            fill_floor("fl-space", i-1,line, 1,1)
        elseif c=="z" then
            set_actor("ac-blackball", i-.5,line+.5)
        elseif c=="y" then
            set_actor("ac-whiteball", i-.5,line+.5)
        elseif c == "d" then --1-d
            set_floor("fl-gradient",  i-1,  line, {type=1})
        elseif c == "u" then --2-u
            set_floor("fl-gradient",  i-1,  line, {type=2})
        elseif c == "r" then --3-r
            set_floor("fl-gradient",  i-1,  line, {type=3})
        elseif c == "l" then --4-l
            set_floor("fl-gradient",  i-1,  line, {type=4})
        elseif c == "1" then --ur
            set_floor("fl-gradient",  i-1,  line, {type=11})
        elseif c == "3" then --dl
            set_floor("fl-gradient",  i-1,  line, {type=9})
        elseif c == "7" then --dr
            set_floor("fl-gradient",  i-1,  line, {type=12})
        elseif c == "9" then --ul
            set_floor("fl-gradient",  i-1,  line, {type=10})
        elseif c=="S" then
            set_stone("st-oneway-s", i-1, line)
        elseif c=="N" then
            set_stone("st-oneway-n", i-1, line)
        elseif c=="E" then
            set_stone("st-oneway-e", i-1, line)
        elseif c=="W" then
            set_stone("st-oneway-w", i-1, line)
        elseif c=="g" then
            draw_stones("st-grate1",{i-1,line}, {1,1}, 1)
        elseif c == "X" then
            draw_stones("st-yinyang1", { i-1,line}, {0,1},1)
        elseif c=="a" then
            set_floor("fl-bridge", i-1,line, {name="bridge1", type="x"})
        elseif c=="b" then
            set_floor("fl-bridge", i-1,line, {name="bridge2", type="x"})
        elseif c=="c" then
            set_floor("fl-bridge", i-1,line, {name="bridge3", type="x"})
        elseif c=="D" then
            set_floor("fl-bridge", i-1,line, {name="bridge4", type="x"})
        elseif c=="e" then
            set_floor("fl-bridge", i-1,line, {name="bridge5", type="x"})
        elseif c=="f" then
            set_floor("fl-bridge", i-1,line, {name="bridge6", type="x"})
        elseif c=="G" then
            set_floor("fl-bridge", i-1,line, {name="bridge7", type="x"})
        elseif c=="h" then
            set_floor("fl-bridge", i-1,line, {name="bridge8", type="x"})
        elseif c=="i" then
            set_floor("fl-bridge", i-1,line, {name="bridge9", type="x"})
        elseif c=="j" then
            set_floor("fl-bridge", i-1,line, {name="bridge10", type="x"})
        elseif c=="`" then
            set_item("it-wormhole", i-1, line, {strength=1,targetx="59.5",targety="22.5", name="ww1"})
        elseif c=="@" then
            set_item("it-wormhole", i-1, line, {strength=1,targetx="40.5",targety="26.5", name="ww2"})
        elseif c=="~" then
            set_item("it-wormhole", i-1, line, {strength=1,targetx="2.5",targety="14.5", name="ww3"})
        elseif c=="$" then
            set_item("it-wormhole", i-1, line, {strength=1,targetx="10",targety="42.5", name="ww4"})
        elseif c=="%" then
            set_item("it-wormhole", i-1, line, {strength=1,targetx="74.5",targety="46.5", name="ww5"})
        elseif c=="^" then
            set_item("it-wormhole", i-1, line, {strength=1,targetx="71.5",targety="6.5", name="ww6"})
        elseif c=="&" then
            set_item("it-wormhole", i-1, line, {strength=1,targetx="49",targety="30.5", name="ww7"})
        elseif c=="8" then
            set_item("it-wormhole", i-1, line, {strength=1,targetx="48.5",targety="40.5", name="ww8"})
        elseif c=="p" then
            set_item("it-wormhole", i-1, line, {strength=7,targetx="71.5",targety="6.5"})
        elseif c=="0" then
            set_item("it-wormhole", i-1, line, {strength=8,targetx="59.5",targety="15.5"})
        elseif c=="q" then
            set_item("it-wormhole", i-1, line, {strength=1,targetx="37.5",targety="25.5"})
        elseif c=="V" then
            set_stone("st-switch", i-1,line, {action="callback",target="funcc"})
        end
    end
end

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

renderLine(00,";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;")
renderLine(01,";ggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg;")
renderLine(02,";g;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;g;")
renderLine(03,";g;   ;;       ;   ;        ;                 ;            p         ;    ;g;")
renderLine(04,";g;            ;      ;;    ;                 ;           ;;;;;;     ;    ;g;")
renderLine(05,";g;    p ;         ;          p;              ;                ; ;;;;;    ;g;")
renderLine(06,";g;  ;;    ;;  ;   p     ;  ;  ;       p      ;                ;   p      ;g;")
renderLine(07,";g;      ;     ;     ;;  ;  ;  ;              ;                ; ;;;;;    ;g;")
renderLine(08,";g; q    ;  p  ;   ;     ;                                ;;;;;;     ;    ;g;")
renderLine(09,";g;o     ;         ;     ;                                 p         ;    ;g;")
renderLine(10,";g;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;g;")
renderLine(11,";ggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg;")
renderLine(12,"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxBBBBBBBBBBBBBBBBBBBwwwwwwwwwwwwwwwwwwww")
renderLine(13,"x   lllrrrrllrll   xog g g g g g g g gBo                 w                 0w")
renderLine(14,"x   lllrrrrllrll   xggggggggggggggggggBggggggggggggggggg w    w        0    w")
renderLine(15,"x   lllrrrrllrll   xg                gBg              qg w    w             w")
renderLine(16,"xxxxxxxxxxxxxxxxxxuxg gggggggggggggg gBg ggggggggggggg g wo   w    0        w")
renderLine(17,"x rrrlllrrrrll1x   xg g            g gBg g           g g wwwwww        0   0w")
renderLine(18,"xuxxxxxxxxxxxxlxdxxxg g gggggggggg g gBg g ggggg ggg g g w           0      w")
renderLine(19,"xdx lllrrllrll7xdx  g g            g gBg g g   g g g g g w***** w0        0 w")
renderLine(20,"xux xxxxxxxxxxxxdxdxg gggggggggggggg gBg g ggg g g ggg g w    * w  0    0   w")
renderLine(21,"xdx llllllllllll7xdxg                gBg gg  g g g     g w    * w     0   0 w")
renderLine(22,"xuxxxxxxxxxxxxxxxx xggggggggggggggggggBgg gggg g ggggggg w    * w 0   q     w")
renderLine(23,"x lrlrlrlrlrlrlrlr xg g g g g g g g g B g      g         w    * w   0    0  w")
renderLine(24,"########################SS#############RRRRRRddddddRRRRRRwwwwwwwwwwwwwwwwwwww")
renderLine(25,"#oX X X Xa   #                 #rrrrr #     R======R     m                  m")
renderLine(26,"#XX X X Xb z #                 #rrrr9u#     RddddddR     m mmmmmmmmmmmmmmmm m")
renderLine(27,"#   X X Xc   #                 #rrr9uu#     R======R     m mq             m m")
renderLine(28,"#XXXX X XD   #                 #rr9uuu#     RddddddR     m mmmmmmmmmmmmmo m m")
renderLine(29,"#     X Xe   #                 #r9uuuu#     R      R     m                m m")
renderLine(30,"##########   E  V              g9uuuuu#     R      R=====mmmmmmmmmmmmmmmmmm m")
renderLine(31,"#     X Xf   #                 #g######     R      R=====m                  m")
renderLine(32,"#XXXX X XG   #                        #     RRRRRRRR=====m mmmmmmmmmmmmmmmmmm")
renderLine(33,"#   X X Xh   #                        #     lllll ====H==m                  m")
renderLine(34,"#XX X X Xi y #                        #     lllll ====H==mmmmmmmmmmmmmmmmmm m")
renderLine(35,"#oX X X Xj   #                        #     lllll ====H==                   m")
renderLine(36,"####################                  #HHHHHHHHHHHHHHHHHHmmmmmmmmmmmmmmmmmmmm")
renderLine(37,"/qddddddddddddddddq#                  #   v       v      v        t   t     t")
renderLine(38,"/r3dddddddddddddd1l#                  # v vvvvvvv vv vvv vtt tt t t t   ttt t")
renderLine(39,"/rr7uuuuuuuuuuuu9ll#                  # v v  v     v   v v t  t t ttttt t t t")
renderLine(40,"/rrl3dddddddddd1rll#                  # v v vv v v v vvv v tttt t    t  t t t")
renderLine(41,"/rrlr7uuuuuuuu9lrll#                  # v      vvv v v   v    t tttt t tt   t")
renderLine(42,"/rrlrl        rlrll#                  # vvvvvv     v v vvv tt t t t    t  ttt")
renderLine(43,"/rrlr1dddddddd3lrll#                  #      vvvvvvv v   v t  t t t tttt tt t")
renderLine(44,"/rrl9uuuuuuuuuu7rll#                  #vvvvv   v   v vvo v t tt t ttt     t t")
renderLine(45,"/rr1dddddddddddd3ll#                  #      v   v   v   v t  t     ttttt   t")
renderLine(46,"or9uuuuuuuuuuuuuu7l#                  #vvvvvvvvvvvvvvvSvvv tt tttt tt t     t")
renderLine(47,"/quuuuuuuuuuuuuuuuq#    q`@~$%^&8q    W                  W ot       t       t")
renderLine(48,"///////////////////####################vvvvvvvvvvvvvvvvvvvttttttttttttttttttt")

oxyd_shuffle()

set_floor("fl-gradient",  1,  37, {type=9})
set_floor("fl-gradient",  1,  47, {type=10})
set_floor("fl-gradient",  18,  37, {type=11})
set_floor("fl-gradient",  18,  47, {type=12})

through=0
function funcc()
    if through==1 then
        through=0
    end
    if through==0 then
        SendMessage("bridge1", "openclose")
        SendMessage("bridge2", "openclose")
        SendMessage("bridge3", "openclose")
        SendMessage("bridge4", "openclose")
        SendMessage("bridge5", "openclose")
        SendMessage("bridge6", "openclose")
        SendMessage("bridge7", "openclose")
        SendMessage("bridge8", "openclose")
        SendMessage("bridge9", "openclose")
        SendMessage("bridge10", "openclose")
    end
    through=through+1
end
    ]]></el:luamain>
    <el:i18n>
      <el:string el:key="title">
        <el:english el:translate="false"/>
      </el:string>
    </el:i18n>
  </el:protected>
</el:level>
