##############################################################################
# crypt.des: Maps for the Crypt.
#
# <<1>>      Entries
# <<2>>      Arrival vaults
# <<3>>      Decorative vaults
# <<4>>      Monster-placing vaults
# <<5>>      End vaults
##############################################################################

{{
function crypt_drop_grates(data, triggerable, triggerer, marker, ev)
    if data.trig == true then
        return
    else
        data.trig = true
    end

    local did_change = false
    for replica in iter.replica_iterator("wall_phase", 1) do
        if dgn.feature_name(dgn.grid(replica.x, replica.y)) == "iron_grate" then
          if you.see_cell(replica.x, replica.y) then
            did_change = true
          end
          dgn.terrain_changed(replica.x, replica.y, "floor", false)
        end
    end
    if did_change then
      crawl.mpr("There is a click. Suddenly, the grates are dropped!", "warning")
    else
      crawl.mpr("There is a click. Nothing appears to happen.", "warning")
    end
end

function callback.grunt_crypt_arrival_guards_awaken(data,triggerable,trigger,marker,ev)
    local seen = false
    for replica in iter.replica_iterator("trap_sarcophagus", 1) do
        if you.see_cell(replica.x, replica.y) then
            seen = true
            break
        end
    end
    if seen then
        crawl.mpr("Something awakens from inside the sarcophagi!", "warning")
    elseif you.silenced() then
        crawl.mpr("The ground shakes!", "warning")
    else
        crawl.mpr("You hear grinding stone!", "warning");
    end
    for replica in iter.replica_iterator("trap_sarcophagus", 1) do
        if dgn.feature_name(dgn.grid(replica.x, replica.y)) == "granite_statue" then
            dgn.terrain_changed(replica.x, replica.y, "floor", false)
            dgn.colour_at(replica.x, replica.y, "lightgray")
            dgn.create_monster(replica.x, replica.y,
                               "human skeleton / human zombie / \
                                mummy w:20 / guardian mummy")
        end
    end
end

function crypt_entry(e)
    e.tags("crypt_entry vaults_entry_crypt")
    e.kmons("0 = place:Crypt:1")
    e.kfeat("O = enter_crypt")
end

function crypt_loot_plus(e)
  -- Since Crypt is an optional, late, difficult branch,
  -- provide some unreliable but high quality incentives.
  local drain = "ego:draining good_item ident:type"
  local pain = "ego:pain ident:type"
  local vamp = "ego:vampirism ident:type"
  local book = "randbook disc:necromancy numspells:6 spells:"
  local ring = "ring of positive energy randart good_item"
  local amulet = "amulet of regeneration randart good_item"
  -- One drop-off of these,
  e.kitem("d = double sword w:5 " .. drain .." / triple sword w:5 " .. drain ..
          " / quick blade " .. drain .. " / executioner's axe " .. drain ..
          " / eveningstar " .. drain .. " / bardiche " .. drain ..
          " / lajatang " .. drain)
  e.kitem("e = great sword " .. pain .." / battleaxe " .. pain ..
          " / great mace " .. pain .. " / glaive " .. pain ..
          " / quarterstaff " .. pain)
  e.kitem("f = great sword " .. vamp .." / quick blade " .. vamp ..
          " / battleaxe " .. vamp .. " / great mace " .. vamp ..
          " / glaive " .. vamp)
  e.kitem("g = " .. ring .. ", " .. ring .. " / " .. amulet .. " w:2, " ..
          ring .. " / " .. amulet .. " w:2 / nothing")
  -- and one drop-off of these.
  e.kitem("h = vampires_tooth / leech / sword_of_zonguldrok / " ..
          "finisher / scythe_of_curses / majin-bo / sceptre_of_torment / " ..
          "undeadhunter")
  e.kitem("i = necronomicon / " .. book .. "death's_door / " .. book .. "haunt / "
          .. book .. "borgnjor's_revivification / " .. book .. "infestation")
  e.kitem("j = talisman of death / talisman of death randart w:1, " ..
          "staff of death randart / any magical staff randart")
  e.kitem("k = ivory gem")
  e.subst("d = d:20 ef g:20")
  e.subst("h = h:5 i:15 j")
end
}}

##############################################################################
# <<1>> Crypt entry vaults
##############################################################################

##############################################################################
NAME:   dummy_crypt_entry
WEIGHT: 50
TAGS:   crypt_entry extra transparent
KFEAT:  O = enter_crypt
MAP
O
ENDMAP

##############################################################################
NAME:   minmay_crypt_entry_simple_round
TAGS:   transparent
: crypt_entry(_G)
MAP
.........
..ccccc..
..c...c..
.cc.0.cc.
.c.....c.
.+.0O0.c.
.c.....c.
.cc.0.cc.
..c...c..
..ccccc..
.........
ENDMAP

##############################################################################
NAME:   minmay_crypt_entry_simple_box
TAGS:   transparent
: crypt_entry(_G)
MAP
.......
.cc.cc.
.c0c0c.
..cOc..
.c0c0c.
.cc.cc.
.......
ENDMAP

##############################################################################
NAME:   minmay_crypt_entry_simple_statues
TAGS:   transparent
: crypt_entry(_G)
MAP
...........
.x.......x.
...........
...GxxxG...
...xx0xx...
....0O0x...
...xx0xx...
...GxxxG...
...........
.x.......x.
...........
ENDMAP

##############################################################################
NAME:   minmay_crypt_entry_simple_sparse
TAGS:   transparent
ORIENT: float
: crypt_entry(_G)
MAP
...........
.x...x...x.
...........
...x.0.x...
...........
.x.0.O.0.x.
...........
...x.0.x...
...........
.x...x...x.
...........
ENDMAP

##############################################################################
NAME:   minmay_crypt_entry_simple_walls
TAGS:   transparent
: crypt_entry(_G)
MAP
..........
.xxxxxxxx.
.x........
.x0xxxxxx.
.x......x.
.x.xxxx0x.
.x.x....x.
.x.x.O..x.
.x.x....x.
.x.xxxx0x.
.x......x.
.x0xxxxxx.
.x........
.xxxxxxxx.
..........
ENDMAP

##############################################################################
NAME:   minmay_crypt_entry_simple_corners
TAGS:   transparent
: crypt_entry(_G)
MAP
...........
.xx.....xx.
.x0.....0x.
....x.x....
...xx.xx...
.....O.....
...xx.xx...
....x.x....
.x0.....0x.
.xx.....xx.
...........
ENDMAP

##############################################################################
NAME:   minmay_crypt_entry_simple_plaza
TAGS:   transparent
: crypt_entry(_G)
MAP
......................
..............xxxxxxx.
.....G...G...Gx..0..x.
..............x.....x.
...........0..+..O.0x.
..............x.....x.
.....G...G...Gx..0..x.
..............xxxxxxx.
......................
ENDMAP

##############################################################################
NAME:   minmay_crypt_entry_skeletal_spiral
TAGS:   transparent
MONS:   skeleton w:20 / skeletal warrior, ancient champion
: crypt_entry(_G)
MAP
...........
.xxxxxxxxx.
.x..1..1.x.
.x1xxxxx.x.
.x.x121x1x.
.x.x1O1x.x.
.x1x111x1x.
.x.x.xxx.x.
.x.x1.1.1x.
.x.xxxxxxx.
...........
ENDMAP

##############################################################################
NAME:    minmay_crypt_entry_necro_gods
TAGS:    transparent
WEIGHT:  30
SHUFFLE: AB
KFEAT:   A = altar_kikubaaqudgha
KFEAT:   B = altar_yredelemnul
: crypt_entry(_G)
MAP
...........
.G.ccccc.G.
...c...c...
.ccc.A.ccc.
.c.......c.
.+...O...c.
.c.......c.
.ccc.B.ccc.
...c...c...
.G.ccccc.G.
...........
ENDMAP

##############################################################################
NAME:    minmay_crypt_entry_nasty_monster
TAGS:    transparent
MONS:    bone dragon w:25 / lich / shadow dragon w:5
: crypt_entry(_G)
MAP
.........
.x.....x.
.xx...xx.
..x.1.x..
..x.x.x..
.xx...xx.
.x.....x.
.x..O..x.
.x.....x.
.xx...xx.
..xxxxx..
.........
ENDMAP

##############################################################################
NAME:   minmay_crypt_entry_vampire_xt
TAGS:   transparent
MONS:   vampire, vampire knight / vampire mage
SUBST:  V = VVVY
: crypt_entry(_G)
MAP
................
.xxxxx....xxxxx.
.x...xx..xx...x.
.x.O..xxxx..1.x.
.x..2..xx.....x.
.xx..V....V..xx.
..xx........xx..
...xx..cc..xx...
...xx..cc..xx...
..xx........xx..
.xx..V....V..xx.
.x.....xx.....x.
.x.1..xxxx..1.x.
.x...xx..xx.....
.xxxxx....xxx...
................
ENDMAP

##############################################################################
NAME:    blue_anna_dwarven_crypt
TAGS:    transparent
MONS:    death knight, shadow wraith / freezing wraith
: crypt_entry(_G)
MAP
cccc@cccc
c.......c
c.ccccc.c
c.c.2.c.c
@.c.O.c.@
c.c...c.c
c.cc+cc.c
c1.....1c
cccc@cccc
ENDMAP

##############################################################################
# <<2>> Crypt arrival vaults
##############################################################################

# It's been undisturbed for so long, cobwebs are starting to form.
NAME:   grunt_crypt_arrival_webbed
TAGS:   extra uniq_crypt_arrival no_monster_gen no_trap_gen no_item_gen
KFEAT:  ^ = web trap / w:20 floor
DEPTH:  Crypt:1
WEIGHT: 30
ORIENT: south
MAP
      .@.
