~ubuntu-branches/ubuntu/trusty/enigma/trusty-proposed

« back to all changes in this revision

Viewing changes to data/levels/enigma_x/raoul41_1.xml

  • Committer: Package Import Robot
  • Author(s): Erich Schubert
  • Date: 2013-04-06 14:54:02 UTC
  • mfrom: (1.1.10)
  • Revision ID: package-import@ubuntu.com-20130406145402-jgjrtk7hac8gtvza
Tags: 1.20-dfsg.1-1
* New upstream release (Closes: #704595)
  (Repacked: dropped zipios++ source and main menu music)
* Update watch file, sf.net again.
* Fix documentation links (Closes: #653508)
* Conflict with enigma-level-previews to encourage deinstallation
  (Pregenerated level previews were only used with version 1.01)
* Use dh7 for building instead of CDBS
* Update to policy 3.9.4.0 (no changes)
* Register documentation with doc-base

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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">
 
3
  <el:protected>
 
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"/>
 
14
      </el:compatibility>
 
15
      <el:modes el:easy="false" el:single="true" el:network="false"/>
 
16
      <el:score el:easy="-" el:difficult="8:36"/>
 
17
    </el:info>
 
18
    <el:luamain><![CDATA[
 
19
wo["ConserveLevel"] = false
 
20
 
 
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"}
 
36
 
 
37
local spanning_tree = res.maze(ti, {area={po(8, 4), 5, 5}, spacing={0,0}})
 
38
 
 
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
    "--------------------"})
 
53
 
 
54
wo:add(YIN, {"it_magicwand"})
 
55
wo:add({"ot_timer", target="reopen", interval=5})
 
56
 
 
57
function reopen()
 
58
    vortex = it(no["marble"])
 
59
    if vortex:exists() then
 
60
        vortex:open()
 
61
    end
 
62
end
 
63
 
 
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]
 
71
        end
 
72
    end
 
73
end
 
74
 
 
75
function create_map()
 
76
    connmap = {}
 
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"}
 
78
    sp = po(8, 4)
 
79
    p = sp
 
80
    for row = 1, 5 do
 
81
        rcons = ""
 
82
        for col = 1, 5 do
 
83
            rcons = rcons .. conns[st(p)["connections"]]
 
84
            p = p + E
 
85
        end
 
86
        connmap[row] = rcons
 
87
        p = sp + row*S
 
88
    end
 
89
    return connmap
 
90
end
 
91
 
 
92
puzzlestones = {"PPPPQ",
 
93
                "PPPQP",
 
94
                "PPQPP",
 
95
                "PQPPP",
 
96
                "QPPPP"}
 
97
 
 
98
puzzlemap = wo:newMap(" ", puzzlestones)
 
99
connections = wo:newMap(" ", create_map())
 
100
wo:drawMap(res.puzzle(ti, "P", "Q"), po(8,4), puzzlemap * connections)
 
101
 ]]></el:luamain>
 
102
    <el:i18n>
 
103
      <el:string el:key="title">
 
104
        <el:english el:translate="false"/>
 
105
      </el:string>
 
106
    </el:i18n>
 
107
  </el:protected>
 
108
</el:level>