~ubuntu-branches/ubuntu/intrepid/enigma/intrepid

« back to all changes in this revision

Viewing changes to data/levels/nat6.lua

  • Committer: Bazaar Package Importer
  • Author(s): Erich Schubert
  • Date: 2005-08-28 15:30:09 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20050828153009-sky64kb6tcq37xt5
Tags: 0.92.1-1
* New upstream subversion checkout
* Remove menu.s3m, which we are allowed to distributed but not to modify
  also copyright notice is confusing... (Closes: #321669)
* Rebuild with new libzipios (Closes: #325405)
  I hope this works without a versioned build-dependency
* Added "enigma replaces enigma-data" for upgrades (Closes: #308558)
* Added notes about the fonts copyright.
* updated to policy 3.6.2.1 (no changes)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
 
2
 
 
3
 
trigger_count = 0
4
 
function trigger( x, y )
5
 
    door_id = "door"..trigger_count
6
 
    trigger_count = trigger_count + 1
7
 
    
8
 
    set_floor( "fl-rough", x, y )
9
 
    set_item( "it-trigger", x, y, {target=door_id, action="openclose"} )
10
 
end
11
 
 
12
 
door_count = 0
13
 
function door( x, y )
14
 
    id = "door"..door_count
15
 
    door_count = door_count + 1
16
 
    
17
 
    set_floor( "fl-rough", x, y )
18
 
    doorh( x, y, {name=id} )
19
 
end
20
 
 
21
 
 
22
 
level = {
23
 
"                     ################# ",
24
 
"                   ###o##::::::::::::# ",
25
 
"                   #....#++++++++++++# ",
26
 
"                   #.a..#::::::::::::# ",
27
 
"                   #.aa.#::::::::::::# ",
28
 
"                   ##.a.###b######=### ",
29
 
"                    #,###..a.#   #=#   ",
30
 
"                   ##...b..a.#   #=#   ",
31
 
"                   #..a.#..a.#   #=#   ",
32
 
"                ####.a..#....#   #=#   ",
33
 
"                #s.#..a.#....#   #=#   ",
34
 
"                #..@....#....#   #=#   ",
35
 
"                ##############   #=#   ",
36
 
"                                 #=#   ",
37
 
"                                 #=#   ",
38
 
"                                 #=#   ",
39
 
"                               #x#=#x# ",
40
 
"                               x:::::x ",
41
 
"                               #:::::# ",
42
 
"                               x::^::x ",
43
 
"                               #:::::# ",
44
 
"                               x:::::x ",
45
 
"                               #x###x# ",
46
 
"                                       ",
47
 
"                                       ",
48
 
}
49
 
 
50
 
cells = {}
51
 
cells[" "] = function( x, y )
52
 
    set_floor( "fl-leaves", x,y )
53
 
end
54
 
cells["#"] = function( x, y )
55
 
    set_floor( "fl-leaves", x, y )
56
 
    set_stone( "st-greenbrown", x, y )
57
 
end
58
 
cells["@"] = function( x, y )
59
 
    set_floor( "fl-gray", x, y )
60
 
    set_stone( "st-greenbrown_move", x, y )
61
 
end
62
 
cells["o"] = function( x, y )
63
 
    set_floor( "fl-gray", x, y )
64
 
    set_actor( "ac-blackball", x+0.5, y+0.5 )
65
 
end
66
 
cells["x"] = function( x, y )
67
 
    set_floor( "fl-gray", x, y )
68
 
    oxyd(x,y)
69
 
end
70
 
cells["."] = function( x, y )
71
 
    set_floor( "fl-gray", x, y )
72
 
end
73
 
cells["a"] = function( x, y )
74
 
    set_floor( "fl-gray", x, y )
75
 
    set_stone( "st-brownie", x, y )
76
 
end
77
 
cells[","] = function( x, y )
78
 
    set_floor( "fl-normal", x, y )
79
 
end
80
 
cells["b"] = function( x, y )
81
 
    set_floor( "fl-normal", x, y )
82
 
    set_stone( "st-brownie", x, y )
83
 
end
84
 
cells[":"] = function( x, y )
85
 
    set_floor( "fl-rough", x, y )
86
 
end
87
 
cells["+"] = trigger
88
 
cells["="] = door
89
 
cells["^"] = function( x, y )
90
 
    set_floor( "fl-rough", x, y )
91
 
    set_stone( "st-laser", x, y, {name="laser", dir=NORTH, on=1} )
92
 
end
93
 
cells["s"] = function( x, y )
94
 
    set_floor( "fl-hay", x, y )
95
 
    set_stone( "st-switch", x, y, {on=1,target="laser", action="onoff"} )
96
 
end
97
 
 
98
 
 
99
 
create_world( strlen(level[1]), getn(level) )
100
 
oxyd_default_flavor = "a"
101
 
for y,line in level do
102
 
    for x = 1,strlen(line) do
103
 
        cell = strchar(strbyte(line,x))
104
 
        cells[cell]( x-1, y-1 )
105
 
    end
106
 
end
107
 
oxyd_shuffle()