Source:NetHack 5.0.0/dat/soko4-1.lua
Jump to navigation
Jump to search
Below is the full text to soko4-1.lua from the source code of NetHack 5.0.0. To link to a particular line, write [[Source:NetHack 5.0.0/dat/soko4-1.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 sokoban soko4-1.lua $NHDT-Date: 1652196036 2022/05/10 15:20:36 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.2 $ 2. -- Copyright (c) 1998-1999 by Kevin Hugo 3. -- NetHack may be freely redistributed. See license for details. 4. -- 5. -- 6. -- In case you haven't played the game Sokoban, you'll learn 7. -- quickly. This branch isn't particularly difficult, just time 8. -- consuming. Some players may wish to skip this branch. 9. -- 10. -- The following actions are currently permitted without penalty: 11. -- Carrying or throwing a boulder already in inventory 12. -- (player or nonplayer). 13. -- Teleporting boulders. 14. -- Digging in the floor. 15. -- The following actions are permitted, but with a luck penalty: 16. -- Breaking boulders. 17. -- Stone-to-fleshing boulders. 18. -- Creating new boulders (e.g., with a scroll of earth). 19. -- Jumping. 20. -- Being pulled by a thrown iron ball. 21. -- Hurtling through the air from Newton's 3rd law. 22. -- Squeezing past boulders when naked or as a giant. 23. -- These actions are not permitted: 24. -- Moving diagonally between two boulders and/or walls. 25. -- Pushing a boulder diagonally. 26. -- Picking up boulders (player or nonplayer). 27. -- Digging or walking through walls. 28. -- Teleporting within levels or between levels of this branch. 29. -- Using cursed potions of gain level. 30. -- Escaping a pit/hole (e.g., by flying, levitation, or 31. -- passing a dexterity check). 32. -- Bones files are not permitted. 33. 34. 35. --## Bottom (first) level of Sokoban ### 36. des.level_init({ style = "solidfill", fg = " " }); 37. 38. des.level_flags("mazelevel", "noteleport", "hardfloor", "premapped", "sokoban", "solidify"); 39. 40. des.map([[ 41. ------ ----- 42. |....| |...| 43. |....----...| 44. |...........| 45. |..|-|.|-|..| 46. ---------|.--- 47. |......|.....| 48. |..----|.....| 49. --.| |.....| 50. |.|---|.....| 51. |...........| 52. |..|--------- 53. ---- 54. ]]); 55. des.levregion({ region = {06,04,06,04}, type = "branch" }) 56. des.stair("up", 06,06) 57. des.region(selection.area(00,00,13,12), "lit") 58. des.non_diggable(selection.area(00,00,13,12)) 59. des.non_passwall(selection.area(00,00,13,12)) 60. 61. -- Boulders 62. des.object("boulder",02,02) 63. des.object("boulder",02,03) 64. -- 65. des.object("boulder",10,02) 66. des.object("boulder",09,03) 67. des.object("boulder",10,04) 68. -- 69. des.object("boulder",08,07) 70. des.object("boulder",09,08) 71. des.object("boulder",09,09) 72. des.object("boulder",08,10) 73. des.object("boulder",10,10) 74. 75. -- prevent monster generation over the (filled) pits 76. des.exclusion({ type = "monster-generation", region = { 01,06, 07,11 } }); 77. 78. -- Traps 79. des.trap("pit",04,06) 80. 81. des.trap("pit",02,06) 82. des.trap("pit",02,07) 83. des.trap("pit",02,08) 84. des.trap("rolling boulder",02,09) 85. 86. des.trap("pit",02,10) 87. des.trap("pit",03,10) 88. des.trap("pit",04,10) 89. des.trap("pit",05,10) 90. des.trap("pit",06,10) 91. des.trap("rolling boulder",07,10) 92. 93. -- A little help 94. des.object("scroll of earth",02,11) 95. des.object("scroll of earth",03,11) 96. 97. -- Random objects 98. des.object({ class = "%" }); 99. des.object({ class = "%" }); 100. des.object({ class = "%" }); 101. des.object({ class = "%" }); 102. des.object({ class = "=" }); 103. des.object({ class = "/" }); 104.