###############################################################################
# large_themed.des: Large regular vaults go here (these are defined by having an
#                   ORIENT line with argument, north, northwest etc. This file
#                   is for vaults which have some kind of theme, and tend to
#                   define a set of monsters. Use large_abstract.des for vaults
#                   which don't have a special theme.
#
# Note that all maps for the Vaults branch system (including Vaults:$) reside in
# vaults.des.
###############################################################################

{{
function grandhive_vaults(e, hivewallglyph)
    e.tags('uniq_greathive no_monster_gen no_item_gen')
    e.kmons('P = plant')
    e.item('potion of ambrosia / nothing')
    e.kitem('% = % no_pickup')
    e.kitem('* = * no_pickup')
    e.kfeat(hivewallglyph .. ' = x')
    e.tile(hivewallglyph .. ' = wall_wax')
    e.colour(hivewallglyph .. ' = yellow')
    -- Lair has lots of randomization and thin scaling in its
    -- monster set, so specify some monsters for Lair. Also,
    -- avoid hornets and bears, because nature or whatever.
    if you.in_branch("Lair") then
        e.kmons('0 = yak / wolf w:8 / water moccasin w:8 / wyvern w:8 / \
                     basilisk w:8 / river rat w:2 / \
                     steam dragon w:2')
        e.kmons('9 = elephant / cane toad / rime drake / \
                     blink frog w:8 / manticore w:4 / hell rat w:4')
        e.kmons('8 = death yak w:14 / hydra / komodo dragon / \
                     black mamba / lindwurm w:8 / torpor snail w:4 / \
                     boulder beetle w:2 / catoblepas w:2')
    end
end

function callback.wizard_prison_walls()
  local wall_pos = dgn.find_marker_positions_by_prop("prison", "wall")
  if wall_pos == nil then
    return
  end

  for i, pos in ipairs(wall_pos) do
    dgn.terrain_changed(pos.x, pos.y, "floor", false)
  end
  crawl.mpr("You hear a hidden mechanism click...the prison walls lower!")
end

}}

default-depth: D:12-, !D:$, Depths, !Depths:$
# be careful to adapt these numbers for new vaults (using DEPTH)

###############################################################################
# Castle of kobolds and goblins
NAME:    minmay_goblin_kobold_castle
TAGS:    no_rotate
ORIENT:  north
DEPTH:   D:3-6
MONS:    goblin; sling / hobgoblin w:2; sling / nothing
MONS:    goblin; club / hobgoblin; club / gnoll w:3; club | spear / nothing
MONS:    kobold; stone / nothing
MONS:    kobold; club w:18 / kobold brigand w:1 / gnoll w:3; club | spear / nothing
SUBST:   y : y:48 w:1 W:1, Y : Y:48 W:1 .:1, y = wWW, Y = WW.
SUBST:   5 = 2 1:2 .:24
SHUFFLE: ABCD
KITEM:   D = gold
KMONS:   D = hobgoblin / kobold / gnoll
SUBST:   ABC = 2
SHUFFLE: 12 / 34
MAP
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwxxxxxxxxxxxxxxxx
xxxxxxxwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwxxxxxxxxx
xxxxwwwwcccccwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwcccccwwwwxxxxxx
xxxwwwwwcAAAccccccccccccccccccccccccccccccccccccccccccccccccccccccDDDcwwwwwxxxxx
xxxwwwwwcAAAc1.....ccccc.....c5555555c1..1c5555555c.............1cDDDcwwwwwwxxxx
xxxwwwwwcAAAc.......ccc.2....+5555555c....c5555555+...........2..cDDDcwwwwwwxxxx
xxwwwwwwcc+cc........c1...2..ccccccccc....ccccccccc..............cc+ccwwwwwwwxxx
xxwwwwwwwc1..........c..2...........c.2..2.c..........cccccccc.....1cwwwwwwwwxxx
xxwwwwwwwc...........+..............+......+..........cccccccc.2....cwwwwwwwwwxx
xxwwwwwwwc1..........c..2...........c.2..2.c..........cccccccc.....1cwwwwwwwwwxx
xwwwwwwwcc+cc........c1...2..ccccccccc....ccccccccc..............cc+ccwwwwwwwwxx
xwwwwwwwcBBBc.......ccc.2....+5555555c....c5555555+...........2..cCCCcwwwwwwwwwx
xwwwwwwwcBBBc1.....ccccc.....c5555555c....c5555555c.............1cCCCcwwwwwwwwwx
xwwwwwwwcBBBccccccccccccccccccccccccccc++cccccccccccccccccccccccccCCCcwwwwwwwwwx
xwwwwwwwcccccwwwwwwwwwwwwwwwwwwwwwwwyY1..1Yywwwwwwwwwwwwwwwwwwwwwcccccwwwwwwwwwx
xwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwyY....Yywwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwx
xyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyY.11.Yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyx
xYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY1..1YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYx
x..............................................................................x
x..............................................................................x
ENDMAP

###############################################################################
#hidden cave vault, possibly with statue
#
NAME:    statuecave_lemuel
ORIENT:  northeast
TAGS:    no_descent
DEPTH:   D:7-, Lair, Crypt:1-4
: if you.in_branch("Crypt") then
MONS:    orange crystal statue
: else
MONS:    ice statue / obsidian statue / orange crystal statue
: end
SHUFFLE: 1|/!*
SUBST:   *:*$, ?:x., !:., '=w.
ITEM:    ring of flight ident:type
MAP
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxwwwxxxxxxxxxxx
xxxxxxxxxxxxxxxxxwwwwwwwxxxxxxxxx
xxxxxxxxxxxxxxxwwwwwwwwwwwxxxxxxx
xxxxxxxxxxxxxwwwwwwxxxwwwwwxxxxxx
xxxxxxxxxxxxwwwwwwxxxxxxwww.1xxxx
xxxxxxxxxxxwwwwxxxxxxxxxxwwW??xxx
xxxxxxxxxwwwwwxxxxxxxxxxxwwwW??xx
xxxxxxxxwwwwxxxxxxxxxxxxxxww|||xx
xxxxxxxxwwwxxxxxxxxxxxxxxxxw||dxx
xxxxxxxwwwxxxxxxxxxxxxxxxxxxxxxxx
xxxxxwwwwwxxxxxxxxxxxxxxxxxxxxxxx
xxxwwwwwwwwwxxxxxxxxxxxxxxxxxxxxx
wwwwwwwwwww''..................xx
.'wwwwwww''....................xx
..''wwww'......................xx
.....'w........................xx
ENDMAP


###############################################################################
# Black bear nests (Eino)
# Bears are wimpy when you meet them, so here's an early challenge.
#
NAME:   black_bear_nest_1
ORIENT: northwest
WEIGHT: 5
TAGS:   uniq_black_bear_nest
DEPTH:  D:4-8
NSUBST: ' = 1:1 / *:.
MONS:   patrolling black bear
MAP
xxxxxxxxxxxxxxx
xx''.xxxxxxxxxx
x''.......xxxxx
x''...xx....xxx
xx''xxxxxxx..xx
xxxxxxxxxxxxx.x
xxxxxxxxxxxxxx@
ENDMAP

NAME:   black_bear_nest_2
ORIENT: southeast
WEIGHT: 5
TAGS:   uniq_black_bear_nest
DEPTH:  D:4-8
NSUBST: ' = 1:1 / *:.
MONS:   patrolling black bear
MAP
xxxxxxxx@xx
xxxxxxxx.xx
xxxxxxxx.xx
xxxxxxx..xx
xxxxxx...xx
xxxxx...xxx
xxxx...xxxx
xxx...xx'xx
xxx..xx'.xx
xxx..x''.xx
@....xx'.xx
xxx...xx.xx
xxxx.....xx
xxxxx....xx
xxxxxxxxxxx
xxxxxxxxxxx
ENDMAP

###############################################################################
# Dragon's cave
#
NAME:    dragon1_lemuel
ORIENT:  northeast
DEPTH:   D:9-, Lair
MONS:    patrolling fire dragon, patrolling ice dragon
ITEM:    potion of enlightenment ident:type / scroll of teleportation ident:type
SUBST:   ! : ?x
SHUFFLE: 1?/2W
SUBST:   2=2:20 1
SUBST:   ? : wl
SUBST:   * : $*|
MAP
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxx!!!xxxxxxxxx
xxxxxxxxxxxxxxxxx..????....dxxxx
xxxxxxxxxxxxxxx....???...1d**xxx
xxxxxxxxxxxxxx......???..$$**xxx
xxxxxxxxxxxx.........????$$!!xxx
xxxxxxxx.............??????!!!xx
xxx......xxxxx........????!!!!xx
xxx.xxxxxxxxxxx.......???!!!!!!x
xx..xxxxxxxxxxxxxx...????!!!!!!x
xx.xxxxxxxxxxxxxxxxxxxx!!!!!!!!x
xx.xxxxxxxxxxxxxxxxxxx!!!!!!!xxx
xx....xxxxxxxxxxxxxxxxxxx!!!xxxx
xxxxx.xxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxx@xxxxxxxxxxxxxxxxxxxxxxxxxx
ENDMAP

################################################################################
# Steading of the Giant Chief
#
NAME:    giant_chief_lemuel
DEPTH:   D:11-, Orc, Depths:2-, !Depths:$
ORIENT:  north
SUBST:   ; = .'
: if you.in_branch("Depths") then
MONS:    patrolling juggernaut, nothing, nothing
MONS:    ettin, stone giant w:40 / fire giant / frost giant
MONS:    ogre mage band / deep troll shaman band w:5 / \
         deep troll earth mage band w:5
