Dear friends

I have been playing Enigma for several years. It have a lot of fun.

I am new on this list and I would like to share my first three levels
with the community. My intention was to find new playing concepts that
could inspire others to develop new levels, too.

The levels are:
20180613gerhard300.xml  Draw the Oxyds yourself
20200427gerhard300.xml  Bug Using
20210429gerhard300.xml  Café

I hope I did everything well.

Gerhard
<?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="Draw the Oxyds yourself" el:id="20180613gerhard300"/>
      <el:version el:score="1" el:release="1" el:revision="1" el:status="stable"/>
      <el:author  el:name="Gerhard" el:email="gerhard.eni...@gmx-topmail.de"/>
      <el:copyright>Copyright © 2023 Gerhard</el:copyright>
      <el:license el:type="GPL v2.0" 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:20" el:difficult="00:30"/>
    </el:info>
    <el:luamain><![CDATA[

wo["AutoRespawn"] = true

ti[" "] = {"fl_lawn"}
corner  = {"fl_lawn", name="corner#"}

wo(ti," ",20,13)
wo:drawBorder({0,0},20,13,{"st_panel", cluster=1})
wo[{ 1, 1}] = corner
wo[{ 1,11}] = corner
wo[{18, 1}] = corner
wo[{18,11}] = corner
wo[{ 9, 6}] = {"it_pencil", name="pencil"}
wo[{10, 6}] = {"it_brush"}
wo[{ 2,11}] = {"it_document", text="welcome"}
wo[{ 1,11}] = {"#ac_marble"}
wo:add({"ot_timer", target="renewPencil", interval=0.1})

if not wo["IsDifficult"] then
  wo[{1,11}] = {"it_trigger", target="setOxyd"}
end

function makeOxyd(value, sender)
  wo:add({"ot_timer", loop=false, target="setOxyd"})
end

function setOxyd(value, sender)
  local cross = po(no["cross#*"])
  if #cross >= 2 then
    wo[po["corner#*"]] = {"it_document", text="congratulation"}
  end
  wo[cross] = {"it_document", text="trapped"}
  wo[cross] = {"st_oxyd"}
  wo:shuffleOxyd()
end

function renewPencil(value, sender)
  local pencil = no["pencil"]
  if pencil:is("it_cross") then
    pencil["name"] = nil     -- this suppresses a rename warning
    pencil["name"] = "cross#"
    wo:add(YIN, {"it_pencil", name="pencil", target="makeOxyd"})
  end
end

    ]]></el:luamain>
    <el:i18n>
      <el:string el:key="welcome">
        <el:english>Draw the oxyds yourself.</el:english>
        <el:translation el:lang="de">Zeichne die Oxyds selbst.</el:translation>
      </el:string>
      <el:string el:key="trapped">
        <el:english>You are trapped. Restart this level.</el:english>
        <el:translation el:lang="de">Du bist gefangen. Starte das Level neu.</el:translation>
      </el:string>
      <el:string el:key="congratulation">
        <el:english>Concratulation, you are almost done.</el:english>
        <el:translation el:lang="de">Herzlichen Glückwunsch, Du hast es fast geschafft.</el:translation>
      </el:string>
    </el:i18n>
  </el:protected>
