###############################################################################
# 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.
###############################################################################

{{

crawl_require('dlua/vault.lua')

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.kitem('& = hive talisman')
    e.kfeat(hivewallglyph .. ' = x')
    e.nsubst('% = %%%&')
    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 / steam dragon w:2')
        e.kmons('9 = elephant / cane toad / rime drake / komodo dragon w:6 / \
                     blink frog w:8 / manticore w:4 / hell rat w:4 / raven w:2')
        e.kmons('8 = death yak w:14 / hydra / skyshark w:4 / \
                     black mamba / lindwurm w:8 / torpor snail w:4 / \
                     boulder beetle w:2 / catoblepas w:2 / mountainshell 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
MONS:    goblin ; club / hobgoblin ; club / gnoll w:3 ; club | spear
MONS:    kobold ; stone
MONS:    kobold ; club w:18 / kobold brigand w:1 / gnoll w:3 ; club | spear
MONS:    goblin rider, kobold brigand
ITEM:    stone q:1 no_pickup
KITEM:   D = gold
KMONS:   D = hobgoblin / kobold / gnoll
KFEAT:   M = cache_of_meat
SHUFFLE: ABCD
SUBST:   ABC = 2, ? = 2 1:2 .:22
: if you.depth() > 5 then
NSUBST:  2 = 1:5 / *:2
: end
SHUFFLE: 125 / 346
SUBST:   1 = 1:12 ., 2 = 2:23 ., 3 = 3., 4 = 4:22 .
SUBST:   y : y:48 w:1 W:1, Y : Y:48 W:1 .:1, y = wWW, Y = WW.
NSUBST:  ' = 3 = MMMdd / *:d
MAP
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwxxxxxxxxxxxxxxxx
xxxxxxxwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwxxxxxxxxx
xxxxwwwwcccccwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwcccccwwwwxxxxxx
xxxwwwwwcAAAccccccccccccccccccccccccccccccccccccccccccccccccccccccDDDcwwwwwxxxxx
xxxwwwwwcAAAc1.....ccccc.....c??????'c1..1c'??????c.............1cDDDcwwwwwwxxxx
xxxwwwwwcAAAc.......ccc.2....+??????'c....c'??????+...........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....+??????'c....c'??????+...........2..cCCCcwwwwwwwwwx
xwwwwwwwcBBBc1.....ccccc.....c??????'c....c'??????c.............1cCCCcwwwwwwwwwx
xwwwwwwwcBBBccccccccccccccccccccccccccc++cccccccccccccccccccccccccCCCcwwwwwwwwwx
xwwwwwwwcccccwwwwwwwwwwwwwwwwwwwwwwwyY1..1Yywwwwwwwwwwwwwwwwwwwwwcccccwwwwwwwwwx
xwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwyY....Yywwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwx
xyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyY.11.Yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyx
xYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY1..1YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYx
x..............................................................................x
x..............................................................................x
ENDMAP

###############################################################################
# hidden cave vault with statue
#
NAME:    statuecave_lemuel
TAGS:    no_descent
ORIENT:  northeast
DEPTH:   D:7-, Lair, Crypt:1-4
: if you.in_branch("Crypt") then
MONS:    orange crystal statue
SUBST:   c = v
: else
MONS:    ice statue / obsidian statue / orange crystal statue
:   tile("c = " .. crackle_def(_G))
: end
SUBST:   *:*$, ?:x., '=w.
ITEM:    ring of flight pre_id
MAP
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxwwwxxxxxxxxxxx
xxxxxxxxxxxxxxxxxwwwwwwwcxxxxxxxx
xxxxxxxxxxxxxxxwwwwwwwwwwwxxxxxxx
xxxxxxxxxxxxxwwwwwwxxcwwwwwcxxxxx
xxxxxxxxxxxxwwwwwwxxxxxxwww.1xxxx
xxxxxxxxxxxwwwwxxxxxxxxxcwwW??xxx
xxxxxxxxxwwwwwxxxxxxxxxxxwwwW??xx
xxxxxxxxwwwwxxxxxxxxxxxxxxww|||xx
xxxxxxxxwwwxxxxxxxxxxxxxxxxw||dxx
xxxxxxxwwwxxxxxxxxxxxxxxxxxxxxcxx
xxxxxwwwwwxxxxxxxxxxxxxxxxxxxxxxx
xxxwwwwwwwwwxxxxxxxxxxxxxxxxxxxxx
wwwwwwwwwww''..................xx
.'wwwwwww''....................xx
..''wwww'..............    ....xx
.....'w............          ..xx
ENDMAP


###############################################################################
# Black bear nests (Eino)
# Old vaults placing black bears much earlier than they used to,
# before they got moved to much earlier depths.
NAME:   black_bear_nest_1
TAGS:   uniq_black_bear_nest
DEPTH:  D:4-8
ORIENT: northwest
WEIGHT: 5
MONS:   patrolling black bear
NSUBST: ' = 1:1 / *:.
MAP
xxxxxxxxxxxxxxx
xx''.xxxxxxxxxx
x''.......xxxxx
x''...xx....xxx
xx''xxxxxxx..xx
xxxxxxxxxxxxx.x
xxxxxxxxxxxxxx@
ENDMAP

NAME:   black_bear_nest_2
TAGS:   uniq_black_bear_nest
DEPTH:  D:4-8
ORIENT: southeast
WEIGHT: 5
MONS:   patrolling black bear
NSUBST: ' = 1:1 / *:.
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 pre_id / scroll of teleportation pre_id
SUBST:   ! : ?x
SHUFFLE: 1?/2W
SUBST:   2=2:20 1
SUBST:   ? : wl
SUBST:   * : $*|
MAP
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
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
: 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
:   vault_metal_statue_setup(_G, "G", "earthen conduit")
: 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
# Think of a giant eating fruit like we'd eat a handful of raisins,
# or like how a hippo can just eat an entire pumpkin, rind and all.
KFEAT:   F = cache_of_fruit / cache_of_meat
SHUFFLE: aA / bB / dD / eE
SUBST:   ; = .', aA = ., b : x., B : x., d : x., D : x., e : x., E : x.
SUBST:   F = Fxx, 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
xxxxXFXxxxxxxX***XXxxxxxxxxxxxxx.........7...c...444..cccc.........<cx
xx$$$$$$FxxxxX.6..XxxxxxxxxxAAAA..7..........+........+..+.........5cx
xF$$$$$$.XxxX.666.xxxxxxAAAAAxxx7....7.......c........cccc.........1cx
x.$$$$$$..Xx...6..AAAAAAAxxxxxxx............7ccccc+ccccccc.........5cx
x....<.....+X....xxxxxxxxx$$$..cccc+cccccccccccccc.c(((((+..........cx
xX........Xxxxx.xxxxxxxF<+$$$..+.......+...........c(((((c.......***cx
xx........Xxx...xxxxxxxxxxx-xxxc..4.4..ccccccccccccccccccc444....***cx
xxxxX...Xxxxx.xxxxxxxxxxxxx5xxxc...4...cxxx5xxxxxxxxxxxxxxxxxxxxx+xxxx
xxxxxx-xxxxxx.xxxxxxxbbb;''''''c..4.4..c'''''';ddddddddddxxxxxxxF||xxx
xxx....xxxxx..xaaaaabbb0;''''''c.......c'''''';0eeeeddddddXXXXxxx||Fxx
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
TILE:   c = wall_stone_magic_shelf
MAP
xxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxx
xx..3..............|x1...
xx.b..b..b..b3.b...|x....
xx.....3.........3.|x..x.
xx+xxxxxxx+xxxxxxxxxx....
xx..................x....
xx......1...........x..x.
xx..xxxc....cxxxxx1.x1...
xx.1x*.....1..2.*x..x....
xx..x*.2.1......*x..x..x.
xx..xxxxxc...1cxxx..x....
xx..................x....
xx1................1x..x.
xxxxxxxx..xxxxxx..xxx....
xx1................1x1...
xx.......1....11....x..x.
xx..cxxxxx....xxxc..x....
xx..1.2.*x....x*....x....
xx.1....*x....x*.2..x..x.
xxxxxxxxxxx++xxxxxxxx....
xx1......11..11.....1....
xx.......................
xx..x..x..x..x..x..x.....
xx.......................
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
WEIGHT: 5 (Depths), 10
MONS:   laughing skull, draugr
MONS:   skeletal warrior band / bone dragon w:1 / \
        lich w:1 / curse skull w:1 / ancient champion w:1
SUBST:  1 = 11..., 2 = 222.., G : GGccV.
: vault_metal_statue_setup(_G, "S", "soul conduit")
MAP
cccccccccccccccccccccccccccccccc
c....2....%||c...+....111c|%...c
c+c.2.3...cccc...c.....21cc%.3.c
c.cc...2.2.ccc...c......1ccc...c
c..cc...2...cc...c...S...+2cc..c
c...cc.2...2.c...c......cc2ccc.c
c....cc...2..c...c1....cc2...+.c
c..3..cc.2...+...c12..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
KMONS:  01 = spriggan w:50 / spriggan druid / spriggan berserker / spriggan rider
KMONS:  9 = spriggan defender
KMONS:  8 = alderking
KMONS:  P = plant
KMONS:  B = bush
KITEM:  % = %
KFEAT:  % = cache_of_fruit
SUBST:  B : PBt p:1, p = PBt, c : xc, 9 = 999", 8 = 88', % : %$
FTILE:  PBt+ = floor_moss
FTILE:  '18$%* = floor_sprouting_stone
FTILE:  "9$%* = floor_sprouting_squares
MAP
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xccccccccccccccccccccccccccccxx
xcBBBBBBBBBBBBBBBBBBBBBBBBBBcB.
xcB8''''''''''''''''''''''8BcB0
xcB''''''''''''''''''''''''BcB.
xcB''BBB''''''''1'''''BBB''BcB.
xcB1'BcB''1'''''''''''BcB''BcB.
xcB''BBB''''''''''1'''BBB''BcB.
xcB'''''''''''1''''''''''''BcB.
xcB'''''''''1'''1''''''''''BcB.
xcB'''''''BBt''''tBB'''''''BcB.
xcB'''''''Bccc++cccB'''''''BcB.
xcB'''''''BcB""""BcB''1''''BcB.
xcB'''''''BcB""""BcB'''''''BcB.
xcB''''1''BcB9**9BcB'''''''BcB0
xcB'''''''BcB****BcB'''''''BcB.
xcB'''''''BcB%**%BcB'''''''BcB.
xcB'''''''BcBBBBBBcB''''1''BcB.
xcB''1''''BccccccccB'''''''BcB.
xcB'''''''BBBBBBBBBB'''''''BcB.
xcB''''''''''''''''''''''''BcB.
xcB''''''''''''''''''''''''BcB.
xcB''BBB''''''''1'''''BBB''BcB.
xcB''BcB''1'''''''''''BcB''BcB.
xcB''BBB''''''''''''''BBB''BcB.
xcB''''''''''''''''''''''''BcB.
xcB1''''''''''''''''''''''1BcB.
xcBBBBBBBBBBt''''tBBBBBBBBBBcB.
xccccccccccccc++cccccccccccccB.
xxBBBBBBBBBBt....tBBBBBBBBBBBB0
xx.0........0.0..0.............
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
TAGS:   no_rotate
ORIENT: southwest
DEPTH:  D:12-, !D:$, Orc
MONS:   orc warlord, patrolling orc priest, patrolling orc high priest
MONS:   orc warrior, orc wizard, orc knight, orc sorcerer
ITEM:   battleaxe good_item no_pickup / plate armour good_item no_pickup / \
        kite shield good_item no_pickup / manual of invocations / \
        $ q:50 no_pickup w:30
KFEAT:  C = altar_beogh
KFEAT:  e = cache_of_fruit / cache_of_meat / cache_of_baked_goods
SUBST:  e : e$
: decorative_floor(_G, 'F', "orcish standard")
MAP
xxxxxxxxxxxxxxxx@xxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxx.xxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxF.Fxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxx4.4xxxxxxxxxxxxxxx
xxe*..........x414x..........*exx
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.......d.......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 vaults_hard vaults_orient_w allow_dup
ORIENT: float
DEPTH:  D:11-, !D:$, Vaults, !Vaults:$
WEIGHT: 20 (Vaults), 10
: if you.in_branch("Vaults") then
TAGS:   no_monster_gen
MONS:   vault guard / centaur warrior w:4 / dire elephant w:2 / arcanist w:2
MONS:   yaktaur, yaktaur captain
MONS:   vault sentinel ; arbalest . halberd . ring mail
MONS:   vault warden ; arbalest | hand cannon w:4 . glaive . scale mail
SUBST:  @ = ., * = **%, | = ||*
CLEAR:  x
:   vaults_hard_standard(_G)
: else
MONS:   gnoll, yak, death yak, yaktaur, minotaur
SUBST:  d : d.
: end
KFEAT:  d = cache_of_fruit / cache_of_baked_goods w:4
MAP
.........@....wwwwwwwwwwwwwwwwwxx
.ccccc.......ww....wwwwwwwwwwwwxx
.c$c%c......ww.cccccccccwwwwwwwxx
.c+c+c......ww.cd%$....ccccccccxx
.c...+......ww.c*.542..c$$+|*|cxx
.c4..c.....ww..cd..22+ccc+cxx+cxx
.ccccc.....ww..ccccccc....c|+*cxx
............ww.......c2...cxx+cxx
....1.ccccc.ww.w...3.+24..c|5.cxx
....14+...c..wwww..34+24..c3.3cxx
....1.ccccc..wwwwww..c2...cc+ccxx
............wwwwwww..c........cxx
............wwwwwww..ccccccccccxx
...........ww4w..www...........xx
.......211.www.....www.........xx
........4www....ccccc..........xx
.....211.w......+..<c..........xx
.........www....ccccc.........wxx
...........ww............wwwww.xx
.......4....wwwww......www....wxx
......111.......ww...www.......xx
.....cc+cc.......wwwww.........xx
.....c...c.....................xx
.....ccccc.....................xx
...............................xx
...............................xx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
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 pre_id / potion of enlightenment pre_id / nothing
ITEM:    potion of enlightenment pre_id / 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 pre_id / potion of enlightenment pre_id / nothing
ITEM:    potion of enlightenment pre_id, 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 Dragons (by Mu.)
#
NAME:   gold_lair_mu
ORIENT: southeast
TAGS:   no_monster_gen no_descent
DEPTH:  Depths, !Depths:$
MONS:   golden dragon, any draconian
MONS:   rime drake / swamp drake / lindwurm
KMONS:  D = wind drake w:5 / death drake / lindwurm w:5 / wyrmhole w:5
KMONS:  f = fungus
KMONS:  p = plant
KITEM:  D = $
KFEAT:  D = >
SUBST:  $ = $|
SUBST:  f : AB, A = f:30 .:90, B = p:30 .:120
SUBST:  m = W:20 w:10
TILE:   G = dngn_statue_depths_zot_dragon
MAP
        ...........ffffmmmmmmmxxx
       ..........ffmmmwwwwwwwmxxx
      .........ffmmwwwwwwwwwxxxxx
     ..3....ffffmmwwwwwxxxxxxxxxx
    ..9...ffffmmwwwwwxxxxxxxxxxxx
   ..9..ffffmmwwwwwwxxxxxxxxxxxxx
  ..3..fffmmwwwwwwwxxxxx.2x.2xxxx
 .....fffmwwwwwwwwxxx........xxxx
......ffmwwwwwwwwxxx.....xx...xxx
.....fffmwwwwwwxxxxx...xxxxx..xxx
.....ffmwwwwwwxxxxxx..xxxxxxx..xx
....fffmwwwwwxxxx.....xxxGxxxx.xx
....ffmwwwwwxxxx..3..xx....xx..xx
...fffmwwwwxxxxx..xxxx...3....cxx
...ffmwwwwwxxxx..xxxxx..xxxx2xxxx
..fffmwwwwxxxx...xxxx...ccccccccx
.fffmwwwwwxxx....xxx..ccccccccccx
..ffmwwwwxxxx..x..xx.cccc.3..cccx
.fffmwwwxxxxx..xx..xc.c.......Gcx
.fffmwwwxxxx..xxx..ccc....lllllcx
..ffmwwxxxx..xxxx.xcc....llllllcx
.fffwwxxxx..xxxxx.ccc...llll$$Dcx
.fffwwxxx..x..2xx.cc...llll$$$$cx
..ffwwxxx....xxx..cc3.llll$$$$$cx
.ffffwxxxx..xxx2.xcc..lll$$$$$$cx
..8ffwwxxx...xx>xxcc..ll$$$$$$1cx
.3.fffwwxxx..xxxxxccc.ll$$$$$$ccx
....fffmwwwxxxxxxxcccGllD$$$1cccx
.....fffmmwwwwwwwwccccccccccccccx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
ENDMAP

##############################################################################
# Gold mine. Can come up in the dungeon and in Orc.
#
NAME:   minmay_goldmine
ORIENT: southeast
DEPTH:  D:8-12, Orc
MONS:   orc / orc wizard w:3 / orc priest w:2 / orc warrior w:2
MONS:   two-headed ogre / troll / cyclops / wraith / shadowghast
MONS:   deep troll w:5 / obsidian bat
: if you.in_branch("Orc") then
NSUBST: $ = 1:3 / *:$, 1 = 1:2 / 2:$ / *:1, . = 2:$ / *:.
: end
SUBST:  X = x:60 . $
MAP
xxxxxxxx    xxxxxx    xxx
xXxXXXxxx  xxxxxxxx  xxxx
.XXX1XXXxxxxxXXXXxxxxxxxx
@..XX..XxxxxXX..Xxxxxxxxx
x.X..X1XxxxxX.XXXxxxxxxxx
xXXXX.XXxxxxX.X1XxXXXXxxx
xXX1.X.XXxxxXX.XXxX$XXxxx
xX.XXX..XXxXX1XXxxXX1Xxxx
xX.XX.XX1XXX...XXXX.2XXxx
xXXXX.XxX..X.XX.XX.XX1Xxx
xxXX1XXxX.X1XXXX.1XXX$Xxx
xxX.XXxxXXXXXxxXXXXX$XXxx
xxXXXxxxxxxxxxxxxxxXXXxxx
xxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxx
ENDMAP

NAME:   minmay_twisted_water
DEPTH:  D:9-
ORIENT: north
TAGS:   no_descent
MONS:   ice statue, patrolling ice dragon, patrolling frost giant
KITEM:  ? = wellspring talisman
SUBST:  W = wW
NSUBST: * = 1:?* / *:*
KMONS:  w = w:490 nothing / ice beast
KFEAT:  w = w
KPROP:  wW-*|?123 = no_tele_into
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
TAGS:   no_rotate no_monster_gen no_item_gen
ORIENT: southwest
DEPTH:  Depths, !Depths:$
MONS:   flayed ghost w:5 / phantasmal warrior w:5 / shadow wraith / eidolon
MONS:   ghost moth, vampire knight, vampire mosquito
KMONS:  J = Jory, vampire bloodprince
ITEM:   sanguine talisman randart
NSUBST: A = 3:v / *:+, B = 3:v / *:+
NSUBST: C = 2:v / *:+, D = 2:v / *:+
TILE:   G = dngn_statue_depths_fangs
COLOUR: 5'% = white
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" \
            }
SUBST:  'V = .
: decorative_floor(_G, 'M', "broken floral vase")
TILE:   M = dngn_dark_flower_pot_broken
TILE:   v = dngn_metal_wall_red
:       vault_metal_statue_setup(_G, "g", "mystic cage")
:       dgn.delayed_decay(_G, '%', 'human corpse / human skeleton')
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
xxxvM......vv.vv+++++vv.vv......Mvxxxxxxxxxxxxxxxxxxx
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.3.vvvvvvvvv.3.D1+.+1A.vxxxxxxxxxxxxxxxxxx
xxv.vvv.vvv..|vv*|d|*vv|..vvv.vvv.vxxxxxxxxxxxxxxxxxx
xxv.B1+.+1Cvvvvvv.|.vvvvvvD1+.+1A.vxxxxxxxxxxxxxxxxxx
xxv.vvvvvvvvv.V.vv+vv.V.vvvvvvvvv.vxxxxxxxxxxxxxxxxxx
xxv.........+.1.v3.3v.1.+.........vxxxxxxxxxxxxxxxxxx
xxvvvvvvvvvvv...v.J.v...vvvvvvvvvvvxxxxxxxxxxxxxxxxxx
xxxvvvvvvvvvvv+vv...vv+vvvvgvvvvvvvxxxxxxxxxxxxxxxxxx
xxvvM..M..Mvvv.vv.Y.vv.v...v...vvvvxxxxxxxxxxxxxxxxxx
xxv444%%%M.Mvv.vv...vv.+.2.".2.+..vxxxxxxxxxxxxxxxxxx
xxv444%g%.M.+..vv+++vvvv...v...vv.vxxxxxxxxxxxxxxxxxx
xxv444%%%M.Mvvvv.....vvvvvvvvvvvv.vxxxxxxxxxxxxxxxxxx
xxvvM..M..Mv+.+..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 pre_id
: item(dgn.randart_aux_armour)
MONS:   human att:neutral, silent spectre, patrolling soul eater
MONS:   deep elf pyromancer / deep elf zephyrmancer / occultist / \
        necromancer / merfolk aquamancer /  spriggan air mage / \
        orc sorcerer / kobold demonologist / kobold fleshcrafter
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:  .Ymavp+*|p1234567d$' = floor_infernal_blank
: decorative_floor(_G, 'm', "bloodied mop and bucket")
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
          xvm......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 / chonchon w:5 / \
        vampire mage / deep troll earth mage / kobold fleshcrafter w:5
MONS:   tengu reaver / deep elf annihilator / deep elf sorcerer / \
        deep elf demonologist / lich
MONS:   ancient lich / dread lich
: end
KFEAT:  g = cache_of_baked_goods
KFEAT:  _ = altar_sif_muna
KFEAT:  D = U
KFEAT:  yz = c
SUBST:  U = U:4 V:1 T:1
COLOUR: c" = lightblue
TILE:   c = dngn_stone_wall_blue
TILE:   y = wall_stone_magic_shelf
: tile("z = " .. crackle_def(_G))
FTILE:  .+def123TUVbc|* = floor_crystal_squares
FTILE:  "_ = floor_marble
MAP
                xxxxxxxxxxxxxxxxxxxxxxxxx
                xcccccccccccccccccccccccc
                xccczccccwwwwwwcccczccccc
                xzcccU............Ucccccc
                xcwwc..b..b..b..b..cccccc
                xc|*+..b..b..b..b..cccccc
                xy||c..2..1..1..1..yccccc
                xc|*+..b..b..b..b..cccccc
  xxxxxxxxxxxxxxxcwwc..b..b..b..b..cccccc
  xcccccccccccccczcccU............Ucccccc
  xccccccccccccccccczcccccc++cccccczccccc
  xcccczcccccccccczcccccccw..wccccccccccc
  xcccccf...cc...fccccccccw..wccccccccccc
  xccccy.bb.cc.bb.yczcccccc++ccczczcccccz
  xccccc..1.cc.1..cccwwwwwwWWwwwcccwwwwwc
  xcccccccc+cc+ccccccwbb..1..bbwcccddgeec
''cccc..............cwb...U...bwccccc+ccc
'Dc.1c..bbbb..bbbb1.cw..U"""U..wccy.....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..wccy.....c
''cccc..............cwb...U...bwccccc+ccc
  xcccccccc+cc+ccccccwbb..1..bbwccceegddc
  xccccc..c....c..cccwwwwwwwwwwwcccwwwwwc
  xccccyU.+1bb1+.Uyczccccccccccczczcccccz
  xcccccf.c....c.fccccccccccccccccccccccc
  xcccczcccccccccczcccccccccccccccccccccc
  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
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
MONS:   salamander mystic / thermic dynamo w:5
KMONS:  5 = nikola / jorgrun, deep elf annihilator
SUBST:  1 = 2GG, 4 = 4.
TILE:   G = dngn_statue_cat / dngn_statue_dragon / dngn_statue_tengu / \
            dngn_statue_princess / dngn_statue_triangle
: 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
TILE:   G = dngn_statue_depths_zot_lich / dngn_statue_depths_zot_dragon / \
            dngn_statue_depths_tengu w:15 / dngn_statue_depths_tomes w:15 / \
            dngn_statue_depths_asmodeus
: end
KFEAT:  _ = altar_vehumet
KFEAT:  a = c
NSUBST: D = 4=2 / 2=2*. / | / A
NSUBST: E = 1:1 / *:G, F = 1:1 / *:G, G = 2:S / *: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
FTILE:  a'4! = floor_pebble_red
FTILE:  GS1 = floor_vault
TILE:   a = dngn_stone_wall_red
: vault_metal_statue_setup(_G, "S", "arcane conduit")
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 / draugr place:D:10 / 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 / simulacrum / spectral thing
MONS:   necromancer w:8 / deep elf death mage / vampire mage / alderking w:2
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
NSUBST: G = 2 = G. / *:.
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
: vault_metal_statue_setup(_G, "G", "soul conduit")
MAP
xxxx......@@@......xxxxxxxxxxxxxxxxxxxxxxxxxx
xccc......1.1......cccccccccccccccccccccccccx
xccc..a..1c+c1..a..c*%c...3...ccccccccccccccx
xccc.....cc.cc.....q*%+...V...+..cc.ccccccccx
xccc..a.2c...c2.a..c*%c...G...cc....ccc1.1ccx
xccc.....c...c.....cccc.......cc.aa.ccc.c.ccx
xcccqccccc...ccccccccccccc+ccccc.pp.ccc.c.ccx
xca%%ac.........ca%%ac....3....c....ccc.c.ccx
xc1..Dc.pa...ap.cD..1c.a.ccc.a.c3pp3cc....ccx
xca..ac.aa...aa.ca..ac.a.ccc.a.c.aa.cc.c.cccx
xcD...+....G....+...Dq..2...2..q.4..cc.c.cccx
xca..ac.aa...aa.ca..accccc.ccccc.cc..+.c.cccx
xc1..Dc.pa...ap.cD..1qDDDc.cDDDccccccccc+cccx
xca$$ac...3_4...ca$$acD|Dc.cD|Dccccccc.....cx
xcccqccccc...cccccccccD2Dc+cD2Dccccccc$4.4$cx
xcc|*2ccccc+ccccccccccc+cc.cc+ccDDDccc$%5%$cx
xcc$$.+..........D.1.D.........+2|Dccc*****cx
xcc2..c....G......D.12D...G....cDDDccc|||||cx
xcccccccccccccccccccccccccccccccccccccccccccx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
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 was 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, "tengu conjurer", 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, "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, "spark wasp", peak(depth, 23, 31, 25))
    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, "tengu reaver", flat(depth, 26, 33, 12))
    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, "thermic dynamo", peak(depth, 28, 31, 25))
    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
TAGS:   no_monster_gen
ORIENT: north
DEPTH:  Depths:2-
MONS:   common demon, hell knight
MONS:   shadow demon / green death / blizzard demon / balrug / cacodemon / \
        sin beast / hellion w:8 / reaper / tormentor w:8
SUBST:  b : bv
NSUBST: . = 7:1 / 7:2 / *:.
FTILE:  .|#+G123 = floor_pebble_darkgray
KPROP:  1Y = no_tele_into
KFEAT:  # = iron_grate
TILE:   b = bedevilled_crystal_dis
: set_feature_name("crystal_wall", "bedevilled crystal wall")
MAP
xxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxvvvvvvvvxxxxxx
xxxvvvvvvvvvxxv||v.3.vxxxxxx
xxxv1v1v1v1vxxv||+.3.vxxxxxx
xvvv#v#b#v#vvvvvvv...vxxxxxx
xv*+.........llllv...vvvvvvv
xvvb#v#b#v#vl..l.+...+.....v
xxxv1v1v1v1vl....vvvvv.GlG.v
xxx1vvvvvvvvv.l.........lYl.v
xxxv1v1v1v1v.ll........GlG.v
xvvv#v#b#v#v.lll.v+++v.....v
xv*+..........l..v   vvvvvvv
xvvv#v#b#v#vvvvvvv
xxxv1v1v1v1v
xxxvvvvvvvvv
ENDMAP

NAME:   kennysheep_seaside_town
TAGS:   no_monster_gen transparent
ORIENT: northeast
DEPTH:  D:7-, !D:$
PLACE:  D:$
WEIGHT: 2 (D:$), 10
KFEAT:  W = open_sea
: if you.depth() < 12 then
MONS:   ogre, orc warrior, kobold geomancer, centaur, kobold brigand
KMONS:  8 = orc warrior band
KMONS:  9 = gnoll bouda band
SUBST:  GU = H
: elseif you.where() ~= dgn.level_name(dgn.br_entrance("Depths")) then
MONS:   two-headed ogre / tengu warrior w:5, orc knight, yaktaur
MONS:   arcanist / tengu conjurer, kobold demonologist / ogre mage
KMONS:  8 = orc knight band / orc high priest band w:4
KMONS:  9 = centaur warrior band / boggart band w:2
SUBST:  GU = H
: else
MONS:   deep troll, tengu warrior / tengu conjurer
MONS:   shapeshifter, occultist, hell knight / necromancer
KMONS:  8U = rakshasa band / glowing shapeshifter
KMONS:  9 = ettin / flayed ghost / phantasmal warrior w:2
KITEM:  G = smoky gem
KFEAT:  U = enter_depths
TILE:   c = stone_wall_depths_entry
FTILE:  GU = floor_depthstone
: end
KMONS:  p = plant
KMONS:  P = fungus
KFEAT:  C = cache_of_fruit / cache_of_meat / cache_of_baked_goods
KFEAT:  ~ = w
NSUBST: H = 3:* / 7:1 / 3 = CC""" / *:"
NSUBST: . = 2:9 / 5:p / *:., q = 3:1 / 6:P / *:"
SUBST:  p = p..., 1 = 12345
KMASK:  ~ = no_pool_fixup
COLOUR: '.89p = brown
FTILE:  ' = floor_sand
FTILE:  .pt89 = floor_dirt
FTILE:  "C*F+12345P = floor_pebble_darkgray
: single_cloud(_G, "F", "flame", false)
MAP
xxxxWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW
xxxx~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~W
xxxxwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww~W
xxxxwwwwwwwwww'wwwwwww''wwwww'wwwww~W
xxxxwww'wwwww'''w''''ww''''''''wwww~W
xxxxwwww'''''..'''.''''''..''''wwww~W
xxxxwwww'...cccc...cccc.......''www~W
xxxxwwww''..cHHc...cHHc........'www~W
xxxxw''''...cHHc...cHH+...cccc.''ww~W
xxxx''cccc..cc+c...cccc...cHHc..'ww~W
xxxx..cHHc................+HHc..''w~W
xxxx..cHH+................cccc...'w~W
xxxx..cccc.......ccccc...........'w~W
xxxx.......8..ccccHHHc..........''w~W
xxxxtp.p.pt..tc>zcHHH+..........'ww~W
xxxxt.p.p.ptxxczz+HHH+..........'ww~W
xxxxtpppptxxx---ccccccxxxppp....'ww~W
xxxxttptpxx----xxxxxxxxxppppppp.''w~W
xcccc+tptx---xxxxxqxxxx.pptptppp''w~W
xcHHGctttx--xxxxxxxqqqqqxtptptpcmcw~W
xcHHHcxxxx-xxxxxxxqxxxxxxxttttccHcc~W
xcUHHcx-----xxxxxxqxqxxxxxptppmHFHmwW
xccccc---x-xxxxxxqqxqqqqxxtpptc+HccwW
xxxxx--xxxxxxxxxxqxqqxxqxxpppppcmcwwW
xxxxxx--xxxxxxxxxxxxqxxqqqxxxxxxwwwwW
xxxxxxx@@xxxxxxxxxxxxxxxxxx    xxxxxx
ENDMAP

NAME:   kennysheep_kobold_camp
TAGS:   no_monster_gen no_trap_gen
ORIENT: north
DEPTH:  D:4-9
MONS:   kobold brigand, kobold geomancer, kobold
KMONS:  p = plant
KFEAT:  M = cache_of_meat
NSUBST: . = 13:3 / 3 = 3. / *:., ' = 5:C / 2 = M.. / 5:3 / *:.
: if you.depth() > 6 then
NSUBST: 3 = 2:2 / *:3
: end
SUBST:  P = tp`
: single_cloud(_G, "F", "flame", false)
: dgn.delayed_decay(_G, 'C', 'human corpse')
MAP
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxttttttttxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxtttttttttttttxxxxxxxxx
       xxxxttPPPPtPPPPPPPPPtttttxx
       xxttttP..PPP*t..*P.PPPPttxx
     xxxtttttPP.PP.''1'......Ptttxxx
    xxttttPPPP....''''''.....PPPPttxxx
   xxtttttP.......''FF'''.......PtttPx
  xxttttttPP.....'''FF'''.....PPPtttP@
xxxttxxxxttPP.....''''''.....PPttxxxxx
xPttxx  xxtPP......''''.....PPtxxx
@Pxxx    xtP.PPP.........PPPPtxx
xxx      xxxPPtPPPP.....PPttttx
           xttttPP.PPP.PPttxxxx
           xxxxxx.PPxP.PPxxx
                xPPxxPP.PPxx
                xtttxxPP.PPxx
                xxttxxxPP.PPx
                 xtttxxxPP.Pxx
                 xxttxxxxP.PPx
                  xxxttxxPP.Pxx
                    xPPxxxxP.Px
                     @@    @@@
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
KFEAT:  F = cache_of_fruit / cache_of_meat
SUBST:  F : F.
NSUBST: . = 1:0 / 3:3 / *:.
MAP
xxxxxxxxxxxxxxxxxxx
x...+....B.Fx%%*xww
x...+......O+%%%xww
x...x....B.Fxxxxxww
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:12-14
WEIGHT:  5
TILE:    c = dngn_stone_dark
SUBST:   *=*|
MONS:    ice devil / hellwing w:20 / rust devil / red devil
MONS:    lesser demon, hell rat / hell hound
KFEAT:   yYzZ = b
SHUFFLE: pqrs
SUBST:   pq = c, r : c., s = ., b : b..
NSUBST:  b = 1:y / 1:Y / 1:z / 1:Z
NSUBST:  . = 6:3 / 6:! / 56:' / .
KPROP:   !' = bloody
: dgn.delayed_decay(_G, '!', 'human corpse / human skeleton')
FTILE:   *|c.12${} = floor_infernal_blank
TILE:    y = bedevilled_crystal_gehenna
TILE:    Y = bedevilled_crystal_cocytus
TILE:    z = bedevilled_crystal_tartarus
TILE:    Z = bedevilled_crystal_dis
: set_feature_name("crystal_wall", "bedevilled crystal wall")
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..b........b..cc
ccccccccccc................ccccccccccc
c.................r..............2...c
c...2...........q....................c
c...................s................c
c$*1.....2.....p..{.........2....2.*$c
c$*.2..............}..p...........1*$c
c................s...................c
c....................q...........2...c
c...2..............r.................c
ccccccccccc................ccccccccccc
          cc..b........b..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
TAGS:    no_monster_gen
ORIENT:  north
DEPTH:   D:6-9
MONS:    kobold / gnoll / hobgoblin / hound w:5
MONS:    kobold brigand / kobold geomancer w:5 / ogre / gnoll sergeant
MONS:    orc priest / orc wizard / gnoll bouda / centaur
KFEAT:   F = cache_of_fruit
KFEAT:   f = cache_of_meat
NSUBST:  . = 4:2 / 20:1 / 5:3 / 8:% / 2:* / 10:$ / *:.
SHUFFLE: Ff / fF / -- / -- / --
FTILE:   'pt = floor_grass_dark
KMONS:   p = plant
SUBST:   !'- = .
MAP
xxxxccccccccccccccccccccccccccccxxxxx
''''m.......+..............+...m'''''
''''m.......+..............+...m'''''
'pptc.......cccc++cccccccc+c...cppt''
'tptc.......c..........c...c...ctpp''
ppptc.......c..........c...c..Fctpt''
'pttc.......c..........c.>.ccccctpp''
'pptc.......c..........c...cptttpt'''
'pttc......fccccmmcccccc+++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
TAGS:   no_item_gen no_monster_gen no_pool_fixup
DEPTH:  D:12-
ORIENT: north
MONS:   glowing orange brain, small abomination, glass eye, demonic crawler
ITEM:   randbook
KFEAT:  T = fountain_eyes
NSUBST: ' = 2:4 / *:.
NSUBST: " = 4:0 / 1:9 / *:., ? = 1:9 / *:0
SUBST:  G = Gbx
TILE:   b = bedevilled_crystal_abyss
: vault_metal_statue_setup(_G, "G", "dimensional conduit")
: set_feature_name("crystal_wall", "bedevilled crystal wall")
MAP
      xxxxxxxxxxxxxxxxxxxxxxx
     xxxxxxxxxxxxxxxxxxxxxxxxx
    xxxwwwwwxxxxxxxxx......xxxx
  xxxxwxxxxx...Gxxx...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"""T.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
TAGS:    no_monster_gen no_pool_fixup
DEPTH:   D:12-, !D:$
ORIENT:  northwest
MONS:    kobold blastminer, kobold brigand, patrolling kobold demonologist
MONS:    kobold / kobold geomancer w:1, plant
MONS:    crimson imp ; sling / white imp / iron imp ; sling, obsidian statue
KMONS:   g = bush
KFEAT:   M = cache_of_meat
SHUFFLE: !'
NSUBST:  ! = 3:C / 4:- / 2:6 / *:., ' = 2:C / 3 = M.. / *:.
NSUBST:  . = 10:4 / 4:6
SUBST:   .z = .:220 5:25
: 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)
: decorative_floor(_G, 'f', "flower patch")
MAP
      .@.xx.@.......@.xx.@.
      ...xx.X...f...X.xx...
    ...X.xx...xx.xx...xx.X...
    .X...xxxxx..x..xxxxx...X.
  .....xxxx...........xxxx.....
  .X.f.xxxxxx'.X.X.'xxxxxx.f.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..
@fx...."C'a"A~'131'~A"a'C"....xf@
..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.f.xxxxxx'.X.X.'xxxxxx.f.X.
  .....xxxx...........xxxx.....
    .X...xxxxx..x..xxxxx...X.
    ...X.xx...xx.xx...xx.X...
      ...xx.X...f...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 / oblivion 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 pre_id 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
MONS:   frost giant, blizzard demon, lich
KMONS:  I = ice statue
KMONS:  " = ancient lich / dread lich
KMONS:  B = blizzard demon
KMONS:  C = lich
KITEM:  "BC = %
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=%.
NSUBST: T = 2:GGT / *:T
KPROP:  34T =  no_tele_into
KMASK:  ' = !opaque
: vault_metal_statue_setup(_G, "G", "icy conduit")
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 pre_id"
local ego = " ego:freezing pre_id"
item("any weapon good_item w:100" .. ego .. " / cloak" .. coldres ..
     " / scarf ego:resistance pre_id / 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 pre_id" ..
     " / ring of protection from cold pre_id" ..
     " / wand of iceblast pre_id / 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")
: single_cloud(_G, "!", "flame", false)
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
MONS:   apis
MONS:   necromancer band / death knight band
KMONS:  H = merfolk ; trident ego:holy_wrath . buckler . robe
NSUBST: 1 = 1:1 / *:H
SUBST:  3 = .
FTILE:  -O : floor_limestone / floor_w_marble
COLOUR: - : white
: 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
SUBST:  3 = .
: else
# Depths
:    if crawl.coinflip() then
# Holy defenders
TILE:   G = dngn_statue_depths_zot_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_depths_zot_devil / dngn_statue_depths_zot_lich
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, minored in blood, got top marks.
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 = kobold fleshcrafter / tengu reaver
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", % = %:60 z:20 " m, - = ++-, ^ = .
KPROP:   "yz = bloody
KPROP:   DEFH` = no_tele_into
COLOUR:  v = lightred
TILE:    v = dngn_metal_wall_brown
TILE:    y = wall_studio
FTILE:   @.'"mvVYM+-defhDEFH0123456789%zn' = floor_infernal_blank
:        decorative_floor(_G, 'm', "bloodied mop and bucket")
:        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
KFEAT:   C = cache_of_fruit
SHUFFLE: op, qr
SUBST:   o = w, p = t, q : tw., r = .
SUBST:   ^ = ^TTTTT, T = wtxF, P = ~~ttttFFFF, C : C..
: 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 .. " / shadowghast 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$%*{([})]^wtxTC : floor_pebble_darkbrown / floor_moss
: elseif you.in_branch("Lair") then
MONS:    blink frog / wyvern, basilisk, rime drake / cane toad / raven w:1
MONS:    catoblepas / komodo dragon, lindwurm / torpor snail
KFEAT:   ^ = dispersal trap
SHUFFLE: {([ / {%% / %%% / %%% / %%%
SUBST:   ( = ), [ = ]
: elseif you.in_branch("Depths") then
MONS:    very ugly thing / kobold fleshcrafter / spriggan rider
MONS:    flayed ghost w:5 / spriggan berserker / glowing shapeshifter
MONS:    glass eye w:5 / glowing orange brain w:5 / \
         spriggan defender / spark wasp
MONS:    shadow dragon w:4 / tentacled monstrosity w:6 / golden dragon
MONS:    alderking / caustic shrike / wyrmhole w:2
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:   t = demonic_tree
KFEAT:   ^ = zot trap
KFEAT:   > = fountain_eyes
SHUFFLE: 456
:   if you.depth() == 1 then
SUBST:   { = }, ( = ), [ = ]
:   else
SHUFFLE: {([ / })] / })], })]
:   end
SUBST:   } = }:70 >, ) = ):70 >
TILE:    t = dngn_demonic_tree_1 w:3 / dngn_demonic_tree_16 w:3 / \
             dngn_demonic_tree_8 w:12 / dngn_demonic_tree_9 w:12 / \
             dngn_demonic_tree_10 / dngn_demonic_tree_11
: end
# Swamp flavour loot: dragon scales, witch / elei wands, consumables, rings.
KITEM:   & = swamp dragon scales randart / swamp dragon scales good_item / \
             any beam wand w:4 / any blast wand w:6 / \
             scroll of poison q:4 pre_id / \
             potion of lignification q:4 pre_id / \
             ring of poison resistance randart / ring of flight randart
KFEAT:   ~ = w
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
xxt5C1..^..tw.....wtw.......xtx.....wt..^..1C3txx
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
KMONS:   s = pile of debris
: 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 / wyrmhole w:2
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:   R = midnight gem
KFEAT:   > = enter_zot
KFEAT:   V = zot_statue
SUBST:   %*| = $
NSUBST:  23 = 4 = 11d, $ = 1:R / *:$
FTILE:   ."~01234567Rs>V$%d*|-+abcdefABCDEFn = floor_depthstone
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
KMONS:   8 = orb of fire
: if dgn.zot_orb_type() == "orb of fire" then
SUBST:   7 : 78
: end
KMONS:   L = moth of wrath
NSUBST:  V> = 1:} / 1 = ):6 >:1 / 1 = ]:6 >:1
SUBST:   " = 1
TILE:    v = dngn_metal_wall_red
FTILE:   ."~01234567Rs>V%$d*|-+abcdefABCDEFTUVn = floor_zot_diamonds
: end
KITEM:   & = demon whip / demon blade / demon trident / \
             plate armor ego:fire_resistance pre_id / \
             plate armour ego:command pre_id w:5 / \
             fire dragon scales good_item / fire dragon scales randart / \
             sanguine talisman w:2 / dragon-coil talisman w:3
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, ~ = lllds., _ = __b
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
TILE:    b = bedevilled_crystal_dis
: set_feature_name("crystal_wall", "bedevilled crystal wall")
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:    shadowghast / 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
MONS:    white very ugly thing / kobold fleshcrafter w:5
KMONS:   8 = glass eye
KMONS:   9 = tentacled monstrosity
NSUBST:  127 = 1:., . = 4 = 126. / 2 = 7789 / *:.
NSUBST:  ' = 1:5 / 1:5' / *:', " = 2 = 34 / *:"
KITEM:   % = any skeleton
:   end
:   if crawl.coinflip() then
FTILE:   "defghijk34 = floor_tomb
FTILE:   'V5GabABHIJKL+ = 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 = fenstrider witch
KMONS:   9 = death drake
KFEAT:   ^ = shaft trap
KFEAT:   13579 = W / w
KFEAT:   - = broken_door
NSUBST:  1 = 2:., 2 = 3:., 345 = 3:., 67 = 1:., 89 = 1:., defghij = 3:.
NSUBST:  . = 3:127 / 1:5 / 35:. / 3:t / * = WWW..
NSUBST:  ' = 1:6 / 35:. / 3:^ / 3:t / * = WW...
NSUBST:  " = 2 = 233 / 6:. / 1:t / * = W.., C = 12:W / 3:t / *:c
SUBST:   x = t, X = tx, " = W"", ' = WW''', . = WW., G = Gww, % = ., V = <
: else   -- Zot
KMONS:   12 = shadow dragon
KMONS:   34 = tentacled monstrosity
KMONS:   56 = ghost moth
KMONS:   78 = curse toe
KMONS:   9 = protean progenitor
KFEAT:   | = fountain_eyes
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 pre_id
: kitem("| = sanguine talisman, randbook disc:necromancy disc2:alchemy " ..
:       "numspells:5 slevels:" .. you.absdepth())
KFEAT:   F = G
KFEAT:   E = cache_of_meat
SUBST:   C = c, X = xx.
SHUFFLE: aAbB, Hhe / Idi, de, fg, hi, JKL
SUBST:   HJK = +, ILa = c, A : c', bB = ', E : EE.
NSUBST:  m = 1:m / *:c
: if you.in_branch("Depths") then
TILE:    F = dngn_statue_depths_fangs / dngn_statue_depths_zot_tentacles
TILE:    G = dngn_statue_depths_tomes / dngn_statue_depths_zot_angel
: elseif you.in_branch("Zot") then
TILE:    F = dngn_statue_zot_serpent / dngn_statue_depths_zot_tentacles
TILE:    G = dngn_statue_zot_oldest_guardian / dngn_statue_depths_zot_angel
FTILE:   "`defghijk$%|123456781EF+M> = floor_zot_diamonds
FTILE:   .'V5GabAB = floor_mystic_chasm
: else
TILE:    F = dngn_statue_maw / dngn_statue_tentacles
TILE:    G = dngn_statue_wraith / dngn_statue_princess
: end
: vault_metal_statue_setup(_G, "M", "mystic cage")
MAP
       xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
      xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
     xxxxxxxxxxxxxxxcccccccccccccccxx
    ccccccccccccccccccXXXXXXXXXXXMcxx
   cccccccccccccccccccE.2.7...9.|Xcxx
  cccc"""ddccg3g4g3gCc.X'X'''''8.Xcxx
  ccc"8..7dcg'''''''.c.'''X'''M'9Xcxx
  cc".....ccg'''''''.c.X'X'X$6''.Xcxx
  cc".....JJ''''V'''$m.''''$>$''.Xcxx
  cc".....JJ''''''''.c.X'X'M$X''.Xcxx
  ccc"7...cc''''''''.cEdfgX'''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"ccE.....Excxx
  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
ITEM:    orb ego:glass pre_id / mundane crystal plate armour w:2
: 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
ITEM:    orb ego:glass randart pre_id / crystal plate armour w:2
: 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..*dbbxx
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 / bes kemwar w:4, 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 / shadowghast, 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 / chonchon w:2, alderking
MONS:    spriggan berserker
KMONS:   8 = spriggan defender
KMONS:   9 = guardian 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 pre_id / sanguine talisman randart
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

# The map for volcano_overflow, but without the raising / lowering lava.
NAME:     regret_index_pyroclastic
TAGS:     no_monster_gen patrolling depths_entry uniq_depths_entry
TAGS:     chance_depths_entry zot_entry uniq_zot_entry
DEPTH:    D:8-, !D:$, Lair, !Lair:$, Elf, !Elf:$
DEPTH:    Crypt, !Crypt:$, Depths, !Depths:$, Zot, !Zot:$
PLACE:    D:$, Depths:$
ORIENT:   south
WEIGHT:   2 (D:$, Depths:$), 5 (Elf, Crypt), 10
SUBST:    A : AAABBCCC, A = llly'', B = lyy, C = ll'
SUBST:    D : DDEEEFFF, D = yzz.., E = yz..., F = y..
: if you.in_branch("D") then
:   if you.depth() < 10 then
MONS:     orc wizard, bombardier beetle, fire bat / basilisk w:4
MONS:     acid dragon / red ugly thing w:4
KMONS:    L = steam dragon
NSUBST:   1 = 2:. / *:1, 4 = 1:4 / *:$, * = 1:d** / *:%
NSUBST:   l = 1:LLl / *:l, . = 1:1 / 3:2 / 2:3 / 1:11223...
:   elseif you.depth() < 12 then
MONS:     fire bat, deep elf pyromancer / basilisk w:2
MONS:     red ugly thing, fire elemental w:4 / cyclops
KMONS:    L = lava snake / acid dragon w:2
NSUBST:   . = 5:1 / 3:2 / 2:3 / 1:112.. / 1:223.
NSUBST:   4 = 1:4 / *:$, * = 1:d* / 1:*% / 1:$ / *:*
:   elseif you.where() ~= dgn.level_name(dgn.br_entrance("Depths")) then
MONS:     deep elf pyromancer / cyclops w:4 / gargoyle w:2 / red ugly thing w:2
MONS:     fire elemental / boulder beetle w:4
MONS:     molten gargoyle / ogre mage w:4, efreet / orc sorcerer w:2
KMONS:    L = laughing skull band / lava snake w:2
NSUBST:   . = 2:1 / 3:2 / 2:3 / 2 = 112.. / 1 = 2234.
NSUBST:   l = 2:L / 1 = Ll / *:l, 4 = 2:4 / *:$, * = 1:d / 1:e / 1:% / *:*
:   else
MONS:     red ugly thing w:4 / tengu warrior ; ring mail . shortbow ego:flaming
MONS:     occultist / salamander w:6 ; shortbow ego:flaming
MONS:     hell knight / red very ugly thing w:6, fire dragon
KMONS:    L = salamander mystic
KITEM:    Y = smoky gem
KFEAT:    Z = enter_depths
NSUBST:   . = 1:1 / 2:2 / 2:3 / 1:112.. / 1:223.
NSUBST:   l = 2:L / 1:Ll / *:l, 4 = 1:4 / *:*, * = 1:Y / 1:Z / 1:d / *:$
:   end
TILE:     y = wall_pebble_darkgray
:   if you.where() ~= dgn.level_name(dgn.br_entrance("Depths")) then
TILE:     z = dngn_stone_wall_darkgray
:   else
TILE:     z = stone_wall_depths_entry
:   end
: elseif you.in_branch("Lair") then
MONS:     steam dragon w:6 / wyvern / basilisk w:15 / fire bat band w:2
MONS:     lindwurm, boulder beetle, fire crab
KMONS:    L = lava snake
NSUBST:   . = 2:1 / 2:2 / 1:3 / 2 = 11223...
NSUBST:   l = 2:L / 1 = Ll / *:l, 4 = 1:4 / *:$, * = 1:dde / 1:% / 1:$ / *:*
TILE:     y = wall_pebble_darkgray
TILE:     z = dngn_stone_wall_darkgray
: elseif you.in_branch("Elf") then
MONS:     deep elf pyromancer / fire elemental, thermic dynamo
MONS:     dancing weapon ; long sword ego:flaming
MONS:     deep elf elementalist ; robe . shortbow ego:flaming / \
          deep elf high priest ; robe . shortbow ego:flaming
KMONS:    L = sun moth perm_ench:shapeshifter / \
              salamander perm_ench:shapeshifter / \
              eye of devastation w:6 perm_ench:glowing_shapeshifter / \
              glowing orange brain w:6 perm_ench:glowing_shapeshifter
NSUBST:   l = 2:L / 2 = Ll / *:l, 4 = 1:3 / 1:4 / *:%
NSUBST:   * = 1:d / 1:de / 1:| / *:*
NSUBST:   . = 3:1 / 2:2 / 1:3 / 1:4 / 2 = 112234...... / *:.
TILE:     y = wall_pebble_darkgray
TILE:     z = wall_stone_dark
: elseif you.in_branch("Crypt") then
TAGS:     no_wall_fixup
MONS:     laughing skull band / spectral fire dragon
MONS:     eidolon / fire dragon draugr w:4 / fire giant draugr w:4
MONS:     revenant soulmonger / ancient champion ; plate armour . great sword ego:flaming
MONS:     bone dragon / curse skull
NSUBST:   . = 2:1 / 3:2 / 1:3 / 1:112.. / 1:223.
NSUBST:   4 = 1:4 / 1:3 / 1:|, * = 1:d / 1:e / 1:| / *:*
TILE:     y = wall_pebble_darkgray
TILE:     z = wall_stone_dark
: elseif you.in_branch("Depths") then
:   if you.where() ~= dgn.level_name(dgn.br_entrance("Zot")) then
MONS:     hell knight / red very ugly thing w:2
MONS:     stone giant / walking earthen tome w:4, fire giant
MONS:     salamander tyrant / walking crystal tome w:2
KMONS:    L = fire dragon / salamander mystic band w:6 / glass eye
NSUBST:   . = 2:1 / 3:2 / 2:3 / 1:112.. / 1:223.
NSUBST:   l = 2:L / 2 = Ll / *:l, * = 1:d / 1:e / * = *|
:   else
MONS:     fire dragon / red draconian w:15
MONS:     stone giant / walking earthen tome w:5, fire giant
MONS:     draconian scorcher / draconian annihilator / draconian shifter
KMONS:    L = glowing orange brain / glass eye w:2
KITEM:    Y = midnight gem
KFEAT:    Z = enter_zot
KFEAT:    ! = zot_statue
NSUBST:   . = 2:1 / 3:2 / 2:3 / 1:112.. / 1:4
NSUBST:   l = 1:L / 1 = Ll / *:l, * = 1:Y / 1:Z / 1:d / 2:! / *:$
FTILE:    .1234d$GYZ! = floor_depthstone
:   end
: else -- Zot
MONS:     red draconian, red draconian monk / golden dragon
MONS:     red draconian annihilator w:5 / red draconian scorcher
# Winter doesn't stop for lava. Winter doesn't stop for anything.
MONS:     orb of appropriateness
KMONS:    L = moth of wrath / ghost moth w:2
NSUBST:   . = 3:1 / 2:2 / 2:3 / 2 = 233.
NSUBST:   l = 2:L / 3 = Lll / *:l, 4 = 1:4 / *:23
NSUBST:   * = 1:} / 1 = ):70 > / 1 = ]:40 > / 1:e / * = d
SHUFFLE:  })]
FTILE:    .1234})]>de$Gxy = floor_pebble_darkgray
TILE:     y = wall_zot_darkgray
TILE:     z = dngn_stone_wall_red
: end
ITEM:     chain mail ego:fire_resistance good_item / \
          fire dragon scales good_item / scarf ego:resistance w:5 / \
          pair of gloves ego:fire / great sword randart ego:flaming / \
          staff of fire / staff of earth w:5 / book of fire / \
          book of scorching / orb randart artprops:Fire&&rF / \
          randbook disc1:forgecraft spells:forge_monarch_bomb w:5 / \
          dragon-coil talisman / granite talisman w:5
ITEM:     plate armour ego:fire_resistance good_item / \
          fire dragon scales randart / pair of gloves randart artprops:Fire / \
          kite shield ego:fire_resistance w:5 / \
          double sword ego:flaming good_item w:5 pre_id / \
          triple sword ego:flaming good_item pre_id / \
          staff of fire randart / staff of earth randart w:5 / \
          book of spectacle w:5 / everburning encyclopedia w:5 / \
          book of spontaneous combustion w:5 / \
          randbook disc1:forgecraft spells:hellfire_mortar / \
          orb ego:energy randart artprops:Fire&&rF / \
          dragon-coil talisman randart / \
          granite talisman randart artprops:rF w:5
KFEAT:    L = l
KFEAT:    y = x
KFEAT:    z = c
: if you.in_branch("Zot") then
SUBST:    X = c
: else
SUBST:    X = x
: end
TILE:     ' = floor_pebble_darkgray
TILE:     v = dngn_metal_wall_darkgray
: vault_metal_statue_setup(_G, "G", "fiery conduit")
MAP
                XXXX         XXX XXX                   XXX
        X@@XX  XX..XXX     XXX.XXX.XXXX XXXXX XXX     XX$XX
      @XX...XXXX.DD..XXX XXX..D.1.D...XXXX..XXX.XXX XXX.D.XX
    @X.X.D......D..DD..XXX..DD..DD..D.............XXX..D.D.XX
  @X.X..D.A.DDDD.AA..D.....D..AA...A...DDD....G......DD...D$XXX
 X.X..D.AAlA....AllAAAD...D.AAllAAAlAAA...DD......DDD.AA.D.XXXX
XX.1D.AAllllAAAAllllllAAAAAAlllllllllllAAA..D....D.AAlA.D.xXXX
XXx..D.AlllllllllllllllllllllllllllllllllA.D.vvv..D.All.D.xXXX
 XXXx.D.AlllllllllllllllllAAAlllllllllllA.D.vv*vvv.D.lll.D.XXXX
  XXXX.D.AlllAAllllllllAAA...AAAlllllllA.D.vv*..*vv.D.All.D.XXX
   XXXx.D.AlA..AllllllA.DD...DD.AlllllllA.D.vv...*vv.DAllA.D.XX
    XXX.D.AA.DD.AllllA.DD.xxx.D..AllllllA..D.vv*...4.D.llAA..XX
   XXXx.D.A....D.AAAA.D..xxxxx.DD.AllllAAA.D..vv...x.D.AAA.D.XX
  XXx..D....xxx..D...D1xxxxxxxx..D.AAAA..D.......*xxDD...D.1XXX
 XXx..DD..xxxxxxx..D..xxxxxxxxxxx..D...D..xxx..xxxxx..DD.4xxxXX
XXXXXx1.xxxxxxxxxxx.xxxxxxxxxxxxxxx..D.4xxxxxxxxxxxxxx$$xxxxxXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
ENDMAP

# Underfunded, overgrown, falling apart. Still full of interested guests.
NAME:    regret_index_arboreal_archives
TAGS:    no_monster_gen no_item_gen water_ok
DEPTH:   D:6-, !D:$, Shoals, !Shoals:$, Depths, !Depths:$, Zot, !Zot:$
PLACE:   D:$, Depths:$
WEIGHT:  3 (D:$, Depths:$), 10
ORIENT:  north
# Randomization comes first before monsters due to per-branch tilework.
SHUFFLE: HIJKLMNO
SUBST:   HI = PP.., JKL = PDk..., MNO = ., 0 = 223
NSUBST:  ? = 2 = c. / *:c, ! = 2 = c. / *:c
NSUBST:  1 = 2:1 / * = 234, c = 25:t / 10:x / *:c
NSUBST:  . = 1:1 / 3:2 / 3:3 / 6:4 / 6:5 / 2:e / 6:f / 6:D / 30:P / 8:k / *:.
: if you.where() == dgn.level_name(dgn.br_entrance("Zot")) then
SUBST:   z = Z
: else
SUBST:   z = x
: end
# Magicians with minimal fire or loud lightning unless the set particularly
# needs it for variety, loose magic entities, wildlife and wildlings.
: if you.in_branch("D") then
:   if you.depth() < 9 then
MONS:    orc wizard, shadow imp / white imp
MONS:    ice beast / sky beast / sleepcap
MONS:    bullfrog / scorpion / iguana / black bear
MONS:    hound / phantom / ufetubus
SUBST:   })] = %
NSUBST:  | = 1:e / 1:ef / 2:g / * = effg, % = 1:d / 2:e / 1:fg / 1:rk. / * = k.
NSUBST:  23 = 1:.
:   elseif you.depth() < 12 then
MONS:    arcanist / kobold demonologist w:5, boggart / vampire w:5
MONS:    basilisk / shapeshifter w:20 / manticore
MONS:    hornet / wyvern / centaur / yak band
MONS:    howler monkey / water moccasin / acid dragon
SUBST:   })] = %
NSUBST:  | = 1:e / 1:f / 3:g / * = ffg, % = 2:d / 2:e / 2:fg / 1:rk / * = k.
NSUBST:  1 = 1:2 / *:1, 23 = 2:.
:   elseif you.where() ~= dgn.level_name(dgn.br_entrance("Depths")) then
MONS:    deep elf knight / orc sorcerer / ogre mage / sphinx marauder w:2
MONS:    tengu conjurer w:5 / deep elf archer w:15 / arcanist / boggart band
MONS:    laughing skull band w:5 / great orb of eyes / meliai band w:1
MONS:    centaur warrior / boulder beetle / unseen horror / wolf spider
MONS:    basilisk / manticore / shapeshifter w:20 / shadowghast / redback zombie
SUBST:   })] = %
NSUBST:  | = 1:f / 3:g / 1:h / 1:i / * = ffg
NSUBST:  % = 1:d / 2:e / 1:fg / 1:rrr. / * = def.
:   else
MONS:    rakshasa / occultist, tengu conjurer / necromancer
MONS:    ice dragon w:1 / glowing orange brain w:20 / \
         very ugly thing / storm dragon zombie