MONS:    death yak / catoblepas w:2
NSUBST:  6 = 2:6 / *:.
SUBST:   c = v
: else
MONS:    patrolling stone giant, patrolling frost giant, patrolling fire giant
MONS:    cyclops, ettin
MONS:    ogre w:50 / ogre mage w:5 / two-headed ogre
MONS:    wolf w:15 / warg
SUBST:   G = '
# Nothing / water moat / lava moat for stone / frost / fire giant chiefs.
SHUFFLE: '1 / '1 / w2 / l3
: end
KMONS:   Z = cyclops zombie / stone giant zombie / titan zombie
KMONS:   P = plant
KITEM:   ( = any weapon good_item
KITEM:   Z = large rock
SHUFFLE: aA / bB / dD / eE
SUBST:   aA = ., b : x., B : x., d : x., D : x., e : x., E : x.
SUBST:   0 = 4 7 9:2 P:18 ., 5 = 5:20 x`
SUBST:   | : |||Z
SUBST:   X = x., - = +x, ' = .
KPROP:   5` = no_tele_into
MAP
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxccccccccccxxccccccccccccx
xxxxXXXxxxxxxX***XXxxxxxxxxxxxxx.........7...c...444..cccc.........<cx
xx$$$$$$XxxxxX.6..XxxxxxxxxxAAAA..7..........+........+..+.........5cx
xX$$$$$$.XxxX.666.xxxxxxAAAAAxxx7....7.......c........cccc.........1cx
x.$$$$$$..Xx...6..AAAAAAAxxxxxxx............7ccccc+ccccccc.........5cx
x....<.....+X....xxxxxxxxx$$$..cccc+cccccccccccccc.c(((((+..........cx
xX........Xxxxx.xxxxxxxx<+$$$..+.......+...........c(((((c.......***cx
xx........Xxx...xxxxxxxxxxx-xxxc..4.4..ccccccccccccccccccc444....***cx
xxxxX...Xxxxx.xxxxxxxxxxxxx5xxxc...4...cxxx5xxxxxxxxxxxxxxxxxxxxx+xxxx
xxxxxx-xxxxxx.xxxxxxxbbb;''''''c..4.4..c'''''';ddddddddddxxxxxxxx||xxx
xxx....xxxxx..xaaaaabbb0;''''''c.......c'''''';0eeeeddddddXXXXxxx||xxx
x...xxxxxXXX0Xaaaaabbbb..;'''''ccc+++ccc''''';...eeeeeeddddddXXXxxxxxx
xx.xxxXXX......aaaabbbbb...;''G,''''''',G'';........eeeeeedddd.XXXxxxx
xX-XX.....0...aaaa..bbb........;''''''';.........eeeeeee.ddd..0...Xxxx
xx..........aaaaa....bbbbb.........4...eeeeeeeeeeeeeee...dddd......XXx
xxX...aaaaaaaaaa.......bbbbbbbbb..0..eeeeeeeeeeeeeee...0....dd......Xx
xxaaaaaaaaaaaa.....0.....bbbbbbbbbeeeeeeeeeeeeeee...........dd......Xx
xxaaaaaaaa[....@..........bbbbb..@..eeeeeeee........@.......d.....@..x
ENDMAP

NAME:   minmay_smoke_and_mirrors
ORIENT: northwest
DEPTH:  D:10-
MONS:   arcanist, occultist
ITEM:   warlock's_mirror no_pickup
MARKER: F = lua:fog_machine { cloud_type="purple smoke", \
            pow_min = 5, pow_max = 15, delay_min = 10,   \
            delay_max = 50, size_min = 1, size_max = 5,  \
            walk_dist = 0, spread_rate= 100 }
SUBST:  F = .
: if you.depth() < 11 then
NSUBST: 1 = 1:1 / 1:. / * = 1.
: else
NSUBST: 1 = 1:1 / 1:2 / 1:. / * = 12..
: end
NSUBST: * = 1:d / *:*
MAP
xxxxxxxxxxxxxxxxxxxxxxxxxx
xbbbbbbbbbbbbbbbbbbbbbbbbb
xb1...................Fbb.
xb...bbbbb..1......1..bb..
xb..bb***bb..........bb...
xb.bb.....bb..1..1..bb....
xb......1..bb......bb..1..
xb..........bb****bb......
xb.1...bb...FbbbbbbF.....
xb....bb....bb....bb.....
xb...bb.1..bb......bb....
xb..bb....bb........bb...
xbbbb....bb....bb.1.Fbb..
xb*.bb........bb....bb..
xb...bb...1..bb....bb...
xb....bb....bb....bb....
xb1....bbbbbb....bb.....
xbbb........bb.........
xb*bb....1...bb.....1..
xb.1bb........bb.......
xb...bb........bb.....
xb...Fbb.............
xb...bb.............
xb..bb....1......
xb1bb........
xb......
ENDMAP

NAME:   minmay_elf_outpost
TAGS:   no_rotate
ORIENT: northwest
DEPTH:  D:12-
MONS:   deep elf pyromancer / deep elf zephyrmancer / nothing w:20
MONS:   deep elf knight / deep elf archer
MONS:   deep elf pyromancer w:15 / deep elf zephyrmancer w:15 / nothing
MAP
xxxxxxxxxxxxxxxxxxxxxxxx
x..3..............|x1...
x.b..b..b..b3.b...|x....
x.....3.........3.|x..x.
x+xxxxxxx+xxxxxxxxxx....
x..................x....
x......1...........x..x.
x..xxxx....xxxxxx1.x1...
x.1x*.....1..2.*x..x....
x..x*.2.1......*x..x..x.
x..xxxxxx...1xxxx..x....
x..................x....
x1................1x..x.
xxxxxxx..xxxxxx..xxx....
x1................1x1...
x.......1....11....x..x.
x..xxxxxx....xxxx..x....
x..1.2.*x....x*....x....
x.1....*x....x*.2..x..x.
xxxxxxxxxx++xxxxxxxx....
x1......11..11.....1....
x.......................
x..x..x..x..x..x..x.....
x.......................
ENDMAP

NAME:   minmay_ice_pillars
TAGS:   no_rotate no_pool_fixup no_monster_gen no_tele_into no_descent
ORIENT: north
DEPTH:  D:11-, !D:$
WEIGHT: 5
MONS:   ice beast / nothing w:3, ice statue, ice dragon / nothing
SUBST:  y : y:48 w:1 W:1, Y : Y:48 W:1 .:1, y = wwW, Y = WW.
MAP
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwxxxxx
xxxwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwWWWWWWWWWWWWWWwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwxxx
xxwwWWWWWWWwwwwwwwwwwwwwwwwwWWWWWW............WWWWWWwwwwwwwwwwwwwwwwwWWWWWWWwwxx
xxwWW.....WWwwwwWWWWWwwwwwWWW.....1ccc++++ccc1.....WWWwwwwwWWWWWwwwwWW.....WWwxx
xwwW.1c.c1.WwwwWW...WWwwwWW..1cccccc........cccccc1..WWwwwWW...WWwwwW.1c.c1.Wwwx
xwwW.cc.cc.WwwwW.ccc.WwwwW..ccc..................ccc..WwwwW.ccc.WwwwW.cc.cc.Wwwx
xwwW.c*2*c.WWWWW.ccc.WWWWW..c>3.2..............2.3<c..WWWWW.ccc.WWWWW.c*2*c.Wwwx
xwwW.cc*cc.WwwwW.ccc.WwwwW..ccc..................ccc..WwwwW.ccc.WwwwW.cc*cc.Wwwx
xwwW.1ccc1.WwwwWW...WWwwwWW..1cccccc********cccccc1..WWwwwWW...WWwwwW.1ccc1.Wwwx
xwwWW.....WWwwwwWWWWWwwwwwWWW.....1cccccccccc1.....WWWwwwwwWWWWWwwwwWW.....WWwwx
xwwwWWWWWWWwwwwwwwwwwwwwwwwwWWWWWW............WWWWWWwwwwwwwwwwwwwwwwwWWWWWWWwwwx
xwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwWWWWWWWWWWWWWWwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwx
xwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwx
xyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyx
xYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYx
ENDMAP

NAME:   minmay_skeleton_keep
TAGS:   no_monster_gen
ORIENT: northwest
DEPTH:  Depths, Crypt
MONS:   laughing skull / nothing w:50, skeleton w:20 / nothing
MONS:   skeletal warrior band / bone dragon w:1 / lich w:1 / curse skull w:1
SUBST:  G : GGccV.
MAP
cccccccccccccccccccccccccccccccc
c....2.....||c...+....111c|....c
c+c.2.3...cccc...c......1cc..3.c
c.cc...2.2.ccc...c......1ccc...c
c..cc...2...cc...c...G...+2cc..c
c...cc.2...2.c...c......cc2ccc.c
c....cc...2..c...c1....cc2...+.c
c..3..cc.2...+...c1...cc2.2.2c.c
c1.....cc....c...c111cc2.2.22c|c
c11.....cccccc.3.ccccccccccc+ccc
c1111....c...........c22.+.111.c
cc+cc1.3.c.G2G2G2G2G.c2..cc.111c
c***c1...+...........+.2.2cc.11c
c***c11..c.G2G2G2G2G.c2...2cc.1c
c***c111.c...........c..22.2cc+c
cccccccccccccccccccccccccccccc@
ENDMAP

NAME:   minmay_spriggan_fort
TAGS:   no_rotate
ORIENT: northwest
DEPTH:  Depths
MONS:   plant, bush
MONS:   spriggan w:70 / spriggan druid / spriggan berserker / spriggan rider
MONS:   spriggan defender
SUBST:  1 : 12t p:1, p = 12t, c : xc, 3 = 3, 4 = 444.
MAP
ccccccccccccccccccccccccccccxx
c11111111111111111111111111c1.
c1.........3.............31c13
c1........................1c1.
c1..111........3.....111..1c1.
c13.1c1..3...........1c1..1c1.
c1..111..........3...111..1c1.
c1...........3............1c1.
c1.........3...3..........1c1.
c1.......111....111.......1c1.
c1.......1ccc++ccc1.......1c1.
c1.......1c1....1c1..3....1c1.
c1.......1c1....1c1.......1c1.
c1....3..1c14..41c1.......1c13
c1.......1c1****1c1.......1c1.
c1.......1c1****1c1.......1c1.
c1.......1c111111c1....3..1c1.
c1..3....1cccccccc1.......1c1.
c1.......1111111111.......1c1.
c1........................1c1.
c1........................1c1.
c1..111........3.....111..1c1.
c1..1c1..3...........1c1..1c1.
c1..111..............111..1c1.
c1........................1c1.
c13......................31c1.
c11111111111....11111111111c1.
ccccccccccccc++ccccccccccccc1.
x11111111111....11111111111113
x.3........3.3..3.............
ENDMAP

NAME:   minmay_haunted_quarter
ORIENT: northwest
TAGS:   no_descent
DEPTH:  Depths, !Depths:$
KMONS:  w = shadow wraith / phantasmal warrior / \
            flayed ghost / nothing w:950
KFEAT:  w = w
MAP
xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xcccccccccccccccccxxxxxxxxxx
xc|||...wcxw..>..wxw..>..wx.
xc|>|c.wwcxww.x.wwxww.x.wwx.
xc|||cwwwcwwwxxwwwxwwwxwwwx.
xcccccwwwcwwwxwwwxxwwwxwwwx.
xccwwwwwwcwwwxwwwxwwwxxwwwx.
xcwwwwwwwcwwwxwwwxwwwxwwwxx.
xc.wwwwwccwwwxwwwxwwwxwwwx.
xc.ccccccwwwxxwwwxwwwxwwwx.
xc>cwwwwwwwwxwwwxxwwwxwwwx.
xc..wwwwwwwwxwwwxwwwxxwwwx.
xc.wwwwwwxxxxwwwxwwwxwwwxx.
xcwwxxxxxxwwwwwwxwwwxwwwx.
xxxxxwwwwwwwwwwxxwwwxwwwx.
xxwwwwwwwwwwwwxxwwwxxwwwx.
xx.wwwwwwwxxxxxwwwwxwwwxx.
xx..wxxxxxxwwwwwwwwxwwwx.
xx>xxxwwwwwwwwwwwwxxwwwx.
xx..wwwwwwwwwwwxxxxwwwxx.
xx.wwwwwwwwxxxxxwwwwwwx.
xxwwwwxxxxxxwwwwwwwwwxx.
xxxxxxxwwwwwwwwwwwwxxx.
xxwwwwwwwwwwwwwwxxxx..
xx.wwwwwwwwwxxxxx...
xx..wwwxxxxxx....
xx.xxxxx.....
x.......
ENDMAP

#########################################################################
# Orc temple
#
NAME:   orc_temple
ORIENT: southwest
TAGS:   no_rotate
DEPTH:  D:12-, !D:$, Orc
MONS:   orc warlord, patrolling orc priest, patrolling orc high priest
MONS:   orc warrior, orc wizard, orc knight, orc sorcerer
KFEAT:  C = altar_beogh
MAP
xxxxxxxxxxxxxxxx@xxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxx.xxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxx...xxxxxxxxxxxxxxx
xxxxxxxxxxxxxxx4.4xxxxxxxxxxxxxxx
xx**..........x414x..........**xx
xx**..........x4.4x..........**xx
xx............+...+....4.......xx
xx....4..4....x...x............xx
xx............x...x.......4....xx
xx............xx.xx............xx
xx...4......xxxx+xxxx......6...xx
xx........xxx.......xxx........xx
xxxx...xxxx..2.....2..xxxx...xxxx
xxxxx+xxxx.............xxxx+xxxxx
xxxx...xxx.............xxx...xxxx
xx......x...............x......xx
xx..4...x...2...C...2...x...5..xx
xx......x...............x......xx
xx...4..xx.............xx..5...xx
xx$......x....2...2....x......$xx
xx$6..5..xx.....3.....xx.5...7$xx
xx$$$.....xxx.......xxx.....$$$xx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
ENDMAP

#############################################################################
# Fort Yaktaur
#
NAME:   fort_yaktaur
TAGS:   no_pool_fixup no_descent
ORIENT: southeast
DEPTH:  D:11-, !D:$
MONS:   gnoll, yak, death yak, yaktaur, minotaur
MAP
.........@....wwwwwwwwwwwwwwwwwxxx
.ccccc.......ww....wwww....wwwwxxx
.c$c%c......ww.ccccccccc.......xxx
.c+c+c......ww.c.%$....ccccccccxxx
.c...+......ww.c*.542..c$$+|*|cxxx
.c4..c.....ww..c...22+ccc+cxx+cxxx
.ccccc.....ww..ccccccc....c|+*cxxx
............ww.......c2...cxx+cxxx
....1.ccccc.ww.w...3.+24..c|5.cxxx
....14+...c..wwww..34+24..c3.3cxxx
....1.ccccc..wwwwww..c2...cc+ccxxx
............wwwwwww..c........cxxx
............wwwwwww..ccccccccccxxx
...........ww4w..www...........xxx
.......211.www.....www.........xxx
.........4ww....ccccc..........xxx
.....211.w......+...c..........xxx
.........www....ccccc..........xxx
...........ww............wwwwwwxxx
.......4....wwwww......www.....xxx
......111.......ww...www.......xxx
.....cc+cc.......wwwww.........xxx
.....c...c.....................xxx
.....ccccc.....................xxx
...............................xxx
...............................xxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
ENDMAP

##############################################################################
# Rubicon
#
NAME:    erik_rubicon_a
DEPTH:   D:10-, !D:$
ORIENT:  south
TAGS:    no_pool_fixup no_rotate uniq_rubicon no_descent
WEIGHT:  6
ITEM:    ring of flight ident:type / potion of enlightenment ident:type / nothing
ITEM:    potion of enlightenment ident:type / nothing, nothing, nothing, nothing
SHUFFLE: {[(, )gh
SUBST:   ?:?.w, ?=w., w:lw, ':'.c, '=cx.
MAP
xxxxxxxxxcccccccc????w.@??ww.@www???w...@???wwww.@ww??@..?ccccxxxxxxxxxxx
xxxxxccccwwwwwwwww..wwwww.wwwwwwww.wwwwwww.wwwwwwwwwwww??wwwwcccccccxxxxx
xxxxxcwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwcxxxxx
xxxxxcwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwcxxxxx
xxxxxccwwwwwwwwwwwwwwwwwwwcccwwwwwwwwwcwwwwwwwwwwwwwwwwwwwwwwcccwcccxxxxx
xxxxxcwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwcxxxxx
xxxxxcwwwwwwwwwwwwwwwwwwwwwccwwwwwwwwwcwcwwwwwwwwwwwwwwwwwwwwwwcccccxxxxx
xxxxxcwwwwwwwwwwwwxwwwwwwwwwwwwwwwwwwwcwwwww.wwwwwwwwwwwwwwwwwwwwwwcxxxxx
xxxxxccwcwwwwwwwwwwwwwwwxwwwwww???wwwwwwwww???wwwwwwwww.wwwwwwwcccccxxxxx
xxxxxcccccc????w??.w????xw??w??...?wwww???w????w?w???w???w??cccccxxxxxxxx
xxxxxxxxxcxx...''....?..xx........??w??...c''....??.....???..cxccxxxxxxxx
xxxxxxxxxcx..(cc[.''..'xx...x.''.x..?xx.xcc..cxcx...xxx.'...chxxcxxxxxxxx
xxxxxxxxxcx..cc{c..xx.....xx...cc..xx....xcc....''xxx..x.xxc...cxxxxxxxxx
xxxxxxxxxccx....e.xx....x..x.....c....cx..x...x......c......cxcxxxxxxxxxx
xxxxxxxxxxcxexxx.x.x.xx.x.xx.xcc.xx.xccxx....xx.x.xxxccxx.xcccxxxxxxxxxxx
xxxxxxxxxxccx.gxxx..x..xdx..x.xxxx.x...xx.xx...xx.xxxx)..xxcxxxxxxxxxxxxx
xxxxxxxxxxxcxxxxxxxx...xxxxxxxxxccccccc..xxxxccccccccxxxccccxxxxxxxxxxxxx
xxxxxxxxxxxcccccccccccccccccccccccccccccccccccxxxxxcccccccxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
ENDMAP

NAME:    erik_rubicon_b
DEPTH:   D:10-, !D:$
ORIENT:  south
TAGS:    no_rotate uniq_rubicon no_descent
WEIGHT:  4
ITEM:    ring of flight ident:type / potion of enlightenment ident:type / nothing
ITEM:    potion of enlightenment ident:type, nothing, nothing, nothing, nothing
SHUFFLE: {[(, fgW, )hi
SUBST:   ?:?.wW, ?=wW., ':'.c, '=c.
MAP
xxxxxcccccccc?gw?f.@wgf?.@w??g?fw...@gwfw???.@wwww@..?ccccxxxxxxx
xccccwwwwwww??..f????.ww???www.???ww??.wwwwwwwwwwwffgg?wwcccccccx
xcwwwwwwwwwwww??wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww??wwwwwwwwwcx
xcwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwcx
xccwwwwwwwwwwwwwwwgwwwcccwwwfwwwwwcwwwwgwwwwwwwwwwwwwwwwwcccwcccx
xcwwwwwwwwwwwwwwgwwwwwwwwwwwwfwwwwwwwwwwwwwfwwwwwwwwwwwwwwwwwwwcx
xcwwwwwwwwwwwwwwwwwwwwwccwwwwwwwwwcwcwwww?wwwwwwwwwwwwwwwwwcccccx
xcwwwwwwwwwwwwxwwwwwwwwwwwwwwwwwwwcwwwww.wwwwwwwwwwwwwwwwwwwwwwcx
xccwcwwwwwg?wwwfwwwwxwwwwwwwwwwwwwwwwwwwfgwwwgwwwww.wwwwwwwcccccx
xccccccwffwg??fw?ww?gx??ww?..??wwwww??w?fwgw?fwgw??fg??gcccccxxxx
xxxxxcxx...'''...?..xx.....''.?ww??...c.'....??...'.?gg.xcxccxxxx
xxxxxcx..(cc[.'.'.xx..'.x.'..x..?...xcc..cxcx.x..x..''..cxhxcxxxx
xxxxxxcc..c{c..x.x...c.xxx.x.xx.'.'xx..cc..c.xx''.cc..xxx...xxxxx
xxxxxccx....e.xx...x...x.....c...c....cc....x...x....x....cxxxxxx
xxxxxxcxexxxxx.x.xxxx.x..xcc.xx..cc.x....xx.x.x.xccxx.xcccxxxxxxx
xxxxxxccx..xi.x.x.xxdxxxx...x..xx..xxxxx...x).xx..xc.xxcxxxxxxxxx
xxxxxxxcxxxxxx...x....xxxxxxcccccccxxxxxxccccccccx..ccccxxxxxxxxx
xxxxxxxcccccccccccccccccccccccccccccccccccxxxxxcccccccxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
ENDMAP

#############################################################################
# The Lair of the Golden Dragon (by Mu.)
#
NAME:   gold_lair_mu
ORIENT: southeast
TAGS:   no_monster_gen no_descent
DEPTH:  Depths, !Depths:$
MONS:   golden dragon, any draconian, fungus, plant, oklob plant
KMONS:  6 = rime drake / swamp drake / lindwurm
KMONS:  D = rime drake w:5 / swamp drake w:5 / death drake / lindwurm w:5
KITEM:  D = $
SUBST:  $ = $|
SUBST:  f : A B
SUBST:  A = 3:30 .:90 5:1
SUBST:  B = 4:30 .:120 5:1
SUBST:  m = W:20 w:10
KFEAT:  o = granite_statue
MAP
        ...........ffffmmmmmmmxxx
       ..........ffmmmwwwwwwwmxxx
      .........ffmmwwwwwwwwwxxxxx
     ..6....ffffmmwwwwwxxxxxxxxxx
    ..9...ffffmmwwwwwxxxxxxxxxxxx
   ..9..ffffmmwwwwwwxxxxxxxxxxxxx
  ..6..fffmmwwwwwwwxxxxx.2x.2xxxx
 .....fffmwwwwwwwwxxx........xxxx
......ffmwwwwwwwwxxx.....xx...xxx
.....fffmwwwwwwxxxxx...xxxxx..xxx
.....ffmwwwwwwxxxxxx..xxxxxxx..xx
....fffmwwwwwxxxx.....xxxoxxxx.xx
....ffmwwwwwxxxx..6..xx....xx..xx
...fffmwwwwxxxxx..xxxx...6....cxx
...ffmwwwwwxxxx..xxxxx..xxxx2xxxx
..fffmwwwwxxxx...xxxx...ccccccccx
.fffmwwwwwxxx....xxx..ccccccccccx
..ffmwwwwxxxx..x..xx.cccc.6..cccx
.fffmwwwxxxxx..xx..xc.c.......ocx
.fffmwwwxxxx..xxx..ccc....lllllcx
..ffmwwxxxx..xxxx.xcc....llllllcx
.fffwwxxxx..xxxxx.ccc...llll$$Dcx
.fffwwxxx..x..2xx.cc...llll$$$$cx
..ffwwxxx....xxx..cc6.llll$$$$$cx
.ffffwxxxx..xxx..xcc..lll$$$$$$cx
..8ffwwxxx...xx2xxcc..ll$$$$$$$cx
.6.fffwwxxx..xxxxxccc.ll$$$$$1ccx
....fffmwwwxxxxxxxcccollD$$$$cccx
.....fffmmwwwwwwwwccccccccccccccx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
ENDMAP

##############################################################################
# The Constructs Gauntlet (by Mu, modernized by HangedMan)
#
# Each room is progressively more challenging; both the golems, and their
# creators.
NAME:   constructs_gauntlet_mu_hangedman
TAGS:   no_monster_gen no_item_gen no_pool_fixup no_descent
DEPTH:  Depths, !Depths:$
ORIENT: east
MARKER: y = lua:fog_machine { \
                pow_max = 10, delay_min = 10, delay_max = 40, \
                size = 4, size_buildup_amnt = 1, \
                size_buildup_time = 25, cloud_type = "flame" }
MARKER: z = lua:fog_machine { \
                pow_max = 10, delay_min = 10, delay_max = 40, \
                size = 4, size_buildup_amnt = 1, \
                size_buildup_time = 25, cloud_type = "freezing vapour" }
MONS:   gargoyle, earth elemental, air elemental
MONS:   dancing weapon ; long sword good_item, crystal guardian, war gargoyle
KMONS:  A = occultist
KMONS:  B = deep elf pyromancer
KMONS:  C = deep elf zephyrmancer
KMONS:  D = deep elf sorcerer
KMONS:  E = lich
KMONS:  F = ancient lich / Boris w:2, ancient lich / dread lich
KFEAT:  yz = .
COLOUR: y = yellow
COLOUR: z = lightblue
FTILE:  y = floor_rough_red
FTILE:  z = floor_rough_blue
MAP
 cccccccccccccccccccccccccccccc
 cccccccccccccccccccccccccccccc
 cc......+.....cc......+....$cc
 ccycccccc.....cczcccccc...6$cc
 cc.....cc*.E5.cc.....cc..F.$cc
 ccccccycc|.5..cccccczcc.6.>$cc
 cc.....cc*$$..+......cc|||||cc
 cc.ccccccccccccccccccccccccccc
 cc+ccccccccccccccccccccccccccc
 cc.....cllllllcc%$$..cwwwwwwcc
 cc...4.clcccclcc$>.3.cwccccwcc
 cc..D..+.cllllcc$3C..+.cwwwwcc
 cc%4...ccclccccc..3..cccwccccc
 cc$$$%%ccclllll+.....cccwwwwcc
 cccccccccccccccccccccccccccwcc
 ccccccccccccccccccccccccccc+cc
.cc......+...$$ccWWWWWW+.....cc
.cc.cccccc..1.$ccWcccccc...2.cc
.cc.....cc..A..ccWWWWWWc..B..cc
Gcccccc.cc..1..cccccccWc.2.1$cc
@+......cc.....+WWWWWWWc...$%cc
Gcccccccccccccccccccccccccccccc
 cccccccccccccccccccccccccccccc
ENDMAP

##############################################################################
# Gold mine. Can come up in the dungeon and in Orc.
#
NAME:   minmay_goldmine
ORIENT: southeast
DEPTH:  D:8-, Orc
MONS:   orc / orc wizard w:3 / orc priest w:2 / orc warrior w:2
SUBST:  X = xxxZ
KPROP:  Z = no_tele_into
SUBST:  Z = .$
MAP
xxxxxxxxxxxxxxxxxxxxxxxxx
xXXXXXXXXXXXXXXXXXXXXXXXx
.XXX1XXXXXXXXXXXXXXXXXXXx
@..XX..XXXXXXXXXXXXXXXXXx
x.X..X1XXXXXX.XXXXXXXXXXx
xXXXX.XXXXXXX.X1XXXXXXXXx
xXX1.X.XXXXXXX.XXXX.XXXXx
xXXXXX..XXXXX1XXXXXX1XXXx
xXXXX.XX1XXX...XXXX..XXXx
xXXXX.XXX..X.XX.XX.XX1XXx
xXXX1XXXX.X1XXXX.1XXX.XXx
xXXXXXXXXXXXXXXXXXXX.XXXx
xXXXXXXXXXXXXXXXXXXXXXXXx
xXXXXXXXXXXXXXXXXXXXXXXXx
xxxxxxxxxxxxxxxxxxxxxxxxx
ENDMAP

NAME:   minmay_crystal_thing
TAGS:   no_monster_gen no_item_gen no_pool_fixup
ORIENT: west
DEPTH:  Depths, !Depths:$
MONS:   crystal guardian, orange crystal statue
ITEM:   any magical staff / any book / any jewellery w:15 / any scroll w:20 / \
        potion of magic ident:type / potion of brilliance ident:type / \
        phial of floods w:3 / tin of tremorstones w:5 / gold w:30
KFEAT:  _ = altar_sif_muna
MAP
            bbbbb
            bdddb
            bd1db
            bdddb
     bbbbbbbbb.bbbbbbbbb
     bdddb.........bdddb
     bd1d....._.....d1db
     bdddb.........bdddb
     bbbbbWW.....WWbbbbb
         bwW.....Wwb
         bwWW1.1WWwb
         bwwWW.WWwwb
         bbwwW.Wwwbb
          bbwW.Wwbb
           bwW.Wwb
           bwW.Wwb
           bwW.Wwb
          bbwW.Wwbb
         bbwwW.Wwwbb
        bbwwWW.WWwwbb
       bbwwWW...WWwwbb
      bbwwWW..W..WWwwbb
     bbwwWW..WWW..WWwwbb
    bbwwWW..WWwWW..WWwwbb
   bbwwWW..WWwwwWW..WWwwbb
  bbwwWW..WWwwwwwWW..WWwwbb
 bbwwWW..WWwwbWbwwWW..WWwwbb
bbwwWW1.WWwwwW2WwwwWW.1WWwwbb
xbbwwWW..WWwwbWbwwWW..WWwwbb
xxbbwwWW..WWwwwwwWW..WWwwbb
xxxbbwwWW..WWwwwWW..WWwwbb
xxxxbbwwWW..WWwWW..WWwwbb
xxxxxbbwwWW..WWW..WWwwbb
xxxxxxbbwwWW..W..WWwwbb
xxxxxxxbbwwWW...WWwwbb
xxxxxxxxbbwwWW.WWwwbb
xxxxxxxxxbbwwW.Wwwbb
xxxxxxxxxxbbwW.Wwbb
xxxxxxxxxxxbwW.Wwb
xxxxxxxxxxxbwW.Wwb
xxxxxxxxxxxbwW.Wwb
xxxxxxxxbbbbwW.Wwbbbb
xxxxxxxxbwwwwW.Wwwwwb
xxxxxxxxbwWWWW.WWWWwb
xxxxxxxxbwWb.....bWwb
bbbbbbbbbwW.......Wwbbbbbbbbb
bwwwwwwwbwW.......Wwbwwwwwwwb
bwWWWWWwbwW.......WwbwWWWWWwb
bwWb.bWwbwW.......WwbwWb.bWwb
bwW.1.WwwwW.......WwwwW.1.Wwb
bwW...WWWWWb.....bWWWWW...Wwb
bwW.......................Wwb
bwW...WWWWWb.....bWWWWW...Wwb
bwW.1.WwwwW.......WwwwW.1.Wwb
bwWb.bWwbwW.......WwbwWb.bWwb
bwWWWWWwbwW.......WwbwWWWWWwb
bwwwwwwwbwW.......Wwbwwwwwwwb
bbbbbbbbbWW.......WWbbbbbbbbb
        xxxx.....xxxxxxxxxxxx
           xx+++xxxxxxxxxxxxx
            x................
            x...............@
            x................
            xxxxxxxxxxxxxxxxx
ENDMAP

NAME:   minmay_twisted_water
ORIENT: north
TAGS:   no_descent
DEPTH:  D:9-
SUBST:  W = wW
MONS:   ice statue, patrolling ice dragon, patrolling frost giant, ice beast
KMONS:  w = w:490 nothing / ice beast
KFEAT:  w = w
MAP
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxx*xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxWxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxwwxxxx*xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxwwwwxx.xxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxwwwxxxWWxxxWwxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxwwxwwwwxx*xxwxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxwwwwwxxxxxwwxxxxxxxxxxxwwW.xxxxx
xxxxxxxxxxxxx..xxwwwwwxxxwwwxxxxxxxxwwwwwWWWwxxx
xxxxxxxxxxx.....Wwwxwwwwwwwwxxxxxxwwwwwwwwwwwwxx
xxxxxxxxxxx.....xwwxwwwwwxxxxxxxxwwwwwwwwwwwwwxx
xxxxxxxxxxxx.3.xxxwxxwwxxxxxxxxxxwwwwwwwwwwwwwwx
xxxxxxxxxxxxWWWxxxwxxxxxxxxxxxxxwwwwwwxxxwwwwwwx
xxxxxxxxxxxwwwwxxxwwxxxxxxxxxxxxwwwxxxxxxxxwwwwx
xxxxxxxxxxwwwwxxxxwwwxxxxxxxxxxwwwxxxxxxxxxwwwwx
xxxxxxxxxxxwwwwwwwwwwxxxxxxxxwwwwxxxx**|xxwwwwxx
xxxxxxxxxxxxxwwwwwwwwwwxxxwwwwwwxxxxWW2*xxwwwwxx
xxxxxxxxxxxxxwwwwwwwwwwwwwwwwwwxxxxxwwWWxwwwwwxx
xxxxxxxxxxxxWwwwwwwwwwwwwwwwwwwxxxxxwwwwwwwwwxxx
xxxxxxxxxxx.Wwwwwwwwwwwwwwwwwwxxxxxxxwwwwwwwxxxx
xxxxxxxxxxxWWwwwwwwwwwwwwwwwwwxxxxxxxxxwwwxxxxxx
xxxxxxxxxxxxwwwwwwwwwwwwwwwwwwxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxwwwwwwwwwwwwwwxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxwwwwwWWWwwwwwwxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxwwwwwwW1Wwwwwwwxxxxxxxxxxxxxxxxxxx
xx*Wxxx*xxwwwwwwwwwwWWWwwwwwwwxxxxxxxxxxxxxxxxxx
xxxWxxWWxxwwwwwwwwwwwwwwwwwwwwxxxxxxxxxxxxxxxxxx
xxxwxxwxxwwwwwwwwwwwwwwwwwwwwwwxxxxxxxxxxxxxxxxx
xxwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwxxxxxxxxxxxxxxxx
xxwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwW.xxxxxxxxxxxxxx
xwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwWWWwwxxxxxxxxxxx
xwwxxwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwxxxxxxxxx
xWxxxxwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwxxxxxx
x*xxxWwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwxxxx
xxxx.Wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwxxx
xxxxxWwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwxx
xxxxxwwwwwwwwwwwwww...........wwwwwwwwwwwwwwwwwx
xxxwwwwwww..........................wwwwwwwwwwwx
xwwwww..................................wwwww...
................................................
ENDMAP

NAME:   due_jory_tower
ORIENT: southwest
TAGS:   no_rotate no_monster_gen no_item_gen
DEPTH:  Depths, !Depths:$
MONS:   flayed ghost w:5 / phantasmal warrior w:5 / shadow wraith / eidolon
MONS:   ghost moth, Jory, vampire knight
MONS:   vampire mosquito
NSUBST: A = 3:v / *:+, B = 3:v / *:+
NSUBST: C = 2:v / *:+, D = 2:v / *:+
# Colouring
COLOUR: G = cyan
COLOUR: 5M% = white
# Making things other things.
SUBST:  I = G
# Markers:
MARKER: V = lua:fog_machine { \
                pow_max = 10, delay_min = 5, delay_max = 30, \
                size = 30, size_buildup_amnt = 1, \
                size_buildup_time = 10, cloud_type = "purple smoke" \
            }
# Final subst
SUBST:  MV = .
:       set_feature_name("granite_statue", "iron statue")
:       dgn.delayed_decay(_G, '%', 'human corpse / human skeleton')
veto {{
    if you.uniques("Jory") then
      return true
    else
      return false
    end
}}
MAP
  @@@@@@ @@@@@@@@@@@@@@@@@@@ @@@@@@
xx......v...................v.......xxxxxxxxxxxxxxxxx
xx......v..G.............G..v.......xxxxxxxxxxxxxxxxx
xx......v.........1.........v.......xxxxxxxxxxxxxxxxx
xxxxxxxxvvvvvv.........vvvvvvxxxxxxxxxxxxxxxxxxxxxxxx
xxxxvvvvvvvvvvvvv+++vvvvvvvvvvvvvxxxxxxxxxxxxxxxxxxxx
xxxvv.....vvvvvv.....vvvvvv.....vvxxxxxxxxxxxxxxxxxxx
xxxv.......+vvv...Y...vvv+.......vxxxxxxxxxxxxxxxxxxx
xxxvvvV1.vvv.vvv.....vvv.vvv.1Vvvvxxxxxxxxxxxxxxxxxxx
xxxv.......vv.vv+++++vv.vv.......vxxxxxxxxxxxxxxxxxxx
xxxvv.....vvv.vv.1.1.vv.vvv.....vvxxxxxxxxxxxxxxxxxxx
xxvvvvv+vvvvv.v...G...v.vvvvv+vvvvvxxxxxxxxxxxxxxxxxx
xxv.B1+.+1vvv.vv.1.1.vv.vvv1+.+1A.vxxxxxxxxxxxxxxxxxx
xxv.vvv.vvvvvv.vv+++vv.vvvvvv.vvv.vxxxxxxxxxxxxxxxxxx
xxv.B1+.+1Cvvvv+v...v+vvvvD1+.+1A.vxxxxxxxxxxxxxxxxxx
xxv.vvv.vvv..Vvv.....vvV..vvv.vvv.vxxxxxxxxxxxxxxxxxx
xxv.B1+.+1C.4.vvvvvvvvv.4.D1+.+1A.vxxxxxxxxxxxxxxxxxx
xxv.vvv.vvv..|vv*|||*vv|..vvv.vvv.vxxxxxxxxxxxxxxxxxx
xxv.B1+.+1Cvvvvvv.*.vvvvvvD1+.+1A.vxxxxxxxxxxxxxxxxxx
xxv.vvvvvvvvv.V.vv+vv.V.vvvvvvvvv.vxxxxxxxxxxxxxxxxxx
xxv.........+.1.v4.4v.1.+.........vxxxxxxxxxxxxxxxxxx
xxvvvvvvvvvvv...v.3.v...vvvvvvvvvvvxxxxxxxxxxxxxxxxxx
xxxvvvvvvvvvvv+vv...vv+vvvvvvvvvvvvxxxxxxxxxxxxxxxxxx
xxvvMMMMMMMvvv.vv.Y.vv.v...v...vvvvxxxxxxxxxxxxxxxxxx
xxv555%%%MMMvv.vv...vv.+.2.".2.+..vxxxxxxxxxxxxxxxxxx
xxv555%I%MMM+..vv+++vvvv...v...vv.vxxxxxxxxxxxxxxxxxx
xxv555%%%MMMvvvv.....vvvvvvvvvvvv.vxxxxxxxxxxxxxxxxxx
xxvvMMMMMMMv+.+..111..+.........+.vxxxxxxxxxxxxxxxxxx
xxvvvvvvvvvvvvvv..V..vvvvvvvvvvvvvvxxxxxxxxxxxxxxxxxx
xxxvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
ENDMAP

################################################################################
# Wizard Prison
#
NAME:   evilmike_wizard_prison
TAGS:   no_monster_gen no_item_gen no_trap_gen
DEPTH:  Depths, Crypt
ORIENT: southeast
KPROP:  -47 = no_tele_into
ITEM:   any jewellery randart, scroll of acquirement ident:type
: item(dgn.randart_aux_armour)
MONS:   human att:neutral, silent spectre, patrolling soul eater
MONS:   ogre mage / deep elf pyromancer / deep elf zephyrmancer / occultist / \
        necromancer / merfolk aquamancer / \
        spriggan air mage / orc sorcerer / kobold demonologist
MONS:   draconian shifter / draconian annihilator / lich / deep elf sorcerer / \
        deep elf annihilator / deep elf demonologist
MONS:   patrolling curse skull, ancient lich / dread lich
SUBST:  d = def
NSUBST: D = 6 / *=33., 4 = 1 / 6=4 / 6=5 / 6=45.. / . , 7 = 7 / 75
MARKER: n = lua:portal_desc {prison="wall"}
KFEAT:  g = runed_door
KFEAT:  ^ = teleport trap
FTILE:  nc-457 = FLOOR_PEBBLE_DARKGRAY
FTILE:  .@+g^d|*$236 = FLOOR_HALL
TILE:   c = DNGN_STONE_WALL_DARKGRAY
{{
  local tm_open = TriggerableFunction:new{func="callback.wizard_prison_walls"}
  tm_open:add_triggerer(DgnTriggerer:new{type="player_los"})
  lua_marker('2', tm_open)
}}
MAP
ccccccccccc.@.ccccccccccc
ccccccccccc...ccccccccccc
ccccccccccc.c.ccccccccccc
ccccccccccc...ccccccccccc
cccc-4cc4-c3.3c4-cc-4cccc
ccccnnccnncc+ccnnccnncccc
cc4nD...............Dn4cc
cc-n.................n-cc
cccc..cnncnncnncnnc..cccc
cc-n..c-4c4-c4-c-4c..n-cc
cc4n..ccccccccccccc..n4cc
cccc..c7n.......n-c..cccc
cc4n..c-n..c+c..n7c..n-cc
cc-nD.ccc+cc2cc+ccc.Dn4cc
cccc..c*$$cc^cc$$*c..cccc
cc-n..c||*c...c*||c..n4cc
cc4n..cd||c...c||dc..n-cc
cccc..ccccccgcccccc..cccc
cc4n.................n-cc
cc-nD...............Dn4cc
ccccnnccnnc...cnnccnncccc
cccc-4cc-4c...c-4cc4-cccc
ccccccccccc.D.ccccccccccc
ccccccccccccccccccccccccc
ccccccccccccccccccccccccc
ENDMAP

################################################################################
# Makhleb temple
#
NAME:   evilmike_makhleb_hellhole
TAGS:   no_monster_gen
ORIENT: southeast
DEPTH:  D:13-, !D:$, Depths, !Depths:$
KPROP:  Pq- = no_tele_into
ITEM:   demon blade good_item / demon whip good_item / demon trident good_item
: item(dgn.loot_potions)
# depth controls the number of greater servants... amount ranges from 1 to 3
KMONS:  P = human att:neutral
: if you.in_branch("D") then
MONS:   any common demon, kobold demonologist
# Milder subset of greater servants.
MONS:   blizzard demon / green death / cacodemon
KMONS:  4 = balrug
NSUBST: 1 = 1., 2 = 2., D = 3.
: else
MONS:   hell knight, deep elf demonologist
MONS:   blizzard demon / green death / executioner / balrug / cacodemon
KMONS:  4 = brimstone fiend
NSUBST: 1 = 11., 2 = 22., D = 3
: end
KFEAT:  4 = altar_makhleb
KFEAT:  a = v
KFEAT:  p = iron_grate
KFEAT:  q = l
NSUBST: * = 2=| / *
SUBST:  Z = Y, Y = Y:4 V:1
SUBST:  v = v:6 a:1, . = .:7 ':1
KPROP:  'a6 = bloody
COLOUR: av = lightred
TILE:   av = dngn_metal_wall_brown
FTILE:  .Yavp+*|p1234567d$' = floor_infernal_blank
MAP
          xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
          xxxxvvvvvvvvvvvvvvvvvvvvxxvvvvvvv
          xxxxvvvvvvvvv.1vv.2vv.1vvvv...vvv
          xxxxvllvvvvvv..vv..vv..vvv..Y.Dvv
          xxxxvlY......vv$$vv$$vv....vvv**v
          xxxxvv.......vv$$vv$$vv....vvv**v
          xxxxvv...vvvv..vv..vv..vvv..Y.Dvv
          xxxxvv...vvvv.2vv.1vv.2vvvv...vvv
          xxxxvv...vvvvvvvvvvvvvvvvvvllvvvv
          xxxxvv...vvvvvvvvvvvvvvvvvllvvvvv
   xxxxxxxxxxxvvv+vvvvvvvlvllvllvllllvvvvvv
   xvvvvvvvvvvvv...vvvvvvllllllllllvvvvvvvv
  ""vlvlvlvlvvv.....vvvv..............vvvvv
"Z"Zv....1..vv...Y..1vvv..v.1v..v..v.D*|vvv
@"""v......1v...lll...vY..Y..Y..Y.2Y.vv||vv
@"""+.......+..YlvlY.2+.............4lvv|Gv
@"""v......1v...lll...vY..Y..Y..Y.2Y.vv||vv
"Z"Zv....1..vv...Y..1vvv..v.1v..v..v.D*|vvv
  ""vlvlvlvlvvv.....vvvv..............vvvvv
   xvvvvvvvvvvvv...vvvvvvllllllllllvvvvvvvv
   xxxxxxxxvvvvvv+vvvvvvvlvllvllvllllvvvvvv
          xvvvvv...vvvvvvvvvvvvvvvvvllxxxxx
          xv.......ve'1vxxxxxxxxxxxxxllxxxx
          xv.1..2..vdl3""xxxx""1""xxxxllxxx
          xv.vvv.1.ve'1vx"xxxx"xxx"xxxxll"x
          xv.vvvv..vvpvvx"xx""xxxx"xxxxl>"x
          xv$vvvv..v-P-vxx""xxx"x"xxxxx"""x
          xv**vvv1.vPqPvxx"xxxxx"xxxxx"""xx
          xv**$....v-P-vxx"1xxxxx""1""xxx"x
          xvvvvvvvvvvvvvxxxxxxxxxxxxxxxxxxx
ENDMAP

################################################################################
# Sif Muna library
#
NAME:   evilmike_library_of_no_secrets
TAGS:   no_pool_fixup no_monster_gen
DEPTH:  D:11-, Depths
ORIENT: southeast
ITEM:   any book / any randbook w:20
ITEM:   any magical staff w:20 / any wand w:5 / any jewellery
ITEM:   any randbook / gold
: if you.in_branch("D") then
MONS:   kobold demonologist / deep elf pyromancer / tengu conjurer
MONS:   occultist w:5 / arcanist w:5 / deep elf zephyrmancer / orc sorcerer / ogre mage
MONS:   deep troll earth mage / deep elf sorcerer / deep elf annihilator \
        / deep elf demonologist / deep elf death mage / tengu reaver
: else
MONS:   tengu conjurer / occultist / spriggan air mage / vampire mage \
        / deep troll earth mage
MONS:   tengu reaver / deep elf annihilator / deep elf sorcerer \
        / deep elf demonologist / lich
MONS:   ancient lich / dread lich
: end
KFEAT:  _ = altar_sif_muna
KFEAT:  D = U
SUBST:  U = U:4 V:1 T:1
COLOUR: c" = lightblue
TILE:   c = dngn_stone_wall_blue
FTILE:  .+def12Ubc|* = floor_crystal_squares
FTILE:  "_ = floor_marble
MAP
                xxxxxxxxxxxxxxxxxxxxxxxxx
                xcccccccccccccccccccccccc
                xccccccccwwwwwwcccccccccc
                xccccU............Ucccccc
                xcwwc..b..b..b..b..cccccc
                xc|*+..b..b..b..b..cccccc
                xc||c..2..1..1..1..cccccc
                xc|*+..b..b..b..b..cccccc
  xxxxxxxxxxxxxxxcwwc..b..b..b..b..cccccc
  xccccccccccccccccccU............Ucccccc
  xcccccccccccccccccccccccc++cccccccccccc
  xcccccccccccccccccccccccw..wccccccccccc
  xcccccf...cc...fccccccccw..wccccccccccc
  xccccc.bb.cc.bb.ccccccccc++cccccccccccc
  xccccc..1.cc.1..cccwwwwwwWWwwwcccwwwwwc
  xcccccccc+cc+ccccccwbb..1..bbwcccdd.eec
''cccc..............cwb...U...bwccccc+ccc
'Dc.1c..bbbb..bbbb1.cw..U"""U..wccc.....c
@'+..c..............cw.."""""..wccc..b.3c
@Dc..+..bbbb2.bbbb1.+W.U""_""U2W+.+.bUb2c
@'+..c..............cw.."""""..wccc..b.3c
'Dc.1c..bbbb..bbbb1.cw..U"""U..wccc.....c
''cccc..............cwb...U...bwccccc+ccc
  xcccccccc+cc+ccccccwbb..1..bbwcccee.ddc
  xccccc..c....c..cccwwwwwwwwwwwcccwwwwwc
  xcccccU.+1bb1+.Uccccccccccccccccccccccc
  xcccccf.c....c.fccccccccccccccccccccccc
  xcccccccccccccccccccccccccccccccccccccc
  xcccccccccccccccccccccccccccccccccccccc
  xcccccccccccccccccccccccccccccccccccccc
ENDMAP

################################################################################
# Okawaru armoury
#
NAME:    evilmike_iron_armoury
TAGS:    no_monster_gen
DEPTH:   D:11-, Depths
ORIENT:  southeast
ITEM:    any armour, any armour good_item
ITEM:    any weapon, any weapon good_item
ITEM:    boomerang, javelin w:3, throwing net w:3, gold
: if you.in_branch("D") then
MONS:    orc warrior / deep elf knight w:1 / deep elf archer w:1
MONS:    orc warrior w:20 / centaur warrior
MONS:    orc warrior, patrolling orc knight w:8 / patrolling orc warlord w:2
: elseif you.in_branch("Depths") and you.depth() < 4 then
MONS:    orc knight w:8 / deep elf knight w:1 / deep elf archer w:5 / \
         / yaktaur captain w:2
MONS:    orc knight w:8 / deep elf knight w:1 / deep elf archer w:1 / \
         stone giant w:6
MONS:    orc warlord, patrolling deep elf blademaster
: else
MONS:    orc knight w:8 / deep elf knight w:1 / deep elf archer w:1 / \
         stone giant w:6
MONS:    orc warlord w:4 / deep elf blademaster w:1 / \
         deep elf master archer w:3
MONS:    deep elf blademaster, patrolling draconian knight
: end
KFEAT:   _ = altar_okawaru
# Lots of loot in this one. In true Okawaru fashion, most of it is junk!
SHUFFLE: df, hi, jk, eg
NSUBST:  d = e / d, f = g / f
SUBST:   n = nv, 5 = 2221'
FTILE:   '+Gvcn1234_defghijk = floor_hall
MAP
.................................xx
.....v...........................xx
.......vvvvvvvvvvvvvv......wwww..xx
.....vvvvdd'ddvff'ffvvv.....www..xx
.....viivdd'ddvff'ffvvvvv....ww..xx
.....viivvv+vvvvv+vvvkkvvvv...w..xx
.....v''+''5'''1'5''vkkveevv.....xx
.....viiv'cc'''''cc'+''vv+vvv....xx
..v.vviiv'ccc'''ccc'vkkv'5''vv...xx
....vvvvv''cc'''cc'2vvvv'''''vv..xx
..v.v'1vG'''''''5'''Gv''''''3'vv.xx
....+''+''''''''2'''1+'''''4_''n.xx
..v.v'1vG'''''''5'''Gv''''''3'vv.xx
....vvvvv''cc'''cc'2vvvv'''''vv..xx
..v.vvhhv'ccc'''ccc'vjjv'5''vv...xx
.....vhhv'cc'''''cc'+''vv+vvv....xx
.....v''+''5'''1'5''vjjvggvv.....xx
.....vhhvvv+vvvvv+vvvjjvvvv...w..xx
.....vhhvff'ffvdd'ddvvvvv....ww..xx
.....vvvvff'ffvdd'ddvvv.....www..xx
.......vvvvvvvvvvvvvv......wwww..xx
.....v...........................xx
.................................xx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
ENDMAP

################################################################################
# Vehumet Hall
#
NAME:   evilmike_halls_of_destruction
TAGS:   no_monster_gen
DEPTH:  D:13-, Depths
ORIENT: northeast
## Made to be always the same hd for consistency. - HangedMan
MONS:   statue hd:12 spells:orb_of_destruction.62.magical \
        tile:mons_statue_mage col:vehumet name:conjurer n_adj
: if you.in_branch("D") then
MONS:   tengu conjurer / deep elf pyromancer / occultist w:5 / arcanist w:5
MONS:   ogre mage / orc sorcerer / deep elf zephyrmancer, salamander tyrant
KMONS:  5 = nikola / jorgrun, deep elf annihilator
SUBST:  1 = 2GG, 4 = 4.
: else
MONS:   tengu conjurer / occultist / spriggan air mage / deep elf annihilator
MONS:   deep elf annihilator / tengu reaver / lich, salamander tyrant
KMONS:  5 = frederick / boris, ancient lich
: end
KFEAT:  _ = altar_vehumet
KFEAT:  a = c
NSUBST: D = 4=2 / 2=2*. / | / A
NSUBST: E = 1 / G, F = 1 / G
MARKER: ! = lua:fog_machine { pow_max = 10, delay_min = 10, delay_max = 20, \
                size = 8, size_buildup_amnt = 5, size_buildup_time = 10, \
                cloud_type = "flame" }
COLOUR: a'4! = red
TILE:   a = dngn_stone_wall_red
FTILE:  a'4! = floor_pebble_red
FTILE:  G1 = floor_vault
MAP
xccccccccccccccccccccccccccccc
xcG....+....Dc...D..GccGccGccc
xccc+ccc.....+......ccc3cc3ccc
xc.....ccc+cccccccc+cc*||||*cc
xc...D.+..D..+.Dc...cG**FF**Gc
xc+ccccccccccc..cD..cc*....*cc
xc.cGcGcGc1ccc+ccc+ccG......Gc
xc..........cc..D+..cc......cc
xc2.........Gcccccc.cccc++cccc
ccccGcGcc...cccaaac.+........c
ccGcccccG...Gcca4accc...ccc..c
...2ccccc...aaaa'aaaa....ccc.c
@.......+...+''4!4''+...5_cc2c
...2ccccc...aaaa'aaaa....ccc.c
ccGcccccG...Gcca4accc...ccc..c
ccccGcGcc...cccaaac.+........c
xcG2........Gcccccc2cc++cc++cc
xcc.........cccc1cc.c...cc...c
xcG..cGcGc1cccG.....c...cc...c
xcc..cccccccccc...ccc%%%cc$$$c
xcG.........ccG...Gcc*E*cc$E$c
xcc.......12ccc...ccc***cc$$$c
xcG...........+...Gccc3cccc3cc
xccccccccccccccccccccccccccccc
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
ENDMAP

################################################################################
# Kikubaaqudgha Temple
#
NAME:   evilmike_negative_zone
TAGS:   no_monster_gen
DEPTH:  D:13-, Depths
ORIENT: southeast
: if you.in_branch("D") then
MONS:   zombie place:D:15 / skeleton place:D:15 / simulacrum / spectral thing
MONS:   necromancer w:20 / soul eater
MONS:   freezing wraith / shadow wraith / flayed ghost
MONS:   tormentor / reaper, deep elf death mage
: else
MONS:   zombie place:Depths:4 / skeleton place:Depths:4 / simulacrum \
        / spectral thing
MONS:   necromancer / deep elf death mage / vampire mage
MONS:   flayed ghost / tormentor
MONS:   reaper / executioner, tzitzimitl
: end
KFEAT:  a = c
KFEAT:  _ = altar_kikubaaqudgha
# 66% chance that there are no one width corridors in the inner part. Also give
# a 50% chance of there being at least one shortcut in this vault.
SUBST:  D = 1., p : a.., q = c:8 +:1
MARKER: V = lua:fog_machine { cloud_type = "foul pestilence", \
            pow_min = 8, pow_max = 12, delay_min = 20, delay_max = 30, \
            size = 1, walk_dist = 1, spread_rate= 33 }
COLOUR: a = white
TILE:   c = wall_brick_gray
TILE:   a = wall_stone_gray
MAP
xxxx......@@@......xxxxxxxxxxxxxxxxxxxxxxxxx
xccc......1.1......ccccccccccccccccccccccccc
xccc..a..1c+c1..a..c*%c...3...cccccccccccccc
xccc.....cc.cc.....q*%+...V...+..cc.cccccccc
xccc..a.2c...c2.a..c*%c.......cc....ccc1.1cc
xccc.....c...c.....cccc.......cc.aa.ccc.c.cc
xcccqccccc...ccccccccccccc+ccccc.pp.ccc.c.cc
xca%%ac.........ca%%ac....3....c....ccc.c.cc
xc1..Dc.pa...ap.cD..1c.a.ccc.a.c3pp3cc....cc
xca..ac.aa...aa.ca..ac.a.ccc.a.c.aa.cc.c.ccc
xcD...+.........+...Dq..2...2..q.4..cc.c.ccc
xca..ac.aa...aa.ca..accccc.ccccc.cc..+.c.ccc
xc1..Dc.pa...ap.cD..1qDDDc.cDDDccccccccc+ccc
xca$$ac...3_4...ca$$acD|Dc.cD|Dccccccc.....c
xcccqccccc...cccccccccD2Dc+cD2Dccccccc$4.4$c
xcc|*2ccccc+ccccccccccc+cc.cc+ccDDDccc$%5%$c
xcc$$.+..........D.1.D.........+2|Dccc*****c
xcc2..c...........D.12D........cDDDccc|||||c
xccccccccccccccccccccccccccccccccccccccccccc
ENDMAP

###############################################################################
NAME:    grunt_house_of_mirrors
TAGS:    no_tele_into
DEPTH:   Depths, !Depths:$
ORIENT:  north
SHUFFLE: AB / BA / BB, CD / DC / DD, EF / FE / FF
SHUFFLE: GH / HG / HH, IJ / JI / JJ, KL / LK / LL
SHUFFLE: MN / NM / NN, OP / PO / PP, QR / RQ / RR
SUBST:   ACEGIKMOQ = b
SUBST:   BDFHJLNPR = .
{{
  -- This is a list of monsters in D that have attacks that can bounce off of
  -- crystal walls (fire, cold, lightning), weighted by their normal dungeon
  -- weight functions!
  local function peak(depth, low, high, chance)
    if depth < low or depth > high then return 0 end
    local len = high - low + 2
    return math.floor(chance * (len - math.abs(low + high - 2 * depth)) / len)
  end
  local function semi(depth, low, high, chance)
    if depth < low or depth > high then return 0 end
    local len = high - low
    if len == 0 then len = 2 else len = len * 2 end
    return math.floor(chance * (len - math.abs(low + high - 2 * depth)) / len)
  end
  local function flat(depth, low, high, chance)
    if depth < low or depth > high then return 0 end
    return chance
  end

  local function add_mons(mons, newmons, chance)
      if chance <= 0 then return mons end
      if mons == nil then return newmons .. " w:" .. chance end
      return mons .. " / " .. newmons .. " w:" .. chance
  end

  local function monslist(depth)
    local mons = nil
    mons = add_mons(mons, "acid dragon", semi(depth, 11, 21, 334))
    mons = add_mons(mons, "efreet", peak(depth, 13, 19, 52))
    mons = add_mons(mons, "arcanist", peak(depth, 14, 22, 89))
    mons = add_mons(mons, "fire dragon", peak(depth, 14, 24, 192))
    mons = add_mons(mons, "ice dragon", semi(depth, 17, 25, 136))
    mons = add_mons(mons, "necromancer band", peak(depth, 18, 24, 52))
    mons = add_mons(mons, "orc sorcerer", peak(depth, 21, 27, 25))
    mons = add_mons(mons, "frost giant", peak(depth, 22, 30, 136))
    mons = add_mons(mons, "fire giant", peak(depth, 22, 30, 136))
    mons = add_mons(mons, "lich", peak(depth, 22, 30, 66))
    mons = add_mons(mons, "hell knight band", peak(depth, 23, 29, 25))
    mons = add_mons(mons, "storm dragon", peak(depth, 23, 31, 89))
    mons = add_mons(mons, "deep elf pyromancer / deep elf zephyrmancer", flat(depth, 26, 28, 6))
    mons = add_mons(mons, "golden dragon", peak(depth, 29, 33, 8))
    mons = add_mons(mons, "titan", peak(depth, 28, 34, 25))
    mons = add_mons(mons, "deep elf annihilator", peak(depth, 30, 31, 4))
    if mons == nil then return "nothing" end
    return mons
  end

  local ninedepth = you.absdepth() + 5
  if ninedepth > 31 then ninedepth = 31 end

  kmons("0 = " .. monslist(you.absdepth()))
  kmons("9 = " .. monslist(ninedepth))
  kmons("8 = " .. monslist(31)) -- this cap's always hit at D:14-
}}
KFEAT: 123456 = .
validate {{
  return has_exit_from_glyph('1')
         and has_exit_from_glyph('2')
         and has_exit_from_glyph('3')
         and has_exit_from_glyph('4')
         and has_exit_from_glyph('5')
         and has_exit_from_glyph('6')
}}
MAP
xxxxxxxxxxxxxxxxxxxxxxxxx
xbbbbbbbbbbbbbbbbbbbbbbbx
xb%*%bbb*|*bbb*|*bbb%*%bx
xb.9.bbb.8.bbb.8.bbb.9.bx
xbb1bbbbb.bbbbb.bbbbb3bbx
xbbb.b.bQb.b2b.bRb.b.bbbx
xbbbb.9.bbb.9.bbb.9.bbbbx
xbBbbb.b.bQb.bRb.b.bbbGbx
xbBBbbbbb.bbbbb.bbbbbGGbx
xbBBBbbb.0.bbb.0.bbbGGGbx
xbBBbbbbb.bbbbb.bbbbbGGbx
xbBbBb.bCbDb.bEbFb.bGbGbx
xbbbb.0.bbb.0.bbb.0.bbbbx
xbBbAb.bDbCb5bFbEb.bHbGbx
xb..bbbbb.bbbbb.bbbbb..bx
xb.04bbb.0.bbb.0.bbb60.bx
xb..bbbbb.bbbbb.bbbbb..bx
xbIbJb.bKbLb.bMbNb.bObPbx
xbbbb.0.bbb.0.bbb.0.bbbbx
xbJbIb.bLbKb.bNbMb.bPbObx
xbIIbbbbb.bbbbb.bbbbbPPbx
xbIIIbbb...bbb...bbbPPPbx
xbIIIbbb...bbb...bbbPPPbx
xbbbbbbb...bbb...bbbbbbbx
xxxxxxxx.@.xxx.@.xxxxxxxx
ENDMAP

################################################################################
# Based off Zaba's beehive_diamond.
NAME:    hangedman_what_comes_after_a
DEPTH:   D:11-, Lair:2-, !Lair:$
ORIENT:  north
WEIGHT:  8
MONS:    killer bee, meliai, queen bee, oklob plant
KITEM:   | = |
SUBST:   A = X:3 .:2, z = x..
NSUBST:  ' = 1:0 / 1:1 / 1:d / 1:% / 12 = .:260 01d% / * = .
: if you.in_branch("Lair") and you.depth() < 4
:  or you.in_branch("D") and you.depth() < 12 then
KFEAT:   | = >
SUBST:   9 = 990, 8 = 9
: else
KFEAT:   | = <
NSUBST:  " = 3:2 / *:1
:    if you.in_branch("Lair") then
SUBST:   9 = 998, 0 = 009
:    end
: end
: grandhive_vaults(_G, 'X')
MAP
             xxxxxxxxxxxxxxx
             xxxxxxxxxxxxxxx
             xxxxxcccccxxxxx
             xxxccc*d*cccxxx
              xxc4%d|d%4cxx
               xcc4*d*4ccx
               xxcccmcccxx
             xxxxx18381xxxxx
           xxxxxd1911191dxxxxx
          xxxxx'"X"dAd"X"'xxxxx
         xxxx'''XXX"""XXX'''xxxx
        xxxx''X''X''X''X''X''xxxx
      xxxx'''XXX'''XXX'''XXX'''xxxx
     xxxx''X'1X''X''X''X''X1'X''xxxx
    xxx'''XXX90'XXX'0'XXX'09XXX'''xxx
 xxxxx.'X''X'1X1'X''X''X'1X1'X''X'.xxxxx
xxzx...XXX'''XXX'''XXX'''XXX'''XXX...xzxx
xzx..A.'X''X''X''X''X''X''X''X''X'.A..xzx
x.x.AAA'''XXX'0'XXX191XXX'0'XXX'''AAA.x.x
.x...A.'X'1X''X''X''X''X''X''X1'X'.A...x.
x.x....XXX010XXX'''XXX'''XXX010XXX....x.x
x.x..A.'X'1X1'X''X''X''X''X'1X1'X'.A..x.x
.x..AAA'''XXX'''XXX'''XXX'''XXX'''AAA..x.
x.x..A.'A''X''X'1X''X''X1'X''X''A'.A..x.x
x.x....AAA'''XXX010XXX010XXX'''AAA....x.x
.x.x....A''A''X'1X1'X'1X1'X''A''A....x.x.
x.xzx.....AAA'''XXX'''XXX'''AAA.....xzx.x
.x.xzx.....A''A''X''X''X''A''A.....xzx.x.
 .x.x.x.x....AAA...XXX...AAA....x.x.x.x.
  .xzx.x.x....A..A..X..A..A....x.x.xzx.
   .xzx.xzx...................xzx.xzx.
    .....xzxx.xx.xx.x.xx.xx.xxzx.....
         .x..x.zx..xzx..xz.x..x.
          .xx.xx.xx.x.xx.xx.xx.
ENDMAP

###############################################################################

NAME:   kennysheep_demon_jail
ORIENT: north
TAGS:   no_monster_gen
DEPTH:  Depths:2-
MONS:   common demon, hell knight
MONS:   shadow demon / green death / blizzard demon / balrug / cacodemon / \
        hell beast / hellion / reaper / lorocyproca / tormentor
NSUBST: . = 7:1 / 7:2 / *:.
FTILE:  .|#+G123 = floor_pebble_darkgray
KPROP:  1Y = no_tele_into
KFEAT:  # = iron_grate
MAP
xxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxvvvvvvvvxxxxxx
xxxvvvvvvvvvxxv||v.3.vxxxxxx
xxxv1v1v1v1vxxv||+.3.vxxxxxx
xvvv#v#v#v#vvvvvvv...vxxxxxx
xv*+.........llllv...vvvvvvv
xvvv#v#v#v#vl..l.+...+.....v
xxxv1v1v1v1vl....vvvvv.GlG.v
xxxvvvvvvvvv.l.........lYl.v
xxxv1v1v1v1v.ll........GlG.v
xvvv#v#v#v#v.lll.v+++v.....v
xv*+..........l..v   vvvvvvv
xvvv#v#v#v#vvvvvvv
xxxv1v1v1v1v
xxxvvvvvvvvv
ENDMAP

NAME:   kennysheep_seaside_town
ORIENT: northeast
TAGS:   no_monster_gen transparent
DEPTH:  D:7-14
KFEAT:  W = open_sea
MONS:   ogre, orc warrior, gnoll bouda, centaur, kobold brigand
KMONS:  8 = orc warrior band
KMONS:  9 = gnoll bouda band
KMONS:  p = plant
KMONS:  P = fungus
FTILE: ' = floor_sand
FTILE: .pt89 = floor_dirt
NSUBST: H = 3:* / 7:1
KFEAT:  H = floor
NSUBST: . = 2:9
SUBST:  p = p...
NSUBST: . = 5:p
SUBST:  1 = 12345
NSUBST: q = 3:1 / 6:P / *:.
MARKER: F = lua:fog_machine { cloud_type = "flame", pow_min = 100, pow_max = 100, \
                 delay = 10, size = 1, walk_dist = 0, excl_rad = -1 }
MAP
xxxxWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW
xxxxwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwW
xxxxwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwW
xxxxwwwwwwwwww'wwwwwww''wwwww'wwwwwwW
xxxxwww'wwwww'''w''''ww''''''''wwwwwW
xxxxwwww'''''..'''.''''''..''''wwwwwW
xxxxwwww'...cccc...cccc.......''wwwwW
xxxxwwww''..cHHc...cHHc........'wwwwW
xxxxw''''...cHHc...cHH+...cccc.''wwwW
xxxx''cccc..cc+c...cccc...cHHc..'wwwW
xxxx..cHHc................+HHc..''wwW
xxxx..cHH+................cccc...'wwW
xxxx..cccc.......ccccc...........'wwW
xxxx.......8..ccccHHHc..........''wwW
xxxxtp.p.pt..tc>zcHHH+..........'wwwW
xxxxt.p.p.ptxxczz+HHH+..........'wwwW
xxxxtpppptxxx!!!ccccccxxxppp....'wwwW
xxxxttptpxx!!!!xxxxxxxxxppppppp.''wwW
xcccc+tptx!!!xxxxxqxxxx.pptptppp''wwW
xcHHHctttx!!xxxxxxxqqqqqxtptptpcmcwwW
xcHHHcxxxx!xxxxxxxqxxxxxxxttttccHccwW
xcHHHcx!!!!!xxxxxxqxqxxxxxptppmHFHmwW
xccccc!!!x!xxxxxxqqxqqqqxxtpptc+HccwW
xxxxx!!xxxxxxxxxxqxqqxxqxxpppppcmcwwW
xxxxxx!!xxxxxxxxxxxxqxxqqqxxxxxxwwwwW
xxxxxxx@@xxxxxxxxxxxxxxxxxx    xxxxxx
ENDMAP

NAME:   kennysheep_kobold_camp
ORIENT: north
TAGS:   no_monster_gen no_trap_gen
DEPTH:  D:4-9
MONS:   kobold brigand, kobold
MARKER:  F = lua:fog_machine { cloud_type = "flame", pow_min = 100, \
                               pow_max = 100, delay = 10, size = 1, \
                               walk_dist = 0, excl_rad = 0 }
KMONS:  p = plant
NSUBST: . = 15:2 / *:.
SUBST:  t = tp`
NSUBST: ' = 5:C / 5:2
: dgn.delayed_decay(_G, 'C', 'human corpse')
KPROP:  ` = no_tele_into
MAP
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxttttttttxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxtttttttttttttxxxxxxxxx
       xxxxtttttttttttttttttttttxx
       xxtttttttttt*t..*t.ttttttxx
     xxxtttttttttt.''1'......ttttxxx
    xxtttttttt....''''''.....ttttttxx
   xxtttttt.......''FF'''.....ttttttxx
  xxtttttttt.....'''FF'''.....ttttttt@
 xxttxxxxtttt.....''''''.....ttttxxxxx
xxttxx  xxtttt.....''''.....tttxxx
@txxx    xtttttt.........tttttxx
xxx      xxxtttttttt....ttttttx
           xtttttttttt.ttttxxxx
           xxxxxxtttxt.ttxxx
                xttxxtt.ttxx
                xtttxxtt.ttxx
                xxttxxxtt.ttx
                 xtttxxxtt.txx
                 xxttxxxxt.ttx
                  xxxttxxtt.txx
                    xttxxxxt.tx
                     @@    @@@
ENDMAP

NAME:   kennysheep_goblin_castle
TAGS:   no_monster_gen no_pool_fixup
ORIENT: northwest
DEPTH:  D:3-4
## this gives a chance for Ijyb and Robin to appear as the boss if they
## haven't been placed, selecting from who is available.
{{
  -- Default for when we're only map validating.
  if not crawl.game_started() then
    kmons("O = Ijyb / Robin / hobgoblin w:1")
    subst("B = 1")
    return
  end

  -- possible hobgoblin bosses and their weights
  bossw = {hobgoblin = 1, Ijyb = 10, Robin = 10}
  bosses = { {"hobgoblin", 1}, }

  -- Find out which hobgoblin uniques we can use
  if not you.uniques("Ijyb") then
    bosses[#bosses + 1] = {"Ijyb", bossw["Ijyb"]}
  end
  if not you.uniques("Robin") then
    bosses[#bosses + 1] = {"Robin", bossw["Robin"]}
  end

  -- Choose a boss, and remove the supporting goblins if we select Robin, since
  -- she has her own band.
  boss = util.random_choose_weighted(bosses)
  if boss == "Robin" then
    subst("B = .")
    boss = "Robin band"
  else
    subst("B = 1")
  end
  kmons("O = " .. boss)
}}
MONS:   goblin, goblin ; sling, jackal
NSUBST: . = 1:0 / 3:3 / *:.
MAP
xxxxxxxxxxxxxxxxxxx
x...+....B..x%%*xww
x...+......O+%%%xww
x...x....B..xxxxxww
x...xxxxxxxxxx...ww
x............x...ww
x.....1.1....x.2.ww
xx+xx.....xx+xx..ww
x...x.....x...x..ww
x...x.....x...x..ww
x...x.....x...x..ww
xx+xx.....xx+xx..ww
x.2.x.....x.2....ww
x...x.....x.....www
xwwwx.....xwwwwwww
xwwwxx+++xxwwwwww
  wwww...wwww
    ww@@@ww
ENDMAP

NAME:   kennysheep_tiny_hell
TAGS:   no_monster_gen no_descent
ORIENT: centre
DEPTH:  D:13-14
WEIGHT: 5
FTILE:  *|c.12${} = floor_infernal_blank
TILE:   c = dngn_stone_dark
SUBST:  *=*|
MONS:   ice devil w:1 / hellwing w:3 / rust devil w:1 / orange demon w:1 /\
        red devil w:1 / demonic crawler / sixfirhy w:1
MONS:   lesser demon, river rat / giant cockroach
NSUBST: . = 6:3 / 6:! / 56:' / .
KPROP:  !' = bloody
: dgn.delayed_decay(_G, '!', 'human corpse / human skeleton')
MAP
              cccccccccc
              c...$$...c
              c...**...c
              c....1...c
              c2..2..2.c
              c........c
              c........c
              c........c
              c........c
              c....2...c
             cc........cc
            cc..........cc
           cc............cc
          cc..............cc
ccccccccccc................ccccccccccc
c................................2...c
c...2................................c
c....................................c
c$*1.....2........{.........2....2.*$c
c$*.2..............}..............1*$c
c....................................c
c................................2...c
c...2................................c
ccccccccccc................ccccccccccc
          cc..............cc
           cc............cc
            cc..........cc
             cc........cc
              c...2....c
              c........c
              c........c
              c........c
              c........c
              c.2..2..2c
              c...1....c
              c...**...c
              c...$$...c
              cccccccccc
ENDMAP

NAME:   kennysheep_housing_project
ORIENT: north
TAGS:   no_monster_gen
DEPTH:  D:6-9
MONS:   kobold / hound w:5 / gnoll / hobgoblin, \
        kobold brigand / orc warrior w:5 / ogre / gnoll sergeant, \
        orc priest / orc wizard / gnoll bouda / centaur
NSUBST: . = 4:2 / 20:1 / 5:3
NSUBST: . = 8:% / 2:* / 10:$
FTILE: 'pt = floor_grass
KMONS:  p = plant
SUBST:  !':.
MAP
xxxxccccccccccccccccccccccccccccxxxxx
''''m.......+..............+...m'''''
''''m.......+..............+...m'''''
'pptc.......cccc++cccccccc+c...cppt''
'tptc.......c..........c...c...ctpp''
ppptc.......c..........c...c...ctpt''
'pttc.......c..........c.>.ccccctpp''
'pptc.......c..........c...cptttpt'''
'pttc.......ccccmmcccccc+++cppppp'''
 'ttccmmcccccttt''ptttt'!1!tppptp'''
  ''tt''ttt'tptp''pptpp'!!!'ptp'''''
  ptpt'''ptp'p'p''ptptp'!!!'p'p''''
  ''p''''p'p''''''p'p'''!!!'''''''
    ''''''''''''''''''''!!!'''
         ''''  '  ''   '!!!'
                        @@@
ENDMAP

NAME: cheibrodos_hippocracy
DEPTH: D:12-
TAGS: no_item_gen no_monster_gen no_pool_fixup
ORIENT: north
MONS: glowing orange brain, small abomination, glass eye, demonic crawler
ITEM: randbook
NSUBST: ' = 3:4 / *:.
NSUBST: " = 4:0 / 1:9 / *:.
NSUBST: ? = 1:9 / *:0
MAP
      xxxxxxxxxxxxxxxxxxxxxxx
     xxxxxxxxxxxxxxxxxxxxxxxxx
    xxxwwwwwxxxxxxxxx......xxxx
  xxxxwxxxxx...xxxx...xxxx..xxx
 xxxwwxx.........x..xxx..xx..xx
xxxwxxx............xx.....xx.xx
xxwxx*...?.?......xx..xx..2x.xx
xxwx%d....1.......x..xxW22Wx.xx
xxwx**...?.?.....xx..xxWWWxx.xx
xxwxx%..........xx....xxwxx..xx
xxxwxxxx......xxxw.xx..xxx..xxx
 xxxwwwxxxxxxxxwwww'xx.....xxx
  xxxxxwwwwwwwwxx.w'xxxxxxxxx
   xxxxxxxx4.xxxx.w'xxxxxxxx
   xx"m"xxx*%xxxxw'wxx
  xx"m""".xmxxxxx'wxxx
  xx3m"""..xxxx''w'xx
  xx"m"""..xxx'ww'xx
   xx"m"xx.xxx'w'xx
    xxxxxx.xx'ww'xx
        xx.xxx'w'xx
         xx.xx'ww'xx
         xx.xx'ww'xx
         xx.x.xw'xx
          xx.xxx'xxx
           xxxxxw.xx
              xxw.xx
              xx.xxx
              xx@xxx
ENDMAP

NAME:    kennysheep_kobold_grotto
DEPTH:   D:12-, !D:$
TAGS:    no_monster_gen
ORIENT:  northwest
MONS:    kobold blastminer, kobold brigand, patrolling kobold demonologist
MONS:    kobold, plant, lesser demon, obsidian statue
KMONS:   g = bush
SHUFFLE: !'
NSUBST:  ! = 3:C / 4:- / 2:6 / *:., ' = 2:C / *:.
NSUBST:  . = 10:4 / 4:6
SUBST:  .z = .:220 W:15 5:20
: dgn.delayed_decay(_G, 'C', 'spriggan corpse / spriggan skeleton')
KPROP:  -C = bloody
MAP
xxxxxxxxxxxxxxxxxxxxxxxxxx
xxxx!!xxxx'''xxxx'''xxxxxx
xxxx!!!xxx''''xx'''''xxxxx
xxxxxgxxxxggxxxxxggxxxx!!x
xxxxx................xx!!x
xxxx...w..............g!xx
x'x...www.............xxx
x'g....w.........w...xx
x'g..........x2.wWw.2xx
xxx....w....xx.wW7Ww..x
xx....wGw...xx..wWw..xx
xxx.w2.w.2wxxx...w...xx
xxxxww.2.wwxx.2.....2xx
 xxxx3***3xxx.......xxx
 xxxx**|**1xxxx.....xxx
  xxxxxxxxxxxxx.....xxx
    xxxxxxxxxxxx....xx
              xxx@.xx
ENDMAP

###############################################################################
# Vaults inspired by old hive ends. Mixes standard bee grids with floor spawns.

# Based off of hive_mumbra_combs, for the old proposed portal.
NAME:    regret_index_combs_of_tragedy
DEPTH:   D:11-, Lair:2-, !Lair:$
ORIENT:  south
WEIGHT:  8
MONS:    killer bee, meliai, queen bee
NSUBST:  . = 3=001. / .
NSUBST:  1 = 8 = 1. / *:1
NSUBST:  X = 4=d / 4=% / aa.
# Guaranteed randomized access between combs.
SHUFFLE: bc / de
SUBST:   ce = a
NSUBST:  b = . / *:aa., d = . / *:aa., f = . / *:aa.
NSUBST:  g = . / *:aa., h = . / *:aa., i = . / *:aa.
NSUBST:  j = . / *:aa., k = . / *:aa., l = . / *:aa.
NSUBST:  m = . / *:aa., n = . / *:aa., o = . / *:aa.
NSUBST:  p = . / *:aa., q = . / *:aa.
: if you.in_branch("Lair") and you.depth() < 4
:  or you.in_branch("D") and you.depth() < 12 then
SUBST:   9 = 990, 8 = 9
: else
NSUBST:  " = 3:2 / *:1
:    if you.in_branch("Lair") then
SUBST:   9 = 998, 0 = 009
:    end
: end
: grandhive_vaults(_G, 'a', true)
MAP
            xxaaaaa@...@aaaaaxx
           xxaa.............aaxx
          xxaa.....aaaaa.....aaxx
        xxxaa......"aaa"......aaxxx
       xxaaaaa.....aaaaa.....aaaaaxx
      xxaa...bb...cc...dd...ee...aaxx
     xxaa.....aaaaa.....aaaaa.....aaxx
   xxxaa1..X..1aaa1..X..1aaa1..X..1aaxxx
  xxaaaaa.....aaaaa.....aaaaa.....aaaaaxx
 xxaa...ff.0.ff...gg.0.gg...hh.0.hh...aaxx
xxaa.....aaaaa.....aaaaa.....aaaaa.....aaxx
xaa...X..1aaa1..X..1aaa1..X..1aaa1..X...aax
xaa1.....aaaaa.....aaaaa.....aaaaa.....1aax
xxaaa.0.ii.9.jj.0.jj.9.kk.0.kk.9.ll.0.aaaxx
 xxxaaaaa.....aaaaa.....aaaaa.....aaaaaxxx
   xxaaa1..X..1aaa1..X..1aaa1..X..1aaaxx
    xxxaa.....aaaaa.....aaaaa.....aaxxx
      xxaa.0.mm.".nn.".nn.".oo.0.aaxx
       xxaaaaa.....aaaaa.....aaaaaxx
        xxxaa1..X..1aaa1..X..1aaxxx
          xxaa.....aaaaa.....aaxx
           xxaa.1.ppd|dqq.1.aaxx
            xxaaaaa.""".aaaaaxx
             xxxaa1191911aaxxx
               xxaa18381aaxx
                xxaa***aaxx
                 xxaaaaaxx
                  xxxxxxx
                   xxxxx
                    xxx
ENDMAP

# The rest of the hive layouts were very generic messy grids with simple
# structural tweaks as encompass vaults, which makes them much less
# interesting to split off. The following vaults are merely interpretations
# of the other old four ends.

# Very loosely based off of linley's beehive.
NAME:    regret_index_wax_grids
TAGS:    no_pool_fixup
DEPTH:   D:11-, Lair:2-, !Lair:$
ORIENT:  northwest
WEIGHT:  6
MONS:    killer bee, meliai, queen bee
NSUBST:  ' = 18:1 / 4 = 01... / *:.
NSUBST:  " = 10:0 / 4 = 001.. / *:.
NSUBST:  y = 5:x / 1:. / * = x., z = 5:x / 1:. / *:x.
NSUBST:  Y = 3:x / 1:. / * = x., Z = 3:x / 1:. / *:x.
SUBST:   D : aaP.., E : aaP.., F : aaP.., G : aaP..
SUBST:   H : aaP.., I : aP., X = xxP.
: if you.in_branch("Lair") and you.depth() < 4
:    or you.in_branch("D") and you.depth() < 12 then
SUBST:   9 = 990, 8 = 9, ~ = .
: else
NSUBST:  ~ = 3:2 / *:1
:    if you.in_branch("Lair") then
SUBST:   9 = 998, 0 = 009
:    end
: end
: grandhive_vaults(_G, 'a', true)
MAP
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxaaaaaaaaaaaaaaaaaaaaxXXXXXXXx
xxawwwwwwwww........'ax........
xxaw|*www..'"~a~...P.9x........
xxaw*311~1wwaaaa.a.P.'x...yyy..
xxaww189dwwaa%..a..E.xx..yyy.....
xxaww198wwaa'.D.a..."x..yyy......
xxaww~dwwaad.a.a'a..xx......."x...
xxaw.1wwaa"'.a.a'aE.x..P....xxx...
xxaw.wwaa"'"a.a.a.a.xx"...xxx.....
xxaw'waad'"a'.a.a.aFaxx.xxx...Y...
xxa."aa'..a'aaDa.a."aaxxx....YY.V.
xxa.~a%.aa..aa.a.a.F"F....a...Y...
xxa.aa.D..aaD...a....aa....a....Y.
xxa.~a..aa..aa.'a'.aa..aa..a.I.YY.
xxa...aa''aa..aa9aa..aaG'aa.....Y.
xxa..a..aa..aa.'a'.aa..aa..a......
xxa......Eaa....a...Iaa...G.HH.x..
xxa.PPE....F"F.a.a.aa..aa....aax..
xxa'..."xxxaa".a.aIaa"a...aa.axx..
xxaa9'xxx.xxaFa.a.a."a'a.aa."ax...
xxxxxxx..."xx.a.a.a.a'aa....aax...
xxX......P..x..aGa.a.aa'aa.aaxx..
xxX....z...xx..a'a.a...aa'%axx...
xxX...zz...x....a....a.a'"aax..
xxX..zzz..xx.a..a.G.aa..%aaxx..
xxX..zz...x...aa.a..a..aaaxx...
xxX..z...xx.......H.."aaxxx..
xxX....."x..Z..I..Haaaaxx...
xxx.....xx.ZZZ.....axxxx....
      .........Z..xxx....
      ......V.ZZZ........
        ...............
ENDMAP

# Loosely based off of R1's beehive2.
NAME:    regret_index_bee_streams
DEPTH:   D:11-, Lair:2-, !Lair:$
ORIENT:  south
WEIGHT:  6
MONS:    killer bee, meliai, queen bee
NSUBST:  ` = 10:1 / 2 = 01... / *:.
NSUBST:  ' = 10:1 / 2 = 01... / *:.
NSUBST:  " = 12:0 / 4 = 001.. / *:.
SUBST:   A : xx., B : xx., C : xx., D : xx.
SUBST:   E : x.., F : xx., G : xx., H : xx.
SUBST:   I : aa., J : aa., K : aa., L : aa.
SUBST:   y = xx., z = xx!
CLEAR:   !
: if you.in_branch("Lair") and you.depth() < 4
:    or you.in_branch("D") and you.depth() < 12 then
SUBST:   9 = 990, 8 = 9, ~ = .
: else
NSUBST:  ~ = 3:2 / *:1
:    if you.in_branch("Lair") then
SUBST:   9 = 998, 0 = 009
:    end
: end
: grandhive_vaults(_G, 'a', true)
MAP
           ..P......P...P......P..
           ....xx.B.......x.xx....
           ...x..x.A.....A.x..x...
           ..x.aa"x.B...x.x"aa.x..
   ...P......x.aaa`x.....x`aaa.x......P...
   ...........x"aaa.x...x.aaa"x...........
 ....B.xx.....x`aaa.x...x.aaa`x.....xx.B....
 ...A.x..x...x.aaa.x.....x.aaa.x...x..x.A...
 ..B.x.aa"x..x.aaa`x.....x`aaa.x..x"aa.x.B..
 ...x.aaa`x...x"aaa`x...x`aaa"x...x`aaa.x...
 ..x.aaa.x...C.x`aa.x...x.aa`x.C...x.aaa.x..
 ..x.aaa.x....D.x%.x.....x.%x.D....x.aaa.x..
 ...x"aaa"x..E.C.xx.......xx.C.E..x"aaa"x...
 ..F.x`aa`x.........aa.aa.........x`aa`x.F..
 x..G.x.%x........aaa...aaa........x%.x.G..x
zxx..F.xx.E.....aaa...a...aaa.....E.xx.F..xxz
zxy............aaa'a.a.a.a'aaa............yxz
zxy...........aaa'a...I...a'aaa...........yxz
zxyy........aaa".....ada....."aaa........yyxz
zxyy.......aaaa..aJ".'I'."Ja..aaaa.......yyxz
zxy.......aaa'~..Jaa.a*a.aaJ..~'aaa.......yxz
zxyy...H.aa"..K..aaa."a".aaa..K.."aa.H...yyxz
zxyy.....aa.a..K.daa.a*a.aad.K..a.aa.....yyxz
zxy...aa.a....a%a.da.'a'.ad.a%a....a.aa...yxz
zxyy..aa.....a.a%a...a|a...a%a.a.....aa..yyxz
zxyy.aaa.LaL....a.a..1a1..a.a....LaL.aaa.yyxz
zxy..aa.....aaa."..a~a1a~a..".aaa.....aa..yxz
zxy.aaa...a....aaa.~a1a1a~.aaa....a...aaa.yxz
zxy.aa''a"...a..9.da18381ad.9..aa.."a''aa.yxz
xxxyxaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaxyxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
ENDMAP

# Very loosely based off of minmay's beehive_corners.
NAME:    regret_index_harrowing_hell_hive
TAGS:    no_pool_fixup
DEPTH:   D:11-, Lair:2-, !Lair:$
ORIENT:  southwest
WEIGHT:  4
MONS:    killer bee, meliai, queen bee, oklob plant
NSUBST:  ' = 18=1 / 4=01''' / .
NSUBST:  " = 12=0 / 4=001'' / .
SHUFFLE: ABCD
SUBST:   A = a, B : aa., C : a.., D = .
SUBST:   y = xxx., Y = xxw, z = xx!
CLEAR:   !
: if you.in_branch("Lair") and you.depth() < 4
:    or you.in_branch("D") and you.depth() < 12 then
SUBST:   9 = 990, 8 = 9, ~ = .
: else
NSUBST:  ~ = 3=2 / 1
:    if you.in_branch("Lair") then
SUBST:   9 = 998, 0 = 009
:    end
: end
: grandhive_vaults(_G, 'a', true)
MAP
xxxzzzzzzzzzzzzz
xxxxxxxxxxxxxxxx
xxxyyyyyyyyyyyyx
xxyadaa$%a".a..x
xxyda1'.a.......
xxya1a"...a.A..@
xxya'"a.a.'a....
xxy$...a..a.....
xxy%a.a.a'a.B...
xxya....'a..C...
xxy".a'aa.a.....
xxy...a....aD...
xxya.A..BC.Da...x
xxy.............x
xxy.............xzzzzzzz
xxy.W.w.P"w"P.w.xxxxxxxzz
xxx.xwwwwwwwwwwwWYYYYYxxzz
xxxaxwwwwwwwwwWWwwwwwYYxxz
xxxWxwwwwwwwwwWxxwwwwwYYxz
xxxWxwwwwwwwwWwxxwwwwwwYxz
xxxWxwwwwxxwWwwwww4*wwwYxz
xxxWxwwwwxxWwwwwwW*4wwwYxz
xxxWxwwwwwWWwwwwWwWwwwwYxz
xxxWxwwwwWwwwwwWwWwwxxwWxxxx
xxxW'P.w.w.w.P~wWwwwxxWw..........@..xxz
xxx'.........".~wwwwwWWww............yxz
xxxa.......ACB"PwwwwWwww.............yxz
xxx'.a....D".C..wwwWwwwwP..aD.AB..C.ayxz
xxaa.......B"A.wwWWwwwww"..Da....a...yxz
xxy9a..~....D...wWxxwwwww....a.aa'a."yxz
xxaa".a.*......wWwxxwwww"..A..a'....ayxz
xxydaa..a*......wwwwwwwwP..B.a'a.a.a%yxz
xxa~1..a..~....wwwwwwwww.....a..a...$yxz
xxy%a1a..a......wwwwwwwww...a'.a.a"'ayxz
xxa8131.a...a..Pwwwwwwww...C.a..."a1ayxz
xxy*a1a1a"a....'xxxxxxxxW......a.'1adyxz
xxxa*8%~da9a'a'WWWWWWWa....a."a%$aadayxz
xxxxyayayayayaxxxxxxxxxxyyyyyyyyyyyyyxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
ENDMAP

# ...not even recognizable as beehive_tunnels anymore. Oh well.
NAME:    regret_index_tunnel_blossom
TAGS:    no_pool_fixup
DEPTH:   D:11-, Lair:2-, !Lair:$
ORIENT:  float
WEIGHT:  6
MONS:    killer bee, meliai, queen bee
NSUBST:  ' = 18:1 / 4 = 01... / *:.
NSUBST:  " = 12:0 / 4 = 001.. / *:.
SHUFFLE: BCDEFGH
NSUBST:  A = 1:. / * = a
SUBST:   B = ., C : a., DEFGH = a, X = xxPw
: if you.in_branch("Lair") and you.depth() < 3
:  or you.in_branch("D") and you.depth() < 13 then
SUBST:   9 = 990, 8 = 9, ~ = .
: else
NSUBST:  ~ = 3:2 / *:1
:    if you.in_branch("Lair") then
SUBST:   9 = 998, 0 = 009
:    end
: end
: grandhive_vaults(_G, 'a', true)
MAP
      .@.xx.@.......@.xx.@.
      ...xx.X.......X.xx...
    ...X.xx...xx.xx...xx.X...
    .X...xxxxx..x..xxxxx...X.
  .....xxxx...........xxxx.....
  .X...xxxxxx'.X.X.'xxxxxx...X.
......x....xxx.."..xxx....x......
@.X.xx..X..'xHBBCCDDx'..X..xx.X.@
....xx...".GH...'...EE."...xx....
xxxxxx....FG.a.aaa.a.FF....xxxxxx
xxxxxxxx'EF.a%''""'%a.GG'xxxxxxxx
.X..x.xxxE.a%aaaAaaa%a.Hxxx.x..X.
...x..'xD..'aa9"~**aad..Bx'..x...
..x..X..C.a"a8a11da~a'a.B..X..x..
@.x...."C'a"A~'131'~A"a'C"....x.@
..x..X..B.a'a~ad11a8a"a.C..X..x..
...x..'xB..daa**~"9aa'..Dx'..x...
.X..x.xxxH.a%aaaAaaa%a.Exxx.x..X.
xxxxxxxx'GG.a%'""''%a.FE'xxxxxxxx
xxxxxx....FF.a.aaa.a.GF....xxxxxx
....xx...".EE...'...HG."...xx....
@.X.xx..X..'xDDCCBBHx'..X..xx.X.@
......x....xxx.."..xxx....x......
  .X...xxxxxx'.X.X.'xxxxxx...X.
  .....xxxx...........xxxx.....
    .X...xxxxx..x..xxxxx...X.
    ...X.xx...xx.xx...xx.X...
      ...xx.X.......X.xx...
      .@.xx.@.......@.xx.@.
ENDMAP

###############################################################################

NAME:    regret_index_dithmenos_brocken_genspenst
TAGS:    no_monster_gen no_item_gen no_rotate patrolling
DEPTH:   Depths, !Depths:$
ORIENT:  south
MONS:    shadow wraith / nothing, vampire mage / nothing, rakshasa, shadow wraith
MONS:    vampire knight, shadow demon, shadow dragon
KMONS:   9 = glowing shapeshifter / spriggan defender / deep elf annihilator
KMONS:   8 = bone dragon / reaper / doom hound
KMONS:   _ = tzitzimitl
ITEM:    robe_of_night, ring_of_shadows
ITEM:    cloak_of_the_thief, hood_of_the_assassin
ITEM:    shadow dragon scales randart
ITEM:    phantom mirror, potion of invisibility ident:type q:2
KFEAT:   F = floor
KFEAT:   _ = altar_dithmenos
SHUFFLE: 56, defgh, ij|
: if you.in_branch("Tar") then
SUBST:   02 = 00014, 9j = 8, d = }, e = ), f = ], ghj*| = .
: else
SUBST:   0 = 11112234
: end
MARKER:  F = lua:fog_machine { cloud_type = "black smoke", pow_min = 75, \
                               pow_max = 100, delay_min = 50, delay_max = 75, \
                               size = 1, walk_dist = 0, spread_rate = 5 }
COLOUR:  m = lightmagenta
TILE:    c = dngn_stone_dark
TILE:    m = dngn_transparent_wall_darkgray
FTILE:   F = floor_pebble_darkgray
MAP
         cc..c.c..cc
         cc.......cc
        cc..c...c..cc
       ccc..c...c..ccc
       ccc..c.3.c..ccc
       cc1.m..c..m.1cc
      ccc1.F.2c2.F.1ccc
      ccc..m.4c4.m..ccc
      cc..c..ccc..c..cc
     ccc..c..ccc..c..ccc
     ccc..c..ccc..c..ccc
     cc..m..cc5cc..m..cc
    ccc..F..++5++..F..ccc
    ccc..m.6++.++6.m..ccc
    cc..c..ccc.ccc..c..cc
    cc..c..ccc.ccc..c..cc
   ccc..c..cc...cc..c..ccc
   cc..m..ccc...ccc..m..cc
   cc..F..ccc...ccc..F..cc
  ccc..m.0cc0...0cc0.m..ccc
  cc5....ccc0.d.0ccc....6cc
  cc..c..++..*e*..++..c..cc
  cc9...7++.jk_kj.++7...9cc
 ccccccccccccmFmcccccccccccc
 ccccccccccccccccccccccccccc
xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
ENDMAP

NAME:   argonaut_augean_stables
TAGS:   no_pool_fixup
DEPTH:  D:8-
ORIENT: south
KMONS:  12 = yak
KMONS:  34 = death yak
KITEM:  24 = *, $
KFEAT:  _ = open_door
: if you.depth() < 12 then
NSUBST: Y = 1:42 / 1:2 / * = 1:50 .
SUBST:  - = .:30 +, ~ = W:40 w
: else
NSUBST: Y = 2:4 / * = 1:50 3 .
SUBST:  - = _:30 ., ~ = W:20 w
: end
SUBST:  ' : '., " : '.
CLEAR:  '
MAP
    ...........
    .....w.....
  @....~www.....@
  ....~wwww~.....
  '....wwww~....'
  '....wwww.....'
 .......www.......
 ........w........
 ".......w......."
 ".......~......."
....cccc+++cccc....
....cYY-.~.-Y.c....
....cccc.~.cccc....
....c.Y-.~.-YYc....
....cccc.W.cccc....
'...cYY-.W.-Y.c...'
....cccc.~.cccc....
....c.Y-.~.-YYc....
....cccc.~.cccc....
....cYY-.w.-Y.c....
....cccccwccccc....
 "....cccwccc...."
 "......ww~......"
 .......ww........
 ......ww.........
  '.....~w......'
  '.....~ww.....'
  ......ww.......
  .....ww........
xxxxxxwwwxxxxxxxxxx
xxxxxxxwwwxxxxxxxxx
xxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxx
ENDMAP

NAME:    doesnt_quadruple_sword
TAGS:    no_monster_gen no_item_gen
DEPTH:   D:13-
ORIENT:  north
MONS:    dancing weapon ; long sword
ITEM:    double sword, triple sword
KPROP:   .* = bloody
NSUBST:  . = 4:1 / 2=1.. / 1:d / 1:e / 1:f / 4=ff.
SUBST:   c : cbxv
: dgn.delayed_decay(_G, 'f', 'occultist corpse')
MAP
cccccccccc
c.**..**.c
c........c
c........c
c........c
cccc==cccc
ENDMAP

NAME: cheibrodos_cascadia
# this vault would be better as transparent, but the internal masking is very
# complicated...
TAGS: no_item_gen no_monster_gen no_pool_fixup
DEPTH: Depths
ORIENT: northwest
MONS: occultist, freezing wraith, ice dragon, frost giant, blizzard demon, lich
KPROP: -Tp =  no_tele_into
KMONS: I = ice statue
KMONS: " = ancient lich / dread lich
KMONS: B = blizzard demon
KMONS: C = lich
KITEM: " = %
KITEM: B = %
KITEM: C = %
NSUBST: q = 2=1 / 2=1.. / 2=2, p = 2=34 / 34...
NSUBST: _ = 3=1 / 2=1. / 3=2 / 2. / 1=6, - = 6=34, q = 2=BBBC / *:`
NSUBST: ` = 4=| / 2=|* / 4=* / 2=*% / 4=% / 10=%.
KMASK: ' = !opaque
MAP
ccccccccccccccccccccccc
cccccccccccccccwwww-ccc
ccq`q````WWWWWWwwwwwTcc
cc`"`````ccccnnWwwwww-c
ccq`q``cncwwwwnnWwwwwwc
cc`````cTwwwwWWnWWwwwwc
cc````ccwww__WW+WWwwwwc
cc``ccc5ww___WW+WWwwwwc
cc``nTwww____ccnWwwww-c
ccWccwww____ccwnnWwwTcc
ccWcwww_____wwwwnnWIccc
ccWcww_______wwwwcccccc
ccWcww___cw___Wwwwcccww
ccWnwWWWccww_WWWwnnpTww
ccWnnWWWcwwwWWWccnwwww'
cwwWnn++nnwwwWc+'''''''
cwwwWWWWWnnwwwc'''''cc'
cwwwwWWWwWncwnn'''''cc'
cwwwwwwwwwWccnw'''''''@
c-wwwwwwwwIccpw''''''''
ccTwwwwwwTcccTw'cc'''''
ccc-wwww-cccwww'cc'''''
ccccccccccccww'''@'''@
ENDMAP

NAME:   cheibrodos_body_horror
TAGS:   no_item_gen no_monster_gen
DEPTH:  D:12-
ORIENT: north
MONS:   small abomination, demonic crawler, ugly thing, chaos spawn, neqoxec
MONS:   large abomination / very ugly thing
KMONS:  _ = tentacled monstrosity
KITEM:  _ = |
NSUBST: - = _ / 2 = %%* / 3 = 2334 / 2 = 2334.... / 1:5. / 2:6 / 1:6. / *:1
MAP
xxxxxxxxxxxxxxxxxxxxxxx
xxxxxxx-xxxxxxxxxxxxxxx
xxxxxx.xxx-xxxxxxxxxxxx
xx-xxx.xxxx.xxx-xxx.xxx
xxx..x.xxx..xxxx...x-xx
xxxxx..xxx.xxx-xx.xxxxx
xxxxx.x....x..xxx.xxxxx
xxxx-xxxxx..xxxxx.xxxxx
xxxxxx-.x....xxx....xxx
x-.xxxxx.........xxx.xx
xxx..xxxx.....xxxxxx.xx
xxxx..........xxxxx.xxx
xxxx.xxx.......xxxx-xxx
xxxx.x-xx.x=x...xxxxxxx
xxxxx.xx..x.xx..xxxx-xx
x-xxxxxx.xx..xx..xxx.xx
x.xxxxxx.x....xx....xxx
xx.x...x.x.....x.xx.xxx
xxx.xxx.xx.....x.xxx.xx
xxxx-xx..xx....xx-xxx-x
xxxxxxxxx-x.....xxxxxxx
xxxxxxxxxxx.@@@..xxxxxx
ENDMAP

NAME:   dreamdust_isle_of_ice
TAGS:   no_monster_gen patrolling no_descent
DEPTH:  D:11-, Lair, Depths
ORIENT: south
# A thematic loot item similar to one of the thematic items one might find in
# an Ice Cave. Any thematic type info is pre-identified, since this item always
# places and always at the same location.
{{
local coldres = " ego:cold_resistance ident:type"
local ego = " ego:freezing ident:type"
item("any weapon good_item w:100" .. ego .. " / cloak" .. coldres ..
     " / scarf ego:resistance ident:type / buckler" .. coldres ..
     " / kite shield" .. coldres .. " / tower shield" .. coldres ..
     " / ice dragon scales / chain mail good_item" .. coldres ..
     " / plate armour" .. coldres .. " / crystal plate armour" .. coldres ..
     " / book of ice / book of the tundra" ..
     " / randbook disc:ice / manual of ice magic / staff of cold ident:type" ..
     " / ring of ice ident:type / ring of protection from cold ident:type" ..
     " / wand of iceblast ident:type / phial of floods / condenser vane")
}}
: if you.in_branch("D") and you.depth() < 14 or you.in_branch("Lair") then
MONS:   two-headed ogre simulacrum / troll simulacrum / naga simulacrum \
        / spriggan simulacrum / white imp / wolf w:25 / yak w:25
MONS:   wolf simulacrum / elephant simulacrum  / polar bear simulacrum \
        / cane toad simulacrum / death yak simulacrum / polar bear w:50
MONS:   ice statue
MONS:   rime drake / ice devil
MONS:   death yak w:40 / freezing wraith / dire elephant simulacrum \
        / harpy simulacrum / anaconda simulacrum / entropy weaver simulacrum
MONS:   bog body / ice dragon w:5 / nothing w:5
NSUBST: 3 = 3G / G
# D:14-
: elseif you.in_branch("D") then
MONS:   polar bear w:25 / rime drake w:25 / deep troll simulacrum \
        / minotaur simulacrum / entropy weaver simulacrum \
        / spriggan defender simulacrum / ice devil
MONS:   white ugly thing w:60 / lindwurm simulacrum / dire elephant simulacrum \
        / alligator simulacrum / harpy simulacrum / anaconda simulacrum \
        / freezing wraith
MONS:   ice statue
MONS:   freezing wraith / death yak
MONS:   ettin simulacrum / hydra simulacrum / golden dragon simulacrum \
        / caustic shrike simulacrum
MONS:   bog body / ice dragon / white very ugly thing / frost giant \
        / reaper ; halberd itemname:scythe tile:wpn_scythe wtile:scythe \
        ego:freezing / blizzard demon
SUBST:  3 = 3G
# Depths
: else
MONS:   ice dragon / white very ugly thing / freezing wraith / simulacrum
MONS:   ettin simulacrum / spriggan defender simulacrum \
        / golden dragon simulacrum / caustic shrike simulacrum
MONS:   orange crystal statue
MONS:   frost giant / reaper ; halberd itemname:scythe tile:wpn_scythe \
        wtile:scythe ego:freezing / blizzard demon
MONS:   titan / wendigo / nargun
MONS:   ice fiend / walking frostbound tome
: end
# Monster, loot, and terrain handling common to all depths.
NSUBST: . = 3=1 / 6=1. / 2=2 / 4=2. / 2=4 / 2=4. / 5 / 2=5. / .
SUBST:  * = *|, % = %%*, - = .....wwwW, ~ = wwwwwW
COLOUR: .123456$%*|d = blue
COLOUR: AGx = white
FTILE:  .123456$%*|AGxd = floor_ice
RTILE:  x = wall_ice_block
: set_feature_name("shallow_water", "Some ice crusted shallow water")
: set_feature_name("deep_water", "Some ice crusted deep water")
: set_feature_name("rock_wall", "ice covered rock wall")
MAP
                  @@@@@
              WWWWWWWWWWWWW
           WWWWWWWWWWWWWWWWWWW
       WWWWWW~~~~~~~~~~~~~~~WWWWW
    WWWWWW~~~~----.....----~~~~WWWWWW
  WWWW~~~~~---......6......---~~~~~WWWW
 WWW~~~----.........A.........----~~~WWW
WW~~~----.......3$%*d*%$3.......----~~~WW
~~~xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx~~~
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
ENDMAP

NAME:   dreamdust_labyrinth
TAGS:   no_monster_gen no_trap_gen uniq_faux_labyrinth
ORIENT: northeast
DEPTH:  D:11-, Lair
WEIGHT: 5
KITEM:  < = %, %, %, %, %, *, *, *
KMONS:  < = patrolling minotaur
KFEAT:  a = x
KFEAT:  < = escape_hatch_up
# Make a path through the walls
NSUBST: a = 1:= / a
NSUBST: p = . / c
NSUBST: q = . / v
NSUBST: r = . / b
# Place a few dead-ends
NSUBST: ' = c / .
NSUBST: " = v / .
# Everything else
NSUBST: ? = < / G
TILE:   c = wall_lab_stone
TILE:   v = wall_lab_metal
FTILE:  -.`"apqvcbT<G = floor_gauntlet
MAP
xxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxx
 a..'.'.'.'.'.'.'.xx
 a'ccpcpcpcpcpcpc.xx
 a.p..".".".".".c'xx
 a'c"vvqvqvqvqv.p.xx
 a.p.q........v"c'xx
 a'c"v.TbrrbT.q.p.xx
 a.p.q.bb..bb.v"c'xx
 a'c"v.r.??.r.q.p.xx
 a.p.q.r.??.r.v"c'xx
 a'c"v.bb..bb.q.p.xx
 a.p.q.TbrrbT.v"c'xx
 a'c"v........q.p.xx
 a.p.vqvqvqvqvv"c'xx
 a'c."."."."."..p.xx
 a.cpcpcpcpcpcpcc'xx
 a.'.'.'.'.'.'.'..xx
 aaaaaaaaaaaaaaaaaxx
ENDMAP

NAME:   dreamdust_cave_troll
TAGS:   no_monster_gen
ORIENT: northwest
DEPTH:  D:10-, Lair
NSUBST: - = 1 / 1=^ / 2=? / .
SUBST:  ^ = ^.
KFEAT:  ^ = net trap
MONS:   patrolling deep troll
: dgn.delayed_decay(_G, "?", "yak corpse")
MARKER: ! = lua:fog_machine { cloud_type='flame', pow_min = 10, pow_max = 10, \
                              delay = 10, size = 1, excl_rad = 0 }
MAP
xxxxxxx
x--xxxx
x-!-xxx
xx-.xxx
xxxx.^x
xxxxx.x
xxx^^xx
xxx@xxx
ENDMAP

NAME:   dreamdust_under_siege
TAGS:   transparent no_monster_gen no_pool_fixup patrolling
ORIENT: south
DEPTH:  D:12-, Orc:1, Depths, !Depths:1
WEIGHT: 5
TILE:   c = wall_stone_smooth
FTILE:  +'{([>-O = floor_cobble_blood
# Monster Placement
NSUBST: ' = 6=1' / 6=1'' / '
NSUBST: . = 1=2 / 3=2. / 10=3. / 10=3.. / .
# Theme variations
: if you.in_branch("D") then
TILE:   G : dngn_statue_angel
KFEAT:  O = altar_zin / altar_elyvilon / altar_the_shining_one
FTILE:  -O : floor_limestone / floor_w_marble
COLOUR: - : white
MONS:   apis / nothing
MONS:   necromancer band / death knight band
MONS:   nothing
: elseif you.in_branch("Orc") then
SUBST:  ( = {, [ = >, G = I
KFEAT:  > = escape_hatch_down
KFEAT:  O = altar_beogh
KPROP:  -O = bloody
MONS:   orc warrior band / nothing
MONS:   necromancer band
MONS:   nothing
: else
# Depths
:    if crawl.coinflip() then
# Holy defenders
TILE:   G : dngn_statue_angel
KFEAT:  O = altar_zin / altar_elyvilon / altar_the_shining_one
FTILE:  -O : floor_limestone / floor_w_marble
COLOUR: - : white
MONS:   angel / cherub
MONS:   lich / ancient lich w:3
MONS:   zombie / simulacrum
:    else
# Unholy defenders
TILE:   G : dngn_statue_imp / dngn_statue_demonic_bust
KFEAT:  O = altar_yredelemnul / altar_kikubaaqudgha
KPROP:  -O = bloody
MONS:   ancient champion / vampire knight / lich
MONS:   daeva / angel
MONS:   daeva w:5 / cherub / nothing w:20
:    end
: end
MAP
 ...........................
.............................
...wwwww.............wwwww...
..wwcncww..wG...Gw..wwcncww..
..wcc'ccwwwwc+++cwwwwcc'ccw..
..wn'('cccncc'''ccnccc'['nw..
..wcc''c'''''''''''''c''ccw..
..wwccc+'''''''''''''+cccww..
...wwc'''''''''''''''''cww...
...wwc'''''''---'''''''cww...
...wwcccccccccOcccccccccww...
xxxxxxxxxxxxxcccxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
ENDMAP

##############################################################################

# majored in destruction and minored in blood.
NAME:    regret_index_makhleb_lecture_halls
TAGS:    no_monster_gen no_item_gen no_trap_gen patrolling
DEPTH:   D:12-, Depths
ORIENT:  west
# Greater servant lecturers of elemental mastery / murder (thus corresponding
# tame beasts), one on general murder. They observe in D and fight in Depths.
# Lesser servants patrol hallways and assist greater servants.
KMONS:   d = smoke demon
KMONS:   e = hellwing
KMONS:   f = orange demon
KMONS:   h = hell knight
KMONS:   D = balrug
KMONS:   E = blizzard demon
KMONS:   F = green death
KMONS:   H = executioner
SHUFFLE: d12D / e34E / f56F / h78H / ^^^`
: if you.in_branch("D") then
KMONS:   1 = deep elf pyromancer / occultist w:4
KMONS:   2 = efreet
KMONS:   3 = deep elf zephyrmancer / tengu conjurer
KMONS:   4 = raiju / freezing wraith w:4
KMONS:   5 = naga mage
KMONS:   6 = redback / wolf spider w:4
KMONS:   7 = kobold demonologist
KMONS:   8 = ynoxinul
KITEM:   * = demon blade / demon whip / demon trident, \
             demon blade / demon whip / demon trident
KFEAT:   ^ : alarm trap / dispersal trap / lava w:30
NSUBST:  ' = 4 = def / 1:9 / 1:7 / 2 = defh7. / *:.
: else
KMONS:   1 = fire giant / salamander tyrant w:4
KMONS:   2 = hell hog
KMONS:   3 = frost giant / spriggan air mage
KMONS:   4 = spark wasp / azure jelly w:4
KMONS:   5 = nagaraja
KMONS:   6 = emperor scorpion
KMONS:   7 = deep elf demonologist / tengu reaver w:4
KMONS:   8 = cacodemon
KITEM:   DEFH = $, % / potion of mutation
KITEM:   * = demon blade good_item / demon whip good_item / \
             demon trident good_item, demon blade good_item / \
             demon whip good_item / demon trident good_item
KFEAT:   n = closed_clear_door
KFEAT:   ^ : alarm trap / zot trap w:4 / lava w:4
NSUBST:  ' = 4:h / 1:0 / 1:1357 / 2 = 1357h. / *:., def = 2:h / 2 = h. /*:.
: end
KFEAT:   y = c
KFEAT:   M = altar_makhleb
KFEAT:   - = open_door
# Entrance randomization, pillar randomization, lockers opening / filling.
SHUFFLE: Aa / ~~ / ~~, Bb / Cc, opqrs
SUBST:   ab` = ., A! = +, B = @, C : ccv, c : v.., ~ = v
SUBST:   j : ll., k : ll., o = ., p : vv^, q : v., r : v., s = v
SUBST:   z = zzz", % = %%%zz", - = ++-, ^ = .
KPROP:   "yz = bloody
KPROP:   DEFH` = no_tele_into
COLOUR:  v = lightred
TILE:    v = dngn_metal_wall_brown
TILE:    y = wall_studio
FTILE:   @.'"vVYM+-defhDEFH0123456789%zn' = floor_infernal_blank
:        dgn.delayed_decay(_G, 'z', 'human corpse / spriggan corpse / ' ..
:                              'elf corpse / tengu corpse / salamander corpse')
MAP
xx   vvvvvvvvvvvvvvvvBBbbbbbbbBBvvvvvvvvvvvvvvvv
xx vvvvvvvvvvvvvvvvvvvBBbbbbbBBvvvvvvvvvvvvvvvvvvv
xxvvvvvvvvlllvs.'.-%vv...bbb...vv%-.'.svlllvvvvvvvv
xxvvvvvnd....vv.s.vvvv.........vvvv.s.vv....envvvvv
xxvvvvDn......v...-%vv.jk...kj.vv%-...v......nEvvvv
xxvvvnnn.yz1y.+...vvvv.........vvvv...+.y3zy.nnnvvv
xxvvvd..22....+...-%vv.jk.o.kj.vv%-...+....44..evvv
xxvvv..y2z....v...vvvv.........vvvv...v....z4y..vvv
xxvvl..z....y.v....vvv.ll.'.ll.vvv....v.y.3..z..lvv
xxvvl..1...1..v.....vv....'....vv.....v......3..lvv
xxvvl..y..y.*vv..q..vv....'....vv..q..vv*.y..y..lvv
xxvvvv......vvv..q...vvVv.'.vVvv...q..vvv......vvvv
xxvvvvv++vvvvvv..".o..vvv+++vvv..o."..vvvvvv++vvvvA
xxvv.............................................AA
xxvvr............'........'........'............aAA
xxvv''j''k...p"''Y'''''p''M''p'''''Y''"p...k''j..AA
xxvvr............'........'........'............aAA
xxvv.............................................AA
xxvvvvv++vvvvvv..".o..vvv+++vvv..o."..vvvvvv++vvvvA
xxvvvv......vvv..q...vvVv.'.vVvv...q..vvv......vvvv
xxvvl..y..y.*vv..q..vv....'....vv..q..vv*.y..y..lvv
xxvvl..5......v.....vv....'....vv.....v......7..lvv
xxvvl..z..5.y.v....vvv.ll.'.ll.vvv....v.y.7..z..lvv
xxvvv..y6z....v...vvvv.........vvvv...v....z8y..vvv
xxvvvf..66....+...-%vv.jk.o.kj.vv%-...+....88..hvvv
xxvvvnnn.yz5y.+...vvvv.........vvvv...+.y7zy.nnnvvv
xxvvvvFn......v...-%vv.jk...kj.vv%-...v......nHvvvv
xxvvvvvnf....vv.s.vvvv.........vvvv.s.vv....hnvvvvv
xxvvvvvvvvlllvs.'.-%vv...ccc...vv%-.'.svlllvvvvvvvv
xx vvvvvvvvvvvvvvvvvvvvCCcccCCvvvvvvvvvvvvvvvvvvv
xx   vvvvvvvvvvvvvvvvvCCcccccCCvvvvvvvvvvvvvvvv
ENDMAP

# One could pull out an older or different game's vision
# of an eerie swamp from a lot of other branches' natural spawns.
NAME:    regret_index_malice_mire
TAGS:    no_monster_gen no_trap_gen no_pool_fixup no_descent
DEPTH:   D:7-, !D:$, Lair, !Lair:$, Depths, !Depths:$, Zot, !Zot:$
ORIENT:  north
KMONS:   F = fungus
: if you.in_branch("D") then
{{
  -- Three tiers scaling alongside depth: D:7-9, D:9-13, D:12-14.
  local d = math.max(185 - (you.depth() * 20), 0)
  local e = 0
  if you.depth() > 8 and you.depth() < 14 then
    e = 30
  end
  local f = math.max(-220 + (you.depth() * 20), 0)

  mons("jelly  w:" .. d .. " / iguana w:" .. d ..
       " / sky beast w:" .. d .. " / bullfrog w:" .. d ..
       " / vampire mosquito w:" .. e .. " / howler monkey w:" .. e / 2 ..
       " / wyvern w:" .. f .. " / basilisk w:" ..f)
  mons("wyvern w:" .. d .. " /  ogre w:" .. d / 2 ..
       " / killer bee w:" .. d .. " / killer bee zombie w:" .. d  / 2 ..
       " / two-headed ogre w:" .. e .. " / wyvern zombie w:" .. e / 2 ..
       " / kobold brigand w:" .. e / 2 .. " / shadow w:" .. f ..
       " / hornet w:" .. f)
  mons("water moccasin w:" .. d .. " / sleepcap w:" .. d ..
       " / crocodile w:" .. d .. " / ugly thing w:" .. e ..
       " / gnoll bouda band w:" .. e / 3 ..
       " / large slime creature w:" .. f ..
       " / glowing orange brain w:" .. f / 2)
  mons("two-headed ogre w:" .. d .. " / steam dragon w:".. d ..
       " / shapeshifter w:" .. e * 2 .. " / great orb of eyes w:" .. f ..
       " / catoblepas w:" .. f / 2 .. " / fire crab w:" .. f)
  mons("hornet w:" .. d .. " / acid dragon w:" .. d ..
       " / troll w:" .. d .. " / komodo dragon w:" .. e ..
       " / deep troll w:" .. e .. " / ogre mage w:" .. e ..
       " / glowing shapeshifter w:" .. f .. " / meliai band w:" .. f / 2 ..
       " / titanic slime creature w:" .. f)
  kfeat("^ = shaft trap w:" .. d * 2 .. " / dispersal trap w:" .. e ..
       " / alarm trap w:" .. f / 2)

  if you.depth() < 10 then
    subst("{([ = %")
    nsubst("12 = " .. 10 - you.depth() .. ":.")
    nsubst("3 = 1:.")
  else
    shuffle("{([ / %%% / %%% / %%%")
    subst("( = }:40 >")
    subst("[ = ):40 >")
  end
}}
FTILE:   @.fgP`12345F$%*{([})]^wtxT : floor_pebble_darkbrown / floor_moss
: elseif you.in_branch("Lair") then
MONS:    blink frog / wyvern, basilisk, rime drake / cane toad
MONS:    catoblepas / komodo dragon, lindwurm / torpor snail
KFEAT:   ^ = dispersal trap
SHUFFLE: {([ / {%% / %%% / %%% / %%%
SUBST:   ( = ), [ = ]
: elseif you.in_branch("Depths") then
MONS:    very ugly thing / glowing orange brain w:5 / spriggan rider
MONS:    flayed ghost w:5 / spriggan berserker / glowing shapeshifter
MONS:    spark wasp / glass eye w:5 / spriggan defender
MONS:    shadow dragon / golden dragon
MONS:    tentacled monstrosity / caustic shrike
KFEAT:   ^ = alarm trap / dispersal trap w:2
SHUFFLE: {([ / })] / %%% / %%% / %%%
SUBST:   { = {:50 <, ( = (:50 <, } = }:50 >, ) = ):50 >
NSUBST:  123 = 1:45
FTILE:   @.fgP`12345F$%*{([})]^wtxT : floor_pebble_darkbrown / floor_moss
: else   -- Zot
MONS:    shadow dragon / green draconian w:20
MONS:    green draconian stormcaller / green draconian monk / ghost moth
MONS:    moth of wrath / tentacled monstrosity w:15 / death cob
MONS:    golden dragon, curse toe, protean progenitor
KFEAT:   ^ = zot trap
SHUFFLE: 456
:   if you.depth() == 1 then
SUBST:   { = }, ( = ), [ = ]
:   else
SHUFFLE: {([ / })] / })], })]
:   end
SUBST:   } = }:70 >, ) = ):70 >
: end
# Swamp flavour loot: dragon scales, witch / elei wands, consumables, rings.
KITEM:   & = swamp dragon scales randart / swamp dragon scales good_item / \
             any beam wand / scroll of poison q:4 ident:type / \
             potion of lignification q:4 ident:type / \
             ring of poison resistance randart / ring of flight randart
KFEAT:   ~ = w
SHUFFLE: op, qr
SUBST:   o = w, p = t, q : tw., r = .
SUBST:   ^ = ^TTTTT, T = wtxF, P = ~~ttttFFFF
NSUBST:  1 = 1:. / 3 = 1. / *:1, 2 = 2 = 2. / *:2
NSUBST:  3 = 2 = 3. / *:3, | = 1:&| / *:*
MARKER:  ~ = lua:fog_machine { cloud_type = "thin mist", pow_min = 20, \
                               pow_max = 30, delay = 50, walk_dist = 3, \
                               size_min = 1, size_max = 1 }
MAP
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxtttttxxxxxxxxxxxxxxxxxxxxxxxxxxxxxtttttxxxxx
xxxttt$$wttttttttPPPPtttttttPPPPttttttttw$$ttttxx
xxttt|...ww...tt..1.2.wwtww.2.1..tt...ww...|tttxx
xxtt*....t..w..t.T.............T.t..w..t....*ttxx
xxtt3.....t.w..t...wt.^.{.^.tx...t..w.t.....4ttxx
xxt5.1..^..tw.....wtw.......xtx.....wt..^..1.3txx
xxtt3.....t.w.T..xtw...(.[...xtw..T.w.t.....4ttxx
xxtt*....t..w...xtx...........wtw...w..t....*ttxx
xxtttt$$www.....tx3...wwwww...3wt.....www$$ttttxx
xxxtttttttttttttttttt..T.T..ttttttttttttttttttxxx
xxxxxxxxxxxxxxxxxxxxxt..4..txxxxxxxxxxxxxxxxxxxxx
xxxttttttttttPPPPtttt...t...ttttPPPPttttttttttxxx
xxttt1.tt.2tw.1..wtw...txt...wtw..1.xt2.tt.1tttxx
xxttw......wtw....w....txt....w....xtx......wttxx
xxt1..wp....wtx......T.txt.T......wtx....pw..1txx
 xt...oto....xtx.......txt.......wtw....oto...txx
 xt....pw..T..x2..T....txt....T..2w..T..wp....tx
 xtt1...............3tttxttt3...............1ttx
 xtttw......wwwfwwgwwwwwxwwwwwgwwfwww......wtttx
   tttw.t.t.tttttttttttwtwttttttttttt.t.t.wttt
      t.www..  tttt  ttt~ttt  tttt  ..www.t
      ..ttt@    tt    ttttt    tt    @ttt..
       @                @                @
ENDMAP

# Crumbling, seeping castlework. Smouldering iron ruin.
NAME:    regret_index_infernal_bastille
TAGS:    no_monster_gen no_item_gen transparent
DEPTH:   D:9-, Depths, Zot, !Zot:$
PLACE:   Depths:$
WEIGHT:  1 (Depths:$), 10
ORIENT:  north
: if you.in_branch("D") then
SUBST:   > = .
NSUBST:  01 = 2:.
:   if you.depth() < 12 then
MONS:    orc warrior / wight, gnoll sergeant, centaur
MONS:    centaur warrior zombie, vampire
KMONS:   6 : gargoyle / centaur warrior
KMONS:   7 : hell knight / efreet
KMONS:   L" = fire bat
:   else
MONS:    deep elf pyromancer / tengu warrior w:15 / meliai zombie w:5
MONS:    centaur warrior, skeletal warrior, deep troll, deep elf knight
KMONS:   6 : hell knight / phantasmal warrior / efreet w:5
KMONS:   7 : fire giant / deep troll earth mage / deep elf high priest
KMONS:   L = molten gargoyle
:   end
TILE:    v = dngn_metal_wall_darkgray
: elseif you.in_branch("Depths") then
KMONS:   L = fire dragon
:   if you.where() ~= dgn.level_name(dgn.br_entrance("Zot")) then
MONS:    hell knight / rakshasa w:5 / spriggan defender zombie w:5, fire giant
MONS:    vampire knight, deep troll earth mage, tengu reaver
KMONS:   6 : juggernaut w:15 / iron dragon
KMONS:   7 : ancient lich / dread lich
NSUBST:  V> = 1:} / 1 = ) >:6 / 1 = ] >:6
TILE:    v = dngn_metal_wall_brown
:   else
TAGS:    patrolling
MONS:    red draconian / base draconian w:5, fire giant
MONS:    red draconian monk, tengu reaver, iron dragon
KMONS:   6 : red draconian knight / golden dragon
KMONS:   7 : lich / red draconian scorcher
KITEM:   > = midnight gem
KFEAT:   > = enter_zot
NSUBST:  23 = 4 = 11d
SUBST:   %*| = $
TILE:    v = dngn_metal_wall_magenta
:   end
: else   -- Zot
MONS:    red draconian / red draconian monk w:5
MONS:    red draconian knight, red draconian annihilator
MONS:    red draconian scorcher, red draconian shifter
KMONS:   6 : iron dragon / golden dragon
KMONS:   7 : dread lich / orb of fire
KMONS:   L = moth of wrath
NSUBST:  V> = 1:} / 1 = ):6 >:1 / 1 = ]:6 >:1
SUBST:   " = 1
TILE:    v = dngn_metal_wall_red
: end
KITEM:   & = demon whip / demon blade / demon trident / \
             plate armor ego:fire_resistance ident:type / \
             fire dragon scales / fire dragon scales randart
KITEM:   d = large rock q:1 / stone q:10
KITEM:   e = any weapon
KFEAT:   L = l
KFEAT:   - = broken_door
KFEAT:   _ = altar_ecumenical / altar_ignis
SHUFFLE: ABCDEF
SUBST:   A = v, B : v., C : v., DEF" = ., d = xldd, ~ = lld.
NSUBST:  0 = 1:56 / 2:1 / 2:2 / 2:3 / 2:5 / * = 1123.
NSUBST:  1 = 2:. / 2:L / *:1, | = 1:& / *:|
SHUFFLE: 23, 23 / 23 / 23 / 24 / 34
KPROP:   lL_ = no_tele_into
KMASK:   lL_ = opaque
MAP
        xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
        xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
       xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
       xvvvvvvxxxxxxxxxxxxxxxxxxxxxxxxxxxvvvvvvx
      xxvllllvvvvvvvvvvvvvvvvvvvvvvvvvvvvvllllvxx
      xvvvnvvllllllllllllvvvvvllllllllllllvvnvvvx
     xxvvv~~vnvvnvvnvvnvvll_llvvnvvnvvnvvnv..vvvxx
     xvvv0...~~v*|%$$$$6nnvvvnn6$$$$%|*v.....0vvvx
    xxvlv0.d.."vvv%$eeevvvvvvvvveee$%vvv.....0vlvxx
    xvvln~.......vvv7eeevvvvvvveee7vvv........nlvvx
   xxvlvv~...Ed....vvvve-.....-evvvv.....C....vvlvxx
 ..xvvln~....EE..d....vvv.....vvv.......CC.....nlvvx..
@.lvvlvv~.Dd........F...v++v++v...A.........B..vvlvvl.@
..Lvvln0..DD.....vv...V.........V...vv.v...BB..0nlvvL..
."lvvvv0......vvvvvvv....A...F....vvvvvvv......0vvvvl".
.lnvv~...v.vvvv....vvvvv0..>..0vvvvv....vvvv.....~vvnl.
.lvlv~..vvvv.v..BB...vlv00...00vlv~".DD..v.vvvv..~vlvl.
.lvlv+v+v.......B....nlvvv+++vvvln~..dD.......v+v+vlvl.
.lvlv~....A..........vvlv$$$$$vlvv.........dA....~vlvl.
.lnvv~CC.......vv22...nlvv$*$vvln~..33vv~~.....EE.vvnl.
..lvv3.C....vvnvvnv1..vvlv*6*vlvv~.1vnvvnvv~~..Ed2vvl..
..lvv13".vvnvlllllv1...nlvv|vvln...1vlllllvnvv~"21vvl..
 .lvvLvvnvllllvvvlvv...vvlnnnlvv.d.vvlvvvllllvnvvLvvl.
 .lvvvvllllvvvvvvvln....vvlllvv....nlvvvvvvvllllvvvvl.
..lvvllvvvvvvvvvvvlvv....vvvvv....vvlvvvvvvvvvvvllvvl..
..lvvvvllllvvvvvvvvlv.A.........F.vlvvvvvvvvllllvvvvl..
@..lvlvnvvvllllvvvvln......1......nlvvvvllllvvvnvlvl..@
 .........vnvvvllllvv----vvvvv----vvllllvvvnv.........
    ..........vnvvvv......vvv......vvvvnv..........
          ............G.........d............
              .....  ...  ...  ...  ....
ENDMAP

# While most other movie material isn't much available, horror and
# dungeon fantasy are intertwined enough at least some undead / flesh split.
NAME:    regret_index_all_hallows'_manor
TAGS:    no_monster_gen no_item_gen no_pool_fixup
DEPTH:   D:12-, Swamp, !Swamp:$, Depths, !Depths:$, Zot, !Zot:$
ORIENT:  northeast
: if you.in_branch("D") or you.in_branch("Depths") then
:   if you.in_branch("D") then
MONS:    vampire mosquito, gargoyle, vampire, skeletal warrior
MONS:    shadow / freezing wraith, white ugly thing, unseen horror
KMONS:   8 = great orb of eyes
KMONS:   9 = glowing orange brain
NSUBST:  12 = 3:., 34 = 2:", 5 = 1:', 789 = 2:.
NSUBST:  . = 2:12 / 3 = 678, ' = 2:5 / *:', " = 2 = 44" / *:"
SUBST:   % = .
:   else
MONS:    jiangshi, phantasmal warrior, vampire mage, vampire knight
MONS:    flayed ghost, glowing orange brain, white very ugly thing
KMONS:   8 = glass eye
KMONS:   9 = tentacled monstrosity
NSUBST:  127 = 1:., . = 4 = 126. / 2 = 7789 / *:.
NSUBST:  ' = 1:5 / 1:5' / *:', " = 2 = 34 / *:"
:     dgn.delayed_decay(_G, "%", "any skeleton")
:   end
:   if crawl.coinflip() then
FTILE:   "defghijk34 = floor_tomb
FTILE:   'V5GabAB = floor_crypt
:   else
TILE:    HIJKLc : dngn_stone_dark / dngn_stone_wall
:   end
: elseif you.in_branch("Swamp") then
# Swamp and Zot's versions are more decrepit and crumbling, heavily reducing
# the cleaner splits and placement alongside either flooding or breaking doors.
KMONS:   1 = swamp worm
KMONS:   2 = bloated husk
KMONS:   3 = bog body
KMONS:   4 = ghoul
KMONS:   5 = ghost crab
KMONS:   6 = will-o-the-wisp
KMONS:   7 = tyrant leech
KMONS:   8 = death drake
KMONS:   9 = fenstrider witch
KFEAT:   13579 = W / w
KFEAT:   - = broken_door
NSUBST:  1 = 2:., 2 = 3:., 345 = 2:., 67 = 1:., 89 = 1:., defghij = 3:.
NSUBST:  . = 2:12 / 1:5 / 2 = 778 / 20:. / 3:t / * = WW.
NSUBST:  ' = 1:6 / 30:. / 3:t / * = WW..., " = 2 = 233 / 6:. / 1:t / * = W..
NSUBST:  C = 12:W / 3:t / *:c
SUBST:   x = t, X = tx, " = W"", ' = WW''', . = WW., G = Gww, % = .
: else   -- Zot
KMONS:   12 = shadow dragon
KMONS:   34 = tentacled monstrosity
KMONS:   56 = ghost moth
KMONS:   78 = curse toe
KMONS:   9 = protean progenitor
KFEAT:   + = broken_door
SUBST:   m = +, jk = .
NSUBST:  12 = 9:. / *:1, 34 = 2:3 / 2 = 13. / *:.
NSUBST:  56 = 3:. / *:5, 789 = 1:57 / 2:9 / *:.
NSUBST:  "' = 1:7 / 1:5 / 1:3 / 1:1 / 2 = 135. / 1:1357.. / *:.
NSUBST:  C = 10:. / *:c, dehi = 1:|. / 4:.
NSUBST:  V = 1:] / 1 = ):4 V:1 / 1 = }:4 V:1
:   dgn.delayed_decay(_G, "%", "ghost moth corpse")
: end
# In a fancy mansion, most loot is actually organized & categorized into rooms.
: if you.in_branch("D") or you.in_branch("Swamp") then
ITEM:    any potion, any scroll
: else
:   item(dgn.loot_potions)
:   item(dgn.loot_scrolls)
: end
ITEM:    any armour, any weapon, any ring, any amulet
ITEM:    any wand charges:1, wand of digging charges:1 ident:type
: kitem("| = randbook disc:necromancy disc2:alchemy numspells:5 " ..
:       "slevels:" .. you.absdepth())
KFEAT:   F = G
SUBST:   C = c, X = xx.
SHUFFLE: aAbB, Hhe / Idi, de, fg, hi, JKL
SUBST:   HJK = +, ILa = c, A : c', bB = '
NSUBST:  m = 1:m / *:c
TILE:    F = dngn_statue_maw / dngn_statue_tentacles
TILE:    G = dngn_statue_wraith / dngn_statue_princess
MAP
       xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
      xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
     xxxxxxxxxxxxxxxcccccccccccccccxx
    ccccccccccccccccccXXXXXXXXXXXXcxx
   ccccccccccccccccccc..2.7...9.|Xcxx
  cccc"""ddccg3g4g3gCc.X'X'''''8.Xcxx
  ccc"8..7dcg'''''''.c.'''X'''X'9Xcxx
  cc".....ccg'''''''.c.X'X'X$6''.Xcxx
  cc".....JJ''''V'''$m.''''$>$''.Xcxx
  cc".....JJ''''''''.c.X'X'X$X''.Xcxx
  ccc"7...cc''''''''.c.dfgX'''X'.Xcxx
  ccCc"...ccc+C+c+C+cccccciX'X'X.Xcxx
  ccccKKKccc"""""""""cccCch'''''1Xcxx
  ccc"'''''C"''''''''"""cceX'X'X.Xcxx
  ccc3'5G''C"'BB''''''V"cc.......xcxx
  cc"'G'''LC"'B.1....6'"ccccmccccccxx
 .cc"'''''L"'''2cJKLc.''"c..$.2Ccccxx
 1CccHHccCL"'''.cj''L.''"+'''''fccxxx
`.cccHHccC"'"aa.I'k'K.''"C'''''"ccxxx
`.Cc"...cC"'"a'.H''jJ.''"+'''''fccxxx
`1cc"...C"'"'''.cHIcc2''"c''V5'"ccxxx
`.Cc"F.IC"'"'b'.....1.A'"+'''''fccxxx
`.cc"..I"'"'bb''''b''AA'"C'''''"ccxxx
`GCc".CI"'"'''aa'bb'''''"+'''''fccxxx
`.cc".C"'"''''a''""''""""c'''ffcccxxx
`.CciCC"AA'''''""''""CCCcccLLcccccxxx
`FcciC"'A''''""''""JJJ''cccLLchhccxxx
`.CcCC"''''B"''""CCC''''c1.....hccxxx
`.ccC"'"''BB'""CCCcc''G'K......"ccxxx
`2Cc"'"'"''""HHH..cc''5'K......3ccxxx
`.cc"''"'""CCC....II'G''K......"ccxx
`.%+"'''"CCC...F..II''4"cc"..."cccx
`.%+""""CCee""""""cc""cccCc""4cccc
 ``c++ccccccccccccccccccccccccccc
 `G`%%cCcCcCcCcCcCcCcccccccccccc
 ```...2..F..G..1..1.
    ```````````````
ENDMAP

NAME:    regret_index_reflect_refract
TAGS:    no_monster_gen no_vmirror no_rotate
DEPTH:   D:12-, Depths
ORIENT:  northeast
: if you.in_branch("D") then
MONS:    centaur warrior, centaur warrior simulacrum
MONS:    basilisk, shapeshifter, basilisk perm_ench:shapeshifter
MONS:    death knight, tengu conjurer / rakshasa
: else
KMONS:   0 = rakshasa
MONS:    spriggan berserker, spriggan berserker simulacrum
MONS:    glass eye, glowing shapeshifter
MONS:    glass eye perm_ench:glowing_shapeshifter
MONS:    flayed ghost, storm dragon
: end
NSUBST:  ? = 1:3 / 2:4 / 1:5 / *:0, ! = 1:3 / 1:4 / 1:5
NSUBST:  6 = 1:. / *:6, 2 = 1:. / *:2, . = 2 = 09. / *:.
SHUFFLE: ABCD
SUBST:   A = b, B : b., CD = .,  X = xb.
MAP
 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbxx
xbbbb..........nnnnn..........bbbbxx
xbb||..n.n.......n.......n.n..**bbxx
xbb|....n.n.............n.n....*bbxx
xb.......n.n...!.X.!...n.n.......bxx
xb.6...9..n.n....6....n.n........bxx
xb...7.....n.n...X...n.n.........bxx
xb.7...6.C..n.n..!..n.n..C.......bxx
xb...........n.n...n.n........B..bxx
xbnnnnnn...C..n.n.n.n..C........nbxx
xbnnnnnnn...................B..2nbxx
xbnnnnnnbbbbbbbbbbbbbbbbbbb...6nnbxx
xbnnnnnnbbbbbbbbbbbbbbbbbbb....nnbxx
xbnnnnnnbb?.............?bb...1nnbxx
xbnnnnnnnbb......?......bb..B..2nbxx
xbnnnnnn..bb....%%%....bb.......nbxx
xb..2......b+...%%%...+b......B..bxx
xx.1........++.?...?.++..b.......bxx
xx2...A...b..+b.....b+....bb.....bxx
xx.......b.b..bb...bb...b...bb...bxx
xx......b.b....bb?bb..b..b....bb.bxx
xx..A..b.b.....nbbbn...b..b......bxx
xx....b.b..A..nnnnnnn..b...b.....bxx
x....b.b......nnnnnnn...b...b....bxx
@...b.b.......nnnnnnn...b....X...bxx
@...Xb..A....2nnnnnnn....b......bbxx
xx..........1.nnnnnnn.9..b.....0bbxx
 xx........2..nnnnnnn.........bbbbxx
  xx...xxxxxxbbbbbbbbbbbbbbbbbbbbbxx
   x@@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
ENDMAP

# An ancient Crypt end vault's snipped-out entry spiral.
# In Depths and Zot, it serves as either an ambush or stair vault.
NAME:    bobbens_index_wilting_gardens
TAGS:    no_monster_gen no_item_gen no_rotate transparent
ORIENT:  west
DEPTH:   D:7-, Swamp, !Swamp:$, Depths, !Depths:$, Zot, !Zot:$
WEIGHT:  5 (Swamp, Zot), 10
SHUFFLE: })], ABCDEFGHI
: if you.branch() == "D" then
:   if you.depth() < 9 then
MONS:    shadow imp / scorpion zombie w:5, centaur zombie
MONS:    wight, killer bee zombie, phantom, wraith
MONS:    black bear
KMONS:   8 = scorpion
KMONS:   9 = sleepcap
KMONS:   0 = water moccasin / hornet w:1
NSUBST:  7 = 2:1 / 2:7 / 3:8 / 3:9 / 1:0 / 3 = 123490 / *:.
:   elseif you.depth() < 12 then
MONS:    phantom / wight, meliai zombie, centaur warrior zombie
MONS:    vampire / wraith, necromancer / shadow, skeletal warrior
MONS:    wyvern / hornet
KMONS:   8 = centaur
KMONS:   9 = yak band
KMONS:   0 = killer bee band
SUBST:   5 = 4
NSUBST:  7 = 2:2 / 4:7 / 3:8 / 2 = 90 / 3 = 12348. / *:.
:   else
MONS:    vampire / skeletal warrior, gargoyle, harpy zombie, necromancer
MONS:    freezing wraith, vampire knight / phantasmal warrior
MONS:    harpy
KMONS:   8 = centaur warrior
KMONS:   9 = redback / wolf spider
KMONS:   0 = meliai band
NSUBST:  7 = 3:3 / 4:7 / 2:8 / 1:90. / 3 = 1248 / *:.
:   end
NSUBST:   A = 2:1 / 1:234, B = 2:2 / 1:134, C = 2:3 / 1:124
NSUBST:   D = 2:4 / 1:123, E = 1:3 / 1:4 / 1:9
NSUBST:   F = 1:5 / 1:8 / 1:9, G = 1:234 / 1:5 / 1:9, HI = *:.
SUBST:    })] = *%, ! = +, ? = c
: elseif you.branch() == "Swamp" then
MONS:     vampire mosquito, bog body, bloated husk
MONS:     will-o-the-wisp, ghost crab, ghoul
MONS:     spriggan rider / swamp worm / goliath frog
KMONS:    8 = hydra / swamp dragon / bunyip w:2
KMONS:    9 = spriggan druid / spriggan berserker w:2
KMONS:    0 = thorn hunter / shambling mangrove
KFEAT:    Pp = W
NSUBST:   A = 1:1 / 1:248 / 1:7, B = 2:2 / 1:347, C = 2:3 / 1:247
NSUBST:   D = 2:4 / 1:237, E = 1:2 / 1:4 / 1:8
NSUBST:   F = 1:5 / 1:8 / 1:9, G = 2:5 / 1:90, HI = *:w
NSUBST:   7 = 4:7 / 2:8 / 1:890 / 3 = 12348 / *:.
SUBST:    + = W, x = t, v = x
SUBST:    })] = **|, ! = +, ? = c, ` = W:40 ., . = .:60 W
: elseif you.branch() == "Depths" then
MONS:    jiangshi / phantasmal warrior / spriggan defender zombie
MONS:    spark wasp zombie, vampire knight, vampire mage
MONS:    flayed ghost, ancient lich / dread lich
MONS:    spriggan berserker
KMONS:   8 = spriggan defender
KMONS:   9 = sphinx
KMONS:   0 = spark wasp band
NSUBST:  7 = 4:7 / 2:8 / 1:9 / 1:0 / 3 = 123489 / *:.
NSUBST:  A = 1:15 / 2 = 234, B = 2:2 / 1:3479, C = 2:3 / 1:124
NSUBST:  D = 2:4 / 1:123, E = 2:5 / 1:34
NSUBST:  F = 1:2 / 1:8 / 1:9, G = 3 = 89, HI = *:.
SHUFFLE: })]!?'"X- / {([?!"'~~ / {([?!"'~~
SUBST:   ( = (:40 <, [ = [:40 <, ) = ):40 >, ] = ]:40 >, ~ = P
: else -- Zot
KMONS:   123 = shadow dragon
KMONS:   45 = death cob
KMONS:   6 = curse toe
KMONS:   78 = white draconian / black draconian / green draconian
KMONS:   9 = draconian stormcaller / draconian knight / draconian monk
KMONS:   0 = ghost moth
SUBST:   P = PP., p = P .:90
NSUBST:  1 = 2:1 / 2:4 / 1:0 / *:9
NSUBST:  7 = 1:46 / 4:7 / 2:9 / 1:0 / *:.
NSUBST:  ABCEDFGHI5 = 2:1 / 3:4 / 1:6 / 1:0 / 1:46 / 2 = 144790 / *:.
SHUFFLE: })]!?'"X- / })]!?'"X- / {([?!"'~~
SUBST:   * = <, ( = (:60 <, [ = [:60 <, ) = ):60 >, ] = ]:60 >, ~ = P
: end
# Theme loot includes Vp/Sp's best weapon apt & forested / dark scales / books.
KITEM:   & = quick blade good_item / rapier randart / \
             swamp dragon scales randart / shadow dragon scales randart / \
             randbook disc:necromancy / randbook spells:summon_forest / \
             potion of lignification q:4 ident:type
KMONS:   P = withered plant
KMONS:   p = fungus
SUBST:   p = p.., !- = +, ?X = c, " = .
NSUBST:  ' = 1:&| / 1:| / 2:* / * = %$
MAP
xxx         xx............  ...
xxxxx      xxxv...v.77.......7...
xxxxxxx  xxxxxv+++vvvvvvvvv..........  ....
xxxxxxxxxxxxxxcc```ccccPP7pPP..PppPp.....v...
xxxxxxxxxxxxxxxcc+++.`ccP.ppPp.p..p.....pv.....
xxxxxxxxxxxxxxcccc....Pc.Pp7.p...p.......pvvv7...
xxxxxxxxxxxxcccF...```ccccpp..pPPp.......pPvv++vv
xxxxxxxxxxccc.F..ccccccP`ccccvvvvvvvvvv..pppp.pPP
xxxxxxxxxcc..F.ccc```Pc`A```ccc%..+...v...p....pp
xxxxxxxccc`...cc.....`cA.A..``ccc.vvv.+.....p....
xxxxxxcc``..ccc..E.E.`c`..X...``ccc5+.vp....7.7.
xxxxxcc`....c.....E..`c`..cXcX..``ccv+vpp.......
xxxxcc`.............``c`..-.1cXc..`cc%vPp.p....
xxxxcP`````````.```PcccccPc....cc..BccvPp....7..
xxxcccccccccccc+ccccc"""ccc>.1.}cc.BBccPpp....V.
xxcc``....DD....Pcc"".6.""!!.....cc..`ccPpp.....p
xxcP......D...``cc........"cc).1.]cc..PcPPpp....
xxccccc+ccccccccc'....1..0."ccccccccc+cccccp..p
xxx*pcP.........??'........cc````````.```Pc.....
xxxPPcc`........ccc''...'.cc`.ccc.......`cc.p....
xxxpppcc`....ccccPccc'''ccc`..c5c.c+c..`cc......p
xxx7.ppcc`..cc......??ccc`1...c+c.c5c..`c..p....
xxx.p.ppcc`....C.....`c``.........ccc.`cc.....p.
xxxpp..ppcc``..CC.c..`c`ccc...4......`cc.......pp
xxx.7pp.p.ccc``...c..`c`c5c.c+c....`1cc...p...p.
xxxp.p.p.pppccc``.c..`c`c+c.c5c...`cccp.....ppp.
xxx.pp......p.cccPc`..+.....ccc.``ccp.....pppPP.
xxx.7...p.p.....ccccP`c`......``cccp...p.vvvvv..
  xx.p......p...p..cccc`..1.``ccc.p......v.....
   xxp..p...........pPc`.```ccc.....p..p.v7..v
       ......p.......pcP`cccc...pp......p....
           ...........ccccPp...pPPp7...p
             xxxxxx......ppp...pP.Pp...
                 ....  ........pPPp..
ENDMAP
