<?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="Biathlon" el:subtitle="" el:id="zephyr44"/>
      <el:version el:score="1" el:release="1" el:revision="1" el:status="released"/>
      <el:author el:name="Zephyr" el:email=""/>
      <el:copyright>Copyright © 2009 Zephyr</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/libmaze" el:id="lib/libmaze" el:release="2" el:preload="true"/>
      </el:compatibility>
      <el:modes el:easy="true" el:single="true" el:network="false"/>
      <el:score el:easy="-" el:difficult="-"/>
    </el:info>
    <el:luamain><![CDATA[
wo["ProvideExtralifes"] = false

ti["#"] = {"st_rawglass"}
ti["@"] = {"#ac_marble"}
ti["A"] = {"st_oneway_n"}
ti["B"] = ti["A"]..{"it_trigger",target="ammunition"}
ti["1"] = {"st_spitter"}
ti["O"] = {"st_oxyd_c"}
ti["P"] = cond(wo["IsDifficult"], ti["O"], ti["#"])

floor = {{"fl_ice"}, {"fl_rough"}, {"fl_mortar"}, {"fl_ice"}, {"fl_ice"}}

function snow(key, x, y)
    if key == " " then
      return floor[random(#floor)]
    else
      return ti[key]
    end
end

w, h = wo(snow, " ", {
         "#################",
         "#@    ###OOO#####",
         "#     1#PP#PP####",
         "#     ###OOO#####",
         "#     ###########",
         "#     #######   #",
         "# #B#####   # # #",
         "# #A#   # # # # #",
         "# # # # # # # # #",
         "# #   #   #   # #",
         "# ############# #",
         "#               #",
         "#################"})

function ammunition(value)
    if value then
        wo:add(YIN, {"it_extralife"})
        wo:add(YIN, {"it_extralife"})
        wo:add(YIN, {"it_extralife"})
        wo:add(YIN, {"it_extralife"})
        wo:add(YIN, {"it_extralife"})
        wo:add(YIN, {"it_extralife"})
    end
end
 ]]></el:luamain>
    <el:i18n>
      <el:string el:key="title">
        <el:english el:translate="false"/>
      </el:string>
    </el:i18n>
  </el:protected>
</el:level>
