more quieting of Qt6 build warnings
[NetHack.git] / dat / castle.lua
blob83eaecae6e757cfa810246eb39a395b7e6b39f21
1 -- NetHack castle castle.lua $NHDT-Date: 1652196024 2022/05/10 15:20:24 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.7 $
2 -- Copyright (c) 1989 by Jean-Christophe Collet
3 -- NetHack may be freely redistributed. See license for details.
4 --
5 --
6 -- This is the stronghold level :
7 -- there are several ways to enter it :
8 -- - opening the drawbridge (wand of opening, knock spell, playing
9 -- the appropriate tune)
11 -- - enter via the back entry (this suppose a ring of levitation, boots
12 -- of water walking, etc.)
14 -- Note : If you don't play the right tune, you get indications like in the
15 -- MasterMind game...
17 -- To motivate the player : there are 4 storerooms (armors, weapons, food and
18 -- gems) and a wand of wishing in one of the 4 towers...
20 des.level_init({ style="mazegrid", bg ="-" });
22 des.level_flags("mazelevel", "noteleport", "noflipy")
24 des.map([[
25 }}}}}}}}}.............................................}}}}}}}}}
26 }-------}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}-------}
27 }|.....|-----------------------------------------------|.....|}
28 }|.....+...............................................+.....|}
29 }-------------------------------+-----------------------------}
30 }}}}}}|........|..........+...........|.......S.S.......|}}}}}}
31 .....}|........|..........|...........|.......|.|.......|}.....
32 .....}|........------------...........---------S---------}.....
33 .....}|...{....+..........+.........\.S.................+......
34 .....}|........------------...........---------S---------}.....
35 .....}|........|..........|...........|.......|.|.......|}.....
36 }}}}}}|........|..........+...........|.......S.S.......|}}}}}}
37 }-------------------------------+-----------------------------}
38 }|.....+...............................................+.....|}
39 }|.....|-----------------------------------------------|.....|}
40 }-------}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}-------}
41 }}}}}}}}}.............................................}}}}}}}}}
42 ]]);
44 -- Random registers initialisation
45 local object = { "[", ")", "*", "%" };
46 shuffle(object)
48 local place = selection.new();
49 place:set(04,02);
50 place:set(58,02);
51 place:set(04,14);
52 place:set(58,14);
54 local monster = { "L", "N", "E", "H", "M", "O", "R", "T", "X", "Z" }
55 shuffle(monster)
57 des.teleport_region({ region = {01,00,10,20}, region_islev=1, exclude={1,1,61,15}, dir="down" })
58 des.teleport_region({ region = {69,00,79,20}, region_islev=1, exclude={1,1,61,15}, dir="up" })
59 des.levregion({ region = {01,00,10,20}, region_islev=1, exclude={0,0,62,16}, type="stair-up" })
60 des.feature("fountain", 10,08)
61 -- Doors
62 des.door("closed",07,03)
63 des.door("closed",55,03)
64 des.door("locked",32,04)
65 des.door("locked",26,05)
66 des.door("locked",46,05)
67 des.door("locked",48,05)
68 des.door("locked",47,07)
69 des.door("closed",15,08)
70 des.door("closed",26,08)
71 des.door("locked",38,08)
72 des.door("locked",56,08)
73 des.door("locked",47,09)
74 des.door("locked",26,11)
75 des.door("locked",46,11)
76 des.door("locked",48,11)
77 des.door("locked",32,12)
78 des.door("closed",07,13)
79 des.door("closed",55,13)
80 -- The drawbridge
81 des.drawbridge({ dir="east", state="closed", x=05,y=08})
82 -- Storeroom number 1
83 des.object(object[1],39,05)
84 des.object(object[1],40,05)
85 des.object(object[1],41,05)
86 des.object(object[1],42,05)
87 des.object(object[1],43,05)
88 des.object(object[1],44,05)
89 des.object(object[1],45,05)
90 des.object(object[1],39,06)
91 des.object(object[1],40,06)
92 des.object(object[1],41,06)
93 des.object(object[1],42,06)
94 des.object(object[1],43,06)
95 des.object(object[1],44,06)
96 des.object(object[1],45,06)
97 -- Storeroom number 2
98 des.object(object[2],49,05)
99 des.object(object[2],50,05)
100 des.object(object[2],51,05)
101 des.object(object[2],52,05)
102 des.object(object[2],53,05)
103 des.object(object[2],54,05)
104 des.object(object[2],55,05)
105 des.object(object[2],49,06)
106 des.object(object[2],50,06)
107 des.object(object[2],51,06)
108 des.object(object[2],52,06)
109 des.object(object[2],53,06)
110 des.object(object[2],54,06)
111 des.object(object[2],55,06)
112 -- Storeroom number 3
113 des.object(object[3],39,10)
114 des.object(object[3],40,10)
115 des.object(object[3],41,10)
116 des.object(object[3],42,10)
117 des.object(object[3],43,10)
118 des.object(object[3],44,10)
119 des.object(object[3],45,10)
120 des.object(object[3],39,11)
121 des.object(object[3],40,11)
122 des.object(object[3],41,11)
123 des.object(object[3],42,11)
124 des.object(object[3],43,11)
125 des.object(object[3],44,11)
126 des.object(object[3],45,11)
127 -- Storeroom number 4
128 des.object(object[4],49,10)
129 des.object(object[4],50,10)
130 des.object(object[4],51,10)
131 des.object(object[4],52,10)
132 des.object(object[4],53,10)
133 des.object(object[4],54,10)
134 des.object(object[4],55,10)
135 des.object(object[4],49,11)
136 des.object(object[4],50,11)
137 des.object(object[4],51,11)
138 des.object(object[4],52,11)
139 des.object(object[4],53,11)
140 des.object(object[4],54,11)
141 des.object(object[4],55,11)
142 -- THE WAND OF WISHING in 1 of the 4 towers
143 local loc = place:rndcoord(1);
144 des.object({ id = "chest", trapped = 0, locked = 1, coord = loc ,
145 contents = function()
146 des.object("wishing");
149 -- Prevent monsters from eating it. (@'s never eat objects)
150 des.engraving({ coord = loc, type="burn", text="Elbereth" })
151 des.object({ id = "scroll of scare monster", coord = loc, buc="cursed" })
152 -- The treasure of the lord
153 des.object("chest",37,08)
154 -- Traps
155 des.trap("trap door",40,08)
156 des.trap("trap door",44,08)
157 des.trap("trap door",48,08)
158 des.trap("trap door",52,08)
159 des.trap("trap door",55,08)
160 -- Soldiers guarding the entry hall
161 des.monster("soldier",08,06)
162 des.monster("soldier",09,05)
163 des.monster("soldier",11,05)
164 des.monster("soldier",12,06)
165 des.monster("soldier",08,10)
166 des.monster("soldier",09,11)
167 des.monster("soldier",11,11)
168 des.monster("soldier",12,10)
169 des.monster("lieutenant",09,08)
170 -- Soldiers guarding the towers
171 des.monster("soldier",03,02)
172 des.monster("soldier",05,02)
173 des.monster("soldier",57,02)
174 des.monster("soldier",59,02)
175 des.monster("soldier",03,14)
176 des.monster("soldier",05,14)
177 des.monster("soldier",57,14)
178 des.monster("soldier",59,14)
179 -- The four dragons that are guarding the storerooms
180 des.monster("D",47,05)
181 des.monster("D",47,06)
182 des.monster("D",47,10)
183 des.monster("D",47,11)
184 -- Sea monsters in the moat
185 des.monster("giant eel",05,07)
186 des.monster("giant eel",05,09)
187 des.monster("giant eel",57,07)
188 des.monster("giant eel",57,09)
189 des.monster("shark",05,00)
190 des.monster("shark",05,16)
191 des.monster("shark",57,00)
192 des.monster("shark",57,16)
193 -- The throne room and the court monsters
194 des.monster(monster[10],27,05)
195 des.monster(monster[1],30,05)
196 des.monster(monster[2],33,05)
197 des.monster(monster[3],36,05)
198 des.monster(monster[4],28,06)
199 des.monster(monster[5],31,06)
200 des.monster(monster[6],34,06)
201 des.monster(monster[7],37,06)
202 des.monster(monster[8],27,07)
203 des.monster(monster[9],30,07)
204 des.monster(monster[10],33,07)
205 des.monster(monster[1],36,07)
206 des.monster(monster[2],28,08)
207 des.monster(monster[3],31,08)
208 des.monster(monster[4],34,08)
209 des.monster(monster[5],27,09)
210 des.monster(monster[6],30,09)
211 des.monster(monster[7],33,09)
212 des.monster(monster[8],36,09)
213 des.monster(monster[9],28,10)
214 des.monster(monster[10],31,10)
215 des.monster(monster[1],34,10)
216 des.monster(monster[2],37,10)
217 des.monster(monster[3],27,11)
218 des.monster(monster[4],30,11)
219 des.monster(monster[5],33,11)
220 des.monster(monster[6],36,11)
221 -- MazeWalks
222 des.mazewalk(00,10,"west")
223 des.mazewalk(62,06,"east")
224 -- Non diggable walls
225 des.non_diggable(selection.area(00,00,62,16))
226 -- Subrooms:
227 -- Entire castle area
228 des.region(selection.area(00,00,62,16),"unlit")
229 -- Courtyards
230 des.region(selection.area(00,05,05,11),"lit")
231 des.region(selection.area(57,05,62,11),"lit")
232 -- Throne room
233 des.region({ region={27,05, 37,11},lit=1,type="throne", filled=2 })
234 -- Antechamber
235 des.region(selection.area(07,05,14,11),"lit")
236 -- Storerooms
237 des.region(selection.area(39,05,45,06),"lit")
238 des.region(selection.area(39,10,45,11),"lit")
239 des.region(selection.area(49,05,55,06),"lit")
240 des.region(selection.area(49,10,55,11),"lit")
241 -- Corners
242 des.region(selection.area(02,02,06,03),"lit")
243 des.region(selection.area(56,02,60,03),"lit")
244 des.region(selection.area(02,13,06,14),"lit")
245 des.region(selection.area(56,13,60,14),"lit")
246 -- Barracks
247 des.region({ region={16,05, 25,06},lit=1,type="barracks", filled=1 })
248 des.region({ region={16,10, 25,11},lit=1,type="barracks", filled=1 })
249 -- Hallways
250 des.region(selection.area(08,03,54,03),"unlit")
251 des.region(selection.area(08,13,54,13),"unlit")
252 des.region(selection.area(16,08,25,08),"unlit")
253 des.region(selection.area(39,08,55,08),"unlit")
254 -- Storeroom alcoves
255 des.region(selection.area(47,05,47,06),"unlit")
256 des.region(selection.area(47,10,47,11),"unlit")