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

  1. -- Push Them In
  2. -- A GSokoban level adapted for Enigma
  3. --
  4. -- GSokoban Copyright (c) 1999, 2000 Andreas Persenius
  5. -- This conversion Copyright (c) 2002 Nat Pryce
  6.  
  7. INNER_FLOOR = "fl-normal"
  8. OUTER_FLOOR = "fl-leaves"
  9. WALL = "st-rock2"
  10.  
  11. level = {
  12.     "                    ",
  13.     "          ########  ",
  14.     "          #.....o#  ",
  15.     "          #.+#+.##  ",
  16.     "   ########.+..+#   ",
  17.     "   #x~~...##+.+.#   ",
  18.     " #######..#.+.#.### ",
  19.     " #x~~~~..##.+..+..# ",
  20.     " ##x~~~....+..+...# ",
  21.     " #x~~~~..########## ",
  22.     " #########          ",
  23.     "                    ",
  24.     "                    "
  25. }
  26.  
  27. cells = {}
  28. cells["."] = function( x, y )
  29.     set_floor( INNER_FLOOR, x, y )
  30. end
  31. cells["#"] = function( x, y )
  32.     set_stone( WALL, x, y )
  33. end
  34. cells["o"] = function( x, y )
  35.     set_floor( INNER_FLOOR, x, y )
  36.     set_actor( "ac-blackball", x+0.5, y+0.5, {player=0} )
  37. end
  38. cells["x"] = function( x, y )
  39.     set_floor( INNER_FLOOR, x, y )
  40.     oxyd(x,y)
  41. end
  42. cells["+"] = function( x, y )
  43.     set_floor( INNER_FLOOR, x, y )
  44.     set_stone( "st-wood", x, y )
  45. end
  46. cells["~"] = function( x, y )
  47.     set_floor( "fl-water", x, y )
  48. end
  49. cells[" "] = function( x, y )
  50.     set_floor( OUTER_FLOOR, x,y )
  51. end
  52.  
  53.  
  54. create_world( strlen(level[1]), getn(level) )
  55. for y,line in level do
  56.     for x = 1,strlen(line) do
  57.         cell = strchar(strbyte(line,x))
  58.         cells[cell]( x-1, y-1 )
  59.     end
  60. end
  61. oxyd_shuffle()
  62.