################################################################################
# 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:1-27, !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-spll.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:1-27, !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.
#
# As a final caveat, you.branches[you.where_are_you].has_uniques is still
# checked before vaults are even considered; unique vaults with depths that
# could go in Lair should be specified !Lair, !Slime (unless you want them in
# lair).
#
# 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.
################################################################################

{{
function place_unique(e, monster)
   e.mons(monster)
   e.tags("place_unique")
   e.tags("transparent")
   e.map("1")
end
}}

################################################################################
# Dummy, these are used to weight uniques per branch.
################################################################################
NAME:   uniq_dummy
DEPTH:  1-50, !Lair, !Slime
WEIGHT: 20
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

################################################################################
# General dungeon uniques:
################################################################################

NAME:   uniq_agnes
DEPTH:  12-18, !Lair, !Slime
: place_unique(_G, "Agnes")

NAME:   uniq_aizul
DEPTH:  14-20, !Lair, !Slime
: place_unique(_G, "Aizul")

NAME:   uniq_azrael
DEPTH:  14-16, 17-19, !Lair, !Slime, !Swamp, !Shoals
: place_unique(_G, "Azrael band")

NAME:   uniq_blork_the_orc
DEPTH:  4-7, 8-9, !Lair, !Slime
: place_unique(_G, "Blork the orc")

###############################################################################
# Do *not* change the name of this vault without changing the relevant section
# in monstuff.cc:monster_die. If wishing to alter Boris's 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:  20-27, !Lair, !Slime
: place_unique(_G, "Boris")

NAME:   uniq_donald
# XXX: add Vaults:1-4 when finished re-do of vaults.
DEPTH:  Swamp, Snake, Shoals, Slime, Crypt:1-4, Blade, Elf:2-6, Orc:3-4
: place_unique(_G, "Donald")

NAME:   uniq_duane
DEPTH:  17-19, 20-27, !Lair, !Slime
: place_unique(_G, "Duane")

NAME:   uniq_duvessa
DEPTH:  4-7, 8-9, !Lair, !Slime
: place_unique(_G, "Duvessa band")

NAME:   uniq_edmund
DEPTH:  4-7, 8-9, !Lair, !Slime
: place_unique(_G, "Edmund")

NAME:   uniq_erica
DEPTH:  10-13, 14-16
: place_unique(_G, "Erica")

NAME:   uniq_erolcha
DEPTH:  8-9, 10-13, !Lair, !Slime
: place_unique(_G, "Erolcha")

NAME:   uniq_eustachio
DEPTH:  10-13, 14-16, !Lair, !Slime
: place_unique(_G, "Eustachio")

NAME:   uniq_frances
DEPTH:  17-19, 20-27, !Lair, !Slime
: place_unique(_G, "Frances")

NAME:   uniq_francis
DEPTH:  17-19, 20-27, !Lair, !Slime
: place_unique(_G, "Francis")

NAME:   uniq_frederick
DEPTH:  20-27, !Lair, !Slime
: place_unique(_G, "Frederick")

NAME:   uniq_gastronok_1
DEPTH:  8-9, 10-13, !Lair, !Slime
TAGS:   uniq_gastronok
WEIGHT: 5
: place_unique(_G, "Gastronok")

NAME:   uniq_gastronok_2
DEPTH:  Lair:4-8
TAGS:   uniq_gastronok
WEIGHT: 15
: place_unique(_G, "Gastronok")

NAME:   uniq_grum
DEPTH:  8-9, 10-13, !Lair, !Slime
: place_unique(_G, "Grum band")

NAME:   uniq_grinder
DEPTH:  6-10, !Lair, !Slime
: place_unique(_G, "Grinder")

NAME:   uniq_harold
DEPTH:  10-13, 14-16, !Slime
: place_unique(_G, "Harold")

NAME:   uniq_iyjb
DEPTH:  1-3, 4-7
: place_unique(_G, "Ijyb")

NAME:   uniq_jessica
DEPTH:  1-3
: place_unique(_G, "Jessica")

NAME:   uniq_joseph
DEPTH:  7-12, !Slime
: place_unique(_G, "Joseph")

NAME:   uniq_josephine
DEPTH:  10-13, 14-16, !Lair, !Slime
: place_unique(_G, "Josephine band")

NAME:   uniq_jozef
DEPTH:  10-13, 14-16, !Slime
: place_unique(_G, "Jozef")

NAME:   uniq_kirke
DEPTH:  14-16, 17-19, !Lair, !Slime
: place_unique(_G, "Kirke band")

NAME:   uniq_louise
DEPTH:  14-16, 17-19, !Lair, !Slime
: place_unique(_G, "Louise")

NAME:   uniq_margery
DEPTH:  20-27, !Lair, !Slime
: place_unique(_G, "Margery band")

NAME:   uniq_maud
DEPTH:  14-16
: place_unique(_G, "Maud")

NAME:   uniq_mara
DEPTH:  18-25, !Lair, !Slime
: place_unique(_G, "Mara")

NAME:   uniq_maurice
DEPTH:  8-9, 10-13, !Lair, !Slime
: place_unique(_G, "Maurice")

