Source:NetHack 5.0.0/dat/minetn-2.lua

From NetHackWiki
Jump to navigation Jump to search

Below is the full text to minetn-2.lua from the source code of NetHack 5.0.0. To link to a particular line, write [[Source:NetHack 5.0.0/dat/minetn-2.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 minetn-2.lua	$NHDT-Date: 1652196030 2022/05/10 15:20:30 $  $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. -- Minetown variant 2
7. -- "Town Square"
8. 
9. des.room({ type = "ordinary", lit=1, x=3, y=3,
10.            xalign="center", yalign="center", w=31, h=15,
11.            contents = function()
12.               des.feature("fountain", 17, 5)
13.               des.feature("fountain", 13, 8)
14. 
15.               if percent(75) then
16.                  des.room({ type = "ordinary", x=2,y=0, w=2,h=2,
17.                             contents = function()
18.                                des.door({ state="closed", wall="west" })
19.                             end
20.                  })
21.               end
22. 
23.               if percent(75) then
24.                  des.room({ type = "ordinary", lit=0, x=5,y=0, w=2,h=2,
25.                             contents = function()
26.                                des.door({ state="closed", wall="south" })
27.                             end
28.                  })
29.               end
30. 
31.               if percent(75) then
32.                  des.room({ type = "ordinary", x=8,y=0, w=2,h=2,
33.                             contents = function()
34.                                des.door({ state="closed", wall="east" })
35.                             end
36.                  })
37.               end
38. 
39.               if percent(75) then
40.                  des.room({ type = "ordinary", lit=1, x=16,y=0, w=2,h=2,
41.                             contents = function()
42.                                des.door({ state="closed", wall="west" })
43.                             end
44.                  })
45.               end
46. 
47.               if percent(75) then
48.                  des.room({ type = "ordinary", lit=0, x=19,y=0, w=2,h=2,
49.                             contents = function()
50.                                des.door({ state="closed", wall="south" })
51.                             end
52.                  })
53.               end
54. 
55.               if percent(75) then
56.                  des.room({ type = "ordinary", x=22,y=0, w=2,h=2,
57.                             contents = function()
58.                                des.door({ state="closed", wall="south" })
59.                                des.monster("gnome")
60.                             end
61.                  })
62.               end
63. 
64.               if percent(75) then
65.                  des.room({ type = "ordinary", lit=0, x=25,y=0, w=2,h=2,
66.                             contents = function()
67.                                des.door({ state="closed", wall="east" })
68.                             end
69.                  })
70.               end
71. 
72.               if percent(75) then
73.                  des.room({ type = "ordinary", lit=1, x=2,y=5, w=2,h=2,
74.                             contents = function()
75.                                des.door({ state="closed", wall="north" })
76.                             end
77.                  })
78.               end
79. 
80.               if percent(75) then
81.                  des.room({ type = "ordinary", lit=1, x=5,y=5, w=2,h=2,
82.                             contents = function()
83.                                des.door({ state="closed", wall="south" })
84.                             end
85.                  })
86.               end
87. 
88.               if percent(75) then
89.                  des.room({ type = "ordinary", x=8,y=5, w=2,h=2,
90.                             contents = function()
91.                                des.door({ state="locked", wall="north" })
92.                                des.monster("gnome")
93.                             end
94.                  })
95.               end
96. 
97.               des.room({ type="shop", chance=90, lit=1, x=2,y=10, w=4,h=3,
98.                          contents = function()
99.                             des.door({ state="closed", wall="west" })
100.                          end
101.               });
102. 
103.               des.room({ type = "tool shop", chance=90, lit=1, x=23,y=10, w=4,h=3,
104.                          contents = function()
105.                             des.door({ state="closed", wall="east" })
106.                          end
107.               });
108. 
109.               des.room({ type = monkfoodshop(), chance=90, lit=1, x=24,y=5, w=3,h=4,
110.                          contents = function()
111.                             des.door({ state="closed", wall="north" })
112.                          end
113.               });
114. 
115.               des.room({ type = "candle shop", lit=1, x=11,y=10, w=4,h=3,
116.                          contents = function()
117.                             des.door({ state="closed", wall="east" })
118.                          end
119.               });
120. 
121.               if percent(75) then
122.                  des.room({ type = "ordinary", lit=0, x=7,y=10, w=3,h=3,
123.                             contents = function()
124.                                des.door({ state="locked", wall="north" })
125.                                des.monster("gnome")
126.                             end
127.                  });
128.               end
129. 
130.               des.room({ type = "temple", lit=1, x=19,y=5, w=4,h=4,
131.                          contents = function()
132.                             des.door({ state="closed", wall="north" })
133.                             des.altar({ x=02, y=02, align=align[1],type="shrine" })
134.                             des.monster("gnomish wizard")
135.                             des.monster("gnomish wizard")
136.                          end
137.               });
138. 
139.               if percent(75) then
140.                  des.room({ type = "ordinary", lit=1, x=18,y=10, w=4,h=3,
141.                             contents = function()
142.                                des.door({ state="locked", wall="west" })
143.                                des.monster("gnome lord")
144.                             end
145.                  });
146.               end
147. 
148.               -- The Town Watch
149.               des.monster({ id = "watchman", peaceful = 1 })
150.               des.monster({ id = "watchman", peaceful = 1 })
151.               des.monster({ id = "watchman", peaceful = 1 })
152.               des.monster({ id = "watchman", peaceful = 1 })
153.               des.monster({ id = "watch captain", peaceful = 1 })
154.            end
155. });
156. 
157. des.room({ contents = function()
158.               des.stair("up")
159.                       end
160. });
161. 
162. des.room({ contents = function()
163.               des.stair("down")
164.               des.trap()
165.               des.monster("gnome")
166.               des.monster("gnome")
167.                       end
168. });
169. 
170. des.room({ contents = function()
171.               des.monster("dwarf")
172.                       end
173. });
174. 
175. des.room({ contents = function()
176.               des.trap()
177.               des.monster("gnome")
178.                       end
179. });
180. 
181. des.random_corridors()
182.