~ubuntu-branches/ubuntu/edgy/enigma/edgy-backports

« back to all changes in this revision

Viewing changes to data/levels/immanuel02.lua

  • Committer: Bazaar Package Importer
  • Author(s): Erich Schubert
  • Date: 2005-06-20 20:48:19 UTC
  • Revision ID: james.westby@ubuntu.com-20050620204819-ggqswr2gh3w9hhyr
Tags: upstream-0.92
Import upstream version 0.92

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
-- Door Maze
 
2
-- (c) 2003 by Immanuel Herrmann
 
3
-- Licensed under GPL v2.0 or above
 
4
 
 
5
 
 
6
levelw = 20
 
7
levelh = 13
 
8
 
 
9
create_world(levelw, levelh)
 
10
enigma.ConserveLevel = FALSE
 
11
 
 
12
oxyd_default_flavor = "a"
 
13
 
 
14
fill_floor("fl-bluegray", 0, 0, levelw, levelh)
 
15
 
 
16
zaehler = 1
 
17
 
 
18
function tuer(x, y, ri)
 
19
  set_floor( "fl-bluegreen", x, y)
 
20
  set_stone( "st-bolder", x, y, {direction=ri, name="tuer"..strsub("dcbae",zaehler, zaehler)})
 
21
  zaehler = zaehler + 1
 
22
end
 
23
 
 
24
 
 
25
function kabel(x, y, co)
 
26
  set_stone( "st-puzzle", x, y, {connections = co})
 
27
end
 
28
 
 
29
 
 
30
 
 
31
 
 
32
function renderLine( y, pattern)
 
33
    for x=0, strlen(pattern) - 1 do
 
34
        local c = strsub( pattern, x + 1, x + 1)
 
35
        if c =="#" then
 
36
            set_stone( "st-rock2", x, y)
 
37
        elseif c == "o" then
 
38
            oxyd( x, y)
 
39
        elseif c == "s" then
 
40
            set_actor("ac-blackball", x+0.5, y+0.5)
 
41
 
 
42
        elseif c == "-" then
 
43
            kabel(x, y, 6)
 
44
        elseif c == "|" then
 
45
            kabel(x, y, 11)
 
46
        elseif c == "`" then
 
47
            kabel(x, y, 13)
 
48
        elseif c == "'" then
 
49
            kabel(x, y, 10)
 
50
        elseif c == "," then
 
51
            kabel(x, y, 7)
 
52
        elseif c == "." then
 
53
            kabel(x, y, 4)
 
54
        elseif c == "+" then
 
55
            kabel(x, y, 16)
 
56
        elseif c == ":" then
 
57
            set_stone( "st-puzzle", x, y, {connections = 1})
 
58
            --set_stone("st-grate1", x, y)
 
59
        elseif c == "~" then
 
60
            set_stone("st-grate1", x, y)
 
61
 
 
62
        elseif (c >= "A" and c <= "E") or (c >= "a" and c <= "e") then
 
63
            set_item("it-trigger", x, y, {action="callback", target="tt"..c})
 
64
        elseif c == "t" then
 
65
            set_floor( "fl-bluegreen", x, y)
 
66
        elseif c == "^" then
 
67
            tuer(x, y, NORTH)
 
68
        elseif c == ">" then
 
69
            tuer(x, y, EAST)
 
70
        elseif c == "v" then
 
71
            tuer(x, y, SOUTH)
 
72
        elseif c == "<" then
 
73
            tuer(x, y, WEST)
 
74
        elseif c == "" then
 
75
            set_stone( "", x, y)
 
76
        elseif c == "" then
 
77
            set_stone( "", x, y)
 
78
        elseif c == "" then
 
79
            set_stone( "", x, y)
 
80
        end
 
81
    end
 
82
end
 
83
 
 
84
renderLine( 0, "####,------.########")
 
85
renderLine( 1, "#   D#     |      C.")
 
86
renderLine( 2, "# ## # # # `:.## ##|")
 
87
renderLine( 3, ",ao,:-:-:-t<t'o#   |")
 
88
renderLine( 4, "| #|s,:. # # ,t>t-:'")
 
89
renderLine( 5, "| e: t | B #E: # # #")
 
90
renderLine( 6, "|,+'#v#|,'  ||#,t<t.")
 
91
renderLine( 7, "|dt  t `+b# || : # |")
 
92
renderLine( 8, "|#v# `:-'c-:+' |   |")
 
93
renderLine( 9, "| t  #      :  |###|")
 
94
renderLine(10, "|~`---------'##|   |")
 
95
renderLine(11, "|     ~        : #A'")
 
96
renderLine(12, "`--------------'####")
 
97
 
 
98
--renderLine( 0, ",------------------.")
 
99
--renderLine( 1, "|   D------.      C|")
 
100
--renderLine( 2, "| ## #     `:.## ,'|")
 
101
--renderLine( 3, "`ao,:-:-:-t<t'o# : |")
 
102
--renderLine( 4, "# #|s,:. # # ,t>t' |")
 
103
--renderLine( 5, "# e: t | B #E: ,:-:'")
 
104
--renderLine( 6, "#,+'#v#|,'  ||#`t<t.")
 
105
--renderLine( 7, "#dt  t `+b# ||   # |")
 
106
--renderLine( 8, "##v# `:-'c-:+' #   |")
 
107
--renderLine( 9, "# t  #      :  ####|")
 
108
--renderLine(10, "# `---------'##   #|")
 
109
--renderLine(11, "#               # A'")
 
110
--renderLine(12, "####################")
 
111
 
 
112
 
 
113
 
 
114
 
 
115
 
 
116
function tuer_bewegen(tnr, ri)
 
117
   SendMessage("tuer"..tnr, "direction", ri);
 
118
end
 
119
 
 
120
 
 
121
-- Gro�buchstabe bewegt nach west / nord...
 
122
 
 
123
function ttA()
 
124
  tuer_bewegen("a", WEST)
 
125
end
 
126
function tta()
 
127
  tuer_bewegen("a", EAST)
 
128
end
 
129
function ttB()
 
130
  tuer_bewegen("b", NORTH)
 
131
end
 
132
function ttb()
 
133
  tuer_bewegen("b", SOUTH)
 
134
end
 
135
function ttC()
 
136
  tuer_bewegen("c", WEST)
 
137
end
 
138
function ttc()
 
139
  tuer_bewegen("c", EAST)
 
140
end
 
141
function ttD()
 
142
  tuer_bewegen("d", WEST)
 
143
end
 
144
function ttd()
 
145
  tuer_bewegen("d", EAST)
 
146
end
 
147
function ttE()
 
148
  tuer_bewegen("e", NORTH)
 
149
end
 
150
function tte()
 
151
  tuer_bewegen("e", SOUTH)
 
152
end