NAME:   uniq_menkaure
DEPTH:  4-7
: place_unique(_G, "Menkaure")

NAME:   uniq_nergalle
DEPTH:  14-16, 17-19, Orc:3-4, !Lair, !Slime
: place_unique(_G, "Nergalle")

NAME:   uniq_nessos
DEPTH:  11-17, !Lair, !Slime
: place_unique(_G, "Nessos")

NAME:   uniq_nikola
DEPTH:  14-16, 17-19, !Lair, !Slime
: place_unique(_G, "Nikola")

NAME:   uniq_norbert
DEPTH:  10-13, 14-16, !Lair, !Slime
: place_unique(_G, "Norbert")

NAME:   uniq_norris
DEPTH:  17-19, !Lair, !Slime
: place_unique(_G, "Norris")

NAME:   uniq_pikel
DEPTH:  4-7, 8-9, !Lair, !Slime, !Orc
: place_unique(_G, "Pikel band")

NAME:   uniq_prince_ribbit1
DEPTH:  4-7, 8-9, !Lair
WEIGHT: 7
TAGS:   uniq_ribbit
: place_unique(_G, "Prince Ribbit")

NAME:   uniq_prince_ribbit2
DEPTH:  Lair:1-3
WEIGHT: 3
TAGS:   place_unique uniq_ribbit
MONS:   Prince Ribbit, blink frog band
MAP
12
ENDMAP

NAME:   uniq_psyche
DEPTH:  8-9, 10-13, !Lair, !Slime
: place_unique(_G, "Psyche")

NAME:   uniq_purgy
DEPTH:  3-4
WEIGHT: 1
: place_unique(_G, "Purgy")

NAME:   uniq_roxanne
DEPTH:  14-16, 17-19, !Lair, !Slime
TAGS:   place_unique
MONS:   Roxanne
MAP
...
.1.
...
ENDMAP

NAME:   uniq_rupert
DEPTH:  14-16, 17-19
: place_unique(_G, "Rupert")

NAME:   uniq_saint_roka
DEPTH:  17-19, 20-27, Orc:4, !Lair, !Slime
: place_unique(_G, "Saint Roka band")

NAME:   uniq_sigmund
DEPTH:  1-3, 4-7
: place_unique(_G, "Sigmund")

NAME:   uniq_snorg
DEPTH:  14-16, 17-19, !Lair, !Slime
: place_unique(_G, "Snorg")

NAME:   uniq_sonja
DEPTH:  10-13, 14-16, !Lair, !Slime
: place_unique(_G, "Sonja")

NAME:   uniq_terence
DEPTH:  1-3
: place_unique(_G, "Terence")

NAME:   uniq_urug
DEPTH:  10-13, 14-16, !Lair, !Slime
: place_unique(_G, "Urug")

NAME:   uniq_wayne
DEPTH:  17-19, 20-27, !Lair, !Slime
: place_unique(_G, "Wayne")

NAME:   uniq_xtahua
DEPTH:  20-27, !Lair, !Slime
: place_unique(_G, "Xtahua")


################################################################################
# Non-dungeon Uniques
################################################################################

NAME:   uniq_dissolution
DEPTH:  Slime:2-6
WEIGHT: 100
: place_unique(_G, "Dissolution")

NAME:   uniq_polyphemus
DEPTH:  Shoals
WEIGHT: 50
: place_unique(_G, "Polyphemus band")

NAME:   uniq_ilsuiw
DEPTH:  Shoals:3-
: place_unique(_G, "Ilsuiw band")

NAME:   uniq_khufu
DEPTH:  Tomb, Crypt
: place_unique(_G, "Khufu band")

NAME:   uniq_tiamat
DEPTH:  Zot
: place_unique(_G, "Tiamat band")


###############################################################################
# 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:    hammer
# Randomisation 1: Some chance for a gate. Very rarely secret doors.
SHUFFLE: Bb/Aa
SUBST:   B=;, b=;
: if crawl.one_chance_in(3) then
SUBST:   A:AAAa, a:+++=, A=x
: else
SUBST:   A:;;;x, a=;
: end
# Randomisation 2: Rarely, the cottage will have a door.
SUBST:   C = +''''
# Randomisation 3: Plants might be in the way -- Yiuf seems to be a bad
#                  gardener. Sometimes.
SUBST:   P:PQ;; , Q=2;
NSUBST:  P=1:t / *:2;
# Randomisation 4: Hammers. Hammers. Hammers.
SUBST:   ; : .:100 ;:10 2:d
SUBST:   ; = .:10 2:d
: if crawl.one_chance_in(300) then
SUBST:   t="
: end
SUBST:   ':.......' , "=' , ':d' , '=..d
# Randomisation 5: trees or rock
SUBST:   t : ttx
MAP
 xxxxxxxxxxxxxxxx
 xxtttttttxxtttxx
 xxtttttttttttttx
 BAP't'tttccccctx
;baPP't''tc'''ctx
@baPPtttt'C''1ctx
;BAPttttttc''dctx
 xxtttttttccccctx
 xxtttttttttttttx
 xxxxxttttttttxxx
 xxxxxxxxxxxxxxxx
ENDMAP
