<?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="Stick Balancing" el:subtitle="" el:id="20130407icewing072"/>
      <el:version el:score="1" el:release="1" el:revision="1" el:status="released"/>
      <el:author el:name="Icewing" el:email=""/>
      <el:copyright>Copyright © 2013 Icewing</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:score el:easy="00:25" el:difficult="00:31"/>
    </el:info>
    <el:luamain><![CDATA[
wo["ConserveLevel"] = false
ti[" "] = {"fl_abyss"}
ti["."] = {"fl_metal"}
ti["v"] = {"fl_slope_ts"}
ti["b"] = {"fl_bridge","bridge"}
ti["@"] = {"#ac_marble_black", name="black"}
ti["p"] = ti["v"] .. {"#ac_pearl", name="pearl", owner=DEFAULT, controllers=CTRL_NONE, essential=INDISPENSABLE }
ti["o"] = {"it_meditation"}

if wo["IsDifficult"] then
  ti["S"] = {"st_switch", target="counter", action="signal"}
  ti["T"] = ti[" "]
else
  ti["T"] = {"st_switch", target="counter", action="signal"}
  ti["S"] = ti[" "]
end

wo(ti, ".", {
    "                    ",
    "         o          ",
    "         b          ",
    "   vvvvvvvvvvvvvv   ",
    "   vvvvvvpvvvvvvv   ",
    "   vvvvvvvvvvvvvv   ",
    "                    ",
    " S................S ",
    "  ................  ",
    " T................T ",
    "  .......@........  ",
    " S................S ",
    "                    "})

if wo["IsDifficult"] then
  wo:add({"ot_counter", "counter", state=0, target="bridge", action_3="open", action_4="close"})
else
  wo:add({"ot_counter", "counter", state=0, target="bridge", action_1="open", action_2="close"})
end

wo:add({"ot_rubberband", anchor1="black", anchor2="pearl", length=6.0, min=6.0, max=6.0})
]]></el:luamain>
    <el:i18n>
      <el:string el:key="title">
        <el:english el:translate="false"/>
      </el:string>
    </el:i18n>
  </el:protected>
</el:level>
