1
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
2
<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">
4
<el:info el:type="level">
5
<el:identity el:title="Weirdly Wired" el:subtitle="" el:id="andreas49"/>
6
<el:version el:score="1" el:release="1" el:revision="11" el:status="released"/>
7
<el:author el:name="Andreas Lochmann" el:email="" el:homepage=""/>
8
<el:copyright>Copyright © 2008, 2009 Andreas Lochmann</el:copyright>
9
<el:license el:type="GPL v2.0 or above" el:open="true"/>
10
<el:compatibility el:enigma="1.10">
11
<el:dependency el:path="lib/libmath" el:id="lib/libmath" el:release="1" el:preload="true"/>
13
<el:modes el:easy="true" el:single="true" el:network="false"/>
14
<el:score el:easy="0:37" el:difficult="8:49"/>
18
ti[" "] = {"fl_sahara", friction = 3.5, adhesion = 4.0}
19
ti["a"] = {"fl_ivory", friction = 3.5, adhesion = 4.0}
20
ti["b"] = {"fl_bright", friction = 3.5, adhesion = 4.0}
21
ti["c"] = {"fl_platinum", friction = 3.5, adhesion = 4.0}
22
ti["_"] = {"fl_water"}
23
ti["@"] = {"#ac_marble_black"}
24
ti["w"] = {"st_flat_movable", "wood#"}
25
ti["t"] = {"it_trigger", "trigger#"}
26
ti["d"] = {"st_blocker", "door#"}
27
ti["o"] = {"st_oxyd", oxydcolor = OXYD_YELLOW, flavor = "a"}
28
ti["O"] = {"st_oxyd", oxydcolor = OXYD_WHITE, flavor = "a"}
29
ti["1"] = {"st_panel", cluster = 1}
30
ti["2"] = {"st_panel", cluster = 2}
31
ti["S"] = {"st_switch", target = "easy_mode_call"}
33
floors = {ti[" "], ti["a"], ti["b"], ti["c"]}
34
polynom = lib.math.random_vector(10, 4)
36
function myresolver(key, x, y)
38
return floors[lib.math.cubic_polynomial(polynom, x, y) % (#floors) + 1]
40
or ((key == "_") and (random(4) == 1))
41
or ((key == "S") and wo["IsDifficult"]) then
42
return ti[""..random(2)]
48
w, h = wo(myresolver, " ", {
49
-- 01234567890123456789
50
"####################___________________",
51
"# #_____###o###_______",
52
"# w w t t #_____#d d#_______",
53
"# w w t t #___### ### ###_____",
54
"# w t #___#d d#_#d d#_____",
55
"# ##### ###_### ###___",
56
"S w w t @ t d#___#_#d d#___",
57
"# #######_####### #___",
58
"# w t #_______O d# # o___",
59
"# w w t t #_______### ### #___",
60
"# w w t t #_________#d d#___",
61
"# #_________###O###___",
62
"####################___________________"
65
door_p = lib.math.permutation(12)
66
wire_p = lib.math.permutation(12)
68
triggers = no["trigger#*"]
72
triggers[j].target = doors[door_p[j]]
77
anchor1 = woods[wire_p[j + 3]],
78
anchor2 = woods[wire_p[j%3 + 1]]})
79
wo:add({"ot_wire", name = "obsolete_wire#",
80
anchor1 = woods[wire_p[j + 3]],
81
anchor2 = woods[wire_p[j%9 + 4]]})
84
function easy_mode_call(is_on, sender)
86
no["obsolete_wire#*"]:kill()
89
wo:add({"ot_wire", name = "obsolete_wire#",
90
anchor1 = woods[wire_p[j + 3]],
91
anchor2 = woods[wire_p[j%9 + 4]]})
97
<el:string el:key="title">
98
<el:english el:translate="false"/>