xxxxxc+++cxxxxx
xxxxxc^.^cxxxxx
xxxxcc^.^ccxxxx
xxcccG^.^Gcccxx
xxcG^^^.^^^Gcxx
xcc^^.....^^ccx
xcG^.V...V.^Gcx
xc^^..[.(..^^cx
xcV.........Vcx
xc^^...{...^^cx
xcG^.V...V.^Gcx
xcc^^.....^^ccx
xxcG^^^.^^^Gcxx
xxcccG^V^Gcccxx
xxxxcccccccxxxx
xxxxxxxxxxxxxxx
ENDMAP

NAME:   grunt_crypt_arrival_split
TAGS:   extra uniq_crypt_arrival no_monster_gen no_trap_gen no_item_gen
DEPTH:  Crypt:1
WEIGHT: 30
ORIENT: south
MAP
       .@.
xxxxxxx+++xxxxxxx
xxxxx.......xxxxx
xxG...xxGxx...Gxx
xx..xxxxxxxxx..xx
x..xxxxxxxxxxx..x
x.xxxxxxxxxxxxx.x
x.VxxxxxxxxxxxV.x
x.xxxxxxxxxxxxx.x
x..xxxxxxxxxxx..x
xx..xGxxGxxGx..xx
xx.....[.(.....xx
xxxG....V....Gxxx
xxxxxG..{..Gxxxxx
xxxxxxxG.Gxxxxxxx
xxxxxxxxxxxxxxxxx
ENDMAP

# Do not disturb the sanctity of this place, mortal...
NAME:   grunt_crypt_arrival_guarded_gate
TAGS:   uniq_crypt_arrival no_item_gen no_monster_gen no_trap_gen \
        layout_rooms layout_city layout_corridors no_hmirror no_rotate extra
ORIENT: south
DEPTH:  Crypt:1
WEIGHT: 30
TILE:   H = dngn_sarcophagus_pedestal_left
TILE:   I = dngn_sarcophagus_pedestal_right
COLOUR: HI = yellow
TILE:   C = wall_stone_gray
SUBST:  HI = G
{{
  local trap_marker = TriggerableFunction:new {
      func = "callback.grunt_crypt_arrival_guards_awaken",
      repeated = false}
  trap_marker:add_triggerer(DgnTriggerer:new {
      type="player_los"})
  lua_marker('J', trap_marker)
  lua_marker('G', props_marker {trap_sarcophagus=1,
                                veto_destroy="veto"})
  set_feature_name("granite_statue", "sarcophagus")
}}
KFEAT:  G = granite_statue
SUBST:  J = V
SUBST:  C = c
MAP
.....@.....
@....J....@
...........
xxcc+++ccxx
xxcC...Ccxx
xxcH...Icxx
xxcC...Ccxx
xxcH...Icxx
xxcC...Ccxx
xxcH...Icxx
xxcC...Ccxx
xxcH...Icxx
xxcC...Ccxx
xxcH...Icxx
xxcC...Ccxx
xccc...cccx
xcC.....Ccx
xc.......cx
xc...{...cx
xcV.....Vcx
xc..[.(..cx
xc.......cx
xcC..V..Ccx
xcccccccccx
xxxxxxxxxxx
ENDMAP

##############################################################################
# <<3>> Crypt decorative vaults
##############################################################################

NAME:    nicolae_crypt_ancient_font
TAGS:    transparent extra
DEPTH:   Crypt
SHUFFLE: HIJ
NSUBST:  A = @ / ., B = @ / ., C = @ / ., D = @ / .
SUBST:   HI = c, J : Gcc
MAP
cccAcHcAccc
ccc.....ccc
ccIcc.ccIcc
D.cJc.cJc.B
c.cc...cc.c
H....V....H
c.cc...cc.c
D.cJc.cJc.B
ccIcc.ccIcc
ccc.....ccc
cccCcHcCccc
ENDMAP

NAME:  nicolae_crypt_small_crypt
TAGS:  allow_dup extra
DEPTH: Crypt
MAP
ccccc
cG.Gc
c.%.c
c...c
cc+cc
ENDMAP

NAME:   nicolae_crypt_fedhas_prevails
TAGS:   transparent extra
DEPTH:  Crypt
WEIGHT: 3
TAGS:   no_monster_gen no_item_gen no_trap_gen
SUBST:  D = dw, W = wp
KMONS:  d = withered plant / nothing w:20
KMONS:  w = withered plant / nothing
KMONS:  p = plant
KFEAT:  _ = altar_fedhas
MAP
cccccccccc
cddDwwWppc
cddDwwWppc
+......_pc
cddDwwWppc
cddDwwWppc
cccccccccc
ENDMAP

NAME:    nicolae_crypt_twisting_catacombs
TAGS:    transparent extra
DEPTH:   Crypt
SHUFFLE: Aa / Bb / Dd / Ee / Ff / Jj / Hh / Ii, {[(<
SUBST:   ABDE = @, abd = G, efjhi = ., FJHI = c
MAP
ccccccccccIIcccccc
H..h.....iiic..a.A
H..h........c..a.A
cccccccc..ccc..ccc
J....ccc..ccc..ccc
J....ccc..ccc....c
cjjccc{....[c....c
c..ccc......ccc..c
c.......cc.......c
c.......cc.......c
c..ccc......ccc..c
c....c(....<cccbbc
c....ccc..ccc....B
ccc..ccc..ccc....B
F.f..ccc..cccccccc
F.f..c......d..ccc
ccceec......d..ccc
cccEEccccccccDDccc
ENDMAP

NAME:   nicolae_crypt_niches
TAGS:   allow_dup extra
DEPTH:  Crypt
NSUBST: A = + / A
SUBST:  A = c:30 +
MAP
ccccAcccc
cc.c.c.cc
c.......c
cc.c.c.cc
A.......A
cc.c.c.cc
c.......c
cc.c.c.cc
ccccAcccc
ENDMAP

NAME:    nicolae_crypt_stairs_room
TAGS:    extra allow_dup luniq
DEPTH:   Crypt, !Crypt:1, !Crypt:$
SHUFFLE: AB, CDE, FH/FH/HF
SUBST:   + = +@, BCD = c, A : GGGc.., E : Gc., F : GV..
NSUBST:  H = { / }
SHUFFLE: {}[]()
MAP
ccccccccccc
ccECDEDCEcc
cc.......cc
cF.cc.cc..c
cH.AB.BA..+
cF.cc.cc..c
cc.......cc
ccECDEDCEcc
ccccccccccc
ENDMAP

NAME: nicolae_crypt_statuary_hall
TAGS: no_item_gen no_monster_gen extra luniq_staircase
DEPTH: Crypt, !Crypt:1, !Crypt:$
SHUFFLE: {[(, }])
MAP
      x@x
      x.x
      x.x
   xxxx.xxxx
   x..G.G..x
   x..x.x..x
xxxx..G.G..xxxx
@....{x.x}....@
xxxx..G.G..xxxx
   x..x.x..x
   x..G.G..x
   xxxx.xxxx
      x.x
      x.x
      x@x
ENDMAP

NAME: nicolae_crypt_cryptocurrency
DEPTH: Crypt
TAGS: extra decor no_item_gen no_trap_gen no_monster_gen no_descent
KPROP: $-c = no_tele_into
KMASK: .@ = !opaque
KITEM: $ = $ / $ good_item w:3
KFEAT: m = iron_grate
MAP
xxxxxxxxx
xxxcccxxx@
xxcc$ccxx.x
xcc---ccx.x
xc$-c--m..x
xcc---ccx.x
xxcc$ccxx.x
xxxcccxxx@
xxxxxxxxx
ENDMAP

NAME: nicolae_crypt_little_mausoleum
DEPTH: Crypt
TAGS: transparent allow_dup
SHUFFLE: ab/ab/ab/ab/ba
SUBST: b = ., G : G:60 xV0 .:5 t:2 P:2, a = sGVe0 _:5 $:5 %:5
: if you.depth() == 1 then
SUBST: s = ]})>
: elseif you.depth() == dgn.br_depth(you.branch()) then
SUBST: s = [{(<
: else
SUBST: s = ]})>[{(<
: end
KFEAT: _ = altar_kikubaaqudgha w:15 / altar_yredelemnul w:15 / \
           altar_dithmenos w:5 / altar_the_shining_one w:1
KMONS: 0 = zombie / skeleton
KMONS: P = withered plant
: dgn.delayed_decay(_G, 'e', 'human skeleton / orc skeleton / elf skeleton')
TILE: t = dngn_tree_dead
: set_feature_name("tree", "dead tree")
MAP
xxxxx
xbabx
x...x
xx.xx
Gx+xG
.....
ENDMAP

NAME:  nicolae_crypt_crumbling_hall
TAGS:  transparent no_wall_fixup extra decor
DEPTH: Crypt
SUBST: - = x..., _ = x___, . = .:150 0, 0 = 0:90 9:30 8
TILE:  x = wall_spider
CLEAR: _
MAP
      ............
      .........-.._
 _    ..ccc++ccc.._xx_
 xxx  .-cxxx...c.._xxx_
 xxxx_-xc-c..c.c.. xxxx
  _xxxxxx.-..-xx..  xxx
....-xxxx.c..cxx-...xx-.
..--xxxxc.x..-xcxx.-xxx.
.-cxxxxcc.c..c-ccccccc-.
.xxxxx-...---...-.-..c..
.xxxc-c.c.c..cxc.c.c.c.-
.-xx....-...---x--...+..
..+.-..---...-.xx-...+..
..c.c.c.c.c.-c.cxc.c-c-.
..c-.------...-xx-..-cxx_
..cccxxxxxc-.cxcccccccxx_
..-xxxxxxx-.x.-c....--xxx_
..-xxxxxx-c-.c-c......-x_
   _xxxxx-..x-xc.-x-   _
    _xxxc.c-.c-c.xxx_
    xx--cx....-c.-xx
   xxx..ccc++ccc.-x_
   xx ..-x-...-..xx
      ..........xx
ENDMAP

NAME:    nicolae_crypt_crosshalls
TAGS:    transparent
DEPTH:   Crypt
SHUFFLE: DEFH, JKLM, NOPQ, pr/qs
NSUBST:  p = @ / x, r = @ / x, q = xxx@ / x
SUBST:   DJN = ., E : xxx., K : xxx., O : xxx., FHLMPQs = x
MAP
xxpxxxpxxxpxxxpxx
xx.xDx.xJx.xNx.xx
s...D...J...N...q
xx.xDx.xJx.xNx.xx
xx.xEx.xKx.xOx.xx
s...E...K...O...q
xx.xEx.xKx.xOx.xx
xx.xFx.xLx.xPx.xx
s...F...L...P...q
xx.xFx.xLx.xPx.xx
xx.xHx.xMx.xQx.xx
s...H...M...Q...q
xx.xHx.xMx.xQx.xx
xxrxxxrxxxrxxxrxx
ENDMAP

NAME:   nicolae_crypt_fancy_cubbyholes
TAGS:   transparent extra decor
DEPTH:  Crypt
NSUBST: - = 1:@ / *:~
SUBST:  ' = x:40 ., ` = x:70 ., ~ = x:100 .
MAP
xxxx-x-x-x-xxxx
xxx'.`.'.`.'xxx
xxxx...'...xxxx
x'xx`.`x`.`xx'x
-..`.......`..-
x`....`.`....`x
-..`.`x~x`.`..-
x''x..~x~..x''x
-..`.`x~x`.`..-
x`....`.`....`x
-..`.......`..-
x'xx`.`x`.`xx'x
xxxx...'...xxxx
xxx'.`.'.`.'xxx
xxxx-x-x-x-xxxx
ENDMAP

NAME:   nicolae_crypt_paired_memorials
TAGS:   transparent allow_dup
DEPTH:  Crypt
KFEAT:  - = iron_grate
NSUBST: D = @ / ., E = @ / .
SUBST:  F : xxxxGG-, H : xxxxGG-
MAP
xxxxxDDDx
xxGxxF.Fx
x...H...x
x...H...x
xF.FxxGxx
xEEExxxxx
ENDMAP

NAME:  nicolae_crypt_reliquary_box
TAGS:  transparent extra decor
DEPTH: Crypt
MAP
GxxxxG
.x||x.
.x..x.
.x++x.
......
ENDMAP

NAME:    nicolae_crypt_skullbonk
TAGS:    transparent extra decor
DEPTH:   Crypt
SHUFFLE: Pp, Qq, Rr, Ss
SUBST:   PQRS = x, pqrs = .
NSUBST:  D = + / x, E = + / x, F = + / x, H = + / x
MAP
    xxxxxxx
    xx.P.xx
  @.x.p.p.x.@
  ..D.....E..
xxxDx.P.P.xExxx
xx...x.p.x...xx
x.s.S.xxx.Q.q.x
xS...sxxxq...Qx
x.s.S.xxx.Q.q.x
xx...x.r.x...xx
xxxHx.R.R.xFxxx
  ..H.....F..
  @.x.r.r.x.@
    xx.R.xx
    xxxxxxx
ENDMAP

NAME:    nicolae_crypt_smalloseum
TAGS:    transparent allow_dup
DEPTH:   Crypt
SHUFFLE: DE/FH, DE, FH, JK
SUBST:   DFJ = x, E : xG., K : xG., H = G
MAP
xxxxxxxxx
xJKJKJKJx
x.......x
..D.F.D..
@.E.H.E.@
..D.F.D..
x.......x
xJKJKJKJx
xxxxxxxxx
ENDMAP

NAME:    nicolae_crypt_stairsoleum
TAGS:    transparent extra
DEPTH:   Crypt
: if you.depth() == 1 then
SUBST:   { = }, [ = ]
: elseif you.depth_fraction() < 1 then
SUBST:   [ = ]
: end
SHUFFLE: {[(, }]), DEFHJKLMNOPQRSZa, pqrs
SUBST:   D = @, E : x@, F : xx@, H : xxx@, JKLMNOPQRSZa = x
SUBST:   p = +, q : +x, r : +xx, s : +xxx, V = V:10 .:5 Y:1
MAP
DDxxEExFFxHHxxJJ
D..x..x..x..x..J
x..............x
xx............xx
a....Vx..xV....K
a...VxxppxxV...K
xx..xx....xx..xx
Z....s.{..q....L
Z....s..[.q....L
xx..xx....xx..xx
S...VxxrrxxV...M
S....Vx..xV....M
xx............xx
x..............x
R..x..x..x..x..N
RRxxQQxPPxOOxxNN
ENDMAP

##############################################################################
# <<4>> Crypt monster vaults
##############################################################################

##############################################################################
# Dead fish. Alas, no Cocytus spawn here.
NAME: lemuel_dead_fish_pool
TAGS: no_pool_fixup extra
DEPTH: Crypt
SUBST: . : .W
SUBST: 1 = w:50 1
KFEAT: 1 = w
KMONS: 1 = swamp worm zombie
MAP
@..wwwww..@
..ww111ww..
.ww11111ww.
ww1111111ww
w111111111w
w111111111w
ww1111111ww
.ww11111ww.
..ww111ww..
@..wwwww..@
ENDMAP

##############################################################################
# tombs in the wall
NAME:  tombwall_bobbens
TAGS:  transparent
DEPTH: Crypt
MONS:  zombie w:150 / skeleton w:150 / skeletal warrior / ghoul / \
       large abomination / small abomination / \
       skeleton w:150 / patrolling burial acolyte w:40
KFEAT: _ = altar_kikubaaqudgha
MAP
ccccccccccccccccccccccc
ccc1c1c1c1c1c1c1c1c1ccc
cccc++c+c+c+c+c+c++cccc
.......................
.........._............
.......................
ENDMAP

##############################################################################
#       small crypt building
NAME:   minicrypt_bobbens
DEPTH:  Crypt
MONS:   necromancer, zombie / skeleton, laughing skull
MAP
  ccccccc
 cc2c2c2cc
ccc+++++ccc
c2c.....c2c
cc+..1..+cc
c2c.3.3.c2c
ccc..%..ccc
c2+.....+2c
ccc.....ccc
c2+.....+2c
cccc+c+cccc
ENDMAP

##############################################################################
# Lich vault
NAME:  weyrava_lich_vault
TAGS:  no_monster_gen no_item_gen
DEPTH: Crypt
ITEM:  gold
KFEAT: Z = w:5 alarm trap / w:8 zot trap / w:50 floor
KMONS: Y = Boris / ancient lich, ancient lich / dread lich
MONS:  w:3 zombie / lich / w:3 skeleton / w:3 bone dragon
MONS:  skeleton / zombie
KFEAT: v = .
KITEM: v = $ / %
SUBST: $ = $.*|
MAP
    ccccc
 ccccv.vcccc
 c$.+.Y..+$c
 c.ccv.vcc.c
 c+ccc+ccc+c
 c..$c.c$..c
@n.1.c.c.1.c
 c$.$c.c$.$c
 ccc+c.ccccc
 cccZcZc$c
 c.+.cZczc
 cZcccZc+c
 c.+2+Z+2c
 cccccZccc
     c.c
     c@c
ENDMAP

##############################################################################
# Ghost lake
NAME:  weyrava_ghost_lake
TAGS:  no_monster_gen no_item_gen no_descent
DEPTH: Crypt
MONS:  laughing skull
MONS:  skeletal warrior ; long sword . kite shield . w:6 any beam wand | nothing /\
       skeletal warrior ; battleaxe | halberd . w:7 any beam wand | nothing
KMONS: ST = phantasmal warrior w:25 / spectral fire dragon / \
            spectral ice dragon / spectral storm dragon
SUBST: y = .:8 c, v = z .
SUBST: w = w z:6
KFEAT: z = deep_water
KMASK: z = no_pool_fixup
KFEAT: ST = .
KITEM: T = * / w:5 |
KFEAT: S = .
KITEM: S = $ / nothing
MAP
    cccccccccccc
  cccyy.yy..yyycccc
  cyy..w..ww....2ycc
  cy.wwzwwzzwwwww.ycc
 cc.wzzzzzzzzzzzzw..@
ccy1wzzzzzzzzzzzzzw.cc
cy.wzzzzzzvvzzzzzzw.yc
@.wzzzzzv1..1vzzzzw.yc
cy.wzzzv.c++c.vzzzzw.c
cy.wzzz.ccSScc1zzzzw2c
cy2wzzv.+STTS+.vzzw1yc
c.wzzzv.+STTS+.vzzw.yc
c.wzzzz1ccSScc.zzzw.yc
c.wzzzzv.c++c.vzzzzw.c
c.wzzzzzv1..1vzzzzzw.@
cy2wzzzzzzvvzzzzzzw.yc
ccy.wzzzzzzzzzzzzw1ycc
 ccy.wzzzzzwwwwww2ycc
  cy.wzzwww......ycc
  cc.www...yyyccccc
   cy...yyccccc
   ccc@cccc
ENDMAP

##############################################################################
# Vampire temple
NAME:    weyrava_vampire_temple
TAGS:    no_monster_gen no_item_gen no_wall_fixup
DEPTH:   Crypt
MONS:    col:red fungus
MONS:    col:lightred fungus
MONS:    fungus
MONS:    vampire / w:4 patrolling vampire knight / w:4 vampire mage
KFEAT:   Z = altar_kikubaaqudgha / altar_yredelemnul
KITEM:   z = book of Unlife / book of Death / \
             randbook disc:necromancy numspells:7 / nothing
KFEAT:   z = floor
# create between one and four blood fountains
SUBST:   Q=qu, U=un, N=ns, S=sq
SHUFFLE: Mmn / Xxy / Xxy / Xxy
SUBST:   M=V , m=v , n=u , X=A , x=a , y=b
SHUFFLE: Rrs / Xxy / Xxy / Xxy
SUBST:   R=V , r=v , s=u , X=A , x=a , y=b
SHUFFLE: Ppq / Xxy / Xxy / Xxy
SUBST:   P=V , p=v , q=u , X=A , x=a , y=b
SUBST:   V=Y, v=11111112, u=1222233...
SUBST:   A=V, a=..3, b=.
MAP
     c@G@c
   ccc.c.ccc
  cc4..u...cc
 cc..cuvuc..cc
 c..QuvVvuU.4c
cc4cqQuvuUnc.cc
@..qpqQuUnmn..@
GcqpPpqZzmMmncG
@..qpqSsNnmn..@
cc.cqSsrsNnc.cc
 c..SsrRrsN.4c
 cc4.csrsc..cc
  cc...s..4cc
   ccc.c.ccc
     c@G@c
ENDMAP

##############################################################################
# Shadows.
# For Crypt and Tartarus
#
NAME:    minmay_shadows
ORIENT:  northwest
DEPTH:   Crypt, Tar
MONS:    shadow, soul eater, tzitzimitl
ITEM:    any misc
SUBST:   A : x., B : x., C : x., E : x., F : x.
: if you.in_branch("Tar") then
NSUBST:  d = 1:} / 1:.
: else
SUBST:   x = c, 3 = .
: end
MAP
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xx.........xxx2.2xxx.........x
xx....1....xxxd.dxxx....1....x
xx.........xxx2.2xxx.........x
xx...xxx...xxx...xxx...xxx...x
xx.D.xxx.E.xxx.1.xxx.E.xxx.D.x
xx...xxx.2.xxx...xxx.2.xxx...x
xx1..xxx....1..3..1....xxx..1x
xx...xxx....F.....F....xxx...x
xx...xxx.......1.......xxx...x
xx...xxxxxxxxxxxxxxxxxxxxx...x
xx.2.xxxxxxxxxxxxxxxxxxxxx.2.x
xx...xxxxxxxxxxxxxxxxxxxxx...x
xx...xxx...............xxx...x
xx...xxx..1.A.....A.1..xxx...x
xx1..xxx...............xxx..1x
xx...xxx...xxx...xxx...xxx...x
xx.C.xxx.B.xxx.1.xxx.B.xxx.C.x
xx...xxx...xxx...xxx...xxx...x
xx.........xxx1.1xxx.........x
xx....1....xxx...xxx....1....x
xx.........xxx...xxx.........x
xxxxxxxxxxxxxx.@.xxxxxxxxxxxxx
ENDMAP

NAME:   st_shrine_of_skulls
DEPTH:  Crypt
MONS:   laughing skull band, lich
KMONS:  3 = curse skull
KMONS:  4 = lich w:20 / ancient lich / dread lich
KMONS:  P = withered plant
KFEAT:  4 = |
SUBST:  p = Pp, p = PP., o = P..
MAP
    ooooooooo
  ooopppppppooo
 oopppcccccpppoo
ooppccc.1.cccppoo
oppcc.......ccppo
oppc..ccccc..cpp..
opcc+cc|4|cc+cc...
opcc3c*|||*c..+1.@
opcc+ccc3cccccc...
oppc...cPc...cpp..
oppcc.......ccppo
ooppccc.2.cccppoo
 oopppcccccpppoo
  ooopppppppooo
    ooooooooo
ENDMAP

NAME:   st_burial_chamber
TAGS:   no_wall_fixup
DEPTH:  Crypt
MONS:   mummy, guardian mummy, ushabti
KMONS:  4 = guardian mummy
KMONS:  5 = mummy priest
KMONS:  6 = royal mummy
SUBST:  1 = 2231
KITEM:  345 = |
MAP
 ccccccccccccc
cc...........cc
cc.cccc+cccc.cc
cc.cc1...1cc.cc
ccxccc...cccxcc
c4x4c1...1c4x4c
cxxxcc...ccxxxc
c5x5c1...1c5x5c
cxxxcc...ccxxxc
c5x6c1...1c6x5c
ccccccc+ccccccc
.ccGcc...ccGcc.
.......@.......
ENDMAP

NAME:   st_small_mortuary
DEPTH:  Crypt
KMONS:  1 : vampire mage w:20 / necromancer
NSUBST: ' = 5:d / *:.
: dgn.delayed_decay(_G, 'd', 'human corpse')
MAP
   ccccccccc
 ccc...1...ccc
cc*.........*cc
c|*1.......1*|c
cc*.........*cc
cccc.......cccc
cd.cc.....cc.dc
c.............c
cd.cc.....cc.dc
cccc'''''''cccc
cc'''''''''''cc
c'''''''''''''c
cc'''''''''''cc
.ccc''ddd''ccc.
...cccc+cccc...
 ......@......
ENDMAP

NAME:   st_vampire_maze
DEPTH:  Crypt
MONS:   vampire, vampire knight, vampire mage
SUBST:  1 = 12233
MAP
ccccccccccccccccc
c...c**c........c
c.c.c11c.cccc.c.c
c.c.+..c....c1c.c
c.ccccccccc+ccc.c
c......c*1..c...c
c.cccc.c*1..c.c.c
c1c....c*1..c.c1c
ccc.ccccccccc.ccc
c1..c.....c.....c
ccc.c.ccc.c.ccc+c
c...c.c1..c.c1..c
c.ccc.ccc.c.c*..c
c.......c...c**1c
ccccccc@ccccccccc
ENDMAP

NAME:   st_chilly_death
TAGS:   no_pool_fixup
DEPTH:  Crypt
KMONS:  1 = lich
KMONS:  2 = simulacrum w:15 / nothing w:20
KMONS:  3 = simulacrum
KMONS:  4 = wraith / shadow wraith / freezing wraith w:30
KFEAT:  4 = deep_water
KITEM:  1 = |
KITEM:  3 = *
MAP
    cccccccccc
   cc444cc444cc
  ccwwwwwwwwwwcc
 ccww22222222wwcc
ccww22ww22ww22wwcc
c4w22www22www22w4c
c4w2wwcc++ccww2w4c
ccw2wcc3333ccw2wcc
ccw2wcc3133ccw2wcc
c4w2wwcc33ccww2w4c
c4w..wwccccww..w4c
ccww..ww44ww..wwcc
 ccww..wwww..wwcc
  ccww......wwcc
   cc44c++c44cc
    cccc@@cccc
ENDMAP

NAME: nicolae_crypt_soggy_tomb
TAGS: no_pool_fixup extra
DEPTH: Crypt
SUBST: w = Ww, . = ...W
NSUBST: A = + / c
KMONS: 1 = swamp worm zombie
KMONS: 2 = bog body
KFEAT: 1 = w
KFEAT: 2 = W / . w:20
MAP
cccccc
c1w..c
cw.2.c
c....c
c.2.2c
c....c
cAAAAc
ENDMAP

NAME:    hangedman_hall_of_fallen_heroes
TAGS:    no_monster_gen no_item_gen
DEPTH:   Crypt
ORIENT:  float
MONS:    wight band, phantasmal warrior
MONS:    skeletal warrior ; long sword | war axe | trident | flail . \
                            chain mail | ring mail | scale mail
MONS:    patrolling vampire knight, patrolling ancient champion
ITEM:    any weapon no_pickup / any armour no_pickup w:8 / \
         gold no_pickup w:3 / any weapon good_item no_pickup w:3
ITEM:    $ no_pickup, | no_pickup
SHUFFLE: -_
SUBST:   z : cvvv, G : GGv, - = ++++., _ = +.
NSUBST:  C = 3 = ':19 c:1 / 2 = 'cc / *:c
NSUBST:  Z = 1:. / *:v, G = 1:' / * = G:19 ':1
MAP
        ccccccc
        cccccccccc
        cc2d.ccccc
        ccd.z_cccc
    cccccc.zZ..cccccccc
    ccccccc_....ccvvvvc
    cc3d.c....G.evvf5vc
    ccd.z-.cC....4+vfvc
cccccc.zZ..CC.....z+vvc
ccccccc-...........4vccccc
cc2d.c....G...C.....eccccc
ccd.z_.cC.............cccc
cc.zZ..CC...C...c...G..cccc
ccc_.........c.........-ccc
cce...G...c...C...CC..cz.cc
ccc-..............Cc.-z.dcc
cc.zZ.......C...G....c.d3cc
ccd.z-............._ccccccc
cc3d.c........CC..Zz.cccccc
cccccc+c......Cc._z.dcc
 ....ez+.........c.d2cc
  @.c.ecc_..G..-ccccccc
   .1c.c.zZ...Zz.cccccc
    ...cd.z_.-z.dcc
     @.c2d.cec.d3cc
      .cccccccccccc
       cccccccccccc
ENDMAP

## Yred has crafted an undead forest in mockery of Fedhas.
NAME:    gammafunk_crypt_yreds_forest
DEPTH:   Crypt
ORIENT:  float
TAGS:    patrolling
SUBST:   E = t.
SHUFFLE: HIJKLM
SUBST:   HIJKL = t, M = ., F = 1:30 0
NSUBST:  2 = 3:2 / *:3
FTILE:   _567$*|+ = floor_tomb
TILE:    t = dngn_tree_dead
COLOUR:  t = brown
MONS:    flayed ghost / phantasmal warrior
MONS:    vampire mage / vampire knight
MONS:    jiangshi / eidolon / shadow wraith / freezing wraith
MONS:    ancient champion / w:20 ghoul
MONS:    w:20 death knight / w:20 bone dragon / revenant
MONS:    profane servitor
KFEAT:   7 = altar_yredelemnul
KFEAT:   O = granite_statue
KFEAT:   P = granite_statue
TILE:    c = dngn_stone_dark
TILE:    O = dngn_statue_wraith
TILE:    P = dngn_statue_demonic_bust

: set_feature_name("tree", "dead tree")
MAP
......................................
.EEEEE........EEEEEEE.....EEEE...EEEE.
.Etttttt......ttttttttttt.tttt...tttE.
.Ettttttt...ttttttttttttttttt..tttttE.
.Etttttttttttttttttttttttttt..ttttttE.
......ttttttttttt.....ttttttt2.Fttt...
.......FKKKKKKt.........ttttttL.tttt..
.Ettt.2KKKKKKK..cP.4.Pc..tLLLLLttttt..
.Etttttttttt...ccc+++ccc...LttttttttE.
.Ettttttttt..cccc_____cccc..ttttt.ttE.
.Etttt2HHH..Oc|$c_____c$|cO..ttt.2.tE.
.Ettt.FHHH..4c*$+_675_+$*c...MMMF.....
......tttt..Oc|$c_____c$|cO..MMM.tt...
.....tttttt..cccc_____cccc..ttttttttE.
.EttttttIIII...ccc+++ccc...tttttttttE.
.EttttttIIIII...cP.4.Pc...JJJJJJ2..tE.
.Etttt.F2Itttt...........tJJJJJF....E.
.Ettttt...ttttttt.....tttttttttttt....
....tttt..ttttttttttttttttttttttttt...
....tttt..ttttttttttttttttttttttttt...
.....tttt...tttttttttttttt...tttttttE.
......EEEE...EEEEEEEEEEEE......EEEEEE.
......................................
ENDMAP

NAME:    hangedman_crypt_dual_shrines
TAGS:    no_monster_gen no_item_gen patrolling
DEPTH:   Crypt
# Choose two of the following:
# Yred nearly-all-melee set, Kiku necro-casters set, ghosts set, tomb set.
MONS:    minotaur zombie / ettin zombie / skeletal warrior w:20
MONS:    death knight, bone dragon w:14 / profane servitor
MONS:    necromancer / vampire mage w:6 / burial acolyte w:2
MONS:    vampire mage / deep elf death mage, lich / reaper w:2
MONS:    shadow wraith / phantasmal warrior / ghost crab w:4
KMONS:   8 = eidolon / flayed ghost
KMONS:   9 = revenant
KMONS:   A = guardian mummy w:7 / ushabti w:3 / \
             skeleton w:8 / laughing skull band w:6
KMONS:   B = ancient champion
KMONS:   C = mummy priest
KMONS:   0 = zombie
ITEM:    any weapon good_item ego:draining, any weapon ego:pain
ITEM:    scroll of torment ident:type, randbook disc:necromancy numspells:3
ITEM:    staff of death ident:type
ITEM:    amulet of regeneration randart good_item
KITEM:   $ = $ no_pickup
KFEAT:   D = altar_yredelemnul
KFEAT:   E = altar_kikubaaqudgha
SHUFFLE: 123D / 456E / 789D / ABCE, defghijk
SUBST:   * = * |:2, F = c..
MAP
        ccccccccccccc
        c0.v$$1cccccc
        cc0v...ccc*cccc
        c..v.c.cc2dDccc
        cc.v.c.....d*cc
        c..+.....F.3ccc
        cc.v....F..cccc
  ccccccc..+.c.....cccc
 .c.c.c....v..V......1c
@..........v.c.c..cc.$c
cvvvvvvvvvvv1........$c
c$........4vvvvvvvvvvvc
c$.cc..c.c.v..........@
c4......V..+....c.c.c.
cccc.....c.v..ccccccc
cccc..F....+.cc
ccc6.F.....v..c
cc*e.....c.v.cc
cccEe5cc.c.v..c
cccc*ccc...v0cc
  cccccc4$$v.0c
  ccccccccccccc
ENDMAP

NAME: cheibrodos_crypt_down_in_the_bonehoard
DEPTH: Crypt, !Crypt:$
TAGS: no_item_gen no_monster_gen no_pool_fixup
ORIENT: float
MONS: lich, mummy priest, freezing wraith / w:5 flayed ghost
KITEM: 1 = %
KFEAT: A = altar_kikubaaqudgha
SHUFFLE: 12
NSUBST: . = 8:0
NSUBST: " = 1:| / 5=*$ / *:%
MAP
          ccccc       ccccc
         cc.G.cc     cc.G.cc
        cc.....ccccccc.....cc
        c..0....c...c....0..c
        cG..9...+.0.+...0..Gc
  ccccccc....0..c...c..0....c
 cc.....cc.....ccccccc.....cc
cc.ccccc.cc...ccWWWWW+c...cc
c.cc"""cc.cc+ccWWwwwWWccccc
c.c""""1c.c...cWww3wwWc....
c.+""A""c.+.0GcWw3V3wWcG0.@
c.c""""1c.c...cWww3wwWc....
c.cc"""cc.cccccWWwwwWWcc+cc
cc.ccccc.cc...c+WWWWWcc...cc
 cc.....cc.....ccccccc.....cc
  ccccccc....0..c...c..0....c
        cG..9...+.0.+...0..Gc
        c..0....c...c....0..c
        cc.....ccccccc.....cc
         cc.G.cc     cc.G.cc
          ccccc       ccccc
ENDMAP

NAME: cheibrodos_crypt_eye_of_stone
TAGS: no_item_gen no_monster_gen
DEPTH: Crypt, !Crypt:$
ORIENT: float
MONS: glass eye / curse skull, obsidian statue / orange crystal statue
MONS: ancient champion, skeletal warrior
SHUFFLE: AB / CD
SUBST: A = G, B = 1, C = ., D = 2
KFEAT: - = altar_kikubaaqudgha
SUBST: * = *%
MAP
          cccc
         cc$*cc
      cccc..$*c
   cccc......$c
  cc.4.......cc
 cc.3.......ccc
 c..4......ccVcc
cc.4.cAc...cV...
c-3..ABA...+...@
cc.4.cAc...cV...
 c..4......ccVcc
 cc.3.......ccc
  cc.4.......cc
   cccc......$c
      cccc..$*c
         cc$*cc
          cccc
ENDMAP

# deep troll shamans will buff undead trolls too!
NAME:    skrybe_necro_troll_1
TAGS:    no_monster_gen uniq_necro_troll
DEPTH:   Crypt, !Crypt:$
KMONS:   S = deep troll shaman
KFEAT:   S = ] / } / )
# either all spectrals, or regular necromancer band
MONS:    spectral deep troll w:30 / spectral iron troll
MONS:    deep troll skeleton w:18 / deep troll zombie w:18 / \
         deep troll simulacrum w:9 / iron troll skeleton w:6 / \
         iron troll zombie w:6 / iron troll simulacrum w:3
NSUBST:  T = 3:1 / 2 = 1. / *:.
SHUFFLE: 12
MAP
ccccccccccc
cGT..S..TGc
cc.......cc
cGT.....TGc
cc.......cc
cGT.....TGc
cc.......cc
cccc+++cccc
ENDMAP

NAME:    skrybe_necro_troll_2
TAGS:    uniq_necro_troll
DEPTH:   Crypt
KMONS:   1 = deep troll shaman
# just spectral trolls, since they aren't affected by the water
KMONS:   2 = spectral deep troll w:30 / spectral iron troll
KITEM:   * = *
KFEAT:   *12 = W
NSUBST:  T = 3:2 / 2=2W / *:W
MAP
  ccc
 ccGcc
cc***cc
cWT1TWc
cTWTWTc
cWWWWWc
cWWWWWc
c.....c
cc+++cc
ENDMAP

NAME: cheibrodos_crypt_3hun_7po
TAGS: no_item_gen no_monster_gen no_trap_gen
DEPTH: Crypt
ORIENT: float
MONS: jiangshi, vampire knight
NSUBST: - = 1:| / 2=|* / 5=*% / 8=%$
MAP
     ccccccccc
   cccc..1..cccc
   c1c..c.c..c1c
 cccc....2....cccc
 c1c...........c1c
ccc..2..===..2..ccc
cc.....==.==.....cc
c1.....=...=.....1c
c+cccccc...cccccc+c
c-----n.....n-----c
cc---cc.....cc---cc
 ccccc...@...ccccc
ENDMAP

NAME:   cheibrodos_crypt_cold_storage
TAGS:   no_item_gen no_monster_gen
DEPTH:  Crypt
ORIENT: east
MONS:   freezing wraith, shadow wraith
KMONS:  | = ancient lich / dread lich
: local rc = "good_item ego:cold_resistance ident:type"
: local f = "good_item ego:freezing ident:type"
: local lt = "plate armour " .. rc .. " / " ..
:            "ice dragon scales good_item / " ..
:            "crystal plate armour " .. rc .. " w:5 / " ..
:            "executioner's axe " .. f .. " w:5 / battleaxe " .. f .. " / " ..
:            "lajatang " .. f .. " / triple sword " .. f .. " / " ..
:            "great sword " .. f .. " / double sword " .. f .. " / " ..
:            "great mace " .. f .. " / eveningstar " .. f .. " / " ..
:            "bardiche " .. f .. " / quick blade " .. f .. " w:5"
: kitem("| = " .. lt .. ", " .. lt)
NSUBST: " = 4:1 / 3=1.. / 2:2 / 2=2..
KPROP:  `V = no_tele_into
MARKER: V = lua:fog_machine { cloud_type = "freezing vapour", pow_min = 0, \
                              pow_max = 10, delay = 20, size_min = 3, \
                              size_max = 3, walk_dist = 2, excl_rad = 0 }
MAP
          cccccccccccc
          cccccccccccc
  ccccccc cc"""""n``cc
  cccccccccc"""""n`Vcc
.ccc...ccccc"""""n``cc
.......""""""""""ccccc
@....G.""""""""""=|ccc
.......""""""""""ccccc
.ccc...ccccc"""""n``cc
  cccccccccc"""""n`Vcc
  ccccccc cc"""""n``cc
          cccccccccccc
          cccccccccccc
ENDMAP

NAME: cheibrodos_crypt_draghalla
TAGS: no_item_gen no_monster_gen
DEPTH: Crypt, !Crypt:$
ORIENT: float
# Monster density might be off here
MONS: fire dragon skeleton / quicksilver dragon skeleton w:5 \
      / golden dragon skeleton w:2
MONS: flayed ghost w:5 / phantasmal warrior, skeletal warrior
MONS: hell knight / necromancer w:2, bone dragon, \
      reaper ; halberd itemname:scythe tile:wpn_scythe wtile:scythe ego:flaming
MONS: lich
KMONS: A = fire dragon skeleton / quicksilver dragon skeleton w:5 \
           / golden dragon skeleton w:2
KFEAT: A = l
NSUBST: - = 1:1 / 2=1. / 2:2 / 1=2. / 1:3 / 1=3. / 6:4 / 2=4.
NSUBST: " = 4:A / 2=Al / *:l, ' = 2:1 / 2=2. / 2:6, ; = 1:5 / 1=6. / 1:7
NSUBST: ` = 1:| / 2=|* / 5:* / 2=*% / *:$
MAP
  xxxxxxxxxxxxxxxxxxxxxxxxxxx
 xxllllllxxxxxx""""""""""""xx
 xllxxxGllxxxx"""""""""""""xx
xxlxx`xx'llxxx""--------"""xx
xllx```x'.llxx"----------""xx
xlxx```x'.llxx"---""""---""xx
xlx...xx'..lll"--""""""--""xx.
xlx;;.x.....ll.--""xx""--."xG.
xln;;.+........--""xx""--....@
xln;;.+........--""xx""--....@
xlx;;.x.....ll.--""xx""--."xG.
xlx...xx'..lll"--""""""--""xx.
xlxx```x'.llxx"---""""---""xx
xllx```x'.llxx"----------""xx
xxlxx`xx'llxxx""--------"""xx
 xllxxxGllxxxx"""""""""""""xx
 xxllllllxxxxxx""""""""""""xx
  xxxxxxxxxxxxxxxxxxxxxxxxxxx
ENDMAP

NAME:    nicolae_crypt_knee_deep_in_the_dead
TAGS:    transparent no_monster_gen
DEPTH:   Crypt:2-
KMONS:   0 = 0 zombie / 0 skeleton / 0 simulacrum / 0 spectral thing
KMONS:   9 = 9 zombie / 9 skeleton / 9 simulacrum / 9 spectral thing
KMONS:   8 = 8 zombie / 8 skeleton / 8 simulacrum / 8 spectral thing
SHUFFLE: {[(<
SUBST:   - = 8 9:30 0:120 .:20
MAP
xxxxxxxxxx
x-----...x
+-----.{.x
+-----.G.x
+-----.[.x
x-----...x
xxxxxxxxxx
ENDMAP

# https://www.youtube.com/watch?v=6j3StwEVchQ
NAME:   nicolae_crypt_knochenhaus
TAGS:   patrolling transparent
DEPTH:  Crypt
WEIGHT: 5
ORIENT: float
KITEM:  3 = * / |
# The regular-weight skellingtons move at speed 10 or more. The lower-weighted
# skellingtons hit hard and/or have something tactical like trample or reach.
KMONS:  1 = anaconda skeleton / caustic shrike skeleton / harpy skeleton / \
        storm dragon skeleton / juggernaut skeleton / pearl dragon skeleton / \
        fenstrider witch skeleton / guardian serpent skeleton / \
        quicksilver dragon skeleton / shard shrike skeleton / \
        20-headed hydra skeleton w:5 / alligator snapping turtle skeleton w:5 /\
        apis skeleton w:5 / dire elephant skeleton w:5 / titan skeleton w:5 / \
        golden dragon skeleton w:5 / hellephant skeleton w:5
KMONS:  2V = skeletal warrior w:20 / laughing skull / curse skull w:5 / \
        ancient champion band / nothing w:20
KMONS:  3 = bone dragon / revenant
KFEAT:  V = V / .
KFEAT:  3 = V
SUBST:  G = GG., H = G, 1 = 11112 .:30, 2 = 2:23 3:2
SUBST:  L = $%., M = %*, N = %***, % = %%*, * = **|
NSUBST: ap = 1=c, pq = 1=c, apq = *=+, rs = 1=c, sy = 1=c, rsy = *=+
NSUBST: P = c / +, Q = c / +, R = + / +c / c, S = + / +c / c
NSUBST: z = +c / c, Z = + / +c / c
MAP
ccccccccccccccccccccccccccc
cG.MGM.GcG.1.GcG.1.GcG.1.Gc
c.1...1.c.L.L.c.....c.....c
cM.2N2..a1.V..R..V..P..V.1c
cG.N3N..c.L.L.c.....c.....c
cM.2N2..cG....c.....c....Gc
c.1...1.cccaccccPcccccccPcc
cG.M.M..p....Gc...c...c...c
ccccqcccc.L.L.R.1.P.1.P.1.c
cG.M.M.Gc1.V..c...c...c...cH
c.1...1.q.L.L.ccZccczccc+cc.
cM.2N2..cG.1..R...c...c...c.
cG.N3N.Gccccccc.1.Z.1.+.1.+@
cM.2N2..cG.1..S...c...c...c.
c.1...1.y.L.L.ccZccczccc+cc.
cG.M.M.Gc1.V..c...c...c...cH
ccccycccc.L.L.S.1.Q.1.Q.1.c
cG.M.M..s....Gc...c...c...c
c.1...1.cccrccccQcccccccQcc
cM.2N2..cG....c.....c....Gc
cG.N3N..c.L.L.c.....c.....c
cM.2N2..r1.V..S..V..Q..V..c
c.1...1.c.L.L.c.....c.....c
cG.MGM.GcG.1.GcG.1.GcG.1.Gc
ccccccccccccccccccccccccccc
ENDMAP

# A very specific game reference makes for a strange ambush bubble.
NAME:    tekkud_devil_daggers
TAGS:    no_monster_gen no_item_gen no_trap_gen no_pool_fixup no_descent
DEPTH:   Crypt
ORIENT:  float
WEIGHT:  5
ITEM:    scroll of enchant weapon ident:type, blade talisman
ITEM:    mundane dagger, dagger good_item
: local q = "quick blade randart ego:"
: item(q .. "draining / " .. q .. "vampirism / " .. q ..
:           "pain / " .. q .. "distortion")
MONS:    laughing skull, curse skull
MONS:    spectral demonic crawler, wolf spider zombie
MONS:    culicivora zombie / redback zombie / \
         jumping spider zombie / tarantella zombie
MONS:    spectral tentacled monstrosity
KMONS:   7 = kraken zombie
KFEAT:   7 = w
NSUBST:  2 = 1:2 / 1:1112 / *:1
SHUFFLE: {e
: if you.depth() == 1 then
SUBST:  { = })]
: elseif you.depth() == dgn.br_depth(you.branch()) then
SUBST:  { = {([
: else
SUBST:  { = {([})]
: end
KPROP:  g = bloody
MAP
    ccccccccccccccccc
   ccccccccccccccccccc
  cccc..g.......g..cccc
 cccc...............cccc
cccc..1...f...f...1..cccc
ccc...................ccc
cc...4......{......3...cc
ccg.f.f.f.f...f.f.f.f.gcc
cc..........e..........cc
cc.2..7..5........7..2.cc
cc........f...f........cc
cc.....................cc
cc......f.......f......cc
cc.....................cc
cc....f...........f....cc
cc.2...........5.....2.cc
cc..f...............f..cc
cc.....................cc
ccg..3.............4..gcc
ccc.........6.........ccc
cccc..2...d...d...2..cccc
 cccc.......h.......cccc
  cccc.............cccc
   cccccccccnccccccccc
    ccccccccncccccccc
            @
ENDMAP

NAME:    nicolae_crypt_booths_of_the_dead
TAGS:    transparent
DEPTH:   Crypt
SHUFFLE: DE/FH, DE, FH
SUBST:   D : x, E : ....x, F : xxxx., H : ., - = 0%...
MAP
xxxxxxxxxxxxxxxxxxxxxxxx
x-...FF....HH....FF...-x
x-...HH....FF....HH...-x
xx..xxxx..xxxx..xxxx..xx
x-..-xx-..-xx-..-xx-..-x
x-..-xx-..-xx-..-xx-..-x
xx..xxxx..xxxx..xxxx..xx
x-...DD....EE....DD...-x
x-...EE....DD....EE...-x
xx..xxxx..xxxx..xxxx..xx
@...-xx-..-xx-..-xx-...@
@...-xx-..-xx-..-xx-...@
xx..xxxx..xxxx..xxxx..xx
x....EE....DD....EE...-x
x....DD....EE....DD...-x
xx..xxxx..xxxx..xxxx..xx
x-..-xx-..-xx-..-xx-..-x
x-..-xx-..-xx-..-xx-..-x
xx..xxxx..xxxx..xxxx..xx
x-...HH....FF....HH...-x
x-...FF....HH....FF...-x
xxxxxxxxxxxxxxxxxxxxxxxx
ENDMAP

NAME:  nicolae_crypts_crumbling_nooks
TAGS:  transparent
DEPTH: Crypt
KMONS: a = 0 / 9 w:5 / nothing w:30
KITEM: a = % / nothing w:40
SUBST: ' = .x, ` = .xx, - = .xxx
MAP
xxxxxxxxxxxxxxx
-a-a-a-a-a-a-a-
`.`.`.`.`.`.`.`
'.'.'.'.'.'.'.'
@.............@
@.............@
'.'.'.'.'.'.'.'
`.`.`.`.`.`.`.`
-a-a-a-a-a-a-a-
xxxxxxxxxxxxxxx
ENDMAP

NAME:   nicolae_crypt_deepening_niches
TAGS:   transparent
DEPTH:  Crypt
SUBST:  G = GGG., 0 = 00.
MAP
                xxxxx
                xG0Gxxxxx
                x.*.xG0Gxxxxx
                x.9.x.%.xG0Gxxxxx
                x...x...x.$.xG0Gx
@...............................@
xG0Gx.$.x...x...x
xxxxxG0Gx.%.x.9.x
    xxxxxG0Gx.*.x
        xxxxxG0Gx
            xxxxx
ENDMAP

NAME:  nicolae_crypt_diagonal_loculi
TAGS:  transparent
DEPTH: Crypt
SUBST: - = Gx%%000....., 0 = 0009, % = %%%*, + = +:90 ., ' = x:19 .:1
MAP
 xxxx
 '--xxxx
 '..'--xxxx
 '..'..'--xxxx
@''+'..'..'--xxxx
@...''+'..'..'--xxxx
'......''+'..'..'--x
'+''......''+'..'..'
'..'+''......''+'..'
'..'..'+''......''+'
x--'..'..'+''......'
xxxx--'..'..'+''...@
   xxxx--'..'..'+''@
      xxxx--'..'..'
         xxxx--'..'
            xxxx--'
               xxxx
ENDMAP

NAME:   nicolae_crypt_ex-fountain
TAGS:   transparent no_pool_fixup
DEPTH:  Crypt
KMONS:  1 = bog body / freezing wraith / ghost crab / bloated husk
NSUBST: ~ = W / w
SUBST:  ' = .www, w = wW, 1 = 1.
MAP
xxxxxx@xxxxxx
xx.1.x.x.1.xx
xG.'.....'.Gx
xx.'.~~~.'.xx
xG1ww~V~ww1Gx
xx.'.~~~.'.xx
xG.'.....'.Gx
xx.1.x.x.1.xx
xxxxxx@xxxxxx
ENDMAP

NAME:  nicolae_crypt_grand_chamber
TAGS:  transparent
DEPTH: Crypt
MONS:  guardian mummy / death scarab w:5 / ushabti w:5
MONS:  mummy priest
SUBST: 1 = 11..., * = ***|
MAP
xxxxxxxxxxxxxxxxxxxxxx
xxxx*x.x.x.xxxxxxxxxxx
xxx*..1.1.1.xxxxxxxxxx
xx*x.x.x.x.x.x.xxxxxxx
x*..1.1.1.1.1.1.xxxxxx
xx.x.....x.x.x.x.x.x.x
x*..1.2.1.1.1.1......+
xx.x.....x.x.x.x.x.x.x
x*..1.1.1.1.1.1.xxxxxx
xx*x.x.x.x.x.x.xxxxxxx
xxx*..1.1.1.xxxxxxxxxx
xxxx*x.x.x.xxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxx
ENDMAP

NAME:    nicolae_crypt_grave_offerings
TAGS:    transparent
DEPTH:   Crypt
KITEM:   a = $ / % / * / | w:5
KMONS:   a = 0 / 9 w:5 / nothing w:30
SHUFFLE: DEFH, JK
SUBST:   D : @, E : @x, F : @xx, H : @xxx, J : x.., K : ., L : x..
MAP
   xxxEEExxx
  xx.......xx
 xx.........xx
xx...JK.KJ...xx
x...LxxGxxL...x
D....xaaa+....F
D....xaaa+....F
x...LxxGxxL...x
xx...JK.KJ...xx
 xx.........xx
  xx.......xx
   xxxHHHxxx
ENDMAP

NAME:  nicolae_crypt_knight_watch
TAGS:  transparent
DEPTH: Crypt
KMONS: KL = death knight / hell knight / vampire knight
KITEM: L = * / | w:5
SUBST: D : x., E : x., F : x., % = %%*, " = +--, - : +xx
MAP
   xxxxxxx
 ..D.E.E.D..
 ...........
xD.F.xKx.F.Dx
x...Kx+xK...x
xE.xxx%xxx.Ex
x..K-%L%-K..x
xE.xxx%xxx.Ex
x...Kx"xK...x
xD.F.xKx.F.Dx
 ...........
 ..D.E.E.D..
   xxxxxxx
ENDMAP

NAME:   nicolae_crypt_lichyard
TAGS:   transparent
DEPTH:  Crypt
MONS:   lich, ancient lich / dread lich
NSUBST: 1 = 3 = 111112 / *:1
SUBST:  t = ttt., G = GGG., ` = ._, L = LL...
CLEAR:  _
TILE:   t = dngn_tree_dead, G = dngn_gravestone
COLOUR: t = brown, G = lightgrey
: set_feature_name("tree", "dead tree")
: set_feature_name("granite_statue", "gravestone")
MAP
  `````` ``````
 `.....```..t..`
`.G..G..G..G..G.`
`..Ltt......L...`
`..tttt......tt.`
`.GttGt.G..G.tG.`
`...tt...L......`
``..............`
 `G..G..G..G..G.`
``.t.......tt...`
`...L......tt..``
`.G..G..G..GL.G`
 `.....t.......`
  `````````````
ENDMAP

NAME:  nicolae_crypt_lounge_for_the_living
TAGS:  transparent
DEPTH: Crypt
KMONS: L = necromancer / death knight / deep elf death mage
SUBST: ' = L:7 .:17
MAP
xxxxxxxxxx
x''x''x''x
x''x''x''x
G..G..G..G
@........@
@........@
G..G..G..G
x''x''x''x
x''x''x''x
xxxxxxxxxx
ENDMAP

NAME:    nicolae_crypt_lurching_hallway
TAGS:    transparent
DEPTH:   Crypt
KMONS:   a = 0 / nothing
SHUFFLE: DH/EF, JM/KL, NQ/OP
NSUBST:  E = a / x, F = a / x, K = a / x, L = a / x, O = a / x, P = a / x
SUBST:   DHJMNQ = x
MAP
xxxxxxxxxxxxxxxxxx
x................x
+.DEFH.JKLM.NOPQ.+
+.DEFH.JKLM.NOPQ.+
x................x
xxxxxxxxxxxxxxxxxx
ENDMAP

NAME:    nicolae_crypt_more_like_crabt
TAGS:    transparent
DEPTH:   Crypt
KMONS:   K = ghost crab
KFEAT:   K = w
SHUFFLE: DE
NSUBST:  - = W / Wxxx, w = 2=K / 2=Kww / w
SUBST:   D = xxxx., E = ., ` = xxW
MAP
.............
.............
....DEDED....
...E`---`E...
..D`xwwwx`D..
..E-wwwww-E..
..D-wwwww-D..
..E-wwwww-E..
..D`xwwwx`D..
...E`---`E...
....DEDED....
.............
.............
ENDMAP

NAME:  nicolae_crypt_skeletal_stairs
TAGS:  transparent patrolling luniq_staircase
DEPTH: Crypt, !Crypt:$
KMONS: 1 = skeletal warrior
KMONS: 2 = ancient champion
SUBST: } = }]), S = 112
MAP
xxxxxxxxxx
xxxxxxS.xx
xG...x...x
xG.}.+.S.+
xG...x...x
xxxxxxS.xx
xxxxxxxxxx
ENDMAP

NAME:    nicolae_crypt_sons_of_ramesses
TAGS:    transparent
DEPTH:   Crypt
KITEM:   1 = % / nothing
KITEM:   2 = *
KMONS:   1 = mummy / 8 skeleton / guardian mummy
KMONS:   2 = mummy priest / lich / ancient lich w:2 / dread lich w:2 / \
             royal mummy w:2
SHUFFLE: DEFH, JKLM
NSUBST:  D = + / x, E = +xxx / x, F = +xxx / x, H = +xxx / x
NSUBST:  J = + / x, K = +xxx / x, L = +xxx / x, M = +xxx / x, ` = 1=2
SUBST:   - = +++++++., ` = Gx1112%$....
MAP
xDDDxxxxxxxxxxxxxJJJx
E...xxxxxxxxxxxxx...K
E.G.x`x`x`x`x`x`x.G.K
E...x-x-x-x-x-x-x...K
x.G.+...........+.G.x
F...x-x-x-x-x-x-x...L
F.G.x`x`x`x`x`x`x.G.L
F...xxxxxxxxxxxxx...L
xHHHxxxxxxxxxxxxxMMMx
ENDMAP

NAME:    nicolae_crypt_tucked_away
TAGS:    transparent allow_dup
DEPTH:   Crypt
SHUFFLE: DEF, HJK
NSUBST:  D = . / x, E = Gxx. / x, F = Gxx / x, \
         H = . / x, J = Gxx. / x, K = Gxx / x
SUBST:   0 = 0...
MAP
xxxxxxxxxxx
x0x0x0x0x0x
x.........x
xDDDEEEFFFx
...........
xHHHJJJKKKx
x.........x
x0x0x0x0x0x
xxxxxxxxxxx
ENDMAP

NAME:    nicolae_crypt_tutankhamun
TAGS:    transparent
DEPTH:   Crypt:2-
KMONS:   D = guardian mummy / skeletal warrior / ancient champion / eidolon
KMONS:   M = mummy priest / lich / ancient lich w:2 / dread lich w:2 / \
             royal mummy w:2
KMONS:   S = ushabti
KMONS:   _ = mummy priest
KFEAT:   _ = altar_kikubaaqudgha / altar_yredelemnul
SUBST:   D = D., * = ***|, { = {[(
NSUBST:  Z = S / SDD / D
MAP
xxxxxxxxxxxxxxxxxx
xx.......+..%*xxxx
xx..GZG..x.D%*xxxx
xx..ZMZ..xDS%_xxxx
xx..GZG..x.D%*xxxx
xx.......x..%*xxxx
xxxxx....xxxxxxxxx
xxxxx....xxxxxxxxx
xxxxx....xxxxxxxxx
xxxxx....xG.....Gx
x%D.x....+...{...+
x%D.x....xG.....Gx
x%D.+....xxxxxxxxx
x%D.x....xxxxxxxxx
xxxxxxxxxxxxxxxxxx
ENDMAP

NAME:  nicolae_crypt_wrong_turn
TAGS:  transparent
DEPTH: Crypt
SUBST: V : VGx...
MAP
xxxxxxxxxxxxxxx@@x
xGGxxxx....xxxx..x
x..xxxV....Vxxx..x
x..xx........xx..x
x.......88.......x
x.......88.......x
x..xx........xx..x
x..xxxV....Vxxx..x
x..xxxx....xxxxGGx
x@@xxxxxxxxxxxxxxx
ENDMAP

NAME:    nicolae_crypt_vampire_mansion
TAGS:    transparent
DEPTH:   Crypt
KMONS:   d! = shadow wraith / freezing wraith / flayed ghost / eidolon / \
              nothing w:40
KMONS:   pq = vampire knight
KMONS:   rs = vampire mage
KMONS:   z = ghoul
KMONS:   R = vampire / jiangshi / ghoul
KMONS:   LY = lich / ancient lich w:5 / dread lich w:5
KMONS:   Q = curse skull
KITEM:   a = any weapon good_item / any armour good_item
KITEM:   d = any book / any scroll / nothing w:5
KITEM:   e = any potion good_item
KITEM:   f = any jewellery good_item / any wand good_item w:5 / \
             any magical staff good_item w:3
KITEM:   ' = any randbook
KFEAT:   - = iron_grate
KFEAT:   _ = altar_yredelemnul / altar_kikubaaqudgha / altar_makhleb / \
             altar_dithmenos
KFEAT:   Y = Y
SHUFFLE: pqrs, JK
SUBST:   J = ., K = G, * = *., R = RRRR!!!!.
NSUBST:  D = + / x, E = + / x, F = +x / +, H = +x / +, p = p / z / 2=a / .
NSUBST:  q = q / a* / e% / x. / ., r = r / 2=x / %, s = s / Q / _ / f / f'
NSUBST:  Z = L / 3=x / 3=x. / |
MAP
xxxxxxxxxxxxxxxxxxxxx
xeeeD.x|xR+R....Eeeex
xxDxx.....-.ZZZ.xxExx
x*.*x..Y..+.ZZZ.x*.*x
x.R.F.....-.ZZZ.H.R.x
x*.*xRx|x.+....Rx...x
xxFxxxxxx+x+xxxxx*.*x
xJ.Kxp.px...xq.qxxHxx
xKRJxp..+...+..qxd.dx
xJ.Kxp.px...xq.qxx.xx
xKRJxxxxx...xxxxxdRdx
xJ.Kxs.sx...xr.rxx.xx
xxFxxs..+...+..rxd.dx
x...xs.sx...xr.rxxHxx
x.R.xxxxx...xxxxx...x
-...xG..G...G..Gx.R.-
x...+...........+...x
xx-xx.R.x.R.x.R.xx-xx
 ...x...........x...
 @..-...x...x...-..@
    xxxxx+++xxxxx
ENDMAP

##############################################################################
# <<5>> Crypt end vaults
##############################################################################

##############################################################################
#       churchlike map with customizeable monster sets
#
NAME:   church_of_pain_bobbens
ORIENT: northwest
TAGS:   no_monster_gen no_item_gen layout_city
PLACE:  Crypt:$
# MONSTER LAYOUT
# boss (1)
# boss guard (2)
# secondary boss (3)
# support (4)
# primary guard (5)
# advanced guard (6)
# in tombs (7)

# 30% - skeletal (standard)
# 30% - vampire (pretty hardcore, with easier bosses)
# 30% - ghost
# 10% - mummy (pretty evil)

# skeletal monsters
: local brnd = crawl.random2(13)
: if brnd > 8 then
MONS:   ancient lich / dread lich
MONS:   bone dragon
MONS:   lich
MONS:   ancient champion
MONS:   skeletal warrior
MONS:   laughing skull
MONS:   w:20 skeletal warrior / w:50 skeleton / nothing
# vampire layout
: elseif brnd > 4 then
KMONS:  1 = vampire knight / Jory w:5, vampire knight
KMONS:  2 = phantasmal warrior
KMONS:  3 = vampire knight w:15 / \
            dancing weapon ; long sword ego:vampirism ident:type
KMONS:  4 = vampire mage
KMONS:  5 = skeletal warrior / phantasmal warrior
KMONS:  6 = vampire knight w:15 / jiangshi
KMONS:  7 = vampire knight / skeletal warrior / w:15 zombie / wraith / w:5 nothing
# ghost layout
: elseif brnd > 0 then
MONS:   curse skull
MONS:   revenant
MONS:   lich
MONS:   eidolon / flayed ghost
MONS:   phantasmal warrior / shadow wraith w:6
MONS:   weeping skull
MONS:   wraith / freezing wraith / shadow wraith / spectral thing / \
        w:20 shadow / nothing
# mummy layout - rare
: else
MONS:   royal mummy
MONS:   sphinx
MONS:   mummy priest
MONS:   mummy priest
MONS:   guardian mummy w:7 / ushabti w:3
MONS:   weeping skull
MONS:   mummy / guardian mummy / w:5 nothing
: end
NSUBST: / = 1:| / 2:* / *:%
NSUBST: %*| = 1:d / 1:h
: crypt_loot_plus(_G)
MAP
cccccccccccccccvvvvvvvvvvvvvvvvvccccccccccccccc
ccccccccccccccvv..WWWWWWWWWWW..vvcccccccccccccc
cccccccccccccvv..WWWWWWWWWWWWW..vvccccccccccccc
cccccccccccccv...WWWb.bkb.bWWW...vccccccccccccc
cccccccccccccv...WWb$$|*|$$bWW...vccccccccccccc
cccccccccccccv...WW.$/|1|/$.WW...vccccccccccccc
cccccccccccccv...WWb$$|*|$$bWW...vccccccccccccc
cccccccc/.cccv...WWWb.b.b.bWWW...vccc./cccccccc
cccccccc...ccvv..WWWWWWWWWWWWW..vvcc...cccccccc
cccccccc.../ccvv..WWWWWWWWWWW..vvcc/...cccccccc
ccccccccc+cccccv...............vccccc+ccccccccc
cccU......cccccvv....2...2....vvccccc......Uccc
ccc..3....ccccccvv.....6.....vvcccccc....3..ccc
ccc.......ccccccvvv.6.....6.vvvcccccc.......ccc
ccc.......ccccccvvvvv.....vvvvvcccccc.......ccc
ccc...5.5.ccccccvvvvvvv+vvvvvvvcccccc.5.5...ccc
ccccccc+ccccccccvcccccU.Ucccccvcccccccc+ccccccc
ccccccc.ccccccccvc.U.cc+cc.U.cvcccccccc.ccccccc
ccccccc.ccccccccccG..F...F..Gcccccccccc.ccc
ccccccc.cccccccG....45...54....Gccccccc.ccc
ccccccc.......+.................+.......ccc
ccccccc.cccccccG.......C.......Gccccccc.ccc
ccccccc.c...+.ccc56.........65ccccccccc.ccc
ccccccc.c/..c.ccc5...........5ccccccccc.ccccc
ccccccc+ccc/c.+7+.............+7ccccccc+ccccccc
ccccc.5.5.ccccccc..c.......c..ccccccc.5.5.ccccc
ccc7+.....+7ccc7+.............+7ccc7+.....+7ccc
ccccc.....ccccccc..c.......c..ccccccc.....ccccc
ccc7+.....+7ccc7+.............+7ccc7+.....+7ccc
ccccc.....ccccccc..c.55555.c..ccccccc.....ccccc
ccc7+.....+7ccc7+.............+7ccc7+.....+7ccc
ccccc.....ccccccc..c6.6.6.6c..ccccccc.....ccccc
ccc7+.....+7ccc7+.............+7ccc7+.....+7ccc
ccccc.5.5.ccccccc..c.......c..ccccccc.5.5.ccccc
ccccccc+ccccccc7+.............+7+..cccc+ccccccc
cccccc...cccccccc..c.......c..ccc./ccc...ccc
cccccc.4.cccccc7+.............+7cccccc.4.ccc
cccccc./.cccccccc..c.......c..cccccccc./.ccc
ccccccccccccccc7+.............+7cccccccccccc
ccccccccccccccccc....c...c....cccccccccccccc
ccccccccccccccccc5.Vcc...ccV.5ccccc
cccccccccccccccccccccc...cccccccc
ccccccccccccccccc.............ccc
ccccccccccccccccc..vcccccccv..ccc
ccccccccccccccccc.............c
cccccccccccccccccccccc@c@cccccc
ENDMAP


##############################################################################
#       gigantic sort of aquatic base
#
NAME:   cryptofortress_bobbens
ORIENT: encompass
TAGS:   no_monster_gen no_item_gen no_pool_fixup no_rotate no_vmirror
PLACE:  Crypt:$
KFEAT:  A = w
KMONS:  A = laughing skull
KMONS:  B = ancient lich / dread lich
KMONS:  D = bone dragon
KMONS:  V = vampire knight
KMONS:  X = dancing weapon
KMONS:  L = lich
KMONS:  I = war gargoyle
KMONS:  G = crystal guardian
KMONS:  z = skeletal warrior
KMONS:  N = necromancer
KMONS:  H = hell knight
KMONS:  M = zombie / skeleton / w:5 necrophage
KMONS:  Q = titan zombie / fire dragon zombie / golden dragon zombie / ghoul
# red metal walls
COLOUR: a = red
SUBST:  a = +
COLOUR: r = red
TILE:   r = wall_hell
SUBST:  r = c
# emergency exits; most are closed
NSUBST: ? = 3=+ / v
# Tomb entrance
: if crawl.x_chance_in_y(5, 7) then
SUBST:  O = *
NSUBST: P = > / |**
: else
NSUBST: O = 1:>
SUBST:  P = |**
: end
KFEAT:  > = enter_tomb
# Loot randomisation
SUBST:  % = %$, * = *%, / = |**
NSUBST: *| = d / 1=h, k = k / $
: crypt_loot_plus(_G)
MAP
vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
vwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwv
vwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwv
vwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwv
vwwwwwwwwwwwwwwvvvvvvvvvvvvvvvvvvvvvvvvvvvvwwwwwwwwwwwwwwv
vwwwwwwwwwwwwwwv..........................vwwwwwwwwwwwwwwv
vwwwwwwwwwwwwwwv.........rrrrrrrr.........vAwwwwwwwwwwwwwv
vwwwwwwwwwwwwwwv.........r//||//r.........vAAAAwwwwwwwwwwv
vwwwwwwvvvv?vvvv......rrarr*/O*rrarr......v?v?v?v?vwwwwwwv
vwwwwwwv.......v......r$$*rr++rr*$$r......v.......vwwwwwwv
vwwwwww?....H..v.....rrrrOrkkkkrOrrrr.....v.......?wwwwwwv
vwwwwwwv....H..+........rrrkkkkrrr........+.Q..H..vwwwwwwv
vwwwwww?....H..v......L...rkkkkr...L......v....H..?wwwwwwv
vwwwwwwv.Q.vvvvv...rrr....rr++rr....rrr...v....H..vwwwwwwv
vwwwwww?...v...vv....rr.rrrU..Urrr.rr....vvv+v....?wwwwwwv
vwwwwwwv...v.X..vv....rrr........rrr....vv...vvvvvvwwwwwwv
vwwwwwwv...+.....vv....r.U..BC..U.r....vvvv.....+Mvwwwwwwv
vwwwwwwv...v..V.$vvv...rr........rr...vvvM+.....vvvwwwwwwv
vwwwwwwv...v...$Ov.vv...rrrU..Urrr...vv.vvv.....+Mvwwwwwwv
vwwwwwwv...vvvvvvv..vv....rr..rr....vv..vM+.....vvvwwwwwwv
vwwwwwwv...vvv...v...vv............vv...vvv.....+Mvwwwwwwv
vwwwwwwv...vv....+....vv..........vv....+....N..vvvwwwwwwv
vwwwwwwv...vNz...v.....vv........vv.....vvv.....+Mvwwwwwwv
vwwwwww?...v.M...v....G.vv......vvI.....vM+.....vvvwwwwwwv
vwwwwwwv...v....vv....vvvvvvvvvvvvvv....vvv.....+Mvwwwwwwv
vwwwwww?.......vv....vv.....ll.....vv....vvv+v..vvvwwwwwwv
vwwwwwAv......vv....vv..............vv....vvMv..+Mvwwwwwwv
vwwwwwA?.....vv....vv................vv....vvv..vvvwwwwwwv
vwwwAAAv.....v....vv.......N..N.......vv....vv..+Mvwwwwwwv
vwvvvvvvvvvvvvv+vvvvv+vv.Mzz..zzM.vv+vvvvv+vvvvvvvvvvvvvwv
vwvv.........v..I.v....v..........v....v.........v..%Ovvwv
vwvv.........v....v....v..........v....v.........v...$vvwv
vwvv.........+....v....v..........v....v.....X..V+....vvwv
vwvv....D....v....v..z.v..........v.z..v.........v....vvwv
vwvvv....z...v....+...Nvr........rvN...+......X..vvvvvvvwv
vwwvv........v....v..z.vrr......rrv.z..v.............vvwwv
vwwvvv.......+....v....vrrrr++rrrrv....v............vvvwwv
vwwwvv.......v....v....vrrUz..zUrrv....v............vvwwwv
vwwwvvvvvvvvvvvvvvvv+vvvrI......Irvvv+vvvvvvvvvvvvvvvvwwwv
vwwwwvvvP**$$v.........vrrrr++rrrrv.........v$$**Pvvvwwwwv
vwwwwwvvv/*$$+.........vrrwA..Awrrv.........+$$*/vvvwwwwwv
vwwwwwwvvv*$$v...X.....vrwAw..wAwrv...X.....v$$*vvvAwwwwwv
vwwwwwwwwvvv$v....G....vwwww..wwwwv..G......v$vvvAwwwwwwwv
vwwwwwwwwwvvvv.........vwwww..wwwwv.........vvvvwwwwwwwwwv
vwwwwwwwwwwwvvvv.......vwwww..wwwwv.......vvvvwwwwwwwwwwwv
vwwwwwwwwwwwwwvvvv.....vwwww..wwwwv.....vvvvwwwwwwwwwwwwwv
vwwwwwwwwwwwwwwwvvvvv..vwwww..wwwwv..vvvvvwwwwwwwwwwwwwwwv
vwwwwwwwwwwwwwwwwwwvvvvvwwww..wwwwvvvvvwwwwwwwwwwwwwwwwwwv
vwwwwwwwwwwwwwwwwwwwwwvvwwww..wwwwvvwwwwwwwwwwwwwwwwwwwwwv
vwwwwwwwwwwwwwwwwwwwwwwwwwww..wwwwwwwwwwwwwwwwwwwwwwwwwwwv
vwwwwwwwwwwwwwwwwwwwwwwwwwww..wwwwwwwwwwwwwwwwwwwwwwwwwwwv
vwwwwwwwwwwwwwwwwwwwwwwwwwww..wwwwwwwwwwwwwwwwwwwwwwwwwwwv
vwwwwwwwwwwwwwwwwwwwwwwwwwww..wwwwwwwwwwwwwwwwwwwwwwwwwwwv
vwwwwwwwwwwwwwwwwwwwwwwwwwww..wwwwwwwwwwwwwwwwwwwwwwwwwwwv
vwwwwwwwwwwwwwwwwwwwwwwwwwww..wwwwwwwwwwwwwwwwwwwwwwwwwwwv
vwwwwwwwwwwwwwwwwwwwwwwwAww....wwAwwwwwwwwwwwwwwwwwwwwwwwv
vwwwwwwwwwwwwwwwwwwwwwwwwww....wwwwwwwwwwwwwwwwwwwwwwwwwwv
vwwwwwwwwwwwwwwwwwwwwwwwww....{.wwwwwwwwwwwwwwwwwwwwwwwwwv
vwwwwwwwwwwwwwwwwwwwwwAwww.[....wwwAwwwwwwwwwwwwwwwwwwwwwv
vwwwwwwwwwwwwwwwwwwwwwwwwww..(.wwwwwwwwwwwwwwwwwwwwwwwwwwv
vwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwv
vwwwwwwwwwwwwwwwwwwwwwwwwAwwwwwwAwwwwwwwwwwwwwwwwwwwwwwwwv
vwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwv
vwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwv
vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
ENDMAP

##############################################################################
#       eye to eye with the evil
#
# XXX: Undiggable glass has been converted to grates.
NAME:   david_glass_crypt
ORIENT: float
TAGS:   no_item_gen no_rotate transparent
PLACE:  Crypt:$
MARKER: m = lua:portal_desc {wall_phase = 1}
KFEAT:  m = iron_grate
KMASK:  1 = opaque
MONS:   patrolling lich w:20 / patrolling ancient lich / patrolling dread lich
MONS:   bone dragon / curse skull / curse toe
MONS:   laughing skull / skeletal warrior / skeleton
MONS:   ancient champion
KMONS:  F = orange crystal statue / obsidian statue
KITEM:  | = | no_pickup
KFEAT:  ^ = alarm trap
SUBST:  3 = 3., F = G:99 F:1
{{
lua_marker("|",
           Triggerable.synchronized_markers(
             function_at_spot("crypt_drop_grates", { trig = false },
                              true, { only_at_replica = true,
                                      listen_to_replicas = true })))
}}
NSUBST:  %| = 1:d / 1:h
: crypt_loot_plus(_G)
MAP
.....................
.....................
..vvvvnnnnnnnnnvvvv..
..vlllllllllllllllv..
..vlllllllklllllllv..
..vllll.%|||%.llllv..
.4vll..%|||||%..llv4.
..vl....%|||%....lv..
..vmm...........mmv..
..v1m..F.vvv.F..m1v..
..v1m...^^^^^...m1v..
..vvvvvvv+++vvvvvvv..
...vv..2..4..2..vv...
 ..vv.333333333.vv..
 ...vvv.......vvv...
   ...vv+++++vv...
    .............
ENDMAP

##############################################################################
#       Four quadrants (by mu)
#       burial hoard (NE), chapel of kikubaaqudgha (NW), catacombs (SE), crematory (SW)
#
NAME:   quadcrypt_mu
ORIENT: encompass
TAGS:   no_monster_gen no_item_gen no_pool_fixup no_rotate no_vmirror no_hmirror
PLACE:  Crypt:$
####### chapel garden
SUBST:  F = f ?
SUBST:  f = p:1 .:1
KFEAT:  p = .
KMONS:  p = withered plant
####### hidden skeleton; sometimes good pain weapon, or draining short sword
KMONS:  ! = skeletal warrior ; w:2 dagger ego:pain | short sword ego:draining |\
                               w:2 rapier ego:pain | w:1 quick blade ego:pain
KFEAT:  o = granite_statue
SUBST:  B = b %
KITEM:  b = any book
SUBST:  u = U Y
KMONS:  8 = gargoyle
####### NW monsters (chapel).
KMONS:  A = ancient lich / dread lich / w:4 mummy priest
KMONS:  DL = lich w:40 / ancient lich / dread lich
KMONS:  E = war gargoyle
KMONS:  G = shadow / wraith
####### NE monsters (hoard). On a coinflip, either vampires or mummies.
: if crawl.coinflip() then
KMONS:  H = vampire knight
KMONS:  I = vampire mage
KMONS:  J = jiangshi
KMONS:  P = vampire / zombie / skeleton
: else
KMONS:  H = sphinx
KMONS:  I = guardian mummy w:7 / ushabti w:3
KMONS:  J = guardian mummy / mummy
KMONS:  P = skeleton / mummy
: end
####### SE monsters (catacombs). Either corporeal or incorporeal undead.
: if crawl.coinflip() then
KMONS:  Z = patrolling curse skull
KMONS:  Q = bone dragon
KMONS:  R = skeletal warrior
KMONS:  S = zombie / skeleton
: else
KMONS:  Z = patrolling curse skull
KMONS:  Q = eidolon
KMONS:  R = phantasmal warrior / flayed ghost w:8
KMONS:  S = shadow / wraith / freezing wraith / shadow wraith / wight
: end
####### SW monsters (crematory). Either fiery undead or hellish.
: if crawl.coinflip() then
KMONS:  t = ghost crab / fire dragon skeleton / laughing skull w:20
KMONS:  X = w:1 curse skull / w:19 revenant
: else
KMONS:  t = w:20 hell knight / smoke demon / laughing skull
KMONS:  X = w:1 curse skull / w:19 balrug
: end
####### Randomisation of doors
NSUBST: K = 1:+ / *:v
NSUBST: ' = 1:+ / *:v
NSUBST: " = 1:+ / *:v
NSUBST: *| = 1:d / 1:h
####### Tomb entrance
: if crawl.one_chance_in(4) then
KFEAT:  L = enter_tomb
KFEAT:  _ = altar_kikubaaqudgha
SUBST:  O = $
: elseif crawl.one_chance_in(3) then
KFEAT:  _ = enter_tomb
SUBST:  O = $
: else
KFEAT:  _ = altar_kikubaaqudgha
NSUBST: O = 1:> / *:$
KFEAT:  > = enter_tomb
: end
SUBST:  ? = $ % * |:1
: crypt_loot_plus(_G)
MAP
vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
vccccccccccccccccccccccccc......"...Bvvvvvvvvvvvvvvvvvvvvvv
vc..D..c.....c....Bc..+..c.ffff.vvvBLvvvvvvvvvvvvvvvvvvvvvv
vc.c.c.+.....+....cc..+..c.ffFf.vvvv"vvvvvvvvvvvvvnP+.....v
vc.._..+...D.c....Bc..c..m.ffFf.vO???||$$$.vvvvv..nPn|????v
vc.c.c.c.....c....cc..c..c.ffff.v?$$$$$$$$.vvvv...nPn$$$$$v
vc.....ccc+ccc....Bc..cGGc.ffff.vnnnnnnnnn+vvv..H.nPn$$O$$v
vc.....c.....c....cc..c..c.ffff.v..........vv.....nPn$$$$$v
vc.....c?....c..A.Bc..c..m..fff.v..........vv.uvu.nPn$$$$$v
vc.....c|?...c...kcc..c..c...ff.v..vvvvvvvvv..vvv.nPnnnnnnv
vc.....c||?EEcBcBcc...c..c....f.v..........+..uvu.nPPPPPPPv
vc++cccccccccccccc...cc..c......v..........+......nnnnnnn+v
vc.....G............cc...m..G...vvvvvvvvvvvv.H............v
vc.....G...........cc...cc......v....vvvvvvv..............v
vccccccccccccccccccc...cc...ff..v.JJ...vvvvvv....v..v..v..v
vc....................cc..fffff.v.......vvvvv.............v
vc...................ccE..fffff.vv+vv....vvvvv...v..v..v..v
vccmcccmm++mmcccmcccmc...fffff..v...vvv...vvvvv...........v
v.......f..f............fffffff.v.....vv...vvvvv..........v
v....ffff..ffff.........fffFfff.v......v...vvvvvvvvvvvv++vv
v.G.ffff...ffff...G....ffffffff.v......vv...v.....I.......v
v...ffff...fffff.......fffffff..v.......v...+.............v
v....ffff....ffff.......f.ffff..v.......v...+.............v
v......f.f....ffff..............v.......v...v.....I.......v
vvvvvvvvvvvvvv++vvvvvvvvvvvvvvvvvvvvvvv+vvvvvvvvvvvvvvvvvvv
vvvvvvvvvvvvv....v??llv??llv??llvvvvvvo.ovvvWWWWWWW.......v
vvvvvlllvvvvv....v?.tlv?.tlv?.tlvvvv.......vvWWWWWW%.mmmm.v
vvv.......vvv....v....+....+....vvv.........vvWWWWWWWm*|m.v
vv.........vv....v....+....+....vv...........vWWWWWmWW*|m.v
v..ccc.ccc..vv++vvv++vvvvvvvv++vvv...R.Q.R...vvWWWWmWWZ|m.v
v...lc.cl...v...................vo...........ovWWWWmmmmmm.v
v..t.c.c.t..+...................+......U......+...........v
v...........v...................vo...........ov...........v
v.cccc.cccc.vvvvvvvvvKvvvvvvvvvvvv.........vvvvvvvvvvvvvvvv
v.cll...llc.v??......<vvvvvvvvvvvv.........+...+..........v
v.clt...tlc.K???.....Kvvvvvvvvvvvvv........+...vvvvvvvvvv.v
v.c...X...c.v????|KKvvwwwwwwwwvvvvvv.......v....vvvW.R.%v.v
v...........vRRRRKvwwwwwwwwwwwwwwvvvvvo.ovvv+v...vvW...%v.v
v..ccc.ccc..vRRKvvwwwwwwwwwwwwwwwwvvvvv+vvvv.vv...vv...$v.v
v..lc...cl..vvvvwwwwwwwwwwwwwwwwwwwwvvv<v....vvv...vvv+vv.v
v.t.......t.vvvwwwwwwwwwwwwwwwwwwwwwwvvvv.vvvvvvv...vv....v
v....lll....vvvwwwwwwwwwwwwwwwwwwwwwwvvvv.v%RWvvvv...vvvv.v
v....lml....vvwwwwwwwwwwwwwwwwwwwwwwwwvvv.v..Wvvvvv...vvv.v
v....lll....vwwwwwwwwwwwwwwwwwwwwwwwwwwvv.v.vvvvvvvv...vv.v
v...........vwwwwwwwwwwwwwwwwwwwwwwwwwwvv.v.v%R.Wv%vv...vvv
vvvv++vvvvvvvwwwwwww..8..wwwwwwwwwwwwwwvv.v.v...WvRWvv...vv
v........vtvwwwwww.........wwwwwwwwwwwwwv.v+v+vvvv+vvvv...v
v...ll...+.vwwwww...........wwwwwwwwwwwwv............vvv..v
v...ll...+tvwwww.............wwwwwwwwwwwvvvvvvvvvvvvvvvvv+v
v...ll...+.vwwww.............wwww.......+........R......v.v
v...ll...+tvwww...............ww........+....V.S.R.V....v.v
v.llllll.+.vwww...................wwwwwwv......S........v.v
v.llllll.+tvwww8.............8...wwwwwwwv....V.S.R.V....v.v
v...ll...v.vwww.................wwwwwwwwv........R......v.v
v.t.ll...vtvvww...............wwwwwwwwwvvvvvv''vvvvvvv+vv+v
v.X.ll...v.*vwww.{...........wwwwwwwwwwv.......'o$.....vv.v
v...ll...v.%vwww..[..........wwwwwwwwwwv.......v$.....vvv.v
v........v.*vvwww..(........wwwwwwwwwwvv..W....v.....vvv..v
vvvvvvvvvvvvvvvwww.........wwwwwwwwwwvv..SW....v.S..vvv.S.v
vvvvvvvvvvvvvvvwwwww..8..wwwwwwwwwwwwv..WWWWW..'...vvv....v
vvvvvvvvvvvvvvvvwwwwwwwwwwwwwwwwwwwwvv....W....v..vvv.....v
vvvvvvvvvvvvvvvvvvwwwwwwwwwwwwwwwwvvvo....W....v+vvv.....$v
vvvvvvvvvvvvvvvvvvvwwwwwwwwwwwwwwvv!+.......R..'........$ov
vvvvvvvvvvvvvvvvvvvvvvwwwwwwwwvvvvvvvovvvvvvvvvvvvvvvvvvvvv
vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
ENDMAP

### Haunted Forest #############################################################
#
# Q: How is there a dead forest in the Crypt?
# A: ~use your Imagination~
#
NAME:   evilmike_haunted_forest
ORIENT: encompass
PLACE:  Crypt:$
TAGS:   no_monster_gen no_item_gen no_pool_fixup no_rotate
SUBST:  T = t.
SUBST:  t = ttttu
SUBST:  v = cccc.-
COLOUR: t = w:5 lightgrey / brown
COLOUR: x'D = white
COLOUR: G = lightgrey
COLOUR: "2 = brown
NSUBST: . = 68:p / *:.
KMONS:  p = withered plant
FTILE:  .tuT5f?<8 = FLOOR_GREY_DIRT, "G2{[( = FLOOR_PEBBLE_BROWN
FTILE:  '_D = FLOOR_SANDSTONE
TILE:   x = WALL_STONE_GRAY, t = DNGN_TREE_DEAD, G = DNGN_GRAVESTONE
KFEAT:  u = petrified_tree
SUBST:  x: c, -'": ., ?: |
SUBST:  D = +, d = cc+
NSUBST: * = 12:* / 12:% / *:$
KFEAT:  m = iron_grate
KFEAT:  > = enter_tomb
MONS:   w:3 patrolling lich / w:1 patrolling revenant
MONS:   patrolling zombie / nothing
MONS:   jumping spider / wolf spider / redback / w:19 nothing
MONS:   w:5 wraith / phantasmal warrior / eidolon / w:5 freezing wraith / w:5 nothing
MONS:   wyvern skeleton / w:30 nothing
MONS:   w:2 ushabti / w:3 guardian mummy / w:2 mummy
MONS:   w:5 patrolling mummy priest / w:1 patrolling royal mummy
KMONS:  z = patrolling curse skull
SHUFFLE: 9H
: if crawl.coinflip() then
# Temple of yred
KFEAT: _ = altar_yredelemnul
KMONS:  9 = patrolling profane servitor
KMONS:  H = w:20 patrolling death knight / patrolling profane servitor
KMONS:  0 = patrolling ghoul
KMONS:  A = patrolling death knight
KMONS:  B = skeletal warrior
KMONS:  C = necrophage
KMONS:  E = phantasmal warrior / w:4 flayed ghost / w:1 phantom / w:1 shadow / nothing
KMONS:  F = patrolling bone dragon
: else
# Temple of kiku - more necromancers, more demonic (kiku's description refers to
# him/her/it being demonic). Not as much undead in this set.
KFEAT:  _ = altar_kikubaaqudgha
KMONS:  9 = patrolling ancient lich / patrolling dread lich
KMONS:  H = w:40 patrolling lich / patrolling ancient lich / \
            patrolling dread lich
KMONS:  0 = patrolling reaper w:5 / patrolling soul eater
KMONS:  A = patrolling deep elf death mage
KMONS:  B = necromancer
KMONS:  C = hellwing
KMONS:  E = skeleton w:13 / nothing
KMONS:  F = patrolling reaper
: end
SUBST:  n : ncc
: set_feature_name("granite_statue", "gravestone")
: set_feature_name("tree", "dead tree")
NSUBST: *| = 1:d / 1:h
: crypt_loot_plus(_G)
MAP
tttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt
tttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt
ttt"""ttttttttvvvvvvvvTttTtttttttttttttttttttttttTTTTpp.Tttttwwzttttt<tttz.??ttt
tt""("ttttttttv%--v-4v.....TtttttttttTTTTtttttttT...pTTT..ttwwwwWttWWwtwW..?Tttt
ttT""ttttTTTttv4-4v4-v..T.t..TTTtttTT...TTTT.ttTT.TTttttT..WWWwwwWWwwwwwwwwW.Ttt
ttT"TttTT..t..v---vvv.T....T..t..TTt.TTT.t....T..TtttttttTTTWWWwwwwwwwwwwwwwWttt
tt""ttT..t...Tv--...."..ccccc...T...ccccc.T..t..TTTTtttttttTTWWWWWWwwtwwwwwWTttt
tt""ttTt...T..vv."""....c*0-+.......+CC*c...T.T..t..TttttttttTTWWWTtttttWWW.Tttt
tt""TtT..T..""".""".....c*-cccccccccccC*c.......t..t..ttttttttTTT.ttttttTW.Ttttt
ttT""T.t.."""""""".....cccccc9--k--Hcccccc......T....t.TTTTTtttttT.TtttT..Tttttt
tttT"""""""".......T...c------*|||*------c..555....t.....t.tTtttttT.TtT.TTtttttt
ttttt"""""".vvvvv.....ccc--xx**|V|**xx--ccc..555...t..tt..t...TTtttT....Tttttttt
ttttttTtT"".v--4vvv...ccc--xx-*|||*-xx--ccc.......T.....t....t..TttttT.TTttttttt
ttttttT..."...-%v--v...c-----------------c...........t...t..t.t..Tttttt.tttttttt
ttttttT.t.".v-4-v4-v...c------ccccc------c....T.vvvT...t..t......Ttttt.ttcnnnctt
ttttT.t.....vvvvvvvv..cccc+cccc$$$cccc+cccc.....v4--.T..t....t..tTttttt..c***ctt
tttT.t........v-%-4v..ccc--Bcc0---0ccB--ccc.T...v4%4-v.T...t.....Ttttt...c%%%ctt
ttT....T...T..v4--.....n--cccccc+cccccc--n......vvvvvv...T..T..t..Tttcc+cc---ctt
tttT.t........vvvvvv...n--ccccc---ccccc--n.........T...............Ttc3333333ctt
ttttT.t.T.............ccc-cccc-C'C-cccc-ccc..T...............T...t..tc3333333ctt
tttttT.....cccccccccccccc-cVcC-'''-CcVc-cccccccccccccc.........T...tpcccnnnccctt
ttttT..t..cc----+---------c-+-''x''-+-c---------+--E-cc....vvvv.T.t.Tttttttttttt
ttttTt.....n-B--cccmmcccccc-c--'''--c-ccccccmmcccEEE-n..T..v44vT....Tttttttttttt
ttttT..T..ccEEE-ccc00cc-----cc--'--cc-----cc00ccc-EEEcc....v--v....t.Ttttttttttt
tttTt.T....n----cc--cc--ccccccc---ccccccc--cc--cc-E--n.....-vvv...t...Tttttttttt
ttT.......ccc+ccc*-cc--ccccccccc+ccccccccc--cc-*ccc+ccc.........T....tTttttttttt
ttT..t555..cc-cc**cc--ccccccc-------ccccccc--cc**cc-cc....T.......T....Ttttttttt
tttT.55T..ccc-c<*ccc+cc-------AV-VA-------cc+ccc*<c-ccc.............t...Tttttttt
ttttT5t....cc-cccc-EE-c-B-xxxx'''''xxxx-B-c----cccc-cc...vvvvvvv..T...t.Tttttttt
tttttT....ccc+ccccEEEEc---xxxx'''''xxxx---c0--0cccc+ccc..v---4--v....t.Ttttttttt
ttttT..t...n--'F-c-EE-c---xxxx''_''xxxx---c----c--'B-n...v-xxxx-v..T..tTtttttttt
ttttT.t...cc-'x'-ccc+cc-V----B'''''B---V--cc+ccc-'x'-cc..v-xxxx4v......Ttttttttt
tttttT..T..n--'--+----d--------'''--------d----+--'B-n...v4xxxx-v..T..t.Tttttttt
ttttttTt...cccdcccccccccc-xxx--'''--xxx-ccccccccccdccc...v%---4-v........Ttttttt
tttttttT..............ccc-xxx--'''--xxx-ccc..............vvvvvvvv....T.t.tTttttt
ttttttttTt....xxxxx....n-------'''-------n...555....T..............--v....Tttttt
tttttttT......x*1*x....n---B---'''---B---n..555......ccccccccc....--Tv..t.Tttttt
ttttttT.t..T..x*|*x...ccc-xxx--'''--xxx-ccc...T......c$$$>$$$c...--44vT...tTtttt
ttttttT.......x***x...ccc-xxx--'''--xxx-ccc.T........c$$$$$$$c..vvvvvvvvvv.Ttttt
tttttttT.t.T..xx-xx....n-------'''-------n.......T...c$$$7$$$c..--4--vT..t.Ttttt
ttttttttT......x+x.....n-------'''-------n.....t..t..c**666**c....---v..t...Tttt
tttttttttTt..T.x"x....ccc-xxx--'''--xxx-ccc..T...t..tc-------c....T..t....t..Ttt
tttttttttT......".....ccc-xxx--'''--xxx-ccc...t....ttcccc+cccct.t.t........tTttt
ttttttttTt..T..."".....n--C----'''----C--n..t..tt.ttttccc-ccctt.....t...t..Ttttt
tttttttT.........".....nCC-----'''-----CCn....ttttt"""c-----ctttttt...t..Ttttttt
tttttTT.t..T....."....cccccxxxcDDDcxxxccccc.tttt"""2""cc+++cc""""2tt.t..Tttttttt
ttttT.t5........""....ccc--xxxV'''Vxxx--ccc<tt""""""G"""""""""2"G""tt..tTttttttt
tttT.t5....T...."......d-------'''-------cttt""2""""""2"""G"""""""""tt...Ttttttt
ttT.55.t........"".....ccnnccc-'''-cccnncctt""""""G"""""2"""2"G""2"2"t..t.Tttttt
tttTt.....T......""..........ccDDDcc....t.tt"G""""""2""""2"""""2""G""tt..t.Ttttt
ttttT.t..........""....T..T....""".........t"""""2"""""G"""""""G"""""t..t.t..Ttt
tttttT.t...T......"".....T....""""....."""""""2G"""""2"""2""""2"""2"ttt.....Tttt
ttttT.....T..vvv...""".......""""..."""""""""""""""G"""""2"G""""G"""""...t.Ttttt
tttTt.t.....v--v....."""..T..""""""""""""..t""G""""""""G""""""2""""""tt.t..Ttttt
tttT......T.v44v....T..""...""""""""""....tt"""""2"""""2"""2""""2""G"tt..t..Tttt
ttttTTt.....vvvv........""."""...vvvvvv...ttt""""G"""2"""G""""G""""""tt....t.Ttt
ttttttT..t..T.....T......""""....v%-44v..t.ttttt"""""""""""2""""""G"ttt..t...Ttt
tttttTT.t.....T........."""".....v4---v.......ttt""2""G"2"""G"""2"""tt.t...Ttttt
tttttttTTT.t.t.....""""""".......v---......t.t.ttttt"""""2"""2""""ttt...t.Tttttt
ttttttttttT....."""""""""".......vvvv....T........tttttttt"""ttttttt..t..Ttttttt
tttttttttttT""""""""..............T...T.......t..t.tt..ttttttttt..t......Ttttttt
ttttttttttt"""""...t.......T..............t...5555.......tt....t....t..tTTtttttt
tttttttttt"""tttTt...t........t....T..t....t.t.55t..t..t....t.....t..TTTtttttttt
tttttt""""""tttttT.t.....t.......t.......t......55...t...t.....t...TTttttttttttt
ttt"""""""tttttttTT..TTTTTT..t......TTttT.TTtT..t...t.......t.TTTTTttttttttttttt
tttt""[""""tttttttTTTtttttTT.....TTTtttttTttttTTT..t...TTTTttttttttttttttttttttt
ttt""{""tttttttttttttttttttTTTTTTttttttttttttttttTT.TTTttttttttttttttttttttttttt
tttt"""ttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt
tttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt
tttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt
ENDMAP

###############################################################################
# due -- elkab
#
# The triparte Egyptian temple! Like Bobbens' church of pain, it has four sets
# of monsters: skeletal, ghost, vampire, mummy and demon.
#
# There are also three distinct sections:
#
# Monster layouts:
#  skeletal ([ancient] liches, bone dragons, ancient champions)
#  vampire (Jory, vampire [knight / mage], dancing weapons)
#  ghostly (revenant, eidola, shadow dragon)
#  mummy (royal mummy, mummy priests, sphinx)
#
# Loot:
#  roughly similar loot to evilmike's haunted forest
NAME:   due_elkab
PLACE:  Crypt:$
ORIENT: north
TAGS:   no_monster_gen no_item_gen no_pool_fixup no_rotate no_trap_gen
TAGS:   layout_city
NSUBST: A = 1:+ / *:c
NSUBST: B = 1:+ / *:c
NSUBST: C = 1:6 / *:5
KFEAT:  YD = closed_door
KFEAT:  ER = alarm trap
KFEAT:  CSd = floor
COLOUR: YsDdE = darkgrey
: local brnd = crawl.random2(15)
: if brnd > 10 then
MONS:   patrolling skeletal warrior w:8 / patrolling wight
MONS:   ancient lich / dread lich
MONS:   bone dragon w:1 / ancient champion / lich w:1
MONS:   caustic shrike skeleton / titan skeleton
MONS:   w:50 skeleton / wight
MONS:   generate_awake bone dragon / generate_awake curse toe
: elseif brnd > 6 then
MONS:   patrolling vampire knight / patrolling vampire mage / \
        patrolling vampire w:25
KMONS:  2 = vampire knight / Jory w:15, vampire knight
KMONS:  3 = dancing weapon ; long sword ego:vampirism / vampire knight
KMONS:  4 = phantasmal warrior / jiangshi
KMONS:  5 = vampire / zombie / golden dragon zombie w:3 / storm dragon zombie w:3
KMONS:  6 = generate_awake vampire mage
SUBST:  2 = ., ' = 2, " = 4
: elseif brnd > 2 then
MONS:   patrolling freezing wraith / patrolling spectral thing w:8
MONS:   revenant
MONS:   eidolon
MONS:   flayed ghost / phantasmal warrior
MONS:   spectral thing / simulacrum / shadow w:3 / wraith w:2 / shadow wraith / \
        spectral storm dragon w:5 / spectral quicksilver dragon w:5
MONS:   generate_awake shadow dragon / generate_awake ghost moth
SUBST:  2 = ., ' = 2, " = 4
: else
MONS:   patrolling guardian mummy w:7 / patrolling ushabti w:3
MONS:   royal mummy
MONS:   mummy priest / ushabti w:6
MONS:   guardian mummy ; long sword | great sword | \
        battleaxe | war axe | broad axe . chain mail w:15 | plate armour w:1
MONS:   bog body / mummy / guardian mummy
MONS:   generate_awake sphinx
: end
SUBST:  '" = .
NSUBST:  %*| = 1:d / 1:h
: crypt_loot_plus(_G)
MAP
                ccccccccccccccccccccccccccccccc
                ccccccccccccccccccccccccccccccc
                cc*$*c|%*...k...**|c.........cc
                cc$3$c|*...'2'...%|c..G.3.G..cc
                cc...c|%|.......|%|c.........cc
                ccc+cccccc.....ccccccc+cccBBBcc
                cc...c...ccc+ccc...c.....c$$$cc
                cc.4.c.G.4.RRR.4.G.+..G..c$$$cc
cccccccccccccccccc...c.............c.....c%%*cc
ccccccccccccccccccc+ccccccc+++ccccccc+ccccccccc
c$$A.".c|.".*c%"*cc...ccc.......ccc...cc%*|%*cc
c$$A.3.c..3..c.3.c..G.....G...G.....G..c..3..cc
c$$A...c.....c...c..1...............1..c.....cc
c$$Ac+cccc+cccc+cc..G..G..G...G..G..G..cc+++ccc
ccccc...........cc..1...............1..c.....cc
...cc..G4...4G..cc..G..G..G...G..G..G..c.4.4.cc
...ccc.........ccc..1...............1..c.....cc
@..cccccc+++cccccc..G..G..G...G..G..G..c.....cc
...ccc.........cccc...................ccc...ccc
...cc..G1...1G..ccc+c+c+c+c...c+c+c+c+ccc+++cccc
c..cc...........ccc5c5c5c5c+++c5c5c5c5ccc...c+Cc
c..ccccc.....cccccc+ccccccc...cccccccccc.....ccc
c..c...c.....c...cc.c...............ccC+.....+Cc
c..c.............cc.c....1.....1....cccc.....ccc
c......G.....G...cc.cc.............+ccC+.....+Cc
c.......1...1....cc.cccccc.....ccccc.ccc.....ccc
c......G.....G...cc+cc.............cc+C+.....+Cc
c.......1...1....+..+....1.....1....cccc.....ccc
c......G.....G...cccc...............ccC+.....+Cc
c..c.............cccccccccc+++cccccccccc.....ccc
c..c...c.....c...c...........................+Cc
cccccccc.....ccccc...........................ccc
  cc.............c...........................+Cc
  cc.G.G.....G.G.c.cccccc.......ccccccc......ccc
  cc..1.......1..cc+$$$$cc.....cc%....+c.....+Cc
  cc.G.........G.cc$$$$$cc.....cc%1...cccccccccc
  cc..1.......1..cc$$$$1cc.....cc*%%%%cc........
  cc.G.........G.cccccccc.......ccccccc.........
  cc..1.......1..c.............................@
  cc.G.........G.c..............................
  @.............................................
  cccccc.....ccccccccccccccccccccccccccccccccccc
  cccccc.....ccccc
  cc.............c
    .............c
  ........@.......
ENDMAP

##############################################################################
#        The death's head, by Grunt.
#
NAME:    grunt_crypt_end_deaths_head
TAGS:    patrolling no_monster_gen no_rotate no_hmirror no_vmirror
PLACE:   Crypt:$
ORIENT:  encompass
MONS:    skeletal warrior / jiangshi, laughing skull / weeping skull w:1
SHUFFLE: 34 / 56 / 78 / 90, AB / CD / EF / HI / JK / LM / NO / PQ

KMONS:   3 = ghoul
KMONS:   4 = necrophage
KMONS:   5 = necromancer
KMONS:   6 = simulacrum / spectral thing / zombie w:5 / skeleton w:5 / \
             hell knight w:5
KMONS:   7 = death knight
KMONS:   8 = vampire knight w:5 / skeletal warrior
KMONS:   9 = ancient champion
KMONS:   0 = skeletal warrior

# Room guardian waves; these should be tougher, but not boss tier.
KMONS:   A = lich
KMONS:   C = revenant
KMONS:   BD = freezing wraith / shadow wraith / wraith
KMONS:   E = deep elf death mage
KMONS:   F = small abomination / large abomination w:5
KMONS:   H = death knight
KMONS:   I = laughing skull
KMONS:   J = profane servitor
KMONS:   L = bone dragon
KMONS:   K = nothing
KMONS:   M = burial acolyte
KMONS:   NO = jiangshi
KMONS:   P = flayed ghost
KMONS:   Q = flayed ghost / shadow w:20

# Boss tier monsters.
: if crawl.one_chance_in(4) then
KMONS:   R = Khufu, royal mummy
KMONS:   S = mummy priest
KMONS:   T = guardian mummy
: elseif crawl.one_chance_in(3) then
KMONS:   R = Jory, vampire knight
KMONS:   S = vampire knight / vampire mage
KMONS:   T = vampire knight / jiangshi
: elseif crawl.coinflip() then
KMONS:   R = ancient lich / dread lich
KMONS:   S = flayed ghost
KMONS:   T = phantasmal warrior
: else
KMONS:   R = curse skull
KMONS:   S = ancient champion
KMONS:   T = skeletal warrior
: end

KFEAT:   R = enter_tomb
KFEAT:   _ = altar_yredelemnul / altar_kikubaaqudgha
SHUFFLE: {[(<

NSUBST:  *| = 1:d / 1:h
: crypt_loot_plus(_G)
MAP
ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
ccccccccccccccccccccccccc|*$$...R...$$*|ccccccccccccccccccccccccc
cccccccccccccccccccccc..cc*$$.T.k.T.$$*cc..cccccccccccccccccccccc
cccccccccccccccccccc....ccc$$...T...$$ccc....cccccccccccccccccccc
ccccccccccccccccccc.G.G.c.ccccc+++ccccc.c.G.G.ccccccccccccccccccc
cccccccccccccccccc......c...............c......cccccccccccccccccc
ccccccccccccccccc.......c..G..T...T..G..c.......ccccccccccccccccc
cccccccccccccccc..K.J.K.c......T.T......c.M.L.M..cccccccccccccccc
cccccccccccccccc........c..G.........G..c........cccccccccccccccc
ccccccccccccccc....K.K..cc.............cc..M.M....ccccccccccccccc
ccccccccccccccc..........c.G.........G.c..........ccccccccccccccc
ccccccccccccccc+c........c....c+++c....c........c+ccccccccccccccc
cccccccccccccc..cc.G...G.c.S.cc...cc.S.c.G...G.cc..cccccccccccccc
ccccccccccccccO.cc.......c..cc.....cc..c.......cc.Qcccccccccccccc
ccccccccccccccONcc...F...cccc...9...cccc...I...ccPQcccccccccccccc
ccccccccccccccOOcc.....F..c...G...G...c..I.....ccQQcccccccccccccc
ccccccccccccccc$$c...E....c.0.......0.c....H...c$$ccccccccccccccc
ccccccccccccccc$$c.....F..+.....Y.....+..I.....c$$ccccccccccccccc
ccccccccccccccc$$cc...F...c.0.......0.c...I...cc$$ccccccccccccccc
ccccccccccccccc**cc.G.G...c...G...G...c...G.G.cc**ccccccccccccccc
cccccccccccccccc|cc....cccccc.......cccccc....cc|cccccccccccccccc
cccccccccccccccc|cc..ccc.B..ccc+++ccc..D.ccc..cc|cccccccccccccccc
cccccccccccccccccccccc*$..B.+...8...+.D..$*cccccccccccccccccccccc
ccccccccccccccccccc.c|*$.A..c.......c..C.$*|c.ccccccccccccccccccc
cccccccccccccccccc..cc*$..Bcc.8.7.8.ccD..$*cc..cccccccccccccccccc
cccccccccccccccccc...c$$.B.c.........c.D.$$c...cccccccccccccccccc
cccccccccccccccccc.G.cc...ccc...8...ccc...cc.G.cccccccccccccccccc
ccccccc...cccccccc....ccccc.+c.....c+.ccccc....cccccccc...ccccccc
ccccccc.[.cccccccc......c....ccccccc....c......cccccccc.{.ccccccc
ccccccc....ccccccc...2..4..2.ccccccc.2..6..2...ccccccc....ccccccc
ccccccc.G...ccccccc..........ccccccc..........ccccccc...G.ccccccc
cccccc.......ccccccc..4.3V4..ccccccc..6V5.6..ccccccc.......cccccc
ccccc..........ccccccc.......ccccccc.......ccccccc..........ccccc
cccccc..cc...1....cccccc4....cc...cc....6cccccc....1...cc..cccccc
cccccccccccc...2...cccccc..1.cc._.cc.1..cccccc...2...cccccccccccc
ccccccccccccccc.....ccc.cc.............cc.ccc.....ccccccccccccccc
ccccccccccccccccc....+.G.c....V...V....c.G.+....ccccccccccccccccc
ccccccccccccccccccc..+...ccc.........ccc...+..ccccccccccccccccccc
ccccccccccccccccccccccc..c1cccc+++cccc1c..ccccccccccccccccccccccc
ccccccccccccccccccccccc.2c..+.c1.1c.+..c2.ccccccccccccccccccccccc
cccccccccccccccccccccc...c+cc.+...+.cc+c...cccccccccccccccccccccc
cccccccccccccccccccccc..cc.1ccccccccc1.cc..cccccccccccccccccccccc
ccccccccccccccccccccccc..cc.+.+.1.+.+.cc..ccccccccccccccccccccccc
cccccccccccccccccccc.c+...ccc.+...+.ccc...+c.cccccccccccccccccccc
cccccccccccccccccc....+.....ccc+++ccc.....+....cccccccccccccccccc
ccccccccccccccc.......cc.................cc.......ccccccccccccccc
cccccccc....c....2..ccccc...1...2...1...ccccc..2....c....cccccccc
ccccccccc......1..cccccccc....G...G....cccccccc..1......ccccccccc
cccccccccc..G....ccccccccccc.........ccccccccccc....G..cccccccccc
ccccccccccc....ccccccccccccccccccccccccccccccccccc....ccccccccccc
ccccccccccc.(.ccccccccccccccccccccccccccccccccccccc.<.ccccccccccc
ccccccccccc...ccccccccccccccccccccccccccccccccccccc...ccccccccccc
ccccccccccc..ccccccccccccccccccccccccccccccccccccccc..ccccccccccc
ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
ENDMAP

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

NAME:    lightli_unholy_cathedral
TAGS:    no_monster_gen layout_city
PLACE:   Crypt:$
ORIENT:  north
MONS:    ancient champion, lich / revenant, jiangshi / ghoul w:2
MONS:    profane servitor / bone dragon / curse toe / \
         royal mummy w:2 / ancient lich w:1 / dread lich w:1
MONS:    skeletal warrior ; halberd | glaive | bardiche w:5
MONS:    freezing wraith w:20 / shadow wraith w:20 / flayed ghost
MONS:    zombie w:20 / skeleton w:20 / simulacrum / nothing w:25
KMONS:   8 = vampire knight
KMONS:   9 = vampire w:6 / vampire mage w:4
KMONS:   0 = mummy priest
KMONS:   A = guardian mummy w:6 / ushabti w:4
SHUFFLE: 56, 89 / 0A
SUBST:   5 = 5., 6 = 6., 9 = 99., A = AA.
KFEAT:   Y = altar_yredelemnul
KFEAT:   K = altar_kikubaaqudgha
NSUBST:  *| = 1:d / 1:h, k = k / $
: crypt_loot_plus(_G)
MAP
cccccccccccccccccccccccc
ccccccccccckkccccccccccc
cccccccccckkkkcccccccccc
cccccccccckkkkcccccccccc
ccccccccccc++ccccccccccc
ccccccc..........ccccccc
ccc**c............c**ccc
cc||*+..4.K..Y.4..+*||cc
cc||*+............+*||cc
ccc**c............c**ccc
ccccccc.........cccccccc
ccccccccccc++ccccccccccc
cccccccccc....cccccccccc
cccc9....+.33.+....9cccc
ccc989...+.33.+...989ccc
cc..9..ccc....ccc..9..cc
cc.......cc**cc.......cc
cc........cccc........cc
cc.......2cccc2.......cc
cc........cccc........cc
cc5..5...ccVVcc...5..5cc
cc.11.cccc....cccc.11.cc
cc5..5...+.11.+...5..5cc
cc.......+5..5+.......cc
cc...ccccc....ccccc...cc
cc.7.cc  c.55.c  cc.7.cc
cc7V7cc  cc++cc  cc7V7cc
cc.7.cc  Gc..cG  cc.7.cc
ccccccc  ..@@..  ccccccc
ccccccc          ccccccc
ENDMAP
