Source:NetHack 5.0.0/dat/bigrm-13.lua
Jump to navigation
Jump to search
Below is the full text to bigrm-13.lua from the source code of NetHack 5.0.0. To link to a particular line, write [[Source:NetHack 5.0.0/dat/bigrm-13.lua#line12]], for example.
The NetHack General Public License applies to screenshots, source code and other content from NetHack.
This content was modified from the original NetHack source code distribution (by splitting up NetHack content between wiki pages, and possibly further editing). See the page history for a list of who changed it, and on what dates.
1. -- NetHack bigroom bigrm-13.lua $NHDT-Date: 1652196024 2022/05/10 15:20:24 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.0 $ 2. -- Copyright (c) 2026 by Pasi Kallinen 3. -- NetHack may be freely redistributed. See license for details. 4. -- 5. -- Pillars 6. 7. des.level_init({ style = "solidfill", fg = " " }); 8. des.level_flags("mazelevel", "noflip"); 9. 10. des.map([[ 11. --------------------------------------------------------------------------- 12. |.........................................................................| 13. |.........................................................................| 14. |.........................................................................| 15. |.........................................................................| 16. |.........................................................................| 17. |.........................................................................| 18. |.........................................................................| 19. |.........................................................................| 20. |.........................................................................| 21. |.........................................................................| 22. |.........................................................................| 23. |.........................................................................| 24. |.........................................................................| 25. |.........................................................................| 26. |.........................................................................| 27. |.........................................................................| 28. |.........................................................................| 29. --------------------------------------------------------------------------- 30. ]]); 31. 32. local pillar = [[ 33. --- 34. | | 35. ---]]; 36. 37. filters = { 38. -- 1: all pillars 39. function(x, y) return true; end, 40. -- 2: 3 vertical lines 41. function(x, y) return (x%2 == 1); end, 42. -- 3: checkerboard 43. function(x, y) return (((x+y)%2) == 0); end, 44. -- 4: center row 45. function(x, y) return (y%2 == 1); end, 46. -- 5: top and bottom rows 47. function(x, y) return (y%2 == 0); end, 48. -- 6: random 50% 49. function(x, y) return (math.random(0,1) == 0); end, 50. -- 7: corners and center 51. function(x, y) return ((x/3)%2 == y%2); end, 52. -- 8: slanted 53. function(x, y) return ((x+1)//3 == y); end, 54. }; 55. 56. idx = math.random(1, #filters); 57. 58. for y = 0,2 do 59. for x = 0,6 do 60. if (filters[idx](x, y)) then 61. des.map({ coord = {12 + x*9, 4 + y*5}, map = pillar, contents=function() end }); 62. end 63. end 64. end 65. 66. des.region(selection.area(00,00,75,18), "lit"); 67. des.wallify(); 68. des.non_diggable(); 69. 70. des.stair("up"); 71. des.stair("down"); 72. 73. for i = 1,15 do 74. des.object(); 75. end 76. for i = 1,6 do 77. des.trap(); 78. end 79. for i = 1,28 do 80. des.monster(); 81. end 82.