</el:level>
<?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="Bug Using" el:id="20200427gerhard300"/>
      <el:version el:score="1" el:release="1" el:revision="1" el:status="stable"/>
      <el:author  el:name="Gerhard" el:email="gerhard.eni...@gmx-topmail.de"/>
      <el:copyright>Copyright © 2023 Gerhard</el:copyright>
      <el:license el:type="GPL v2.0" 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="00:30"/>
    </el:info>
    <el:luamain><![CDATA[

wo["ConserveLevel"] = false

ti[" "] = {"fl_lawn"}
ti["$"] = {"it_extralife"}
ti["."] = {"st_box"}
ti["~"] = {"fl_water"}
ti["@"] = {"#ac_marble", "marble"}
ti["0"] = {"it_document", text="bugInfo"}
ti["1"] = {"it_document", text="swimHelp"}
ti["2"] = {"it_document", text="featureMessage"}
ti["3"] = {"it_document", text="countHelp"}
ti["s"] = {"st_switch", target="swi#*"}
ti["l"] = {"st_laser_n", state=OFF, name="swi#"}
ti["d"] = {"st_door_d", faces="ew", state=CLOSED, name="swi#"}
ti["c"] = {"st_brick", cluster=1}
ti["o"] = {"st_oxyd"}

wo(ti," ", {
"ccccccccccccccccccc",
"c    ccccccccoc  3c",
"c           d2c ccc",
"c    sllllllcoc   c",
"c    cccccccccccc c",
"c               c c",
"c               c c",
"c ~~~~~     ~~~~~ c",
"c ~ $ ~     ~   ~ c",
"c ~ $ ~  .  ~ 1.~ c",
"c ~~~~~  0  ~~~~~cc",
"c                @c",
"ccccccccccccccccccc",
})

    ]]></el:luamain>
    <el:i18n>
      <el:string el:key="bugInfo">
	<el:english>Use a bug to master this level!</el:english>
	<el:translation el:lang="de">Nutze einen Bug um dieses Level zu schaffen!</el:translation>
      </el:string>
      <el:string el:key="swimHelp">
	<el:english>Can you swim?</el:english>
	<el:translation el:lang="de">Kannst Du schwimmen?</el:translation>
      </el:string>
      <el:string el:key="countHelp">
	<el:english>Count the number of lifes you have. Jump into the water and count again!</el:english>
	<el:translation el:lang="de">Zähle Deine Leben. Springe ins Wasser und zähle erneut!</el:translation>
      </el:string>
      <el:string el:key="featureMessage">
	<el:english>It's not a bug. It's a feature! ;-)</el:english>
	<el:translation el:lang="de">Es ist kein Fehler. Es ist eine Funktion! ;-)</el:translation>
      </el:string>
    </el:i18n>
  </el:protected>
</el:level>
<?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="Café" el:id="20210429gerhard300"/>
      <el:version el:score="1" el:release="1" el:revision="1" el:status="stable"/>
      <el:author  el:name="Gerhard" el:email="gerhard.eni...@gmx-topmail.de"/>
      <el:copyright>Copyright © 2023 Gerhard</el:copyright>
      <el:license el:type="GPL v2.0" el:open="true"/>
      <el:compatibility el:enigma="1.10"/>
      <el:modes el:easy="true" el:single="true" el:network="false"/>
      <el:score el:easy="05:00" el:difficult="10:00"/>
    </el:info>
    <el:luamain><![CDATA[

wo["AutoRespawn"] = true

ti[" "] = {"fl_wood"}
ti["@"] = {"#ac_marble", "marble"}
ti["a"] = {"it_bag", name="bag0"}
ti["s"] = {"it_coffee"}
ti["m"] = {"it_document", text="hello"}
ti["c"] = {"st_coinslot", target="door"}
ti["d"] = {"st_door", name="door"}
ti["p"] = {"st_death"}
ti["t"] = {"st_thief"}
ti["h"] = {"st_chess"}
ti["^"] = {"st_oneway"}
ti["#"] = {"st_brick", cluster=1}
ti["o"] = {"st_oxyd"}

wo(ti," ", {
"#######",
"#o   o#",
"s#cdp#s",
"#  a  #",
"###^###",
"###t###",
"#  h s#",
"#   s #",
"#s m  #",
"# s@  #",
"#######",
})

if wo["IsDifficult"] then
  local rand = random(0,12)
  for i=0, 12 do
    wo:add(no["bag0"], {"it_bag", name="bag1"})
    if i == rand then
      wo:add(no["bag1"], {"it_coin"})
    else
      wo:add(no["bag1"], {"it_coffee"})
    end
    for j=0, 11 do
      wo:add(no["bag1"], {"it_coffee"})
    end
  end
else
  wo:add(no["bag0"], {"it_bag", name="bag1"})
  wo:add(no["bag1"], {"it_coin"})
  for i=0, 11 do
    wo:add(no["bag0"], {"it_coffee"})
    wo:add(no["bag1"], {"it_coffee"})
  end
end

-- The following lines are solely to avoid a game crash in Enigma v1.30.
-- If a named object lies in a bag that is placed somewhere on the
-- playing grid and you try to exit the game, the game will crash!
no["bag0"]["name"] = nil
no["bag1"]["name"] = nil
no["marble"]["name"] = nil

    ]]></el:luamain>
    <el:i18n>
      <el:string el:key="hello">
        <el:english>
          Blacky Schwarz runs a café to serve the perfect espresso. Unfortunately, she accidentally dropped her tips between the coffee cups. Help her to find her coin.
        </el:english>
        <el:translation el:lang="de">
          Blacky Schwarz betreibt ein Café, wo sie den perfekten Espresso anbietet. Leider hat sie ihr Trinkgeld zwischen den Kaffeetassen fallen gelassen. Hilf ihr, ihre Münze wiederzufinden.
        </el:translation>
      </el:string>
    </el:i18n>
  </el:protected>
</el:level>

Reply via email to