################################################################################
# lair.des: All maps relating to the Lair branch.
#
# <<1>>     Entries
# <<2>>     Decorative vaults
# <<3>>     Monster-placing vault sets
# <<4>>     Other monster-placing vault
# <<5>>     Small Lair ending vaults
# <<6>>     Large Lair ending vaults
#
#           Branches off of Lair can be found in their relevant file:
#           Swamp - swamp.des                Shoals - shoals.des
#           Snake Pit - snake.des            Spider Nest - spider.des
#           Pits of Slime - slime.des
################################################################################

{{
crawl_require('dlua/vault.lua')

function lair_entry_setup(e)
    e.tags("lair_entry")
    e.kfeat("O = enter_lair")
    e.orient("float")
    e.tile("c = stone_wall_lair")
end

function beast_lair_populate_mons_large(e)
    local set = crawl.random2(3)
    if you.depth() > 3 then
      set = set + 3
    end
    e.tags("no_monster_gen")
    e.mons("plant") -- 1 is always plant.
    if set == 0 then
        e.mons("hound / wolf")
        e.mons("wolf")
        e.mons("wolf / warg w:1")
    elseif set == 1 then
        e.mons("black bear")
        e.mons("black bear / polar bear")
        e.mons("polar bear")
    elseif set == 2 then
        e.mons("iguana")
        e.mons("iguana / basilisk")
        e.mons("komodo dragon w:20 / hydra w:2")
    elseif set == 3 then
        e.mons("elephant")
        e.mons("elephant")
        e.mons("elephant / dire elephant w:1")
    elseif set == 4 then
        e.mons("yak")
        e.mons("yak / death yak w:6")
        e.mons("death yak / catoblepas w:1")
    else
        e.mons("water moccasin")
        e.mons("water moccasin / black mamba w:5")
        e.mons("black mamba / anaconda w:2")
    end
end

function beast_lair_populate_mons_small(e)
    -- don't do this while validating because this call changes the tags
    if not e.is_validating() and crawl.one_chance_in(25) then
        beast_lair_populate_mons_large(e)
    else
        local monster_list = {}
        if you.depth() < 4 then
            monster_list = { "black bear", "water moccasin", "bullfrog",
                             "wolf", "yak", "komodo dragon", "cane toad" }
        else
            monster_list = { "yak", "yak", "polar bear", "death yak",
                             "elephant", "cane toad", "komodo dragon",
                             "wyvern" }
        end
        e.mons(plant)
        e.mons(monster_list[crawl.random2(#monster_list) + 1])
        e.mons(monster_list[crawl.random2(#monster_list) + 1])
        e.mons(monster_list[crawl.random2(#monster_list) + 1])
    end
end

function beast_lair_randomise(e)
    e.tags("no_trap_gen")
    e.depth("Lair, !Lair:$")
    -- Tools for randomizing environments,
    -- making given glyphs plants, floor, shallow water, or empty floor.
    e.subst("A = 1:5 .")
    e.subst("B = x:3 .")
    e.subst("C = W:3 .")
    e.subst("D = Wx1.")
    e.subst("E : 1:3 .:9")
    e.subst("F : x:3 .:9")
    e.subst("G : W:3 .:9")
    -- Tools for randomizing monsters and items.
    -- M for monster, P for pack, L for loot, J for junk.
    e.subst("M = 2:4 .:8")
    e.subst("P : 2:2 .")
    e.subst("L = *:1 % .:5")
    e.subst("J = %:6 .:28")
end

function lair_small_ending(e)
    e.tags('lair_end_small')
    e.weight(5)
    if not dgn.persist.lair_second_ending_built then
      e.kitem("R = earthy gem")
    end

    if e.is_validating() then return end

    e.hook("post_place", function ()
        if not dgn.persist.lair_second_ending_built then
            dgn.persist.lair_second_ending_built = true
            dgn.place_maps { tag = "lair_end_small" }
            dgn.persist.lair_second_ending_built = nil
        end
    end)
end
}}

################################################################################
# <<1>> Lair entry vaults
# These should all use lair_entry_setup(_G), which hands out the proper tags,
# makes them floating vaults, and sets enter_lair on O.
################################################################################
# Dummy Lair entry
NAME:   lair_entry_dummy
TAGS:   extra transparent
WEIGHT: 30
: lair_entry_setup(_G)
MAP
O
ENDMAP

######################################
# Generic Lair entry.
#
NAME:    david_lair_generic
TAGS:    transparent
MONS:    black bear / basilisk
MONS:    wyvern, yak / death yak w:2, elephant
KMONS:   P = plant / fungus
SHUFFLE: 234, A1
SUBST:   A = ., P = P.
: lair_entry_setup(_G)
MAP
xxxx..@..xxxx
xx.........xx
x..P.A...P..x
..PP..1...P..
@....2O3....@
..P...1..P...
x..P...A....x
xx.........xx
xxxx..@..xxxx
ENDMAP

# Shrubbed Lair entry
NAME:   david_lair_shrubbed
TAGS:   transparent
MONS:   komodo dragon, wyvern / basilisk / iguana
KMONS:  P = plant
KFEAT:  O = enter_lair
SUBST:  ' = P., 2 = 22.
: lair_entry_setup(_G)
MAP
xxxxxxxxxxxxx
xxPPPPPPPPPxx
xPP1.'PPPPPPx
xPP.O.'PPP''.
xPP'.2PPP'..@
xPPPPPP''....
xP''PP......x
xx.''..'...xx
xxxx..@..xxxx
ENDMAP

# A fair number of these aren't Lair monsters anymore,
# but the idea still works, so.
NAME:    dpeg_lair_monsters
TAGS:    ruin transparent
MONS:    yak, death yak
MONS:    iguana w:30 / basilisk, komodo dragon
MONS:    river rat / hell rat / black bear
MONS:    bullfrog w:30 / blink frog, cane toad
SHUFFLE: 1356
NSUBST:  1 = 2 = 12 / 2:1 / 1:. / * = 1.., 3 = 2 = 334 / 2:3 / 1:. / * = 3..
NSUBST:  5 = 2:5 / 1:. / * = 55., 6 = 2 = 6667 / * = 6:5 .:9
SUBST:   y = xxx.
: lair_entry_setup(_G)
MAP
xxxxx...@...y
x111.........
x111.y...3...
x11.y...y...@
x..yy.O.yy...
@...y...y....
...3...y3.yy.
..........yy.
y...@........
ENDMAP

# Obligatory Oklob Plant Lair Entry Vault
NAME:   dpeg_oklobed_lair
TAGS:   no_monster_gen no_pool_fixup transparent
MONS:   fungus, plant, oklob plant
: if you.absdepth() < 10 then
SUBST:  A = 11., B = 2.
: else
SUBST:  A = 2
:    if you.absdepth() < 11 then
NSUBST: B = 2 = 3... / * = 2.
:    else
NSUBST: B = 3 = 33... / * = 2.
:    end
: end
: lair_entry_setup(_G)
MAP
...xxxxxxx...
..x...w...x..
....x...x....
...xxBBBxx...
.x..BAAAB..x.
.xw.BAOAB.wx.
.x..BAAAB..x.
...xxBBBxx...
....x...x....
..x...w...x..
...xxxxxxx...
ENDMAP

# Grove Lair entry
NAME:   minmay_lair_entry_grove
TAGS:   no_monster_gen transparent
MONS:   wyvern / basilisk w:4, yak, black bear / wolf
MONS:   water moccasin / iguana w:2 / scorpion w:2
KMONS:  P = plant / bush w:2 / fungus w:2
NSUBST: . = 1:1 / 2:2 / 1:4 / 1 = 12 / 1 = 4. / 12:P / * = .:450 t:20 P:40
NSUBST: ' = 1:1 / 1:2 / 1:4 / 1 = 12 / 1 = 40 / 8:P / * = .:250 t:20 P:40
SUBST:  2 : 223
: lair_entry_setup(_G)
validate {{ return has_exit_from_glyph('O') }}
MAP
     .....
   .........
  ...........
 .............
 .....'''.....
.....'''''.....
....'''''''....
....'''O'''....
....'''''''....
.....'''''.....
 .....'''.....
 .............
  ...........
   .........
     .....
ENDMAP

# Lava Lair entry
NAME:   minmay_lair_entry_lava
TAGS:   no_monster_gen transparent
WEIGHT: 1
MONS:   fire crab
NSUBST: M = 1:1 / *:L
SUBST:  L = l.
: lair_entry_setup(_G)
MAP
xx.x.x.x.xx
x.........x
....lLll...
x..llllll.x
...llMMlL..
x.LlMOMll.x
..ll.Mlll..
x.l.llll..x
...lllL....
x.........x
xx.x.x.x.xx
ENDMAP

# Welcome to Lair Island. We make great pancakes.
NAME:   erik_lair_island
TAGS:   transparent
MONS:   troll, hound w:15 / wolf
SUBST:  - = w., 2 = 2:5 .:1
: lair_entry_setup(_G)
MAP
.@........wwwwww-.....
..-.-.-..wwwwwww.-..-.
..--w..wwwwwwwww-.--..
...--w.wwwwwwwwwwww-..
...wwww-wwwwwwwwww--..
..wwwwww--w--w2wwww..@
..wwwwww--....wwww---.
....1....2.2O2.wwww...
..-wwwww---2.2www.ww-.
.....wwww2..w.2www....
..wwwwwwwww-.wwww---..
@..wwwwwwwwwwwwwww....
....-ww..ww-www..w....
....-......--.w..---..
...........-...@......
ENDMAP

# Dragon's Lair, for generous values of Dragon
NAME:    erik_lair_dragon
TAGS:    no_rotate
MONS:    steam dragon / acid dragon / swamp drake
MONS:    basilisk / wyvern / komodo dragon
NSUBST:  2 = 3=2 / 3=2. / .
SHUFFLE: %!*O
SUBST:   z = .xc, ! = %
: lair_entry_setup(_G)
MAP
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxzxxxzxzxxzx.2xxzxxxzx*zxxxz.2.xxxxx
xxxxxxxxxxxxxx.2.......zxx.x.zxxxz.zzxxxxzx.zxxxx
xxxxxxxxxxxxz....xxx...2....zzzzzz..zzzzx..%ccccx
xzxxzzzxxxxx..xxzzxxzz..........z...zzz..zzc+.zcx
@.....xxx.2.xxzxxxxxxzxzxzz.......1...2.x.ccc.zcx
xxzxxx...xxxxxxxxxxxxzxxxx.zz.2...z......zccc$ccx
xxxxxzxxxzxxxxxxxxxxxx....xxzz...z....zz..zzcczcx
xxxxxxxxxxxxxxxxxxxxzz2xxxzxxzzzz..zzz2zz.2Ozcccx
xxxxxxxxxxxxxxxxxxxxz!zxxxxxxxxxx.xxxzxxxzxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
ENDMAP

# Orcish Takeover!
NAME:   erik_lair_orcish_takeover
TAGS:   transparent
MONS:   orc, wolf, orc warrior / warg
MONS:   orc priest / orc wizard / plant
: lair_entry_setup(_G)
MAP
xxxx..@..xxxx
xx.........xx
x...2...44..x
...4..1......
@....3O.....@
......1..4...
x...4...2...x
xx.........xx
xxxx..@..xxxx
ENDMAP

# Plant/fungus spiral (due)
NAME:   due_lair_maze_entry_diamond
TAGS:   transparent
MONS:   water moccasin w:30 / scorpion / bullfrog w:30 / \
        black bear w:25 / yak / komodo dragon w:5
KMONS:  P = plant / fungus
ITEM:   spore talisman
SUBST:  P = P:60 `, d = d...
NSUBST: 1 = 3:1 / * = 1:30 P .
NSUBST: . = 10:P / 10 = P. / 4:1 / 2 = 3. / *:.
: lair_entry_setup(_G)
validate {{ return has_exit_from_glyph('O') }}
MAP
       ..P.P..
     ...........
   ..P.P.PP.PP....
 .....PP..PP1PP..P.
 .P..PPPP.PP.PPP...
....P.PPPP1PP.PPP....
.P.PPP1P.PPP.P.PPP...
...PPPP.P1PP.P.PPP...
...PPP.PPPOdPP.P.P...
.P.P1....PPPP1PP.P.P.
..PPPPPP.PPP.PP.P....
 ....PPPP.P.PP.P..P.
 P....PPPP.PP.P..P..
   .P..PPPPP.P....
     ......P....
       ..P....
ENDMAP

# A guard hut placed over the entrance of the lair,
# and a guard to watch over it.
NAME:   grunt_lair_entry_orc_guard_hut
TAGS:   transparent
MONS:   bullfrog w:15 / scorpion / black bear
MONS:   yak / elephant / komodo dragon
MONS:   patrolling orc warrior
KMONS:  P = plant / fungus
NSUBST: D = 2:1 / 2 = 1` / * = P``, 1 = 2:1 / 1:2 / 2 = 1. / 1 = 12 / * = `
SUBST:  P = PP`, . = P:1 .:5, ` = .
: lair_entry_setup(_G)
validate {{ return has_exit_from_glyph('O') }}
MAP
    ...@..
  ..D.P.P...
 ..D.PDPDP...
 .D.PD11PDP..
.D.PDPDPDPDP..
..PDPccccDPDP.
@PD1DcO2cP1P..
..P1Pc%`cD1DP@
.PDPDcc+cPDP..
..PDPDP`PDP.D.
 ..PDP11DP.D.
 ...PDPDP.D..
  ...P.P.D..
    ..@...
ENDMAP

NAME:    mainiacjoe_lair_zoo
TAGS:    transparent no_monster_gen no_item_gen
WEIGHT:  3
SHUFFLE: NALPS
KMONS:   P = anaconda / shock serpent
KMONS:   L = catoblepas / eight-headed hydra
KMONS:   N = emperor scorpion / orb spider
KMONS:   A = kraken / alligator snapping turtle
KMONS:   S = bunyip / goliath frog
KMONS:   z = orc warrior ; whip . leather armour / \
             orc knight w:5 ; whip . leather armour
KITEM:   $ = $ no_pickup
NSUBST:  P = P / `, N = N / `, A = A / w, S = S / w, L = L / `
SUBST:   T : TG
KFEAT:   AS = w
KFEAT:   ` = floor
FTILE:   `PNL = floor_grass_dark
KPROP:   `wANPLS = no_tele_into
KMASK:   `wANPLS = opaque
: lair_entry_setup(_G)
MAP
.............
.............
..nnncccnnn..
..nAAAcNNNn.....
..nAAAcNNNn......
..cAAAcNNNc.T.T...
..ccccccccc........
..nPPPc$$.+.....T..
..nPPPc$z.+..O.....
..nPPPc$$.+.....T..
..ccccccccc........
..cLLLcSSSc.T.T...
..nLLLcSSSn......
..nLLLcSSSn.....
..nnncccnnn..
.............
.............
ENDMAP

NAME:   hellmonk_lair_entry_icy
TAGS:   transparent
MONS:   ice beast, wolf / polar bear w:3, rime drake
NSUBST: 3 = 3 / 2.., . = 2 / 4 = 2... / .
SUBST:  x = xxx., - = W:5 ':25 x:20 .:15
NSUBST: ' = 16 = 1''' / '
TILE:   x = wall_ice_block
FTILE:  '1 = floor_ice
COLOUR: '1 = blue
: lair_entry_setup(_G)
MAP
       -------
     --'''''''--
    -'''''''''''-
   -''''-----''''-
  -'''.........'''-
 -'''.x.x...x.x.'''-
 -'''..xxx.xxx..'''-
-'''-.xxx.3.xxx.-'''-
-'''-..x.....x..-'''-
-'''-...3.O.3...-'''-
-'''-..x.....x..-'''-
-'''-.xxx.3.xxx.-'''-
 -'''. xxx.xxx..'''-
 -'''.x x...x.x.'''-
  -'''.........'''-
   -''''-----''''-
    -'''''''''''-
     --'''''''--
       ---@---
ENDMAP

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

default-depth: Lair

###############################################################################
# <<2>> Decorative Lair vaults.
# These should all be tagged with `lairdec`.
# * luniq_lairdec_liquid: notable amounts of water.
# * luniq_lairdec_plantage: notably large number of path-blocking firewood
#                           (not trees, but plants and fungi).
# * luniq_lairdec_stairs: has decent odds to use up the floor stairs.
###############################################################################

# Directly place a decorative vault 25% of the time on the last few floors.
NAME:    lair_decor
TAGS:    no_dump extra allow_dup nolayout_encompass luniq
DEPTH:   Lair:4-5
CHANCE:  25%
{{
  local c = 1
  hook("post_place", function()
    dgn.place_maps{tag="lairdec", count=c}
  end)
}}


# "Pointless plantage" by Lemuel.
# Three separate decorative bubbles mixed into one vault.
NAME:   lemuel_fruit_fields
TAGS:   allow_dup extra transparent lairdec luniq_lairdec_fruit
ORIENT: float
MONS:   plant, butterfly
ITEM:   gold
KFEAT:  e = cache_of_fruit
KFEAT:  ^~ = .
: local size = crawl.random2(9)
: if size > 7 then
SUBST:  '`"- = ^:35 ~:15 .
NSUBST: . = 2:1 / * = d:2 .:140 1:20 2:4
: elseif size > 3 then
SUBST:  "` = ^:35 ~:15 .
NSUBST: . = 2:1 / * = d:3 .:42 1:18 2:4
: else
SUBST:  '" = ^:35 ~:15 .
NSUBST: . = 2:1 / * = d:3 .:42 1:18 2:4
: end
CLEAR:  `'"-
COLOUR: ^d = green
FTILE:  ^.de12 = floor_grass_dark
COLOUR: ~ = brown
FTILE:  ~ = floor_pebble_red
MAP
       -------
     -----------
   -``------------
 -``````-----------
 ```````"'''-------
-`````e""'''''-``----
--```"""'''''""````--
----`"''''''"""`````-
-----'''''''""e`````-
-----'""'''''""````--
----``""e"''''-``----
 --`````"""'--------
 --````````---------
   -``````--------
     -``--------
       -------
ENDMAP

# Separate small decor vaults mixed into one:
NAME:    lemuel_fruit_tree
TAGS:    extra transparent lairdec luniq_lairdec_fruit
DEPTH:   Lair, Snake
MONS:    plant, fungus
ITEM:    stone q:1 no_pickup
KFEAT:   a = cache_of_fruit
SHUFFLE: ABCD
NSUBST:  A = 1:a / 1:aa' / *:.
: if crawl.one_chance_in(5) then
SUBST:  BCD~ = 11d, `'-. = .:90 2:1
: elseif crawl.one_chance_in(4) then
CLEAR:  `
SUBST:  BCD = 1.., . = .:190 1:20 2:1, - = ., ~ = d
: else
CLEAR:  `-
SUBST:  ~ = d:90 1:5 2:1, . = .:90 1:10 2:1, BCD = .
: end
MAP
   ````````
  `--------`
 `---..~..--`
`---......---`
`--~..ABC..~--`
`---..DtD..---`
`---..CBA..---`
 `--~.....~--`
  `--.....--`
   `````````
ENDMAP

####

# A trio of precisely-mirrored pools.
NAME:    nicolae_quartered_pool_little
TAGS:    transparent extra lairdec uniq_qpool luniq_lairdec_liquid
SHUFFLE: Aa, Bb, Cc, Dd, Ee, Ff, Gg, Hh, Ii, Jj, Kk, Ll, Mm, Nn, Oo, Pp, Qq
SUBST:   abcdefghijklmnopq = ., ABCDEFGHIJKLMNOPQ = W
NSUBST:  7 = 1:@ / * = t@@@
MAP
    777777
   7qolLOQ7
  7pnkiIKNP7
 7pmjhfFHJMP7
7qnjgedDEGJNQ7
7okhecbBCEHKO7
7lifdbaABDFIL7
7LIFDBAabdfil7
7OKHECBbcehko7
7QNJGEDdegjnq7
 7PMJHFfhjmp7
  7PNKIiknp7
   7QOLloq7
    777777
ENDMAP

NAME:    nicolae_quartered_pool_medium
TAGS:    transparent extra lairdec uniq_qpool luniq_lairdec_liquid
SHUFFLE: Aa, Bb, Cc, Dd, Ee, Ff, Gg, Hh, Ii, Jj, Kk, Ll, Mm
SHUFFLE: Nn, Oo, Pp, Qq, Rr, Ss, Tt, Uu
SUBST:   abcdefghijklmnopqrstu = ., ABCDEFGHIJKLMNOPQRSTU = W
NSUBST:  7 = 1:@ / * = t@@
MAP
      7777
    77spPS77
   7urolLORU7
  7tqnkiIKNQT7
 7uqmjhfFHJMQU7
 7rnjgedDEGJNR7
7sokhecbBCEHKOS7
7plifdbaABDFILP7
7PLIFDBAabdfilp7
7SOKHECBbcehkos7
 7RNJGEDdegjnr7
 7UQMJHFfhjmqu7
  7TQNKIiknqt7
   7UROLloru7
    77SPps77
      7777
ENDMAP

NAME:    nicolae_quartered_pool_super
TAGS:    transparent extra lairdec uniq_qpool luniq_lairdec_liquid
SHUFFLE: Aa, Bb, Cc, Dd, Ee, Ff, Gg, Hh, Ii, Jj, Kk, Ll, Mm
SHUFFLE: Nn, Oo, Pp, Qq, Rr, Ss, Tt, Uu, Vv, Ww, Xx, Yy, Zz
SHUFFLE: 12, 34, 56
SUBST:   abcdefghijklmnopqrstuvwxyz135 = ., ABCDEFGHIJKLMNOPQRSTUVWXYZ246 = W
NSUBST:  7 = 1:@ / * = t@
MAP
      777777
    771xtTX277
   75zwspPSWZ67
  73yvrolLORVY47
 75yuqnkiIKNQUY67
 7zvqmjhfFHJMQVZ7
71wrnjgedDEGJNRW27
7xsokhecbBCEHKOSX7
7tplifdbaABDFILPT7
7TPLIFDBAabdfilpt7
7XSOKHECBbcehkosx7
72WRNJGEDdegjnrw17
 7ZVQMJHFfhjmqvz7
 76YUQNKIiknquy57
  74YVROLlorvy37
   76ZWSPpswz57
    772XTtx177
      777777
ENDMAP

NAME:    nicolae_quartered_pool_impasse
TAGS:    transparent extra lairdec no_pool_fixup uniq_qpool luniq_lairdec_liquid
SHUFFLE: DN, EO, FP, HQ, JR, KS, LZ, M-
SUBST:   DEFHJKLM = w, NOPQRSZ- = l
MAP
  ......
 ..LHQZ..
..MKFPS-..
.LKJEORSZ.
.HFEDNOPQ.
.QPONDEFH.
.ZSROEJKL.
..-SPFKM..
 ..ZQHL..
  ......
ENDMAP

NAME:    nicolae_lair_grove_arrangements
TAGS:    transparent lairdec extra
SHUFFLE: abcdefghi/''''T''''/T'''''''T/T'''T'''T/T'T'''T'T/T'T'T'T'T/\
         TTT'''TTT/'T'T'T'T'/T'T''''T'/'T'TTT'T'/'T'''''T'/TTTT'TTTT/\
         T'TTTTT'T/TT'TTT'TT/'''TTT'''/T'TT'TTTT/TT'T'T'TT/TT'''''TT/\
         TT''T''TT/TT''TT'T'/T''''T'T'
SUBST:   abcdefghiT = ttttt., ' = ., _ = ._
CLEAR:   _
MAP
__________________
_................_
_..aa...bb...cc.._
_.aaaa.bbbb.cccc._
_.aaaa.bbbb.cccc._
_..aa...bb...cc.._
_................_
_..dd...ee...ff.._
_.dddd.eeee.ffff._
_.dddd.eeee.ffff._
_..dd...ee...ff.._
_................_
_..gg...hh...ii.._
_.gggg.hhhh.iiii._
_.gggg.hhhh.iiii._
_..gg...hh...ii.._
_................_
__________________
ENDMAP

####

NAME:    bh_autumn_forest_stairs
TAGS:    extra luniq_staircase lairdec luniq_lairdec_stairs
WEIGHT:  5
COLOUR:  t = lightred / red w:3
SHUFFLE: Aaq / Bbr / Ccs
SUBST:   q = @
SUBST:   A = ., bBcCdDrs = t
COLOUR:  t = lightred / red w:3 / green w:3 / lightgreen w:1
TILE:    t = dngn_tree_lightred / dngn_tree_red w:4 / dngn_tree_yellow w:4
COLOUR:  a = lightred / red / green / lightgreen
TILE:    a = dngn_tree_lightred / dngn_tree_red / dngn_tree_yellow / dngn_tree
SUBST:   a = t
MAP
  aaaa qqq aaaa
 caaaaaAAAaaaaab
cccaaaaAAAaaaabbb
ccc...........bbb
ccc...........bbb
 cc..xxxxxxx..bb
sCC..x.....x..BBr
sCC..x..{..x..BBr
sCC..x.....x..BBr
 cc..xV...Vx..bb
ccc..xx+++xx..bbb
ccc...........bbb
ccc...........bbb
ccctttttttttttbbb
 cctttttttttttbb
  ctttt    tttb
ENDMAP

NAME:   grunt_forest_stairs_basic
TAGS:   transparent extra luniq_staircase lairdec
MONS:   plant
SUBST:  1 = 1.
: if you.depth() == dgn.br_depth(you.branch()) then
SUBST:  ) = (
: end
MAP
.........
..t...t..
.t11.11t.
..1t.t1..
....)....
..1t.t1..
.t11.11t.
..t...t..
.........
ENDMAP

NAME:    grunt_forest_small_clearings
TAGS:    transparent extra lairdec
MONS:    plant / bush
KPROP:   G = no_tele_into
SHUFFLE: Ww. / ''` / ''`
SUBST:   t = t.., '` = 1:49 .:405
SUBST:   G = w-, W = WW., w = wwW
KMASK:   w- = no_monster_gen
KMASK:   w- = opaque
MAP
 tt@@@tt
t.......t
t..WWW..t
@.WwwwW.@
@.WwGwW.@
@.WwwwW.@
t..WWW..t
t.......t
 tt@@@tt
ENDMAP

# Not very randomized, but the unusual shape, wall-plant use,
# and location should be variable enough. Intentionally lacks
# the transparent tag, to minimize niches in walls behind plants.
NAME:    hangedman_lair_unloving_vines
TAGS:    extra lairdec luniq_lairdec_plantage
KMONS:   P = plant
KMASK:   ` = no_monster_gen
SHUFFLE: xP'. / xP'. / .'xP
SUBST:   '` = ., p : p.
: decorative_floor(_G, 'p', "flower patch")
MAP
           xPx
         xxPxPxx    ````..@
        xPP'.'PPx   ....'''
      xxP''.'.''Px...'''PPP
   xxxPP'```p``'Px.''PPPxxx
xxxPPP''.xP'``p```'PPxxx
PPP'''...xP''.'.''Pxx
'''....   xPP'.'PPx
@..````    xxPxPxx
             xPx
ENDMAP

NAME:    cheibrodos_lair_caveside_slide
TAGS:    extra lairdec
DEPTH:   Lair, !Lair:$
MONS:    fungus w:3 / nothing, plant w:3 / nothing
SUBST:   1 : 12, " = x.
FTILE:   .12( = floor_sprouting_stone
MAP
    ...xx
  ....xxx
 xx..1Wxxx
 xxx.1Wxxx
 xxx".WWxxx
  xxx.1Wxxx
  xxx.1WWxxx
  xxx".1WWxx
 xxxx"".1Wxx
xxxx""".1Wxxx
xxx"""..1WWxx
xxW1....1WWxx
xxWW(111WWxxx
xxWWWWWWWxxx
xxxWWWWWxxx
 xxxxxxxxx
  xxxxxx
ENDMAP

# Someone hasn't taken care of their garden, but occasionally it takes care of itself.
NAME:    pdpol_lair_neglected_garden
TAGS:    extra lairdec transparent no_trap_gen luniq_lairdec_plantage
SHUFFLE: ac"` / pbbp
SUBST:   ab = D, cp = P
: if crawl.one_chance_in(5) then
MONS:    plant, bush
SUBST:   V = T, D = 2, P = 1
FTILE:   ' = floor_dirt, 12`" = floor_grass_dark
: else
MONS:    withered plant / plant w:1, fungus
SUBST:   P = 1, D = 122
FTILE:   '`"12V = floor_sprouting_stone
: end
SUBST:   '`" = .
MAP
.....@.....
..`P"'"P`..
.`Pac'caP`.
.``c'''c``.
.`"''D''"`.
@`"'DVD'"`@
.`"''D''"`.
.``c'''c``.
.`Pac'caP`.
..`P"'"P`..
.....@.....
ENDMAP

NAME:   nicolae_lair_blooderflies
TAGS:   transparent extra lairdec
KMONS:  p = plant
KMONS:  1 = butterfly
KITEM:  S = human skeleton
NSUBST: ` = 2=S / 2=SS.` / 2=1 / 2=11.` / 4=.` / ., - = 4=t / 4=t. / ..p
KPROP:  S1` = bloody
MAP
..........
.--------.
.-pppppp-.
.-p````p-.
.-p````p-.
.-p````p-.
..p````p-.
.-pppppp-.
.--------.
..........
ENDMAP

NAME:    nicolae_lair_cache_of_fresh_prey
TAGS:    transparent extra lairdec
SHUFFLE: PQ/pq
NSUBST:  Q' = 1=@ / x, S = S / S- / .-
SUBST:   P = ., pq = x, ` = x_
KPROP:   S- = bloody
 : dgn.delayed_decay(_G, "S", "yak corpse / dream sheep corpse / human corpse")
MAP
   `x`
  `xxxqq
`xxx-xpq
xxSSx.x'
xxSSxxPQ
`xxxxQQQ
 `xx`
ENDMAP

NAME:   nicolae_lair_carnivore_tree_lair
TAGS:   transparent extra lairdec
KITEM:  S = yak skeleton / dream sheep skeleton / human skeleton w:5
SUBST:  s = t., z = t_
NSUBST: S = 2=S / S` / `
KPROP:  ` = bloody
CLEAR:  _
MAP
 .........
......s....
..ssst.tt..
.sttttt.ts.
sttSStt.ts.
zttSSt`ttz
 ztttSttz
  zttttz
   zzzz
ENDMAP

NAME:    nicolae_lair_clover_grove
TAGS:    transparent extra lairdec
KMONS:   p = plant
KMONS:   P = bush
SHUFFLE: DEFHJK, LMNO
SUBST:   DEL = ., F = t, H : tP, M : tP, J : tP.., K : tP.., N : tP.., O : tP..
SUBST:   . = .:70 p
MAP
L.M.N.M.L
.DEH.HED.
MEFJ.JFEM
.HJK.KJH.
N...O...N
.HJK.KJH.
MEFJ.JFEM
.DEH.HED.
L.M.N.M.L
ENDMAP

NAME:  nicolae_lair_clump_of_vegetation
TAGS:  transparent extra lairdec
KMONS: p = plant
SUBST: a = tttpp., p = ppp..
MAP
 ...pap...
...apapa...
..papapap..
.aapatapaa.
pppaptpappp
aaatttttaaa
pppaptpappp
.aapatapaa.
..papapap..
...apapa...
 ...pap...
ENDMAP

NAME:  nicolae_lair_cropped_circle
TAGS:  transparent extra lairdec luniq_lairdec_plantage
KMONS: p = plant w:49 / withered plant w:1
: if you.depth() == 1 then
SUBST: S = }])
: elseif you.depth() ~= dgn.br_depth(you.branch()) then
SUBST: S = {}[]()
: end
SUBST: S = {[(, ` = p_
CLEAR: _
MAP
       `````
    ```ppppp```
   `ppp.....ppp`
  `ppp.ppppp.ppp`
 `ppp.pp...pp.ppp`
 `pp.p..ppp..p.pp`
 `p.p.pp...pp.p.p@
`p.pp.p.ppp.p.pp.p
`p.p.p.p...p.p.p.p
`p.p.p.p.S.p.p.p.p
`p.p.p.p...p.p.p.p
`p.pp.p.ppp.p.pp.p
 `p.p.pp...pp.p.p`
 `pp.p..ppp..p.pp`
 `ppp.pp...pp.ppp`
  `ppp.ppppp.ppp`
   `ppp.....ppp`
    ```ppppp```
       `````
ENDMAP

NAME:    nicolae_lair_crumbling_lobby
TAGS:    extra lairdec transparent
DEPTH:   Lair:2-, !Lair:$
ORIENT:  float
KMONS:   ! = pile of debris
SHUFFLE: []/<>, {}/[]/(), PQ/pq, PQ
NSUBST:  a = 2=@ / x
SUBST:   pq = ., P = V:50 !, Q = G:50 !, x = x:80 ttt., " = xxxt
FTILE:   .@{[(<}])t = floor_sprouting_stone
FTILE:   !VG = floor_sprouting_squares
MAP
      xxxxx
      x...x
      x.[.x
   xaax...xaax
   a.........a
   a.P..p..Q.a
xxxx.........xxxx
x......xxx......x
x.]..q.x"x.q..}.x
x......xxx......x
xxxx.........xxxx
   a.Q..p..P.a
   a.........a
   xaax...xaax
      x.{.x
      x...x
      xxxxx
ENDMAP

NAME:   nicolae_lair_deadzone
TAGS:   transparent extra lairdec luniq_lairdec_plantage
KMONS:  p = withered plant
KITEM:  S = any skeleton / human skeleton w:1 / elf skeleton w:1
SUBST:  t = ttt.., . = .:60 p
NSUBST: . = 4=S / 4=S. / .
COLOUR: t = brown
TILE:   t = dngn_tree_dead
: set_feature_name("tree", "dead tree")
FTILE:  .Spt = floor_sprouting_stone
MAP
   .......
  ..ttttt..
 ..t.ttt.t..
..t.t...t.t..
.t.t.ttt.t.t.
.tt.t.t.t.tt.
.tt.ttttt.tt.
.tt.t.t.t.tt.
.t.t.ttt.t.t.
..t.t...t.t..
 ..t.ttt.t..
  ..ttttt..
   .......
ENDMAP

NAME:   nicolae_lair_decay_into_growth
TAGS:   transparent extra lairdec
KMONS:  F = fungus
SUBST:  ` = ..F
NSUBST: t = 4=t / 2=F / ttF
COLOUR: t = lightgrey w:5 / brown
TILE:   t = dngn_tree_dead
: set_feature_name("tree", "dead tree")
MAP
 .......
..``````.
.``tttt`.
.`tttt``.
.``````..
........
ENDMAP

NAME:   nicolae_lair_decrepit_plaza
TAGS:   transparent extra lairdec
KMONS:  P = plant
KFEAT:  D = closed_door
SUBST:  ` = x., s = tt., S = ttx, - = +., p = m., Z = tt_, z : tt!, . = P .:90
NSUBST: ! = | / !, % = 4=% / 4=%P / .P
CLEAR:  _
KPROP:  |!D = no_tele_into
KMASK:  |!D = opaque
MAP
              ZZZZZ
  @....sZtt  ZtttttZ
 t.xx``xtt.`xxx```tt
 t.xt%.ttS..stts%`ttt
 t...ts.%m.mttts.`.Z
 Z.x%st.tx.xzztts..Z
   St..m-x.xDmztt`.
   `%.t+...ttD!!tS.
  tx`px`....txxmxS.
  Zt.....tV........
 ZtxSp``.t..sxxpSx.@
Zttx.%.-..s..+s.%x.Z
Ztt`s..p-`.x+m..tx.tZ
Ztt`.%...`tx.s%t.xttZ
Ztt`.%.%.ptpttt%sStZ
 Ztxt.sttSt..%..sSt
  Zxxxxx``..``xxSSt
  ZtttZ ......stttZ
   ZZZ   ZZZ .@ZZZ
ENDMAP

NAME:   nicolae_lair_defunct_apartments
TAGS:   transparent extra lairdec
KMONS:  p = plant
KITEM:  ` = human skeleton
: local glifz = "DEFHJKLMNOPQ"
: for i = 1, string.len(glifz), 1 do
:    nsubst(string.sub(glifz, i, i) .. " = + / x")
: end
NSUBST: R = 2=+ / +x / x, . = 3=` / 2=`. / .
SUBST:  G = GVt, a = .:70 t, s= t...., x = x:80 ., + = +:60 .
SUBST:  - = -:90 p, . = .:90 p
FTILE:  -pt = floor_sprouting_stone
FTILE:  .`+GV = floor_sprouting_squares
MAP
-------------------
-xxDxxxExxxFxxxHxx-
-xa.axa.axa.axa.ax-
-D...E...x...F...H-
-xa.axa.axa.axa.ax-
-xxJxxxRxxxRxxxKxx-
-xa.ax..s.s..xa.ax-
-J...R.t.t.t.R...K-
-xa.axs.s.s.sxa.ax-
-xxxxx.t.G.t.xxxxx-
-xa.axs.s.s.sxa.ax-
-L...R.t.t.t.R...M-
-xa.ax..s.s..xa.ax-
-xxLxxxRxxxRxxxMxx-
-xa.axa.axa.axa.ax-
-N...O...x...P...Q-
-xa.axa.axa.axa.ax-
-xxNxxxOxxxPxxxQxx-
-------------------
ENDMAP

NAME:    nicolae_lair_demoated_fort
TAGS:    transparent extra lairdec no_pool_fixup luniq_lairdec_liquid
KMONS:   1 = plant
SHUFFLE: Pp/Qq
NSUBST:  PR = 1=W
SUBST:   p = ., PQ = w, q = x, w = wwwwwW, x = xx., c = ccccc., W = WWWWW.
SUBST:   G = GGVV., . = .:100 1
MAP
.............
.............
..wPPRQQwww..
..wcpcqcxcw..
..wx.....xw..
..wc.....cw..
..wx..G..xw..
..wc.....cw..
..wx.....xw..
..wcxcxcxcw..
..wwwwwwwww..
.............
.............
ENDMAP

NAME:   nicolae_lair_die-orama
TAGS:   transparent extra lairdec
KMONS:  M = hydra / death yak / polar bear / dire elephant / alligator
KITEM:  S = human skeleton
KPROP:  ` = no_tele_into
SUBST:  q = t``
NSUBST: D = + / n, ` = M / 2=S / S` / 3=' / 3='` / `
SUBST:  - = x:50 t, n = m:50 t, s = t.., z = t__
KPROP:  MS' = bloody
KMASK:  +MS'` = no_monster_gen
KMASK:  +MS'` = no_trap_gen
KMASK:  +MS'` = no_item_gen
KMASK:  +MS'` = opaque
CLEAR:  _
MAP
  zzzzzzzzz
..sttttttttz
.stttttttttz
.sx-D-D--ttz
.sxq```q-ttz
..m`````Dttz
.sxq```q-ttz
.sxxmxmxxts
..ss.s.sss.
@..........
ENDMAP

NAME:   nicolae_lair_flooded_remnant
TAGS:   transparent extra lairdec luniq_lairdec_liquid
KMONS:  P = plant
KITEM:  S = human skeleton
NSUBST: D = m / x, E = m / x, F = m / -, H = ' / m / -
SUBST:  M = wP, - = xx', ` = ''P
FTILE:  'SPm = floor_sprouting_squares
MAP
  .........
xxDDDDDD--.
xSPMwwM``-.
EPMwwwwM`H.
E`MwwwwM`H.
E``MwwM``H.
E```MM```H.
x````````x.
xxFFFFFFxx
ENDMAP

NAME:  nicolae_lair_flower_corridor
TAGS:  transparent extra lairdec
SUBST: s = tF
: decorative_floor(_G, "F", "flower patch")
MAP
tttttttttt
tsssssssst
@........@
.tsssssst.
.tsssssst.
@........@
tsssssssst
tttttttttt
ENDMAP

NAME:   nicolae_lair_former_tree_maze
TAGS:   transparent extra lairdec
KMONS:  P = plant
NSUBST: - = 2=. / 6=s / t
SUBST:  s = tt., . = .:120 P:20 F
: decorative_floor(_G, "F", "flower patch")
MAP
s.t.s...s.t.s
..s.t---t.s..
tst.-...-.tst
....-.t.-....
st--t.s.t--ts
.-....s....-.
.-.tsstsst.-.
.-....s....-.
st--t.s.t--ts
....-.t.-....
tst.-...-.tst
..s.t---t.s..
s.t.s...s.t.s
ENDMAP

NAME:   nicolae_lair_fungal_den
TAGS:   transparent extra lairdec
KMONS:  F = fungus
ITEM:   spore talisman
KITEM:  S = yak skeleton / dream sheep skeleton / human skeleton w:5
NSUBST: S = 2=S / SE / E
SUBST:  ` = x_, E = F.., d = d...
CLEAR:  _
MAP
  ````````
`xxxxxxxxxx`
xx...xEEFFxx`
x..x..E.SSFxx`
xx.xx.FEdSFxx`
`x..xxE.SSFxx`
 .@.xxxEFFxx`
    `xxxxxx`
      ````
ENDMAP

NAME:  nicolae_lair_garden_over_the_wall_1
TAGS:  transparent extra lairdec luniq_lairdec_plantage
KMONS: P = plant
SUBST: x = x:70 t:20 ., . = ...P
MAP
.xx.
.xx.
.xx.
.xx.     .xx.
.xx.......xx...
.xxxxxxxxxxxxxx
.xxxxxxxxxxxxxx
......xx.......
     .xx.
ENDMAP

NAME:  nicolae_lair_garden_over_the_wall_2
TAGS:  transparent extra lairdec luniq_lairdec_plantage
KMONS: P = plant
SUBST: x = x:70 t:20 ., . = ...P
MAP
    .xx.
.....xx...
.xxxxxxxx.
.xxxxxxxx.  .....
.xx....xx.  .xxxx
.xx.  .xx.  .xxxx
.xx.  .xx.  .xx..
.xx.  .xx....xx.
      .xxxxxxxx.
      .xxxxxxxx.
      .......xx.
            .xx.
ENDMAP

NAME:  nicolae_lair_garden_over_the_wall_3
TAGS:  transparent extra lairdec luniq_lairdec_plantage
KMONS: P = plant
SUBST: x = x:70 t:20 ., . = ...P
MAP
......  .......
xxxxx.  .xxxxxx
xxxxx.  .xxxxxx
...xx....xx....
  .xxxxxxxx.
  .xxxxxxxx.
...xx....xx..
.xxxx.  .xxxx
.xxxx.  .xxxx
.xx...  .....
.xx.
ENDMAP

NAME:  nicolae_lair_garden_over_the_wall_4
TAGS:  transparent extra lairdec luniq_lairdec_plantage
KMONS: P = plant
SUBST: x = x:70 t:20 ., . = ...P
MAP
   ..........  .......
   .xxxxxxxx.  .xxxxxx
   .xxxxxxxx.  .xxxxxx
   .xx....xx.  .xx....
....xx.  .xx....xx.
xxxxxx.  .xxxxxxxx.
xxxxxx.  .xxxxxxxx.
.......  ..........
ENDMAP

NAME:    nicolae_lair_garden_over_the_wall_5
TAGS:    transparent extra lairdec luniq_lairdec_plantage
KMONS:   P = plant
SHUFFLE: Qq/Rr
SUBST:   R = x, r = ., Qq = _, x = x:70 t:20 ., . = ...P
CLEAR:   _
MAP
  .........rrr
  .xxxxxxxxRRR
  .xxxxxxxxRRR
  ....xx...rrr
......xx...qqq
xxxxxxxxxxxQQQ
xxxxxxxxxxxQQQ
...........qqq
ENDMAP

NAME:  nicolae_lair_grabbed_some_dinner
TAGS:  transparent extra lairdec
DEPTH: Lair, !Lair:$
KMONS: Pp = plant
KFEAT: ^ = shaft
SUBST: s = tt., - = p., ! = P`, ' = .`
KPROP: `P^ = bloody
MAP
@.....  sttt
.'`'......stt
.```.....-pptt
.'``...``!PP^t
....```..-pptt
 ........sttt
       sttt
ENDMAP

NAME:  nicolae_lair_lichen
TAGS:  transparent extra lairdec luniq_lairdec_plantage
KMONS: F = fungus
KMONS: P = plant
SUBST: ` = FFF..P, - = PPP..F, ' = _..
CLEAR: _
MAP
''''''''
'`-`-`-'
'-FPFP`'
'`PttF-'
'-FttP`'
'`PFPF-'
'-`-`-`'
''''''''
ENDMAP

NAME:  nicolae_lair_little_watering_hole
TAGS:  transparent extra lairdec luniq_lairdec_plantage
KMONS: p = plant
KMONS: P = bush
SUBST: D = tP, ` = ..p, - = ..P
MAP
   -....@
  DPPPPP.
 ttttwwP.
ttD``wwP.
D````ttP-.
.@```tDD
....Dt
ENDMAP

NAME:   nicolae_lair_lossy_orchard
TAGS:   transparent extra lairdec
KFEAT:  F = cache_of_fruit
SUBST:  s = t., S = t_, x = x:40 ., ' = _.
NSUBST: f = 3=F / F..., ` = 2=F / .
CLEAR:  _
MAP
     SSS.sttts.......'
  Stttts...s...........'
 Sttttst.tst.t.t.t.s...........'
Stttts.fs.f..sf.......xxxxxxxx..'
Sttttts.tststst.t.t.s.m`.....x..'
Stttttts.s.f.s...f....x`.....+..'
Stttttstst.t.t.t.t.s..m`.....x..'
Stttttf..f.s..........xxxxxxxx..'
Sttttstst.tstst.t.t.s..........'
  Sttttts.s.f..........'
      SSSS.t.s.......'
ENDMAP

NAME:   nicolae_lair_messy_den
TAGS:   transparent extra lairdec
DEPTH:  Lair, !Lair:$
KMONS:  p = bush / plant w:5 / nothing w:1
KMONS:  P = bush
KITEM:  S = yak skeleton / dream sheep skeleton / human skeleton w:5
KFEAT:  ^ = shaft
NSUBST: ` = 2=P / `P / S / 2=`S / `
SUBST:  ` = `..
KPROP:  PS` = bloody
MAP
 ppp
p```p
p`^`p
p```p
 ppp
ENDMAP

NAME:   nicolae_lair_more_dang_stairs
TAGS:   extra lairdec transparent luniq_lairdec_stairs
DEPTH:  Lair:2-
ORIENT: float
: if you.depth() ~= dgn.br_depth(you.branch()) then
SUBST: { = {}[]()
: else
SUBST: { = {[(
: end
NSUBST: - = . / t, D = 2=@ / x
SUBST:  a = sy, s = t., y = x., ` = x_
CLEAR:  _
MAP
  ``xxDDDxx``
 `xxxy...yxxx`
`xxy.a.a.a.yxx`
`xy.a.s.s.a.yx`
xx.a.st-ts.a.xx
xya.sts.sts.ayx
D..sts...sts..D
D.a.-..{..-.a.D
D..sts...sts..D
xya.sts.sts.ayx
xx.a.st-ts.a.xx
`xy.a.s.s.a.yx`
`xxy.a.a.a.yxx`
 `xxxy...yxxx`
  ``xxDDDxx``
ENDMAP

NAME:  nicolae_lair_overgrowve
TAGS:  transparent extra lairdec luniq_lairdec_plantage
KMONS: p = plant
KMONS: P = bush
KMONS: F = fungus / toadstool w:2
SUBST: ` = .__, s = t__, t = tt., . = p:5 .:7, p : p:100 F, t = t:80 P
CLEAR: _
MAP
s``ss``ss`
`tt..tt..s
`tt..tt..s
s..tt..tt`
s..tt..tt`
`tt..tt..s
`tt..tt..s
s..tt..tt`
s..tt..tt`
`ss``ss``s
ENDMAP

NAME:    nicolae_lair_percent_stairs
TAGS:    transparent extra lairdec luniq_lairdec_stairs
DEPTH:   Lair:2-
ORIENT:  float
SHUFFLE: {[(
NSUBST:  D = . / s / t, E = . / s / t, F = . / s / t, H = . / s / t
NSUBST:  J = . / t / s
SUBST:   s = tt.
MAP
  xxxxx     tts..@
 xxsssxx   tts.s..
xxs.t.sxx ttsHs.s.
xs.....sxtts.sHs.s
xst.{.tsxts.s.sHst
xs.....sxsEs.s.stt
xxs.t.s.s.sEs.stt
 xxsss.s.sJsEstt
  xxxxs.sJs.stt
   tts.sJs.sxxxx
  ttsDsJs.s.sssxx
 tts.sDs.s.s.t.sxx
tts.s.sDsxs.....sx
tsFs.s.stxst.[.tsx
s.sFs.sttxs.....sx
.s.sFstt xxs.t.sxx
..s.stt   xxsssxx
@..stt     xxxxx
ENDMAP

NAME:   nicolae_lair_planthole_bean
TAGS:   transparent extra lairdec luniq_lairdec_plantage
KMONS:  p = plant
NSUBST: ' = 4=. / 4=x / 4=x., - = 2=t / tp / p
MAP
    ......
    .'xx'..
   ..xppx'.
  ..'xp-px.
...'xp--px.
.'xxp--px'.
.xpp---px..
.xp--ppx'.
.'xppxx'..
..'xx'...
 ......
ENDMAP

NAME:   nicolae_lair_planthole_diamond
TAGS:   transparent extra lairdec luniq_lairdec_plantage
KMONS:  p = plant
NSUBST: ' = 5=. / 5=x / 6=x., - = 2=t / tp / p
MAP
   .....
  ..'x'..
 ..'xpx'..
..'xp-px'..
.'xp---px'.
.xp-----px.
.'xp---px'.
..'xp-px'..
 ..'xpx'..
  ..'x'..
   .....
ENDMAP

NAME:   nicolae_lair_planthole_kiki
TAGS:   transparent extra lairdec luniq_lairdec_plantage
KMONS:  p = plant
NSUBST: ' = 4=. / 4=x / 4=x., - = 2=t / tp / p
MAP
..........
.'xx''xx'...
.xppxxppxx'.
.xp-pp--ppx..
.'xp-----px'.
..xpp--pp-px.
 .'xxppxxppx.
 ...'xx''xx'.
   ..........
ENDMAP

NAME:   nicolae_lair_planthole_pinch
TAGS:   transparent extra lairdec luniq_lairdec_plantage
KMONS:  p = plant
NSUBST: ' = 6=. / 6=x / 6=x., -! = 1=pt, - = t / p, ! = t / p
MAP
 .......
..'xxx'........
.'xpppx'..'xx'..
.xp---px''xppx'.
.xp---ppxxp!!px.
.xp--pxxpp!!!px.
.'xppx''xp!!!px.
..'xx'..'xpppx'.
 ........'xxx'..
        .......
ENDMAP

NAME:   nicolae_lair_planthole_trapezoid
TAGS:   transparent extra lairdec luniq_lairdec_plantage
KMONS:  p = plant
NSUBST: ' = 3=. / 3=x / 4=x., - = t / tp / p
MAP
      ......
    ...'xx'.
  ...'xxppx.
...'xxpp-px.
.'xxpp--px'.
.xpp----px..
.xppp--px'.
.'xxxpppx..
....'xxx'.
   .......
ENDMAP

NAME:   nicolae_lair_planthole_worm
TAGS:   transparent extra lairdec luniq_lairdec_plantage
KMONS:  p = plant
NSUBST: ' = 4=. / 4=x / 2=x., - = 2=t / tp / p
MAP
         .......
      ....'xxx'.
   ....'xxxpppx.
....'xxxppp--px.
.'xxxppp---pppx.
.xppp---pppxxx'.
.xp--pppxxx'....
.xpppxxx'....
.'xxx'....
.......
ENDMAP

NAME:   nicolae_lair_pondular_hallway
TAGS:   transparent extra lairdec luniq_lairdec_liquid
SUBST:  ~ = -.
NSUBST: - = 8=t / 4=tw / w, p = ` / ., q = ` / .
SUBST:  ` = ...xx, ' = x_
CLEAR:  _
MAP
        'xxxxxxxxxxxx'
     'xxxx``````````xxxx'
  'xxxxxxx`........`xxxxxxx'
xxxxxxxxx``.~----~.``xxxxxxxxx
```ppp```..~------~..```qqq```
@..```...`~~-wwww-~~`...```..@
```ppp```..~------~..```qqq```
xxxxxxxxx``.~----~.``xxxxxxxxx
  'xxxxxxx`........`xxxxxxx'
     'xxxx``````````xxxx'
        'xxxxxxxxxxxx'
ENDMAP

NAME:   nicolae_lair_rhizomatic_trees
TAGS:   transparent extra lairdec
KMONS:  p = plant
NSUBST: p = . / `t / t, q = . / `t / t, r = . / `t / t, s = . / `t / t
NSUBST: D = . / `t / t, E = . / `t / t, F = . / `t / t, H = . / `t / t
NSUBST: J = . / `t / t, K = . / `t / t, L = . / `t / t, M = . / `t / t
NSUBST: N = . / `t / t
SUBST:  ` = t.
MAP
 .............
..`.`.`.`.`.`..
.`tKt.tpt.tLt`.
..K.K.p.p.L.L..
.`tKtDt.tEtLt`.
....D.D.E.E....
.`tstDtFtEtqt`.
..s...F.F...q..
.`tstHtFtJtqt`.
....H.H.J.J....
.`tMtHt.tJtNt`.
..M.M.r.r.N.N..
.`tMt.trt.tNt`.
..`.`.`.`.`.`..
 .............
ENDMAP

NAME:  nicolae_lair_simplegrove
TAGS:  extra lairdec transparent luniq_lairdec_plantage
KMONS: p = plant
SUBST: t = tt., . = .:70 p
MAP
 ..tt..
 .tttt....
 .tttt.tt.
...tt.tttt
.tt...tttt
tttt...tt.
tttt.tt...
.tt.tttt.
....tttt.
   ..tt..
ENDMAP

NAME:   nicolae_lair_sylvan_descent
TAGS:   transparent extra lairdec luniq_lairdec_stairs
DEPTH:  Lair, !Lair:$
ORIENT: float
NSUBST: p = . / t / .ttt, q = . / t / .ttt, r = . / t / .ttt
SUBST:  - = ttx, t = t:110 ., ' = _xx, } = }])
CLEAR:  _
MAP
''''
xxxx'''
-r-xxxx'''
.t.-q-xxxx'''
trt.t.-p-xxxx'
.t.tqt.t.t.tx'
trt.t.tpt.}.x'
.t.tqt.t.t.tx'
trt.t.-p-xxxx'
.t.-q-xxxx'''
-r-xxxx'''
xxxx'''
''''
ENDMAP

NAME:   nicolae_lair_to_the_finish
TAGS:   transparent extra lairdec
KMONS:  P = plant
KITEM:  H = human skeleton
KITEM:  M = black bear skeleton / elephant skeleton / anaconda skeleton
KITEM:  d = damaged mundane short sword
KITEM:  e = damaged mundane helmet
NSUBST: ` = d / e, D = + / 2=. / x
SUBST:  x = xxxx., . = ....P
MAP
.........
.xDDDDDx.
.D.....D.
.D.H`..D.
.D..`M.D.
.D.....D.
.xDDDDDx.
.........
ENDMAP

NAME:   nicolae_lair_treehouse
TAGS:   extra lairdec transparent
NSUBST: p = mmx / x, q = mmx / x, r = mmx / x, s = + / x
SUBST:  D : EKtt, J : HOtt, K : LPt, E : FLt, H : FNt, O : NZt
SUBST:  P : QQQt, L : QQQMMMtt, F : MMMt, N : SSSMMMtt, Z : SSSt
SUBST:  Q : RRRRt, M : RRRRt, S : RRRRt, R : .....t, x = x:100 .
MAP
.........
.xpppppx.
.qDEFHJr.
.qKLMNOr.
.qPQRSZr.
.xxsssxx.
.........
ENDMAP

NAME:    nicolae_lair_unfinished_basement
TAGS:    transparent extra lairdec
DEPTH:   Lair:2-
WEIGHT:  5
ORIENT:  float
KMONS:   pP = plant
KFEAT:   - = broken_door
NSUBST:  DE = 1:.
SHUFFLE: VG
SUBST:   S = {[(, D = c, E = n, + = +:35 -, G = G:35 ', V = V:35 '
SUBST:   c = c:70 ', n = n:70 ', ' = ':100 P, . = .:100 p
FTILE:   'P+-n = floor_sprouting_stone
MAP
     .......
   ...cDDDc...
  ..cEc'''cEc..
 ..Gc''.V'+'cG..
 .ccccc'''ccccc.
..E'cccc+cccc'E..
.cc+cc''''''cc+cc.
.D'''c'''''c'''D.
.D'V'+''S''+'V'D.
.D'''c'''''c'''D.
.cc+cc'''''cc+cc.
..E'cccc+cccc'E..
 .ccccc'''ccccc.
 ..Gc'+'V'+'cG..
  ..cEc'''cEc..
   ...cDDDc...
     .......
ENDMAP

NAME:   nicolae_lair_walls_n_trees_1
TAGS:   transparent extra lairdec
SUBST:  y = x., s = t., _ = _.
NSUBST: - = + / x
CLEAR:  _
MAP
 _____________
_...sts......._
_sst...stttts._
_.tx-----xyyy._
_t.-....tt..s._
_.s-.sss...s.._
_..-..s..yts.s_
_s.xss..txt..t_
_..ytt.yxxxy.._
_s.yt.t..yttt._
_..y..sss..ss._
_.s..ss...s..._
 _____________
ENDMAP

NAME:   nicolae_lair_walls_n_trees_2
TAGS:   transparent extra lairdec
SUBST:  y = x., s = t., _ = _.
NSUBST: - = + / x, ` = + / x
CLEAR:  _
MAP
 _____________
_...sy........_
_.s..y...sss.._
_.tt.-.tt..y...__
_yy--xxxyy...s..._
_...sxttt..yttsy._
_.st.y.t...y.t..._
_.stsy..ss.y.s..._
_..tsy.ss..`...t._
_...s..yyy`x```y._
 __..t..t..`...y._
   _.y.....y..sy._
    _____________
ENDMAP

NAME:   nicolae_lair_walls_n_trees_3
TAGS:   transparent extra lairdec
SUBST:  y = x., s = t., _ = _., S = t_
NSUBST: - = + / x, ` = + / x
CLEAR:  _
MAP
 _..ytSSSSSSttt__
_.yyxxxxyyyxxt..._
_...-.t....txt..._
_.t.-t.ssts.x....._
_...-..t.s.sxxxyy._
_.yyxtt.stt.`..y.._
_...xt.s..t.`...._
_...y.s..s..`...._
_..yyyyx````xxy.._
 _..y..t....y...tS
  _...ttttt...__S
ENDMAP

NAME:    regret_index_lairdec_lamprey_ridges
TAGS:    transparent extra lairdec no_rotate
KMONS:   P = plant
ITEM:    large rock q:1 no_pickup
SHUFFLE: ABCDEFGH / BAFDECGH / ABCEDFHG, pqrs
NSUBST:  @ = 2:@ / 2:xx@ / *:x
SUBST:   AC : t:30 ':20 c W:1 w:1, DH = c, BEFG = x
SUBST:   p = ., q = x, r : xcd', s : xP'', z = x...
FTILE:   ' = floor_sprouting_stone
MAP
    A@B     B@C
    A..BB BB..C
  AAA...BxB...CCC
  AA.A..BBB..C.CC
AAA.AA.r.B.s.CC.CCC
@..AAA..r.s..CCC..@
H.....ppp.qqq.....D
 H..rp.......qs..D
 HHH.r.......s.DDD
  xHH....z....DDx
 HHH.s.......r.DDD
 H..sq.......pr..D
H.....qqq.ppp.....D
@..GGG..s.r..EEE..@
GGG.GG.s.F.r.EE.EEE
  GG.G..FFF..E.EE
  GGG...FxF...EEE
    G..FF FF..E
    G@F     F@E
ENDMAP

NAME:    regret_index_lairdec_another_tattered_fort
TAGS:    transparent extra lairdec
KMONS:   F = fungus
KFEAT:   ~ = broken_door
SHUFFLE: PpQq / RrSs, tT / tT / t' / 'T
SUBST:   t : tFx', T = GGVVVtt}}}>
NSUBST:  x = 2:x / 2 = x' / * = F'', X = 2:x / 1:xx+~ / * = ~', - = 1:~' / *:cx
NSUBST:  p = 2:x / 2 = x' / * = F'', P = 2:x / 1:xx+~ / * = ~', q = 1:~' / *:cx
NSUBST:  a = 1:x / 2:F / 1:x' / 1:F' / *:', r = 1:x / 2:F / 1:x' / 1:F' / *:'
NSUBST:  } = 1:})> / 1:]>> / *:.
SUBST:   Rs = c, c = c:19 x:1, AS = F, z = zzc
CLEAR:   z
FTILE:   ' = floor_sprouting_squares / floor_sprouting_stone / floor_lair
FTILE:   .F~+ = floor_sprouting_stone / floor_lair w:5
MAP
z z cccPcPcPcc`
     Pcp.p.pQP``
z    c..p.p..c``
     P.p.p.p.P`z``
c   cc..p.p.cc`````
cXcXcccqc+cqcccRcRc
c.x.x-.c.....s..r.c
Xx.x.c.tt..T.c.r.rR
c.x.x+...c...+r.r.c
Xx.x.c.T..tt.c.r.rR
c.x..-.....c.sx.rSc
c.cXccccc+cccccRcRc
`````cc.a.a..cc   c
 ``z`c.a.a.a.c
   ``c..a.a..c    z
   ``cAa.a.acc
    `cccccccccc z z
ENDMAP

NAME:    regret_index_lairdec_chain_attraction
TAGS:    transparent extra lairdec
KMONS:   P = plant
ITEM:    stone q:1 no_pickup
SHUFFLE: ABC, DEF
SUBST:   A : x``, B = x, D : PPxx., E : x``, CF = .
SUBST:   ? : PPtd, ! : xctPP>>
CLEAR:   `
MAP
                  ..B
     AxF.       ..xx.B
    A..xx.     .xxF.
       ..x.  ..x..        xxx
         .x..xx.      ... .?xx
          DxxE.     ..xx..?!?x
 xxx  C ..x.ExD    .xx..C..?xx
xx?. C..xx.  Dx.  .x.. C  xxx
x?!?..xx..    .xE.x.
xx?.. ..      .ExxD
 xxx         .xx..x.
           ..x.   .x.
         .Fxx.     .xx..A
       B.xx..       .FxA
        B..
ENDMAP

NAME:    regret_index_lairdec_dandelion
TAGS:    transparent extra lairdec
KMONS:   P = plant
ITEM:    stone q:1 no_pickup
SHUFFLE: Qq / Rr / Ss
SUBST:   x = x:80 .:9 P:9 c:2, y = xP.
SUBST:   Q : Px., q : Px, R : P., S = ., rs = x
SUBST:   ! = })]???FFFFcc, ? : !Vcctt, z = cxPdd
: decorative_floor(_G, 'F', "flower patch")
MAP
       x.x.x
     y.......y
    x.x.xyx.x.x
    ...........
   x.x.xyxyx.x.x
   .Q.........Q.
  xQsQx.x.x.xQsQx
  ..Q.........Q..
 x.x.x...x...x.x.x
 ..y...........y..
xyx.x...c!c...x.xyx
...R...ccccc...R...
.xRrRx.?ccc?.xRrRx.
...R...ccccc...R...
xyx.x...ccc...x.xyx
 ...y...zcz.....y.
 x.x.x..zcz..x.x.x
  ..S...zcz...S..
  xSqSx.zcz.xSqSx
   .S...zcz...S.
   x.x..zcz..x.x
    ....ccc....
    zzzccccczzz
   xxxxxxxxxxxxx
ENDMAP

NAME:    regret_index_lairdec_mosaic
TAGS:    transparent no_item_gen extra lairdec no_pool_fixup
WEIGHT:  5
KMONS:   B = bush
KMONS:   P = plant
KITEM:   ~ : mundane long sword / mundane hand axe / mundane ring mail / \
             human skeleton / centaur skeleton / hound skeleton
KITEM:   ! = falchion ego:venom plus:-1 / whip ego:venom plus:-1, \
             large rock q:1 no_pickup
SHUFFLE: XYZ, '"`
NSUBST:  a = 1:+.. / 1:PP+.. / * = xxP, A = 1:+.. / 1:PP+.. / * = xxP
SUBST:   c = c x:1, X = x, Y : GVVVBBccWF, Z : ~., ? = ???Pcxx
CLEAR:   ?
FTILE:   `~ = floor_sprouting_stone
FTILE:   ' : floor_pebble_lightblue
FTILE:   " = floor_sprouting_squares
# hrm.
FTILE:   .GVB! = floor_moss
: decorative_floor(_G, 'F', "flower patch")
MAP
  c   c   c??
 ?cacacacaccc?c?
ccc."```````cccc
?c.."`X""""""'c?
cc""'''"''Y"'"cc?
?c``'..".'`'""`cc
cc`X'.."Z`'`Y"`c
?c`"""""""`''"`A
?c`"'.Z"!"Z.'"`c
?c`"''`"""""""`A
cc`"Y`'`Z"..'X`cc
?c`""'`'."..'``A
ccc"'"Y''"'''""c
 ?c'""""""X`"..A
 cccc```````".ccc
  c?ccccccccccc?
    c c???c?c?c
ENDMAP

# Based off of shoals_end_grunt_ice and hellmonk_spider_rune_endless_swarm.
NAME:    regret_index_lairdec_swarmberg
TAGS:    transparent no_item_gen extra lairdec no_pool_fixup
KMONS:   P = plant
SHUFFLE: EFGHI, JK
NSUBST:  A = 2:. / *:x, B = 1:x.. / *:., C = 1:x.. / *:., D = 2:. / *:x
SUBST:   c = ccccx, z = cxxxx, E : xcPV.., F : xx..., J : xxPw., GHIK = .
MAP
                      cCc
                    xxx.xxx
 xxxxxxx            xx...xx
xA.x.x.Ax          cx.J.K.xc
x.G.E.H.x          C.......C
xx.z.z.xx          cx.K.J.xc
x.F.I.F.x           xx...xx
xx.z.z.xx           xxx.xxx
x.H.E.G.x             cCc     xxxxxxx
xA.x.x.Ax                    xD.x.x.Dx
 xxxxxxx     cBc             x.G.E.H.x
           xxx.xxx           xx.z.z.xx
           xx...xx           x.F.I.F.x
          cx.J.K.xc          xx.z.z.xx
          B.......B          x.H.E.G.x
          cx.K.J.xc          xD.x.x.Dx
           xx...xx            xxxxxxx
           xxx.xxx
             cBc
ENDMAP

# Based off grunt_snake_rune_serpentine_throne and grunt_swamp_rune_castle.
NAME:    regret_index_lairdec_castle_curve
TAGS:    transparent no_item_gen extra lairdec no_pool_fixup
DEPTH:   Lair
KMONS:   pP = plant
SHUFFLE: ABC
SUBST:   A : c.., BC = c, P = P..
SUBST:   ? : px, ! : tV>G{}w., c = cccx, z : pxc..
NSUBST:  { = 1:{([ / *:<, } = 1:})] / *:>
FTILE:   '+VG{([})] = floor_lair w:15 / floor_sprouting_stone w:15 / \
                      floor_sprouting_squares

MAP
 ccccc               ccccc
cA'''Cc             cC'''Ac
c'!'''c.    xx     .c'''!'c
c'''''c.   xxxx    .c'''''c
c'''?'c.. xxPPxx  ..c'?'''c
cB''''+.. x....x  ..+''''Bc
 cccc+c.. x..P.xx ..c+cccc
  .....z..x..x..x..z.....
    ......x..x..x......
      xx..x..x..x..xx
       x..x..x..x..x
       xx.P..xx.P..x
        x....xx....x
        xxPPxxxxPPxx
         xxxx  xxxx
          xx    xx
ENDMAP

NAME:    regret_index_lairdec_grave_grove
TAGS:    transparent extra lairdec
WEIGHT:  5
KMONS:   D = pile of debris
KMONS:   P = plant
KITEM:   d = human skeleton, large rock q:1 / gold q:2 no_pickup
SHUFFLE: `z / ~Z / ~Z
SUBST:   x = x:9 c:1, t = t:4 x:1, ? = Pcx...., ` = P..., z = xxx.
NSUBST:  - = 1:++. / 1:xx+.. / *:x, ! = 1:ttx / *:'
NSUBST:  Q = 1:. / 1:xxxP. / *:x, R = 1:. / 1:xxxP. / *:x
NSUBST:  S = 1:. / 1:xxxP. / *:x, T = 1:. / 1:xxxP. / *:x
NSUBST:  G = 1:GGDtx / *:G, F = 1:FFPPd / *:F
FTILE:   'FGt = floor_sprouting_stone
CLEAR:   ~Z
: decorative_floor(_G, 'F', "flower patch")
: vault_granite_statue_setup(_G, "G", "gravestone")
MAP
           xxQx
          Qx..xx
        ccc..?.Qx
      xxttt-x.xxRx
     xtt't'ttxxx.xx
    xt'''t'''tx.?.R
   xt'F''!''F'tx..x
   xt''G't'G''t-.xx
  ct'''''t'''''tcR
  cttt!ttttt!tttc
 Sct'''''t'''''tcz
xx.-t''G't'G''tx`zz
x..xt'F''!''F'tx``z
S.?.xt'''t'''tx```z
xx.xxxtt't'ttxzz`zz
 xSxx.x-tttxx`zz`z
  xT.?..ccc`````z
   xx..xT zz``zz
    xTxx   zzzz
ENDMAP

NAME:    regret_index_lairdec_dancing_grid
TAGS:    transparent extra lairdec
KMONS:   p = plant
SHUFFLE: ABCDEF, LMNOPQ, RST
SUBST:   LRB : pgtt, C : xx', DEFT = x, M : xc, N : xxp, O : xx', APQS = '
: vault_granite_statue_setup(_G, "g", "broken pillar")
FTILE:   'g = floor_sprouting_stone
MAP
      .xx.
      .QL.  T    .xx.
      .PM.       .Ax.
      .ON.  S    .Bx.
      .NO.       .CF.
      .MP.  R    .DE.
.cc.  .LQ.       .ED.
.Ax.  .cc.       .FC.
.Bx.             .xB.
.CF.      .cc.   .xA.
.DE.      .QL.   .cc.
.ED.   R  .PM.
.FC.      .ON.
.xB.   S  .NO.
.xA.      .MP.
.xx.   T  .LQ.
          .xx.
ENDMAP

NAME:    regret_index_lairdec_piecemeal
TAGS:    transparent extra lairdec
SHUFFLE: ABCD, EFGH
SUBST:   A : xxc., E : xx., BCDFGH = .
SUBST:   z : tcx
CLEAR:   `
MAP
 ExxxxF
Ex.x..x
x..A..x     .
xxDcBxx     z.
x..C..x
x..x.xG
HxxxxG
            `
            `
          GxxxxH
         Gx.x..x
         x..A..x     .
  .z     xxDcBxx     z.
   .     x..C..x
         x..x.xE
         FxxxxE
            `
            `
                   ExxxxF
                  Ex.x..x
                  x..A..x
           .z     xxDcBxx
            .     x..C..x
                  x..x.xG
                  HxxxxG
ENDMAP

NAME:    regret_index_lairdec_entangling_icon
TAGS:    transparent extra lairdec
WEIGHT:  5
KMONS:   p = plant
ITEM:    mundane spear
KFEAT:   z = x
NSUBST:  @ = 1:@ / *:., & = 1:@ / *:.
SUBST:   P : pptz!, ! = ppt
FTILE:   ` = floor_pebble_darkgray
FTILE:   ' = floor_pebble_lightgray
FTILE:   . = floor_pebble_green
FTILE:   "d = floor_pebble_lightgreen
TILE:    z = wall_pebble_green
MAP
    x  xx
 x xPxx`'x@
xPxdxx'``'x xx
 x"xxx``'.'xPx
 x"xxxx'.".'x
x.'.xx``x.".x
 x.x'xx`xx."x
 x'.x`xxxxx""x
 @x'`xxPx.".x
 xPx`xxx.""x
  x xxxxdxxPx
      xPx  x
       x
ENDMAP

NAME:    regret_index_lairdec_otherside
TAGS:    transparent extra lairdec
KMONS:   p = plant
KMONS:   b = bush
KFEAT:   y = x
SHUFFLE: ABC, JKLMNOP
SUBST:   x : xxc, t = t:6 b:2 y:1
SUBST:   A : pxt, JBC = ., K : ppbcGG., L : c., MNOP = x, ? : xxxtcGVF.
TILE:    y : wall_pebble_green / wall_pebble_cyan w:5
: vault_granite_statue_setup(_G, "G", "broken pillar")
: decorative_floor(_G, "F", "flower patch")
MAP
     t.t.t.t
    ....B....
    t.tBtBt.t
   .....B....
   t.t.....t.t
  ..A.....C...
  tAtA.?.CtCt
 ...A.....C..
 t.t........
 ...........
  t.t.......
xxxJKLMNOPxxxxxxxxxxx
xxxxxxxxxxxPONMLKJxxx
         .......t.t
         ...........
         ........t.t
        ..C.....A...
        tCtC.?.AtAt
       ...C.....A..
       t.t.....t.t
        ....B.....
        t.tBtBt.t
        ....B....
         t.t.t.t
ENDMAP

NAME:    regret_index_lairdec_budding
TAGS:    transparent extra lairdec
KMONS:   p = plant
KFEAT:   y = x
SHUFFLE: ABCDEFG, LMNOP, ?! / ?V / ?f / ?f / !? / !?
SUBST:   AB = x, C : xxppp, E : pt.., FG = ., L : yy+````, M : y``, MOP = `
SUBST:   ! : tc, ? : px.., y : yyy`
KMASK:   ' = no_item_gen
CLEAR:   `
TILE:    y : wall_pebble_red / wall_pebble_cyan / wall_pebble_green
: decorative_floor(_G, "f", "flower patch")
MAP
           y             F
         LyyyM        ..x.
         y'?'y        E.x.
        yy?!?yy      ..xx.
         y'?'y      .D.x.A.
         OyyyN      ..xx..
           y      ..C.x.B.
                ..B..xx..
        .      .A..xxx.C.
      ..F..     .xxx..D.
    ..E..xxx   xxx..E..
   .D..xxx.     ..F..
  .C.xxx..A.      .
  ..xx..B..
 .B.x.C..      y
 ..xx..      OyyyN
.A.x.D.      y.?.y
 .xx..      yy?!?yy
 .x.E        y.?.y
 .x..        MyyyL
   F           y
ENDMAP

# Riffing off of evilmike_ruin_ashenzari and nicolae_ru_the_path_less_chosen.
NAME:    regret_index_lairdec_abandoned_piercing
TAGS:    transparent extra lairdec luniq_lairdec_plantage
KMONS:   P = plant
KMONS:   d = pile of debris
KFEAT:   - = broken_door
KFEAT:   A = altar_ashenzari
KFEAT:   B = altar_ru
KFEAT:   C = altar_fedhas
SHUFFLE: Ab / B" / CT / >"
NSUBST:  J = 1:++- / 1:ccc-' / *:z, K = 1:++- / 1:ccc-' / *:z
NSUBST:  L = 1:++- / 1:ccc-' / *:z, M = 1:++- / 1:ccc-' / *:z
NSUBST:  X = 2:x / 1:. / * = x.., ! = 2:' / 3:dP / *:z
SUBST:   o : P.., O = P.., p : P., b = P
SUBST:   y = ccx``, z = cccx, ~ = ---++cx, > : VG}])>, t : ttPPccV, T = t
FTILE:   '"+- = floor_sprouting_stone
CLEAR:   `
MAP
z..zz                 zz..z
.O..                   ..O.
...y                   y...
z.yz                   zy.z
z     c             c     z
    yycy           ycyy
   yycccczcc+~+cczccccyy
   ycc''J....P....K''ccy
  ccc'''J.X..P..X.K'''ccc
   yzJJJc....o....cKKKzy
   yz.......PoP.......zy
   yzp.X..ccccccc..X.pzy
   yzoo..ccbbbbbcc..oozy
   yztpp.cbbbAbbbc.pptzy
   yzoo..ccbbPbbcc..oozy
   yzp.X..cc+~+cc..X.pzy
   yz........P........zy
   yzLLLc...XPX...cMMMzy
   yz'''L.X..P..X.M'''zy
  cccc''L..P.P.P..M''cccc
   yyccccz!!!!!!!zccccyy
    yycy           ycyy
z     c             c     z
z.yz                   zy.z
...y                   y...
.O..                   ..O.
z..zz                 zz..z
ENDMAP

NAME:    regret_index_lairdec_lost_corridors
TAGS:    transparent extra lairdec
KMONS:   P : plant / bush w:5
ITEM:    large rock q:1 no_pickup
SHUFFLE: ABCD, XYZ
SUBST:   A : `.., B : xxc, CD = c, X : xxPGd, YZ = .
CLEAR:   `
: vault_granite_statue_setup(_G, "G", "broken pillar")
MAP
c   c             c   c
A...c             c...A
BX..D             D..XB
C..Yc             cY..C
c.Z.c             c.Z.c
cY..C             C..Yc
D..XB             BX..D
c...A             A...c
c   c             c   c
     `           `
      `         `
       cBcCcCcBc
        ..Y.Y..
        ...Z...
        .X...X.
       cAcDcDcAc
ENDMAP

###############################################################################
# <<3>> Monster-placing vault sets.
###############################################################################

# First, a group of oklob-focused vaults.
NAME:   minmay_lair_oklob_tunnel
DEPTH:  Lair, !Lair:$
ORIENT: southwest
MONS:   plant, oklob plant
NSUBST: 1 = 4:2 / 4 = 10 / *=1..
MAP
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxx11xxx111.....
xxxxxxxxxxxxxxxxxxxxxxx111xxxx111xx111...@
xxxxxxxxxxx111xxx11xxxxx111111111111111..x
xxxxxxxxxx11xxxx11xxxx111111111111111111xx
xxxxxxxxxx1xxxxxx11111111111111111111x1xx
xxxxxxxxxx11xx1111111111111xxx11111xxxxxx
xxxxx11xx1111111111111111111xxxxxx111x
xxxxxx1111111111111xx111xxx11xxxxxxxxx
xxxx%+11111111111xxxxxx11xxxxx
xxxx%xxx11111xxx11xxxxxxxxxx
xxxx|xx11xxx11xxxxx
xxxxxxxxxxxxx111xx
xxxxxxxxxxxxxxxxx
xxxxxxxxxxx
xxxxxxxxx
ENDMAP

NAME:   minmay_lair_oklob_items
TAGS:   luniq_oklob extra
MONS:   plant / fungus w:3 / bush w:5
KMONS:  | = oklob plant
KITEM:  | = |
SUBST:  X = xx_
CLEAR:  _
SUBST:  % = ....%%%%**
MAP
XXXXXXXXX
Xxxxxxxxx.
Xx%%%1.x.@
Xx%%%xx.x.
Xx|%%xxxx
XxxxxxXXX
XXXXXXX
ENDMAP

# Combined vault with four size settings, each with
# one more oklob and more items.
NAME:   minmay_lair_oklob_chamber
TAGS:   luniq_oklob no_monster_gen
ORIENT: north
KMONS:  p = plant
KMONS:  P = oklob plant
# Lair:1 is absdepth 11, for reference.
: local size = crawl.random2(10) + you.absdepth() - 10
: if size > 8 then
SUBST:  '`" = ., yza = x, XYZ = ?, 1234 = p
NSUBST: ? = 1:% / 4:P / * = ?
: elseif size > 6 then
SUBST:  '` = ., XY = ?, yzZ4 = x, 123 = p
NSUBST: ? = 1:% / 3:P / * = ?
: elseif size > 3 then
SUBST:  ' = ., X = ?, 3yY = x, 12 = p
NSUBST: ? = 1:% / 2:P / * = ?
: else
SUBST:  X2 = x, 1 = p
NSUBST: ? = 1:% / 1:P / * = ?
: end
CLEAR:  '`"34yzaYZ
SUBST:  ? = ....111$$%%*|
MAP
xxxxxxx
xxxxxxx
xxxxxxx
aaaaaaa
zZZZZZa
yYYYYZa
xXXXYZa
x??XYZa
x??XYZa
x11234a
....'`"
 .@'`"
ENDMAP

# Combined vault. More and more open space
# for an oklob plant ringed by bushes.
NAME:   minmay_lair_oklob_bushes
TAGS:   luniq_oklob extra
MONS:   oklob plant, bush
: local size = crawl.random2(10)
: if size > 8 then
SUBST:  `'" = .
: elseif size > 6 then
SUBST:  `' = .
: elseif size > 3 then
SUBST:  ` = .
: end
CLEAR:  `'"
MAP
       """
    """""""""
   """""""""""
  """""'''"""""
 """"'''''''""""
 """'''```'''"""
 """''`.%.`''"""
"""''`.222.`''"""
"""''`%212%`''"""
"""''`.222.`''"""
 """''`...`''"""
 """'''```'''"""
 """"'''''''""""
  """""'''"""""
   """""""""""
    """""""""
       """
ENDMAP

###############################################################################
# A set of vaults converted from the ultimately-dispersed Forest.

NAME:   grunt_forest_stairs_clearing
DEPTH:  Lair:2-, !Lair:$
MONS:   wolf, black bear, polar bear, spriggan
KMONS:  P = plant / bush
NSUBST: t = 2:t / * = t.
NSUBST: Q = 3:1 / 1:2 / 1:3 / 1:4 / *:.
MAP
.tt...tt.
t..Q.Q..t
t.t.Q.t.t
.Q.P.P.Q.
..Q.).Q..
.Q.P.P.Q.
t.t.Q.t.t
t..Q.Q..t
.tt...tt.
ENDMAP

# A secluded grove.
NAME:   forest_entry_grove
DEPTH:  Lair:2-, !Lair:$
MONS:   centaur w:4 / spriggan
MONS:   wolf, black bear, polar bear / raven w:2
KMONS:  P = plant / bush
KFEAT:  d = cache_of_baked_goods
NSUBST: Q = 2:1 / *:.
NSUBST: R = 3:2 / 1:3 / 1:4 / *:.
MAP
   xxxxxxxxx
  xxxttttxxxx
 xxxttttttttxx
xxtttt.d.tttxxx
xttt..Q.Q..ttxx
xttt.Q.R.Q.tttx
xtt.........ttx
xtt.R..)..R.ttx
xtt..R...R..ttx
xttt..R.R..tttx
xttt.......tttx
xxtttt...ttttxx
 xxxtt..ttxxxx
  xxxtt..ttxx
   xxtt@@ttx
ENDMAP

NAME:   grunt_forest_small_clearing_treed
TAGS:   transparent patrolling
MONS:   plant / bush
NSUBST: t = 2:t / * = t..
SUBST:  T = t, * = **t
KPROP:  * = no_tele_into
KMASK:  * = opaque
MAP
 tt@@@tt
t.......t
t.1...1.t
@..TTT..@
@..T*T..@
@..GTT..@
t.1...1.t
t.......t
 tt@@@tt
ENDMAP

# Previously large_clearing_fruit, _statues, _slash, _guards
NAME:    grunt_forest_large_clearings
TAGS:    transparent no_pool_fixup
WEIGHT:  15
KMONS:   p = plant / bush
MONS:    wolf, black bear / polar bear, spriggan / centaur w:4
KMONS:   4 = spriggan rider / faun w:4
KMONS:   9 = 9
KITEM:   94 = *
KFEAT:   94 = W
KFEAT:   C = cache_of_fruit
SHUFFLE: wW'"-9 / ''GG'4 / 'C'0'% / ```C1G
SUBST:   t = t.., '. = p:49 .:405, W = WW., "w = wwwW
NSUBST:  1 = 3:1 / 2:2 / 1:3 / *:.
TILE:    G = dngn_statue_elephant / dngn_statue_hydra / \
             dngn_statue_dragon / dngn_statue_snail / dngn_statue_cat w:5
MAP
      tt@@@tt
    ttt.....ttt
  ttt.........ttt
  tww...........t
 ttwww..........tt
 t..www..'.......t
tt...w"w....'....tt
t.....ww-.-.......t
@......-.W--......@
@....'..W9W..'....@
@......--W.-......@
t.......-.-ww.....t
tt....'....w"w...tt
 t.......'..www..t
 tt..........wwwtt
  t...........wwt
  ttt.........ttt
    ttt.....ttt
      tt@@@tt
ENDMAP

NAME:   grunt_forest_large_clearing_hut
TAGS:   transparent
MONS:   plant / bush
KMONS:  2 = spriggan / centaur w:2
KFEAT:  2 = cache_of_baked_goods
SUBST:  t = t..
SUBST:  . = 1 .:90
COLOUR: -*29 = lightgrey
FTILE:  + = floor_sprouting_stone
FTILE:  -*29 = floor_sprouting_squares
MAP
      tt@@@tt
    ttt.....ttt
  ttt.........ttt
  t.............t
 tt.............tt
 t...............t
tt...............tt
t......ccccc......t
@......c-9*c......@
@......+-*2c......@
@......c-9*c......@
t......ccccc......t
tt...............tt
 t...............t
 tt.............tt
  t.............t
  ttt.........ttt
    ttt.....ttt
      tt@@@tt
ENDMAP

###############################################################################
# Some "beast lair" vaults, originally submitted as a serial vault.
NAME:   beast_lair_carwin_large_1
TAGS:   transparent luniq_beast_lair
ORIENT: float
: beast_lair_populate_mons_large(_G)
: beast_lair_randomise(_G)
MAP
                E.EEJ
      1     1  ..E.ME
...........1.xxx.ME.
 .Axxxxx..xxxx.xxxA..
..xxJ..xx.xx.B.FFxx1.E
 ..xxx.B........GGxx...
 .xxA.....FFxxG..Gxxx.
 .x...423...xGGG.GGGx.
..x.AxxxFFFxxG4223Axx.1
..xx..AFFFxx%LL4xxxx..
..Axx..MFxxxxxxxx.xxx.
 ..x..xxxxAxx......A..
 .A.............  .
      .            ..
ENDMAP

NAME:   beast_lair_carwin_large_2
TAGS:   transparent luniq_beast_lair
ORIENT: float
: beast_lair_populate_mons_large(_G)
: beast_lair_randomise(_G)
MAP
  ..1.. 1
   .x........
  ...xxxxxxx.
. ..xxxLxxJxx.
 ..Ax44....Ex.
 .Gxx%4xx..xx.
 GGGxLxxxE.xx.
 .GGxxxx...xx.
 .Gxxxx..EEx..A
..xx31xx..xx....
1.x32..x.xx..  A
 .xxx....xx1.
 ..xxxxEMExx..
 .............
ENDMAP

NAME:   beast_lair_carwin_large_3
TAGS:   transparent luniq_beast_lair
ORIENT: float
: beast_lair_populate_mons_large(_G)
: beast_lair_randomise(_G)
MAP
            ..
        .......
 .........Mxxx...
 x  xxx.xxxxxxxxx
 xxxxM...A......xx
 .xxA......xx..M.xx.
..x...xxAA..x22.Mx...
..xx.xxxxxx.xxx..xx..
 .xx.xx44LA...x.......
 .x..xx%4...x.xxxxx.
......xxxxLx......x..
..xx.MM.2xxx....xxxx.
   x...24x....xxx  ..
   xxxxxxx.xxxxxx x
    ................
   ...         .
ENDMAP

# This vault is kinda neat because if the Fs become walls (1/4th of the time)
# it's a maze-like warren, but if they become floors it's an open "village".
NAME:   beast_lair_carwin_large_4
TAGS:   transparent luniq_beast_lair
ORIENT: float
: beast_lair_populate_mons_large(_G)
: beast_lair_randomise(_G)
SUBST:  T:5 6:3
MAP
  .          .A1
.........  ........x    .
 ...xxxA.....xxxx.......x
 ...x3xxFFFAxx4x...xxxx..x.
 ..xx.xx..Fx...xFFxx24xA.....
...x3..........2xF....x...x
..FxxF11..FFxxx.x.....xxx.
.......Fx...LF....xx.xx  .
.x...xxx..x4Tx.F...F...D 1.
x.Mxxx...xxxxxxx.FFF.D.2WWW
xxxx....x.24xxxxxF...MWWWW
2....xx...Mxxxxx.D..3WWWWWWW
4..       .  Ax ..M1WWW W
ENDMAP

NAME: beast_lair_carwin_1
TAGS: transparent luniq_beast_lair
: beast_lair_populate_mons_small(_G)
: beast_lair_randomise(_G)
MAP
     ..
  1......
 ..xxxxx..
 .xxM3Axx1..
 .xAMJ4xFx.
.Axx.xxxFF.1
..1x..x...
 ..xx..x...
  .....
ENDMAP

NAME:   beast_lair_carwin_2
TAGS:   transparent luniq_beast_lair
: beast_lair_populate_mons_small(_G)
: beast_lair_randomise(_G)
ITEM:  gold
SUBST: ? : .
MAP
  ...
 ..2..
..3d2..
 ..2..
  ...
ENDMAP

NAME: beast_lair_carwin_3
TAGS: transparent luniq_beast_lair
: beast_lair_populate_mons_small(_G)
: beast_lair_randomise(_G)
MAP
  1
   ..
....B..
 .xxxx..
..x33xx.1
.xxM.Ax.
A.xx.xx.
 ..B...B
ENDMAP

NAME:   beast_lair_carwin_4
TAGS: transparent luniq_beast_lair
: beast_lair_populate_mons_small(_G)
: beast_lair_randomise(_G)
MAP
  ...  A
 ..x....
A.xxxFA..
..x32FFB.
..xxM1x...
.xx..x1.
....FxA
ENDMAP

NAME:   beast_lair_carwin_5
TAGS: transparent luniq_beast_lair
: beast_lair_populate_mons_small(_G)
: beast_lair_randomise(_G)
MAP
 .
 ...1...
..xxxx......
 ...3x.xBA.
 .x2xx.xxxB
 .xJ.2...
1.xxBxxxA
 ........A
ENDMAP

NAME:   beast_lair_carwin_6
TAGS: transparent luniq_beast_lair
: beast_lair_populate_mons_small(_G)
: beast_lair_randomise(_G)
MAP
  .........
   .Axxxx.1
 .....GGxx.
 ..xxxxGGx...
..1xxGG.Gxx.
 .xxD24Jxx..
 ..xx32xxA.
 .A.FFFFF..
  ......
ENDMAP

NAME: beast_lair_carwin_7
TAGS: transparent luniq_beast_lair
: beast_lair_populate_mons_small(_G)
: beast_lair_randomise(_G)
MAP
.x....
...x....
..1x.x....
 .xx.xx.x..
..xPPxxxxx..x .
Exx3PPx1Jx..x.
E.xxxxx....x.
 E.EEx42Pxxx..
 ..E.xxxxx.x...1
  ...........
     A
ENDMAP

NAME:   beast_lair_carwin_8
TAGS:   transparent luniq_beast_lair
: beast_lair_populate_mons_small(_G)
: beast_lair_randomise(_G)
MAP
. .. . ..   1   .......   1
 ..Axxxx.... .  xxxxxx....
..xxGGGxx.xxxxxxA.1.xxx.
..xGGGGG..M243.....F..x..
.xxxGGxxxxxxxxxxxx...xxx..
....G..1         FFA......
ENDMAP

NAME:   beast_lair_carwin_9
TAGS:   transparent luniq_beast_lair
: beast_lair_populate_mons_small(_G)
: beast_lair_randomise(_G)
MAP
 .   1    .
 ........  .
...xxxxx.....
 .AAxxxxxxxx.
 ..1xxxx4Lx....
..xxx.M44xx.
 x.....xxx..
...xxxxx... A
...xxxx..x.s
      .
ENDMAP

NAME: beast_lair_carwin_10
TAGS: transparent luniq_beast_lair
: beast_lair_populate_mons_small(_G)
: beast_lair_randomise(_G)
MAP
  AA
 .......
 .x..xx.xx
...x..xx.
 .Axx.4x.
 ..Jx3xx.
...xxxx1x
  .x43xx.1
 .xxx.Ax..
 .xxx.xx.1
1.........
ENDMAP

NAME: beast_lair_carwin_11
TAGS: transparent luniq_beast_lair
: beast_lair_populate_mons_small(_G)
: beast_lair_randomise(_G)
MAP
     .E
. .......xx
 ..xxxxx..E
..xx2x4xE..
.xx...2xx.
..B.xxxxxx..
 ...    .....E
ENDMAP

###############################################################################
# <<4>>
# Remaining non-grouped regular Lair vaults.

NAME:   beargit_carnivore_pack
ORIENT: float
DEPTH:  Lair:2-
KMONS:  1 = komodo dragon
KMONS:  2 = skyshark
KMONS:  3 = Grum band, komodo dragon
KMONS:  4 = Snorg, skyshark
SUBST:  1 : 111122222234, 1 = 11., 2 = 2.
NSUBST: 3 = 3 / ., 4 = 4 / ., . = ..`
KPROP:  ` = bloody
{{
if crawl.coinflip() then
    _G.kitem('a = dire elephant skeleton')
else
    dgn.delayed_decay(_G, 'a', "dire elephant corpse")
end
}}
MAP
.....
..1..
.1a1.
.....
ENDMAP

# Rats! (Lemuel) [combined both Lair and D versions]
NAME:    lemuel_ratsnest
ORIENT:  northeast
DEPTH:   D:5-8, Lair:1-3
MONS:    rat, quokka, river rat, hell rat
ITEM:    gold / stone
KFEAT:   e = cache_of_meat
SUBST:   d = d$$$........., e : e$.
SHUFFLE: 234 / 324 / 243
: if you.in_branch("Lair") then
NSUBST:  4 = 1:4 / * = 40, 3 = 2:3 / * = 34.
NSUBST:  2 = 2:2 / * = 224., 1 = 2:1 / * = 13.
CLEAR:   "
: else
SUBST:   " = x
NSUBST:  1 = 2:1 / * = 1., 2 = 2:2 / * = 2., 3 = 2:3 / * = 3.
:   if you.absdepth() > 6 then
SUBST:   4 = 430
:   else
SUBST:   4 = 30
:   end
: end
TILE:    e = dngn_cache_of_pizza
MAP
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxdeexxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxx343dxx.xxxxxxxx.334433xxxxxxxxx23.dexx
xxd222...xxxxxxxx..224422xxxxxx1111...xxx
x..111..xxxxxxxxx..111111.xxx.111...xxxxx
xx.111..xxxxxxxxxx.11111..x......xxxxxxxx
xxxx..xx.x.xxxxxx.xx..........xxxxxxxxxxx
xxxxx.xxx.x..x.xx.x.xx....x.xxxxxxxxxxxxx
xxxxx...x.xxx.x33xx.xxxx.xxxxxxxxxxxxxxxx
xxxxxxx.x.xxxx221x.xxx...xxxxxxxxxxxxxxxx
xxxxxxxx.xxxxx111.xxxx.xxxxxxxxxxxxxxxxxx
"""""""xx..xxx.x.x.xxx.xxxxxxxxxxxxxxxxxx
"""""""xxx..x.xx.x.xx.xxxxxxxxxxxxxxxxxxx
"""""""xxxxx..xx..x.x.xxxxxxxxxxxxxxxxxxx
"""""""xxxxxxxx.xxxx.xxxxxxxxxxxxxxxxxxxx
"""""""""""""xx.xxxxxxxxxxxxxxxxxxxxxxxxx
"""""""""""""xxx.xxx"""""""""""""""""""xx
"""""""""""""xx.x.xx"""""""""""""""""""xx
"""""""""""""xxx.x.x"""""""""""""""""""xx
"""""""""""""xxxx.xx"""""""""""""""""""xx
"""""""""""""xxxx@xx"""""""""""""""""""xx
ENDMAP

# A comfortable, reclusive cottage for the summer holidays (Eino)
NAME:    pond_and_an_island_with_a_cottage
ORIENT:  float
DEPTH:   Lair:3-, !Lair:$
MONS:    necromancer, elephant zombie
MONS:    basilisk zombie / raven zombie w:2 / komodo dragon zombie
SHUFFLE: 23
NSUBST:  2 = 1:2 / * = 2., 3 = 1:3 / * = 3.
SUBST:   % = %%%%%$$$**|, G = G.
: vault_metal_statue_setup(_G, "G", "mystic cage")
MAP
             wwwwwwwww
        wwwwwwwwwwwwwwwww
     wwwwwwwwwwwwwwwwwwwwww
    wwwww..........wwwwwwwww
  wwwwww.xxxxxxxxxx.wwwwwwwww
 wwwwwww.x.3.2+.1Gx..wwwwwwww
 wwwwwww.x+xxxx2.3x..wwwwwwwww
wwwwwwww.x.%%%x.32x..wwwwwwwww
wwwwwwww.xxxxxxx+xx..wwwwwwwww
wwwwwwwww...........wwwwwwwwww
 wwwwwwwww....WW....wwwwwwwww
  wwwwwwwwww..WWW..wwwwwwwww
  wwwwwwwwwww..W..wwwwwwww
   wwwwwwwwwww...wwwwwww
    wwwwwwwwwww..wwwww
     wwwwwwwww...www
       wwwwww.@.www
         www
ENDMAP

# Ice dragon lair with assorted imp pets
NAME:   bobbens_ice_dragon_lair
TAGS:   no_monster_gen
DEPTH:  Lair:3-
MONS:   ice dragon, rime drake
SUBST:  $ = $:3 *:2, _ = %:1 `:3
SUBST:  3 = 2:9 .:1
SUBST:  ' = w:15 x:12 `:1, ; = x:2 .:3, G = G:1 .:3
KPROP:  %` = no_tele_into
MAP
;;..;..;;;.;;.;;;
;;...wwww.;;..ww.;;
;..ww'''ww..wwwww;;;;
;.ww'xxxwwwwwwwww;....
;.ww'x$xx''''''w...ww.
;..wwx$$xxxxxx'w..www.
;;..wx$1x..>xx'wGwww.;
;;;.wx$$..x2.x'wwww.;
;;;wwxxw3.xW.''www.;;
;..www'xxxxxxw'wwww.;;
..wwww''xxxxwww''ww.;;
.wwwwwww...www'_'ww.;
..wwwww....www'''w.;;
.;www...V..wwwwww3;;
;............www.;;;
;;   ;;;....w..;
ENDMAP

# Dragon lair embedded in wall
NAME:   bobbens_dragon_lair_wall
TAGS:   no_monster_gen
DEPTH:  Lair:2-
MONS:   steam dragon, acid dragon, rime drake, lindwurm, fire dragon
ITEM:   any good_item
: if you.absdepth() > 13 then
SUBST:  A = 4:1 5:9, B = 3 4:2 .:4
: else
SUBST:  A = 12, B = 3:2 .:3
: end
SUBST:  d = $:3 d:2
SUBST:  ' = l:15 x:9 c:3
SUBST:  z = x:3 c:1
SUBST:  ; = x:3 c:1 .:4
SUBST:  y = l 1:3 .:1
SUBST:  % = %:1 .:3
FTILE:  .>$%d12345 = floor_sprouting_stone
MAP
xxxxxzzzzzzzzzxxxxx
xxxzzzzz..yyzzzxxxx
xxzzz'...yzydzzzzxx
xzzz;.B.yzzzddzzzxx
xzz;.A..yzzzddzzzxx
xzz;...y'zzzzd>zzxx
xzz;'...y'zzzzzzzxx
xzzz;y..zzzzzzzxxxx
xzzzzzz;.zzzzzxxxxx
xxzzzzz.;zzzzzxxxxx
xxzzzz.yzzzzzzxxlxx
xxzzzz.;%zzzzxxxlxx
xxz.y'.Byllzzzxzxlx
xzyy..y.yyyyxzzxlyx
..%....yy..yyzxyy..
..y.y...G.y..yy....
 y.........y......
ENDMAP

# Drake nest (minmay)
NAME:   minmay_lair_drake_nest
TAGS:   transparent
DEPTH:  Lair:3-
MONS:   rime drake, plant w:20 / fungus w:1 / bush w:1
NSUBST: 1 = 2:1 / * = 1.., ' = 4:2 / * = ., . = 1:2 / 1:% / * = ..%2
MAP
   .'.
  '...'
 '.....'
...111...
'..111..'
...111...
 '.....'
  '...'
   .'.
ENDMAP

# Venomous thicket (minmay)
NAME:   minmay_lair_venomous_thicket
TAGS:   ruin_lair
ORIENT: north
MONS:   black mamba / cane toad / wolf spider
MONS:   basilisk / komodo dragon / hornet
MONS:   adder
KMONS:  P = plant / fungus w:3
KMONS:  B = bush
SUBST:  4 = PPP. B:2, . = ...P B:2
SUBST:  1 = 1., 2 = 2., 3 = 3.
MAP
xxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxx
xxxxxxxPPPPxxxxxxx
xxxxxPPP1%%3Pxxxxx
xxxxPPP%3.1.PPxxxx
xxxxP.31.3.3.Pxxxx
xxxP.2.3PPP.1PPxxx
xxx.3.PPPPPP32Pxxx
xxx2..PPPPPPP.Pxxx
xxxP3.PPPPPPP3Pxxx
xxxPP2.PPPPPP.Pxxx
xxPPP..3PPPP3..Pxx
xxPP..........3.xx
..3..3....3.......
ENDMAP

# Hibernating monster in a tunnel, can be pretty dangerous
NAME:   hibernation_bobbens
TAGS:   no_monster_gen no_item_gen
MONS:   ice dragon / fire dragon / swamp dragon / anaconda w:5
MONS:   swamp dragon / hydra / catoblepas / mountainshell
MONS:   swamp drake / w:20 cane toad / w:20 komodo dragon /\
        w:20 basilisk / w:20 black mamba
KMONS:  P = plant
: if you.absdepth() > 14 then
SUBST:  M = 1:1 2:9 3:20
: else
SUBST:  M = 2:1 3:4
: end
SUBST:  ; = x:3 .:1
MAP
xxxxxxxxxx
xxx....xxx
xx$....%xx
xxPPxx%Mxx
xxx..xxxxx
xxx;.;xxxx
xxx;..xxxx
xxxx..;xxx
xxx....xxx
ENDMAP

# Catoblepas lookout (blackcustard)
NAME:  lookout_lair_type
TAGS:  extra no_pool_fixup transparent
DEPTH: Lair:3-
MONS:  generate_awake patrolling catoblepas
SUBST: 1 = 1...., a = .wW, ' = .W
FTILE: .1 = floor_sprouting_stone
MAP
  a'a aa
 a'wwwWa
 a'w1.wa
a'aw..ww
 a'w...Wa
  'wwwww@
  a''a''
     'a
ENDMAP

# Two stream minivaults, combined.
NAME:   guppyfry_lair_drakes
: if you.depth() > 3 and crawl.coinflip() then
MONS:   rime drake / swamp drake / acid dragon
MONS:   steam dragon
MONS:   plant
SUBST:  -_ = wwWW..%
SHUFFLE: .t
: else
SUBST:  12 = 0, _ = wW.%, 3- = .
: end
MAP
.3WW-3.....
.ttWW-ttt..
.3ttW-tt.t.
.ttWWtt...t
tt1Wttt2.tt
.ttWW-t3.t.
..ttWW_-1t.
.tt1_WWttt.
..tt-_Wtt3.
.tt3.tWWttW
.ttt.ttWWW-
....3.3-W-.
ENDMAP

NAME:   kennysheep_rathole
TAGS:   no_monster_gen
MONS:   river rat band, hell rat, river rat / rat
KMONS:  P = plant / fungus w:2
KFEAT:  d = cache_of_baked_goods
NSUBST: ' = 1:1 / 2:P / 2:2 / 2:3
MAP
 xxxx
 xxxxxx
xxd.'xxxx
xx.%'''xx
xx'''.''xx
xxx'''''xx
  x'x'.''x
  xxx'...x
     @  @
ENDMAP

# Contains gold and one ok item to make the hell rats a little more worth it.
NAME:   kennysheep_abandoned_house
TAGS:   ruin transparent
MONS:   rat, river rat, hell rat
KMONS:  D = pile of debris
ITEM:   quill talisman / quill talisman randart w:4, spore talisman
KFEAT:  C = cache_of_fruit / cache_of_baked_goods w:4
NSUBST: d = 1:d / 1:eCC / 1:C / 1:F / 1:* / 1:d / 1:9 / 1:3 / * = $11223.......
NSUBST: c = 5:Dc / *:c
: decorative_floor(_G, 'F', "broken floral vase")
MAP
      .......
.......ccccc.........
.ccccccccccccccccccc.
.cccccccdddccccccccc.
.ccdddccdddcc..dddcc.
.ccdddccdddcc..dddcc.
.cc...cc...+...dddcc.
.cccc.cccc.ccccccccc.
.cccc+cccc+ccccccccc.
.cc.....+...+...ddcc.
.ccddddcc...cc..ddcc.
.ccddddcc...cc..ddcc.
.cccccccc+++cccccccc.
.ccccccc.....ccccccc.
.....................
ENDMAP

# A sealed arena. The walls are usually thick enough to make this only
# accessible from the floor below. Despite the name, it can also have
# another heavy earth monster in it.
NAME:   kennysheep_catoblepas_arena
TAGS:   no_monster_gen ruin no_descent
DEPTH:  Lair:3-, !Lair:$
MONS:   catoblepas / mountainshell w:2
NSUBST: d = 4=%* / 3:0 / *:.
MAP
xxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxx
xxxxxxxdd1ddxxxxxxx
xxxxxcdddddddcxxxxx
xxxxxdcccccccdxxxxx
xxxddcdddcdddcddxxx
xxxddcdddcdddcddxxx
xxxccdcccdcccdccxxx
xxx..c...c...c..xxx
xxx..c...c...c..xxx
xxxxx.ccc.ccc.xxxxx
xxxxxc.......cxxxxx
xxxxxxx..}..xxxxxxx
xxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxx
ENDMAP

NAME:   kennysheep_basilisk_garden
TAGS:   transparent
MONS:   basilisk, pile of debris
NSUBST: . = 2:1 / 3 = 11G / *:., G = 2:G2 / *:G
TILE:   G = dngn_statue_axe / dngn_statue_cat / dngn_statue_centaur / \
            dngn_statue_dwarf / dngn_statue_polearm / dngn_statue_tengu
MAP
   .....
 ....G....
 .G.....G.
.....G.....
...........
.G.G.*.G.G.
...........
.....G.....
 .G.....G.
 ....G....
   .....
ENDMAP

NAME:   kennysheep_snail_temple
MONS:   torpor snail
KFEAT:  a = altar_cheibriados
NSUBST: 1 = 1:1 / * = 1.
TILE:   c = wall_stone_puffball
MAP
 @
x.x   xxxxxxxxx
x.x  xx...1....@
x.x xx.xxxxxxxx
x.xxx.xxbbbbbbxxxx
x.xx..xbbWWWWW...xx
x.cc.xbbWbbbbbbcc.xxx
x...1.WWW1a1WWW..1...@
xxx.xxbbbbbbWbbx.xxxx
  xx...WWWWWbbx..x
   xxxxxbbbbbxx.xx
   xxxxxxxxxxx.xx
  @.......1...xx
   xxxxxxxxxxxx
ENDMAP

# A den of bears.
NAME:   gammafunk_lair_bear_cave
TAGS:   patrolling no_monster_gen
MONS:   black bear / polar bear
KFEAT:  " = W
KMONS:  " = electric eel w:40 / nothing
KITEM:  % = gold / stone
SUBST:  % = %., * = *:40 |, B = 1., E = tE
CLEAR:  E
MAP
EEEEEEEEEEEEEEEEEEEEEEEEE
EtttttxxtttxxxxxxttxxtttE
EttxxxxxxxxxxxxxxxxxxxxxE
Etxxxxxxxxxxx..xxxxxxxxtE
Etxxxxx"Wxx......x.xxxttE
Exxx%...1.....x....xxxxtE
Exxx%B.1...xxxxx.....xxtE
Exxxx%%%*xxxxxxxxxxx..xtE
Etxxx*xxxxxxxtxxxxxxx...@
Etxxxxxxxxxxtttttttxxx..@
EttxxxxxttttttttttttttttE
EEEEEEEEEEEEEEEEEEEEEEEEE
ENDMAP

# A hidden river runs under a mountain, feeding into an enchanted lake.
NAME:   gammafunk_lair_enchanted_lake
TAGS:   no_pool_fixup
ORIENT: north
KMONS:  pq = plant / fungus / toadstool
KMONS:  1 = electric eel / rime drake / elephant / wyvern
KMONS:  2 = lindwurm / dire elephant / catoblepas / mountainshell w:3
KITEM:  2 = eel talisman w:2 / * / |
KFEAT:  q = W
KFEAT:  1 = w
KFEAT:  T = t
SUBST:  p = p., q = qW, r = tx, E = tE, * = *|, i : GT, j = GTx-
NSUBST: . = 2=9 / 3=0 / ., 1 = 3=1 / 1ww
KMASK:  Ww = no_monster_gen
CLEAR:  E
COLOUR: -|*2 = brown
FTILE:  =-|*2GT = floor_sprouting_ruin
: decorative_floor(_G, 'F', "flower patch")
MAP
xxxxxxxxxxxxxxxxxxxxxxxxxxx
ttccccccccccccccccccccccctt
Etci-WWWWW1jxxwWW1xxjww1ctE
Etc*2-WWxWWxxwWWwWWxxwwwctE
Etc*2-wxxWWxWWWjjwwWWwWWctE
Etci-wwjxxWWW1xxxx1wWWWwctE
EtccnncccccnncccccccccWqxtE
Etxxx.xxxxxx.xxxxxxxxxx=xtE
Ettttx.trrrtt.ttrrrrttWWttE
Etttt.ttWWwWWttWtwwwqWWwttE
Ettt...qWwWwWwWwWwwwWwwwttE
Ettp..WWwwwqqWwqqWWWqqqtttE
Ettp..WqwwwttqqtttqqtttttE
Ettp..WqwwwttttttttttttttE
Ettp...WwwwwWqqqttttttttE
Ett.....Wwwwwqq..pttttttE
Etttp....qWwwwWq..ppttttE
Etttp......WwwWW...ptttttE
Etttp....FWWwwWW....pptttE
Ettttp...WWWwwwWW....ptttE
Ettttp...WWwwwwWW.....pttE
Ettttt...WWwwwwWW....ptttE
 Ettttp..FWWwwWWW...pptttE
  Ettttp..WWWWWWF..pttttE
  Etttttp..WWWW....pttttE
   Ettttp.........ptttEE
    Etttt........tttttE
     EEEE..@@@@..EEEEE
ENDMAP

NAME:   nicolae_lair_yak_garden
TAGS:   no_monster_gen no_item_gen no_trap_gen transparent
DEPTH:  Lair:2-, Crypt
SUBST:  P = P., f = ffF.
: local d = you.depth()
: if you.in_branch("Lair") then
MONS:   yak, death yak, catoblepas
KMONS:  P = plant
KFEAT:  F = cache_of_fruit
:   d = d - 1
: else
TAGS:   no_pool_fixup
MONS:   death yak zombie, lich / revenant soulmonger
MONS:   ancient lich / dread lich / alderking
KMONS:  P = withered plant
KFEAT:  t = petrified_tree
:   decorative_floor(_G, 'F', "mourning vase")
: end
KITEM:  f = large rock q:1
: nsubst("2 = " .. d .. ":2 / *:.")
MAP
        .@@@.
      .........
    tt...P.P....tt
   tttttPPPPPPPtttt.
  .tt2fPP.1....t2tt...
 .PPttP..P.P.PP.ftP...
 .P....PPP...PPP.PP..@
..PP..PPPwww3.P..PPP.@
......1.wwwwww.1.ttP.@
.@.PP..Pwwwwww...fttt.
 @..P..PP.wwwPP.ttttt
  @.PP.PPP..PP..PPttt
  ...Ptt.P.PPPPPP....
  ...ttf2ttPP.......
    .tttttt......@
     ..tt.......
        .....
ENDMAP

# Snail & Pal
NAME:   pf_torpor_hydra
TAGS:   no_monster_gen no_item_gen
DEPTH:  Lair:3-, !Lair:$
MONS:   torpor snail, hydra
# A decent item visible from the door, a superb item not visible,
# and a couple of floor items anywhere
NSUBST: . = * / ., - = | / ., . = 2=% / .
MAP
x xx  x
 xxxxxx x
xx.2..xxx
x--x1..=xx
x------x@x
xx--x-xx
 xxxxxx
   x  x
ENDMAP

NAME:    hangedman_lair_generics_rect
TAGS:    no_monster_gen
MONS:    plant / fungus w:6
SHUFFLE: yY / yY / Yy
SUBST:   y = ., Yz = xxxx1., Z = xx`, W : WV
NSUBST:  ' = 2:c / 2:. / * = c+...., V = 1:V / *:.
CLEAR:   `
: decorative_floor(_G, 'V', "broken floral vase")
MAP
.............xZZ
.c'c'c'c'c'cxxxZZ
.'...........zxxZ
.c..0.....0..zxxx
.'...Wxxxx...xx%x
.c...xxxxx...x9.x
.'...xxxxW..xx.9x
.c..0......Y.x..x
.x........x.y.xxx
xxzzzzzzxxxx..%xx
Zxxxxxxxx9..x%0xx
ZZxxxxxx%.9.xxxzx
 ZZZZZxxxxxxxxxxx
ENDMAP

NAME:    cheibrodos_lair_reptile_den
TAGS:    no_item_gen no_monster_gen transparent
DEPTH:   Lair, !Lair:$
MONS:    adder / water moccasin, komodo dragon / black mamba / mountainshell w:2
KMONS:   P = plant / fungus w:5
SHUFFLE: "', ABC
SUBST:   A = ., BC = x, D = x .:2
NSUBST:  " = 7:1 / *:., ' = 2:2 / *:.
NSUBST:  - = 6:P / *:., ; = 5:P / *:.
MAP
  ...........
 ..DDDDCDDDD..
..DxxxxCxxxxD..
.Dxxx"""""xxxD.
.Dxx";;;;;"xAD.
.Ax";;;;;;;"xA.
.DA";;---;;"xD.
.Dx";;-(-;;"xD.
.Dx";;---;;"xD.
.Dx";;;;;;;"xD.
.Dxx";;;;;"BBD.
.Dxxx"""""BBBB.
..DxxxAxxxBBB..
 ..DDADDDDDB..
  ...........
ENDMAP

NAME:    minmay_guarded_unrand_snakebite
TAGS:    ruin
ORIENT:  southeast
KMONS:   A = adder
KMONS:   B = water moccasin
KMONS:   C = black mamba
KITEM:   d = serpent talisman randart, snakebite no_pickup
SUBST:   1 = A B:2 .:48, 2 = A B:5 .:60, 3 = A B C:2 .:88, 4 = A:2 B C:4 .:64
SUBST:   5 = A:1 B C .:84, 6 = B:5 C .:60, 7 = B.
FTILE:   .dABCx = floor_sprouting_stone
MAP
xxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxx222xxxx
@11xxxxxx222xxx3xxx
xxx1xx112xxxxxxx3xx
xxxx11xxxxxxxxxx3xx
xxxxxxxxxxxxxxxx3xx
xxxxxxxxxx44xxx3xxx
xxxxxxx444xx433xxxx
xxxx554xxxxxxxxxxxx
xxx5xxxxxxxxxxxxxxx
xx5xxxxxxxxxxxxxxxx
xx5xxxxxxxxxx77xxxx
xxx5xxxxxxxx7xx7dxx
xxxx56xxx666xxxxxxx
xxxxxx666xxxxxxxxxx
xxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxx
ENDMAP

NAME:   cheibrodos_lair_lostbears
TAGS:   no_monster_gen transparent
MONS:   polar bear
KMONS:  p = plant
SUBST:  v = vvvvvpp..
NSUBST: - = 2:1 / 3=1., . = 4:p / 2=p.
MAP
       ....
      ..vv.
   ....vvv..
 ...vvvvvv..
..vvvvvvvvv..
.vvvv-.--vvv.
@...-.-.-...@
@....---.-..@
 ..vvvvvvvv..
  ..vvvvvv..
   ........
ENDMAP

NAME:   cheibrodos_lair_overgrown_chateau
TAGS:   no_item_gen no_monster_gen
DEPTH:  Lair:2-, !Lair:$
ORIENT: float
MONS:   water moccasin / black bear, hornet, yak, bullfrog / cane toad
MONS:   black mamba / komodo dragon / rime drake w:3 / raven w:3
MONS:   hydra / lindwurm / mountainshell w:3
KMONS:  PA = plant
KFEAT:  A = W
SUBST:  - = AAW, " = ccct, * = *%%.
NSUBST: ; = 1=1 / 1=1. / 1=5.. / *:.
NSUBST: ' = 3:P / 4=P. / 1:t / 4=t. / 2=1234 / 2=1234.... / 1:5 / *:.
NSUBST: p = 3=1234 / 1=5.. / *:., q = 2=1234 / *:., _ = 1=134.. / 1:3 / 1:4 / *:.
FTILE:  .123456+%*|VG( = floor_sprouting_squares / floor_sprouting_stone w:5
FTILE:  Pt = floor_sprouting_stone / floor_lair w:5
MAP
  cccccccccccttcccccccc
  c6...+.ppptttt.cPtttc
  c...."Ppppptt.....Ptc
  c*..t"Ppppppp.P...ttc
  c**tt"tppppppPPc..ttt
  cccc"cc++cm''PPcP..tt
`cc.(.P"''.'''''Pct.Ptt
`cG...."-''.'''''ctP.tc
`cP...-"W-''.''''ctt.tc
@+...-W"WW''.''''ttt.Pc
@+...WWmWW''V''''ttt.Pc
@+..q-W"WW''.''''ct...c
`c.qqq-"W-''.'''-cP...c
`ctqqqq"-'''.''-WcW...c
`cctqqt"'''''.'WWcWW..c
  cc++"""""tt__WccWW6.c
  c...."PP_____WWcWW..c
  c;;..+._____WWWcW..Pc
  cP;;.+.___-WWWWc**Ptc
  ctP;;cttt-WWWWGcG|ttc
  ccccccttccccccccccccc
ENDMAP

NAME: cheibrodos_lair_river_kwai
TAGS: no_item_gen no_monster_gen
ORIENT: northeast
KMONS: P = plant
MONS: bullfrog / cane toad, water moccasin / black mamba, hydra
FTILE: _ = floor_dirt
SUBST: P = ..P, p = P, - = .:1 x
NSUBST: " = 4:P / 3=P. / 2:. / 2=.W / *:W
NSUBST: ; = 3=12 / 2=12.. / 2:. / 2=.W / *:W
NSUBST: ` = 1:1 . 1:2 / 1=12.., ' = 1=|* / 1=*% / *:%
MAP
xxxxxxxxxxxxxxxxxxxxxxxx
xwwwwxxxxxxxxxxxxxxxxxxx
PwwwwPPP;-;;+;;+p"""""xx
PwwwwwPP;-;;-;;xp.""""xx
PwwwwwwP;-+---;x".""""xx
@PwwwwwPP;;;-;;x""."""xx
.PwwwwwwP``;-;;x"""..3xx
..Pwwwwww``;---xxxxxx.xx
..Pwwwwwww.P;;;;PPPx''xx
 ..Pwwwwww_wwwPPPPPx''xx
 @..Pwwwww_wwwwwwwwxxxxx
  ...Pwwww_wwwwwwwwwwwwx
   ...Pwww_wwwwwwwwwwwwx
    ...---`---wwwwwwwwwx
    ...-WW`WW-wwwwwwwwwx
    @..-````W-PPPwwwwwwx
     ..-````P-```PPPPPxx
     ..---+---........xx
      ....@.....@....@xx
                      xx
ENDMAP

NAME:    nzn_masters_of_martial_movement
TAGS:    no_pool_fixup no_monster_gen
KFEAT:   D = altar_wu_jian
KFEAT:   E = altar_uskayaw
MONS:    patrolling boulder beetle
SUBST:   W : W:50 w:40 l
MAP
 x...@...x
xxW.W.W.Wxx
.W.W.W.W.W.
@.W.D1E.W.@
.W.W.W.W.W.
xxW.W.W.Wxx
 x...@...x
ENDMAP

NAME:     nicolae_lair_grazing_beasts
TAGS:     no_pool_fixup patrolling transparent
KITEM:    H = % / * w:5
KMONS:    13 = plant
KMONS:    2 = bush
KMONS:    H = plant / nothing w:25
KMONS:    L = yak band w:25 / elephant band w:25 / death yak band / \
              catoblepas / dire elephant w:5 / dream sheep band w:5
KFEAT:    12 = W / .
SUBVAULT: Q : nico_grazesub
SUBVAULT: R : nico_grazesub
SUBVAULT: S : nico_grazesub
SUBVAULT: Z : nico_grazesub
NSUBST:   D = 2=W / wW / w, ' = 1=L
SUBST:    H = H ':15, ' = L:5 .:250 3:100, J = .:20 W:20 1:20 2w, w = wt
MAP
     .......
    ..J...J..
   ..QDDDDDR..
  ..QwQ'''RwR..
 ..QwQ'''''RwR..
..QwQ'''''''RwR..
.JwQ'''''''''RwJ.
.JwJ'''HHH'''JwJ.
.JwJ'''HHH'''JwJ.
.JwJ'''HHH'''JwJ.
.JwZ'''''''''SwJ.
..ZwZ'''''''SwS..
 ..ZwZ'''''SwS..
  ..ZwZJJJSwS..
   ..ZwwwwwS..
    ..JJJJJ..
     .......
ENDMAP

NAME:   nicolae_sub_lair_graze_edge
TAGS:   allow_dup nico_grazesub no_pool_fixup unrand
KMONS:  1 = plant
KMONS:  2 = bush
KFEAT:  12 = W / .
NSUBST: D = w / J, E = w / J, F = w / J, H = w / J
SUBST:  J = .:20 W:20 1:20 2w, w = wt
MAP
 D
D E
 E F
  F H
   H
ENDMAP

NAME:   nicolae_lair_lakeside_cave
TAGS:   no_pool_fixup transparent
KMONS:  1D = alligator w:15 / raven w:5 / fire crab w:5 / polar bear / \
             torpor snail w:5 / komodo dragon / hydra / mountainshell w:5
KMONS:  2E = hornet / hell rat / black mamba / cane toad / death yak / \
             elephant / steam dragon / rime drake / manticore
KMONS:  3F = basilisk / scorpion / wolf / wyvern / water moccasin / \
             black bear / yak / bullfrog
KMONS:  P = plant
KITEM:  DEF = % w:40 / * w:16 / | w:4 / $ w:20
SUBST:  K = xxw..., M = wW, N = WWwx, - = x-
NSUBST: p = 4:. / 1:3 / * = 2:5 3:80 .:400
NSUBST: q = 2 = 122223 / 4:. / * = 3 2:40 .:180, H = 1:F / * = D E:20 F:40
CLEAR:  -
MAP
                 @..Mw--
 -----------     ...Mww--
--xxxxxxxxxxx    ...Mwww--
-xxxKKKKKKKKxx    ...Mwwx-
-xxKKqqq.ppKKxx    ...Mwx-
-xKKqqqMMpppKxxxxxxxppMwx-
-xKqqqMMMMppppppxxppppMwx-
-xKqqMwwwwMMMppppppppMwwx-
-xKqMMwwwwwwwMMMppMMMwwwx-
-xKqMMwwwwwwwwwwMMwwwwwxx-
-xKqqMwwwwMxxxwwwwwwxxxx--
-xKqqqMMMM.+Pxxxxxxxxxxx-
-xKKqqqMM.1xP.HHHDxxxxx--
-xxKKqqq.1.xN.HHHDxxxx--
--xxKKKKKKxxNNNNxxxx---
 --xxxxxxxxxxxxxxx---
  -----------------
ENDMAP

NAME:   nicolae_lair_lil_pond
TAGS:   transparent ruin lairdec extra
NSUBST: D = 1:. / *:x
SUBST:  - = .W, c : cx
TILE:   c = wall_stone_puffball
MAP
............
....xxxx....
..DDDxxxxc..
..x------x..
.xx-wwww-xx.
.xx-wwww-xx.
.xx-wwww-xx.
.xx-wwww-xx.
..x------x..
..cxxxxxxc..
....xxxx....
............
ENDMAP

NAME:  nicolae_lair_lindhole
TAGS:  transparent
KMONS: 1 = lindwurm
SUBST: K = LLLL., L = lx, ~ = 1.., - = x_, % = %%%$*.
CLEAR: _
MAP
-----------
-KKKKKKKKKK
-K....~...@
-K.~.......
-L..LLLLLLL-
-L..Lxxxxxx-
-L..LLLLLLx-
-L.~...%%Lx-
-L....1%%Lx-
-LLLLLLLLLx-
-xxxxxxxxxx-
------------
ENDMAP

NAME:  nicolae_lair_liquid_snakes
TAGS:  no_pool_fixup transparent
KMONS: 1 = lava snake
KMONS: 2 = electric eel
ITEM:  eel talisman
KFEAT: 1 = l
KFEAT: 2 = w
SUBST: d : d.., L = ..D, M = ..E, - = xx_, D = 1 l:240, E = 2 w:240
CLEAR: _
MAP
        -----------
       --xxxxxxxxx--
--------xxDDD1DDDxx-
xxxxxxxxxDDLLLLLDDxx
xDDDDxxxDDLL...LLDDx
x.LLDDxDDLLd....LL.x
@..LLD1DLL.MMMMM...@
@...LLLLL.MME2EMM..@
x.MM....dMMEExEEMM.x
xEEMM...MMEExxxEEEEx
xxEEMMMMMEExxxxxxxxx
-xxEEE2EEExx--------
--xxxxxxxxx--
 -----------
ENDMAP

NAME:   nicolae_lair_run_with_the_wolves
TAGS:   ruin transparent
KMONS:  1 = wolf spider
KMONS:  2 = wolf band
ITEM:   lupine talisman / lupine talisman randart w:1
NSUBST: D = 1 / 12 / 2
SUBST:  d = d..
MAP
         xxxxx
      xxxxxxxxxxx
   xxxxxxx...xxxxxxx
xxxxxxxx.......xxxxxxxx
...........D...........
@..........D..........@
...........D...........
xxxxxxxx.......xxxxxxxx
   xxxxxxx.d.xxxxxxx
      xxxxxxxxxxx
         xxxxx
ENDMAP

NAME:   nicolae_lair_time_for_slime
TAGS:   transparent patrolling
DEPTH:  Lair:4-
KMONS:  1 = slime creature
KMONS:  2 = azure jelly / void ooze
KMONS:  3 = jelly
# Places 2-6 slime creatures, 1 azure jelly or void ooze, and
# 3-5 jellies.
NSUBST: p = 1 / 3 / s, q = 1 / 3 / s, s = 4=1.. / 1=2 / 2=3. / .
SUBST:  ' = `:40 %, ` = x..., - = x__
CLEAR: _
MAP
  -------x.@.x-------
 --xxxxxxx`.`xxxxxxx--
--xx'''xxx`.`xxx'''xx--
-xx'.p.'x`...`x'.q.'xx-
-x'.ppp```...```qqs.'x-
-x'ppppp...3...qqqqq'x-
-x'.ppp`````````qqq.'x-
-xx'.p.'xxxxxxx'.q.'xx-
--xx'''xxxxxxxxx'''xx-
 --xxxxxxxxxxxxxxxxx--
  -------------------
ENDMAP

# Dead by dawn!
NAME:    pdpol_lair_cabin_in_the_woods
TAGS:    no_item_gen no_monster_gen
# The last survivor
KMONS:   1 = human ; war axe ego:heavy good_item \
                       | war axe ego:flaming good_item \
                   . leather armour good_item | ring mail good_item \
                       | scale mail good_item
# Trying to get some good horror move trope representation
KMONS:   2 = Rupert / reaper / vampire mage / phantasmal warrior / \
             tentacled starspawn, \
             reaper / vampire mage / phantasmal warrior / tentacled starspawn
NSUBST:  a = a / c, p = p / c, q = q / c
NSUBST:  r = r / c, s = s / c, u = u / c
# These are distinct to preserve 'a' for the rune door.
SHUFFLE: Er / ?u, Daqp / ?sur
NSUBST:  D = 2 / | / S / `, E = 1 / *%% / S / `, ? = 1:B / *:?
NSUBST:  T = 2=009 / * = .ttt
NSUBST:  aq = 1:= / c, p = +
SHUFFLE: rsu
NSUBST:  r = + / c, s = + / c
SUBST:   u = c, " = `.., `? = `''', _ = t_
KPROP:   ` = bloody
FTILE:   ='`12%*|BS+ = floor_sprouting_stone
MARKER:  F = lua:fog_machine { cloud_type = "thin mist", pow_min = 1, \
         pow_max = 3, delay = 10, start_clouds = 1, size_min = 2, \
         size_max = 3, spread_rate = 33 }
KITEM:   S = human skeleton
CLEAR:   _
: decorative_floor(_G, 'B', "broken floral vase")
MAP
   _____________________
   @ttttttttttttttttttttt_
 @..ttttTttttttttttttttttt_
 tTt.tt..ccccccccccccccctt_
ttt.tTt..cDDDDDq``rEEEEctt_
ttTt.TtF.cDDDDDq``rEEEEctt_
ttt.ttt..caaaaac``rEEEEctt_
ttTt..t."n`````p``cssssctt_
tTt..T'T"+`````p``u????ctt_
tt.ttt.F"n`````p``u????ctt_
ttT.tt...c`````p``u????ctt_
 tTt.tt..ccccccccccccccctt_
 @..ttttTttttttttttttttttt_
   @ttttttttttttttttttttt_
   ________________________
ENDMAP

NAME:   pdpol_lair_cavern_descent
TAGS:   no_pool_fixup
KITEM:  * = *
KMONS:  1 = water moccasin / black bear / wolf / wyvern / hornet
KMONS:  2 = electric eel
KMONS:  3 = cane toad / black mamba / komodo dragon / polar bear
KMONS:  4 = hydra / boulder beetle / rime drake /  mountainshell w:2
KMONS:  5 = basilisk / torpor snail w:5 / manticore w:2
KFEAT:  5* = W
KFEAT:  2 = w
SUBST:  u = wW
NSUBST: ' = 2:1 / 2=1. / 1:3 / 2=3. / 1:4 / 1:4. / *:.
NSUBST: W = 5 / 2=5W / W
NSUBST: w = 2 / 2=2ww / w
MAP
   xxxxxxxxx
  xx'''x'''xx
 xx''x'''x''xx
 x''xxw'wxx''x
xx'xxwwwwwx''x
x''xwwuwuw'''x
xx'xwwuWWwxx'x
 x'''wwuWWx''x
xx..wwwuWW%%xx
x..xxwwW**Wxx
xx..xxxW**xx
 x....xxxxx
 xxxx@@x
ENDMAP

###############################################################################
# <<5>> Small Lair ending vaults.
# If it's possible, the placement of one of these Lair ends vaults means Crawl
# tries to place a second small Lair end vault. Currently, there are five.
###############################################################################

default-depth:

# At some point long ago, this vault used to be about worms and slugs.
# As standards changed, it is now left with snails and wyrms. Oh well.
NAME:    wormcave
TAGS:    no_wall_fixup no_monster_gen no_rotate
PLACE:   Lair:$
ORIENT:  southeast
MONS:    torpor snail, tyrant leech, lindwurm, hornet
MONS:    patrolling fire dragon / patrolling ice dragon
KMONS:   p = plant
ITEM:    dragon-coil talisman
SHUFFLE: ABC, GU, HhIi5 / JjKk6
NSUBST:  1 = 1:1 / *:., 4 = 3:4 / *:.
NSUBST:  A = 3:4 / 1:23 / * = ....4
NSUBST:  B = 2:2 / 1:1 / * = ....4
NSUBST:  C = 1:1 / 1:2 / 1:3 / *:., $ = 1 = d $:70 / 1:R / *:$
SUBST:   Hi = -, h6 = $, I = p, JjK = x, k = c
SUBST:   0 = 1, P = pp-, X = x., z = x'
CLEAR:   '
NSUBST:  " = 1:x / *:p
KMASK:   -$d5 = no_trap_gen
: lair_small_ending(_G)
MAP
               zxxzzxxxzzxxxxxzzxx
             zzxxxxxxxxxxxxxxxxxxxx
           zzxxxxxxxxxxxxxXAxJJxxxxx
          zxxxxXXBBXxxxxxA*..xxJxxxxx
@.......@xxxxxP4B.1BXxxxXAA.%XxxJJJjxx
..PP.XX.Px..xxXB....Bxxx4AA..xxxxxxKxx
..PP.XX.PPxxxxx%...*XxxxxX.p..xxxKKxxx
........PPP.xxPpp.XPxxxxxxxxP.Xckkxxxx
..XxX.X......xxXp..xXxxxxXx...xc$ccxxx
Pxxxx.x...x.Xxxxx...x.xxxx...Gcc6$ccxx
zxxxxx..X..xxxxxXx...xXxx...xxc$$$$cxx
zxxxxxxxPPxxxxxxxxx.P..X.0.xXxc$$5$cxx
xxxxxxxX..XxxxxxXx......4xxxxxc$$$$cxx
xxxxxx...xxxxxxXx....P.xXxxCCUcc$$icxx
xxxxx...xxxxxxXx....XxxXxxCCC*xc$cixxx
xxxx...xxXxxxX.....xxxxxxx4C..1cccIxxx
xxxxxX.0.xxxx....x..xxxxxxxx..xHxxIxxx
xxxxxxX...xX...Xxx....pxxxX..%xHxxIxxx
 xxxxxxx.....Xxxxxx..........xxHxHhxxx
  xxxxxXxx.p.Xxxxxxxxxx....xxXxxHxxxxx
   xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
    xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
ENDMAP

# Dogs by themselves get repetitive, so do bears. What if we combine them?...
# Previously "kennels" and "bearwithus", both by due.
NAME:    hangedman_lair_caniforms_friends
TAGS:    no_monster_gen no_rotate patrolling
PLACE:   Lair:$
ORIENT:  southwest
MONS:    wolf, warg, hell hound, raiju
MONS:    black bear, polar bear
KMONS:   8 = hell hog
KMONS:   P = plant
# The one big reward and the several smaller stacks of items
# are randomly split between the mostly-dog and mostly-bear sections.
KITEM:   % = any, any
KITEM:   *| = gold, gold, gold, any good_item
KITEM:   ? = lupine talisman
NSUBST:  2 = 3:22334 / *:3, 8 = 1:8 / *:.
SHUFFLE: %'*" / %'"|
SUBST:   X = xx., z = xx`, ' = ., " = x, p = PP., ? = ? .:70
SUBST:   H = 3:3 4:1, 0 = 2
CLEAR:   `
: lair_small_ending(_G)
MAP
xxxxxxxxxxxxxxxxxxxxzzz  @  @  @
xxxxxxxxxxxxxxxxxxxxxxxxxp..p..
xxxxxxxxxxxxxxxxxxxxxxxxxxp..p.
xxxxxxXxxxxxxxxxxxxxxxxxxxx....
xx%'56xxxxXXxxxxxxxxxxxxxxxP..p@
xx6..56xXx55xPxxxxxxxxxx...xP..
xxx9..xxx%...xPxx1x.x.x..1..xP.
xxXx...xxx...Px5x.........0..xp@
xxxxxx8......Px........x...Xxxx
xxxxXH.xx5...xP5..x2..x.xxxxxxx
xxxxxx1Hxx.%XXxx..xxxxxxxxxxxxxz
xxxxx"x06.Hxxxxx..xx1x.xx2xxxxxz
xxxxXx....5XxxxX....x.x....xHxxz
xxxxx%....xxxxxxx.............xz
xxxxx5....5xXxxxxx............xz
xxxxXx5....6xxxxxxxx1x...x2x..xx
xxxxxxP6.%6xXxxxxxxxxxx.xxxxx..x
xxxxxPxPxPxxxxxxxxxxxxxxxxxxx.Xx
xxxxxx6x6xxxxx1'xxxxxx2.x2x...xx
xxxxx...xxxxxx..xHx1x.........xz
xx*x1.?...'xx1.....x.........xxz
xxx0.9......x.......8........xxx
xxH.%.1.xx....xx.....xx.1.2xxxxx
xxx2R0'xxxX..xxX2...xHxX1x1xxxxx
xxx.H.xxxxxx.xxxx'.xxxxxxxxxxxxx
xxx'.%xxxxxxxxxxxx2xxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
ENDMAP

# One of the three dragon's lair end vaults,
# and the most dragon-focused of them.
NAME:    guppyfry_lair_end_dragon
TAGS:    patrolling no_monster_gen no_pool_fixup
PLACE:   Lair:$
ORIENT:  southeast
MONS:    rime drake w:12 / swamp drake / acid dragon / steam dragon
MONS:    basilisk / komodo dragon, iguana
MONS:    fire dragon / ice dragon, swamp dragon
KMONS:   P = plant
ITEM:    dragon-coil talisman
SUBST:   - = wwWW....%Ptt233, W = WWW., ? = 12**, d = d .:70
SHUFFLE: 45
: lair_small_ending(_G)
MAP
@..@..@..xxxxxxxxxxxxxxxxx
xPWW-P.xxxxttttttttttxxxxx
xttWW-ttttttttPWW-R.ttxxxx
xtttW-tt.tttt-WwwWP.1ttxxx
xtttWWtt...t--WwwwW-1tttxx
xtt1Wttt1.tt.WWttPWW.-tttx
xttWw-tP.t..Wttt--WWW.tttx
xxttWWt-1t..W--ttPWwwWttxx
xtt1-Wwttt.-wWtt.WwwwWttxx
xxtt--WttP.wWtttWwwwwWtttx
xttP.tWWttwWPtt.WWWwwWttxx
xttt.ttWww-.ttttPWwwwWtttx
xxttP.P-W-.tt%?$.WwwW.ttxx
xxtt...PWWttt4%.WwwW.ttxxx
xxttt.t.-Wtt***dWwwW.ttxxx
xttttt..Wwttt5%..WW.tttxxx
xxxxtt..-WWtt%?$.WwWW.ttxx
xxxxxtt..-WWtttPWWwW..ttxx
xxxxxxtt..PWWttWWwW.tttxxx
xxxxxxxttt1.WWttWW..ttxxxx
xxxxxxxxttt1WwwwWP-ttxxxxx
xxxxxxxxxtt.-WwW..ttttxxxx
xxxxxxxxxttttWW-.tttxxxxxx
xxxxxxxxxxtttttttttxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxx
ENDMAP

# All-natural Lair spawns, in a condensed display.
NAME:    hangedman_lair_in_review
TAGS:    no_monster_gen no_item_gen patrolling
ORIENT:  float
PLACE:   Lair:$
# Compensate for the oblong floating status in the double vault set-up.
WEIGHT:  14
# Non-banded band monsters to highlight the vault, then
# four trio sets (mythological lizards, fast poison,
# duos of bovids / elephantae, fantasy hybrids), then bosses.
MONS:    wolf / blink frog / yak / hell rat w:2
MONS:    basilisk, rime drake, lindwurm
MONS:    wyvern, manticore, catoblepas
KMONS:   8 = water moccasin
KMONS:   9 : cane toad w:90 / hornet
KMONS:   0 : black mamba w:90 / wolf spider
KMONS:   A = elephant
KMONS:   B = death yak
KMONS:   C = dream sheep
KMONS:   D = hydra / torpor snail w:6 / dire elephant w:6 / mountainshell w:6
KMONS:   P = plant w:12 / fungus w:8
KITEM:   ? = rimehorn talisman randart
KITEM:   ~ = any good_item
SHUFFLE: 2d3e4f / 5g6h7i / 8j9k0l / AABBCC, $%*|
NSUBST:  J = 2:. / 1 = x:9 .:1 / *:x, K = 2:. / 1 = x:9 .:1 / *:x
NSUBST:  L = 2:. / 1 = x:9 .:1 / *:x
SUBST:   X = xx..., P = PP., defghijkl = ., E = 44700C, ? = ? .:70
: lair_small_ending(_G)
MAP
     xxx  xx  xxxx   xxxx  xx  xxx
     xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
    xxxxx.P.xxxxxxxxxxxxxxx.P.xxxxx
  xxxXXP.....PXXxxxxxxxXXP.....PXXxxx
 xxxXX.........XXxxxxxXX.........XXxxx
 xXX....xJxJx....XxxxX....xLxLx....XXx
xxX.....x...J.....XxX.....L...x.....Xxx
xxX....Xxdgjx.X..PxxxP..X.xfilxX....Xxx
xxP.c..Xx258J...xxx~xxx...L470xX..c.Pxx
xxx...xxxxxxxx...K369K...xxxxxxxx...xxx
xx..c..1.ExxP..X.xehkx.X..Pxx.|...c..xx
xx........xx.....K.D.K.....xx*~$....xxx
@..x.....1xxX....xxxxx....Xxx.%.E..xxx
  x.......XxxXX.........XXxxX?R9D3xxx
   .xx...PxxxxXXP.....PXXxxxxP..6xxx
   @xxxxxxxxxxxxxx.P.xxxxxxxxxxxxxxx
       xxxxxxxxxxxxxxxxxxxxxxxxxxx
           xxx  xxx xxx  xxx
ENDMAP

# Some of the most famously dangerous Lair animals are small, fast, and
# incidentally poisonous. Let's try a different approach to frog_pond...
# Inspired by minmay_lair_venomous_thicket.
NAME:    hangedman_lair_tendril_chambers
PLACE:   Lair:$
ORIENT:  float
MONS:    water moccasin / wyvern, hornet w:19 / raven w:1, cane toad
MONS:    black mamba, redback, wolf spider, guardian serpent
KMONS:   f = fungus
KMONS:   P = plant
ITEM:    spider talisman
# Connect the endpoints of two random quarters, open one of them to the center,
# rarely fray walls not between chambers, fringe the openings with plants.
SHUFFLE: AB / CD / EF / GH, DFH
SUBST:   P = P:35 @:25, z = x:49 f:1, BCDEG = x, AH = `, F : xxP
# A fixed number of chaff scattered throughout each eighth, and an even
# distribution of the various stronger spawns.
NSUBST:  1 = 6:1 / 4 = 11. / *:., 0 = 8:1 / 6 = 11. / 2:2 / *:.
NSUBST:  9 = 1:256 / 2:3 / 2:4 / * = 33445
NSUBST:  8 = 1:7 / 1:6 / 2 = 34 / * = 34 5:15 "
NSUBST:  ' = 1:R / *:"
NSUBST:  % = 10:% / 2 = %" / *:", $ = 1 = d $:70 / *:$, x = 8:c / * = x
KMASK:   %*'" = no_monster_gen
FTILE:   `6f = floor_sprouting_stone w:15 / floor_lair
FTILE:   '"7%* = floor_sprouting_squares w:15 / floor_lair
: lair_small_ending(_G)
MAP
      PPPcccxxcccPPP
   PPPP.cc%cccc%cc.PPPP
  zz....c8$%**%$8c....zz
 Pzc....cc8$**$8cc....czP
PP.xx....c8"''"8c....xx.PP
P...xx1.0cc""""cc0.1xx...P
P....xx1.0c8""8c0.1xx....P
x....1xx1.cc""cc.1xx1....x
xzx.0.1xx%%c""c%%xx1.0.xzx
P.xzx0.%BB9cffc9DD%.0xzx.P
 P..xzx%9AAxffxCC9%xzx..P
 P....xxxAA""""CCxxx....P
  ......xc0"ff"0xx......
  ......xx""ff""cx......
 P....xxxEE"00"GGxxx....P
 P..xzx%9EExccxGG9%xzx..P
P.xzx0.%FF%9xx9%HH%.0xzx.P
xzx.0.1xx.%xxxx%.xx1.0.xzx
x....1xx1.0x..x0.1xx1....x
P....xx1.0xx..xx0.1xx....P
P...xx1...z....z...1xx...P
PP.xx....xx....xx....xx.PP
 Pzc.....z......z.....czP
  zz....xx......xx....zz
   PPPP.z..P  P..z.PPPP
      PPcPP    PPcPP
ENDMAP

###############################################################################
# <<6>> Large (normal) Lair ending vaults.
###############################################################################

##############################################################################
# Vaguely Jungle Book (R. Kipling) inspired.
#
# This vault formerly released dire elephants from statues via a lua trigger
# after the anaconda died, which was spoilery. I've revised it to have a
# necromancy theme, with necromancers' Bind Soul being a somewhat analogous
# on-death effect compared to the old vault. -gammafunk
NAME:    due_jungle_book
TAGS:    no_pool_fixup no_wall_fixup no_monster_gen
PLACE:   Lair:$
ORIENT:  north
KMONS:   pq = withered plant
MONS:    yak draugr w:5 / elephant zombie w:15 / spectral elephant w:5 \
         / elephant simulacrum / spectral cane toad / cane toad simulacrum
MONS:    elephant, cane toad / death yak
MONS:    spectral death yak w:20 / death yak simulacrum w:20 \
         / elephant draugr / dire elephant zombie \
         / spectral dire elephant w:5 / dire elephant simulacrum w:5
MONS:    dire elephant, patrolling necromancer, obsidian statue
KMONS:   8 = raven
# The anaconda's name is Kaa.
KMONS:   R = spectral anaconda
# A necromancy-themed loot item behind the obsidian statue.
ITEM:    rapier ego:pain w:5 / rapier ego:draining w:5 / \
         quick blade ego:pain w:5 / quick blade ego:draining w:5 / \
         demon blade ego:draining / skull of zonguldrok w:1 / \
         great sword ego:draining / triple sword ego:draining / \
         demon whip ego:pain w:5 / demon whip ego:draining w:5 / \
         eveningstar ego:draining / sceptre of torment w:1 / \
         great mace ego:draining / majin-bo w:1 / lajatang ego:draining / \
         broad axe ego:draining / battleaxe ego:draining / \
         executioner's axe ego:draining / shadow dragon scales / \
         cigotuvi's embrace w:1 / amulet of regeneration randart / \
         ring of positive energy randart / staff of necromancy / \
         book of necromancy / book of death / book of unlife / \
         randbook owner:Kikubaaqudgha disc:necromancy / necronomicon w:1
ITEM:    sanguine talisman
KITEM:   & = |, earthy gem
KFEAT:   R = deep_water
KFEAT:   s = closed_clear_door
# Thin out elephant/dire elephant bands of central necromancers a bit.
SUBST:   e = e .:90, 2 = 2., 5 = 5.
# DE/FH/JK will always have a monster set, with one a guaranteed necromancer
# plus band, next a 50% chance to be a # necromancer band, 50% chance to be
# derived undead band, last guaranteed derived undead band. Necromancer band is
# 4 live monsters on average, mostly elephants, sometimes other beasts mixed
# in. Derived undead band is a stonger derived undead with 4 weaker ones on
# average.
SHUFFLE: DE / FH / JK
SUBST:   D = 6, E = 23...
SHUFFLE: FH / SZ
SUBST:   F = 6, H = 23..., JS = 4, KZ = 11...
# LM / NO / PQ each have 50% chance of being a derived undead band, 50% chance
# of nothing.
SHUFFLE: LM / NO / PQ
SHUFFLE: LM / SZ
SUBST:   L = 4, M = 11..., SZ = .
SHUFFLE: NO / SZ
SUBST:   N = 4, O = 11..., SZ = .
SHUFFLE: PQ / SZ
SUBST:   P = 4, Q = 11..., SZ = .
SUBST:   a = tttxxc, p = p-, q = q., r = xxx.., - = .:100 Z, Z = 12345
COLOUR:  t = brown
FTILE:   .@de$%*|Y+s12345678&nt = floor_sprouting_stone
TILE:    t = dngn_tree_dead
TILE:    G = dngn_statue_elephant
: set_feature_name("tree", "dead tree")
MAP
   xxxcccccccc
  xxttnGnGrrrcc
 xxttqqqMLM.qrcc
xxqtq..nMMM..qrcc                           ccccc
xx...qnGnG..r..rcccccccccccccccccccccccccccccaaGttq.
xq.qqtcccc++c++ccccccccccccccccccccccccccccaaaKKJttqq.
xt7ttccccG--c..OOGcc.WWccGqqqGccqqqccQQ.....qqGKKGttt.
ccsccccccp-pcq.OON+..WwW+.55%&cGe2..+QQQqqc.cq.Kaaatq.
ccdcccccc-c-ccccOGcqWwwR+.56**c|$22.cPqcccc---caaccc..
ccccccccc+cp--pccccqwwwwcG5qqGc*%22.cccc---pc+ccccccc.
ccccGEEqq.cccc---pcWWWWqccnnnccG62qqcp--pcccc.qqHHGcc.
xxxc*DE..qccccccc-cccWqcccGpGcccqqccc-cccccccq..HF*cc.
xxxcGEEqqqccttaccp-pcccccGpYpGccnncp-pccattccqqqHHGcc.
 xxcccccccctq..qccc-----------------cccq..qtcccccccc..
 .axacccatq..  .qtcccccccc+++cccccccctq.  .qqtcccatq.
 ..........     .........8@@@....a...@@     ........
ENDMAP

##############################################################################
# Standard occultist works do make demons out of distorted animals, after all.
#
NAME:    evil_forest
TAGS:    no_pool_fixup no_wall_fixup no_monster_gen no_rotate
PLACE:   Lair:$
ORIENT:  southeast
WEIGHT:  5
MONS:    rime drake / raven w:5, hydra w:15 / dire elephant
MONS:    arcanist / occultist
MONS:    red devil / ice devil w:15 / orange demon w:15
MONS:    hellwing / smoke demon, sun demon / sixfirhy / sin beast w:4
KMONS:   hH = hell hound
KMONS:   F = fungus
KITEM:   A = superb_item no_pickup, any good_item no_pickup \
             / no_pickup gold good_item w:15, % no_pickup \
             / nothing, % no_pickup / nothing
KITEM:   _ = earthy gem
KITEM:   ? = serpent talisman
KFEAT:   A = enter_hell
KFEAT:   _ = altar_makhleb
KFEAT:   z = stone_wall
KFEAT:   L = endless_lava
NSUBST:  1 = 3 = 11122 / * = 1h, 4 = 5:4 / 1:4H / *:H
SHUFFLE: gb
SUBST:   T = ttt., ? = ? `:70
KPROP:   `? = bloody
KMASK:   '"`456H = no_item_gen
FTILE:   `+gG = floor_sprouting_stone
FTILE:   "_A456H = floor_cage
COLOUR:  "456H = red
TILE:    b = bedevilled_crystal_gehenna
TILE:    z = wall_stone_scorched
: vault_metal_statue_setup(_G, "g", "dimensional conduit")
: set_feature_name("crystal_wall", "bedevilled crystal wall")
MAP
  ...TTTT....  .............................
 ..TttttttT.......Tt.TtT....TT..TT......Tt....
..TtttttttttT..TTtttttttT..TttttttTT..TTtttT...
..Tttttttttttt0ttttttttttttttttttttttttttttttT..
.Tttttttttttttt.ttttttttttttttttT.Ttttttttttttttt
..Ttttttttttttt.tttttttttttttttT.1.Tttttttttttttttxx
.....ttttttttt..tttttttttttttttT....ttttttttttttttxx
..Ttt0.tttttt....ttttttttttttttt..Tt..ttttttttttttxx
..Ttttt.......t.0.tttttttttttt...ttttt.0ttttttttttxx
..ttttttt..0tttt.t..ttttttttt.0.tttttttt..ttttttttxx
.Tttttttttttttt..ttt...ttt....ttttttttttT.1Tttttttxx
...Ttttttttttt..ttttt.......tttttttttttT....Ttttttxx
...tttttttttt.1ttttttt0ttFtttttttttcccccc++cccccccxx
..Tttttttttt..tttttttttttt+ccccccccc'''''''''''''zlL
..Ttttttttt.0t..ttttttttttc''''''''z'''G``?`G''''zlL
.Tttttttttt..tt..tttttttttc''G'g'''+'''''''''''''zlL
..Tttttttt..tttt.tttttttttc'''c'b''zzzzzzzzzzzzzzzlL
.Tttttttt..ttttt..ttttttttc''c'G'''z"""""""4lllllllL
..Ttttt.0ttttttt...tttttttc'''G'c''z""""""""44lllllL
....T..tttttttt....tttttttc''b'c'''+""""_""654AllllL
...T0tttttttttt*Q1ttttttttc'''g'G''z"""""4444llllllL
..Ttttttttttttttttttttttttc'''''''3z""""4llllllllllL
ttttttttttttttttttttttttttczzzzzzzzzzzzllllllllllllL
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxllllllllllllllllllL
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxLLLLLLLLLLLLLLLLLLL
ENDMAP

##############################################################################
# Frog pond.
#
NAME:    minmay_lair_end_frog_pond
TAGS:    no_monster_gen
PLACE:   Lair:$
ORIENT:  float
KMONS:   1 = bullfrog
KMONS:   2 = cane toad
KMONS:   3 = vampire mosquito
KMONS:   4 = blink frog
KMONS:   5 = komodo dragon / hydra
KMONS:   6 = tyrant leech / skyshark w:5
KMONS:   7 = electric eel
KMONS:   8 = goliath frog
KMONS:   p = plant
ITEM:    any good_item, wellspring talisman
KITEM:   R = earthy gem, %
KFEAT:   123678p = W
# Previously 11.6 bullfrogs, 16.6 cane toads,
# and 7.1 vampire mosquitoes on average.
NSUBST:  XW = 3:1 / 5:2 / 5:3 / 7 = 11WWW / 11 = 22WWW / 7 = 44WWW
NSUBST:  W = 3 = 678 / *:W, 5 = 1:5 / *:4W
NSUBST:  % = 1:d / 1:* / 1:R / 1 = e:20 %:70 *:35 |:35 / * = %%*|
SHUFFLE: AB, CD
SUBST:   AB = x, CD = w
SUBST:   X = x:80 W:15 .:10 p:10
SUBST:   W = W:80 w:25 p:10
SUBST:   . = .:85 W:20 p:10
KMASK:   d%*|R = no_monster_gen
MAP
          ............xxx
       .................xxx
   .........WWWWWW........xxxx
  .......WWWWWAWWWWWWWWW.......
 x.....WWWWWAAAWWWWWWWWWWW.....
 x...WWWWWWWWAAAWWWWWWWWWWW.....
 x..WWWWWWWWWWAAAAWWWWWWWWWW....
xxxxx..WWWWWWWAWWWWWWWWWWWWW....
x.XXxxxx..WWWWWWWWWWWWWDWWWWW...
x.WWXXXxxxxxxxpp4WWWWWWDWWWWW...
x.WWWWWXXXxxppppp5WWWWWDDWWWW...
..WWWWWWWW4pp%%%pp4WWWDDDDDWW...
..WWWWWWWW6pp%%%%pp6WWWWDDWWWW..
..WWWWCWWW4ppp%%%pp4WWWWWDWWWW..
.WWWWCCWWWW4ppppppxxXXWWWWWWWW..
.WWCCCCCWWWW5WppxxxxxxXXXWWWWW.x
.WWWCCWWWWWWWWWWWWW..xxxxXXXWW.x
.WWWCWWWWWWWWWBWWWWWWW..xxxxXX.x
..WWCWWWWWWBBBBWWWWWWWWWWWWxxxxx
..WWWWWWWWWWWBBBWWWWWWWWWWW...x
...WWWWWWWWWWWBBBWWWWWWWW.....x
....WWWWWWWWWWBWWWWWWWW.......x
 .....WWWWWWWWWWWWWW.........
  xxx......WWWWWW.........
    xxxxx..............
        xxxx.......
ENDMAP

##############################################################################
# A mock-up of Forest, made well before serious attempts at the branch.
#
NAME:   minmay_lair_end_enchanted_forest
PLACE:  Lair:$
ORIENT: northwest
MONS:   black bear / polar bear w:12, wolf, dream sheep / hornet w:20
MONS:   spriggan, spriggan rider, boggart
KITEM:  * = gold no_pickup, star_item no_pickup, star_item no_pickup
KITEM:  | = gold no_pickup, superb_item no_pickup, star_item no_pickup
KITEM:  $ = gold no_pickup, star_item no_pickup
KITEM:  R = earthy gem
KITEM:  ? = riddle talisman
KFEAT:  C = cache_of_fruit
SUBST:  T : T:20 .:1 t:1, T = tt..., E = t_, C = C..
CLEAR:  _
NSUBST: . = 5:1 / 3 = 10 / 3:3 / 3 = 3.. / *:., ? = 1 = ? .:70 / *:.
NSUBST: 2 = 8:2 / 18 = 2. / *:., 4 = 6:4 / 6 = 4. / *:.
NSUBST: 5 = 1:5 / *:6, 9 = 2:6 / 2 = 56 / *:4
NSUBST: * = 1:| / *:*
FTILE:  .123456$*|?RCTGt = floor_grass_dark
MAP
ttttttttttttttttttttttttttttttttttttttttttttttttttt
tttttttttttttttttttttttttttttttttttttttttttttttttt
tttttttttT*G*Ttttttt....ttttttttt.....ttTTtttttTT
ttttttttt4.*.9TTT....Tt.5..TTT....ttT.2222TTtt..@
tttttttTT.4R4....TTttttttT..4...TttttttTT222..ttT
tttttT.....9..4TtttttttttT4...4ttttttttt22ttttttt
ttttT..ttT4C4?Tttttttt..T....4.tttttttt..tttttttE
tttt.ttttttttttttttttt......tt..TttT...TT.tttttt
tttT2tttttttttttttttttT....ttttt.....ttttT.Tttt
ttT22tttT?9TtttttttT....tTTttttttTTttttttt..ttE
tt22ttt$.4..tttttT5.TTT..tttttttttttttttttt.tt
tt22tttT9.4.ttttT.TttttT.22tttttttttttttttT.tt
tt2tttttt..TtttT2TtttttttT22TttttttttttttT.ttt
tt2ttttttt.TtTT22tttttttttT222ttttttttttt.Tttt
tt..tttttTT..222Ttttttttttttt22ttTTTTtt..TtttE
ttT.tttt.....TTT222TttttttttttT...TT...TttttE
ttt..tt...TTttttttt..TTttttttttT..4...Tttttt
tttT....TtttttttttttT@   EEttttt49?49ttttttE
ttttT..tttttttttttttE      EEttttTC$TttttE
ttttT..TtttttttttttE          ttttttttt
ttttt...ttttttttttE            ttttttt
tttttT..TttttttE                 EEE
ttttttt'@ttE
ttttttE
tttE
tE
t
ENDMAP

##############################################################################
# Catoblepas ending by evilmike.
# Contains 3 catoblepas, with one being semi-randomly placed. The last
# one is likely to breathe on you in an area that is hard to escape from.
#
NAME:   evilmike_catoblepas_cave
TAGS:   no_monster_gen no_rotate no_item_gen
PLACE:  Lair:$
ORIENT: northwest
ITEM:   any good_item, medusa talisman randart / granite talisman
KITEM:  R = earthy gem
MONS:   yak, death yak, manticore
KMONS:  4C = patrolling catoblepas
KMONS:  P = withered plant
KMONS:  f = petrified flower
SUBST:  P = P., f = f., e = e -:70
NSUBST: 0 = 3:1 / 1:2 / * = 1112
NSUBST: 9 = 1:C / 2:2 / 3:3 / * = 11222
COLOUR: d|*$4c-R = lightgrey
FTILE:  d|*$4c-R = floor_cobble_blood
MAP
xxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxcccxxxxxxxxxxxxxxxxx
xxxxccc*cccxxxxxxxxxxxxxxxx
xxxxcd|$$4cxxxxxxxxxxxxxxxx
xxxxcc$R--ccxxxxxxxxxxxxxxxxxx
xxxxxcce---ccxxx%PxxPxxxxxxxxxxx
xxxxxxccc---cxxf......Pxxxxxxxxxxx
xxxxxxxxcc-ccxf.9.0.x...xxxxxxxxxxx
xxxxxxxxxc-cxx.0.9.xxxP..xxxxPP.%xxxx
xxxxxxxxxc-cxxP...xxxxx...xxxx0.9xxxx
xxxxxxxxxx.cxxxx..xxxxxxx...xx.1.0xxx
xxxxxxxxxx.xxxxxx...xxxxxxx.....9xxxx
xxxxxxxxxx.xxxxxxxx..xxxxxx...xxPPxxx
xxxxxxx.....xxxxxxx..Pxxxx..xxxxxxxxxx
xxxxxx90.x..xxxxxxP..xxxx..xxxxcccxxxx
xxxxxx0xxxx..xxxxxx..Pxxx.xxxccc4ccxxx
xxxxxxxxxx..xxxxxx0.......xxcc----ccxx
xxxxxxxxxf..Pxxxx01xxxP...Pcc------cxx
xxxxxxxxx.....xx..xxxxxxP..c------ccx
xxxxxxxxP.G.G.....xxxxxxx..---cc--cxx
xxx%xxx..G.P9.G.xxxxxxxxxxx-ccc---cxx
x%f9fxx..9..G....xxxxxxxxxxxxc---ccxx
xx0..1....f0.G..fPxxxxxxPPxxx...xxxx
xxxf1...xxxf..PxxxxxxxxxxP9....xxxxx
xxxxxPPxxxxxxxxxxxxxxxxxxx......xxx
xxxxxxxxxxxxxxxxxxxxxxxx......G...
xxxxxxxxxxxxxxxxxxxxxx....G.......
xxxxxxxxxxxxxxxx     ........G....
xxxxxxxxx             ..G........
xxx                   .........G.
x                           .....
ENDMAP

##############################################################################
# The beastmaster's lair.
# Inspired by discussions of deep troll professionals and the prospect of a
# "beastmaster"; here he lives, with packs of beasts and one powerful
# personal pet.
#
# On his own the boss shouldn't be *extremely* threatening - it's his pet
# and the inner welcoming party that add enough danger that this ending
# stands on its own.
#
NAME:    grunt_lair_end_beastmaster
TAGS:    no_monster_gen no_item_gen no_trap_gen patrolling
PLACE:   Lair:$
ORIENT:  northeast
MONS:    deep troll shaman, dire elephant / hydra / lindwurm
MONS:    catoblepas / mountainshell w:2, death yak band
MONS:    elephant, wolf, black bear / polar bear
KMONS:   P = plant / fungus w:2 / bush w:1
: kitem("d = " .. vault_species_skeletons(_G, "dungeon"))
KITEM:   e = hive talisman
KITEM:   R = earthy gem
SHUFFLE: 567
SUBST:   C = cx'', P = P .:9 t:1
NSUBST:  % = 2:| / 3:* / 1 = e %:90 / *:%
NSUBST:  5 = 3:5 / 3 = 5. / *:., 6 = 3:6 / 4 = 6. / *:., 7 = 2:7 / 2 = 7. / *:.
FTILE:   '34d = floor_sprouting_stone / floor_sprouting_squares w:5 / floor_lair
FTILE:   12e%*|G = floor_sprouting_squares
MAP
                xxxxxxxxxxxxxx
          xxxxxxx5P.Pxxxxxxxxx
         xxP..5.5..P..xxxxxxxx
        xxP5d5.5.5P.P..xxP.xxx
       xx.5.5.5ccccccc....P..x
       x...5.ccc'd'''ccc.P..xx
      xx.P.ccc''d''''''d...Px
     xx..ccc'''G''C''3''d..xx
    xx..ccc'G''''CcC''4''c.x
    x.P.ccc''d''CcCcC'''cc.x
    x..ccc%'G''GRCcC'''ccP.x
   xx..ccc%%'2'dG'C''d'c...x
   x...cccc%%'1'''''G'ccP..x
   x.P.ccccc%%'Gd'G'''c..P.x
  xx....ccccc%%'''''ccc...xx
 xx.d..Pccccccc%cccccP.6..x
xx.P..7..cccccccc.P.6.6.Pxx
..7..7.7P..ccP..P6.6d6.Pxx
.P.7..7..d....P...6.6.xxx
d.P.7P..P.xxxx.P..P6.xx
.P.7..7..xx  xxx.P..xx
..P.P..xxx     xxxxxx
.P.P..xx
..P.dxx
@....x
ENDMAP

###############################################################################
# An ancient temple flooded with waters brought forth by a mystic avatar.
#
NAME:    gammafunk_lair_ancient_temple
TAGS:    no_pool_fixup no_monster_gen
PLACE:   Lair:$
ORIENT:  float
KITEM:   % = any
KITEM:   * = star_item
KITEM:   | = superb_item
: kitem("d = " .. dgn.loot_potions)
KITEM:   e = throwing net q:3 / rapier good_item / captain's cutlass w:2 / \
             trident randart w:8 / trident of the octopus king w:2 / \
             partisan good_item w:2 / demon trident w:5 / phial of floods / \
             ring of the octopus king w:2, / \
             fortress talisman / nothing w:70, earthy gem
KMONS:   p = plant
KMONS:   1 = hornet / wyvern / blink frog / cane toad / steam dragon
KMONS:   2 = elephant / komodo dragon / polar bear / rime drake
KMONS:   3 = snapping turtle / sea snake / manticore / wind drake / harpy / \
             skyshark
KMONS:   4 = dire elephant / hydra / torpor snail
KMONS:   5 = patrolling merfolk avatar
KFEAT:   p12345de%*| = W
NSUBST:  % = 2=d / 2=d% / 1:e / %%*|
# Open up squares on the fixed portions of the temple walls, on the outer
# columns, and in the inner room.
SUBST:   c = c:20 .:1 W:1, a = ccc-, q = cccc'
# Each wall has a 50% chance of being broken open
SHUFFLE: DEFHJ / uuyzz
SUBST:   u = -, y = c, z = '
SHUFFLE: KLMNO / uuyzz
SUBST:   u = -, y = c, z = '
SHUFFLE: PQRSZ / uuyzz
SUBST:   u = -, y = c, z = '
# For broken wall areas, put four wall squares in the area, spread out in a way
# that prevents clumping. Also put some dry floor in these areas.
SHUFFLE: DE, HJ, KL, NO, PQ, SZ
NSUBST:  DFH = 4=c, DEF = 2=. / 2=.- / -, HJ = 2=. / 2=.' / '
NSUBST:  KMN = 4=c, KLM = 2=. / 2=.- / -, NO = 2=. / 2=.' / '
NSUBST:  PRS = 4=c, PQR = 2=. / 2=.- / -, SZ = 2=. / 2=.' / '
# Monsters of each tier are distributed across outer and inner portions.
NSUBST:  - = 12=1W / 8=2W / 4=3W / 2=4WWW / W, ' = 4=2W / 8=3W / 5 / W
# Ruin statues, possibly place inner chamber doors. Also replace some shallow
# water with floor and some with plants throughout the map.
SUBST:   G = GGGW., + : +.W, W = W:125 .:10 p:10, " = W.
FTILE:   .'TU = floor_sprouting_squares
COLOUR:  c = white
MAP
""""""""""""""""""""""""
"aa--aa--aa--aa--aa--aa"
"aa--aa--aa--aa--aa--aa"
"----------------------"
"----aa---a--a---aa----"
"aa--c------------c--aa"
"aa--c---LKLKLK---c--aa"
"----cG--KLKLKL--Gc----"
"----cccccMMMMccccc----"
"aa--cU''ONONON''Uc--aa"
"aa--c'''GONONG'''c--aa"
"--EDcHJ'qqqqqq'SZcPQ--"
"--DEFJH'q%%%%q'ZSRQP--"
"a-EDFHJ'q%ww%q'SZRPQ-a"
"a-DEFJH'q%ww%q'ZSRQP-a"
"--EDFHJ'q%%%%q'SZRPQ--"
"--DEcJH'qq++qq'ZScQP--"
"aa--c'''G''''G'''c--aa"
"aa--cU''''''''''Uc--aa"
"----ccccc----ccccc----"
"----cG----------Gc----"
"aa--c-a-a-GG-a-a-c--aa"
"aa--c------------c--aa"
"----aa-aaa--aaa-aa----"
"----------------------"
"aa--aa--aa--aa--aa--aa"
"aa--aa--aa--aa--aa--aa"
""""""""""""""""""""""""
ENDMAP

###############################################################################
# A mini-volcano! No fire clouds and twice as many enemies, though.
#
# XXX: Other ends and earlier vaults already allow encountering a fire dragon
#      without a runed door, but this would be a bit meaner than those others
#      due to the glass and an inability to use regular doors. What to do...?
NAME:    cheibrodos_lair_end_hotspot
TAGS:    no_item_gen no_monster_gen
PLACE:   Lair:$
ORIENT:  float
MONS:    black mamba, steam dragon
MONS:    hell hound, molten gargoyle
MONS:    komodo dragon / wyvern w:7 / basilisk w:7 / hydra w:2
MONS:    lindwurm / fire crab w:3, fire dragon
KMONS:   8 = hell hog
KMONS:   Y = lava snake
KFEAT:   Y = lava
KITEM:   ? = scarab talisman randart
KITEM:   R = earthy gem, gold
# Generate one of two paths leading to central chamber
SHUFFLE: ABCD= / HIJKL
SUBST:   A = @, BH = x, CI = ., K = ", J = l, L = c
# Generate one of two perches for dangerous enemies
SHUFFLE: MN / OP
SUBST:   M = 6, N = ., OP = l
# Monster and loot placement
SHUFFLE: ';`, -~ / -~ / ~-
NSUBST:  ' = 3:3 / 2 = 3. / 1:5 / 2 = 15. / 1:2. / *:.
NSUBST:  ; = 3:5 / 3 = 15. / 1:2. / *:., ` = 3 = 5 / 3 = 15. / 1:2. / .
NSUBST:  - = 1:7 / *:", ~ = 2:8 / *:"
NSUBST:  D = 1:R / 1 = ? %:70 / 1:| / 1:* / 1 = *% / 2:% / 3 = $% / *:$
NSUBST:  G = 2:4 / 1:4. / *:G, l = 5:Y / l
KMASK:   "$%*|78 = no_trap_gen
FTILE:   ="$%*|78G = floor_sprouting_squares
FTILE:   .123456 = floor_sprouting_stone
TILE:    c = wall_stone_scorched
MAP
                xxxxxxx
             xxxxxxxxxxxxx
            xxxxxxxxxxxxxxx
           xxxxllxllxllxxxxxxx
         xxxxxxxlllllllllxxxxxxx
       xxxxxxxlllllxxx.llllxxxxxxxx
      xxxxlxxllxxxxxx'.'.lllGxxxxxxx
      xxxlllxllxGxGx'.'.'..llxxxlxxxx
       xxxxlxlxxx....'.'.xxxlllxllxxx
       xxxxlllxxG.'.'.'.'.Gxxllllxxxx
        xxxxlllxx'.'.'.'.'xxxxxlxxxx
        xxxxxllx'.'.'.'.'..Gxxxlxxxx
      xxxxxxxxll.x.'.'.'.'.xxxllxxxx
     xxxxxxxGxx..x'.'.'.'.xxlllllxxx
     xxxGxG.;x..xxxJJl..xxIllllllxxxx
   xxxxxx..;.;.lPllJJllxxlIIllxxllxxxx
  xxxxxx;.;.;.xllPlJJllxllIIllxxllxxxx
 xxxx....;.;.;llPccLLccllllIIxxxxxxxxx
 Ax.....;.;.xllPccDDDDccllxx'xxGxGxxx
 x.....;.;xxlllOcDDDDDDcllx'.'...xxxx
xAxxxx..;.;.;.lln"D--D"nlx`.`...xGxxx
 xxxxxx..;.;.;xln"----"nlN.`.`.`xxxx
   xxxxx;.;.;.xlcKK--KKcNl`.`.`.xxxx
   xxxxG...;.xxlccKKKKccNlx`.`.`xxxxx
    xxxx..;.BBlllcc==ccMllx.`.`..xxxxx
    xxxGxG.xxBBllllCCllllx.`.`.....xHx
     xxxxx;llBBxxllCCll.`.`.`.`.....x
     xxxxxlllxBx;.lCCl.`.`.`.`...xxxH
    xxxxxllllxx;.`..`.`.`.`.`.xxxxxxx
    xxxlllxllll.;.`..`.`.llllxxxxxxx
   xxxxllxxxxxllll.`..`llllxxxxxxx
   xxxllxxxxxxxlllll.`lllxxxxxxx
   xxxxxxxxxxxxxGxllllllllxxxxx
    xxxxxx  xxxxxxxGxGxxxllxxxx
              xxxxxxxxxxxllxxx
                 xxxxxxxxxxxx
                     xxxxxxx
ENDMAP

###############################################################################
# An abyssal version of the forest ending
# monster set drawn from weaker abyss spawns and lair branch abyssal visitors
NAME:    hellmonk_lair_end_abyssal_woods
PLACE:   Lair:$
ORIENT:  northwest
MONS:    blink frog / basilisk w:3, small abomination / brain worm w:2
MONS:    shapeshifter / chaos spawn / smoke demon / ynoxinul / neqoxec w:2
MONS:    raiju, ugly thing, thrashing horror / large abomination w:5
KMONS:   7 = spriggan ; rapier ego:distortion
KITEM:   O = spriggan skeleton / wolf skeleton w:3 /\
             polar bear skeleton w:2 / black bear skeleton w:2
KITEM:   R = earthy gem, %
KITEM:   ? = maw talisman
KFEAT:   u = demonic_tree
KFEAT:   N = enter_abyss
KFEAT:   _ = altar_lugonu
SUBST:   " = '.
COLOUR:  '%M = magenta
FTILE:   '%MN_u = floor_nerves_magenta
NSUBST:  %d = 1:R / 2:| / 3:* / *:%
NSUBST:  1 = 5:1 / 1.., 2 = 3:2 / 2:. / * = 2..
NSUBST:  4 = 4 / *:3, ' = 2:6 / 2 = 56 / 3:O / 5 = 5543O. / *:.
SUBST:   7M = 7O, ? = ? ':70
# 33% chance each for additional openings at the south or north east.
SHUFFLE: yzD / JKL / JKL
SUBST:   y = @, zD= ., JK = t, L = p
SHUFFLE: EFH / JKL / JKL
SUBST:   E = @, FH= ., JK = t, L = p
SUBST:   a = tt..., q = pp..., p = tttu, s = rr..., r = tu
{{
  -- Dense forest configurations make completely random colours a bit ugly,
  -- so instead try to use the paired tiles demonic trees already have.
  local cols = {"dngn_demonic_tree_1 / dngn_demonic_tree_16",
                "dngn_demonic_tree_2 / dngn_demonic_tree_3",
                "dngn_demonic_tree_4 / dngn_demonic_tree_5",
                "dngn_demonic_tree_6 / dngn_demonic_tree_7",
                "dngn_demonic_tree_8 / dngn_demonic_tree_9",
                "dngn_demonic_tree_10 / dngn_demonic_tree_11",
                "dngn_demonic_tree_12 / dngn_demonic_tree_13",
                "dngn_demonic_tree_14 / dngn_demonic_tree_15",}
  local col1 = util.random_from(cols)
  local col2 = col1
  while col2 == col1 do
    col2 = util.random_from(cols)
  end

  tile("u = " .. col1 .. " / " .. col2)
}}
MAP
ttttttttttttttttttttttttttttttttttttttttttttttttttt
tttttttttttttttttttttttttttttttpppppppppppttpppptt
ttttttttttttttttttttttttttttppppdd7..pp.2ppppFFFE
ttttttt..tttt.tttatttttttpppp22...pp.....222HHHFF
tttttta.aa..4....attttttppq......pppppp1....24ppt
ttttt.......O...tatttttpp1...11ppppppppp..ppppptt
tttt...tt..aa11atttttppp2.....1pppppqqp..rrtttttt
ttt...tttttttt1..ppppp..1111pp222pp......2rrtttt
ttt..ttttttttttt.2.pp.4.1pppppp2....qqrss..rrt
tta......tttttttt..q..1pppuuuupppp4ppprrrr12rtt
tt..t.....ttttttt...2qppuuuMNuuuupppttttrrs4rt
tt11ttt22...tttt..2pppppu%%''%%uuutttttrr..rrt
tt1attttt...ttt...ppppdpuu%''_''%utttttr..rrtt
ta1ttttttt2.tt...pppd54ppu%''''uurrrrrrrs..rtt
tt11ttttt....111qpppa.2ppuuuu''urr"".rr.41rrtt
tt..ttttttt.111....tt..qppttr'''''"s....ssrtt
ttt..tttttttttttpp...2..qpttrr''''sss.rrrrrt
ttta...atttttttttppDD..qpptttrrrr'""..rttttt
tttt..atttttttttppzzpppppttttttr''""rrrtt
tttta..attttttttpzzzttttttt   trrrrrrttt
ttttt...ttttttttppzy          tttttttt
ttttta...tttttttttt               ttt
ttttttt.@ttt
ttttttt
tttt
tt
t
ENDMAP