MONS:    flayed ghost / glowing shapeshifter w:20 / guardian sphinx simulacrum
MONS:    ugly thing / shapeshifter w:15 / spriggan air mage simulacrum w:5
KFEAT:   ) = enter_depths
KITEM:   S = smoky gem
NSUBST:  | = 1:f / 4:g / 1:i / 1:RRRfg / * = ffg
NSUBST:  % = 2:d / 2:e / 1:fg / * = def.
:   end
FTILE:   .12345defghijkrRS)- = floor_vines / floor_pebble_darkgray
FTILE:   P = floor_pebble_brown
:   if you.where() ~= dgn.level_name(dgn.br_entrance("Depths")) then
TILE:    x = wall_pebble_lightblue
TILE:    c = wall_marble w:200 / dngn_stone_wall_lightblue
:   else
TILE:    x = wall_pebble_green
TILE:    c = stone_wall_depths_entry
:   end
: elseif you.in_branch("Shoals") then
MONS:    merfolk aquamancer / frost giant w:2, merfolk avatar / satyr
MONS:    formless jellyfish w:15 / sphinx marauder, skyshark
MONS:    merfolk siren w:2 / faun w:2 / water elemental
SHUFFLE: })]
SUBST:   )] = %
NSUBST:  | = 1:f / 2:g / 2:h / 1:i / * = ffg
NSUBST:  % = 1:d / 2:e / 1:f / 1:g / 1:rRef / * = def., . = 4:5 / *:.
FTILE:   t = floor_moss
FTILE:   .12345defghijkrRS}- = floor_sprouting_ruin
TILE:    x = wall_lair
: elseif you.in_branch("Depths") then
:   if you.where() ~= dgn.level_name(dgn.br_entrance("Zot")) then
MONS:    tengu reaver / titan / lich / alderking w:5
MONS:    frost giant / vampire mage / vampire knight w:5 / chonchon w:5
MONS:    walking crystal tome / walking frostbound tome / \
         walking divine tome / walking earthen tome
