Hi All,
Please test the attached Enigma Level in Enigma 1.20 once again. (hopefully
the last of the changes)
These last changes are making the difficult mode slightly more challenging by:
Shuffling the second level OXYDs to take away some predictability,
Adding some traps that the player can learn to avoid which makes the
difficult mode more hazardous.
Any comments will be appreciated. You can use the Enigma-deval method or send
direct to me at [email protected].
I hope it works for you and that you enjoy it.
Thank you, Ray
-
Sentfrom Ray Wick without any free advertisement for any companies.
<?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="Inverse Pyramid ZZ" el:subtitle=" -----> This level has OXYDs beneath other OXYDs." el:id="RayWick023ZZ"/>
<el:version el:score="1" el:release="1" el:revision="0" el:status="stable"/>
<el:author el:name="Ray Wick" el:email="[email protected]" el:homepage="www.rayrwick.net/raywick/"/>
<el:copyright>Copyright © Ray Wick</el:copyright>
<el:license el:type="Donated to Enigma under the projects license" el:open="true"/>
<el:compatibility el:enigma="1.20">
<el:dependency el:path="lib/liblua" el:id="lib/liblua" el:release="1" el:preload="true"/>
<el:dependency el:path="lib/libmath" el:id="lib/libmath" el:release="1" el:preload="true"/>
</el:compatibility>
<el:modes el:easy="true" el:single="true" el:network="false"/>
<el:comments>
<el:code>Home File Name raywick023_1-0_1-20.xml</el:code>
</el:comments>
<el:score el:easy="03:33" el:difficult="05:06"/>
</el:info>
<el:luamain><![CDATA[
-- == == == == == == == == == == == == == == == == == == == == == == == == == ==
-- ### Global Definitions ############################################################################
-- === Random =========================================================================================
math.randomseed()
-- === World ==========================================================================================
wo["ConserveLevel"] = true
wo["AllowSingleOxyds"] = true
-- === Tile Definitions ===============================================================================
ti["@"] = {"#ac_marble_black"}
ti[" "] = {"fl_hay"}
ti[","] = {"fl_water", "spot_L1#"}
ti["#"] = {"st_brownpyramid"}
ti["F"] = {"st_fake_oxydd"}
ti["Z"] = {"st_death"}
ti["~"] = {"fl_water"}
ti[";"] = ti["~"] .. {"st_oxyd_d", oxydcolor = OXYD_BLACK, target = "oxyd_callback"}
ti["a"] = {"st_oxyd", flavor = "a", oxydcolor = OXYD_WHITE, target = "oxyd_callback"}
ti["A"] = {"st_oxyd", flavor = "a", oxydcolor = OXYD_BLACK, target = "oxyd_callback"}
ti["X"] = {"st_oxyd", flavor = "b", oxydcolor = OXYD_BLACK, target = "oxyd_callback"}
ti["b"] = {"st_oxyd", flavor = "b", oxydcolor = OXYD_WHITE, target = "oxyd_callback"}
ti["C"] = {"st_oxyd", flavor = "c", oxydcolor = OXYD_BLACK, target = "oxyd_callback"}
-- === Level Mode Definitions =========================================================================
if wo["IsDifficult"] then
ti[":"] = {"it_seed", _tree = true}
bgn = 1
else
ti[":"] = {"it_seed_hay", _tree = true}
bgn = 2
end
w, h = wo(ti, " ", {
-- 01234567890123456789
"####################",
"# #",
"# #",
"# ,,,,,,, #",
"# ,,,,,,, #",
"# ,,,,,,, #",
"# @ ,,,F,,, #",
"# ,,,,,,, #",
"# ,,,,,,, #",
"# ,,,,,,, #",
"# #",
"# #",
"####################"
})
-- === Table Definitions ==============================================================================
oxyds_L1 = {OXYD_PURPLE, OXYD_GRAY, OXYD_CYAN, OXYD_BLUE, OXYD_GREEN, OXYD_PINE}
for j = 1, #oxyds_L1 do
ti["O" .. oxyds_L1[j]] = ti{"fl_water"} .. {"st_oxyd_d", oxydcolor = oxyds_L1[j], target = "oxyd_callback", flavor = "d"}
end
local col_L2 = {
[1] = OXYD_ORANGE,
[2] = OXYD_BROWN,
[3] = OXYD_YELLOW,
[4] = OXYD_RED,
[5] = OXYD_ORANGE,
[6] = OXYD_BROWN,
[7] = OXYD_YELLOW,
[8] = OXYD_RED,
[9] = OXYD_ORANGE,
[10] = OXYD_BROWN,
[11] = OXYD_YELLOW,
[12] = OXYD_RED,
[13] = OXYD_ORANGE,
[14] = OXYD_BROWN,
[15] = OXYD_YELLOW,
[16] = OXYD_RED,
[17] = OXYD_ORANGE,
[18] = OXYD_BROWN,
[19] = OXYD_YELLOW,
[20] = OXYD_RED,
[21] = OXYD_ORANGE,
[22] = OXYD_BROWN,
[23] = OXYD_YELLOW,
[24] = OXYD_RED,
[25] = OXYD_RED,
[26] = OXYD_RED,
}
col_L2 = lib.lua.shuffle(col_L2)
spots_L1 = po(no["spot_L1#*"]:shuffle())
colors_L1 = lib.math.permutation(#spots_L1)
for j = 1, (#spots_L1) do
local color_L1 = oxyds_L1[colors_L1[j] % (#oxyds_L1) + 1]
wo[spots_L1[j]] = ti["O" .. color_L1]
end
-- ### Function Definitions ##########################################################################
last_oxyd = 0
cnt_L2 = 0
function oxyd_callback(is_on, sender)
if bgn == 1 then
cnt_L2 = cnt_L2 + 1
wo[{10, 6}] = ti{"fl_water"} .. {"st_oxyd", flavor = "d", oxydcolor = col_L2[cnt_L2], target = "oxyd_callback"}
bgn = 0
end
if bgn == 2 then
wo[{10, 6}] = ti[";"]
bgn = 0
end
if sender.state == OXYDPAIR then
oxyds = grp(sender, last_oxyd)
if sender.flavor == "d" then
if (((sender.y == 4) or (sender.y == 5) or (sender.y == 6) or (sender.y == 7) or (sender.y == 8))
and ((sender.x == 8) or (sender.x == 9) or (sender.x == 10) or (sender.x == 11) or (sender.x == 12))) then
makeoxyd(sender, sender.flavor)
else
if (((sender.y == 3) and (sender.x == 7)) or ((sender.y == 9) and (sender.x == 7))
or ((sender.y == 3) and (sender.x == 13)) or ((sender.y == 9) and (sender.x == 13))) then
if wo["IsDifficult"] then
makeoxyd(sender, "Z")
else
makefloor(sender)
end
else
makefloor(sender)
end
-- makefloor(sender)
end
end
if sender.flavor == "c" then
if (((sender.y == 4) or (sender.y == 8)) and ((sender.x == 8) or (sender.x == 12))) then
if wo["IsDifficult"] then
if sender.oxydcolor == OXYD_BLACK then
makefloor(sender)
else
makeoxyd(sender, "C")
end
else
makefloor(sender)
end
else
if (((sender.y == 5) or (sender.y == 6) or (sender.y == 7))
and ((sender.x == 9) or (sender.x == 10) or (sender.x == 11))) then
if wo["IsDifficult"] then
if (sender.y == 6) and (sender.x == 10) then
makeoxyd(sender, "X")
else
makeoxyd(sender, sender.flavor)
end
else
makeoxyd(sender, sender.flavor)
end
else
makefloor(sender)
end
end
end
if sender.flavor == "b" then
if (sender.y == 6)
and (sender.x == 10) then
if wo["IsDifficult"] then
makeoxyd(sender, "A")
else
makeoxyd(sender, sender.flavor)
end
else
makefloor(sender)
end
end
if sender.flavor == "a" then
makefloor(sender)
end
if last_oxyd.flavor == "d" then
if (((last_oxyd.y == 4) or (last_oxyd.y == 5) or (last_oxyd.y == 6) or (last_oxyd.y == 7) or (last_oxyd.y == 8))
and ((last_oxyd.x == 8) or (last_oxyd.x == 9) or (last_oxyd.x == 10) or (last_oxyd.x == 11) or (last_oxyd.x == 12))) then
makeoxyd(last_oxyd, last_oxyd.flavor)
else
makefloor(last_oxyd)
end
end
if last_oxyd.flavor == "c" then
if (((last_oxyd.y == 4) or (last_oxyd.y == 8)) and ((last_oxyd.x == 8) or (last_oxyd.x == 12))) then
if wo["IsDifficult"] then
if last_oxyd.oxydcolor == OXYD_BLACK then
makefloor(last_oxyd)
else
makeoxyd(last_oxyd, "C")
end
else
makefloor(last_oxyd)
end
else
if (((last_oxyd.y == 5) or (last_oxyd.y == 6) or (last_oxyd.y == 7))
and ((last_oxyd.x == 9) or (last_oxyd.x == 10) or (last_oxyd.x == 11))) then
if wo["IsDifficult"] then
if (last_oxyd.y == 6) and (last_oxyd.x == 10) then
makeoxyd(last_oxyd, "X")
else
makeoxyd(last_oxyd, last_oxyd.flavor)
end
else
makeoxyd(last_oxyd, last_oxyd.flavor)
end
else
makefloor(last_oxyd)
end
end
end
if last_oxyd.flavor == "b" then
if (last_oxyd.y == 6)
and (last_oxyd.x == 10) then
if wo["IsDifficult"] then
makeoxyd(last_oxyd, "A")
else
makeoxyd(last_oxyd, last_oxyd.flavor)
end
else
makefloor(last_oxyd)
end
end
if last_oxyd.flavor == "a" then
makefloor(last_oxyd)
end
it(oxyds):grow()
elseif sender.state == OPEN then
last_oxyd = sender
end
end
function makefloor(whareat)
wo[whareat] = ti[":"]
fl(whareat)._tree = true
return
end
function makeoxyd(whareat, flav)
if flav == "Z" then wo[whareat] = ti["Z"] end
if flav == "X" then wo[whareat] = ti["X"] end
if flav == "A" then wo[whareat] = ti["A"] end
if flav == "C" then wo[whareat] = ti["C"] end
if flav == "b" then wo[whareat] = ti["a"] end
if flav == "c" then wo[whareat] = ti["b"] end
if flav == "d" then
if wo["IsDifficult"] then
cnt_L2 = cnt_L2 + 1
wo[whareat] = {"st_oxyd", flavor = "c", oxydcolor = col_L2[cnt_L2], target = "oxyd_callback"}
else
wo[whareat] = ti["C"]
end
end
return
end
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
wo:shuffleOxyd()
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
]]></el:luamain>
<el:i18n>
<el:string el:key="title">
<el:english el:translate="false"/>
</el:string>
<el:string el:key="subtitle">
<el:english el:translate="true"/>
</el:string>
</el:i18n>
</el:protected>
</el:level>
_______________________________________________
Enigma-devel mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/enigma-devel