home *** CD-ROM | disk | FTP | other *** search
/ GameStar Special 2004 August / GSSH0804.iso / Geschicklichkeit / Enigma / Enigma-081.exe / data / levels / duffy8.lua < prev    next >
Text File  |  2003-01-30  |  2KB  |  74 lines

  1. levelw=80
  2. levelh=20
  3.  
  4. create_world( levelw, levelh)
  5.  
  6. fill_floor("fl-leaves", 0,0,levelw,levelh)
  7.  
  8. function renderLine( line, pattern)
  9.     for i=1, strlen(pattern) do
  10.         local c = strsub( pattern, i, i)
  11.         if c =="#" then
  12.             set_stone( "st-greenbrown", i-1, line)
  13.         elseif c == "o" then
  14.             oxyd( i-1, line)
  15.                 elseif c == "!" then
  16.             abyss(i-1,line)
  17. --            fill_floor("fl-water", i-1,line, 1,1)
  18.         elseif c=="z" then
  19.             set_actor("ac-blackball", i-.5,line+.5, {player=0})
  20.             set_item("it-yinyang", i-1, line+.5)
  21.             fill_floor("fl-bluegreen", i-1,line, 1,1)
  22.         elseif c=="y" then
  23.             set_actor("ac-whiteball", i-.5,line+.5, {player=1})
  24.             set_item("it-yinyang", i-1, line+.5)
  25.             fill_floor("fl-bluegreen", i-1,line, 1,1)
  26.         elseif c=="+" then
  27.             set_stone( "st-wood", i-1, line)
  28.             fill_floor("fl-bluegreen", i-1,line, 1,1)
  29.         elseif c=="=" then
  30.             set_stone( "st-wood", i-1, line)
  31.         elseif c=="B" then
  32.             set_stone("st-bombs", i-1,line)
  33.         elseif c=="d" then
  34.             set_stone("st-oneway", i-1,line, {orientation=enigma.SOUTH})    
  35.         elseif c=="l" then
  36.             set_stone("st-oneway", i-1,line, {orientation=enigma.WEST})
  37.         elseif c == "X" then
  38.                     draw_stones("st-yinyang1", { i-1,line}, {0,1},1)
  39.         elseif c=="C" then
  40.                doorh( i-1,line, {name="door3"})
  41.         elseif c == "b" then
  42.             yy1( "black",  i-1, line)
  43.         elseif c == "w" then
  44.             yy1( "white",  i-1, line)
  45.         elseif c == "x" then
  46.             fill_floor("fl-bluegreen", i-1,line, 1,1)
  47.         end
  48.     end    
  49. end
  50.  
  51. function yy1( color, x, y)
  52.         stone = format( "st-%s4", color)
  53.         set_stone( stone, x, y)
  54. end
  55.  
  56. -- Floor:  " "
  57. -- Border: "#"
  58. -- Oxyd:   "o"
  59.  
  60. renderLine(00,"####################")
  61. renderLine(01,"ow!x!x!+!x!x!+!x!xbo")
  62. renderLine(02,"#!x!+!x!x!+!x!x!x!x#")
  63. renderLine(03,"#x!x!+!x!+!+!x!+!x!#")
  64. renderLine(04,"#!x!+!+!+!x!+!+!+!x#")
  65. renderLine(05,"#+!xxx!+!x!x!+!xxx!#")
  66. renderLine(06,"#!x!+z+!x!+!x!+y+!+#")
  67. renderLine(07,"#+!xxx!+!x!x!+!xxx!#")
  68. renderLine(08,"#!x!+!+!+!x!+!+!+!x#")
  69. renderLine(09,"#x!x!+!x!+!+!x!+!x!#")
  70. renderLine(10,"#!x!+!x!x!+!x!x!x!x#")
  71. renderLine(11,"ob!x!x!+!x!x!+!x!xwo")
  72. renderLine(12,"####################")
  73.  
  74. oxyd_shuffle()