MONS:    guardian sphinx / spark wasp / caustic shrike / \
         glass eye / wyrmhole w:2
MONS:    spriggan air mage / very ugly thing / glowing orange brain / \
         glowing shapeshifter w:20 / rakshasa / kobold fleshcrafter w:5
SHUFFLE: }])
SUBST:   } = }:60 >, ] = ]:40 >
NSUBST:  . = 2:3 / 2 = 5. / *:.
NSUBST:  | = 3:h / 2:i / * = fgg, % = 2:d / 2:f / 2:g / 1:rR / * = e.
FTILE:   .12345defghijkrRS}])TUV = floor_vines / floor_pebble_darkgray
:   else
MONS:    draconian annihilator / draconian shifter
MONS:    purple draconian / yellow draconian / \
         frost giant / vampire mage / vampire knight w:5
MONS:    walking divine tome / walking crystal tome / shadow dragon w:15
MONS:    spark wasp / flayed ghost / tentacled monstrosity w:5 / glass eye
MONS:    white draconian w:15 / green draconian w:15 / ice dragon w:15 / \
         glowing shapeshifter / spriggan air mage / glowing orange brain / \
         moth of wrath perm_ench:glowing_shapeshifter
KMONS:   ) = lich / ancient lich
KFEAT:   ) = enter_zot
KFEAT:   Z = zot_statue
KITEM:   S = midnight gem
SUBST:   }] = %
NSUBST:  . = 1:1 / 3 = 245. / *:.
NSUBST:  | = 4 = hfg / 1:i / 1:hi / *:f, % = 2:d / 2 = fg / 1:R / * = ee.
FTILE:   .12345defghijkrRZS)TUV = floor_zot_diamonds / floor_pebble_blue
FTILE:   -'D = floor_depthstone
:   end
FTILE:   ~PDt = floor_pebble_brown
TILE:    x = wall_pebble_cyan
TILE:    c = wall_marble
: else -- Zot
MONS:    draconian shifter / draconian knight / \
         protean progenitor band / ancient lich w:4 / dread lich w:4
