<?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="Trigger Happy" el:subtitle="" el:id="xerxes03"/>
      <el:version el:score="1" el:release="1" el:revision="0" el:status="released"/>
      <el:author  el:name="Xerxes M. Dynatos" el:email="" el:homepage=""/>
      <el:copyright>Copyright © 2005 Xerxes M. Dynatos</el:copyright>
      <el:license el:type="GPL v2.0 or above" el:open="true"/>
      <el:compatibility el:enigma="0.92">
      </el:compatibility>
      <el:modes el:easy="false" el:single="true" el:network="false"/>
      <el:comments>
        <el:code>Lua 5.1 and XML converted by Leveladministrators</el:code>
      </el:comments>
      <el:score el:easy="-" el:difficult="-"/>
    </el:info>
    <el:luamain><![CDATA[
-- Licensed under GPL v2.0 or above 

levelw=42
levelh=18

create_world( levelw, levelh)

fill_floor("fl-tigris", 0,0,levelw,levelh) --fl-leaves --fl-acblack

function renderLine( line, pattern)
    for i=1, strlen(pattern) do
        local c = strsub( pattern, i, i)
        if c =="#" then
            set_stone( "st-glass1", i-1, line)

        elseif c == "=" then
            set_stone( "st-glass", i-1, line)

        elseif c == "o" then
            oxyd( i-1, line)

        elseif c == "H" then
            set_stone( "st-glass1_hole", i-1, line)

                elseif c == "!" then
            fill_floor("fl-water", i-1,line, 1,1)

        elseif c=="z" then
            set_actor("ac-blackball", i-.5,line+.5)

        elseif c=="+" then
            set_stone( "st-wood", i-1, line)

        elseif c=="A" then
            doorv(i-1,line,{name="door1"})

        elseif c=="a" then
            set_stone("st-switch", i-1, line, {action="onoff", target="laser1"})

        elseif c == "K" then
            set_stone( "st-knight", i-1, line)
            set_item("it-key_a",i-1, line)

        elseif c == "k" then
            set_stone( "st-knight", i-1, line)
            set_item("it-key_b",i-1, line)

        elseif c == "y" then
            set_stone("st-key_a", i-1, line, {action="openclose", target="door3"})

        elseif c == "f" then
            set_stone("st-key_b", i-1, line, {action="openclose", target="door5"})

        elseif c=="E" then
            doorh(i-1,line,{name="door4"})

        elseif c=="F" then
            doorh(i-1,line,{name="door5"})

        elseif c=="r" then
            doorv(i-1,line,{name="door3"})

        elseif c == "m" then
            set_stone( "st-mirror-p/", i-1, line,{transparent=TRUE})

        elseif c == "G" then
            set_stone( "st-mirror-p\\", i-1, line,{transparent=TRUE})

        elseif c == "g" then
            set_stone( "st-mirror-p/", i-1, line,{transparent=TRUE})

        elseif c == "I" then
            set_stone( "st-mirror-p-", i-1, line,{transparent=TRUE})

        elseif c == "B" then
            set_stone( "st-laser-w", i-1, line, {name="laser1",on=TRUE,dir=WEST})

        elseif c == "h" then
            set_item( "it-hammer", i-1, line)

        elseif c == "b" then
            set_stone("st-switch", i-1, line, {action="onoff", target="laser1"})

        elseif c=="C" then
            set_stone( "st-door_c", i-1, line, {name="door2"})

        elseif c=="c" then
            set_stone("st-switch", i-1, line, {action="openclose", target="door2"})

        elseif c == "S" then
            set_stone( "st-shogun-s", i-1, line)

        elseif c == "M" then
            set_stone( "st-shogun-m", i-1, line)

        elseif c == "L" then
            set_stone( "st-shogun-l", i-1, line)

        elseif c == "d" then
            shogundot3(i-1, line, {action="openclose", target="door1"})

        elseif c == "D" then
            set_stone( "st-stone_break", i-1, line)

        elseif c == "$" then
            set_item( "it-coin1", i-1, line)

        elseif c== "e" then
            set_stone("st-coinslot", i-1, line, {action="openclose", target="door4"})

        elseif c== "T" then
            set_item("it-trigger", i-1, line, {action="onoff", target="laser1"})

        elseif c== "t" then
            set_item("it-trigger", i-1, line, {action="open", target="door1"})

        elseif c== "i" then
            set_stone("st-laserswitch", i-1, line, {action="openclose", target="door4"})

        end
    end    
end

-- Floor:  " "
-- Border: "#"
-- Oxyd:   "o"

renderLine(00,"m#########m#############m====B============")
renderLine(01,"#TTTT##z  #       tt  o =     !!=f      o=")
renderLine(02,"# STTTTTTT#     +       = ++  !!=   tt   =")
renderLine(03,"#  M ##   A             =  ++ !!=        =")
renderLine(04,"# L  ##a###     t t     = ++  !!======   =")
renderLine(05,"#    ##      t   ttt       + D!!!!!!!K t =")
renderLine(06,"#TTTT##                      D!!!!!!!k t =")
renderLine(07,"#    ##                $=     !!======   =")
renderLine(08,"# d  ## +  tttttttt     =     !!=        =")
renderLine(09,"#    ##                 =     !!=   tt   =")
renderLine(10,"#TTTT##       ttt       =     !!=        =")
renderLine(11,"#   h##ttt            o =     !!ie      o=")
renderLine(12,"##################E#####==================")
renderLine(13,"==================F=======================")
renderLine(14,"=o rttTtttttttttttt ttttttDDttt  tTttttDo=")
renderLine(15,"G  =       Ttttttt+tttttttDDt tt TtttttD y")
renderLine(16,"=o =ttt ttttttt tttttTttttDDtttt tt tTtDo=")
renderLine(17,"G=========================gg====I======g==")

oxyd_shuffle()

display.SetFollowMode(display.FOLLOW_SCROLLING)
    ]]></el:luamain>
    <el:i18n>
      <el:string el:key="title">
        <el:english el:translate="false"/>
      </el:string>
    </el:i18n>
  </el:protected>
</el:level>
