home *** CD-ROM | disk | FTP | other *** search
/ GameStar Special 2004 August / GSSH0804.iso / Geschicklichkeit / Enigma / Enigma-081.exe / data / levels / duffy25.lua < prev    next >
Text File  |  2003-08-27  |  4KB  |  110 lines

  1. levelw=100
  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 == "s" then
  19.             set_stone("st-stoneimpulse", i-1,line)
  20.             fill_floor("fl-water", i-1,line, 1,1)
  21.         elseif c=="z" then
  22.             set_actor("ac-blackball", i-.5,line+.5, {player=0})
  23.             set_item("it-yinyang", i-1, line+.5)
  24.         elseif c=="y" then
  25.             set_actor("ac-whiteball", i-.5,line+.5, {player=1})
  26.             set_item("it-yinyang", i-1, line+.5)
  27.         elseif c=="+" then
  28.             set_stone( "st-wood", i-1, line)
  29.             fill_floor("fl-leaves", i-1,line, 1,1)
  30.         elseif c==":" then
  31.             fill_floor("fl-space", i-1,line, 1,1)
  32.         elseif c=="=" then
  33.             fill_floor("fl-leaves", i-1,line, 1,1)
  34.         elseif c=="S" then
  35.             set_stone( "st-swap", i-1, line)
  36.              elseif c=="*" then
  37.             set_stone( "st-greenbrown", i-1, line)
  38.                 fill_floor("fl-water", i-1,line, 1,1)
  39.         elseif c == "R" then
  40.             puzzle(i-1,line,PUZ_0100)
  41.         elseif c == "L" then
  42.             puzzle(i-1,line,PUZ_0001)
  43.         elseif c == "Q" then
  44.             puzzle(i-1,line,PUZ_0011)
  45.         elseif c == "U" then
  46.             puzzle(i-1,line,PUZ_1100)
  47.         elseif c=="g" then
  48.             draw_stones("st-grate1",{i-1,line}, {1,1}, 1)
  49.         elseif c=="A" then
  50.             doorv(i-1,line,{name="door1"})
  51.         elseif c=="B" then
  52.             doorv(i-1,line,{name="door2"})
  53.         elseif c=="E" then
  54.             doorv(i-1,line,{name="door3"})
  55.         elseif c=="F" then
  56.             doorv(i-1,line,{name="door4"})
  57.         elseif c=="I" then
  58.             fill_floor("fl-inverse", i-1,line, 1,1)
  59.         elseif c=="D" then
  60.             set_stone("st-floppy", i-1, line, {action="openclose", target="door2"})
  61.         elseif c=="d" then
  62.             set_item("it-floppy", i-1, line)
  63.         elseif c=="C" then
  64.             set_stone("st-key_a", i-1, line, {action="openclose", target="door1"})
  65.         elseif c=="c" then        
  66.             set_item("it-key_a", i-1 ,line)
  67.         elseif c == "b" then
  68.             yy1( "black",  i-1, line)
  69.         elseif c == "w" then
  70.             yy1( "white",  i-1, line)
  71.         elseif c == "X" then
  72.                     draw_stones("st-yinyang1", { i-1,line}, {0,1},1)
  73.         elseif c=="P" then
  74.             set_item("it-brush",i-1,line)
  75.         elseif c=="p" then
  76.             draw_stones("st-stonebrush", {i-1,line}, {1,0},1)
  77.             elseif c=="e" then
  78.             set_stone("st-switch", i-1,line, {action="openclose",target="door3"})
  79.             elseif c=="f" then
  80.             set_stone("st-switch", i-1,line, {action="openclose",target="door4"})
  81.         elseif c=="l" then
  82.             oneway(i-1,line, enigma.WEST)
  83.         end
  84.     end    
  85. end
  86.  
  87. function yy1( color, x, y)
  88.         stone = format( "st-%s4", color)
  89.         set_stone( stone, x, y)
  90. end
  91.  
  92. -- Floor:  " "
  93. -- Border: "#"
  94. -- Oxyd:   "o"
  95.  
  96. renderLine(00,"##################################################sssss###")
  97. renderLine(01,"#  bbXbXbXb XXXXXdX#  D#              #!!!!!!!!!!!s!!!s !#")
  98. renderLine(02,"#  #bwbwbw# XbXw XX# ###   + + + +    #!!!!!!!!!!!sss   !#")
  99. renderLine(03,"#  #bwbwbw# XX XXbX#X  #          #bbb#!!!!      !!!* !! #")
  100. renderLine(04,"#z #bwbwbw# XwXb XX#w# #  #!!!!!!##wwb#!!!! !!!! !!!  !! #")
  101. renderLine(05,"#  #bwbwbw# XX XXwX#X#X##w##!#!#!##RQ #   ! !*        !! #")
  102. renderLine(06,"#  #bwbwbw# XbXw X     AB #!X!X!X## UL  +   !!! !!!!! !! #")
  103. renderLine(07,"#  #bwbwbw# XX XXbX#X#X##b#!#!#!###   #   ! !!! !!!!!*!! #")
  104. renderLine(08,"#y #bwbwbw# XwXb XX#b# #  #!!!!!!##bbw#!!!! !!!    *!!!! #")
  105. renderLine(09,"#  #bwbwbw# XX XXwX#X  #          #www#!!*        !!!    #")
  106. renderLine(10,"#  #bwbwbw# XbXw XX# ###    + + +     #!!!!!!!!*! !!!#b#w#")
  107. renderLine(11,"#  wXwXwXww XX XXcX#  C#              #!!!!!!!!!!*!!!#o#o#")
  108. renderLine(12,"##########################################################")
  109.  
  110. oxyd_shuffle()