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

: crawl_require('dlua/vault.lua')

{{
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" or dgn.feature_name(dgn.grid(replica.x, replica.y)) == "trap_mechanical" 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 draugr / human zombie / \
                                mummy w:20 / guardian mummy")
        end
    end
end

function crypt_entry(e)
    e.tags("crypt_entry vaults_entry_crypt patrolling")
    e.kmons("0 = necromancer w:5 / death knight w:5 / \
                 skeletal warrior / ghoul / \
                 phantasmal warrior / flayed ghost / eidolon")
    e.kmons("9 = laughing skull band")
    e.kmons("8 = ancient champion")
    e.nsubst("0 = 2 = 9 8 0:120 / *:0")
    e.kfeat("O = enter_crypt")
    e.tile("c = wall_crypt")
    e.tile("G = dngn_statue_wraith / dngn_statue_sigmund / dngn_statue_angel")
end

-- A revision of old Crypt end reward items (c.f. bad0f68).
-- Since Crypt is an optional, late, difficult branch, provide some expensive
-- high quality incentives.
-- In total: a talisman with torment resistance, a book with high-level necro
-- spells, two weapons with necromancy themes, a jewellery randart, either a
-- jewellery randart or a necromantic unrand, and some niche evil-ish armour.
function crypt_loot_plus(e, glyph)
  local inv = {};

  local top_lb = util.random_from({"triple sword", "double sword", })
  local top_pa = util.random_from({"bardiche", "partisan"})
  local top_ax = util.random_from({"executioner's axe", "executioner's axe",
                                   "broad axe"})
  local top_rg = util.random_from({"longbow", "triple crossbow", "hand cannon"})
  local high_sb = util.random_from({"quick blade", "athame"})
  local top_mel = util.random_from({top_lb, "quick blade", top_pa, top_ax,
                                    "eveningstar", "lajatang"})
  local top_weap = util.random_from({top_lb, "quick blade", top_pa, top_ax,
                                    "eveningstar", "lajatang", top_rg, top_rg})
  local high_weap = util.random_subset({"great sword", high_sb, "battleaxe",
                                        "glaive", "great mace", "lajatang"}, 2)
  local staff = util.random_from({"staff of necromancy randart",
                                  "any magical staff randart artprops:Necro"})
  local drain_plus = crawl.random_range(1, 4)
  local weaps = util.random_subset({top_weap .. " ego:draining plus:" .. drain_plus,
                                    top_mel .. " randart ego:reaping",
                                    high_weap[1] .. " ego:pain good_item",
                                    high_weap[2] .. " ego:vampirism good_item",
                                    staff}, 2)
  table.insert(inv, table.concat(weaps, ' | '))

  local ring = "any ring randart artprops:rN:2"
  local amulet = "any amulet randart artprops:Regen:1"
  local unrand = util.random_from({"sword_of_the_dread_knight", "leech",
                                   "vampires_tooth", "finisher",
                                   "scythe_of_curses", "sceptre_of_torment",
                                   "undeadhunter", "brilliance", "majin-bo",
                                   "cigotuvis_embrace", "skull of zonguldrok"})
  local aux = util.random_from({"hat", "helmet", "cloak", "pair of gloves",
                                "pair of boots"}) .. " randart artprops:Bane"
  local rand = util.random_choose_weighted {
    {unrand, 10}, {amulet, 10}, {ring, 5}, {aux, 5},
  }

  table.insert(inv, util.random_from({ring, amulet}))
  table.insert(inv, rand)

  local book = "randbook disc:necromancy numspells:3 spells:"
  table.insert(inv, util.random_from({"necronomicon", book .. "death's_door",
                                      book .. "borgnjor's_revivification",
                                      book .. "haunt", book .. "infestation"}))

  local tali = util.random_from({"talisman of death", "sanguine talisman",
                                 "granite talisman"})
  if crawl.one_chance_in(11) then
    table.insert(inv, tali .. " randart")
  else
    table.insert(inv, tali)
  end

  local orbs = util.random_choose_weighted {
    {"attunement", 10}, {"energy", 10}, {"glass", 5},
    {"guile", 5}, {"stardust", 10}, {"mayhem", 5},
  }

  local shield = util.random_from({"tower shield randart artprops:rN:1",
                                   "tower shield ego:positive_energy",
                                   "kite shield randart artprops:Bane&&rN:1"})
  local etc = util.random_from({shield, "shadow dragon scales randart artprops:Bane",
                                "plate armour randart ego:death",
                                "orb ego:" .. orbs .. " randart artprops:Necro"})
  table.insert(inv, etc)
  inv = table.concat(inv, " | ")

  e.kfeat(glyph .. " = general shop no_mimic type:Gilded suffix:Reliquary " ..
                      "use_all greed:20 ; " .. inv)
  e.tile(glyph .. " = dngn_gilded_reliquary")

  -- Replace a little bit of the loot with gold to compensate for the
  -- shop items, and set up a standard gem glyph.
  e.kitem("d = $ q:" .. crawl.random_range(66, 166))
  e.kitem("g = ivory gem")
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
...........
.c.......c.
...........
...GcccG...
...cc0cc...
....0O0c...
...cc0cc...
...GcccG...
...........
.c.......c.
...........
ENDMAP

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

##############################################################################
NAME:   minmay_crypt_entry_simple_walls
TAGS:   transparent
: crypt_entry(_G)
MAP
..........
.cccccccc.
.c........
.c0cccccc.
.c......c.
.c.cccc0c.
.c.c....c.
.c.c.O..c.
.c.c....c.
.c.cccc0c.
.c......c.
.c0cccccc.
.c........
.cccccccc.
..........
ENDMAP

##############################################################################
NAME:   minmay_crypt_entry_simple_corners
TAGS:   transparent
: crypt_entry(_G)
MAP
...........
.cc.....cc.
.c0.....0c.
....c.c....
...cc.cc...
.....O.....
...cc.cc...
....c.c....
.c0.....0c.
.cc.....cc.
...........
ENDMAP

##############################################################################
NAME:   minmay_crypt_entry_simple_plaza
TAGS:   transparent
: crypt_entry(_G)
MAP
......................
..............ccccccc.
.....G...G...Gc..0..c.
..............c.....c.
...........0..+..O.0c.
..............c.....c.
.....G...G...Gc..0..c.
..............ccccccc.
......................
ENDMAP

##############################################################################
NAME:   minmay_crypt_entry_skeletal_spiral
TAGS:   transparent
MONS:   yaktaur draugr w:20 / skeletal warrior
MONS:   ancient champion
: crypt_entry(_G)
MAP
...........
.ccccccccc.
.c..1..1.c.
.c1ccccc.c.
.c.c121c1c.
.c.c1O1c.c.
.c1c111c1c.
.c.c.ccc.c.
.c.c1.1.1c.
.c.ccccccc.
...........
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:    death knight band w:30 / lich w:30 / shadow dragon
: crypt_entry(_G)
MAP
.........
.c.....c.
.cc...cc.
..c.1.c..
..c.c.c..
.cc...cc.
.c.....c.
.c..O..c.
.c.....c.
.cc...cc.
..ccccc..
.........
ENDMAP

##############################################################################
NAME:   minmay_crypt_entry_vampire_ct
TAGS:   transparent
MONS:   vampire, vampire knight / vampire mage
SUBST:  V = VVVY
: crypt_entry(_G)
MAP
................
.ccccc....ccccc.
.c...cc..cc...c.
.c.O..cccc..1.c.
.c..2..cc.....c.
.cc..V....V..cc.
..cc........cc..
...cc..cc..cc...
...cc..cc..cc...
..cc........cc..
.cc..V....V..cc.
.c.....cc.....c.
.c.1..cccc..1.c.
.c...cc..cc.....
.ccccc....ccc...
................
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 decor
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
SUBST: V = V..
: decorative_floor(_G, 'V', "mourning vase")
MAP
ccccc
cGVGc
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
TAGS:   transparent allow_dup
DEPTH:  Crypt
KMONS:  0 = zombie / draugr
KMONS:  P = withered plant
: kitem("e = " .. vault_species_skeletons(_G, "dungeon"))
KFEAT:  _ = altar_kikubaaqudgha w:15 / altar_yredelemnul w:15 / \
            altar_dithmenos w:5 / altar_the_shining_one w:1
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
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-
TILE:   G = dngn_statue_angel / dngn_statue_ancient_hero / dngn_statue_dwarf
: decorative_floor(_G, 'M', "mourning vase")
MAP
xxxxxDDDx
xxGxxF.Fx
xM..H...x
x...H..Mx
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_reliquary_box_2
TAGS:  transparent extra decor
DEPTH: Crypt
MAP
...G...
.xxxxx.
.+.|.+.
.+.|.+.
.xxxxx.
...G...
ENDMAP

NAME:  nicolae_crypt_reliquary_box_3
TAGS:  transparent extra decor
DEPTH: Crypt
MAP
.......
xxx.xxx
G|+.+|G
xxx.xxx
.......
ENDMAP

NAME:  nicolae_crypt_reliquary_box_4
TAGS:  transparent extra decor
DEPTH: Crypt
MAP
...G...
.xxxxx.
.+|G|+.
.xxxxx.
...G...
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() ~= dgn.br_depth(you.branch()) 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

NAME:   nicolae_crypt_disinterred
TAGS:   transparent extra decor
DEPTH:  Crypt, !Crypt:$
KFEAT:  ^ = shaft trap
NSUBST: ^ = 3=^ / 3=^. / .
: vault_granite_statue_setup(_G, "G", "gravestone")
MAP
xxxx    xxxx
x..........x
x.G^.G^.G^.x
 ..........
 .G^.G^.G^.@
 ..........
x.G^.G^.G^.x
x..........x
xxxx    xxxx
ENDMAP

NAME:  nicolae_crypt_draining_blood
TAGS:  transparent extra decor
DEPTH: Crypt
SUBST: ' = `...
KFEAT: - = iron_grate
KPROP: `- = bloody
MAP
...........xx
.```'`'.'`'xx
.`Y``'`'`'`-x
.```..'`'..xx
...........xx
ENDMAP

# https://www.oglaf.com/fountain-of-death/
NAME:    nicolae_crypt_fountain_of_water_so_delicious
TAGS:    transparent extra decor
DEPTH:   Crypt
: kitem("a = " .. vault_species_skeletons(_G, "dungeon"))
SHUFFLE: pq
SUBST:   p = x, q = .
NSUBST:  - = 3=D / 2=D. / D...., ` = 2=D / 2=D. / .
: vault_granite_statue_setup(_G, "G", "broken pillar")
MAP
  GpppG
 qq...qq
Gq.```.qG
p.`---`.p
p.`-U-`.p
p.`---`.p
Gq.```.qG
 qq...qq
  GpppG
ENDMAP

NAME:  nicolae_crypt_grate_for_corpse_storage
TAGS:  transparent extra decor
DEPTH: Crypt
: kitem("a = " .. vault_species_skeletons(_G, "dungeon"))
SUBST: a = aa.
KFEAT: - = iron_grate
KPROP: a = no_tele_into
KMASK: a = no_monster_gen
KMASK: a = no_trap_gen
KMASK: a = no_item_gen
KMASK: a = opaque
MAP
xxxxxxxx
xaaaaaax
xx----xx
@......
@......
xx----xx
xaaaaaax
xxxxxxxx
ENDMAP

NAME:  nicolae_crypt_grave_club
TAGS:  transparent extra decor
DEPTH: Crypt
: vault_granite_statue_setup(_G, "G", "gravestone")
MAP
  xxxxx
  x...x
xxx.G.xxx
x.......x
x.G...G.x
x.......x
xxx...xxx
  x...x
    @
ENDMAP

NAME:  nicolae_crypt_gravecubes
TAGS:  transparent extra decor
DEPTH: Crypt
SUBST: - = G.
: vault_granite_statue_setup(_G, "G", "gravestone")
MAP
G-.--.-G
--.--.--
........
--.--.--
--.--.--
........
--.--.--
G-.--.-G
ENDMAP

NAME:  nicolae_crypt_hallway_flooded
TAGS:  transparent extra decor no_pool_fixup
DEPTH: Crypt
SUBST: ` = W., ~ = wW, ' = .wW
: vault_granite_statue_setup(_G, "G", "gravestone")
MAP
xxxxxxxxxxxxxxxxx
x.G.xwwwxwG.x.G.x
x.``xw~wxw'`x...x
x`WWx~W~x~WWx...x
xxWxxxWxxxWxxx.xx
@`WWWWWww~WW~'..@
@...`WWWWW~WWWW`@
xx.xxxWxxxwxxx`xx
x...x.Wwxwwwx'.'x
x...x.`Wxwwwx...x
x.G.x.GWxwwwx.G.x
xxxxxxxxxxxxxxxxx
ENDMAP

NAME:   nicolae_crypt_little_cemetery
TAGS:   transparent extra decor
DEPTH:  Crypt
SUBST:  ` = tt.
NSUBST: ' = @ / _
CLEAR:  _
TILE:   t = dngn_tree_dead
COLOUR: t = brown
: set_feature_name("tree", "dead tree")
: vault_granite_statue_setup(_G, "G", "gravestone")
MAP
 'G'G G
 .......
G.......G
 ..```..
G..`t`..G
 ..```..
G.......G
 .......
  G G G
ENDMAP

NAME:  nicolae_crypt_memorial_pool
TAGS:  transparent extra decor no_pool_fixup
DEPTH: Crypt
TILE:  G = dngn_statue_angel / dngn_statue_ancient_hero / dngn_statue_dwarf
: decorative_floor(_G, 'F', "mourning vase")
MAP
xxx..
xF........
x..wwwww..
xG.wwwww.@
x..wwwww..
xF........
xxx..
ENDMAP

NAME:   nicolae_crypt_mild_blasphemy
TAGS:   transparent extra decor no_item_gen
DEPTH:  Crypt
KITEM:  r = large rock
KITEM:  s = demigod skeleton
NSUBST: r = r / .
MAP
xxxxxx
xx..sx
xx...x
xxAxxx
.r.r..
......
ENDMAP

NAME:   nicolae_crypt_mourning_fourly
TAGS:   transparent extra decor
DEPTH:  Crypt
SUBST:  t = t., * = ..***|
TILE:   t = dngn_tree_dead
COLOUR: t = brown
: set_feature_name("tree", "dead tree")
: vault_granite_statue_setup(_G, "G", "gravestone")
MAP
@.txxxt.@
...txt...
t.*.x.*.t
xt.GxG.tx
xxxxxxxxx
xt.GxG..x
t.*.x.*.t
...txt...
@.txxxt.@
ENDMAP

NAME:  nicolae_crypt_ornate_mausoleum
TAGS:  transparent extra decor
DEPTH: Crypt
KFEAT: - = iron_grate
SUBST: P : x+, Q = x+
MAP
...........
.x-x...x-x.
.-G-...-G-.
.x-xxPxx-x.
...x...x...
...+.*.Q...
...x...x...
.x-xxPxx-x.
.-G-...-G-.
.x-x...x-x.
...........
ENDMAP

NAME:  nicolae_crypt_overgrown_tholos
TAGS:  transparent extra decor
DEPTH: Crypt
KMONS: p = withered plant
SUBST: - = `````pp*, ` = ..p, * = **|
: vault_granite_statue_setup(_G, "G", "broken pillar")
MAP
     .........
     .```.```.
     .`G`.`G`.
 .....```.```.....
 .```.........```.
 .`G`..xx+xx..`G`.
 .```.xx...xx.```.
.....nx.---.xn.....
.```.x-------x.```.
.`G`.xV--G--Vx.`G`.
.```.x-------x.```.
.....nx.---.xn.....
 .```.xx...xx.```.
 .`G`..xx+xx..`G`.
 .```.........```.
 .....```.```.....
     .`G`.`G`.
     .```.```.
     .........
ENDMAP

NAME:   nicolae_crypt_remembering
TAGS:   transparent extra decor
DEPTH:  Crypt
SUBST:  * = **|, p : xxx., q : x..., r : xx.., s : xxx., V : V..
TILE:   t = dngn_tree_dead
COLOUR: t = brown
: set_feature_name("tree", "dead tree")
: vault_granite_statue_setup(_G, "G", "gravestone")
: decorative_floor(_G, 'V', "mourning vase")
MAP
xxxxxxx
xptGtpx
xqV*Vqx
xr...rx
xs...sx
xxx@xxx
ENDMAP

NAME:   nicolae_crypt_skeletal_stacks
TAGS:   transparent extra decor
DEPTH:  Crypt
KITEM:  ' = human skeleton / any skeleton, * / | w:5 / nothing w:150
KFEAT:  - = iron_grate
NSUBST: p = @ / ., q = @ / ., r = @ / ., s = @ / .
KPROP:  ' = no_tele_into
KMASK:  ' = no_monster_gen
KMASK:  ' = no_trap_gen
KMASK:  ' = no_item_gen
KMASK:  ' = opaque
MAP
pxxxqxxxrxxxs
.-'x.-'x.-'x.
.xxx.xxx.xxx.
.x'-.x'-.x'-.
.xxx.xxx.xxx.
.-'x.-'x.-'x.
.xxx.xxx.xxx.
.x'-.x'-.x'-.
pxxxqxxxrxxxs
ENDMAP

NAME:  nicolae_crypt_shared_small_mausoleum
TAGS:  transparent extra decor
DEPTH: Crypt
MAP
...xxxxxxx...
...x.....x...
.V.+.GxG.+.V.
...x.....x...
...xxxxxxx...
ENDMAP

NAME:    nicolae_crypt_staircase_of_the_dead
TAGS:    transparent extra decor
DEPTH:   Crypt, !Crypt:1, !Crypt:$
SHUFFLE: {}/[]/()
TILE:    t = dngn_tree_dead
COLOUR:  t = brown
: set_feature_name("tree", "dead tree")
: vault_granite_statue_setup(_G, "G", "gravestone")
MAP
xxxxxxxxxxx
xt.txxxt.tx
.....G.....
@V.{.G.}.V@
.....G.....
xt.txxxt.tx
xxxxxxxxxxx
ENDMAP

NAME:  nicolae_crypt_stairmouth
TAGS:  transparent extra decor
DEPTH: Crypt
: if you.depth() == 1 then
SUBST: s = ]})
: elseif you.depth() == dgn.br_depth(you.branch()) then
SUBST: s = [{(
: else
SUBST: s = ]})[{(
: end
: vault_granite_statue_setup(_G, "G", "gravestone")
MAP
xxxxxxx..
xG.G.G...
x........
xV.s....@
x........
xG.G.G...
xxxxxxx..
ENDMAP

NAME:   nicolae_crypt_they're_not_using_it
TAGS:   transparent extra decor
DEPTH:  Crypt
: kitem("a = " .. vault_species_skeletons(_G, "dungeon"))
KFEAT:  - = iron_grate
NSUBST: ' = @ / ., ` = @ / .
KPROP:  a = no_tele_into
KMASK:  a = no_monster_gen
KMASK:  a = no_trap_gen
KMASK:  a = no_item_gen
KMASK:  a = opaque
MAP
'''GxG```
'xxxxxxx`
'xaxaxax`
'x-x-x-x`
'+.*|*.+`
'x-x-x-x`
'xaxaxax`
'xxxxxxx`
'''GxG```
ENDMAP

NAME:   nicolae_crypt_x_marks_the_plot
TAGS:   transparent extra decor
DEPTH:  Crypt
NSUBST: P = 3=t / 3=.t / ., Q = 3=t / 3=.t / .
NSUBST: R = 3=t / 3=.t / ., S = 3=t / 3=.t / .
NSUBST: p = G / ., q = G / ., r = G / ., s = G / .
TILE:   t = dngn_tree_dead
COLOUR: t = brown
: set_feature_name("tree", "dead tree")
: vault_granite_statue_setup(_G, "G", "gravestone")
MAP
.....     .....
.PPP.     .QQQ.
.PPP.     .QQQ.
.PPP... ...QQQ.
....pp. .qq....
   .pp...qq.
   .........
     ..V..
   .........
   .rr...ss.
....rr. .ss....
.RRR... ...SSS.
.RRR.     .SSS.
.RRR.     .SSS.
.....     .....
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:160 / draugr w:80 / skeletal warrior w:30 / \
        large abomination / patrolling burial acolyte w:40
KMONS:  2 = cognitogaunt / ghoul
KITEM:  2 = *, *
NSUBST: 1 = 1:2 / *:1
KFEAT: _ = altar_kikubaaqudgha
MAP
ccccccccccccccccccccccc
ccc1c1c1c1c1c1c1c1c1ccc
cccc++cc+cc+cc+cc++cccc
.......................
.........._............
.......................
ENDMAP

##############################################################################
#       small crypt building
NAME:   minicrypt_bobbens
DEPTH:  Crypt
MONS:   necromancer, zombie / draugr w:5, 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
MONS:  lich / bone dragon w:3, zombie / draugr
KMONS: Y = Boris / ancient lich, ancient lich / dread lich
KFEAT: ^ = w:5 alarm trap / w:8 zot trap / w:50 floor
SUBST: $ = .$*|, ? = $%, 1 = 1:13 2:6
MAP
    ccccc
 cccc?.?cccc
 c$.+.Y..+$c
 c.cc?.?cc.c
 c+ccc+ccc+c
 c..$c.c$..c
@n.1.c.c.1.c
 c$.$c.c$.$c
 ccc+c.ccccc
 cccZc^c$c
 c.+.c^czc
 cZccc^c+c
 c.+2+^+2c
 ccccc^ccc
     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 toadstool
MONS:    vampire / w:4 patrolling vampire knight / w:4 vampire mage
MONS:    vampire bloodprince
KFEAT:   Z = altar_kikubaaqudgha / altar_yredelemnul
KITEM:   Z = book of Unlife / book of Death / \
             randbook disc:necromancy numspells:7 / sanguine talisman
NSUBST:  2 = 1:3 / *:2
# create between one and four blood fountains with red toadstools nearby?
SUBST:   Q = qu, U = un, N = ns, S = sq
SHUFFLE: Mmn / Xxy / Xxy / Xxy, Rrs / Xxy / Xxy / Xxy, Ppq / Xxy / Xxy / Xxy
SUBST:   MRP = Y, mrp = 1, nsqu = 1:7 .:3, X=V, x = 3.., y = .
KPROP:   1 = bloody
TILE:    G = dngn_statue_depths_fangs
MAP
     c@G@c
   ccc.c.ccc
  cc2..u...cc
 cc..cuvuc..cc
 c..QuvVvuU.2c
cc2cqQuvuUnc.cc
@..qpqQuUnmn..@
GcqpPpqZmmMmncG
@..qpqSsNnmn..@
cc.cqSsrsNnc.cc
 c..SsrRrsN.2c
 cc2.csrsc..cc
  cc...s..2cc
   ccc.c.ccc
     c@G@c
ENDMAP

##############################################################################
# Shadows.
# For Crypt and Tartarus
#
NAME:    minmay_shadows
ORIENT:  centre
DEPTH:   Crypt, Tar
MONS:    shadowghast, soul eater / eidolon w:2, 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.xxx3.3xxx.2.xxx...x
xx1..xxx....1.....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 w:20 / ushabti
KMONS:  2 = guardian mummy
KMONS:  3 = mummy priest
KMONS:  4 = royal mummy
KITEM:  234 = |
SUBST:  1 = 2231
MAP
 ccccccccccccc
cc...........cc
cc.cccc+cccc.cc
ccmcc1.*.1ccmcc
ccxccc...cccxcc
c2x2c1...1c2x2c
cxxxcc...ccxxxc
c3x3c1...1c3x3c
cxxxcc...ccxxxc
c3x4c1...1c4x3c
ccccccc+ccccccc
.ccGcc...ccGcc.
.......@.......
ENDMAP

NAME:   st_small_mortuary
DEPTH:  Crypt
MONS:   necromancer, vampire mage, vampire bloodprince
ITEM:   sanguine talisman w:15 / sanguine talisman randart w:5 / \
        athame ego:vampirism pre_id / demon blade ego:vampirism pre_id
SUBST:  1 : 1.
NSUBST: ' = 5:e / *:., * = 1:d* / *:*
: dgn.delayed_decay(_G, 'e', 'human corpse')
MAP
   ccccccccc
 ccc2..3..2ccc
cc*.........*cc
c|*1.......1*|c
cc*.........*cc
cccc.......cccc
ce.cc.....cc.ec
c.............c
ce.cc.....cc.ec
cccc'''''''cccc
cc'''''''''''cc
c'''''''''''''c
cc'''''''''''cc
.ccc''eee''ccc.
...cccc+cccc...
 ......@......
ENDMAP

NAME:   st_vampire_maze
DEPTH:  Crypt
MONS:   vampire, vampire knight, vampire mage, vampire bloodprince
ITEM:   sanguine talisman w:15 / sanguine talisman randart w:5 / \
        athame ego:vampirism pre_id / demon blade ego:vampirism pre_id
NSUBST: * = 1:d* / *:*
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*4..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*1.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:    death knight draugr / frost giant draugr, 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
KFEAT:   ~ = broken_door
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:    death knight w:20 / bone dragon w:20 / revenant soulmonger
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 / 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 soulmonger
KMONS:   A = guardian mummy w:7 / ushabti w:3 / \
             draugr 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 pre_id, randbook disc:necromancy numspells:3
ITEM:    staff of necromancy pre_id
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 draugr w:8 / deep troll zombie w:24 / \
         deep troll simulacrum w:8 / iron troll draugr w:4 / \
         iron troll zombie w:4 / iron troll simulacrum w:4
NSUBST:  T = 3:1 / 2 = 1. / *:.
SHUFFLE: 12
: vault_granite_statue_setup(_G, "G", "gravestone")
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
: vault_granite_statue_setup(_G, "G", "gravestone")
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
ITEM:   sanguine talisman
NSUBST: - = 1:| / 2 = ||**d / 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 pre_id"
: local f = "good_item ego:freezing pre_id"
: 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 no_wall_fixup
DEPTH:  Crypt, !Crypt:$
ORIENT: float
# Monster density might be off here
MONS:   flayed ghost w:5 / phantasmal warrior, skeletal warrior
MONS:   hell knight / necromancer w:2, bone dragon
: mons("reaper ; " .. scythe("flaming"))
MONS:   lich
KMONS:  A0 = fire dragon draugr w:12 / quicksilver dragon draugr w:4 / \
             laughing skull w:6
KFEAT:  A = l
NSUBST: - = 1:0 / 2=0. / 2:1 / 1=1. / 1:2 / 1=2. / 6:3 / 2=3.
NSUBST: " = 4:A / 2=Al / *:l, ' = 2:0 / 2=1. / 2:5, ; = 1:4 / 1=5. / 1:6
NSUBST: ` = 1:| / 2=|* / 5:* / 2=*% / *:$
TILE:   x = wall_baleful
MAP
  ccccccccccccccccccccccccccc
 ccllllllcccccc""""""""""""cc
 cllcccxllcccc"""""""""""""cc
cclcc`cc'llccc""--------"""cc
cllc```c'.llcc"----------""cc
clcc```c'.llcc"---""""---""cc
clc...cc'..lll"--""""""--""cc.
clc;;.c.....ll.--""cc""--."cx.
cln;;.+........--""cc""--....@
cln;;.+........--""cc""--....@
clc;;.c.....ll.--""cc""--."cx.
clc...cc'..lll"--""""""--""cc.
clcc```c'.llcc"---""""---""cc
cllc```c'.llcc"----------""cc
cclcc`cc'llccc""--------"""cc
 cllcccxllcccc"""""""""""""cc
 ccllllllcccccc""""""""""""cc
  ccccccccccccccccccccccccccc
ENDMAP

NAME:    nicolae_crypt_knee_deep_in_the_dead
TAGS:    transparent no_monster_gen
DEPTH:   Crypt:2-
KMONS:   0 = 0 zombie / 0 draugr / 0 simulacrum / 0 spectral thing
KMONS:   9 = 9 zombie / 9 draugr / 9 simulacrum / 9 spectral thing
KMONS:   8 = 8 zombie / 8 draugr / 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 no_monster_gen
DEPTH:  Crypt
WEIGHT: 5
ORIENT: float
# 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 draugr / chonchon draugr / harpy draugr / \
        storm dragon draugr / juggernaut draugr / pearl dragon draugr / \
        fenstrider witch draugr / guardian serpent draugr / \
        quicksilver dragon draugr / 8-headed hydra draugr w:5 / \
        alligator snapping turtle draugr w:5 / \
        apis draugr w:5 / dire elephant draugr w:5 / titan draugr w:5 / \
        golden dragon draugr w:5 / hellephant draugr w:5
KMONS:  2V = skeletal warrior w:20 / laughing skull / \
             revenant soulmonger w:5 / ancient champion band / nothing w:20
KMONS:  3 = bone dragon / curse skull
: item(vault_species_skeletons(_G, "dungeon"))
KITEM:  3 = * / |
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+ccd
cM.2N2..cG.1..R...c...cdddcd
cG.N3N.Gccccccc.1.Z.1.+d1d+@
cM.2N2..cG.1..S...c...cdddcd
c.1...1.y.L.L.ccZccczccc+ccd
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 pre_id, blade talisman
ITEM:    mundane dagger, dagger good_item w:19 / athame good_item w:1
: 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, alderking, ancient lich / dread lich
NSUBST: 1 = 3 = 111123 / *:1
SUBST:  t = ttt., G = GGG., ` = ._, L = LL...
CLEAR:  _
TILE:   t = dngn_tree_dead
COLOUR: t = brown, G = lightgrey
: set_feature_name("tree", "dead tree")
: vault_granite_statue_setup(_G, "G", "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 draugr / 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 / cognitogaunt w:2
KMONS:   R = vampire / jiangshi / ghoul
KMONS:   L = lich / ancient lich w:5 / dread lich w:5
KMONS:   Y = vampire bloodprince
KMONS:   Q = spectral storm dragon
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 / sanguine talisman w:2
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. / |
TILE:    G = dngn_statue_angel / dngn_statue_princess / dngn_statue_mermaid
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
TAGS:   no_monster_gen no_item_gen layout_city
ORIENT: northwest
PLACE:  Crypt:$
# MONSTER LAYOUT
# boss (1)
# boss guard (2)
# secondary boss (3)
# support (4)
# primary guard (5)
# advanced guard (6)
# in tombs (7)

: local brnd = crawl.random2(13)
: if brnd > 8 then -- skeleton layout
MONS:   ancient lich / dread lich
MONS:   bone dragon
MONS:   lich
MONS:   ancient champion
MONS:   skeletal warrior
MONS:   laughing skull
MONS:   skeletal warrior w:20 / draugr w:40 / weeping skull
NSUBST: 2 = 1:34 / *:2
: elseif brnd > 4 then -- vampire layout
KMONS:  1 = vampire bloodprince / Jory w:5, vampire bloodprince
KMONS:  2 = undying armoury
KMONS:  3 = vampire knight w:15 / \
            dancing weapon ; long sword ego:vampirism pre_id
KMONS:  4 = vampire mage
KMONS:  5 = phantasmal warrior / \
            skeletal warrior ; halberd ego:vampirism | war axe ego:vampirism | \
                               dire flail ego:vampirism | quarterstaff ego:vampirism
KMONS:  6 = vampire knight w:15 / jiangshi
KMONS:  7 = vampire knight w:5 / vampire w:5 / skeletal warrior / \
            w:15 zombie / wraith / w:5 nothing
: elseif brnd > 0 then -- ghost layout
MONS:   curse skull
MONS:   revenant soulmonger
MONS:   lich
MONS:   eidolon / flayed ghost
MONS:   phantasmal warrior / shadow wraith w:6
MONS:   weeping skull
MONS:   wraith w:5 / freezing wraith w:5 / shadow wraith / \
        spectral thing w:5 / spectral caustic shrike / \
        spectral spriggan defender / shadowghast w:5 / nothing
: else -- mummy layout
MONS:   royal mummy
MONS:   guardian 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:* / 1:*% / *:%
NSUBST: %*| = 2:d
: crypt_loot_plus(_G, "S")
MAP
cccccccccccccccvvvvvvvvvvvvvvvvvcccccccccccccc
ccccccccccccccvv..WWWWWWWWWWW..vvccccccccccccc
cccccccccccccvv..WWWWWWSWWWWWW..vvcccccccccccc
cccccccccccccv...WWWb.bgb.bWWW...vcccccccccccc
cccccccccccccv...WWb$$|*|$$bWW...vcccccccccccc
cccccccccccccv...WW.$/|%|/$.WW...vcccccccccccc
cccccccccccccv...WWb$$|*|$$bWW...vcccccccccccc
cccccccc/.cccv...WWWb.b1b.bWWW...vccc./ccccccc
cccccccc...ccvv..WWWWWWWWWWWWW..vvcc...ccccccc
cccccccc.../ccvv..WWWWWWWWWWW..vvcc/...ccccccc
ccccccccc+cccccv...............vccccc+cccccccc
cccY......cccccvv....2...2....vvccccc......Ycc
ccc..3....ccccccvv3....6....3vvcccccc....3..cc
ccc.......ccccccvvv.6.....6.vvvcccccc.......cc
ccc.......ccccccvvvvv.....vvvvvcccccc.......cc
ccc...5.5.ccccccvvvvvvv+vvvvvvvcccccc.5.5...cc
ccccccc+ccccccccvcccccU.Ucccccvcccccccc+cccccc
cccccc..ccccccccvc.U.cc+cc.U.cvcccccccc..ccccc
cccccc..ccccccccccG..F...F..Gcccccccccc..cc
cccccc........cG....45...54....Gc........cc
cccccc........+.................+........cc
cccccc..cccccccG.......C.......Gccccccc..cc
cccccc..c...+.ccc56.........65ccccccccc..cc
cccccc..c/..c.ccc5...........5ccccccccc..cccc
ccccccc+ccc/c.+7+.............+7ccccccc+cccccc
ccccc.5.5.cccccc+..c.......c..+cccccc.5.5.cccc
ccc7+.....+7ccc7+.............+7ccc7+.....+7cc
cccc+.....+cccccc..c.......c..cccccc+.....+ccc
ccc7+.....+7ccc7+.............+7ccc7+.....+7cc
ccccc.....cccccc+..c.55555.c..+cccccc.....cccc
ccc7+.....+7ccc7+.............+7ccc7+.....+7cc
cccc+.....+cccccc..c6.6.6.6c..cccccc+.....+ccc
ccc7+.....+7ccc7+.............+7ccc7+.....+7cc
ccccc.5.5.cccccc+..c.......c..+cccccc.5.5.cccc
ccccccc+ccccccc7+.............+7+..cccc+cccccc
cccccc.6.cccccccc..c.......c..ccc./ccc.6.ccc
cccccc.4.cccccc7+.............+7cccccc.4.ccc
cccccc%/$ccccccc+..c.......c..+ccccccc$/%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
TAGS:   no_monster_gen no_item_gen no_pool_fixup no_rotate no_vmirror no_descent
PLACE:  Crypt:$
ORIENT: encompass
MONS:   zombie w:12 / draugr w:8 / simulacrum w:2 / bog body w:4
MONS:   storm dragon zombie / caustic shrike zombie / \
        golden dragon draugr / jiangshi w:5 / ghoul w:5 / cognitogaunt w:5
MONS:   skeletal warrior, necromancer, hell knight
MONS:   lich, vampire knight / ancient champion w:2
KMONS:  8 = bone dragon
KMONS:  9 = ancient lich / dread lich / vampire bloodprince
KMONS:  0 = death knight
KMONS:  A = revenant soulmonger
KMONS:  B = phantasmal warrior
KMONS:  C = reaper
KMONS:  D = patrolling undertaker
KMONS:  E = dancing weapon
KMONS:  F = crystal guardian / war gargoyle w:14
KMONS:  G = undying armoury
KMONS:  Z = laughing skull
KFEAT:  _ = altar_kikubaaqudgha / altar_yredelemnul
KFEAT:  Z = w
KFEAT:  > = enter_tomb
# decorative red wall
KFEAT:  r = v
COLOUR: r = red
TILE:   r = dngn_metal_wall_red
NSUBST: - = 3:+ / *:v
# enemy randomization
NSUBST:  3 = 2:3B / *:3
SHUFFLE: LMOP, LMN, OPQ
NSUBST:  L = 1:G / *:077, M = 1:8 / *:3, N = 1:0A / *:B
NSUBST:  O = 1:CDD / *:C, P = 1:E / 1:F / *:., Q = 1:E / 1:F / *:.
# Tomb entrance
: if crawl.x_chance_in_y(5, 7) then
SUBST:  z = *
NSUBST: ! = 1:> / * = **|
: else
NSUBST: z = 1:> / *:$
SUBST:  ! = **|
: end
# Loot randomisation
SUBST:  % = %$, * = *%, / = |**
NSUBST: *| = 2:d
: crypt_loot_plus(_G, "S")
MAP
vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
vwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwv
vwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwv
vwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwv
vwwwwwwwwwwwwwwvvvvvvvvvvvvvvvvvvvvvvvvvvvvwwwwwwwwwwwwwwv
vwwwwwwwwwwwwwwv..........................vwwwwwwwwwwwwwwv
vwwwwwwwwwwwwwwv.........rrrrrrrr.........vZwwwwwwwwwwwwwv
vwwwwwwwwwwwwwwv.........r//||//r.........vZZZZwwwwwwwwwwv
vwwwwwwvvvv-vvvv......rrarr*/z*rrarr......v-v-v-v-vwwwwwwv
vwwwwwwv.......v......r$$*rr++rr*$$r......v.......vwwwwwwv
vwwwwww-....5..v.....rrrrzr$$$$rzrrrr.....v.......-wwwwwwv
vwwwwwwv....5..+........rrr$Sg$rrr........+.2..5..vwwwwwwv
vwwwwww-....5..v......6...r$$$$r...6......v....5..-wwwwwwv
vwwwwwwv.2.vvvvv...rrr....rr++rr....rrr...v....5..vwwwwwwv
vwwwwww-...v...vv....rr.rrrU..Urrr.rr....vvv+v....-wwwwwwv
vwwwwwwv...v.E..vv....rrr........rrr....vv...vvvvvvwwwwwwv
vwwwwwwv...+.....vv....r.U..9_..U.r....vvvv.....+1vwwwwwwv
vwwwwwwv...v..7.$vvv...rr........rr...vvv1+.....+vvwwwwwwv
vwwwwwwv...v...$-v.vv...rrrU..Urrr...vv.vvv.....+1vwwwwwwv
vwwwwwwv...vvvvvvv..vv....rr..rr....vv..v1+.....vvvwwwwwwv
vwwwwwwv...vvv...v...vv............vv...vvv.....+1vwwwwwwv
vwwwwwwv...vv....+....vv..........vv....+....4..+vvwwwwwwv
vwwwwwwv...v43...v.....vv........vv.....vvv.....+1vwwwwwwv
vwwwwww-...v.1...v.....Fvv......vvF.....v1+.....+vvwwwwwwv
vwwwwwwv...v....vv....vvvvvvvvvvvvvv....vvv.....+1vwwwwwwv
vwwwwww-.......vv....vv.....ll.....vv....vvv+v..vvvwwwwwwv
vwwwwwZv......vv....vv..............vv....vv1v..+1vwwwwwwv
vwwwwwZ-.....vv....vv................vv....vvv..+vvwwwwwwv
vwwwZZZv.....v....vv.......4..4.......vv....vv..+1vwwwwwwv
vwvvvvvvvvvvvvv+vvvvv+vv.133..331.vv+vvvvv+vvvvvvvvvvvvvwv
vwvv.........v..F.v....v..........v....v.........v..%-vvwv
vwvv.........v....v....v..........v....v.........v...$vvwv
vwvv.....L...+....v....v..........v....v.....M..M+....vvwv
vwvv....L....v....v..3.v..........v.3..v.........v....vvwv
vwvvv....L...v....+...4vr........rv4...+......M..vvvvvvvwv
vwwvv........v....v..3.vrr......rrv.3..v.............vvwwv
vwwvvv.......+....v....vrrrr++rrrrv....v............vvvwwv
vwwwvv.......v....v....vrrU3..3Urrv....v............vvwwwv
vwwwvvvvvvvvvvvvvvvv+vvvrE......Ervvv+vvvvvvvvvvvvvvvvwwwv
vwwwwvvv!**$$v.........vrrrr++rrrrv.........v$$**!vvvwwwwv
vwwwwwvvv/*$$+.........vrrwZ..Zwrrv.........+$$*/vvvwwwwwv
vwwwwwwvvv*$$v...O.....vrwZw..wZwrv...P.....v$$*vvvZwwwwwv
vwwwwwwwwvvv$v....O....vwwww..wwwwv..P......v$vvvZwwwwwwwv
vwwwwwwwwwvvvv.....O...vwwww..wwwwv...P.....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
vwwwwwwwwwwwwwwwwwwwwwwwZww....wwZwwwwwwwwwwwwwwwwwwwwwwwv
vwwwwwwwwwwwwwwwwwwwwwwwwww....wwwwwwwwwwwwwwwwwwwwwwwwwwv
vwwwwwwwwwwwwwwwwwwwwwwwww....{.wwwwwwwwwwwwwwwwwwwwwwwwwv
vwwwwwwwwwwwwwwwwwwwwwZwww.[....wwwZwwwwwwwwwwwwwwwwwwwwwv
vwwwwwwwwwwwwwwwwwwwwwwwwww..(.wwwwwwwwwwwwwwwwwwwwwwwwwwv
vwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwv
vwwwwwwwwwwwwwwwwwwwwwwwwZwwwwwwZwwwwwwwwwwwwwwwwwwwwwwwwv
vwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwv
vwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwv
vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
ENDMAP

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

##############################################################################
#       Four quadrants (by mu)
#       burial hoard (NE), chapel of kikubaaqudgha (NW), catacombs (SE), crematory (SW)
#
NAME:   quadcrypt_mu
TAGS:   no_monster_gen no_item_gen no_pool_fixup no_rotate no_vmirror no_hmirror
TAGS:   no_descent
ORIENT: encompass
PLACE:  Crypt:$
####### chapel garden
SUBST:  F = f?, f = p.
KMONS:  p = withered plant
KMONS:  ! = skeletal warrior ; w:6 dagger ego:pain | w:5 rapier ego:draining | \
                               w:2 athame ego:pain | w:1 quick blade ego:pain
KITEM:  s = any book
SUBST:  s = s%
SUBST:  u = U Y
KMONS:  8 = dancing weapon ; scimitar ego:draining / crystal guardian
####### NW monsters (chapel).
KMONS:  A = ancient lich / dread lich / mummy priest w:4
KMONS:  BT = lich w:40 / ancient lich / dread lich
KMONS:  C = war gargoyle
KMONS:  D = shadowghast / wraith
####### NE monsters (hoard). On a coinflip, either vampires or mummies.
: if crawl.coinflip() then
KMONS:  H = vampire bloodprince
KMONS:  I = vampire knight
KMONS:  J = vampire mage
KMONS:  K = jiangshi
KMONS:  L = vampire / zombie w:20
NSUBST: H = 1:H / *:I, L = 1:I / *:L
: else
KMONS:  H = guardian sphinx
KMONS:  I = ushabti
KMONS:  J = death scarab
KMONS:  K = guardian mummy
KMONS:  L = guardian sphinx zombie / sphinx marauder draugr w:5 / mummy w:5
NSUBST: JK = 1:I / 1:J / *:K, L = 1:IJ / 2:K / *:L
: end
####### SE monsters (catacombs). Either corporeal or incorporeal undead.
KMONS:  P = patrolling curse skull
: if crawl.coinflip() then
KMONS:  Q = bone dragon
KMONS:  R = skeletal warrior / cognitogaunt w:3
KMONS:  S = zombie w:12 / draugr
: else
KMONS:  Q = eidolon
KMONS:  R = phantasmal warrior / flayed ghost w:8
KMONS:  S = shadowghast / place:Vaults:$ spectre / \
            freezing wraith / shadow wraith
: end
####### SW monsters (crematory). Either fiery undead or hellish.
: if crawl.coinflip() then
KMONS:  z = ghost crab / fire dragon draugr w:8 / laughing skull w:22
KMONS:  Z = curse skull w:1 / revenant soulmonger w:19
SUBST:  ~ = m
: else
KMONS:  z = hell knight w:20 / smoke demon / laughing skull
KMONS:  Z = curse skull w:1 / balrug w:19
KFEAT:  ~ = crystal_wall
TILE:   ~ = bedevilled_crystal_gehenna
: set_feature_name("crystal_wall", "bedevilled crystal wall")
: end
####### Randomisation of doors and rewards
NSUBST: - = 1:+ / *:v, ' = 1:+ / *:v, " = 1:+ / *:v
NSUBST: *| = 2:d, g = 1:g / 1:h / *:.
####### Tomb entrance
: if crawl.one_chance_in(4) then
KFEAT:  T = 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, "h")
MAP
vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
vccccccccccccccccccccccccc......"...svvvvvvvvvvvvvvvvvvvvvv
vc..B..c.....c....sc..+..c.ffff.vvvsTvvvvvvvvvvvvvvvvvvvvvv
vc.c.c.+.....+....cc..+..c.ffFf.vvvv"vvvvvvvvvvvvvnL+....gv
vc.._..+...B.c....sc..c..m.ffFf.vO???||$$$.vvvvv..nLn|????v
vc.c.c.c.....c....cc..c..c.ffff.v?$$$$$$$$.vvvv...nLn$$$$$v
vc.....ccc+ccc....sc..cDDc.ffff.vnnnnnnnnn+vvv..H.nLn$$O$$v
vc.....c.....c....cc..c..c.ffff.v..........vv.....nLn$$$$$v
vc.....c?....c..A.sc..c..m..fff.v..........vv.uvu.nLn$$$$$v
vc.....c|?...c...gcc..c..c...ff.v..vvvvvvvvv..vvv.nLnnnnnnv
vc.....c||?CCcscscc...c..c....f.v..........+..uvu.nLLLLLLLv
vc++cccccccccccccc...cc..c......v..........+......nnnnnnn+v
vc.....D............cc...m..D...vvvvvvvvvvvv.H............v
vc.....D...........cc...cc......v....vvvvvvv..............v
vccccccccccccccccccc...cc...ff..v.KK...vvvvvv....v..v..v..v
vc....................cc..fffff.v.......vvvvv.............v
vc...................ccC..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.D.ffff...ffff...D....ffffffff.v......vv...v.....J.......v
v...ffff...fffff.......fffffff..v.......v...+.............v
v....ffff....ffff.......f.ffff..v.......v...+.............v
v......f.f....ffff..............v.......v...v.....J.......v
vvvvvvvvvvvvvv++vvvvvvvvvvvvvvvvvvvvvvv+vvvvvvvvvvvvvvvvvvv
vvvvvvvvvvvvv....v??llv??llv??llvvvvvvG.GvvvWWWWWWW.......v
vvvvvlllvvvvv....v?.zlv?.zlv?.zlvvvv.......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...vvWWWWmWWP|m.v
v...lc.cl...v...................vG...........GvWWWWmmmmmm.v
v..z.c.c.z..+...................+......U......+...........v
v...........v...................vG...........Gv...........v
v.cccc.cccc.vvvvvvvvv-vvvvvvvvvvvv.........vvvvvvvvvvvvvvvv
v.cll...llc.v??......<vvvvvvvvvvvv.........+...+..........v
v.clz...zlc.-???.....-vvvvvvvvvvvvv........+...vvvvvvvvvv.v
v.c...Z...c.v????|--vvwwwwwwwwvvvvvv.......v....vvvW.R.%v.v
v...........vRRRR-vwwwwwwwwwwwwwwvvvvvG.Gvvv+v...vvW...%v.v
v..ccc.ccc..vRR-vvwwwwwwwwwwwwwwwwvvvvv+vvvv.vv...vv...$v.v
v..lc...cl..vvvvwwwwwwwwwwwwwwwwwwwwvvv<v....vvv...vvv+vv.v
v.z.......z.vvvwwwwwwwwwwwwwwwwwwwwwwvvvv.vvvvvvv...vv....v
v....lll....vvvwwwwwwwwwwwwwwwwwwwwwwvvvv.v%RWvvvv...vvvv.v
v....l~l....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........vzvwwwwww.........wwwwwwwwwwwwwv.v+v+vvvv+vvvv...v
v...ll...+.vwwwww...........wwwwwwwwwwwwv............vvv..v
v...ll...+zvwwww.............wwwwwwwwwwwvvvvvvvvvvvvvvvvv+v
v...ll...+.vwwww.............wwww.......+........R......v.v
v...ll...+zvwww...............ww........+....V.S.R.V....v.v
v.llllll.+gvwww...................wwwwwwv......S........v.v
v.llllll.+zvwww8.............8...wwwwwwwv....V.S.R.V....v.v
v...ll...v.vwww.................wwwwwwwwv........R......v.v
v.z.ll...vzvvww...............wwwwwwwwwvvvvvv''vvvvvvv+vv+v
v.Z.ll...v.*vwww.{...........wwwwwwwwwwv.......'G$.....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
vvvvvvvvvvvvvvvvvvwwwwwwwwwwwwwwwwvvvG....W....v+vvv.....$v
vvvvvvvvvvvvvvvvvvvwwwwwwwwwwwwwwvv!+.......R..'........$Gv
vvvvvvvvvvvvvvvvvvvvvvwwwwwwwwvvvvvvvGvvvvvvvvvvvvvvvvvvvvv
vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
ENDMAP

### Haunted Forest #############################################################
#
# Q: How is there a dead forest in the Crypt?
# A: ~use your Imagination~
#
NAME:   evilmike_haunted_forest
TAGS:   no_monster_gen no_item_gen no_pool_fixup no_rotate no_descent
ORIENT: encompass
PLACE:  Crypt:$
MONS:   w:3 patrolling lich / w:1 patrolling revenant soulmonger
MONS:   patrolling zombie / nothing
MONS:   alderking
MONS:   w:5 wraith / phantasmal warrior / eidolon / w:5 freezing wraith / w:5 nothing
MONS:   wyvern draugr w:5 / raven draugr w:5 / 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
KMONS:  s = meliai zombie / spriggan berserker zombie / \
            spectral broodmother / spectral spriggan defender
KMONS:  p = withered plant
: if crawl.coinflip() then
# Temple of yred
KMONS:  9 = patrolling profane servitor
KMONS:  H = patrolling death knight w:20 / patrolling profane servitor
KMONS:  0 = patrolling ghoul / patrolling revenant soulmonger w:5
KMONS:  A = patrolling death knight
KMONS:  B = skeletal warrior
KMONS:  C = wight
KMONS:  E = phantasmal warrior / flayed ghost w:4 / nothing
KMONS:  F = patrolling bone dragon
KFEAT:  _ = altar_yredelemnul
: else
# Temple of kiku - more necromancers, more demonic (kiku's description refers to
# them being demonic). Not as much undead in this set.
KMONS:  9 = patrolling ancient lich / patrolling dread lich
KMONS:  H = patrolling lich w:40 / 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 = zombie w:7 / draugr w:6 / nothing
KMONS:  F = patrolling reaper
KFEAT:  _ = altar_kikubaaqudgha
: end
KITEM:  ? = |
KFEAT:  Z = c
KFEAT:  u = petrified_tree
KFEAT:  m = iron_grate
KFEAT:  > = enter_tomb
SUBST:  T = t., t = ttttu
SUBST:  v = cccc.-
NSUBST: . = 68:p / *:.
COLOUR: t = brown
COLOUR: x'D = white
COLOUR: G = lightgrey
COLOUR: "2 = brown
FTILE:  .tu5f?<8 = FLOOR_GREY_DIRT
FTILE:  "G2{[( = FLOOR_PEBBLE_BROWN
FTILE:  '_D = FLOOR_SANDSTONE
TILE:   Z = WALL_STONE_GRAY
SUBST:  D = +, d = cc+
NSUBST: * = 12:* / 12:% / *:$
SHUFFLE: 9H
SUBST:  n : ncc
TILE:   t = DNGN_TREE_DEAD
: vault_granite_statue_setup(_G, "G", "gravestone")
: set_feature_name("tree", "dead tree")
NSUBST: *| = 2:d
: crypt_loot_plus(_G, "S")
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--S--Hcccccc......T....t.TTTTTtttttT.TtttT..Tttttt
tttT"""""""".......T...c------*|||*------c..555....t.....t.tTtttttT.TtT.TTtttttt
ttttt"""""".vvvvv.....ccc--ZZ**|V|**ZZ--ccc..555...t..tt..t...TTtttT....Tttttttt
ttttttTtT"".v--4vvv...ccc--ZZ-*|||*-ZZ--ccc.......T.....t....t..TttttT.TTttttttt
ttttttT..."...-%v--v...c--------g--------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...............Ttc.s...s.ctt
ttttT.t.T.............ccc-cccc-C'C-cccc-ccc..T...............T...t..tcs.s.s.3ctt
tttttT.....cccccccccccccc-cVcC-'''-CcVc-cccccccccccccc.........T...tpcccnnnccctt
ttttT..t..cc----+---------c-+-''Z''-+-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-ZZZZ'''''ZZZZ-B-c----cccc-cc...vvvvvvv..T...t.Tttttttt
tttttT....ccc+ccccEEEEc---ZZZZ'''''ZZZZ---c0--0cccc+ccc..v---4--v....t.Ttttttttt
ttttT..t...n--'F-c-EE-c---ZZZZ''_''ZZZZ---c----c--'B-n...v-ZZZZ-v..T..tTtttttttt
ttttT.t...cc-'Z'-ccc+cc-V----B'''''B---V--cc+ccc-'Z'-cc..v-ZZZZ4v......Ttttttttt
tttttT..T..n--'--+----d--------'''--------d----+--'B-n...v4ZZZZ-v..T..t.Tttttttt
ttttttTt...cccdcccccccccc-ZZZ--'''--ZZZ-ccccccccccdccc...v%---4-v........Ttttttt
tttttttT..............ccc-ZZZ--'''--ZZZ-ccc..............vvvvvvvv....T.t.tTttttt
ttttttttTt....ZZZZZ....n-------'''-------n...555....T..............--v....Tttttt
tttttttT......Z*1*Z....n---B---'''---B---n..555......ccccccccc....--Tv..t.Tttttt
ttttttT.t..T..Z*|*Z...ccc-ZZZ--'''--ZZZ-ccc...T......c$$$>$$$c...--44vT...tTtttt
ttttttT.......Z***Z...ccc-ZZZ--'''--ZZZ-ccc.T........c$$$$$$$c..vvvvvvvvvv.Ttttt
tttttttT.t.T..ZZ-ZZ....n-------'''-------n.......T...c$$$7$$$c..--4--vT..t.Ttttt
ttttttttT......Z+Z.....n-------'''-------n.....t..t..c**666**c....---v..t...Tttt
tttttttttTt..T.Z"Z....ccc-ZZZ--'''--ZZZ-ccc..T...t..tc-------c....T..t....t..Ttt
tttttttttT......".....ccc-ZZZ--'''--ZZZ-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....."....cccccZZZcDDDcZZZccccc.tttt"""2""cc+++cc""""2tt.t..Tttttttt
ttttT.t5........""....ccc--ZZZV'''VZZZ--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 / bloodprince, vampire [knight / mage], dancing weapons)
#  ghostly (revenant soulmonger, eidola, shadow dragon)
#  mummy (royal mummy, mummy priests, sphinx)
#
# Loot:
#  roughly similar loot to evilmike's haunted forest
NAME:   due_elkab
TAGS:   no_monster_gen no_item_gen no_pool_fixup no_rotate no_trap_gen
TAGS:   layout_city
PLACE:  Crypt:$
ORIENT: north
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:   guardian sphinx draugr / titan draugr
MONS:   fire dragon draugr w:5 / ice dragon draugr w:5 / draugr w:25 / \
        laughing skull / weeping skull w:5
MONS:   generate_awake bone dragon / generate_awake curse toe w:5
: elseif brnd > 6 then
MONS:   patrolling vampire knight / patrolling vampire mage / \
        patrolling jiangshi w:15 / patrolling phantasmal warrior w:5 / \
        patrolling chonchon zombie w:5
KMONS:  2 = vampire bloodprince w:15 / Jory, vampire bloodprince
KMONS:  3 = dancing weapon ; long sword ego:vampirism / vampire knight
KMONS:  4 = phantasmal warrior / jiangshi
KMONS:  5 = vampire w:6 / zombie / chonchon zombie w:6 / storm dragon zombie w:3
KMONS:  6 = generate_awake vampire mage
: elseif brnd > 2 then
MONS:   patrolling freezing wraith / patrolling spectral thing w:12
MONS:   revenant soulmonger
MONS:   eidolon
MONS:   flayed ghost / phantasmal warrior w:8
MONS:   spectral thing / simulacrum / reaper w:5 / 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 / patrolling undertaker w:3
MONS:   reaper w:3 / guardian mummy ; long sword | great sword | \
        battleaxe | war axe | broad axe . chain mail w:15 | plate armour w:1
MONS:   bog body / mummy w:5 / soul eater w:5 / guardian mummy
MONS:   generate_awake guardian sphinx
: end
SUBST:  '" = .
NSUBST:  %*| = 2:d
: crypt_loot_plus(_G, "Z")
MAP
                ccccccccccccccccccccccccccccccc
                ccccccccccccccccccccccccccccccc
                cc*$*c|%*...Z...**|c.........cc
                cc$3$c|*...'2'...%|c..G.3.G..cc
                cc...c|%|...g...|%|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 no_descent
PLACE:   Crypt:$
ORIENT:  encompass
MONS:    skeletal warrior / jiangshi, laughing skull / weeping skull w:1
KMONS:   3 = cognitogaunt
KMONS:   4 = bog body
KMONS:   5 = necromancer
KMONS:   6 = simulacrum / spectral thing / zombie w:7 / draugr w:3 / \
             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 soulmonger
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:   K = weeping skull
KMONS:   L = bone dragon
KMONS:   M = burial acolyte
KMONS:   NO = jiangshi
KMONS:   P = flayed ghost
KMONS:   Q = flayed ghost / shadowghast w:20
# Boss tier monsters.
: if crawl.one_chance_in(5) then
KMONS:   R = Khufu, royal mummy
KMONS:   S = mummy priest
KMONS:   T = guardian mummy
: elseif crawl.one_chance_in(4) then
KMONS:   R = Jory w:5 / vampire bloodprince, vampire bloodprince
KMONS:   S = undying armoury / vampire mage
KMONS:   T = vampire knight / jiangshi
: elseif crawl.one_chance_in(3) then
KMONS:   R = ancient lich / dread lich
KMONS:   S = flayed ghost
KMONS:   T = phantasmal warrior
: elseif crawl.coinflip() then
KMONS:   R = curse skull
KMONS:   S = ancient champion
KMONS:   T = skeletal warrior
: else
KMONS:   R = patrolling undertaker band
KMONS:   S = reaper
KMONS:   T = soul eater
: end
KFEAT:   R = enter_tomb
KFEAT:   _ = altar_yredelemnul / altar_kikubaaqudgha
SHUFFLE: 34 / 56 / 78 / 90, AB / CD / EF / HI / JK / LM / NO / PQ
SHUFFLE: {[(<
NSUBST:  *| = 2:d
: crypt_loot_plus(_G, "Z")
MAP
ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
ccccccccccccccccccccccccc|*$$...R...$$*|ccccccccccccccccccccccccc
cccccccccccccccccccccc..cc*$$.T.g.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.Z.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 soulmonger / cognitogaunt w:5
MONS:    jiangshi / ghoul w:2
MONS:    profane servitor w:12 / bone dragon w:12 / vampire bloodprince / \
         curse toe w:1 / ancient lich w:1 / dread lich w:1
MONS:    skeletal warrior ; partisan | halberd | glaive | bardiche w:5
MONS:    freezing wraith w:20 / shadow wraith w:20 / flayed ghost
MONS:    zombie w:20 / draugr w:15 / simulacrum w:15
KMONS:   8 = vampire knight
KMONS:   9 = vampire w:7 / vampire mage w:3
KMONS:   0 = mummy priest
KMONS:   A = guardian mummy w:7 / ushabti w:3
SHUFFLE: 56, 89 / 0A, Sg
SUBST:   5 = 55..., 6 = 66..., 7 = 77., 9 = 9., A = AA.
KFEAT:   Y = altar_yredelemnul
KFEAT:   K = altar_kikubaaqudgha
NSUBST:  *| = 2:d
: crypt_loot_plus(_G, "S")
MAP
cccccccccccccccccccccccccccc
cccccccccccccSgccccccccccccc
cccccccccccc$$$$cccccccccccc
cccccccccccc$$$$cccccccccccc
ccccccccccccc++ccccccccccccc
ccccccc..............ccccccc
ccc**c................c**ccc
cc||*+..4...K..Y...4..+*||cc
cc||*+................+*||cc
ccc**c................c**ccc
ccccccc.............cccccccc
ccccccccccccc++ccccccccccccc
cccccccccc........cccccccccc
cccc9..+.+...33...+.+..9cccc
ccc989.+.+...33...+.+.989ccc
cc..9..ccc........ccc..9..cc
cc.......cccc**cccc.......cc
cc.....c..cccccccc..c.....cc
cc........cccccccc........cc
cc........cccccccc........cc
cc.......2cccccccc2.......cc
cc....c...cccccccc...c....cc
cc5..5...ccccVVcccc...5..5cc
cc.11.cccc........cccc.11.cc
cc5..5.+.+...11...+.+.5..5cc
cc.....+.+..5..5..+.+.....cc
cc...ccccc........ccccc...cc
cc...ccccc........ccccc...cc
cc...ccccc........ccccc...cc
cc.7.cc  c...55...c  cc.7.cc
cc7V7cc  cccc++cccc  cc7V7cc
cc.7.cc    Gc..cG    cc.7.cc
ccccccc    ..@@..    ccccccc
ccccccc              ccccccc
ENDMAP
