<?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="Double play" el:subtitle="" el:id="just06"/>
      <el:version el:score="1" el:release="2" el:revision="4" el:status="released"/>
      <el:author el:name="JuSt" el:email="" el:homepage=""/>
      <el:copyright>Copyright © 2005 JuSt</el:copyright>
      <el:license el:type="GPL v2.0 or above" el:open="true"/>
      <el:compatibility el:enigma="1.10">
       <el:dependency el:path="lib/libpuzzle" el:id="lib/libpuzzle" el:release="3" el:preload="true"/>
      </el:compatibility>
      <el:modes el:easy="false" el:single="true" el:network="true"/>
      <el:comments><el:code>New API converted by R. Bourquin</el:code></el:comments>
      <el:score el:easy="-" el:difficult="-"/>
    </el:info>
    <el:luamain><![CDATA[
ti["  "] = {"fl_bluegray"}
ti["~~"] = {"fl_water"}
ti["bb"] = {"fl_bridge", name="bridge", state=OPEN}
ti["##"] = {"st_bluesand"}
ti["GG"] = {"st_rawglass"}
ti["++"] = {"st_box"}
ti[">W"] = {"st_oneway", orientation=EAST, color=WHITE}
ti[">B"] = {"st_oneway", orientation=EAST, color=BLACK}
ti["PP"] = {"st_pull"}
ti["SS"] = {"st_swap"}
ti["II"] = {"st_stoneimpulse"}
ti["XX"] = {"st_grate", flavor="cross"}
ti["M^"] = {"st_mail", orientation=NORTH}
ti["MV"] = {"st_mail", orientation=SOUTH}
ti["CC"] = {"st_coinslot", target="bridge"}
ti["L>"] = {"st_laser", orientation=EAST, state=ON}
ti["LS"] = {"st_laserswitch", target="doors#*"}
ti["MS"] = {"st_mirror", orientation=SLASH}
ti["MB"] = {"st_mirror", orientation=BACKSLASH}
ti["Ms"] = {"st_mirror", orientation=SLASH, transparent=true}
ti["Tn"] = {"st_mirror", flavor="triangle", orientation=NORTH, transparent=true}
ti["Tw"] = {"st_mirror", flavor="triangle", orientation=WEST, transparent=true}
ti["TS"] = {"st_mirror", flavor="triangle", orientation=SOUTH}
ti["|1"] = {"st_door", flavor="d", faces="ew", name="doors#"}
ti["|2"] = {"st_door", flavor="d", faces="ew", name="door2"}
ti["|3"] = {"st_door", flavor="d", faces="ew", name="door3"}
ti["K2"] = {"st_key", target="door2", code=2}
ti["K3"] = {"st_key", target="door3", code=3}
ti["P"] = {"st_puzzle", color=YELLOW}
ti[" c"] = {"it_coin_m"}
ti["Xk"] = ti["XX"] .. {"it_key", code=3}
ti["Xi"] = ti["XX"] .. {"it_key", code=2}
ti["tf"] = {"it_trigger", target="set_fire", safeaction=true}
ti["O1"] = {"st_oxyd", name="upper#", flavor="d"}
ti["O2"] = {"st_oxyd", name="lower#", flavor="d"}
ti[" A"] = {"#ac_marble_white"}
ti[" @"] = {"#ac_marble_black"}

wo(res.puzzle(ti, "P"), "  ", {
    "########################################CC################################################################O1O1O1O1##",
    "## @                >W          ####                        |1XXXXXXXXXXXXXX      ++  ++  ++  ++  ##    |3        ##",
    "## c                ##          ####  ##                    ##XXXXXXXXXXXXXX##  ++  ++  ++  ++tf++##    ########K2##",
    "##                  ##          ####  ##GGGGGGGGMsGGTwGGGGGG##XXXXXXXXXiXXXX##    ++  ++  ++  ++  ##              ##",
    "##      P0P0P0      ##            ##  ##GGGGGGGGGGGGGGGGGGGG##XXXXXXXXXXXXXX##  ++  ++  ++  ++  ++##              ##",
    "##      P0P0P0      ##          ++XX  ##L>GGTSGGGGGGGGGGMSLS##XXXXXXXXXXXXXX##    ++  ++  ++  ++                  ##",
    "##########P0####################IIII########GG##GG##GG##GG##################################################M^MV####",
    "##      P0P0P0      ##        ++II++  ##GGGGGGGGGGGGGGGGGGGG##XXXXXXXXXXXXXX##~~~~~~~~~~~~~~~~~~~~~~              ##",
    "##      P0P0P0      ##  PP    ++++++  ##GGGGGGGGGGGGGGGGGGGG##XXXkXXXXXXXXXX##  ~~        ++      ##              ##",
    "##                  ##                ##GGGGMBGGTwGGTnGGTwGG##XXXXXXXXXXXXXX##  ~~  ++        ++  ##              ##",
    "##                  ##          SS    ##                    ##XXXXXXXXXXXXXX##    ++~~~~~~~~~~~~~~##    ########K3##",
    "## A                >B                bb                    |1XXXXXXXXXXXXXX                      ##    |2        ##",
    "##########################################################################################################O2O2O2O2##"})

wo:shuffleOxyd({"upper#*", "lower#*", min=4})

function set_fire(value, sender)
    fl(sender):setfire()
end
 ]]></el:luamain>
    <el:i18n>
      <el:string el:key="title">
        <el:english el:translate="false"/>
      </el:string>
    </el:i18n>
  </el:protected>
</el:level>
