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

« back to all changes in this revision

Viewing changes to data/levels/duffy63.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
 
levelw=40
3
 
levelh=13
4
 
 
5
 
create_world( levelw, levelh)
6
 
enigma.ConserveLevel=FALSE
7
 
 
8
 
fill_floor("fl-wood", 0,0,levelw,levelh)
9
 
 
10
 
function renderLine( line, pattern)
11
 
        for i=1, strlen(pattern) do
12
 
                local c = strsub( pattern, i, i)
13
 
                if c =="#" then
14
 
                        set_stone( "st-greenbrown", i-1, line)
15
 
                elseif c =="%" then
16
 
                        set_stone( "st-greenbrown", i-1, line)
17
 
                        set_floor("fl-normal",i-1,line)
18
 
                elseif c == "o" then
19
 
                        oxyd( i-1, line)
20
 
                elseif c == "*" then
21
 
                        set_stone( "st-brownie", i-1, line)
22
 
                elseif c == "!" then
23
 
                        abyss(i-1,line)
24
 
--                      fill_floor("fl-water", i-1,line, 1,1)
25
 
                   set_item("it-burnable_fireproof",i-1,line)
26
 
                elseif c=="z" then
27
 
                        set_actor("ac-blackball", i-.5,line+.5)
28
 
                   set_item("it-burnable",i-1,line)
29
 
                elseif c == "g" then
30
 
                        draw_stones("st-grate1",{i-1,line}, {1,1}, 1)
31
 
                elseif c=="+" then
32
 
                        set_stone( "st-wood", i-1, line)
33
 
                   set_item("it-burnable",i-1,line)
34
 
                elseif c=="=" then
35
 
                        set_floor("fl-space",i-1,line)
36
 
                elseif c == "d" then --1-d
37
 
                        set_floor("fl-gradient",  i-1,  line, {type=1})
38
 
                elseif c == "u" then --2-u
39
 
                        set_floor("fl-gradient",  i-1,  line, {type=2})
40
 
                elseif c == "r" then --3-r
41
 
                        set_floor("fl-gradient",  i-1,  line, {type=3})
42
 
                elseif c == "l" then --4-l
43
 
                        set_floor("fl-gradient",  i-1,  line, {type=4})
44
 
                elseif c == "1" then --ur
45
 
                        set_floor("fl-gradient",  i-1,  line, {type=11})
46
 
                elseif c == "3" then --dl
47
 
                        set_floor("fl-gradient",  i-1,  line, {type=9})
48
 
                elseif c == "7" then --dr
49
 
                        set_floor("fl-gradient",  i-1,  line, {type=12})
50
 
                elseif c == "9" then --ul
51
 
                        set_floor("fl-gradient",  i-1,  line, {type=10})
52
 
                elseif c=="X" then
53
 
                   set_item("it-extinguisher", i-1,line, {load=2})
54
 
                elseif c==" " then
55
 
                   set_item("it-burnable",i-1,line)
56
 
                elseif c=="F" then
57
 
                   set_item("it-burnable_ignited",i-1,line)
58
 
                elseif c=="a" then
59
 
                   set_item("it-trigger",i-1,line,{action="callback",target="funcc1"})
60
 
                elseif c=="A" then
61
 
                   set_stone("st-door_b",i-1,line,{name="door1"})
62
 
                   set_item("it-burnable",i-1,line)
63
 
                elseif c=="B" then
64
 
                   set_stone("st-door_b",i-1,line,{name="door2"})
65
 
                   set_item("it-burnable",i-1,line)
66
 
                elseif c=="C" then
67
 
                   set_stone("st-door_b",i-1,line,{name="door3"})
68
 
                   set_item("it-burnable",i-1,line)
69
 
             end
70
 
        end     
71
 
     end
72
 
 
73
 
 
74
 
renderLine(00,"################################a####o#")
75
 
renderLine(01,"#XXXXXXXXXX                    ###  #!#")
76
 
renderLine(02,"#                               #   #!#")
77
 
renderLine(03,"#                               #     #")
78
 
renderLine(04,"#                               #     #")
79
 
renderLine(05,"#                               A ++  #")
80
 
renderLine(06,"#  #d#####                      B ++  #")
81
 
renderLine(07,"#  #3rrr3#                      C ++  #")
82
 
renderLine(08,"#  #%%%%d#                      #     #")
83
 
renderLine(09,"#  #1l7%d#                      #     #")
84
 
renderLine(10,"#  #d%u%d#                      #   #!#")
85
 
renderLine(11,"#FF#z%7l1#                      #   #!#")
86
 
renderLine(12,"#####################################o#")
87
 
 
88
 
oxyd_shuffle()
89
 
 
90
 
f1=0
91
 
tt=0
92
 
 
93
 
function funcc1()
94
 
    SendMessage("door1","openclose")
95
 
    SendMessage("door2","openclose")
96
 
    SendMessage("door3","openclose")
97
 
    f1=1
98
 
end
99
 
 
100
 
function timer_callback2()
101
 
   if f1==1 then
102
 
      tt=tt+1
103
 
      if tt==11 then
104
 
         enigma.KillStone(32,5)
105
 
         enigma.KillStone(32,6)
106
 
         enigma.KillStone(32,7)
107
 
         f1=0
108
 
      end
109
 
   end
110
 
end
111
 
 
112
 
ferry_x = 1
113
 
ferry_y = 0
114
 
ferry_width = 1
115
 
ferry_height = 1
116
 
ferry_end = 34
117
 
 
118
 
function move_ferry()
119
 
    set_stone("st-blue-sand",ferry_x+ferry_width-2,ferry_y)
120
 
    ferry_x = ferry_x + 1
121
 
end
122
 
 
123
 
function timer_callback()
124
 
    if ferry_x < ferry_end then
125
 
        move_ferry()
126
 
    end
127
 
end
128
 
 
129
 
set_stone( "st-timer", 39, 0,
130
 
           {target="timer_callback", action="callback",
131
 
            name="timer", interval=2.3} )
132
 
 
133
 
set_stone( "st-timer", 39, 1,
134
 
           {target="timer_callback2", action="callback",
135
 
            name="timer", interval=0.1} )