<?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="Automaton Magic" el:subtitle="" el:id="ant07"/>
      <el:version el:score="2" el:release="2" el:revision="7" el:status="released"/>
      <el:author el:name="Petr Machata" el:email="" el:homepage=""/>
      <el:copyright>Copyright © 2002 Petr Machata</el:copyright>
      <el:license el:type="GPL v2.0 or above" el:open="true"/>
      <el:compatibility el:enigma="1.10"/>
      <el:modes el:easy="false" el:single="true" el:network="false"/>
      <el:score el:easy="-" el:difficult="-"/>
    </el:info>
    <el:luamain><![CDATA[
ti[" "] = {"fl_sand"}
ti["~"] = {"fl_water"}
ti["#"] = ti["~"] .. {"st_greenbrown"}
ti["O"] = ti["~"] .. {"st_oxyd", flavor="a", name="oxyds#"}
ti["m"] = {"it_magicwand"}
ti["B"] = {"st_boulder_e", name="the_boulder"}
ti["+"] = ti["~"] .. {"it_trigger", target="turn_boulder", action_1="callback", invisible=true}
ti["A"] = {"ac_marble_black", 0.0, 0.5}

wo(ti, " ", {
    "####O##########O####",
    "#~~~~          ~~~~#",
    "#~                ~#",
    "#~                ~#",
    "O~  +   B      +  ~O",
    "#                  #",
    "#       m A        #",
    "#                  #",
    "O~  +          +  ~O",
    "#~                ~#",
    "#~                ~#",
    "#~~~~          ~~~~#",
    "####O##########O####"})

function turn_boulder(state, sender)
    if st(sender) == no["the_boulder"] then
        no["the_boulder"]:turn()
    end
end

wo:shuffleOxyd({no["oxyds#*"]:sort("circular"), circular=true})
 ]]></el:luamain>
    <el:i18n>
      <el:string el:key="title">
        <el:english el:translate="false"/>
      </el:string>
    </el:i18n>
  </el:protected>
</el:level>
