home *** CD-ROM | disk | FTP | other *** search
/ GameStar Special 2004 August / GSSH0804.iso / Geschicklichkeit / Enigma / Enigma-081.exe / data / levels / ant01.lua < prev    next >
Encoding:
Text File  |  2003-01-05  |  4.3 KB  |  161 lines

  1. -- Puzzle Hacker
  2. -- (c) 2002 Petr Machata/ant_39
  3. -- Licensed under GPL v2.0 or above
  4.  
  5. levelw = 20
  6. levelh = 25
  7.  
  8. create_world(levelw, levelh)
  9.  
  10. fill_floor("fl-gray",   0, 0, level_width, level_height)
  11.  
  12. for i = 0, 100 do
  13.         x0 = random(level_width)
  14.         y0 = random(level_height)
  15.         set_floor ("fl-normal",  x0, y0)
  16. end
  17.  
  18. draw_border("st-marble")
  19. draw_stones("st-marble", { 0,12},{ 1, 0},20)
  20. draw_stones("st-grate2", { 1, 1},{ 1, 0},18)
  21. draw_stones("st-grate2", { 1, 1},{ 0, 1},11)
  22. draw_stones("st-grate2", { 1,11},{ 1, 0}, 9)
  23. draw_stones("st-grate2", { 9, 6},{ 0, 1}, 5)
  24.  
  25.  
  26. --abyss across the lower room
  27. x0 = 10
  28. y0 = 12
  29.  
  30. for i = y0, level_height do
  31.         abyss(x0, i)
  32. end
  33.  
  34. --balcony
  35. set_stone  ("st-grate1", x0+0, y0+0)
  36. fill_floor ("fl-abyss",  x0-2, y0+0, 5, 4)
  37. fill_floor ("fl-gray",   x0-1, y0+0, 3, 3)
  38. set_floor  ("fl-bridge", x0-1, y0+3, {name="bridge01"})
  39.  
  40. --grass in the upper room
  41. fill_floor("fl-leaves",  13, 6, 3, 5)
  42.  
  43. --vertical walls in the upper room
  44. draw_stones("st-marble", { 9, 6},{ 0, 1},6)
  45. draw_stones("st-marble", {11, 6},{ 0, 1},6)
  46. set_stone  ("st-grate1",   9,  7)
  47. set_stone  ("st-grate1",  11,  7)
  48.  
  49. --grass in the lower room
  50. fill_floor("fl-leaves",  2, 14, 5, 9)
  51. fill_floor("fl-leaves",  7, 17, 2, 6)
  52. fill_floor("fl-leaves", 12, 17, 4, 6)
  53. fill_floor("fl-leaves", 14, 14, 2, 3)
  54. fill_floor("fl-leaves", 16, 19, 2, 4)
  55.  
  56. set_stone("st-switch", 13, 21, {action="openclose", target="bridge01"})
  57.  
  58. --door
  59. draw_stones("st-marble", { 17, 6},{ 0, 1},12)
  60. set_stone("st-door",    18,  6, {name="door01", type="h"})
  61. set_stone("st-door",    18,  7, {name="door02", type="h"})
  62. set_stone("st-door",    18,  8, {name="door03", type="h"})
  63. set_stone("st-door",    18,  9, {name="door04", type="h"})
  64. set_stone("st-door",    18, 10, {name="door05", type="h"})
  65. set_stone("st-door",    18, 11, {name="door06", type="h"})
  66. set_stone("st-door",    18, 12, {name="door07", type="h"})
  67. set_stone("st-door",    18, 13, {name="door08", type="h"})
  68. set_stone("st-door",    18, 14, {name="door09", type="h"})
  69. set_stone("st-door",    18, 15, {name="door10", type="h"})
  70. set_stone("st-door",    18, 16, {name="door11", type="h"})
  71. set_stone("st-door",    18, 17, {name="door12", type="h"})
  72.  
  73. --triggers
  74. x0 = 2
  75. y0 = 6
  76.  
  77. set_item ("it-trigger", x0+0, y0+0, {action="openclose", target="door01"})
  78. set_item ("it-trigger", x0+0, y0+2, {action="openclose", target="door02"})
  79. set_item ("it-trigger", x0+0, y0+4, {action="openclose", target="door03"})
  80. set_item ("it-trigger", x0+2, y0+0, {action="openclose", target="door04"})
  81. set_item ("it-trigger", x0+2, y0+2, {action="openclose", target="door05"})
  82. set_item ("it-trigger", x0+2, y0+4, {action="openclose", target="door06"})
  83. set_item ("it-trigger", x0+4, y0+0, {action="openclose", target="door07"})
  84. set_item ("it-trigger", x0+4, y0+2, {action="openclose", target="door08"})
  85. set_item ("it-trigger", x0+4, y0+4, {action="openclose", target="door09"})
  86. set_item ("it-trigger", x0+6, y0+0, {action="openclose", target="door10"})
  87. set_item ("it-trigger", x0+6, y0+2, {action="openclose", target="door11"})
  88. set_item ("it-trigger", x0+6, y0+4, {action="openclose", target="door12"})
  89.  
  90. --PUZZLES
  91.  
  92. --two
  93. x0 = 14
  94. y0 = 2
  95. puzzle( x0+0, y0+0, PUZ_0100)
  96. puzzle( x0+1, y0+0, PUZ_0001)
  97.  
  98. --four
  99. x0 = 2
  100. y0 = 4
  101. puzzle( x0+0, y0+0, PUZ_0100)
  102. puzzle( x0+1, y0+0, PUZ_0101)
  103. puzzle( x0+2, y0+0, PUZ_1001)
  104. puzzle( x0+2, y0-1, PUZ_0010)
  105.  
  106. --five
  107. x0 = 15
  108. y0 = 3
  109. puzzle( x0+0, y0+0, PUZ_0100)
  110. puzzle( x0+1, y0+0, PUZ_0101)
  111. puzzle( x0+2, y0+0, PUZ_1001)
  112. puzzle( x0+2, y0-1, PUZ_0110)
  113. puzzle( x0+3, y0-1, PUZ_0001)
  114.  
  115. --seven
  116. x0 = 10
  117. y0 = 3
  118. puzzle( x0+0, y0+0, PUZ_0100)
  119. puzzle( x0+1, y0+0, PUZ_1001)
  120. puzzle( x0+1, y0-1, PUZ_0110)
  121. puzzle( x0+2, y0-1, PUZ_0101)
  122. puzzle( x0+3, y0-1, PUZ_0011)
  123. puzzle( x0+3, y0+0, PUZ_1100)
  124. puzzle( x0+4, y0+0, PUZ_0001)
  125.  
  126. --eight
  127. x0 = 6
  128. y0 = 4
  129. puzzle( x0+0, y0+0, PUZ_0100)
  130. puzzle( x0+1, y0+0, PUZ_0101)
  131. puzzle( x0+2, y0+0, PUZ_0101)
  132. puzzle( x0+3, y0+0, PUZ_0101)
  133. puzzle( x0+4, y0+0, PUZ_0101)
  134. puzzle( x0+5, y0+0, PUZ_0101)
  135. puzzle( x0+6, y0+0, PUZ_1001)
  136. puzzle( x0+6, y0-1, PUZ_0010)
  137.  
  138. --nine
  139. x0 = 3
  140. y0 = 3
  141. puzzle( x0+0, y0+0, PUZ_1000)
  142. puzzle( x0+0, y0-1, PUZ_0110)
  143. puzzle( x0+1, y0-1, PUZ_0101)
  144. puzzle( x0+2, y0-1, PUZ_0101)
  145. puzzle( x0+3, y0-1, PUZ_0101)
  146. puzzle( x0+4, y0-1, PUZ_0011)
  147. puzzle( x0+4, y0+0, PUZ_1100)
  148. puzzle( x0+5, y0+0, PUZ_0101)
  149. puzzle( x0+6, y0+0, PUZ_0001)
  150.  
  151.  
  152. -- OXYD stones
  153. oxyd ( 2,14)
  154. oxyd ( 6,14)
  155. oxyd ( 2,22)
  156. oxyd ( 8,22)
  157. oxyd_shuffle()
  158.  
  159. -- and actor...
  160. set_actor("ac-blackball", 2.5, 2.5, {player=0})
  161.