forked from crawl/crawl
-
Notifications
You must be signed in to change notification settings - Fork 1
/
uniques.des
520 lines (441 loc) · 12.3 KB
/
uniques.des
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
################################################################################
# uniques.des: This is where unique placement should be defined.
################################################################################
# Most of this should be self-explanatory. A unique vault can be defined by
#
# NAME: uniq_linley
# DEPTH: D:2-, !Orc
# WEIGHT: 10
# TAGS: place_unique
# MONS: Linley
# MAP
# 1
# ENDMAP
#
# This assumes that the unique is defined as a monster in the files
# enum.h, mon-gear.cc, mon-data.h, mon-spell.h, tilemcache.cc, tilepick.cc
# Their speech is defined in
# dat/database/monspeak.txt
#
# Vaults tagged as "place_unique" are assumed to place only one unique. If the
# unique is in a band, specify "unique band", (see uniq_duvessa, etc). Names of
# vault don't matter, except for the Boris vault.
#
# For most purposes, a vault like the above sample is desired. You can use the
# inline function place_unique in this case, reducing to
#
# NAME: uniq_linley
# DEPTH: D:2-, !Orc
# : place_unique(_G, "Linley")
#
# The WEIGHT line was skipped as 10 is the default.
# You have to deviate from this simple 3 liner only if
# * You want a more complicated map, e.g. with items or other monsters.
# (Not needed for unique in bands: place_unique(_G, "Linley band") works.)
# * You want additional tags, for example because you want to make a number
# of Linley vaults. In this case, you can still use the inline function;
# just add a TAG line.
# * You want different WEIGHTS. In this case, just add a WEIGHT line.
#
# If you want to weight uniques differently for some vaults, the weights for
# these vaults should all add up to 10 (the default weight for uniques),
# unless you want to make that unique appear more or less frequent on purpose.
# You can use multiple vaults that are tagged "uniq_<name>", with different
# weights for each of the vaults. See uniq_ribbit for examples of all this.
#
# Note also that uniques are never placed on D:1, so specifying placement there
# will only cause confusion.
#
# You can define DEBUG_UNIQUE_PLACEMENT and get a per-level unique generation
# report in "unique_placement.log" in debug mode.
#
# NOTE: Does not deal with fixed-place uniques such as the Royal Jelly, the Hell
# bosses, and the Pan bosses.
################################################################################
{{
require('dlua/vault.lua')
function place_unique(e, monster)
e.mons(monster)
e.tags("place_unique")
e.tags("transparent overwrite_floor_cell no_exits")
e.map("1")
end
}}
################################################################################
# Dummy vaults, used to weight the number of uniques per branch.
################################################################################
NAME: uniq_dummy
DEPTH: 1-50, !Lair, !Slime
WEIGHT: 20 (D:1-8), 50
TAGS: place_unique dummy
MAP
.
ENDMAP
NAME: uniq_dummy_lair
DEPTH: Lair
WEIGHT: 80
TAGS: place_unique dummy
MAP
.
ENDMAP
NAME: uniq_dummy_slime
DEPTH: Slime
WEIGHT: 200
TAGS: place_unique dummy
MAP
.
ENDMAP
################################################################################
# Uniques which can appear in the Dungeon (D):
################################################################################
NAME: uniq_azrael
DEPTH: D:12-, Orc:$, Elf, !Elf:$, Snake, !Snake:$, Spider, !Spider:$
: place_unique(_G, "Azrael band")
NAME: uniq_blork_the_orc
DEPTH: D:4-6
: place_unique(_G, "Blork the orc")
# Crazy Yuif's hut is bottom of this file.
NAME: uniq_duvessa
DEPTH: D:4-7
: place_unique(_G, "Duvessa band")
NAME: uniq_edmund
DEPTH: D:4-6
: place_unique(_G, "Edmund")
NAME: uniq_erica
DEPTH: D:8-11, Orc:1, Lair:1-2
: place_unique(_G, "Erica")
NAME: uniq_erolcha
DEPTH: D:9-13, Orc
: place_unique(_G, "Erolcha")
NAME: uniq_eustachio
DEPTH: D:4-6
: place_unique(_G, "Eustachio")
NAME: uniq_frances
DEPTH: D:12-14, Elf:1, Swamp:1-2, Snake:1-2, Shoals:1-2, Spider:1-2
: place_unique(_G, "Frances")
NAME: uniq_fannar
DEPTH: D:10-12, Orc:1, Lair:1-3
: place_unique(_G, "Fannar")
NAME: uniq_gastronok
DEPTH: D:8-12, Orc:1, Lair:1-3
WEIGHT: 5, 15(Lair)
: place_unique(_G, "Gastronok")
NAME: uniq_grum
DEPTH: D:8-11, Lair:1
: place_unique(_G, "Grum band")
NAME: uniq_grinder
DEPTH: D:3-6
: place_unique(_G, "Grinder")
NAME: uniq_harold
DEPTH: D:10-12, Orc, !Orc:$, Lair:1-4
: place_unique(_G, "Harold")
NAME: uniq_ijyb
DEPTH: D:3-5
: place_unique(_G, "Ijyb")
NAME: uniq_jessica
DEPTH: D:2-3
: place_unique(_G, "Jessica")
NAME: uniq_joseph
DEPTH: D:7-10, Lair:1
: place_unique(_G, "Joseph")
NAME: uniq_josephine
DEPTH: D:10-, Orc, Lair:4-, Swamp:1, Shoals:1, Snake:1, Spider:1
: place_unique(_G, "Josephine band")
NAME: uniq_kirke
DEPTH: D:12-, Lair:4-, Elf:1, Swamp, Snake, Shoals, Spider
: place_unique(_G, "Kirke band")
NAME: uniq_louise
DEPTH: D:14-, Elf, Swamp, Snake, Shoals, Spider
: place_unique(_G, "Louise")
NAME: uniq_maurice
DEPTH: D:8-13, Orc
: place_unique(_G, "Maurice")
NAME: uniq_menkaure
DEPTH: D:4-7
: place_unique(_G, "Menkaure")
NAME: uniq_natasha
DEPTH: D:2-4
: place_unique(_G, "Natasha")
NAME: uniq_nergalle
DEPTH: D:10-12, Orc, !Orc:$, Lair:1-4
: place_unique(_G, "Nergalle")
NAME: uniq_nessos
DEPTH: D:12-, Orc:$, Lair:4-
: place_unique(_G, "Nessos")
NAME: uniq_pikel
DEPTH: D:4-9
: place_unique(_G, "Pikel band")
NAME: uniq_prince_ribbit1
DEPTH: D:5-9
WEIGHT: 7
TAGS: uniq_ribbit
: place_unique(_G, "Prince Ribbit")
NAME: uniq_prince_ribbit2
DEPTH: Lair:1-3
WEIGHT: 3
TAGS: uniq_ribbit
: place_unique(_G, "Prince Ribbit band")
NAME: uniq_psyche
DEPTH: D:8-12
: place_unique(_G, "Psyche")
NAME: uniq_purgy
DEPTH: D:3-4
WEIGHT: 1
: place_unique(_G, "Purgy")
NAME: uniq_robin
DEPTH: D:2-4
: place_unique(_G, "Robin band")
NAME: uniq_roxanne
DEPTH: D:14-, Elf, Swamp, Snake, Shoals, Spider
TAGS: place_unique transparent
MONS: Roxanne
MAP
...
.1.
...
ENDMAP
NAME: uniq_rupert
DEPTH: D:12-, Lair:3-, Orc:$, Snake:1, Spider:1
: place_unique(_G, "Rupert")
NAME: uniq_sigmund
DEPTH: D:2-6
: place_unique(_G, "Sigmund")
NAME: uniq_snorg
DEPTH: D:10-14, Lair:3-, Orc
: place_unique(_G, "Snorg")
NAME: uniq_sonja
DEPTH: D:10-, Orc:$, Lair:1-4
: place_unique(_G, "Sonja")
NAME: uniq_terence
DEPTH: D:2-3
: place_unique(_G, "Terence")
NAME: uniq_urug
DEPTH: D:10-, Orc, !Orc:$, Lair:2-5
: place_unique(_G, "Urug")
NAME: uniq_agnes
DEPTH: D:14-, Elf, !Elf:$, Snake, Spider
: place_unique(_G, "Agnes")
################################################################################
# Uniques which can appear in the Depths:
################################################################################
NAME: uniq_aizul
DEPTH: Depths:1-3, Elf, Swamp, Snake, Shoals, Spider, Vaults:1-4, Crypt:1
WEIGHT: 50(Snake), 10
: place_unique(_G, "Aizul")
NAME: uniq_asterion
DEPTH: Depths:1-3, Elf, Snake, Spider, Vaults:1-3
: place_unique(_G, "Asterion")
NAME: uniq_bai_suzhen
DEPTH: Depths:1-3, Elf:$, Swamp:3-, Snake:3-, Shoals:3-, Spider:3-, Vaults:2-, Crypt
: place_unique(_G, "Bai Suzhen")
# Do *not* change the name of this vault (uniq_boris) without changing the
# relevant section in monstuff.cc:monster_die. If you wish to alter Boris'
# weights by using multiple uniq_boris TAG'd maps, ensure that you add the
# relevant line to remove the tag in monstuff.cc:monster_die.
NAME: uniq_boris
DEPTH: Depths:3-, Vaults:2-, Crypt, Tomb
: place_unique(_G, "Boris")
NAME: uniq_enchantress
DEPTH: Depths
MONS: the Enchantress band
: place_unique(_G, "the Enchantress band")
NAME: uniq_frederick
DEPTH: Depths:3-, Vaults:2-, Crypt, Tomb
: place_unique(_G, "Frederick")
NAME: uniq_jorgrun
DEPTH: Depths, Elf:2-, Swamp:2-, Snake:2-, Shoals:2-, Spider:2-, Vaults, Crypt, Tomb
: place_unique(_G, "Jorgrun")
NAME: uniq_jory
DEPTH: Depths:3-, Vaults:2-, Crypt, Tomb
: place_unique(_G, "Jory")
NAME: uniq_margery
DEPTH: Depths:3-, Vaults:2-, Crypt
: place_unique(_G, "Margery band")
NAME: uniq_mara
DEPTH: Depths:1-4, Elf:$, Swamp:3-, Snake:3-, Shoals:3-, Spider:3-, Vaults:2-, Crypt, Tomb
: place_unique(_G, "Mara")
NAME: uniq_mennas
DEPTH: Depths:3-, Vaults:2-, Crypt, Tomb
: place_unique(_G, "Mennas")
NAME: uniq_mennas_pan
DEPTH: Pan
CHANCE: 5%
TAGS: transparent extra allow_dup luniq_mennas
veto {{
return you.uniques("Mennas")
}}
MONS: generate_awake Mennas
MAP
1
ENDMAP
NAME: uniq_nikola
DEPTH: Depths:1-3, Elf, Swamp, Snake, Shoals, Spider, Vaults:1-3
: place_unique(_G, "Nikola")
NAME: uniq_saint_roka
DEPTH: Orc:$, Depths, Elf:2-, Snake:2-, Vaults, Crypt
: place_unique(_G, "Saint Roka band")
NAME: uniq_sojobo
DEPTH: Depths, Vaults:2-, Crypt, Tomb
: place_unique(_G, "Sojobo band")
NAME: uniq_xtahua
DEPTH: Depths:3-, Vaults:2-, Crypt
: place_unique(_G, "Xtahua")
################################################################################
# Uniques which appear in neither the Dungeon nor the Depths:
################################################################################
NAME: uniq_donald
DEPTH: Swamp, Snake, Shoals, Spider, Slime, Vaults:1-4, Crypt:1-2, Elf, Orc:$
: place_unique(_G, "Donald")
NAME: uniq_vashnia
DEPTH: Snake:2-
WEIGHT: 50
: place_unique(_G, "Vashnia band")
NAME: uniq_polyphemus
DEPTH: Shoals:2-
WEIGHT: 50
: place_unique(_G, "Polyphemus band")
NAME: uniq_ilsuiw
# Her placement on Shoals:$ is handled through the shoal_guardian tagged
# vaults.
DEPTH: Shoals:2-, !Shoals:$
WEIGHT: 50
: place_unique(_G, "Ilsuiw band")
NAME: uniq_arachne
DEPTH: Spider:2-
WEIGHT: 50
: place_unique(_G, "Arachne")
NAME: uniq_dissolution
DEPTH: Slime:2-
WEIGHT: 100
: place_unique(_G, "Dissolution")
NAME: uniq_khufu
DEPTH: Tomb, Crypt
: place_unique(_G, "Khufu band")
NAME: uniq_tiamat
DEPTH: Zot
: place_unique(_G, "Tiamat band")
NAME: uniq_cerebov
DEPTH: Pan
CHANCE: 25%
TAGS: transparent extra allow_dup luniq_cerebov
veto {{
if you.uniques("Cerebov") or not you.have_rune("fiery") then
return true
end
return false
}}
MONS: generate_awake Cerebov band
MAP
1
ENDMAP
NAME: uniq_gloorx_vloq
DEPTH: Pan
CHANCE: 25%
TAGS: transparent extra allow_dup luniq_gloorx_vloq
veto {{
if you.uniques("Gloorx Vloq") or not you.have_rune("dark") then
return true
end
return false
}}
MONS: generate_awake Gloorx Vloq band
MAP
1
ENDMAP
NAME: uniq_mnoleg
DEPTH: Pan
CHANCE: 25%
TAGS: transparent extra allow_dup luniq_mnoleg
veto {{
if you.uniques("Mnoleg") or not you.have_rune("glowing") then
return true
end
return false
}}
MONS: generate_awake Mnoleg band
MAP
1
ENDMAP
NAME: uniq_lom_lobon
DEPTH: Pan
CHANCE: 25%
TAGS: transparent extra allow_dup luniq_lom_lobon
veto {{
if you.uniques("Lom Lobon") or not you.have_rune("magical") then
return true
end
return false
}}
MONS: generate_awake Lom Lobon band
MAP
1
ENDMAP
NAME: uniq_ignacio
DEPTH: Pan
CHANCE: 25%
# TODO: use regular unique code instead?
TAGS: transparent extra allow_dup luniq_ignacio
veto {{
if you.uniques("Ignacio") then
return true -- don't spam the list of vaults
end
if not dgn.persist.ignacio_spawned then
local runes = count_pan_runes()
if crawl.x_chance_in_y(runes * runes, 100) then
dgn.persist.ignacio_spawned = true
dgn.persist.ignacio_forbid = crawl.coinflip()
else
return true
end
end
if dgn.persist.ignacio_forbid then
return true
end
return false
}}
MONS: Ignacio
MAP
1
ENDMAP
###############################################################################
# Crazy Yiuf! Only in his cottage.
NAME: uniq_crazy_yiuf_cottage
DEPTH: D:2-7
TAGS: place_unique no_monster_gen no_item_gen
MONS: Crazy Yiuf
MONS: fungus / bush w:1
ITEM: mace
# Randomisation 1: Some chance for a gate.
SHUFFLE: Bb/Aa
SUBST: B=;, b=;
: if crawl.one_chance_in(3) then
SUBST: A:AAA+, A=x
: else
SUBST: A:;;;x, a=;
: end
# Randomisation 2: Plants might be in the way -- Yiuf seems to be a bad
# gardener. Sometimes.
SUBST: P:PQQ;;;; , Q=2;
NSUBST: P=1:t / *:2;
# Randomisation 3: Maces. Maces. Maces.
SUBST: ; : .:100 ;:10 d:2
SUBST: ; = .:10 d:2
: if crawl.one_chance_in(300) then
SUBST: t="
: end
SUBST: ':.......' , "=' , ':d' , '=..d
# Randomisation 4: trees or rock
SUBST: t : ttx
MAP
xxxxxxxxxxxxxxxx
xxtttttttxxtttxx
xxtttttttttttttx
BAP't'tttccccctx
;baPP't''tc'''ctx
@baPPtttt'=''1ctx
;BAPttttttc''dctx
xxtttttttccccctx
xxtttttttttttttx
xxxxxttttttttxxx
xxxxxxxxxxxxxxxx
ENDMAP