Source:NetHack 5.0.0/dat/minefill.lua

From NetHackWiki
Jump to navigation Jump to search

Below is the full text to minefill.lua from the source code of NetHack 5.0.0. To link to a particular line, write [[Source:NetHack 5.0.0/dat/minefill.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 mines minefill.lua	$NHDT-Date: 1652196028 2022/05/10 15:20:28 $  $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.3 $
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. --
7. 
8. --	The "fill" level for the mines.
9. --
10. --	This level is used to fill out any levels not occupied by
11. --	specific levels.
12. --
13. des.level_init({ style = "solidfill", fg = " " });
14. 
15. des.level_flags("mazelevel", "noflip");
16. 
17. des.level_init({ style="mines", fg=".", bg=" ", smoothed=true, joined=true, walled=true })
18. 
19. --
20. des.stair("up")
21. des.stair("down")
22. --
23. for i = 1,math.random(2, 5) do
24.    des.object("*")
25. end
26. des.object("(")
27. for i = 1,math.random(2, 4) do
28.    des.object()
29. end
30. if percent(75) then
31.    for i = 1,math.random(1, 2) do
32.       des.object("boulder")
33.    end
34. end
35. --
36. for i = 1,math.random(6, 8) do
37.    des.monster("gnome")
38. end
39. des.monster("gnome lord")
40. des.monster("dwarf")
41. des.monster("dwarf")
42. des.monster("G")
43. des.monster("G")
44. des.monster(percent(50) and "h" or "G")
45. --
46. des.trap()
47. des.trap()
48. des.trap()
49. des.trap()
50. des.trap()
51. des.trap()