<?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="Walk the Dog" el:subtitle="" el:id="luc04"/>
      <el:version el:score="1" el:release="2" el:revision="1" el:status="released"/>
      <el:author  el:name="Lukas Schüller" el:email="Lucky_Luc@web.de" el:homepage=""/>
      <el:copyright>Copyright © 2005 Lukas Schüller</el:copyright>
      <el:license el:type="GPL v2.0 or above" el:open="true"/>
      <el:compatibility el:enigma="1.10"/>
      <el:modes el:easy="true" el:single="true" el:network="false"/>
      <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_marble"}
ti["-"] = {"fl_rough"}
ti[" "] = {"fl_abyss"}
ti["#"] = {"st_redbrown"}
ti["G"] = ti[" "] .. {"st_rawglass"}
ti["Q"] = {"st_quake", name="quaker"}
ti["B"] = {"st_boulder", name="dog"}
ti["f"] = ti[" "] .. {"it_trigger", invisible=true}
ti["+"] = ti["B"] .. {"fl_marble", name="start"}
ti["<"] = {"st_laser", name="laser", orientation=WEST}
ti["l"] = {"it_trigger", target="laser"}
ti["3"] = {"it_trigger", target="turn_boulder", _todir=NORTH}
ti["2"] = {"it_trigger", target="turn_boulder", _todir=EAST}
ti["1"] = {"it_trigger", target="turn_boulder", _todir=SOUTH}
ti["0"] = {"it_trigger", target="turn_boulder", _todir=WEST}
ti["O"] = {"st_oxyd", flavor="d"}
ti["@"] = ti["-"] .. {"#ac_marble_black"}

wo(ti, ".", {
    "Q###################",
    "#+f...f......f.....#",
    "#.f.f.f.fGff...fGf.#",
    "#...f...GO...f.GOG.<",
    "#Gfffffff###ff.fGf.#",
    "#O.....f##3##..fl..#",
    "#Gffff.f#0@2#f.ffff#",
    "#......f##1##......#",
    "#.fffffff###ffffGf.#",
    "#....f.f...f....OG.#",
    "#.f..f...f...fffGf.#",
    "#.f....f.f.f.......#",
    "####################"})

wo:shuffleOxyd()

function turn_boulder(value, sender)
    if value == true then
        if no["dog"]:exists() then
            no["dog"]:orientate(sender["_todir"])
        else
            wo[po["start"]] = ti["B"]
            if wo["IsDifficult"] then
                no["quaker"]:toggle()
            end
        end
    end
end
 ]]></el:luamain>
    <el:i18n>
      <el:string el:key="title">
        <el:english el:translate="false"/>
      </el:string>
    </el:i18n>
  </el:protected>
</el:level>
