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="Panelled Puzzle I" el:subtitle="" el:id="20080820ral639"/>
6
<el:version el:score="1" el:release="1" el:revision="$Revision: 179 $" el:status="released"/>
7
<el:author el:name="Ronald Lamprecht" el:email="ral@users.berlios.de"/>
8
<el:copyright>Copyright © 2008,2009 Ronald Lamprecht</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="6:01" el:difficult="7:53"/>
17
wo["ConserveLevel"] = true
19
ti[" "] = {"fl_blueslab_framed", "fl#", checkerboard=0} .. ti{"fl_platinum_framed", "fl#", friction=7, adhesion=2, checkerboard=1}
20
ti[":"] = {"fl_blueslab_framed", checkerboard=1} .. ti{"fl_platinum_framed", friction=7, adhesion=2, checkerboard=0}
21
ti["."] = {"fl_abyss"}
22
ti["+"] = {"fl_abyss", "oxydpos#"}
23
ti["#"] = {"st_panel", cluster=1}
25
ti["P"] = {"st_pull","westpull"}
27
ti["trigger"] = {"it_trigger", "tr%%", invisible=true, target="counter", action="signal"}
29
ti["*"] = {"st_spitter", "spitter", secure=true}
30
ti["X"] = {"st_pull", "eastpull"} .. ti{"fl_redslab_framed"} .. ti{"it_trigger", invisible=true, target="spitter"}
31
ti["S"] = {"st_dispenser_extralife"}
32
ti["$"] = {"it_extralife"}
34
ti["@"] = {"#ac_marble"}
36
if wo["IsDifficult"] then
37
ti["?"] = {"it_document", text="solutionseven"}
42
resolver = res.autotile(ti, {"A", "O", "trigger"})
44
w, h = wo(resolver, " ", {
55
wo:add({"ot_wire", "wire", anchor1="westpull", anchor2="eastpull"})
56
wo:add({"ot_counter", "counter", state=15, target_0="conjure"})
58
connections = {"w","s","sw","e","ew","es","esw","n","nw","ns","nsw",
59
"ne","new","nes","nesw"}
61
yellow = {true,true,false,true,true,false,false,true,false,true,false,false,false,false,false}
67
sum = sum + cond(p[j] > p[i], 1, 0)
73
perm = lib.math.permutation(15)
74
if (wo["IsDifficult"] and parity(perm) == 1) or
75
(not wo["IsDifficult"] and parity(perm) == 0) then
76
perm[1], perm[2] = perm[2], perm[1]
78
state = 0 -- first even run for difficult mode
82
wo[no["tr%"..i]] = {"st_puzzle", connections=connections[perm[i]]}
83
if not wo["IsDifficult"] and yellow[perm[i]] then
84
wo[no["tr%"..i]] = {"st_puzzle_yellow", connections=connections[perm[i]]}
89
if state == 0 and wo["IsDifficult"] then
90
-- now we play an odd parity
91
perm = lib.math.permutation(15)
92
if parity(perm) == 0 then
93
perm[1], perm[2] = perm[2], perm[1]
96
wo[no["tr%"..i]] = {"st_puzzle", connections=connections[perm[i]]}
99
-- do indicate changed parity
100
wo[no["fl#*"]] = ti[":"]
101
wo[no["eastpull"]+{0,-1}] = {"it_document", text="solutionsodd"}
103
wo[no["oxydpos#*"]] = {"st_oxyd_d"}
110
<el:string el:key="title">
111
<el:english el:translate="false"/>
113
<el:string el:key="solutionseven">
114
<el:english el:translate="true" >There are 56 fully connected puzzle piece arrangements, but just 34 of them are reachable from this first distribution.</el:english>
115
<el:translation el:lang="de">Es gibt 56 Figuren mit voll verbundenen Puzzleteilen, aber ausgehend von der ersten Verteilung, können nur 34 dieser Figuren erreicht werden.</el:translation>
117
<el:string el:key="solutionsodd">
118
<el:english el:translate="true" >This second distribution can just be converted to any of the other 28 arrangements.</el:english>
119
<el:translation el:lang="de">Diese zweite Verteilung kann nun in jede der anderen 28 Figuren überführt werden.</el:translation>