MONS:    draconian stormcaller / draconian annihilator
MONS:    quicksilver dragon / electric golem w:6
MONS:    ghost moth / shadow dragon w:5 / curse toe w:5
MONS:    purple draconian / yellow draconian / white draconian / death cob w:2
KMONS:   Z = orb of entropy
SHUFFLE: }])
SUBST:   } = }:70 >, ] = ]:50 >, % = ddeeef, | = ggghhi
NSUBST:  . = 2:1 / 2:2 / *:.
:   if dgn.zot_orb_type() == "orb of entropy" then
NSUBST:  1 = 1:Z / 1:1Z / 1:1. / 1:. / *:1
:   end
FTILE:   ~PDt = floor_pebble_darkgray
FTILE:   .12345defghijkrRZS)TUV = floor_zot_diamonds / floor_pebble_magenta
FTILE:   -'D = floor_pebble_lightgray
: end
: if you.in_branch("Zot") then
KMONS:   P = withered plant
KFEAT:   t = petrified_tree
SUBST:   B = D, X = x
: else
KMONS:   P = plant
:   if you.in_branch("Shoals") then
KFEAT:   X = open_sea
KFEAT:   PDk = W
KPROP:   .12345defghijkS) = no_tide
:   else
SUBST:   X = x
:   end
: end
KMONS:   D = pile of debris
ITEM:    potion of brilliance pre_id / potion of magic pre_id / \
         potion of enlightenment pre_id / potion of ambrosia pre_id
