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="Inside Puzzling" el:subtitle="" el:id="raoul41"/>
6
<el:version el:score="1" el:release="1" el:revision="3" el:status="released"/>
7
<el:author el:name="Raoul Bourquin" el:email="raoul@users.berlios.de"/>
8
<el:copyright>Copyright © 2010 Raoul Bourquin</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/libmaze" el:id="lib/libmaze" el:release="2" el:preload="true"/>
12
<el:dependency el:path="lib/libmap" el:id="lib/libmap" el:release="1" el:preload="true"/>
13
<el:dependency el:path="lib/libpuzzle" el:id="lib/libpuzzle" el:release="3" el:preload="true"/>
15
<el:modes el:easy="false" el:single="true" el:network="false"/>
16
<el:score el:easy="-" el:difficult="8:36"/>
19
wo["ConserveLevel"] = false
21
ti[" "] = {"fl_rough"}
22
ti["-"] = {"fl_water"}
23
ti["#"] = {"st_bluesand", cluster=1}
24
ti["%"] = {"st_rawglass"}
25
ti["="] = {"st_rawglass_quad"}
26
ti["o"] = {"st_puzzle"}
27
ti["a"] = {"fl_rough", push_directions="sw", name="dest1"} .. {"it_vortex", state=CLOSED, destination="dest2", autoclose=true} .. ti["o"]
28
ti["b"] = {"fl_rough", push_directions="sw", name="dest2"} .. {"it_vortex", state=CLOSED, destination="dest3", autoclose=true} .. ti["o"]
29
ti["c"] = {"fl_rough", push_directions="nesw", name="dest3"} .. {"it_vortex", state=CLOSED, destination="dest4", autoclose=true} .. ti["o"]
30
ti["d"] = {"fl_rough", push_directions="ne", name="dest4"} .. {"it_vortex", state=CLOSED, destination="dest5", autoclose=true} .. ti["o"]
31
ti["e"] = {"fl_rough", push_directions="ne", name="dest5"} .. {"it_vortex", state=CLOSED, destination="dest1", autoclose=true} .. ti["o"]
32
ti["P"] = {"st_puzzle", algorithm="marked"}
33
ti["Q"] = {"st_puzzle", hollow=true}
34
ti["O"] = {"st_oxyd", oxydcolor=OXYD_BLUE}
35
ti["@"] = ti["c"] .. {"#ac_marble", name="marble"}
37
local spanning_tree = res.maze(ti, {area={po(8, 4), 5, 5}, spacing={0,0}})
39
wo(res.autotile(spanning_tree), " ", {
40
"--------------------",
41
"--------------------",
42
"------###---###-----",
43
"------#%#=O=#%#-----",
44
"------##ooooa##-----",
45
"-------=ooobo=------",
46
"-------Ooo@ooO------",
47
"-------=odooo=------",
48
"------##eoooo##-----",
49
"------#%#=O=#%#-----",
50
"------###---###-----",
51
"--------------------",
52
"--------------------"})
54
wo:add(YIN, {"it_magicwand"})
55
wo:add({"ot_timer", target="reopen", interval=5})
58
vortex = it(no["marble"])
59
if vortex:exists() then
64
local conns_from = {[SOUTH]="s", [EAST]="e"}
65
local conns_to = {[SOUTH]="n", [EAST]="w"}
66
for cell in spanning_tree do
67
for dir, odir in pairs({[SOUTH]=S, [EAST]=E}) do
68
if cell[dir] == true then
69
st(cell:pos()).connections = st(cell:pos()).connections .. conns_from[dir]
70
st(cell:pos()+odir).connections = st(cell:pos()+odir).connections .. conns_to[dir]
77
conns = {w="a", s="b", sw="c", e="d", ew="e", es="f", esw="g", n="h", nw="i", ns="j", nsw="k", ne="l", new="m", nes="n", nesw="o"}
83
rcons = rcons .. conns[st(p)["connections"]]
92
puzzlestones = {"PPPPQ",
98
puzzlemap = wo:newMap(" ", puzzlestones)
99
connections = wo:newMap(" ", create_map())
100
wo:drawMap(res.puzzle(ti, "P", "Q"), po(8,4), puzzlemap * connections)
103
<el:string el:key="title">
104
<el:english el:translate="false"/>