Source:NetHack 5.0.0/dat/minetn-1.lua
Jump to navigation
Jump to search
Below is the full text to minetn-1.lua from the source code of NetHack 5.0.0. To link to a particular line, write [[Source:NetHack 5.0.0/dat/minetn-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 5.0 mines minetn-1.lua $NHDT-Date: 1652196030 2022/05/10 15:20:30 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.8 $ 2. -- Copyright (c) 1989-95 by Jean-Christophe Collet 3. -- Copyright (c) 1991-95 by M. Stephenson 4. -- NetHack may be freely redistributed. See license for details. 5. -- 6. -- A tragic accident has occurred in Frontier Town.... 7. -- 8. -- Minetown variant 1 9. -- Orcish Town - a variant of Frontier Town that has been 10. -- overrun by orcs. Note the barricades (iron bars). 11. 12. des.level_flags("mazelevel") 13. 14. des.level_init({ style="mines", fg=".", bg=" ", smoothed=true, joined=true, walled=true }) 15. 16. des.map([[ 17. ..................................... 18. .----------------F------------------. 19. .|.................................|. 20. .|.-------------......------------.|. 21. .|.|...|...|...|......|..|...|...|.|. 22. .F.|...|...|...|......|..|...|...|.|. 23. .|.|...|...|...|......|..|...|...|.F. 24. .|.|...|...|----......------------.|. 25. .|.---------.......................|. 26. .|.................................|. 27. .|.---------.....--...--...........|. 28. .|.|...|...|----.|.....|.---------.|. 29. .|.|...|...|...|.|.....|.|..|....|.|. 30. .|.|...|...|...|.|.....|.|..|....|.|. 31. .|.|...|...|...|.|.....|.|..|....|.|. 32. .|.-------------.-------.---------.|. 33. .|.................................F. 34. .-----------F------------F----------. 35. ..................................... 36. ]]); 37. 38. -- Don't let the player fall into his likely death; used to explicitly exclude 39. -- the town, but that meant that you couldn't teleport out as well as not in. 40. des.teleport_region({ region={01,01,75,19}, exclude={01,00,35,21}, region_islev=1 }) 41. des.region(selection.area(01,01,35,17), "lit") 42. des.levregion({ type="stair-up", region={01,03,21,19}, region_islev=1, 43. exclude={00,01,36,17} }); 44. des.levregion({ type="stair-down", region={57,03,75,19}, region_islev=1, 45. exclude={00,01,36,17} }) 46. 47. -- shame we can't make polluted fountains 48. des.feature("fountain",16,09) 49. des.feature("fountain",25,09) 50. 51. -- the altar's defiled; useful for BUC but never coaligned 52. des.altar({ x=20,y=13,align="noalign", type="shrine" }) 53. 54. -- set up the shop doors; could be broken down 55. des.door("random",5,8) 56. des.door("random",9,8) 57. des.door("random",13,7) 58. des.door("random",22,5) 59. des.door("random",27,7) 60. des.door("random",31,7) 61. des.door("random",5,10) 62. des.door("random",9,10) 63. des.door("random",15,13) 64. des.door("random",25,13) 65. des.door("random",31,11) 66. 67. -- knock a few holes in the shop interior walls 68. des.replace_terrain({ region={07,04,11,06}, fromterrain="|", toterrain=".", chance=18 }) 69. des.replace_terrain({ region={25,04,29,06}, fromterrain="|", toterrain=".", chance=18 }) 70. des.replace_terrain({ region={07,12,11,14}, fromterrain="|", toterrain=".", chance=18 }) 71. des.replace_terrain({ region={28,12,28,14}, fromterrain="|", toterrain=".", chance=33 }) 72. 73. -- One spot each in most shops... 74. local place = { {05,04},{09,05},{13,04},{26,04},{31,05},{30,14},{05,14},{10,13},{26,14},{27,13} } 75. shuffle(place); 76. 77. -- scatter some bodies 78. des.object({ id = "corpse", x=20,y=12, montype="aligned cleric" }) 79. des.object({ id = "corpse", coord = place[1], montype="shopkeeper" }) 80. des.object({ id = "corpse", coord = place[2], montype="shopkeeper" }) 81. des.object({ id = "corpse", coord = place[3], montype="shopkeeper" }) 82. des.object({ id = "corpse", coord = place[4], montype="shopkeeper" }) 83. des.object({ id = "corpse", coord = place[5], montype="shopkeeper" }) 84. des.object({ id = "corpse", montype="watchman" }) 85. des.object({ id = "corpse", montype="watchman" }) 86. des.object({ id = "corpse", montype="watchman" }) 87. des.object({ id = "corpse", montype="watchman" }) 88. des.object({ id = "corpse", montype="watch captain" }) 89. 90. -- Rubble! 91. for i = 1, math.random(10,19) do 92. if percent(90) then 93. des.object("boulder") 94. end 95. des.object("rock") 96. end 97. 98. -- Guarantee 7 candles since we won't have Izchak available 99. des.object({ id = "wax candle", coord = place[4], quantity = math.random(1,2) }) 100. 101. des.object({ id = "wax candle", coord = place[1], quantity = math.random(2,4) }) 102. des.object({ id = "wax candle", coord = place[2], quantity = math.random(1,2) }) 103. des.object({ id = "tallow candle", coord = place[3], quantity = math.random(1,3) }) 104. des.object({ id = "tallow candle", coord = place[2], quantity = math.random(1,2) }) 105. des.object({ id = "tallow candle", coord = place[4], quantity = math.random(1,2) }) 106. 107. -- go ahead and leave a lamp next to one corpse to be suggestive 108. -- and some empty wands... 109. des.object("oil lamp",place[2]) 110. des.object({ id = "wand of striking", coord = place[1], buc="uncursed", spe=0 }) 111. des.object({ id = "wand of striking", coord = place[3], buc="uncursed", spe=0 }) 112. des.object({ id = "wand of striking", coord = place[4], buc="uncursed", spe=0 }) 113. des.object({ id = "wand of magic missile", coord = place[4], buc="uncursed", spe=0 }) 114. des.object({ id = "wand of magic missile", coord = place[5], buc="uncursed", spe=0 }) 115. 116. -- the Orcish Army 117. 118. local inside = selection.floodfill(18,8) 119. local near_temple = selection.area(17,8, 23,14) & inside 120. 121. for i = 1, math.random(5,15) do 122. if percent(50) then 123. des.monster({ id = "orc-captain", coord = inside:rndcoord(1), peaceful=0 }); 124. else 125. if percent(80) then 126. des.monster({ id = "Uruk-hai", coord = inside:rndcoord(1), peaceful=0 }) 127. else 128. des.monster({ id = "Mordor orc", coord = inside:rndcoord(1), peaceful=0 }) 129. end 130. end 131. end 132. -- shamans can be hanging out in/near the temple 133. -- one of the shamans is higher level 134. for i = 1, math.random(1,6) do 135. des.monster({ id = "orc shaman", coord = near_temple:rndcoord(0), peaceful=0, 136. m_lev_adj = (i == 1) and 3 or 0 }); 137. end 138. -- these are not such a big deal 139. -- to run into outside the bars 140. for i = 1, math.random(10,19) do 141. if percent(90) then 142. des.monster({ id = "hill orc", peaceful = 0 }) 143. else 144. des.monster({ id = "goblin", peaceful = 0 }) 145. end 146. end 147. 148. -- Hack to force full-level wallification 149. 150. des.wallify()