ITEM:    scroll of identify q:1 pre_id / scroll of amnesia q:1 pre_id
ITEM:    any scroll, parchment
# Books with notable spells at level 6 or higher, across each school.
ITEM:    book of spontaneous combustion / book of ice / book of spectacle / \
         book of power / book of chaos / book of the warp / book of death / \
         book of siegecraft / necronomicon / grand grimoire / book of annihilations
ITEM:    robe randart / orb ego:guile randart / orb ego:channeling randart / \
         orb ego:stardust randart / orb ego:attunement randart / \
         any magical staff randart w:15 / \
         ring of wizardry randart / manual of spellcasting w:5
: if you.in_branch("D") and you.depth() < 9 then
ITEM:    mundane pair of boots / mundane cloak, stone q:1
: else
ITEM:    pair of boots / hat / cloak, large rock q:1
: end
KITEM:   r = riddle talisman
KITEM:   R = riddle talisman randart
KFEAT:   - = broken_door
KFEAT:   S = altar_sif_muna
KFEAT:   y = x
KFEAT:   C = c
SHUFFLE: UVb
SUBST:   ~ = xPt'', & = yy@
TILE:    C = wall_studio
MAP
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
ccccccccccccccccccccccccccccccccccccccccccccccccccccccc
ccccccccccccccccccccccccccccccccccccccccccccccccccccccc
ccccccccccccccccccccccccccccccccccccccccccccccccccccccc
cccc....ccc.CC.|.|.CC0ccccj.jccccc0..|.|...tccc...%cccc
ccc%.....cD...t.......cccj5.5jccc..CCPCPCC..cc......ccc
cc...P...Dc...t..C....ccj.....jcc1..........cc...P..%cc
cc..PVP..cD....tPt...1cc.......ccCPPCCtCCPPCcc..PUP..cc
cc...P...Dc....C..t...cc.......cc...........cc...P...cc
cc.......cc.......t...cc.......cc..CC.C.CC..cc.......cc
ccHH...HHcc.CC.....CC.cc.cDcDc.cctP.......Pccc...M...cc
cc.HHHHH.ccccccD-DcccccccDcDcDccccc.c+++c.cccc.MMMMM.cc
cc...H...cccccccccccccccc.....cccccccDDDccccccMM...MMcc
ccc.......!..J........?c.......c?........L..!.......ccc
ccc......c...JJ......c.....).....c......LL...c......ccc
ccc..}....!.J.J.......c..........c.......L.L.!....]..ccc
ccc.......!.J.J......?...z...z...?......L.L.!.......ccc
ccc......c...J........c...xSx...c........L...c......ccc
ccc.......!..J........?c.......c?........L..!.......ccc
cc...I...ccccccDDDccccccc.....ccccccccccccccccNN...NNcc
cc.IIIII.cccc.c+++c.cctcc-D-D-cccccccD-Dcccccc.NNNNN.cc
ccII...IIccc.........tcc.c---c.cc.CC.....CC.cc...N...cc
cc.......cc..CC.C.CC..cc.......cc...........Dc.......cc
cc...P...cc.....P.....ccKK.K.KKcc..ttP.C....cD...P...cc
cc..PUP..ccC..CCtCC..Ccc.K...K.cc1..PtttP...Dc..PVP..cc
cc%..P...cc.....P....1cc..KKK..cc....C.Ptt..cD...P...cc
ccc......cc..CC.C.CC..cc.......cc...........cc.....%ccc
cccc%...ccct...|t|..0ccc.......cc0CC.|.|.CCPccc....cccc
@ccccccccttcccccccccccccDD+++DDccccccccccccctccccccccc@
@'ccccccccccccccccccccccDxxcxxDcccccccccccccccccccccc'@
'''''''''''''''''''''''''''''''''''''''''''''''''''''''
''~~~~''''~~~~~'''~~'''''''''''''''~~'''~~~~~''''~~~~''
''''''~~~~'''''~~~''~~~~'''''''~~~~''~~~'''''~~~~''''''
'''''''''''''''''''''''''''''''''''''''''''''''''''''''
  y&yyy@@@yyyy&&&yyy&&yyyyyyyyyyy&&yyy&&&yyyy@@@yyy&y
ENDMAP
