<?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="- Meditation -" el:subtitle="" el:id="ant23"/>
      <el:version el:score="1" el:release="2" el:revision="4" el:status="released"/>
      <el:author  el:name="Petr Machata" el:email="" el:homepage=""/>
      <el:copyright>Copyright © 2003 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="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_metal"}
ti["#"] = {"st_puzzle", cluster=1}
if wo["IsDifficult"] then
    ti["*"] = ti["#"]
    ti["T"] = {"it_trigger", target="d%%"}
    ti["U"] = ti({"it_meditation_hollow"}) .. {"st_door", "d%%", flavor="b"}
else
    ti["*"] = {"st_puzzle", cluster=1, hollow=true}
    ti["T"] = {"it_trigger", target="m%%", action="flip"}
    ti["U"] = ti({"it_meditation_hill", "m%%"}) .. {"st_door", flavor="b", state=OPEN}
    wo["MeditationStrength"] = 1.3
end
ti["W"] = {"st_plop_slate", name="boxes#"}
ti["@"] = {"#ac_pearl", name="balls#", target="@boxes#*", essential=INDISPENSABLE}

local resolver = res.autotile(ti, {"a", "d", "T"}, {"A", "D", "U"})
wo(resolver, " ", {
    "#####***####***#####",
    "#@  #          #  @#",
    "#   #          #   #",
    "#  W            W  #",
    "###       a      ###",
    "*         b        *",
    "*       AB CD      *",
    "*         c        *",
    "###       d      ###",
    "#  W            W  #",
    "#   #          #   #",
    "#@  #          #  @#",
    "#####***####***#####"})

local boxes = no["boxes#*"]
for obj in no["balls#*"] do
    wo:add({"ot_rubberband", anchor1=obj, anchor2=boxes:nearest(obj), strength=10.0})
end
 ]]></el:luamain>
    <el:i18n>
      <el:string el:key="title">
        <el:english el:translate="false"/>
      </el:string>
    </el:i18n>
  </el:protected>
</el:level>
