##############################################################################
# mini_monsters.des: This is the place for minivaults with monsters.
#
# So all vaults in this file should have no ORIENT lines but they should
# contain MONS or KMONS lines.

# Additionally, maps that only place in one branch where that branch is not
# Dungeon or Depths should go in the corresponding branch DES file. Vaults with
# ORIENT lines are stored in float.des or large.des. Minivaults without
# monsters go to mini_features.des.
#
# Sections:
# <<1>> Invertebrae        (insects, spiders, worms)
# <<2>> Vertebrae          (mammals, reptiles, also serpents, dragons)
# <<3>> Humanoids          (including centaurs, spriggans)
# <<4>> Demons and undead
# <<5>> Fixed shooters     (statues, oklobs, fog generators)
# <<6>> Others             (slime denizens, insubstantial monsters)
# <<7>> Random             (using 8,9,0 or too many monsters to categorise)
# <<8>> Guardians          (thematic vaults centered around special items)
# <<9>> Manuals            (pre-lair vaults placing manuals with guardians)
# <<10>> Classics           (ancient minivaults and extensions)
#
# Often, a vault will fit in two categories. Choose the one you think fits
# best or else delegate to Random or Others. Be picky with Guardians, please.
###############################################################################

: crawl_require('dlua/vault.lua')

{{
-- Functionality for some Grunt vaults.
function grunt_ministairs_setup(e, hatches)
  e.tags("luniq_generic_threat_stair buniq_grunt_ministairs")
  if you.in_branch("Crypt") or you.in_branch("Zot") then
    e.shuffle("GT")
    if you.in_branch("Crypt") then
      e.subst("T = T V:20 Y:1")
      e.subst("x = c")
    end
  else
    e.shuffle("GTt")
    e.subst("T = T:20 V U:1")
    if you.in_branch("D") or you.in_branch("Depths") then
      init_hm_decor_walldepth(e, 'x')
    end
  end
  if hatches then
    e.shuffle("{[(<}])>")
  else
    e.shuffle("{[(}])")
  end
  e.subst("+ = +.")
  e.nsubst(". = 2 = 0:19 .:1 / *:.")
  e.kmons("0 = 0 band")
end

function random_stair(e, symbol)
  local valid;
  if you.depth() > 1 then
    valid = "([{"
  else
    -- should coincide with you.depth() ~= dgn.br_depth(you.branch())
    valid = ""
  end
  if you.depth() ~= dgn.br_depth(you.branch()) then
    valid = valid .. ")]}"
  end
  if valid == "" then
    valid = "." -- shouldn't happen outside validation/caching
  end
  e.subst(symbol .. " = " .. valid)
end
}}

default-depth: D:9-, Depths, Elf

###############################################################################
#
# <<1>> Invertebrae
#       Insects, spiders, worms
#
###############################################################################

NAME:    eino_jars
TAGS:    patrolling uniq_beehive transparent
DEPTH:   D:7-14
KMONS:   1 = killer bee
KMONS:   2 = meliai
KITEM:   1 = %
KITEM:   2 = *
KFEAT:   X = x
: if you.absdepth() < 12 then
NSUBST:  1 = 1:1 / * = 11.
: else
NSUBST:  1 = 1:2 / 2 = 21 / 1:. / * = 11.
: end
TILE:    X = wall_wax
: decorative_floor(_G, 'p', "flower patch")
MAP
 xxxxx
 x111x
 x1X1x.@.
 x+++x.x.
.....p.....
  .x.x+++x
  .@.x1X1x
     x111x
     xxxxx
ENDMAP

# Beehive which needs digging to access.
NAME:   hive_lemuel
TAGS:   no_trap_gen transparent no_descent
DEPTH:  D:9-, Spider
MONS:   killer bee, meliai, queen bee, hornet
KMASK:  1234*R = opaque
KMONS:  *R = ribbon worm
KITEM:  * = *
KITEM:  R = potion of ambrosia pre_id
SUBST:  ? : .w
SUBST:  * : *:20 R:3
# Since one has to dig the bees out, early meliai are fine.
: if not is_validating() then
:   if crawl.x_chance_in_y(15, 27) then
TAGS:   uniq_beehive
NSUBST: 1 = 1:3 / 1:1 / * = 1 x:2
:   else
TAGS:   uniq_hornetnest
SUBST:  1 : 4
:   end
: end
COLOUR: x = yellow
TILE:   x = wall_wax
MAP
  ????????
 ??????????
???xxxxxx???
??xmxxxxxx??
??xx1111xx??
??xx1**1xx??
??xx1**1xx??
??xx1111xx??
??xxxxxxmx??
???xxxxxx???
 ??????????
  ????????
ENDMAP

# Beehive minivault
NAME:   minivault_7
TAGS:   uniq_beehive patrolling transparent
DEPTH:  D:9-
MONS:   queen bee, meliai, killer bee
KITEM:  R = potion of ambrosia pre_id / nothing
COLOUR: x = yellow
TILE:   x = wall_wax
: if you.absdepth() < 12 then
SUBST:  2 = 3
: end
MAP
............
....xxxx....
..x3x3xxxx..
..xxRx3x2x..
.xx3xRx3xxx.
.x2xRx1xRx3.
.xx3xRxRx3x.
.xxx3x3x3xx.
..x3xRx3xx..
...xx2xx3x..
....xxxx....
............
ENDMAP

# Not Minivault 9 (by Mu.)
NAME:   not_door_vault_mu
TAGS:   extra allow_dup luniq vaults_empty
DEPTH:  D:13-, Elf, Vaults, !Vaults:$, Crypt, Depths, Zot, Dis, Geh, Tar, Coc
WEIGHT: 1
KMONS:  12 = butterfly
: door_vault_setup(_G)
: if you.in_branch("D") or you.in_branch("Depths") or you.in_branch("Vaults") then
FTILE:  12 = floor_grass_dark
:   decorative_floor(_G, '12', "flower patch")
: end
MAP
..............
..............
..aaaaaaaaaa..
..a++++++++a..
..a++++++++a..
..a++1111++a..
..a++1221++a..
..a++1221++a..
..a++1111++a..
..a++++++++a..
..a++++++++a..
..aaaaaaaaaa..
..............
..............
ENDMAP

# I've revamped this vault to always place reasonably challenging monsters,
# with monster/loot types and number scaling with depth. -gammafunk
NAME:   worms_lemuel
TAGS:   no_monster_gen no_pool_fixup transparent
DEPTH:  D:7-, Lair, Spider, Swamp
KMONS:  1 = swamp worm
KMONS:  2 = tyrant leech
KMONS:  3 = demonic crawler
KMONS:  4 = torpor snail
KMONS:  5 = moth of wrath
KMONS:  P = plant
KITEM:  | = |
KITEM:  * = *
KFEAT:  12345P|* = W
: if you.in_branch("D") then
:     if you.depth() < 10 then
SUBST:  D = W
NSUBST: 1 = 1 / 2=1W / |* / |*WW / W
:     elseif you.depth() < 13 then
SUBST:  D = 1WW
NSUBST: 1 = 1 / 3=1W / 23WW / |* / 2=|*WW / W
:     else
SUBST:  D = 1W
NSUBST: 1 = 2=1 / 3=1W / 23 / 2=23WW / 45 / 2=|* / 2=|*WW / W
:     end
: elseif you.in_branch("Lair") then
:     if you.depth() < 4 then
SUBST:  D = 1WW
NSUBST: 1 = 1 / 3=1W / 23WW / |* / 2=|*WW / W
:     else
SUBST:  D = 1W
NSUBST: 1 = 2=1 / 2=1W / 2=23WW / 45WW / |* / 3=|*WW / W
:     end
: elseif you.in_branch("Swamp") then
SUBST:  D = 1W
NSUBST: 1 = 3=1 / 3=1W / 2 / 3=2W / 45 / 45WW / 2=|* / 3=|*WW / W
# Spider
: else
SUBST:  D = 3W
NSUBST: 1 = 4=3 / 6=3W / 4 / 4W / 2=|* / 3=|*WW / W
: end
MAP
    WWWWW
   WWwDwWW
 WWWWxxxWWWW
WWWxxx1xxxwWW
Wwxx11111xPWW
WDx111111PPWW
Wwxx11111xPWW
WWwxxx1xxxwWW
 WWWWxxxWWWW
   WWwDwWW
    WWWWW
ENDMAP

NAME:    hangedman_stitches_earthworm
TAGS:    no_monster_gen no_item_gen transparent no_pool_fixup
DEPTH:   Depths, Spider:2-, Abyss
KMONS:   0 = 0
KMONS:   1 = tyrant leech
KMONS:   2 = boulder beetle
KMONS:   3 = redback w:5 / orb spider w:5 / nothing
KMONS:   4 = thrashing horror
KITEM:   ' = stone no_pickup q:1 w:5 / nothing
SHUFFLE: ABCDEF / ABCDEF / ABCCBA, ABC, DEF, 13 / 13 / 31, {`
:  if you.in_branch("Abyss") then
:    if you.depth() ~= dgn.br_depth(you.branch()) then
KFEAT:   04 = abyssal_stair
:    end
SUBST:   G = BEG, C : x:5 cvb, B : x:5 cvbw, A : xcvb w:4
SUBST:   D: x:5 cvb, E : x:5 cvbw, F : xcvb w:4, { = '
SUBST:   0 = 4:50 0
:  else
KITEM:   01234 = % w:90 no_pickup / * no_pickup
SUBST:   { = {[( .:15, ` = '
NSUBST:  { = 1:{ / 1:}, [ = 1:[ / 1:(, ( = 1:] / 1:)
SUBST:   G = BEG, C: xc, B : x., A : xxc .:2
SUBST:   D : xc, E : x .:5, F : xxc .:2
:    if you.in_branch("Spider") then
SUBST:   0 = 3:50 0
:    else
SUBST:   c : cb
:    end
:  end
MAP
  '...      ..'.D.1.D.'..
 '.'A..    ..'D'E'D'E'D'..
..'0B..   ..'0E'F'E'F'E0'..
.'ABC..   .'DEF.'.F.'.FED'.
..''...   ..'..{.....`..'..
.CBA'..   ..'DEF.. ..FED'..
..'2...   ...2'..   ..1'...
.'CBA..   ..AGF'.   .'FED..
..'1...   ...'2..   ..2'...
.CBA'... ...'ABC.   .FED'..
..''.`.....{.''..   .....'.
.'CBA.'.A.'.ABC'.   ..FED'.
..'0B'A'B'A'B0'..   ..E0'..
 ..'C'B'C'B'C'..    ..D'.'
  ..'.C.1.C.'..      ...'
ENDMAP

NAME:   nicolae_looking_at_the_future
TAGS:   no_monster_gen no_trap_gen uniq_beehive patrolling
DEPTH:  D:8-, Spider
KMONS:  B = queen bee
KMONS:  b = killer bee
KMONS:  M = meliai
KMONS:  p = plant
: if you.in_branch("Spider") then
SUBST:  + = .
: end
: if you.absdepth() > 12 then
NSUBST: b = 1:B / 3:M / *:b
: else
NSUBST: b = 1:B / 1:b / * = bb.
: end
MAP
xxxxx++xxxxx
xp........px
xpb.pb.pb.px
xp..p..p..px
xp.bp.bp.bpx
xp..p..p..px
xpb.pb.pb.px
xp..p..p..px
xp.bp.bp.bpx
xp..p..p..px
xpb..b..b.px
xxxxxxxxxxxx
ENDMAP

NAME:   minmay_worlds_worst_comb
TAGS:   transparent
DEPTH:  D:3-5
MONS:   clockroach
NSUBST: 1 = 1:1 / 1:. / * = 1.
MAP
   ....
  ..xx.
  .xx1..
 ..1xxx.
 .xxx1...
...1xxxx.
.xxxx1...
...1xxx.
 .xxx1..
 ..1xx.
  .xx..
  ....
ENDMAP

NAME:   nzn_sisyphean_effort
DEPTH:  D:9-12, Lair
MONS:   patrolling boulder beetle
KITEM:  e = potion of attraction pre_id
: dgn.delayed_decay(_G, 'd', 'human corpse')
MAP
xxxxxxxxx
@.......@
@..d1e..@
@.......@
xxxxxxxxx
ENDMAP

NAME:   hellmonk_scarab_ruin
TAGS:   ruin
DEPTH:  Crypt, Depths
MONS:   death scarab band
FTILE:  .$1c = floor_sandstone
TILE:   c = wall_tomb
NSUBST: ' = 2 = 1.. / *:.
MAP
   ccccc
 ccc...ccc
cc..c$c..cc
ccc.$1$.ccc
@...ccc...@
ccc.....ccc
c.ccc.ccc.c
c...c.c...c
c...c.c...c
ccc.....ccc
  ccc@ccc
ENDMAP

NAME:    nicolae_wormholes
TAGS:    transparent
DEPTH:   D:2-5
MONS:    ribbon worm
KFEAT:   ^ = shaft trap
NSUBST:  - = 1:} / *:`
SUBST:   D = x, E = x.
SHUFFLE: }])
: local d = math.max(1, you.depth() - 1 + crawl.random_range(0, 2))
: nsubst("` = " .. d .. ":1 / " .. ((d + 3) * 2) .. ":^ / *:.")
MAP
xxxxE.Exxxx
xxD`...`Dxx
xD```````Dx
x``-----``x
E.`-----`.E
..`-----`..
E.`-----`.E
x``-----``x
xD```````Dx
xxD`...`Dxx
xxxxE.Exxxx
ENDMAP

NAME:   dreamdust_wasp_nest
TAGS:   no_monster_gen uniq_hornetnest
DEPTH:  D:12-, Lair, Spider, Depths
WEIGHT: 5
NSUBST: . = 6 = 11. / 6 = 1.. / *:.
: if you.in_branch("Depths") then
SUBST:  x = b
COLOUR: b = silver
MONS:   spark wasp
: elseif you.in_branch("Spider") then
MONS:   hornet / spark wasp
: else
MONS:   hornet
: end
MAP
    xxxx
  xxx..xxx
xxx..xx..xxx
x..xx..xx..x
@xx..xx..xx@
x..xx..xx..x
xxx..xx..xxx
  xxx..xxx
    xxxx
ENDMAP

NAME:    regret_index_collectors'_demense
TAGS:    no_monster_gen vaults_room vaults_orient_s no_pool_fixup no_wall_fixup
DEPTH:   D:5-, Swamp, Vaults, !Vaults:$, Depths
SHUFFLE: ABCD
SUBST:   AB : y, C : y., D : y., z : x., Z : x., c : cccct
: if you.in_branch("D") then
:   if you.depth() < 8 then
MONS:    dart slug, ribbon worm, bombardier beetle / scorpion w:3
MONS:    gnoll bouda / kobold w:2
NSUBST:  0 = 2:. / *:0, % = 4:$ / 1:d%% / *:%
:   elseif you.depth() < 10 then
MONS:    bombardier beetle / scorpion w:3, vampire mosquito
MONS:    killer bee / hornet, kobold brigand / gnoll bouda w:2
NSUBST:  0 = 3:. / *:0, % = 3:$ / 1:d%% / *:%
:   elseif you.depth() < 12 then
MONS:    vampire mosquito, killer bee / hornet w:1
MONS:    hornet perm_ench:shapeshifter / queen bee perm_ench:shapeshifter / \
         tarantella perm_ench:shapeshifter
MONS:    arcanist / ogre mage
NSUBST:  % = 1:d* / 1:*% / *:%
:   else
MONS:    redback / hornet perm_ench:shapeshifter w:2 / \
         tarantella perm_ench:shapeshifter w:2
MONS:    boulder beetle / tarantella w:2, wolf spider
MONS:    rakshasa / occultist
NSUBST:  % = 1:d / 2 = *% / *:%
:   end
SUBST:   W = ., X = x
: elseif you.in_branch("Swamp") then
MONS:    hornet / vampire mosquito, swamp worm / tyrant leech
MONS:    shambling mangrove, spriggan druid / fenstrider witch w:2
NSUBST:  10 = 2:., % = 1:d / 1:dde / 1:| / 1:* / *:%
NSUBST:  ' = 2:w / 2:tw / 2 = W. / *:W, " = 2 = tw / 2 = W. / *:W
NSUBST:  x = 2:. / 2:t / *:x, X = 2:x / *:t
TILE:    x = wall_brick_vines
: elseif you.in_branch("Vaults") then
MONS:    redback / boulder beetle / wolf spider w:2 / tarantella w:2
MONS:    swamp worm perm_ench:glowing_shapeshifter / \
         steelbarb worm perm_ench:glowing_shapeshifter
MONS:    entropy weaver, ironbound preserver / necromancer
NSUBST:  0 = 1:. / *:0, % = 1:ddde / 3:% / *:.
CLEAR:   X
: else -- Depths
MONS:    orb spider perm_ench:glowing_shapeshifter / \
         swamp worm perm_ench:glowing_shapeshifter
MONS:    spriggan rider, spark wasp
MONS:    spriggan berserker / lich / alderking w:2
NSUBST:  10 = 2:3 / 1:2, % = 1:| / 1:* / 1:e / * = *%%
SUBST:   W = ., X = x
: end
ITEM:    throwing net q:1 no_pickup / rapier ego:venom no_pickup w:12 / \
         scimitar ego:venom no_pickup w:8 / \ any hex wand charges:8 no_pickup / \
         potion of ambrosia q:1 w:3 pre_id / potion of curing w:3 pre_id / \
         fen folio w:3 / my sojourn through swampland w:3 / \
         dart ego:curare no_pickup w:3 / scarab talisman
ITEM:    throwing net q:2 no_pickup / quick blade ego:venom randart w:12 / \
         swamp dragon scales randart / potion of ambrosia q:2 w:3 pre_id / \
         potion of curing w:3 q:3 pre_id / hive talisman / \
         randbook numspells:6 spells:launch_clockwork_bee&&summon_forest w:6
KFEAT:   y = x
NSUBST:  0 = 3:1 / 2:2 / 1:3 / 1:. / * = 11223
TILE:    y = wall_wax
MAP
        XXXXXXX
       XXXXXXXXX
      xxc4c%c4cxx
     Xx1.......2xX
     Xx...y.y...xX
   XXx%..0...0..%xXX
  Xxxx"..x...x.."xxxX
 Xx.."xx"....."xx"..xX
 X%.x.."xxx3xxx"..x.%X
XX....x."xxxxx".x....XX
Xx.A.W....%x%....W.A.xX
Xx...WW...xxx...WW...xX
Xx.B.WW.Z.x%x.Z.WW.B.xX
Xx0..W..x'''''x..W..0xX
Xx'C..x.x''z''x.x..C'xX
Xx0....0x.xxx.x0....0xX
 Xx.D..xx''1''xx.D..xX
 Xx0...xx'''''xx...0xX
  Xxx0%xxx+x+xxx%0xxX
   XxxxxX'''''XxxxxX
     XXX  @@@  XXX
ENDMAP

###############################################################################
#
# <<2>> Vertebrae
#       Mammals, reptiles, also dragons, serpents.
#
###############################################################################

NAME:  minmay_lizard_pond
TAGS:  transparent
DEPTH: D:1-2
KMONS: 1 = frilled lizard
KFEAT: 1 = W
SUBST: W = WWW1
MAP
 ......
..WWWW.
.WWWWW..
.WWWWWW.
.WWWWWW.
..WWWW..
 ......
ENDMAP

NAME:  minmay_rat_gold_closets
TAGS:  transparent
DEPTH: D:1-2
MONS:  rat
SUBST: 1 = 111$
MAP
.............
.x+x+x+x+x+x.
.x1x1x1x1x1x.
.xxxxxxxxxxx.
.x1x1x1x1x1x.
.x+x+x+x+x+x.
.............
ENDMAP

NAME:  minmay_rat_hole
DEPTH: D:2-4
MONS:  rat, quokka
ITEM:  stone / nothing w:30
KFEAT: C = cache_of_baked_goods
MAP
 xxx
xxCx
xddxx
xdddxxxx
xxxx211xx
  xx1111x
  x11111x
  x11111x
  xx11xxx
   xx@x
ENDMAP

NAME:  minmay_snake_closets
TAGS:  no_monster_gen no_item_gen transparent
DEPTH: D:2-4
MONS:  adder / ball python
ITEM:  any scroll / any potion
SUBST: ? = 111d
MAP
   xxxxxxx.@.xxxxxxx
   x.?x..+...+..x?.x
   x..x?.x...x.?x..x
xxxx+xxxxx...xxxxx+xxxx
x..+.....x...x.....+..x
x?.x.....x...x.....x.?x
x+xx?....+...+....?xxxx
x?.x.....x...x.....x.?x
x..+.....x...x.....+..x
xxxx+xxxxx...xxxxx+xxxx
   x..x?.x...x.?x..x
   x.?x..+...+..x?.x
   xxxxxxx.@.xxxxxxx
ENDMAP

NAME:   goddamned_bats
DEPTH:  D:4-5
# Sadly, for size-based ones, only mega, micro and giga exist.  Lack of kilo
# and tera is understandable, but come on, even mili is lacking.
KMONS:  1 = bat name:megabat n_rpl n_des n_spe n_noc hd:2 tile:mons_megabat
KMONS:  2 = bat name:microbat n_rpl n_des n_spe n_noc col:magenta tile:mons_microbat
KMONS:  4 = bat name:giga n_adj n_des n_spe n_noc hd:4 col:brown tile:mons_gigabat
# Way harder than the rest here.
KMONS:  5 = vampire bat
# In RL, they sit put, not moving a finger.  Lazy bastards.
KMONS:  6 = bat draugr name:skeletal_bat n_rpl n_des n_spe n_zom ; dagger plus:-4
# The only here without a basis in reality.
KMONS:  7 = bat simulacrum name:ice_bat n_rpl n_des n_spe n_zom
# There are actual "ghost bats" too, but near-extinct, while ghost-faceds
# have a number of species and are widespread.
KMONS:  8 = spectral bat name:ghost-faced_bat n_rpl n_des n_spe n_zom
# Just an US WW2 military project, but that's good enough.
KMONS:  9 = fire bat
KMONS:  0 = bat zombie name:rotten_bat n_rpl n_des n_spe n_zom
# Correction, this one, added because of a tile, is not real as well.
KMONS:  3 = bat name:phase n_adj n_des n_spe col:lightgreen \
            spells:blink.29.natural tile:mons_phase_bat
MAP
       xxxxx
      xxxxxxx
     xxxx7xxx
    xxxxx.xxx
   xxx9..xxx
  xxx9..0xxx
  xx.9..xxxxx
  xxx....xxxx
  xx88.xx.xxxx
  xxxxxxxx.xxxx
 xxxxxxxxx.33xx
xxx.4xxxx..x..xx
xxx12.xxx.xx...xx
xxxx.xxx.xxxx6..x
xxxxx.xx.xxxx66.x
xx11.x...xxxxx.xxx
xxxxxxx...xxxxx.xx
 xxxx22xx.xxxxx5xx
  xxxxxxx.xxxxxxx
    xxxx@xx
ENDMAP

NAME:   saegor_snake_ambush
TAGS:   no_monster_gen no_pool_fixup transparent
DEPTH:  D:3-5
KMONS:  S = w:3 adder / w:4 ball python / w:5 plant / nothing
KFEAT:  SX = W
KITEM:  X = gold, serpent talisman
KPROP:  W = no_tele_into
MAP
.xxxxxx.@..
.xxWStxx+xx
@+SttctWStx
.xWtctWttWx
xxtWtWtctSx
xtctWXWtctx
xStctWtWtxx
xWttWtctWx.
xxSWtcttS+@
xx+xxtSWxx.
..@.xxxxxx.
ENDMAP

# This vault can be highly OOD, which is why lindwurms are used in the
# first place; unlike most dragon-types, lindwurms are flightless.
# The no_trap_gen tag prevents teleport traps (or shafts) that might set
# the lindwurms free.
NAME:   minmay_lindwurm_lava
TAGS:   no_monster_gen no_trap_gen transparent no_descent
DEPTH:  D:8-, Lair:2-
KMASK:  '*|1> = opaque
KPROP:  '*|1> = no_tele_into
KMONS:  1 = lindwurm
KITEM:  1 = *
SUBST:  L : ..Ll
SUBST:  L = ..l
KFEAT:  ' = floor
NSUBST: | = 1:> / *:|
KITEM:  > = |
: if you.at_branch_bottom() then
KFEAT:  > = escape_hatch_up
: else
KFEAT:  > = escape_hatch_down
: end
MAP
          ....
      .....LL.....
    ....LLLllLLL....
   ...LLllllllllLL...
  ...LllllllllllllL...
  ..LllllllllllllllL..
 ..LllllllllllllllllL..
 ..Lllllll''''llllllL..
 .Llllll'''xx'''lllllL.
 .Llllll''xxxx''lllllL.
..Lllll''x'1*'x''llllL..
.Llllll'xx*||1xx'lllllL.
.Llllll'xx1||*xx'lllllL.
..Lllll''x'*1'x''llllL..
 .Llllll''xxxx''lllllL.
 .Llllll'''xx'''lllllL.
 ..Lllllll''''llllllL..
 ..LllllllllllllllllL..
  ..LllllllllllllllL..
  ...LllllllllllllL...
   ...LLllllllllLL...
    ....LLLllLLL....
      .....LL.....
          ....
ENDMAP

NAME:  pond
TAGS:  no_monster_gen
DEPTH: D:10-, Lair
KMONS: p = plant w:30 / fungus
: if you.in_branch("D") then
:   if you.depth() < 13 then
MONS:  bullfrog / water moccasin / river rat / cane toad w:2 \
       / blink frog w:2 / komodo dragon w:2
MONS:  vampire mosquito / swamp drake w:3
# For earlier Dungeon and Lair, 50% chance of a Lair set or a Swamp set.
SUBST: 1 : 12
:   else
# For post-Lair Dungeon, always use the Swamp set.
MONS:  vampire mosquito / swamp drake w:2 / swamp dragon w:3 / hydra w:3 / \
       will-o-the-wisp w:2
:   end
# Lair
: else
:   if you.depth() < 4 then
MONS:  bullfrog / water moccasin / river rat / blink frog / cane toad / \
       komodo dragon
MONS:  vampire mosquito / swamp drake w:3 / swamp dragon w:1 / hydra w:1
:   else
MONS:  blink frog / cane toad / komodo dragon / torpor snail w:5
MONS:  vampire mosquito / swamp drake w:3 / swamp dragon w:2 / hydra w:2 \
       / will-o-the-wisp w:1
:   end
SUBST: 1 : 12
: end
SUBST: ! : w., 1 = 1., 2 = 2., . = . p:1
KFEAT: p = W
MAP
..wwwww...
.wwwwwwww1
.wwwwwwwww
.1wwwwwwww
..ww111ww.
.wwww111w.
wwww!p11ww
www!!!*ww.
.ww!!!wpw.
.1w!!!ww1.
....!!w...
ENDMAP

# Not Minivault 9 (or, hellephant zoo)
NAME:    not_door_vault_due
TAGS:    allow_dup luniq vaults_hard
DEPTH:   D:13-, Elf, Vaults, !Vaults:$, Crypt, Depths, Zot, Dis, Geh
WEIGHT:  4
# Hellish beasts for Dungeon
: if you.in_branch("D") then
KMONS:   1 = hell hound
KMONS:   2 = hell hog
NSUBST:  2 = 2=2 / 2223 / 3
# Elf and Zot have a sort of "chaos zoo"
: elseif you.in_branch("Elf") then
KMONS:   1 = very ugly thing / apocalypse crab w:3 / shapeshifter hd:12 / \
             glowing shapeshifter
NSUBST:  2 = 2=1 / 13 / 3
# Remaining non-Zot branches: hell knights, balrugs and hellions, and multiple
# hellephants.
: elseif you.in_branch("Vaults") then
KMONS:   1 = hell knight
KMONS:   2 = hellion / balrug
KMONS:   3 = hellephant
NSUBST:  2 = 2=1 / 23 / 3
:  vaults_hard_standard(_G)
: elseif you.in_branch("Crypt") then
KMONS:   1 = hell knight
KMONS:   2 = hellion / balrug
NSUBST:  2 = 2 / 2=23 / 3, 1 = 2=12 / 1
: elseif you.in_branch("Depths") then
KMONS:   1 = hell knight
KMONS:   2 = hellion / balrug
NSUBST:  2 = 3=23 / 3, 1 = 2 / 3=12 / 1
: elseif you.in_branch("Zot") then
# Chaos zoos.
KMONS:   1 = very ugly thing / apocalypse crab w:5 / shapeshifter hd:14 / \
             glowing shapeshifter / protean progenitor / killer klown
KMONS:   2 = killer klown
NSUBST:  2 = 2=23 / 3
: elseif you.in_branch("Geh") or you.in_branch("Dis") then
KMONS:   1 = hell knight / hellion / balrug
SUBST:   2 = 3
: end
KMONS:   3 = hellephant
: door_vault_setup(_G)
MAP
..............
..............
..aaaaaaaaaa..
..a++++++++a..
..a++++++++a..
..a++1111++a..
..a++1221++a..
..a++1221++a..
..a++1111++a..
..a++++++++a..
..a++++++++a..
..aaaaaaaaaa..
..............
..............
ENDMAP

# A plain guardian serpent vault. (nrook)
NAME:  nrook_guardian_serpent_ordinary
DEPTH: D:11-, Snake, Crypt
TAGS:  no_monster_gen no_item_gen transparent
: if you.in_branch("Crypt") then
TAGS:  extra
MONS:  patrolling spectral guardian serpent
SUBST: x = c
: else
MONS:  patrolling guardian serpent
: end
: if crawl.x_chance_in_y(you.absdepth() - 13, 4) then
SUBST: ' = 1
: else
SUBST: ' = .
: end
MAP
......
.xxxx.
.x**x.
.x**x.
.xx+x.
..'10.
ENDMAP

# A real vault behind a false one. (nrook)
NAME:  nrook_guardian_serpent_double
TAGS:  no_monster_gen transparent
DEPTH: D:11-, Snake
MONS:  patrolling guardian serpent
KMASK: *| = opaque
KPROP: *| = no_tele_into
: if crawl.x_chance_in_y(you.absdepth() - 13, 4) then
SUBST: ' = 1
: else
SUBST: ' = .
: end
MAP
.......
.ccccc.
.c*|*c.
.ccxcc.
.n%%%n.
.n%%%n.
.cc+cc.
..'10..
ENDMAP

# Things aren't always what they seem (Lemuel)
#
# Slight tweak by having a fraction (unknown to the player) of items be
# real. (dp)
NAME:   fake_guardian_serpent_vault
TAGS:   transparent
DEPTH:  D:12-, Depths, Elf, Snake
WEIGHT: 5
MONS:  patrolling guardian serpent
: if you.in_branch("Depths") then
KMONS:  D = quicksilver dragon
KITEM:  D = $ q:55 / barding good_item w:5
NSUBST: d = 1:D / *:d
: end
ITEM:  any good_item / any mimic, any good_item w:1 / any mimic w:3, any mimic
: if crawl.x_chance_in_y(3, 5) then
SUBST: d = e
: elseif crawl.one_chance_in(2) then
SUBST: d = f
: end
MAP
...........
.xxxxxxxxx.
.xdddddddx.
.xdddddddx.
.xddd1dddx.
.xdd.0.ddx.
.xxxx+xxxx.
...........
ENDMAP

NAME:   minmay_serpent_palace
TAGS:   no_monster_gen no_item_gen transparent
DEPTH:  Depths
MONS:   salamander w:2 / naga ritualist w:8 / naga mage w:4
MONS:   nagaraja / guardian serpent, salamander mystic / salamander tyrant
MONS:   mana viper w:5 / anaconda / anaconda simulacrum w:5 / sea snake
MONS:   lindwurm, quicksilver dragon
SUBST:  c : cv
NSUBST: 3 = 1:6 / 2:3 / 5:4 / 8 = 444... / *:.
NSUBST: 2 = 1:6 / *:2, 1 = 1:2 / 1:12 / 4:. / *:11.
KMASK:  5 = opaque
MAP
...............................
.ccccccccccccccccccccccccccccc.
.c3+33.33c..3..3..2....3.c%%%c.
.c1ccccc1c.2...1.3.1.3.2.c%%%c.
.c.c$$$c3c.3.3..2.......3c%%%c.
.c1c$$$c3c....13...3.1...ccc+c.
.c3c$$$c.c3.1.....1..3.3.1332c.
.c1c2ccc3c....3.13....1.cccccc.
.c.c.3313c.3.1......1.3.c3313c.
.c3ccccccc1...3.....3...c3cc3c.
.c33.313....3.....3...1.c2|c3c.
.c1.31..3.3..ccc++ccc...cccc+c.
.c32..33.1.33c5l..l5c..1.2.1.c.
.cccccccccccccll..llcccccccccc.
...............................
ENDMAP

NAME:   roderic_batcave
TAGS:   no_monster_gen extra transparent
DEPTH:  D:3-, Lair, Orc
: local d = you.absdepth()
: if d < 7 then d = 0 end
: mons("bat w:60 / vampire bat w:" .. d .. " / nothing w:10")
MONS:  obsidian bat
SUBST:  ? : x@
SUBST:  1 = 1:10 .:1
: if you.in_branch("Orc") then
NSUBST: 1 = 1:2 / 1:* / *:1
: end
MAP
  xxxx?xx
 xxx1..xxxx
xxx1...1xxx
xx11...11xx
xxx1...1xxx
 xxx..1xxx
  xx@xxx
ENDMAP

NAME:   nicolae_underground_beach
DEPTH:  D:2-
TAGS:   no_trap_gen no_pool_fixup
SUBST:  N = MO, M = bW, O = wW
: if you.absdepth() > 9 then
SUBST:  b = SBB
KPROP:  B = bloody
SUBST:  B = S
NSUBST: S = 3:v / *:S
: dgn.delayed_decay(_G, 'v', 'human corpse')
NSUBST: w = 4:j / *:w
KMONS:  j = water elemental
KFEAT:  j = w
: else
SUBST:  b = S
TAGS:   no_monster_gen
: end
SUBST:  E = .S
COLOUR: Sv : brown
FTILE:  vSwWj = floor_sand
SUBST:  S = .
MAP
      xxxxx
    xxxMNOxxx
   xxbbMNOwwxx
xxxxbbbMNOwwwx
.EEEbbbMNOwwwx
@EEEbbbMNOwwwx
.EEEbbbMNOwwwx
xxxxbbbMNOwwwx
   xxbbMNOwwxx
    xxxMNOxxx
      xxxxx
ENDMAP

NAME:    hangedman_aviary
TAGS:    no_rotate no_hmirror no_pool_fixup transparent
DEPTH:   D:12-, Depths
MONS:    tengu warrior, harpy, tengu reaver, caustic shrike / chonchon w:5
: if you.in_branch("D") then
SUBST:   3 = 2
: else
SUBST:   2 = 4, " = *|
SHUFFLE: wW / ll
: end
KMASK:   wWl = no_monster_gen
MAP
cccccccWW.@@.WWccccccc
c32..1ccW.xx.Wcc1..23c
cc.ww.%c......c%.ww.cc
 c*.ww.cc....cc.ww.*c
 cc*.w..........w.*cc
  cc"1.cc.xx.cc.1"cc
   cccccW.@@.Wccccc
ENDMAP

NAME:   introduction_to_nature_1
TAGS:   no_monster_gen no_pool_fixup uniq_introduction_to_nature transparent
DEPTH:  D:8-13
WEIGHT: 3
ITEM:   any potion
ITEM:   young poisoner's handbook / fen folio / \
        randbook disc:Alchemy slevels:8 w:5 / \
        randbook numspells:4 title:Nature \
        spells:summon_small_mammal&call_canine_familiar&hailstorm&summon_forest / \
        randbook numspells:3 title:Nature \
        spells:mercury_arrow&stone_arrow&hailstorm&summon_forest
KITEM:  f = dart ego:poisoned / dart ego:curare / dart ego:atropa
KITEM:  g = quill talisman randart, any potion q:2
MONS:   plant, oklob sapling, ball python
MONS:   adder, oklob plant, water moccasin
KMONS:  7 = hornet
KMONS:  8 = scorpion
KMONS:  9 = hound / jackal
KMONS:  & = bush
KFEAT:  78 = W
KFEAT:  ' = shaft trap
KFEAT:  ~ = alarm trap / floor
KFEAT:  ` = web trap / floor w:30
: if you.absdepth() < 11 then
SUBST:  m : 1twx, 5 = 25, 7 = 78
: else
SUBST:  ? = 6
: end
: if crawl.coinflip() then
SHUFFLE: def
: end
# a bit inelegant but KMASK applies after the shuffle, if it happens:
KMASK:  'def = opaque
SUBST:  & = wwwW&1
SUBST:  x : xxxcc
MAP
 tttttttttt@1
 teWWtwwww+tt`w1
wt~xWWWxxxxtw`Ww1
wt6xxxx77+dtwwwWx
wtt+3?xxxxttwWW1x
w1434.x'x'ft5wxxx
w1.4.mwxwxttWwgx
.w1..mmxxxWWww.x
..w33.Ww2Wwww.4x
.4....3wwww.3.xx
 ..........3.&1
   @9.......11
    ...1.
ENDMAP

NAME:   introduction_to_nature_2
TAGS:   no_monster_gen no_pool_fixup uniq_introduction_to_nature
DEPTH:  D:8-13
ITEM:   any potion
ITEM:   young poisoner's handbook / fen folio / \
        randbook disc:Alchemy slevels:8 w:5 / \
        randbook numspells:4 title:Nature \
        spells:summon_small_mammal&call_canine_familiar&hailstorm&summon_forest / \
        randbook numspells:4 title:Nature \
        spells:mercury_arrow&stone_arrow&hailstorm&summon_forest
KITEM:  f = dart ego:poisoned / dart ego:curare / dart ego:atropa
KITEM:  g = quill talisman randart, any potion q:2 / any potion q:3
MONS:   plant, oklob sapling, ball python
MONS:   adder, oklob plant, water moccasin
KMONS:  7 = hornet
KMONS:  8 = scorpion
KMONS:  9 = hound / jackal band
KMONS:  & = bush
KFEAT:  78 = W
KFEAT:  ' = shaft trap
KFEAT:  ` = web trap / floor w:60
: if you.absdepth() < 11 then
SUBST:  m : 1twx, 5 = 25, 7 = 78
: else
SUBST:  T = tx, ? = 6
: end
: if crawl.coinflip() then
SHUFFLE: def
: end
SUBST:  & = ww&&1
SUBST:  x : xxxcc
SUBST:  z : wW
MAP
        tttttttttt@
      tttwg1tetwtttt
   ttttw12w5tt't4..xxxxxxxx
  1tttwwwWwwtttt.34..x>``7x
...twww1ww1ttw....x.`x````x
..9t1wwwwWwwtw.3....`&```fx
....tWwwWWwwtx....x.`x````x
@...twWWwWwwW+.......x```7x
 ...ttwwwWwWtx..3..xxxxxxxx
 ..4t3tttwWttwWWWW33tttx
 .wwt4t?1WwtwwwwWwtt1ttt
  zzttdtWtttttwwwwwt1.tt
   wz1tttt   ttwwwwtt6tt
   ttttttt       1wwtttt
                  @ ttt
                      t
ENDMAP

NAME:    hangedman_parallel_progression
TAGS:    patrolling no_monster_gen transparent
TAGS:    layout_rooms layout_corridors
DEPTH:   D:11-
MONS:    rat, bat, frilled lizard, dart slug, endoplasm
MONS:    clockroach, jackal
KMONS:   8 = ball python / adder w:8
KMONS:   A = river rat
KMONS:   B = vampire bat / fire bat w:8
KMONS:   C = iguana / basilisk w:8
KMONS:   D = ribbon worm / tyrant leech
KMONS:   E = jelly
KMONS:   F = scorpion
KMONS:   G = hound / wolf w:3
KMONS:   H = water moccasin
KMONS:   I = hell rat
KMONS:   J = unseen horror
KMONS:   K = alligator
KMONS:   L = lindwurm
KMONS:   M = large slime creature
KMONS:   N = demonic crawler
KMONS:   O = hell hound
KMONS:   P = black mamba
KITEM:   IJKLMNOP = any, any / gold w:5 / nothing
SHUFFLE: 1AI / 2BJ / 3CK / 4DL / 5EM / 6FN / 7GO / 8HP
MAP
xxxx+xxx    xxxx+xxx    xxxx+xxx    xxxx+xxx
x1x..xIx    x2x..xJx    x3x..xKx    x4x..xLx
x11.xxAx    x22.xxBx    x33.xxCx    x44.xxDx
xAx%%xAx    xBx%%xBx    xCx%%xCx    xDx%%xDx
xAxx.11x    xBxx.22x    xCxx.33x    xDxx.44x
xIx..x1x    xJx..x2x    xKx..x3x    xLx..x4x
xxx+xxxx    xxx+xxxx    xxx+xxxx    xxx+xxxx
ENDMAP

NAME:    hangedman_misty_isle
TAGS:    transparent no_monster_gen no_pool_fixup patrolling
DEPTH:   D:7-11
KMONS:   123 = sky beast
KMONS:   56 = steam dragon
KITEM:   15% = any / gold
KITEM:   36 = gold, star_item
KFEAT:   F = shallow_water
SHUFFLE: Ww, aA, bB, cC, dD
SUBST:   abcd = ., ABCD = x, X = xx.
MARKER:  F = lua:fog_machine {cloud_type = "thin mist", \
             pow_min = 5, pow_max = 12, delay_min = 28, delay_max = 42, \
             size = 2, spread_rate = 2, start_clouds = 1 }
MAP
   ..........
  ...a....b...
 ...AWWWWWWB...
...XFwwwwwwFB..
..AWWw.x2.wwWb.
.aWww.16x%.wW..
..Ww..xxx..wW..
..Ww.%x35.wwWd.
.cWww.4x.wWWD..
..CFwwwwwwFX...
...CWWWWWWD...
 ...c....d...
  ..........
ENDMAP

NAME:  guppyfry_early_lair_pool
TAGS:  patrolling no_monster_gen transparent
DEPTH: D:2-5
KMONS: 2 = adder
KMONS: 3 = plant
ITEM:  any potion / gold / stone / nothing
SUBST: - = wwwwwwWWW
KMASK: W = opaque
KPROP: W = no_tele_into
SUBST: . = ........33
SUBST: ? = ..wwwtt33%%d222
: if you.absdepth() < 4 then
SUBST: 2 = .
: end
MAP
............
....?--?....
..?-----?...
..--------..
.----------.
.----------.
..-------...
...-----....
...?---?....
.....?--?...
......?-?...
............
ENDMAP

NAME:   argonaut_fire_from_heaven
TAGS:   transparent
DEPTH:  Depths:2-
KMASK:  T = opaque
KMONS:  T = titan
KMONS:  2 = caustic shrike
KFEAT:  m = iron_grate
KITEM:  T = randbook disc:fire, gold good_item
KFEAT:  T = <
NSUBST: 2 = 1:2 / 1:. / * = 2.
KPROP:  T = no_tele_into
MAP
..xxxxxxx.@
..........x
xxxxx2....x
xcccx...2.x
xcTm..2..Cx
xcccx...2.x
xxxxx2....x
..........x
..xxxxxxx.@
ENDMAP

# Medium trappings still informed by Topsell, I guess.
NAME:   argonaut_gorgonesque
TAGS:   no_monster_gen
DEPTH:  D:12-, Shoals
MONS:   harpy, basilisk, catoblepas
KMONS:  P = withered plant
ITEM:   kite shield ego:reflection pre_id / \
        buckler ego:reflection pre_id w:1 / \
        tower shield ego:reflection pre_id w:1
ITEM:   stone
NSUBST: H = 4:G / 2:G. / *:e
MAP
     xxxxxxx
   xxxx1x.xxx
  xxxxxx2xxxxxx
 xxx.H.....H.xxx
xxx.....H.....xxx
x.x.....3.....x1x
xx2.....H.....2xx
x1x..H..d..H..x.x
xxx.....G.....xxx
 xxx.........xxx
  xxxxHx.xHxxxx
   xxxxx.xxxxxx
    xxx.Gxxxx
      xxPxx
       @..
ENDMAP

NAME:   wander_ebering_terrifying_dragon_lair
TAGS:   no_monster_gen
DEPTH:  D:1-3
MONS:   frilled lizard
ITEM:   human skeleton
NSUBST: $ = $ / 4=$.. / *:.
NSUBST: D = 3:d / 3=d.. / *:.
NSUBST: E = e / 2=e. / .
: dgn.delayed_decay(_G, 'e', 'human corpse')
MAP
   xxxxx
  xx...xx
 xxDxx..xx
xxDxxxxDDxx
xE$$$xxx.Dx
xE$1$xx..xx
xx$$$Dx..x
 xEEExxDDx
 xxxxx..xx
  xxDD.xx
   xxx@x
ENDMAP

NAME:    hangedman_snake_sidewinding
TAGS:    allow_dup
DEPTH:   Snake, !Snake:$, Zot, !Zot:$
: if you.in_branch("Zot") then
KMONS:   A = base draconian / green draconian w:4
KMONS:   B = fire dragon w:5 / ice dragon w:5 / storm dragon / shadow dragon
KMONS:   C = nonbase draconian / draconian annihilator
KMONS:   D = golden dragon / quicksilver dragon / wyrmhole
: else
KMONS:   A = naga warrior / naga mage
KMONS:   B = mana viper / anaconda
KMONS:   C = nagaraja / naga sharpshooter
KMONS:   D = guardian serpent / shock serpent
: end
SHUFFLE: @123<= / &456"-, EF
SUBST:   = = +, 1 = A, 2 = B, 3 = C, < : ~~_..., &E = x, - = c
SUBST:   456 = ', "F = ., y : x:2 G:1 .:6, Y : z', Z : z', z : xc
NSUBST:  * = **|, ~ = 1:( / 1:(<.., _ = 1:) / 1:)>.
KMASK:   '%*d = no_monster_gen
MAP
x@@xxxxxxxxxxxxxxxxxxxx
x""xxcccccccccccccccccx
x..xxxcc13121'''%%%**cx
xy..A%c--32z'''Z''BD*cx
xy...B%--c1'1z'''z'B%cx
x4.xxxxxccc''z''zYz'%cx
x..xxEExxccc'''zYz''%cx
xy...EE.A%ccc'''z''Z'cx
xy...FF..B%ccc'''''''cx
x4.xxFFxxxxxccc''zz''cx
x1.xxEExxEExxccc''4'4cx
xy...EE..EE.A%ccc''z5cx
xy...FF..FF..B%ccc454cx
x..xxFFxxFFxxxxxccc66cx
x1.xxEExxEExxEExxc==4cx
xy...EE..EE..EE.A%==ccx
xy...FF..FF..FF..B%cccx
x..xxFFxxFFxxFFxxxxxccx
x<<xxxxxxxxxxxxxxxxxxcx
x&&xxxxxxxxxxxxxxxxxxxx
ENDMAP

# I'd apologize for this pun, but I'm not actually sorry.
NAME:    nicolae_half_adder
TAGS:    transparent patrolling
DEPTH:   D:2-6
KMONS:   1 = adder
KFEAT:   !O = c
SHUFFLE: pqrs/O!!O/!O!O/!!O!
SUBST:   pqrs = O
: nsubst( "1 = " .. you.depth() .. "=1 / 1=1. / ." )
TILE:    ! = WALL_STONE_SMOOTH
TILE:    O = DNGN_STONE_DARK
COLOUR:  ! = white
COLOUR:  O = magenta
MAP
.....................
..p.........c.c....1.
.pppppppppppcpcc..r..
..p.p.1..1..1.%ccrrr.
.1...p....qqcqcc..r..
....1.p..q.1c.c..1...
.......pq............
.......qp............
....1.q..p.1cccc.1...
.1...q....ppccccc.s..
..q.q.1..1..1.%ccsss.
.qqqqqqqqqqqccccc.s..
..q.........cccc...1.
.....................
ENDMAP

# TODO: Convert this to a decorative skeleton vault by letting corpses recieve
#       more monster data like hydra head count, and let it be a vault that
#       another adventurer went through already. Reduces the issues of
#       weaker hydras being freer experience and keeps actually-fighting Lerny
#       properly kept to the Swamp rune.
NAME:   nicolae_hydra_factorization
TAGS:   no_monster_gen no_trap_gen
DEPTH:  D:12-
WEIGHT: 0
veto {{
   return crawl.game_started() and dgn.br_exists("Swamp")
}}
# The final loot is geared towards 6-9 pieces of good stuff, including a
# guaranteed randart or two, because otherwise who would go in?
KITEM:  * = *
KITEM:  % = %
KITEM:  $ = $ q:1
KITEM:  s = | w:70 / gold good_item
KITEM:  S- = any armour randart / any weapon randart / any jewellery randart
KMONS:  Q = three-headed hydra
KMONS:  R = nine-headed hydra
KMONS:  S = Lernaean Hydra
KFEAT:  $%*|PQRS`s- = . / W w:5
KFEAT:  t = mangrove
NSUBST: O = s / O
SUBST:  L = tp, M = tq, N = tr, O = ts
NSUBST: p = 27:P / 7:$ / `, q = 9:Q / 5:% / `, r = 3:R / 3:* / `, s = S / - / s
KITEM:  P = one-headed hydra skeleton
MAP
ccccccccccc
cpppppppppccccccccc
cppLLpLLppcMqqqqqMccccccc
cpLLLpLLLpcqMMqMMqcrNrNrccccc
cpLLpppLLpcqMMMMMqcNrNrNcOsOc
+ppppLpppp=qqMtMqq=rNtNr=sssn@
cpLLpppLLpcqMMMMMqcNrNrNcOsOc
cpLLLpLLLpcqMMqMMqcrNrNrccccc
cppLLpLLppcMqqqqqMccccccc
cpppppppppccccccccc
ccccccccccc
ENDMAP

NAME:   tekkud_yamata_no_oroachi
TAGS:   no_monster_gen
DEPTH:  D:12-, !D:$, Lair, !Lair:$
MONS:   eight-headed hydra, patrolling clockroach, plant
ITEM:   long sword good_item / scimitar good_item w:6, human skeleton
KFEAT:  C = cache_of_fruit
SUBST:  ` = @'''', ' = x', " = x.
NSUBST: . = 4:2 / *:.
CLEAR:  '
MAP
     '   `
  `''x'''x''
 xx'xxx'xxx'
 'xxxCxxx'''
''xxe...xxxx`
'x'xd.1..xx'
 'xxx....3xx'
  'x"x..33x3
 `xxxx3x333
  'x'xx3x3@
     x3
ENDMAP

###############################################################################
#
# <<3>> Humanoids
#       Goblins, gnolls, orcs, ogres etc. We include e.g. spriggans, centaurs.
#
###############################################################################

NAME:    minmay_goblin_outpost
TAGS:    no_pool_fixup transparent
DEPTH:   D:2-4
MONS:    goblin / hobgoblin w:5, goblin ; sling
KMASK:   >_"+2 = opaque
SUBST:   y = .WWw, Y = ...W, . = .....1
SHUFFLE: >X/_"
SUBST:   X = x, _ = +, " = @
MAP
   XXX
xxxx>xxxx
xxxx+xxxx
xwww2wwwx
xyywwwyyx
xYYYYYYYx
x.......x
x.......x
x.......x
@.......@
xxxxxxxxx
ENDMAP

NAME:   minmay_goblin_kobold_house
TAGS:   no_monster_gen
DEPTH:  D:2-4
MONS:   goblin / hobgoblin, kobold
SUBST:  . = 1%......
SUBST:  1 : 112
: decorative_floor(_G, 'p', "garden patch")
MAP
 xxxxxxx
xx.....xx
x.......x
x.......x
x.......x
xx.....xx
 xxx+xxx
  xp.px
  x.1.x
  xx+xx
ENDMAP

NAME:   minmay_sticks_and_stones
TAGS:   patrolling transparent
DEPTH:  D:8-
WEIGHT: 5
KMONS:  1 = Joseph / cyclops, \
            yaktaur ; quarterstaff . sling / cyclops
ITEM:   stone / club w:5 / large rock w:3 / quarterstaff w:1
NSUBST: . = 4:d / 4:. / * = d:30 .:150
MAP
.........
.........
.........
.........
....1....
.........
.........
.........
.........
ENDMAP

# Sigmund has been educating the oppressed masses in guerrilla warfare.
NAME:    sigmund_army
DEPTH:   D:4-7
: mons("gnoll ; " .. scythe() .. " . robe")
: mons("hobgoblin ; " .. scythe() .. " . robe")
: mons("orc ; " .. scythe() .. " . robe")
MONS:    Sigmund
SUBST:   n = 1:20 n:5
SHUFFLE: x+1 / x+1 / x+1 / y-5
SUBST:   - = y , y = 5, 5 = 1..
SUBST:   1 : 123444, 4 = 1223.., 1 = 1., 3 = 33.
veto {{ return you.uniques("Sigmund") }}
MAP
xxxxx
x1n1x
x111x
xx+xx
 ...
ENDMAP

NAME:  minmay_mini_ossuary
TAGS:  no_monster_gen no_item_gen transparent
DEPTH: D:4-8
MONS:  mummy, kobold zombie / orc zombie / hobgoblin zombie
MONS:  ogre zombie w:5 / centaur zombie / killer bee zombie
: if you.absdepth() > 6 then
SUBST: 2 = 3
: end
ITEM:  any scroll / any potion
MAP
........
.cccccc.
.c.1ddc.
.c.cccc.
.c.22.c.
.c2..2c.
.cc..cc.
........
ENDMAP

NAME:   minmay_orc_keep
TAGS:   vaults_room vaults_orient_n
DEPTH:  D:8-, Orc, Vaults
WEIGHT: 5 (Vaults), 10
: if you.in_branch("Vaults") then
MONS:   orc knight, orc warlord, orc sorcerer / orc high priest
SUBST:  % = $, @ = .
KMASK:  w = no_monster_gen
: elseif you.absdepth() > 11 then
MONS:   orc / orc warrior w:5, orc knight / orc warrior
MONS:   orc wizard / orc priest / orc sorcerer w:2 / orc high priest w:2
SUBST:  % = %*
: else
MONS:   orc, orc warrior / orc, orc wizard / orc priest
: end
: decorative_floor(_G, 'B', "orcish standard")
MAP
wwwB@Bwww
wcc+++ccw
wc1...1cw
wc.....cw
wc2...2cw
wc%3%3%cw
wc1%3%1cw
wcccccccw
wwwwwwwww
ENDMAP

NAME:   minmay_ogre_servants
DEPTH:  D:3-6
MONS:   ogre
NSUBST: " = 6:" / *:'
KITEM:  ' = large rock
KMONS:  "' = goblin
MAP
xxxxx
x"1"x
x"""x
x"""x
xx+xx
ENDMAP

# Very unpleasant kobold minivaults
NAME:   minmay_unpleasant_kobolds
TAGS:   transparent
DEPTH:  D:6-
MONS:   kobold ; dart ego:disjunction q:2 / w:3 kobold brigand ; dart ego:disjunction q:4
MONS:   kobold ; boomerang q:2 / w:3 kobold brigand ; boomerang q:4
MONS:   kobold ; dart ego:curare q:1 / \
        w:3 kobold brigand ; dart ego:curare q:2
MONS:   kobold blastminer
: if you.absdepth() > 13 then
SUBST:  1 = 3:100 4
: elseif you.absdepth() > 11 then
SUBST:  1 : 23
: elseif you.absdepth() > 7 then
SUBST:  1 : 12
: end
MAP
xx+xx
x111x
x111x
xx+xx
ENDMAP

# Elven Outpost
#   50-50 chance of spiral arms, 50-50 chance of a moat
NAME:    elves_outpost_lemuel
TAGS:    transparent no_pool_fixup
DEPTH:   D:11-, Orc, Elf
: if (you.in_branch("D") and you.depth() > 12) or you.in_branch("Elf") then
MONS:    deep elf pyromancer, deep elf knight / deep elf archer
MONS:    deep elf zephyrmancer / thermic dynamo w:4
NSUBST:  1 = 2 = %** / 2 = 1% / 3 = 11122 / 3 = 22333 / *:1
: else
MONS:    fire elemental / water elemental w:12
MONS:    deep elf pyromancer ; dagger . robe ego:fire_resistance . \
                               ring of protection from fire
MONS:    deep elf archer
NSUBST:  1 = 2 = %%* / 2 = 1% / 2 = 12 / 2 = 23 / *:1
: end
KMASK:   123"%*> = opaque
SHUFFLE: _? / bb, _' / ww
SUBST:   ?_'" = .
MAP
.?.....???..
?.'''__'''?.
?''__''''''.
?''bbbbbb_'.
._'b1111b_'.
._'"1111>'_.
.'_b1111b'_.
.'_bbbbbb''?
.''''''__''?
.?'''__'''.?
..???.....?.
ENDMAP

# Humans defending their loot
NAME:   minmay_ruffians
TAGS:   transparent
DEPTH:  D:6-10
MONS:   human; club | mace w:3 . animal skin | leather armour
MONS:   human; sling . animal skin | \
        leather armour
SUBST:  1 = 112.
KMONS:  3 = human; flail . ring mail | scale mail
KITEM:  3 = %
MAP
.........
.1.1.1...
.........
.x+xxx.1.
.x%%3x...
.xxxxx.1.
.........
ENDMAP

# Necromancer has a house with a fridge (and a nice garden) (Eino)
NAME:   eino_house_with_fridge
TAGS:   no_monster_gen no_item_gen transparent
DEPTH:  D:9-, Lair:2-
MONS:   patrolling necromancer, plant
: if you.branch() == "Lair" and you.depth() ~= dgn.br_depth(you.branch())
:   or you.branch() == "D" and you.depth () < 12 then
MONS:   river rat / wolf / yak / polar bear
MONS:   river rat simulacrum / wolf simulacrum / \
        yak simulacrum / polar bear simulacrum
: else
MONS:   hell rat / elephant / death yak / hydra
MONS:   hell rat simulacrum / elephant simulacrum / \
        death yak simulacrum / hydra simulacrum
: end
SUBST:  G = GG.
: vault_metal_statue_setup(_G, "G", "mystic cage")
MAP
............
.xxxxxxxxxx.
.x444x..%%x.
.x444+..xxx.
.x444x...Gx.
.xxxxx.3.4x.
.....x.413x.
.2T2.+....x.
..3..xxxxxx.
............
ENDMAP

# kobolds around a campfire
NAME:    lexackson_kobold_supper
DEPTH:   D:1-6
TAGS:    no_monster_gen
KPROP:   56' = no_tele_into
MONS:    kobold, plant, bush
: if you.absdepth() < 4 then
MONS:    kobold ; dagger . stone
: else
MONS:    kobold brigand ; dagger . throwing net q:2
: end
SUBST:   . = e f .:150
KITEM:   e = rat skeleton
KITEM:   f = frilled lizard skeleton
MONS:    rat / frilled lizard
KFEAT:   m = iron_grate
: single_cloud(_G, "P", "flame", false)
MARKER:  P = lua:fog_machine { cloud_type = "grey smoke", \
             pow_min = 3, pow_max = 3, delay = 100, \
             size = 1, walk_dist = 1, start_clouds = 1 }
SUBST:   y = 2 3 x:5
NSUBST:  W = 5:.
NSUBST:  t = 6:2 3 / 6:x / *:t
MAP
xxxxxxxxxxxxx
xtttttttttttxxxx
xtyyWWWyyyyytttx
xyy.....y3yyyttx
xy..s1s..m'5yytx
@...1P1..m'5'ytx
xy..s14..m'5yytx
xyy.....y2yyyttx
xtyyWWWyyyyyttxx
xttttttttxxttxxx
xxxxxxxxxxxxxx
ENDMAP

NAME:   nooodl_orcs_dogs
TAGS:   transparent vaults_hard
DEPTH:  D:11-, Orc, Vaults, !Vaults:$
WEIGHT: 5 (Vaults), 10
: if you.branch() == "Vaults" then
TAGS:   no_monster_gen
MONS:   orc warlord, orc knight w:20 / orc sorcerer
MONS:   peacekeeper / crystal guardian w:4
SUBST:  Gw = .
: else
:   if you.absdepth() > 11 then
MONS:   orc knight, orc w:5 / orc warrior / orc wizard
:   else
MONS:   orc warrior, orc / orc wizard
:   end
MONS:   warg
SUBST:  * = %, G : GG.
: vault_metal_statue_setup(_G, "G", "mystic cage")
: end
NSUBST: A = 2 = 122 / *:2, B = 2 = 122 / *:2
: decorative_floor(_G, 'F', "orcish standard")
: vaults_hard_standard(_G)
MAP
..................
.wwwwwww..wwwwwww.
.wxxxxxx++xxxxxxw.
.wx%...x..x...%xw.
.wx.AA.x..x.BB.xw.
.wxG33.+..+.33Gxw.
.wx.AA.x..x.BB.xw.
.wx*..%xFFx%..*xw.
.wxxxxxxxxxxxxxxw.
.wwwwwwwwwwwwwwww.
..................
ENDMAP

# This vault was built by evilmike, but the idea is mikee's. Who is really the
# evil one here?
NAME:   mikee_hates_you
TAGS:   no_monster_gen no_item_gen
DEPTH:  D:12-, !D:$
KPROP:  l = no_cloud_gen
KMONS:  1 = generate_awake merfolk avatar
KMONS:  2 = generate_awake merfolk impaler ; trident ego:distortion w:5 | \
                                             trident ego:draining . robe
KITEM:  > = |
KFEAT:  > = escape_hatch_down
: single_cloud(_G, "!", "foul pestilence", true)
SUBST:  ! = .
MAP
ccccccccccc
cccccc=2ccc
@=!!!!l1=>c
ccccccccncc
ccccccccncc
        @.
ENDMAP

# Inspired by the Jorge Luis Borges story "The Library of Babel".
NAME:    bh_hangedman_babel_library
TAGS:    transparent no_monster_gen no_item_gen
DEPTH:   D:10-, !D:$, Elf, !Elf:$
MONS:    arcanist w:6 / deep elf pyromancer
MONS:    occultist w:6 / deep elf zephyrmancer
ITEM:    randbook numspells:2 title:Dhcmrlchtdj
ITEM:    randbook numspells:2 title:Combed_Thunderclap disc:air
ITEM:    randbook numspells:2 title:Plaster_Cramp disc:earth
ITEM:    randbook numspells:2 title:Axaxaxas_mlö
ITEM:    randbook numspells:3 title:Forking_Paths owner:Ts'ui_Pên \
                  disc:hexes disc2:alchemy
ITEM:    randbook numspells:2 title:Sand
KITEM:   % = any potion
KFEAT:   ^ = shaft trap
KFEAT:   % = cache_of_baked_goods
: if you.branch() == "D" and you.depth() < 12 then
NSUBST:  1 = 1:. / *:1
: else
NSUBST:  1 = 1:2 / * = 12
: end
SHUFFLE: %def, defghi, bm, bm / ++
MAP
   xxx@xxx     xxx@xxx
  xx.....xx   xx.....xx
 xx1.....dxxxxxf.....1xx
xx....^....xbx....^....xx
@....^<^....1....^>^....@
xx....^....xmx....^....xx
 xxe.....1xxxxx1.....gxx
  xx.....xx   xx.....xx
   xxx@xxx     xxx@xxx
ENDMAP

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

# checkpoint with guards to alert nearby monsters, by Core Xii
NAME:    corexii_checkpoint
TAGS:    no_monster_gen no_item_gen allow_dup extra transparent
DEPTH:   D:4-, Elf
: if you.in_branch("Elf") then
MONS:    deep elf pyromancer / deep elf zephyrmancer
: elseif you.absdepth() > 11 then
MONS:    centaur / troll / kobold demonologist / orc knight
: elseif you.absdepth() > 7 then
MONS:    gnoll / ogre / kobold brigand / orc warrior
: else
MONS:    goblin / hobgoblin / kobold / orc
: end
SHUFFLE: &@X'mn / &@X'nm / @""Xmn / @""Xmn / @""Xmn
SUBST:   nX = x, '& = .
NSUBST:  1 = 2:1 / *:.
CLEAR:   "
MAP
Xxxxxxx
X&....&
X'xmmx'
X'n11x'
@'n11x@
Xxx+xxx
   @
ENDMAP

NAME:   corexii_shack
TAGS:   no_monster_gen no_item_gen allow_dup extra transparent
DEPTH:  D:2-6
NSUBST: + = 1:+ / *:x, m = 1:m / *:x, - = 1:1 / *:d
ITEM:   any weapon / any armour / w:5 any potion / w:40 nothing
MONS:   goblin / hobgoblin / kobold / orc, plant / w:100 nothing
MAP
........
..2..2..
.2x++x2.
.2m--m2.
.2m--m2.
.2xmmx2.
..2222..
........
ENDMAP

# Centaur isle (Lemuel)
NAME:   centaur_isle
TAGS:   no_monster_gen no_pool_fixup no_rotate no_descent
DEPTH:  D:6-12, Shoals
MONS:   centaur, yaktaur, faun, centaur warrior
KFEAT:  d = cache_of_baked_goods
: if you.absdepth() > 11 then
NSUBST: 1 = 1:4 / 2:33 / * = 123
: end
SUBST:  ? = *$
MAP
          wwww
       wwwwwwww
    wwwwwwwwwwwwwww
 wwwwwwwwwwwwwwwwwwwww
wwwwwwww..wwwwwwwwwwwww
wwwwww.11...wwwwwwwwwww
wwwww........wwwwwwwwww
wwwww...x+x..wwwwwwwwww
wwww..11x>x..wwwwwwwww
 www...xx?x11wwwwwwwww
 www..xx??x.wwwwwwwww
 wwww.xx?dx.wwwwwww
  wwww.xxxx.wwwwww
   wwwwww..wwwww
    wwwwwwwwwww
       wwwwww
ENDMAP

NAME:   kilobyte_rumbling_trees
TAGS:   transparent misc_elf_vault
DEPTH:  Lair:2-, Elf, Depths
WEIGHT: 5 (Elf), 10
MONS:   black bear w:5 / polar bear / wolf
MONS:   shapeshifter / glowing shapeshifter
MONS:   ice dragon / spark wasp w:20 / caustic shrike
MONS:   patrolling boggart, patrolling deep elf archer
MONS:   patrolling spriggan druid
: if you.in_branch("Lair") then
SUBST:  ' = 4, 6 = .
: elseif you.in_branch("Elf") then
NSUBST: ' = 1:6 / 1:% / *:1, 1 = 3:2 / * = 25..
: else
NSUBST: ' = 1:6 / 1:%* / 1:. / *:1, 1 = 2:3 / * = 223.
: end
FTILE:  .t123456%*@ = floor_moss
MAP
ttttt       tttt@t
tttttt tt ttttt1tt
t1tttttttttttt.ttt
@t..ttttttttt.tttt
tttt.'t*ttt..tttt
tttttt.6..'ttttt
 ttttt.'tttttttt
 tttt'ttttttttt
tttt.tttttttt
tttt1tttttt
 tttt@ttt
ENDMAP

NAME:    billiards_dpeg
TAGS:    transparent
DEPTH:   D:6-, Elf
MONS:    orc wizard, deep elf pyromancer, arcanist / deep elf zephyrmancer
NSUBST:  X = 1:+ / *:x
: if you.absdepth() > 11 then
NSUBST:  1 = 1:2 / 1:3 / * = 22233
SUBST:   * = *|
: elseif you.absdepth() > 8 then
NSUBST:  1 = 1:2 / * = 1
SUBST:   * = *:5 |:2 %:3
: else
SUBST:   * = * %:5
: end
MAP
.............
.xxxxxxxxxxx.
.x*1......bx.
.x11......bx.
.x..bbbbb+bx.
.x..bxxxb.bx.
.x..bbbbb.bx.
.x..+......x.
.xbbbbbbb..X.
.xxxxxxxxxXx.
............0
ENDMAP

NAME:    kb_tengu_band
TAGS:    no_pool_fixup transparent
DEPTH:   D:12-, Shoals, Swamp
WEIGHT:  5
MONS:    tengu warrior, tengu conjurer
MAP
 .........
..wwwww....
.wwttwww...
.wtt2*tww..
.wwwt*1....
..wwwwww...
 .........
ENDMAP

NAME:   minmay_rotating_lava
TAGS:   no_monster_gen transparent no_descent
DEPTH:  D:10-
MONS:   hell hound, hell knight band, hell knight
ITEM:   potion of enlightenment pre_id q:3
KFEAT:  ' = floor
KMASK:  .123*< = opaque
KPROP:  .123*< = no_tele_into
TILE:   c = wall_stone_scorched
MAP
'''''''''''''''
'ccccccccccccc'
'c.....3.....c'
'c.ccccccccc.c'
'c.c......1c.c'
'c.c.cclcc.c.c'
'c.c.c...c1l.c'
'c<c2c.3<c.l.c'
'c.c.c***c1l.c'
'c.c.ccccc.c.c'
'c.c...<..1c.c'
'c.ccccccccc.c'
'c...1.1.1...c'
'cccclllllcccc'
'''''''d'''''''
ENDMAP

NAME:   evilmike_spriggan_trog_shrine
TAGS:   transparent
DEPTH:  Depths, Elf
MONS:   spriggan berserker
: if you.absdepth() < 19 then
NSUBST: 1 = 2=2 / 1
: end
SUBST:  2 = 1'
KMONS:  _ = spriggan berserker
KFEAT:  _ = altar_trog
SUBST:  C : c', B : +', D : +', E : +c
SUBST:  F = ccc+
COLOUR: # = red
FTILE:  *|_1'c = floor_sprouting_squares
FTILE:  +t = floor_moss
FTILE:  # = floor_rough_lightred
: single_cloud(_G, "#", "flame", false)
SUBST:  '# = .
MAP
.................
.ccccccccccccccc.
.cttcc#ccc#ccttc.
.c*1''''_''''1|c.
.c'''''''''''''c.
.c''''''C''''''c.
.cccctcBcBctcccc.
....ccc'C'ccc....
   ..cc'''cc..
    ..F'2'F..
   ..cc'''cc..
 ...ccc'c'ccc...
 .ccctcDcDctccc.
 .c'''''c'''''c.
 .c'''c'''c'''c.
 .c'1'c'''c'1'c.
 .ctcccE+Eccctc.
 .ccc#c...c#ccc.
 ...............
   .....@.....
ENDMAP

NAME:  kb_lookout_dungeons_type
TAGS:  extra no_pool_fixup transparent
DEPTH: D:5-12
MONS:  centaur, bush
KMASK: w = no_monster_gen
MAP
 ....
......
......
...wwxxxx...
@..w1.%.2..@
...wwxxxx...
......
......
 ....
ENDMAP

NAME:   wad_orctagon
TAGS:   transparent
DEPTH:  D:2-4
WEIGHT: 4
MONS:   orc
MAP
......xxxxxxxxxxxxxx......
.....xxxxxxxx.1.1xxxx.....
....xx.xxxxx.G..G.xxxx....
...xx...xxxx......xxxxx...
..xxxx.xxxxxx....xxxxxxx..
.xxxxx+xxxxxx.mm.xxxxxxxx.
.xxIx.I.xIx.xx++xx.xxx...x
@+...m.m...x......x.+.mmm@
.xxIx.I.xIx.xx++xx.xxx...x
.xxxxxxxxxxxx.mm.xxxxxxxx.
..xxxxxxxxxxx....xxxxxxx..
...xxxxxxxxx......xxxxx...
....xxxxxxxx.G..G.xxxx....
.....xxxxxxxx.1.1xxxx.....
......xxxxxxxxxxxxxx......
ENDMAP

NAME:    hangedman_summoners_spam
TAGS:    no_monster_gen patrolling
DEPTH:   Depths, Elf, Crypt, Abyss
MONS:    boggart, orc high priest, kobold demonologist
MONS:    shadow demon, deep elf demonologist, glowing orange brain, vampire mage
KMONS:   8 = mummy priest
ITEM:    book of callings w:5 / book of the wilderness w:20 / \
         grand grimoire w:5 / randbook disc:summoning numspells:6
ITEM:    manual of summonings
ITEM:    amulet of magic regeneration w:5 pre_id / \
         amulet of magic regeneration randart
ITEM:    any ally misc / orb randart artprops:Summ
KITEM:   % = any, any / gold / nothing, any / nothing
KITEM:   _ = any ally scroll pre_id, any ally scroll pre_id / nothing
KFEAT:   _ = altar_sif_muna
KFEAT:   ? = altar_lugonu
KFEAT:   < = exit_abyss
KFEAT:   C = c
KMASK:   "'@ = !no_monster_gen
SHUFFLE: 12, 34, 12 / 34
NSUBST:  ' = 1:@ / * = .@
SUBST:   c : ccb
: if you.in_branch("Abyss") then
SUBST:   bc = xcccccvb
SUBST:   %efg = $, * = <, _ = ?
: elseif you.in_branch("Crypt") then
SUBST:   5 = 7, 6 = 8
: else
SHUFFLE: 56 / 78
TILE:    C = wall_stone_magic_shelf
: end
MAP
ccccccccccccccc
c24C5de6fd5C32c
c%%C*g...g*C%2c
c..cccc+cccc..c
c.............c
c%cG..%_%..Gc%c
c.............c
c..ccc+++ccc..c
c1%c.......c%%c
c13c"""U"""c14c
cccc'''''''cccc
ENDMAP

NAME:    hangedman_minor_magic
TAGS:    no_monster_gen transparent
DEPTH:   D:9-11, Orc
MONS:    crimson imp, white imp, shadow imp, iron imp
MONS:    orc, orc wizard w:39 / Blorkula the orcula w:1, swamp drake
KMONS:   0 = orc ; robe . wand of charming | wand of flame
KMONS:   89 = deep elf pyromancer / deep elf zephyrmancer
KMONS:   & = obsidian bat
# FIXME: make these the wizard hat tiles only.
KITEM:   8d = robe, hat w:40 / hat good_item, \
              hat w:20 / hat good_item
KITEM:   9e = book of minor magic
SUBST:   - = +
KMASK:   de89 = no_item_gen
SHUFFLE: 1234
COLOUR:  F = red
: if you.in_branch("Orc") then
SUBST:   7 = &
: end
FTILE:   F = floor_pebble_lightred
TILE:    c = wall_stone_magic_shelf
{{
  local fog = chained_fog_machine {
                            cloud_type = 'flame', pow_min = 6, pow_max = 6,
                            delay = 100, size = 1, walk_dist = 0, excl_rad = 0
                          }
  lua_marker('F', fog)
}}
MAP
@@xxxxxxxxxxx
..xxxxxxxxxxx
.5xx1xx2xxcxx
.5xx++++xx9xx
..x..60..xexx
..x.F..F.x+xx
@.-...6..-7xx
@.-...0..-'xx
..x.F..F.x+xx
..x..60..xdxx
.5xx++++xx8xx
.5xx3xx4xxcxx
..xxxxxxxxxxx
@@xxxxxxxxxxx
ENDMAP

NAME:  guppyfry_early_elven_hall
TAGS:  patrolling no_monster_gen transparent
DEPTH: D:7-10
MONS:  deep elf pyromancer, deep elf zephyrmancer, fungus
ITEM:  any scroll / any potion / any book
SUBST: - = 33..GTd$%
: if you.depth() > 8 then
SUBST: 1 = 11122
: end
MAP
.............
.xxxxxxxxxxx.
.x...........
.x...........
.x+++mxxxxxG.
.x-.-+.......
.x1..+...>...
.x-.-+.......
.x+++mxxxxxG.
.x...........
.x...........
.xxxxxxxxxxx.
.............
ENDMAP

NAME:   guppyfry_early_orc_mine
TAGS:   patrolling no_monster_gen transparent
DEPTH:  D:2-5
MONS:   orc, goblin, hobgoblin, orc priest, orc wizard, orc warrior
ITEM:   stone / large rock q:1 w:1
NSUBST: ? = 2:$ / 2:d / *:.
: if you.absdepth() > 3 then
NSUBST: - = 1:65 / 1:5 / 1:4 / 3:1 / 2:. / 2:x / 2:I / *:.
: else
NSUBST: - = 2:1 / 2:2 / 2:3 / 2:. / 2:x / 2:I / *:.
: end
MAP
..............
.x.xxxxxxxxxx.
.x..xxx.x..xx.
.xx...xx.xx.x.
..xx..-.x.xx-.
..x.x.-?x.xxx.
..xxx?---?.1x.
..-xx?---x.xx.
..xx.?---xxxx.
.xx....-xxxxx.
.xxxx.xxxxxxx.
..............
ENDMAP

NAME:    guppyfry_library_mini
TAGS:    patrolling no_monster_gen transparent misc_elf_vault
DEPTH:   Orc, Snake, Elf, Zot
ITEM:    gold / any scroll / any book w:4
SUBST:   ? = 123d
: if you.in_branch("Orc") then
MONS:    orc, orc warrior, orc wizard w:9 / orc sorcerer w:1
: elseif you.in_branch("Snake") then
MONS:    naga, naga warrior, naga mage w:9 / nagaraja w:1
: elseif you.in_branch("Elf") then
MONS:    deep elf pyromancer / deep elf zephyrmancer
MONS:    deep elf knight / deep elf archer
MONS:    deep elf death mage / deep elf elementalist
: else
MONS:    any draconian, draconian scorcher
MONS:    draconian annihilator / draconian knight
: end
TILE:    c = wall_studio
MAP
............
.xxmxxxxmxx.
.x.?....?.x.
.x........x.
.x.xx++xx.x.
.+1cd33dc.+.
.+.cd33dc1+.
.x.xx++xx.x.
.x........x.
.x.?....?.x.
.xxmxxxxmxx.
............
ENDMAP

NAME:    lightli_giant_bouncers
DEPTH:   Depths
MONS:    fire giant, frost giant, titan
SHUFFLE: 12
KMASK:   l = no_monster_gen
FTILE:   =.123*|+ = floor_mystic_chasm
MAP
bbbbbbbbbbb
b.......bbb
b.bbbbb+bbb
b.l1b...bbb
b.bbb.212bb
b.bbb.121bb
b.l2b.....b
b.bbbb.3..b
b.b**+....b
b=b|*bbbbbb
'@nbbbbbbbb
ENDMAP

NAME:   lightli_church_of_beogh
TAGS:   vaults_hard vaults_orient_e
DEPTH:  D:6-, Orc, Vaults, !Vaults:$
MONS:   orc, orc warrior, orc knight, orc priest
MONS:   orc wizard, orc high priest, orc sorcerer
KMONS:  8 = orc warlord
KFEAT:  _ = altar_beogh
: if you.branch() == "D" or you.branch() == "Orc" then
SUBST:  CD = c
:   if you.absdepth() < 9 then
SUBST:  - = =
NSUBST: 0 = 6:. / 2:1 / * = 1:9 2:1
:   elseif you.absdepth() < 12 then
SUBST:  - = +
NSUBST: 0 = 2 = 33322 / 2:. / * = 2111
:   else
SUBST:  4 = 6, 5 = 47, - = +
NSUBST: 0 = 1:8 / 1:3 / 2:3 / 4:1 / * = 1:8 2:4 3:2
:   end
: else
SUBST:  4 = 9, 5 = 990, 1 = 3
NSUBST: 0 = 1:8 / 1:893 / 2:3 / 2:6 / 2 = 30. / *:.
SUBST:  C- = ., c = x, * = *%
:   decorative_floor(_G, 'D', "orcish standard")
FTILE:  .+_%*D3456098I = floor_metal_gold
: end
MAP
ccccccccccccccccccccC
cccc..000........cccD
c%ccI.050I..I..I..IcC
c*%c..000..........1C
c_%+4.050..........1-
c*%c..000..........1C
c%ccI.050I..I..I..IcC
cccc..000........cccD
ccccccccccccccccccccC
ENDMAP

NAME:   lightli_orcish_oven
TAGS:   vaults_room vaults_orient_s
DEPTH:  D:6-11, Orc, Vaults
WEIGHT: 5 (Vaults), 10
MONS:   orc warrior, orc, orc warlord, orc knight w:14 / lindwurm w:1
KITEM:  d = stone q:1 no_pickup
KFEAT:  e = cache_of_meat
KFEAT:  f = cache_of_baked_goods
: if you.in_branch("Vaults") then
SUBST:  1 = 3, 2 = 4, @ = ., d = f, g = h
: else
SUBST:  d = def
: end
: dgn.delayed_decay(_G, 'g', 'adder corpse / electric eel corpse')
: dgn.delayed_decay(_G, 'h', 'hog corpse / lindwurm corpse')
MAP
xxxxxxxxxx
xvvvggggxx
xvl+.222.x
xvvv.212.x
xxxx...xxx
xxx.x..xxx
xxx+xx..xx
x$$$xx..xx
xdexx..xxx
xxxx.@xxxx
ENDMAP

NAME:     grunt_tower_of_power
TAGS:     vaults_hard vaults_orient_s no_monster_gen patrolling
DEPTH:    Depths, Vaults, !Vaults:$
: if you.in_branch("Vaults") then
MONS:     lich, arcanist / ogre mage / deep elf annihilator, tengu reaver
SUBST:    c : vvb, @' = .
:  vaults_hard_standard(_G)
: else
MONS:     lich, occultist / tengu conjurer / nagaraja, tengu reaver
NSUBST:   ' = 1:2 / 1:2. / *:.
: end
ITEM:     book of power, robe good_item, hat good_item, robe, hat
KFEAT:    _ = altar_vehumet
SHUFFLE:  ef, gh, ij
TILE:     v = dngn_metal_wall_magenta
TILE:     c = dngn_stone_wall_magenta
TILE:     b = dngn_crystal_magenta
MAP
      ccccc
     ccedfcc
     ceh_gfc
     c..1..c
cccccc..'..cccccc
c.fhccc...cccge.c
ce2.cccc+cccc.2fc
cg.'cc.....cc'.hc
cccc+.......+cccc
 ccc..2.U.2..ccc
 cc...........cc
 @....U.3.U....@
 cc...........cc
  cc....U....cc
   cc.......cc
    cc..@..cc
ENDMAP

NAME:    grunt_absolute_annihilation
DEPTH:   Depths
MONS:    ancient lich
MONS:    deep elf annihilator / draconian annihilator w:5 / lich
MONS:    kobold fleshcrafter w:40 / tengu conjurer w:20 / \
         occultist w:20 / orc sorcerer w:20 / nagaraja / tengu reaver
ITEM:    book of annihilations, book of power, book of conjurations
ITEM:    randbook disc:conjuration, staff of conjuration
KFEAT:   _ = altar_vehumet
KFEAT:   z = c
SHUFFLE: efgh
: tile("z = " .. crackle_def(_G))
MAP
   xxxxxxxxxxx
  xxczccccczcxxxxxxxxx
  xcc2ccccc2cccccccccxx
  xc.c.ccc.c.ccbbbbbccx
 @xc.c.ccc.c.cbbe.fbbcx
.3.c.c.czc.c.cb.2...bcx
@U..3.3...3.3.=.._1dbcx
.3.cczc.c.czccb.2...bcx
 @xcccc.c.ccccbbg.hbbcx
  xcccc.c.cccccbbbbbccx
  xccccc2ccccccccccccxx
  xxcccczccccxxxxxxxxx
   xxxxxxxxxxx
ENDMAP

NAME:   marbit_kobold_abyssish
TAGS:   no_monster_gen
DEPTH:  D:11-
MONS:   kobold brigand ; dart ego:disjunction, kobold demonologist
KFEAT:  _ = altar_lugonu
KPROP:  1 = no_tele_into
MAP
xxxxxxxxxxxxxxx
xxlllxx<.xlll%x
xlllllxx.lll2.x
@x.llll..lll._x
x.xl1lllllll2>x
xlllxlllx1lll%x
xxxxxxxxxxxxxxx
ENDMAP

NAME:    sigmund_edmund_badplayer
TAGS:    no_item_gen no_monster_gen no_pool_fixup no_trap_gen transparent
DEPTH:   D:4-7
MONS:    plant / bush
KMONS:   S = Sigmund
KMONS:   E = Edmund
KITEM:   ( = flail / any armour
: kitem("s = " .. scythe() .. " / robe")
KFEAT:   F = cache_of_meat / cache_of_fruit
SHUFFLE: SE, 1' / 'F
NSUBST:  S = 1:S / *:., E = 1:E / *:., 1 = 1:1 / * = 1.
SUBST:   ' = .
: decorative_floor(_G, 'V', "floral vase")
veto {{ return you.uniques("Edmund") or you.uniques("Sigmund") }}
MAP
....................
.xxxxxxxxxxxxxxxx1..
.xEEEExWS....x.'x11.
.x...'xWE.......x11.
.x..xxxxxx.xxx..x11.
.xV........xsxx.xxx.
.xx...........xSSSx.
.x(..............Sx.
.xxxxxxx..xxxxxxxxx.
....................
ENDMAP

NAME:  cheibrodos_gnoll_hut
TAGS:  no_monster_gen no_item_gen transparent
DEPTH: D:2-5
KMONS: P = bush
MONS:  jackal, hound, gnoll
KFEAT: S = shaft trap
: if you.depth() > 2 then
SUBST: 1 = 2
: end
TILE:  c = wall_stone_magic_shelf
MAP
...@...
..P.P..
xxx+xxx
x%+...x
xcx1.1x
xS+.3.x
xxxxxxx
ENDMAP

NAME:  lightli_minifort
TAGS:  no_pool_fixup
DEPTH: D:4-, Depths
: if you.in_branch("Depths") then
MONS:  fire giant / frost giant / titan
TILE:  c : wall_stone_scorched / stone_wall_depths
: elseif you.absdepth () > 11 then
MONS:  orc knight band
: elseif you.absdepth () > 8 then
MONS:  cyclops band
: elseif you.absdepth () > 5 then
MONS:  orc warrior band
: else
MONS:  gnoll sergeant band
: end
: decorative_floor(_G, 'V', "floral vase")
MAP
wwwwwwwww
wccwwwccw
wcccccccw
wwcV.*cww
wwc.1.cww
wwc...cww
wccc+cccw
wccw.wccw
wwww@wwww
ENDMAP

NAME:  lightli_wizard_tower
TAGS:  no_monster_gen patrolling
DEPTH: D:9-
MONS:  crimson imp / drude w:2, arcanist, occultist
ITEM:  any book, any scroll
: if you.depth() > 11 then
SUBST: 2 = 23
: end
SUBST: c : c.
TILE:  c = wall_stone_magic_shelf
MAP
   bbbb
  bbdebb
 bb....bb
bb......bb
b.c.12.c.b
b........b
bb......bb
 bb....bb
  bb..bb
   b++b
ENDMAP

NAME:   cheibrodos_lost_city_excavation
TAGS:   no_item_gen no_monster_gen
DEPTH:  D:11-, Depths
: if you.in_branch("D") then
MONS:   deep elf pyromancer w:8 / fire elemental w:5
MONS:   arcanist / occultist
: else
MONS:   occultist / sun demon, lich
: end
ITEM:   randbook / any scroll
NSUBST: 1 = 1:1 / 1:. / * = 1.
SUBST:  - = .lx
TILE:   c = wall_stone_scorched
: decorative_floor(_G, 'V', "broken floral vase")
MAP
llllll
llllllllll
.l-x-llllllllllllll
@.+1xlxx-lllllllllll
.lx.-l-1xlxx-lcxxcll
lll.llx...+1xlxddxll
llx.xlll.l-.xlx22xll
ll+1.l-x.lx..lx..xll
llx--..1+l-.xlx..xll
llllll-xxlx1+.+.Vxll
llllllllll-xxlcxxcll
    llllllllllllllll
        lllllllllll
ENDMAP

NAME:  minmay_a_box_with_orc_wizards_in_it
TAGS:  transparent
DEPTH: D:4-7
MONS:  orc wizard, orc priest
ITEM:  any book
SUBST: 1 : 1:49 2:1, 1 = 1., 2 = 2.
MAP
  .....
 ..xxx..
...m1x...
.mmm1xxm.
.m11d11m.
.mxx1mmm.
...+1m...
 ..xxx..
  .....
ENDMAP

# Very hungry Elvish explorers and their campfire, mounts and pet.
# Sometimes they have starved to death.
NAME:   beargit_elvish_explorers
DEPTH:  D:12-, Depths, Crypt
TAGS:   transparent patrolling no_monster_gen no_trap_gen
: if you.in_branch("D") then
:     if you.depth() < 14 then
MONS:   deep elf archer; shortbow good_item . quarterstaff \
            . robe good_item
MONS:   deep elf knight; quarterstaff good_item . leather armour good_item
MONS:   elephant, warg / hell hound w:5
:     else
MONS:   deep elf archer; longbow good_item . quarterstaff \
            . robe good_item
MONS:   deep elf knight; lajatang good_item . scale mail good_item
MONS:   elephant / dire elephant, warg / hell hound / raiju
:     end
MONS:   plant / fungus, nothing
: elseif you.in_branch("Crypt") then
KITEM:  1 = longbow good_item, quarterstaff, robe good_item
KITEM:  2 = lajatang good_item, chain mail good_item
KMONS:  1 = spectral deep elf master archer
KMONS:  2 = spectral deep elf blademaster
KMONS:  3 = spectral hellephant
KMONS:  4 = spectral shadow dragon
KMONS:  6 = deep elf death mage w:30 / vampire mage / \
            lich / ancient lich / dread lich
KITEM:  P = rat skeleton
SUBST:  5 = -
: else
# The elves have mastered the dungeon and allied with the darkness.
MONS:   deep elf master archer; longbow good_item | longbow randart \
            . chain mail good_item | quicksilver dragon scales
MONS:   deep elf blademaster; lajatang good_item | lajatang randart \
            . shadow dragon scales good_item | shadow dragon scales randart
MONS:   hellephant, alderking w:5 / shadow dragon
SUBST:  56 = -
: end
: if you.in_branch("Crypt") then
SUBST:  x = c
COLOUR: t = brown
TILE:   t = dngn_tree_dead
: set_feature_name("tree", "dead tree")
FTILE:  - = floor_crypt
: else
FTILE:  -123456t = floor_grass_dark
FTILE:  P = floor_sand
: end
: single_cloud(_G, "P", "flame", true)
MARKER: P = lua:fog_machine { cloud_type = "grey smoke", \
            pow_min = 3, pow_max = 3, delay = 100, \
            size = 1, walk_dist = 1, start_clouds = 1 }
MAP
    xx.@.xxx
    xt----tx
    xt555ttx
    xt----tx
    xtt--ttx
    xt----tx
    xt--t-tx
    xt----tx
   xxt-t--tx
  xxttt---txxxx
 xxtt-----ttttx
xxtt---t----4txx
xttWWW---P---ttx
xt-WwWW----3--tx
xt------2163--tx
xttt---------ttx
xxxtt--tttttttxx
  xxt---tttttttx
   xt----t----5.
   xtt--------5@
   xxtt-----t-5.
    xxtttttttttx
     xxxxxxxxxxx
ENDMAP

NAME:   the_bakery
DEPTH:  D:7-14
MONS:   spriggan col:white name:baker n_suf n_noc ; robe . dagger
# It's a chef's hat. Maybe we should get a tile for that?
ITEM:   hat
KFEAT:  e = cache_of_baked_goods
: if crawl.one_chance_in(8) then
SUBST:  = = +
:   dgn.delayed_decay(_G, 'f', 'spriggan name:baked n_adj n_spe n_des corpse')
: else
SUBST:  =f = x
: end
MAP
xxxxxx
xee=fx
x.xxxx
x..1dx
x+xxxx
ENDMAP

NAME:   hangedman_fish_farm
TAGS:   no_monster_gen no_pool_fixup patrolling
DEPTH:  D:9-14
KMONS:  A = merfolk ; spear
ITEM:   throwing net / spear
KFEAT:  % = cache_of_meat
KFEAT:  e = shallow_water
:       dgn.delayed_decay(_G, 'e', 'electric eel corpse')
MAP
xxxxxx
x.dd%x
+...Ax
xWWeex
xxxxxx
ENDMAP

# An ogre roasts intruders over his little campfire.
NAME:   grunt_ogre_cave
TAGS:   extra no_monster_gen no_trap_gen patrolling
DEPTH:  D:7-14
{{
  local twochance = you.absdepth() - 8
  local onechance = 7 - twochance
  if twochance <= 0 then
    mons("ogre")
  elseif onechance <= 0 then
    mons("two-headed ogre")
  else
    mons("ogre w:" .. onechance .. " / two-headed ogre w:" .. twochance)
  end
}}
ITEM:   throwing net
KFEAT:  % = cache_of_meat
KITEM:  g = orc skeleton / human skeleton / elf skeleton / dwarf skeleton
: single_cloud(_G, "O", "flame", false)
MAP
 xxxxx
xxxxxxx
xx.1gxx
xx%Ogxx
xxd..xx
 xxx.xx
 xx.xx
 xx.xx
xx.xx
 .g.
  @
ENDMAP

NAME:     blue_anna_alchemist
TAGS:     extra
DEPTH:    D:5-11
MONS:     kobold brigand ; wand of flame pre_id . short sword . \
                           dart ego:poisoned | dart ego:curare w:5
ITEM:     potion of moonshine w:50 pre_id / potion of ambrosia pre_id
KFEAT:    e = cache_of_fruit
SUBST:    e : e.
: decorative_floor(_G, 'V', "floral vase")
MAP
    c++c
ccccc..ccccc
cddc....cddc
cde+.1..+edc
ccccV..Vcccc
cccccccccccc
ENDMAP

NAME:    hellmonk_jugg_or_not
TAGS:    no_monster_gen no_item_gen no_descent
DEPTH:   D:13-, Orc:1
WEIGHT:  3
MONS:    juggernaut
KFEAT:   B = altar_nemelex_xobeh
SHUFFLE: DE
MARKER:  P = lua:transp_loc("jugg_or_not_entry")
MARKER:  Q = lua:transp_dest_loc("jugg_or_not_entry")
MARKER:  R = lua:transp_loc("jugg_or_not_exit")
MARKER:  S = lua:transp_dest_loc("jugg_or_not_exit")
MARKER:  D = lua:transp_loc("jugg_or_not_jugg")
MARKER:  F = lua:transp_dest_loc("jugg_or_not_jugg")
MARKER:  E = lua:transp_loc("jugg_or_not_not")
MARKER:  G = lua:transp_dest_loc("jugg_or_not_not")
MARKER:  H = lua:transp_loc("jugg_or_not_jugg_end")
MARKER:  K = lua:transp_dest_loc("jugg_or_not_jugg_end")
MARKER:  J = lua:transp_loc("jugg_or_not_not_end")
MARKER:  L = lua:transp_dest_loc("jugg_or_not_not_end")
MAP
      ..........
  ....nnnnnnnnnn.
 .nnnnnF..1HnK|nn.
@PnQDEnnnnnnnn|RnS.
 .nnnnnG..BJnL|nn.
  ....nnnnnnnnnn.
      ..........
ENDMAP

NAME:   nicolae_grassy_gnolls
TAGS:   transparent
DEPTH:  D:1-8
KMONS:  p = plant
: if you.depth() == 1 then
KMONS:  1 = gnoll
: elseif you.depth() == 2 then
KMONS:  1 = gnoll band
: elseif you.depth() == 3 then
KMONS:  1 = gnoll bouda band / gnoll band
: elseif you.depth() == 4 then
KMONS:  1 = gnoll sergeant band / gnoll bouda band / gnoll band
: else
KMONS:  1 = gnoll bouda band / gnoll sergeant band / gnoll band
KMONS:  2 = gnoll bouda / gnoll sergeant
NSUBST: - = 2 / -
: end
NSUBST: - = 1 / p```
SUBST:  P = pp`, . = ...`
FTILE:  `p12 = floor_grass_dark
MAP
 .......
..PPPPP..
.PP---PP.
.P-----P.
.P-----P.
.P-----P.
.PP---PP.
..PPPPP..
 .......
ENDMAP

NAME:   nicolae_splish_splash
TAGS:   transparent
DEPTH:  D:12-, Shoals
KMONS:  1 = water nymph / merfolk aquamancer
KFEAT:  1 = w
: if you.branch() == "D" then
NSUBST: w = 3=1 / 2=1ww / w
: else
NSUBST: w = 4=1 / 4=1w / w
: end
SUBST:  M = w.
MAP
   ...   ...
  ..... .....
 ...M.....M...
...MwM...MwM...
..MwwwM.MwwwM..
...MwwwMwwwM...
 ...MwwwwwM...
  ...MwwwM...
 ...MwwwwwM...
...MwwwMwwwM...
..MwwwM.MwwwM..
...MwM...MwM...
 ...M.....M...
  ..... .....
   ...   ...
ENDMAP

NAME:   dreamdust_gnoll_farm
TAGS:   no_monster_gen transparent
DEPTH:  D:4-7
MONS:   gnoll ; halberd, hound
ITEM:   any potion no_pickup
NSUBST: . = 2=1 / 3=1. / 2 / 1=2. / .
KMONS:  p = fungus
COLOUR: pc = brown
FTILE:  p' = floor_mud
: single_cloud(_G, "!", "flame", false)
MAP
..............
.pppppp.ccccc.
.pWWWWp.c.!dc.
.pppppp.c...c.
.pWWWWp.cc+cc.
.pppppp.......
..............
ENDMAP

NAME:   dreamdust_gnoll_shepherd
TAGS:   no_monster_gen no_item_gen transparent
DEPTH:  D:7-11, Lair
KMONS:  1 = gnoll bouda ; quarterstaff
KMONS:  2 : yak / dream sheep
NSUBST: . = 5 = 2. / .
MAP
.....
..1..
.....
ENDMAP

NAME:   dreamdust_looks_like_rain
TAGS:   transparent no_monster_gen patrolling
DEPTH:  D:13-, Depths
: if you.in_branch("D") then
MONS:   sky beast
KMONS:  A = air elemental / wind drake
: else
MONS:   air elemental
KMONS:  A = titan / storm dragon
: end
KFEAT:  A = stone_arch
NSUBST: . = 2=1 / 3=1. / .
: if crawl.coinflip() then
MARKER: A = lua:fog_machine { cloud_type='rain', pow_min = 10, \
                              pow_max = 10, delay = 10, size = 1 }
: else
:   single_cloud(_G, "A", "thunder", false)
: end
FTILE: .1A = floor_pebble_cyan
MAP
 ...
.....
..A..
.....
 ...
ENDMAP

# Robin is capable of hurling Ijyb at the player, but sadly, instances where a
# player was killed by a projectile Ijyb are few and far between. Here, we put
# the two goblin uniques together to increase the chances of a lethal Ijyb toss.
# Robin's band is reduced from its usual 10-12 to 5-6, to increase the chances
# that Ijyb gets thrown instead of a non-unique goblin.
NAME:   nicolae_goblin_pals
DEPTH:  D:3-5
TAGS:   transparent
KMONS:  1 = Robin, goblin / hobgoblin
KMONS:  2 = Ijyb, goblin / hobgoblin
# The usual ratio of Robin's band is goblin w:30 / hobgoblin, but here it has
# slightly more hobgoblins to compensate for the reduction in size.
KMONS:  3 = goblin / hobgoblin
NSUBST: ` = 5=3 / 3. / .
MAP
........
........
..````..
..`1.`..
..`.2`..
..````..
........
........
ENDMAP

# A shopkeeper has learned why there are no NetHack-style shops in this dungeon.
NAME:   nicolae_nh_ransacked_shop
TAGS:   transparent patrolling no_item_gen
DEPTH:  D:4-10
KITEM:  1d = any armour no_uniq w:9 / any weapon no_uniq w:1 / nothing w:40
KMONS:  1 = orc priest band / orc wizard band / orc warrior band / \
            kobold brigand band
KFEAT:  + = broken_door / +
NSUBST: D = + / c, E = e / .
KPROP:  e = bloody
: dgn.delayed_decay(_G, "e", "human corpse")
MAP
xx     xx
xcDDDDDcx
xcEEEEEcx
xcdddddcx
xcdd1ddcx
xcdddddcx
xcccccccx
xxxxxxxxx
ENDMAP

NAME:    mainiacjoe_okawaru_digging_arena
TAGS:    no_monster_gen no_item_gen transparent patrolling
DEPTH:   D:11-
WEIGHT:  5
MONS:    human, tengu warrior, tengu reaver
MONS:    two-headed ogre, ettin, vampire, vampire knight
KMONS:   8 = gargoyle
KMONS:   9 = war gargoyle
KFEAT:   C = altar_okawaru
ITEM:    any armour / animal skin w:5, any weapon / boomerang q:1 w:5
ITEM:    manual of fighting / manual of armour / \
         manual of dodging / manual of shields / manual of stealth
ITEM:    ring mail randart / scale mail randart / chain mail randart / \
         plate armour randart / kite shield randart / tower shield randart
ITEM:    manual of maces & flails / manual of axes / manual of polearms / \
         manual of staves / manual of short blades / manual of long blades / \
         manual of ranged weapons / manual of throwing
ITEM:    great mace randart / battleaxe randart / glaive randart / \
         lajatang randart / rapier randart / great sword randart
KITEM:   C = wand of digging charges:1
# Autoexplore will stop to look at a mediocre non-mundane weapon,
# so players with instant autoexplore can see they've entered a vault.
KITEM:   ? = mace good_item / falchion good_item
SHUFFLE: 23 / 45 / 67 / 89, fi / gh
FTILE:   `"C23456789defghi?xn+ = floor_sand
KMASK:   13579defghi = opaque
KPROP:   13579defghi = no_tele_into
MAP
   vvvvvvvvv
   v1111111vv
   vnnnnnnnnvvv
   v```v`2`n33v
  .+```v```nddv
 ..+```+``2nddvv
 ..v```+```nddfv
@..v`?`+``Cxxxxv
 ..v```+```neeiv
 ..+```+``4neevv
  .+```v```neev
   v```v`4`n55v
   vnnnnnnnnvvv
   v1111111vv
   vvvvvvvvv
ENDMAP

NAME:   mainiacjoe_labyrinth_nostalgia
TAGS:   no_monster_gen no_item_gen patrolling uniq_faux_labyrinth
DEPTH:  D:11-
WEIGHT: 5
MONS:   basilisk / gargoyle / shadowghast, generate_awake minotaur
KFEAT:  < = <
KITEM:  < = |, *, %
KFEAT:  X = rock_wall
TILE:   X = wall_lab_rock
TILE:   c = wall_lab_stone
TILE:   v = wall_lab_metal
FTILE:  `12| = floor_gauntlet
MAP
xxxxxxxxxxxxxxxxxx@xx
xXXXXXXcccccvvvvvvnvx
xX```X```````````v<vx
xX`X`X`ccc`cvvvv`v2vx
xX`X`X`c```c```v`v`vx
xX`X`XXc`ccc`v`v`v`vx
xX`X`````c```v`v`v`vx
xX`XXXXccc`cvv`v`v`vx
xX`X```c```c```v`v`vx
xX`X`XXc`ccc`ccc`c`cx
xX`X```````c`c```c`cx
xX`XXXXccc`c`c`ccc`cx
xX```````c`c`c`c```cx
xX`XXXXc`c```c`c`cccx
xX`X`````X`X`X`X```Xx
xXXX`XXXXX`X`X`XXX`Xx
xX```X`````X`X`````Xx
xX`XXX`XXXXX`X`XXX`Xx
xX```````X11`X`````Xx
xXXXXXXXXX1XXXXXXXXXx
xxxxxxxxxx=xxxxxxxxxx
ENDMAP

NAME:   roadster_trireme
TAGS:   no_trap_gen no_monster_gen
DEPTH:  D:8-, Depths
: if you.branch() == "D" then
:   if you.depth() < 12 then
MONS:   gnoll / kobold brigand w:2, centaur, gnoll sergeant, merfolk
NSUBST: 1 = 8:1 / 2 = 1. / *:.
:   else
MONS:   human ; quarterstaff . robe, merfolk
MONS:   occultist w:5 / arcanist w:5 / necromancer, cyclops / centaur warrior
NSUBST: 1 = 10:1 / 3 = 122. / *:.
:   end
TILE:   G = dngn_statue_mermaid
: else
MONS:   tengu warrior / hell knight w:2, merfolk impaler
MONS:   titan, merfolk javelineer
NSUBST: 1 = 12:1 / 4 = 12. / *:.
TILE:   G = dngn_statue_depths_zot_tentacles
: end
ITEM:   throwing net q:1, javelin
KFEAT:  B = cache_of_baked_goods
MARKER: G = lua:fog_machine { cloud_type='translocational energy',  \
                              pow_min = 7, pow_max = 10, delay = 50, \
                              size = 4, walk_dist = 1 }
MAP
    wwwwwwwwwwwww
...wwwwwwwwwwwwwww
.WWxxxxxxxxxxxxxxww
@Wxxxxxxxxxxxxxxxxww
@xx1x1x1x1x1x1xxxxww
@xx1x1x1x1x1x1x2xxxww
@x.............d*xxxw
@+............B34CxGw
@x.............d|xxxw
@xx1x1x1x1x1x1x2xxxww
@xx1x1x1x1x1x1xxxxww
@Wxxxxxxxxxxxxxxxxww
.WWxxxxxxxxxxxxxxww
...wwwwwwwwwwwwwww
   wwwwwwwwwwwwww
ENDMAP

################################################################################
#
# <<4>> Demons and undead
#
################################################################################

NAME:  minmay_nine_imps
DEPTH: D:6-11
MONS:  crimson imp / white imp w:3 / shadow imp w:1
MONS:  crimson imp ; any good_item
MAP
xxxxx
x121x
x111x
x111x
xx+xx
ENDMAP

NAME:   minmay_metal_thing
TAGS:   no_descent
DEPTH:  Depths
MONS:   iron dragon, rust devil
KPROP:  .1$| = no_tele_into
NSUBST: ? = 1:+ / *:v
MAP
xxxlllllllllllllllllxxx
xxxlvvvlvlvvvlvlvvvlxxx
xxxlv2vlvlv1vlvlv2vlxxx
llllv$vlvlv$vlvlv$vllll
lvvvv$v?v?v$v?v?v$vvvvl
lv1$$|$$$$$|$$$$$|$$1vl
lvvvv$v?v?v$v?v?v$vvvvl
llllv$vlvlv$vlvlv$vllll
xxxlv2vlvlv1vlvlv2vlxxx
xxxlvvvlvlvvvlvlvvvlxxx
xxxlllllllllllllllllxxx
ENDMAP

NAME:   minmay_beelzebubs_servants
TAGS:   transparent
DEPTH:  D:10-
MONS:   orange demon, red devil
NSUBST: 1 = 1:1 / * = 1., 2 = 1:2 / * = 2.
MAP
........................
..xxxx....xxxx....xxxx..
.xx1.xx..xx**xx..xx.1xx.
.x21................12x.
.x21................12x.
.xx1.xx..xx**xx..xx.1xx.
..xxxx....xxxx....xxxx..
........................
ENDMAP

# Inspired by the Jorge Luis Borges story "The Circular Ruins".
NAME:   bh_circular_ruins
TAGS:   transparent
DEPTH:  D:7-12
MONS:   human simulacrum
KMONS:  D = pile of debris
: if you.absdepth() > 10 then
KMONS:  O = fire elemental
: end
ITEM:   stone q:1 no_pickup
KITEM:  O = book of dreams
SUBST:  E : ddD, F : ddD
MARKER: O = lua:fog_machine { cloud_type = "flame", pow_min = 15, \
                              pow_max = 20, delay = 15, size = 2, \
                              walk_dist = 1, excl_rad = 1}
TILE:   x = wall_catacombs
TILE:   c = wall_stone_scorched
MAP
  ..
 .xxd  ...
.xx1..Fxxx.
.x.......xx.
 d...xx...x.
  ..xc....x.
  E.x.O.x.E
 .x....cx..
 .x...xx...d
 .xx.......x.
  .xxxF..1xx.
   ...  dxx.
         ..
ENDMAP

################################################################################
# Some earlyish demon minivaults by Eino.
# The difficulty of most low-tier demons is lost by the time the player gets to
# meet them. Here they aspire to be both challenging and flavourful.

##### Red devils (4) can use weapons and armour.
NAME:    einodemon_armed_red_devil_minivault
TAGS:    patrolling transparent
DEPTH:   D:8-12, Orc
MONS:    red devil ; spear | trident . ring mail | scale mail
MONS:    red devil ; spear | trident . buckler
MONS:    red devil ; spear | trident . boomerang
MONS:    orc warrior ; trident good_item . ring mail
KITEM:   $ = $ no_pickup
SHUFFLE: 1234
KMASK:   l = no_monster_gen
MAP
...........
.ll.v.v.ll.
.l..v.v..l.
...vv.vv...
.vvv1$2vvv.
....$.$....
.vvv3$4vvv.
...vv.vv...
.l..v.v..l.
.ll.v.v.ll.
...........
ENDMAP

##### Demonic crawlers (s) and beetles.
NAME:   einodemon_crawler_minivault
TAGS:   patrolling transparent
DEPTH:  D:13-, Elf, Spider
MONS:   demonic crawler
MONS:   vampire mosquito / boulder beetle w:8 / demonic crawler w:2
NSUBST: 2 = 2:2 / 1:. / * = 22.
: if you.in_branch("Spider") then
SUBST:  G = x, m = mx
: else
SUBST:  G : GGGx
:   vault_metal_statue_setup(_G, "G", "mystic cage")
: end
MAP
..........
.m.mmmmmm.
.mx.x.x*m.
.m.x2x2xm.
.mG2x1x.m.
.m.x1x2Gm.
.mx2x2x.m.
.m*x.x.xm.
.mmmmmm.m.
..........
ENDMAP

##### Orange demons (4), manticores, scorpions.
NAME:  einodemon_barbed_minivault
TAGS:  patrolling transparent
DEPTH: D:12-, Orc
MONS:  orange demon, scorpion, manticore
NSUBST: 1 = 2:1 / * = 1.., 2 = 2:2 / * = 2..
MAP
xxxxxxxxxxxxx
@.....xxxxxxx
xxxxx..xxxxxx
xxxxxx.xxxxxx
xx1*x...x*1xx
x12.2...2.23x
x32.2...2.21x
xx1*x...x*1xx
xxxxxx.xxxxxx
xxxxxx..xxxxx
xxxxxxx.....@
xxxxxxxxxxxxx
ENDMAP

# Carrion pond
# Bad water, a lot of carrion and feeders around, yuck!
NAME:   roderic_carrion_pond
TAGS:   no_monster_gen no_trap_gen transparent extra
DEPTH:  Lair:2-, !Lair:$, Swamp
MONS:   vampire mosquito, bloated husk
NSUBST: ' = 1:1 / 2:. / * = 111.
: if you.in_branch("Swamp") then
SUBST:  1 = 2
: end
SUBST:  ? = %%.
: dgn.delayed_decay(_G, '%', 'any corpse')
MAP
 ..'..?..
.?'.?.??'.
'?.www?.?.
.'wwwww.?.
?..ww?.?'.
 .?'.?...
ENDMAP

###############################################################################
# Kobold demonologist guarded by shadows.
# Added "evil rite" looking colours, so players expect some nastiness.
#
NAME:   nrook_kobold_shadow_demons
TAGS:   patrolling transparent
DEPTH:  Depths
KMONS:  1 = kobold demonologist
KMONS:  2 = shadow demon / shadow dragon w:5
KITEM:  1 = | / *, * / %
NSUBST: 2 = 1:2 / 3 = 2""" / *:"
COLOUR: ' = white
COLOUR: "12 = darkgrey
FTILE:  'G = floor_pebble_lightgray
FTILE:  "12 = floor_pebble_darkgray
: vault_metal_statue_setup(_G, "G", "mystic cage")
MAP
    ...
  .'''''.
 .'''''''.
 ''G222'''
.''22222''.
.''22122''.
.''22222''.
 '''222G''
 .'''''''.
  .'''''.
    ...
ENDMAP

#############################################################
# Fire demons vs. ice demons
NAME:   minmay_fire_ice_demons
TAGS:   no_monster_gen no_pool_fixup transparent
DEPTH:  D:4-, Depths, Coc, Geh
MONS:   brimstone fiend, ice fiend
MONS:   balrug / hellion, blizzard demon
MONS:   sun demon / smoke demon w:5, ice devil
MONS:   crimson imp ; spear ego:flaming
KMONS:  8 = white imp
KFEAT:  yz = crystal_wall
# Demote each grouping down the paired tiers above,
# and downgrade the loot, depending on depth.
: if you.branch() ~= "D" and you.depth() > 2 then
SUBST:  5 = 5..., 6 = 6...
:   if you.branch() == "Depths" then
SUBST:  '" = |
:   else
SUBST:  '" = ., > = }
:   end
: else
SUBST:  > = .
:   if you.absdepth() >= 16 then
SUBST:  56 = ., 3 = 5, 4 = 6, 1 = 3, 2 = 4
SUBST:  " = |, ' = *
:   elseif you.absdepth() >= 12 then
NSUBST: 5 = 1:5 / *:., 6 = 1:6 / *:.
SUBST:  3 = 7, 4 = 8, 1 = 5, 2 = 6
SUBST:  " = *, ' = %
:   elseif you.absdepth() >= 8 then
NSUBST: 3 = 2:7 / 1:. / * = 77., 4 = 2:8 / 1:. / * = 88.
SUBST:  1 = 7, 2 = 8
SUBST:  '56 = ., " = %
:   else
SUBST:  '3456 = ., 1 = 7, 2 = 8, " = %
:   end
: end
SHUFFLE: yz / CC / CC
SUBST:   C = c
TILE:    y = bedevilled_crystal_gehenna
TILE:    z = bedevilled_crystal_cocytus
: set_feature_name("crystal_wall", "bedevilled crystal wall")
MAP
............. .............
..ccccccc.........ccccccc..
.cc'3553ccc.....ccc4664'cc.
.c"'lll..5cy...cc6..www'"c.
.c1lllll..5..>..6..wwwww2c.
.c"'lll..5cc...zc6..www'"c.
.cc'3553ccc.....ccc4664'cc.
..ccccccc.........ccccccc..
............. .............
ENDMAP


NAME:    hallowed_hall
TAGS:    no_monster_gen no_trap_gen no_pool_fixup
DEPTH:   Depths
KMONS:   1 = pearl dragon
KMONS:   2 = apis
KMONS:   34 = ophan
KMONS:   P = plant
KMONS:   S = sacred lotus
ITEM:    potion of curing pre_id / potion of heal wounds pre_id
KFEAT:   A = altar_the_shining_one
KFEAT:   B = altar_elyvilon
KFEAT:   C = altar_zin
KFEAT:   S = w
SHUFFLE: ABC
COLOUR:  c = white
TILE:    c = wall_church
FTILE:   .+d123GgtABC = floor_limestone
COLOUR:  .123 = white
TILE:    G = dngn_statue_depths_zot_angel
: vault_metal_statue_setup(_G, "g", "silver statue")
MAP
xxxxxxxxx
xcccccccx
xcGdBdgcx
xcd.1.dcx
xcA.2.Ccx
xcd...dcxP''
xcg...Gcx'''''
xccc+cccxP''''''
xct...Scx''''''''
xc..2..cx'''''''''xx
xc..3..+'''4''''''cx
xcS....c'''''''''Pcx
xccccccccccccccccccx
xxxxxxxxxxxxxxxxxxxx
ENDMAP

NAME:   hangedman_tell_no_tales
TAGS:   no_monster_gen no_item_gen patrolling
DEPTH:  D:11-, !D:$
MONS:   spriggan draugr, troll draugr
KMONS:  A = unseen horror
KFEAT:  def = cache_of_baked_goods
SUBST:  D : DDDDE
NSUBST: D = 1 = A:4 .:1 / 2:d / 2:e / 1:1, E = 2:d / 2:e / 2:1
KPROP:  def = bloody
MAP
 cccccccccc
ccxx+x1+DDc
c.x.x..mDDc
@.d.x2.mDDc
c.x.x..cc+c
ccxx+x1c*fc
 cccccccccc
ENDMAP

NAME:   hangedman_weighted_door
TAGS:   extra
DEPTH:  D:9-, Crypt
MONS:   zombie / simulacrum
KMONS:  A = spectral thing
KMONS:  P = pile of debris
KITEM:  A = any good_item
KMASK:  .%* = no_monster_gen
KITEM:  * = star_item
KITEM:  % = any
KMASK:  1 = no_item_gen
MAP
cccc cccc
c11ccc%*c
c11cAc$%c
cn+++++nc
cPPPPPPPc
c@..$..@c
ENDMAP

NAME:   hangedman_blasphemy
TAGS:   no_monster_gen vaults_hard
DEPTH:  Vaults, !Vaults:$, Crypt
MONS:   phantasmal warrior, apis draugr, pearl dragon zombie
MONS:   patrolling profane servitor, death knight
COLOUR: t = brown, c = white
FTILE:  t' = floor_pebble_brown
: if you.in_branch("Vaults") then
SUBST:  @ = .
FTILE:  .1234V$%* = floor_metal_gold
CLEAR:  X
: else
SUBST:  X = x
: end
TILE:   G = dngn_statue_angel
TILE:   t = dngn_tree_dead, c = wall_stone_gray
KFEAT:  _ = altar_yredelemnul
: single_cloud(_G, "_", "foul pestilence", true)
: decorative_floor(_G, 'V', "broken floral vase")
TILE:   V = dngn_flower_pot_broken / dngn_dark_flower_pot_broken
: set_feature_name("tree", "dead tree")
KMASK:  _ = no_item_gen
MAP
@@xxxxxxxXXXXX
@..t....xxxxxXX
x...'''..cV2xXX
xt...tc'.c..xxx
x.'.11c'...G.2x
x.'t1cc't....Vx
x.'ccc'G...ccxx
x..'''G'''...xX
xx...t.'_ccc.xX
Xxcc...'cc3*%xX
XxV.....c34$xxX
Xx2.G.c.c*$5xxX
Xxxx..c..%xxxx
XXXx2Vxxxxxxxx
 XXxxxxXXXXX
ENDMAP

NAME:    hangedman_devilish_allure
TAGS:    no_monster_gen no_item_gen
DEPTH:   D:12-, Depths
WEIGHT:  5
MONS:    obsidian statue, lesser demon, common demon
MONS:    efreet / large abomination / rakshasa
MONS:    shadow demon / green death / blizzard demon / balrug / cacodemon / \
         sin beast / hellion / reaper / tormentor / zykzyl w:2
KITEM:   | = superb_item / any good_item / randbook disc:summoning w:5
: if you.in_branch("Depths") then
SUBST:   2 = 3, 4 = 5, v = c
NSUBST:  3 = 1:5 / *:3
TILE:    c = stone_wall_pyre
: else
SUBST:   b = bbv
: end
SHUFFLE: {( / <<
KPROP:   2345*| = no_tele_into
TILE:    b = bedevilled_crystal_pandemonium
: set_feature_name("crystal_wall", "bedevilled crystal wall")
MAP
xxxxxxxxxxxx@@x
@.lxlll.l.l...x
@..xl..l.l.l.lx
x.{xl%vvvvvvvvx
x..m$.v2234*vvx
xl.m2|123334|bx
x..m$.v2234*vvx
x.(xl%vvvvvvvvx
@..xl..l.l.l.lx
@.lxlll.l.l...x
xxxxxxxxxxxx@@x
ENDMAP

NAME:    hangedman_batty
TAGS:    patrolling no_monster_gen no_item_gen
DEPTH:   D:11-, Crypt, !Crypt:$
WEIGHT:  5
MONS:    vampire bat, phantom, vampire, unseen horror
MONS:    phantasmal warrior, vampire knight, jiangshi
KMONS:   8 = vampire bloodprince
KFEAT:   8 = fountain_blood
KITEM:   8d = sanguine talisman
KITEM:   % = % no_pickup
KITEM:   * = * no_pickup
# Notably, sometimes fill in parts of the grid.
SHUFFLE: ABC, DE, FGH, 34 / 34 / 34 / 43
SUBST:   A = 1, F = 2, B : xx..., D : xx..., G : xx..., CEH = .
SUBST:   I : c...., 5 = 3333445, * = ***d
: if you.in_branch("Crypt") then
SUBST:   4 = 7, 3 = 6668, 2 = 5, 1 = 1444
SUBST:   c = v, x = c
: end
MAP
xx@xxxxxxxxxxx
x.x.xxxxxxxxxx
@x.x.xAxBxxxxx
x.x.x.x.x1xxxx
xx.x4....xCxxxxxxx
xxx..%....xxxxxxxx
xxAx..%..xDxxxxxxx
xxx....%..cExFxxxx
xxBx....Ic.x.x1xxx
xxx1x.x.cI..%.xGxx
xxxxCxDc..*..%.xxx
xxxxxxxEx..*..xHxx
xxxxxxxx.%..*..xxx
     xxFx.%..3x4xx
     xxx1x.x.x5xxx
     xxxxGxHx4xxxx
     xxxxxxxxxxx
     xxxxxxxxxxx
ENDMAP

NAME:    nzn_life_drinkers
TAGS:    no_monster_gen no_item_gen no_wall_fixup vaults_hard
DEPTH:   D:8-, Crypt, Vaults, Depths
ITEM:    sanguine talisman
SHUFFLE: '-
NSUBST:  ' = 1:D / 1:DE / *:.
SUBST:   V = V:50 Y
: if you.in_branch("Vaults") then
MONS:    vampire knight, vault warden ; scimitar ego:vampirism . plate armour
SUBST:   @ = ., - = |||*d
NSUBST:  1 = 1:2 / 2:1 / *:.
TILE:    x = wall_undead
FTILE:   `?VY = floor_w_marble
FTILE:   .12dDE*| = floor_metal_gold
: elseif not you.in_branch("D") then
:   if you.in_branch("Depths") then
MONS:    vampire mage / chonchon w:3
:   else
MONS:    vampire mage
:   end
SUBST:   x = c, - = **%%d, ` = $
: else
MONS:    vampire, vampire mage
SUBST:   - = %:9 d:1, x = c, ` = .
:   if you.absdepth() > 11 then
NSUBST:  1 = 1:2 / 2:1 / *:.
:   end
: end
: if not you.in_branch("D") or you.depth() > 10 then
# Chosen to represent gods that heal on kills, I guess.
KFEAT:   D = altar_makhleb
KFEAT:   E = altar_the_shining_one
: else
SUBST:   DE = .
: end
: decorative_floor(_G, '?', "mourning vase")
MAP
       @
      c+c
     cc.cc
    cc...cc
   cc.....cc
  cc...1...cc
 cc`..'x-..`cc
ccV`?1xxx1?`Vcc
 cc`..-x'..`cc
  cc...1...cc
   cc.....cc
    cc...cc
     cc.cc
      c+c
       @
ENDMAP

NAME:    nicolae_burly_brawl
TAGS:    transparent no_monster_gen
DEPTH:   D:13-, Depths:2-
KMONS:   1 = rakshasa
SHUFFLE: {[(
NSUBST:  D = 2=1 / ., E = 2=1 / .
: if you.in_branch("D") then
SUBST:   1 = 1..
: end
FTILE:   .{[(1G = floor_mystic_chasm
MAP
xxxxxxxxxxxxxxxxx
xGD..D..1..E..EGx
xx.............xx
 x.............x
 +1..D..{..E..1+
 x.............x
xx.............xx
xGD..D..1..E..EGx
xxxxxxxxxxxxxxxxx
ENDMAP

# Another NetHack-inspired vault, based on the top floor of Vlad's Tower.
NAME:  nicolae_nh_vlads_tower
TAGS:  transparent patrolling
DEPTH: D:10-, Crypt
: if you.in_branch("D") then
:   if you.absdepth() < 12 then
KMONS:  _ = vampire
KMONS:  1 = vampire bat
:   elseif you.absdepth() < 14 then
KMONS:  _ = vampire mage
KMONS:  1 = vampire
:   else
KMONS:  _ = vampire mage / vampire knight
KMONS:  1 = vampire / jiangshi
:   end
TILE:   c = dngn_stone_wall_darkgray
NSUBST: z = 2:yzz / *:y
: else
KMONS:  _ = vampire bloodprince
KMONS:  1 = vampire mage / vampire knight / jiangshi
SUBST:  c = v
: end
KITEM:  | = |
KITEM:  _ = * / sanguine talisman
KITEM:  1 = %
KFEAT:  yz = c
KFEAT:  _ = altar_dithmenos / altar_kikubaaqudgha / altar_makhleb / \
            altar_yredelemnul
TILE:   y = dngn_stone_wall_red
TILE:   z = wall_stone_magic_shelf
MAP
xxxxxxxxxxxxxxxxx
xxxczcxczcxczcxxx
xxxc1cxc1cxc1cxxx
xccc+ccc+ccc+cccx
xc.......+.+...cx
xccc+ccccc.ccc+cx
xxxc..._|y.+1c..@
xccc+ccccc.cccccx
xc.......+.+...cx
xccc+ccc+ccc+cccx
xxxc1cxc1cxc1cxxx
xxxczcxczcxczcxxx
xxxxxxxxxxxxxxxxx
ENDMAP

NAME:   nicolae_demonic_statue_gallery
TAGS:   transparent
DEPTH:  D:9-13
KMONS:  5 = lesser demon
KMONS:  4 = orange demon / hellwing / ice devil / \
            rust devil / red devil / chaos spawn
KMONS:  3 = soul eater / sun demon / sixfirhy / \
            smoke demon / neqoxec / ynoxinul
: if you.depth() > 11 then
NSUBST: D = 1:3 / 1:34 / 1:345 / 1:45 / 3=5 / * = 5.
: else
NSUBST: D = 2:4 / 2:45 / 2:5 / * = 5.
: end
MAP
 ccGl@lGcc
ccGl...lGcc
cGl..D..lGc
Gl.D.l.D.lG
l...lGl...l
@.DlGcGlD.@
l...lGl...l
Gl.D.l.D.lG
cGl..D..lGc
ccGl...lGcc
 ccGl@lGcc
ENDMAP

# It's mostly ufetubi. It's fine. You'll be fine.
NAME:    nicolae_fort_ynox
TAGS:    transparent no_pool_fixup
DEPTH:   D:9-12
MONS:    ufetubus, ynoxinul
KFEAT:   - = iron_grate
SHUFFLE: }])>>
NSUBST:  ` = 6:1 / 4 = 1. / *:.
MAP
    .........
   ..wwwwwww..
  ..wwv---vww..
 ..wwvv}])vvww..
..wwvv2...2vvww..
.wwvv..```..vvww.
.wvv..`````..vvw.
.w-$.```````.$-w.
.w-$.```G```.$-w.
.w-$.```````.$-w.
.wvv..`````..vvw.
.wwvv..```..vvww.
..wwvv.....vvww..
 ..wwvv...vvww..
  ..wwv+++vww..
   ..ww...ww..
    .........
ENDMAP

NAME:    nicolae_neqoxec_dot_bat
TAGS:    transparent
DEPTH:   D:9-12
KMONS:   3 = neqoxec
KMONS:   4 = chaos spawn / hellwing / ice devil / orange demon / red devil / \
             rust devil
KFEAT:   z = c
NSUBST:  3 = 2:3 / 1:4 / * = 44.
SUBST:   % = %%%*, z : zzc
TILE:    z = wall_stone_magic_shelf
MAP
           cccccc
         cccccccccc
       cccc......cccc
  cc@@ccc..........ccc@@cc
 cc...cc....cccc....cc...cc
 cc..cc...cccczccc...cc..cc
cc...cc..ccc%..%ccc..cc...cc
cc..cc.......3.3.cc.......cc
cc..cc.....3......cc......cc
cc..ccczcc...GG.3.cccccc..cc
cc..cccccc.3.GG...cczccc..cc
cc......cc......3.....cc..cc
cc.......cc.3.3.......cc..cc
cc...cc..ccc%..%ccc..cc...cc
 cc..cc...ccczcccc...cc..cc
 cc...cc....cccc....cc...cc
  cc@@ccc..........ccc@@cc
       cccc......cccc
         cccccccccc
           cccccc
ENDMAP

# oh nice you can put ' in vault names
NAME:   nicolae_where_there's_smoke
TAGS:   transparent
DEPTH:  D:9-12
KMONS:  2 = nothing / hellwing / red devil / rust devil
KMONS:  3 = patrolling smoke demon
KITEM:  2 = % / nothing
KITEM:  3 = *
KFEAT:  - = iron_grate
NSUBST: ` = . / c, c = 2:. / 3:.c / c
SUBST:  Cc = cccc-l, L = ll.
MAP
    .........
  .............
 ......cLc......
 ....LL`c`LL....
....Lccc.cccL....
...LcCL.2.LCcL...
...LcLLL.LLLcL...
..c`c.L...L.c`c..
..Lc.2..3..2.cL..
..c`c.L...L.c`c..
...LcLLL.LLLcL...
...LcCL.2.LCcL...
....Lccc.cccL....
 ....LL`c`LL....
 ......cLc......
  .............
    .........
ENDMAP

NAME:    roadster_capsule_ark_zombie
TAGS:    no_monster_gen patrolling
DEPTH:   D:6-, Crypt
: if you.branch() == "D" then
:   if you.depth() < 10 then
MONS:   adder zombie / scorpion zombie / \
        hound zombie w:20 / howler monkey zombie
MONS:   weeping skull w:1 / human zombie / elf zombie / centaur zombie w:20
MONS:   killer bee zombie / elephant zombie / ogre zombie
:   else
MONS:   wolf zombie / killer bee zombie / spriggan zombie / centaur zombie
MONS:   small abomination / meliai zombie / \
        elephant zombie / two-headed ogre zombie
MONS:   harpy zombie / laughing skull / hydra zombie
:   end
: else
MONS:   large abomination / jiangshi / laughing skull / ettin zombie
MONS:   spriggan defender zombie w:20 / dire elephant zombie / \
        iron dragon zombie
MONS:   deep elf blademaster zombie / caustic shrike zombie / \
        storm dragon zombie / golden dragon zombie
: end
KITEM:  d = $ / %, any good_item
KFEAT:  C = altar_kikubaaqudgha / altar_yredelemnul
MARKER: F = lua:fog_machine{ cloud_type = "black smoke", \
            pow_min = 24, pow_max = 32, delay_min = 280, delay_max = 320, \
            size_min = 1, size_max = 2, start_clouds = 2, size_buildup_amnt = 1 }
: single_cloud(_G, "l", "flame", false)
MAP
    v
   vvv
   +2+
 vmv1vmv
 vm212mv
vv11311vv
vd31113dv
vvmv+vmvv
@.FlClF.@
ENDMAP

################################################################################
#
# <<5>> Stationary shooters: statues, oklobs, fog generators.
#       We include fog generators here, as they won't move away either.
#
################################################################################

NAME:  minmay_statue_bubble
TAGS:  transparent
DEPTH: D:9-
MONS:  obsidian statue / orange crystal statue / ice statue w:5
NSUBST: ? = 1:. / *:?
SUBST:  ? = bb.
MAP
 .......
..bG?Gb..
.bG...Gb.
.G..*..G.
.?.*1*.?.
.G..*..G.
.bG...Gb.
..bG?Gb..
 .......
ENDMAP

NAME:  minmay_protected_statue
TAGS:  transparent
DEPTH: D:9-, Depths, !Depths:$
: if you.in_branch("Depths") then
MONS: orange crystal statue
: else
MONS:  obsidian statue / orange crystal statue
: end
MONS: plant, bush
SUBST: n : n:20 G 2:1 3:1
KFEAT: n = iron_grate
KMASK: 1 = opaque
MAP
  ...
 .*|*.
.*nnn*.
.|n1n|.
.*nnn*.
 .*|*.
  ...
ENDMAP

NAME:   minmay_statue_crystal_thing
TAGS:   transparent
DEPTH:  D:9-
MONS:   orange crystal statue w:30 / obsidian statue / ice statue w:5
KFEAT:  ~ = closed_clear_door
MAP
      .....
    ...b=b...
  ...bbb.bbb...
  .bbb.....bbb.
 ..b...b~b...b..
 .bb.bbb.bbb.bb.
..b..b.....b..b..
.bb.bb..*..bb.bb.
.=..~..*1*..~..=.
.bb.bb..*..bb.bb.
..b..b.....b..b..
 .bb.bbb.bbb.bb.
 ..b...b~b...b..
  .bbb.....bbb.
  ...bbb.bbb...
    ...b=b...
      .....
ENDMAP

NAME:   minmay_dual_archer_statues
TAGS:   transparent
DEPTH:  D:10-
WEIGHT: 2
MONS:   statue tile:mons_statue_archer name:archer name_adjective; \
        longbow
MONS:   bush
MAP
.........
...ccc...
.ccc|ccc.
.c.2.2.c.
.c12.21c.
.c.2.2.c.
.ccc.ccc.
...c+c...
.........
ENDMAP

# Another Ice Statue vault
NAME:  ice2_lemuel
TAGS:  no_pool_fixup no_monster_gen no_descent patrolling
DEPTH: D:12-, Depths, !Depths:$, Lair:2-
KMONS: 1 = ice statue
KMONS: 2 = white imp / ice beast w:30 / polar bear
KMONS: 3 = ice devil w:8 / ice dragon / freezing wraith
KMONS: 4 = storm dragon simulacrum w:8 / blizzard demon
KMONS: 5 = ice fiend / walking frostbound tome
KFEAT: 1 = >
: if you.absdepth() > 20 then
SUBST:  3 = 5, 2 = ..334, b = bwww
NSUBST: | = 1:1 / *:|
: else
SUBST:  2 = 2., b = w
: end
SUBST: | = ||****%%%%
SUBST: T = TU, W = w:20 W .:5
SUBST: ' = W
TILE:  b = bedevilled_crystal_cocytus
: set_feature_name("crystal_wall", "bedevilled crystal wall")
MAP
T.WWW..........WWW.T
.'WWW..........WWW'.
WW'W.Wwww..wwwW.W'WW
WWW2WwwwwwwwwwwW2WWW
WW222wwwwwwwwww222WW
..W2WwwwwwwwwwwW2W..
.WWWWwwwwwwwwwwwWWW.
..WWwwww||||wwwwWW..
...Wwwwb|13|bwwwW...
..WWwwww||||wwwwWW..
.WWWWwwwwwwwwwwWWWW.
..W2WwwwwwwwwwwW2W..
WW222wwwwwwwwww222WW
WWW2WwwwwwwwwwwW2WWW
WW'W.Wwww..wwwW.W'WW
.'WWW..........WWW'.
T.WWW..........WWW.T
ENDMAP

# Oklob assault; statistically, three oklobs
NAME:    dpeg_oklob_1
TAGS:    transparent
DEPTH:   Lair:3-
MONS:    plant, oklob plant, bush
SUBST:   ? = 1 2:5 '
SHUFFLE: '"
SUBST:   ' : W .:5
SUBST:   " = .
SUBST:   1 = 113
MAP
   ...........
  .............
 .....'''''.....
.....''???''.....
....''?????''%...
...%''?????''....
.....''???''.....
 .....'''''.....
  .............
   ...........
ENDMAP

NAME:   statue_in_the_mist_lemuel
TAGS:   extra no_exits
DEPTH:  D:9-, Depths, Orc, Elf, Snake, Swamp
: if you.in_branch("Depths") or you.in_branch("Elf") then
KMONS:  1 = orange crystal statue
: else
KMONS:  1 = orange crystal statue / obsidian statue / ice statue
: end
KITEM:  1 = %, % / $
MARKER: G = lua:fog_machine { cloud_type= "grey smoke", \
            pow_min = 10, pow_max = 20, delay_min = 15, delay_max = 35, \
            size = 3, walk_dist = 2, spread_rate= 25 }
: if you.in_branch("Abyss") then
SUBST:  G : G111
: end
MAP
G
ENDMAP

# Greed's colour
NAME:    david_greed
DEPTH:   D:10-, Elf
WEIGHT:  4
: if you.in_branch("Elf") then
MONS:    orange crystal statue / obsidian statue
: else
MONS:    obsidian statue / orange crystal statue / ice statue
: end
ITEM:    nothing / any good_item
SHUFFLE: d|
MAP
xxxxxxxxxxxx
xxxxxxbbbbbx
xbbbbbb..1bx
@.........bx
I.*.....d|bx
@.........bx
xbbbbbb..1bx
xxxxxxbbbbbx
xxxxxxxxxxxx
ENDMAP

# Rather shallow depth but you cannot randomly teleport in there.
NAME:    minmay_crystal_box
TAGS:    no_monster_gen patrolling transparent no_descent vaults_hard
DEPTH:   D:12-, Vaults, !Vaults:$
MONS:    crystal guardian, thermic dynamo
MONS:    orange crystal statue, ironbound mechanist
KFEAT:   + = closed_clear_door
SUBST:   . = .:80 %$*|
: if you.in_branch("D") then
SUBST:   14 = 0, + = =
KPROP:   .$%*|023 = no_tele_into
CLEAR:   `
: else
FTILE:   .1234$%*|+ = floor_crystal
: end
MAP
````````````````
`WWWWWWWWWWWWWW`
`WbbbbbbbbbbbbW`
`Wbb2.......1bW`
`Wbb.........bW`
`Wbb.........bW`
`Wnn.........bW`
`WW+....3.4..bW`
`Wnn.........bW`
`Wbb.........bW`
`Wbb.........bW`
`Wbb2.......1bW`
`WbbbbbbbbbbbbW`
`WWWWWWWWWWWWWW`
````````````````
ENDMAP

NAME:  minmay_more_statues
DEPTH: D:12-
MONS:  ice statue w:5 / obsidian statue / orange crystal statue
KFEAT: z = c
TILE:  c = dngn_stone_wall_darkgray
TILE:  b = dngn_crystal_lightred
: tile("z = " .. crackle_def(_G))
MAP
cccbcccccbcccccbccc
c.....z%*|*%z.....c
c.................c
b..1.....G.....1..b
c.................c
c.....z.....z.....c
cccbcccc.@.ccccbccc
ENDMAP

NAME:   hangedman_tree_tricks
DEPTH:  Lair, !Lair:$
TAGS:   extra no_monster_gen
NSUBST: T = 1:. / 1:t
KMONS:  1 = oklob plant
KITEM:  1A_ = gold / nothing w:7
KFEAT:  _ = altar_fedhas
MAP
 tttttttttt
tttt.ttttttt
@tt.t.tttttt
t.tt.t.Tt1tt
t.t.ttT.A$tt
tt.ttttA_Att
t.t.tt1$Attt
tt.ttttttttt
 tttttttttt
ENDMAP

NAME:   disabler_island
TAGS:   no_monster_gen no_pool_fixup transparent
DEPTH:  D:8-14, Lair
SUBST:  ? = W..
NSUBST: ' = 3:* / 1:> / 3:1 / *:", 1 : 2:1 / 2 = 1" / *:w
NSUBST: G = 1:2 / *:"
KMASK:  *>12" = opaque
KFEAT:  " = floor
: if crawl.one_chance_in(3) and (not you.in_branch("Lair") or crawl.coinflip()) then
MONS:   lava snake, orange crystal statue
SUBST:  wW = l
: elseif crawl.coinflip() then
MONS:   oklob plant, golden eye
MONS:   plant, bush
SUBST:  w = 334, W = .
: else
MONS:   electric eel, basilisk
: end
MAP
    ........
  ............
 ..............
 ..............
.......??.......
....?.1w1?......
....?1w'w1.?....
....1w'G'w1.....
....1'G'G'w1....
....1ww'''1?....
.....?1w1w1.....
......1.?.......
 ..............
 ..............
  ............
   .........
ENDMAP

# A stationary monster guarding a staircase.
#
# This can place a crucial locations (like Snake:1), forcing the player
# to actually deal with the problem -- hence "stationary puzzle".
# We expect players to have resources to cope with it.
#
# TODO: This could be extended to branch entries but I don't know if I can
#       do that feasibly in a single map.
#
# With increasing depth the distance between staircase and stationary monster
# can decrease, and fewer supporting walls are to be expected. Sometimes a
# nearby downstairs exit is generated, to provide another option.
#
# Monster set: currently only the classical stationary monsters, i.e.
# statues, oklob plants.
# This could be expanded: pool with electric eel, or monsters behind grates.
#
NAME:     dpeg_stationary_puzzle
DEPTH:    D:10-, Lair, Snake, Shoals, Depths
# Weights for levels not of subdepth 1 intentionally lower.
WEIGHT:   1 (D:10-, Lair:2-, Snake:2-, Shoals:2-, Depths:2-)
WEIGHT:   10 (Lair:1, Shoals:1, Snake:1, Depths:1)
: if you.in_branch("D") or you.in_branch("Lair") then
MONS:     oklob plant, electric eel
SHUFFLE:  1" / 22
: elseif you.in_branch("Snake") or you.in_branch("Shoals") then
MONS:     oklob plant / obsidian statue / orange crystal statue / ice statue /\
          w:1 Roxanne
: else
MONS:     orange crystal statue / w:1 Roxanne
: end
#
# Sometimes add some additional rock walls
SUBST:    . : ._
NSUBST:   _ = 3:x / *:.
#
# Select possible staircase range:
: if you.absdepth() < 14 then
NSUBST:   bc = 1:x / *:.
: elseif you.absdepth() < 18 then
SHUFFLE:  ab
NSUBST:   c = 1:x / *:.
: else
SHUFFLE:  abc
: end
#
NSUBST:   a = 1:{ / *:.
SUBST:    "'bc = .
#
# 50% chance for nearby >
SUBST:    x : xy
NSUBST:   y = 1:} / *:x
MAP
 ......x
 ....cbxx
 '''''cbaxx
@"1'''''aa@
 '''''cbaxx
 ....cbxx
 ......x
ENDMAP

###################################################################
#
# <<6>> Other monsters
#       Slime denizens, insubstantial monsters, everything else...
#
###################################################################

NAME:    onia_ninara_cookie
TAGS:    transparent
SHUFFLE: ABCDEF
SUBST:   A : x, B : x, C : x, D : x, E : x, F : +, G : l:50 w:50 I
SUBST:   x : xvcb
SUBST:   H = 0 ., J = 1 0:100 $:20
ITEM:    any jewellery
MONS:    glass eye
MAP
...........
..xHxHxHx..
.xxBxAxFxx.
.HCJJJxJEH.
.xxJxGxJxx.
.HDJxdxJDH.
.xxJxJxJxx.
.HEJxJJJCH.
.xxFxAxBxx.
..xHxHxHx..
...........
ENDMAP

NAME:   minmay_acid_items
TAGS:   no_monster_gen no_trap_gen transparent
DEPTH:  Depths
MONS:   slime creature w:30 / rockslime / azure jelly / acid blob w:5
MONS:   acid blob
MAP
  ...........
 ..nnnnnnnnn..
..nn1112111nn..
.nn11nnnnn11nn.
.=111+|||nn11n.
.nn11nnnnn11nn.
..nn1112111nn..
 ..nnnnnnnnn..
  ...........
ENDMAP

NAME:   hangedman_incinerator
TAGS:   no_item_gen no_monster_gen
DEPTH:  D:8-14
MONS:   fire bat, lava snake, fire elemental, hell hound, thermic dynamo
NSUBST: ' = 4:F / *:.
: if you.depth() > 11 then
NSUBST: 1 = 1:335 / *:1
: end
: single_cloud(_G, "F", "flame", true)
KPROP:  l = no_cloud_gen
TILE:   c = wall_stone_scorched
MAP
xxxxxxxxxx
xxxxxccccx
xl.1xc23cx
x1l''c|2cx
x.l''4cccx
x.ll'''xxx
x.lll''1xx
x'.llll.xx
x.'...1lxx
+xxxxxxxxx
ENDMAP

NAME:   hangedman_eye_storm
TAGS:   no_monster_gen no_item_gen patrolling
DEPTH:  Depths, !Depths:$, Abyss
MONS:   golden eye, eye of draining, glass eye, eye of devastation
MONS:   great orb of eyes / shining eye w:3
ITEM:   scroll of vulnerability q:1 pre_id / orb ego:guile randart w:4 / \
        book of the spheres w:4 / potion of enlightenment q:2 pre_id
KFEAT:  m = iron_grate
KFEAT:  T = fountain_eyes
NSUBST: 5 = 2:5 / 1:3 / *:4 5:15
: if you.in_branch("Abyss") then
SUBST:  c = c:4 v:1 b:1, '| = d
: end
MAP
     c++cccc
   ccc..c3%ccc
  cc'c..c+m.%cc
 cc'mm..c.mmm.cc
 c.mm...c...mm.c
cc.m....c.5..m.cc
c.mm...mc+.5.mm.c
c1m...mm5mm...m.c
c+m.4.m|m2m.5.m+c
c1m...mm|mm...m1c
c.mm.4.mmm...mm.c
cc.m..5.T..5.m.cc
 c.mm...5...mm.c
 cc.mmm...mmm.cc
  cc..mmmmm..cc
   ccc.1+1.ccc
     ccccccc
ENDMAP

NAME:    hangedman_cracks_in_the_wall
TAGS:    no_monster_gen patrolling transparent
DEPTH:   D:9-, Depths, !Depths:$
: if you.in_branch("D") then
:   if you.depth() < 12 then
MONS:    rock fish, kobold geomancer, basilisk, cyclops
SUBST:   * = $%%, | = *
:   else
MONS:    gargoyle, cyclops, basilisk, catoblepas
SUBST:   * = %%***, | = *|, c = x
:   end
: else
MONS:    deep troll earth mage, stone giant, iron dragon, caustic shrike
SUBST:   c : cxx
: end
SUBST:   5 = 1.
MAP
xxxxxxxxxxxxxx.@@
xxxxcccccccxxx..@
xxxxc1c.c5cxxx...
xxcccc.c.ccccx...
xxc5c.ccc.c1cx...
xxcc.cc2cc.ccx...
xbc.cc.*3cc.c...@
xb.c$$x*|4cc.x..@
xbc.cc.*3cc.c...@
xxcc.cc2cc.ccx...
xxc5c.ccc.c1cx...
xxcccc.c.cccxx...
xxxxc1c.c5cxxx...
xxxxcccccccxxx..@
xxxxxxxxxxxxxx.@@
ENDMAP

NAME:    hangedman_aerie_drop
TAGS:    no_monster_gen no_item_gen no_pool_fixup
DEPTH:   Elf, Depths
MONS:    spriggan air mage ; staff of air pre_id . robe
MONS:    deep elf zephyrmancer ; rapier ego:electrocution . robe
MONS:    spriggan rider ; spear ego:electrocution . buckler . robe
MONS:    lightning spire
KMONS:   5 = dancing weapon ; any weapon good_item ego:electrocution
KMONS:   6 = spark wasp
KMONS:   E = generate_awake air elemental w:7 / air elemental w:1
KITEM:   d = any weapon good_item ego:electrocution pre_id, \
             any weapon good_item ego:electrocution pre_id, \
             storm dragon scales / storm dragon scales randart w:3
KITEM:   e = staff of air randart / storm talisman / \
             storm talisman randart w:1
KITEM:   f = mundane ring of flight no_pickup
KFEAT:   E56 = deep_water
KFEAT:   de = shallow_water
KFEAT:   T = dispersal trap
SHUFFLE: vb
NSUBST:  E = 6:E / 3 = Ew / *:w, 5 = 3:5 / *:w
: if you.branch() == "Depths" then
SUBST:   2 = 3, 5 = 6
: end
MARKER:  e = lua:fog_machine { cloud_type = "rain", pow_max = 2, \
                  delay_min = 10, delay_max = 60, size = 4, walk_dist = 2 }
KMASK:   d = opaque
KPROP:   d = no_tele_into
MAP
 .bvb bvb bvbvbtt
.bvEvbvEvbv...vbtt
@nEEwEwEEv2.5.1vtt
.bTwwv5wvb.4v4.bvt
f=wEndnE+.5nen5<bt
.bTw5vwwvb.4v4.bvt
@nEEwEwEEv2.5.1vtt
.bvEvbvEvbv...vbtt
 .bvb bvb bvbvbtt
ENDMAP

NAME:   lightli_elemental_guards
TAGS:   no_pool_fixup no_monster_gen
DEPTH:  D:10-, !D:$
MONS:   air elemental
MONS:   earth elemental
KMONS:  F = fire elemental
KMONS:  W = water elemental
KFEAT:  F = lava
KFEAT:  W = deep_water
KPROP:  %*12wWlF = no_tele_into
MAP
xxxxxxxxxxxx
x==========x
x=*%=..=x%=x
x=%1=..=2x=x
x====..====x
x=...$x...=x
x=...wl...=x
x====..====x
x=ww=..=ll=x
x=Ww=..=lF=x
x====..====x
xxxxx@@xxxxx
ENDMAP

# So he drove out the man; and he placed at the east of the garden of Eden
# Cherubim, and a flaming sword which turned every way, to keep the way of the
# tree of life.
NAME:    pf_eden
TAGS:    no_monster_gen
DEPTH:   Elf
MONS:    patrolling cherub, patrolling dancing weapon ; great sword ego:flaming
KMONS:   p = plant
KFEAT:   C = cache_of_fruit
ITEM:    randbook title:Forbidden_Fruit owner:the_Tempter \
         numspells:2 spells:summon_mana_viper&discord
NSUBST:  1 = 2:1 / *:.
NSUBST:  d = 1:d / 1:C. /  *:.
SUBST:   3 = 33.
RTILE:   x = wall_lair
FTILE:   12p.dCt@ = floor_grass_dark
FTILE:   @ = floor_moss
MAP
       xxx
  xxx xxpxx
 xxpxxxp.1xxx
xxppp2.1...px
xppp..ppx1.1x
xpdddpxxxp..xx
xpdtdpxxxx...@
xpddd.px xxp.@
xp...pxx  xxxx
xxpppxx
 xxxxx
ENDMAP

NAME:    nicolae_danse_macabre
TAGS:    transparent patrolling no_monster_gen no_item_gen no_trap_gen
DEPTH:   D:11-, Elf, Depths, Crypt
: local evilegos = util.random_subset({ "pain", "vampirism", "draining" }, 3)
: kmons("1 = dancing weapon ; demon whip good_item ego:" .. evilegos[1] )
: kmons("2 = dancing weapon ; demon blade good_item ego:" .. evilegos[2] )
: kmons("3 = dancing weapon ; demon trident good_item ego:" .. evilegos[3] )
: kmons("4 = dancing weapon ; demon whip ego:" .. evilegos[2] )
: kmons("5 = dancing weapon ; demon blade ego:" .. evilegos[3] )
: kmons("6 = dancing weapon ; demon trident ego:" .. evilegos[1] )
KFEAT:   D = altar_uskayaw
KFEAT:   E = altar_kikubaaqudgha / altar_lugonu / \
             altar_makhleb / altar_yredelemnul
KFEAT:   + = closed_clear_door
SHUFFLE: FH
# D and Elf get a runed door instead, and D gets only three weapons.
: if you.branch() == "D" then
SUBST:   + = =
NSUBST:  F = 1444 / 2555 / 3666 / .
: elseif you.branch() == "Elf" then
SUBST:   + = =
NSUBST:  F = 1 / 2 / 3 / 4 / 5 / 6
: else
NSUBST:  F = 1 / 2 / 3 / 4 / 5 / 6
: end
SUBST:   H = ., Y = YYDE
MAP
xxxm+mxxx
xx.....xx
x..FHF..x
x.H...H.x
x.F.Y.F.x
x.H...H.x
x..FHF..x
xx.....xx
xxxxxxxxx
ENDMAP

NAME:    nicolae_rock_paper_scissors
TAGS:    transparent patrolling no_monster_gen
DEPTH:   Depths, !Depths:$, Zot, !Zot:$
KMONS:   r = nargun
KMONS:   p = walking frostbound tome / walking earthen tome / \
             walking divine tome / walking crystal tome
KMONS:   s = dancing weapon ; double sword good_item | \
                              double sword randart good_item w:5
SHUFFLE: }])>
NSUBST:  1 = r / p / s / rps...
SUBST:   T = TTTTTTV
MAP
    cc+cc
    c...c
   cc.1.cc
   cT...Tc
  cc.1.1.cc
  c}.....]c
 cc.1.1.1.cc
 cT...U...Tc
cc.1.1.1.1.cc
c...........c
+.1.1.1.1.1.+
cc..T.).T..cc
 ccccccccccc
ENDMAP

NAME:   hellmonk_no_cap
TAGS:   transparent no_monster_gen
DEPTH:  D:3-7
MONS:   sleepcap
ITEM:   hat / nothing
NSUBST: - = 1:1 / 4 = 10.. / *:.
SUBST:  c : cxt, + : +.
MAP
   c
  ccc
  cdc
 cc-cc
 c---c
cc---cc
c-----c
c.....c
cc+++cc
ENDMAP

NAME:   tekkud_crystal_farm
TAGS:   no_monster_gen patrolling
DEPTH:  Crypt, Depths
WEIGHT: 5 (Crypt), 10
: if you.branch() == "Crypt" then
MONS:   screaming refraction
MONS:   death knight / ancient champion w:5 / vampire knight / eidolon
MONS:   lich / bone dragon / curse skull w:5
NSUBST: ' = 3:1 / *=1...
NSUBST: ~ = 3:2 / 3=2.. / 1:3 / 1:3.. / 2:* / 4:$ / 2 = $$*.. / *:.
FTILE:  123O-. = floor_crystal_squares
: else -- Depths
MONS:   crystal guardian / crystal echidna w:3 / walking crystal tome w:2
MONS:   deep troll earth mage w:15 / tengu reaver / fire giant / frost giant /\
        hell knight w:5 / glass eye w:5
MONS:   ancient lich / golden dragon
NSUBST: ' = 4:1 / *=1....
NSUBST: ~ = 5:2 / 3=2.. / 1:3 / 1:3.. / 3:* / 6:$ / 3 = *$$.. / *:.
FTILE:  123O-. = floor_marble
: end
NSUBST: - = b.
KMONS:  O = orange crystal statue
MAP
    bbb-  -@@@b@
   bbbbb-b@b--.-@
   b'bbbb.-..-.-b
  bb''b-.bbb-.b@
  b-''bb-.--..b@
 bb-'bb-....b-@
bb-'bb...---.b-
b-.-b-.--bbbbbb
b-.-b..bbbbbbbbb
bb-....b-bb----b
 b-..-bb.bb-~~-bb
 b-...--.-b-~~~-b
 bb-......-~~~-bb
  bb-..O..~~~~-b
   b-.....~~~--b
  bb-.---.---bbb
   bb-bbb-bbbbb
    bbb bbb
ENDMAP

###################################################################
#
# <<7>> Random monsters
#       Either using 8, 9, 0 glyphs or just many choices.
#
###################################################################

NAME:   minmay_circled_x
TAGS:   transparent
DEPTH:  D:1-2
WEIGHT: 3
MAP
     ......
   ...xxxx...
  ..xx....xx..
 ..x........x..
 .x.x......x.x.
..x..x....x..x..
.x....x%%x....x.
.x....0xx0....x.
.x....0xx0....x.
.x....x%%x....x.
..x..x....x..x..
 .x.x......x.x.
 ..x........x..
  ..xx....xx..
   ...xxxx...
     ......
ENDMAP

NAME:   minmay_three_crescents
TAGS:   transparent
DEPTH:  D:1-4
WEIGHT: 3
MAP
 .....
..xxx..
.xx%xx..
.x%.0......
.xx0...xxx..
..x.....0xx.
 ........%x.
..x.....0xx.
.xx0...xxx..
.x%.0......
.xx%xx.
..xxx..
 .....
ENDMAP

# vault rotation makes the jar with loot unknown
NAME:   minmay_mini_jars
TAGS:   transparent
DEPTH:  D:2-4
WEIGHT: 3
MAP
..........
.x.x++x.x.
...x00x...
.xxxxxxxx.
.+0x%%00+.
.+0x%%00+.
.xxxxxxxx.
...x00x...
.x.x++x.x.
..........
ENDMAP

NAME:   minmay_divided_ellipse
TAGS:   transparent
DEPTH:  D:2-6
WEIGHT: 5
: if you.depth() < 5 then
SUBST:  9 = 0
: end
MAP
      .......
   ....xx+xx....
 ...xxxx...xxxx...
..xxx%0x...x0%xxx..
.xx0x0.x0.0x.0x0xx.
.+.%x..x.0.x..x%.+.
.xx0x..x...x..x0xx.
..xxx..x9.9x..xxx..
 ...xx+x%*%x+xx...
   ....xxxxx....
      .......
ENDMAP

NAME:   minmay_hollow_rounded_squares
TAGS:   transparent
DEPTH:  D:4-, Depths
SUBST:  0 = 0., x : x c:2 v:1 b:1
: if you.absdepth() > 12 then
SUBST:  = = +
SUBST:  n = c
: end
MAP
 ........
..xxxxxx..
.xx.00.xx.
.x0xxxx0x.
.x.0.x0xx........
.x0x.xx.+.cc==cc..
.x0xx9xxxccG..Gcc.
.xx*x.|xxcG....Gc.
..xxxxxxcc*.9..|n.
..xxxxxxcc|..9.*n.
.xx0.9|xxcG....Gc.
.x..xxxxxccG..Gcc.
.x0xx0x.+.cc==cc..
.x0x*x0.x........
.x.xxxx0x.
.xx.00.xx.
..xxxxxx..
 ........
ENDMAP

NAME:   minmay_pinched_square
TAGS:   transparent
DEPTH:  D:8-, Depths
MAP
.......   .......
.xxx.........xxx.
.x|xxxx...xxxx|x.
.xx9..xxxxx..9xx.
..x.....0.....x..
..x..x..0..x..x..
..xx..xx.xx..xx..
 ..x..xx.xx..x..
 ..x00..9xx00x..
 ..x..xxxxx..x..
..xx..xxxxx..xx..
..x..x..0..x.0x..
..x.....0...0.x..
.xx9..xxxxx0..xx.
.x|xxxx...xxxx.x.
.xxx.........xx..
.......   .......
ENDMAP

NAME:  minmay_st_funbox
TAGS:  extra transparent
DEPTH: D:9-, Depths
KMONS: 0 = 0
KMONS: 9 = 9
KMONS: 8 = 8
: if you.absdepth() < 11 then
SUBST: 9 = 0, 8 = 9
KITEM: 09 = star_item
KITEM: 8 = superb_item
: elseif you.absdepth() < 21 then
SUBST: 0 = 90
KITEM: 098 = superb_item
: else
SUBST: 9 = 98, 0 = 98
KITEM: 09 = superb_item
KITEM: 8 = any good_item
: end
MAP
.......
.vvnvv.
.v090v.
.n989n.
.v090v.
.vv=vv.
..G.G..
  ...
ENDMAP

NAME:    minmay_three_doors
DEPTH:   D:6-, Depths
SHUFFLE: 089, ABC
SUBST:   AB = ., C = *
MARKER:  G = lua:props_marker { stop_explore = "statue" }
MAP
xxxxxxx
xxAAAxx
x.....x
x..0..x
x.....x
xx...xx
xxx+xxxxxxxxx
......xx...xx
......x....Bx
...G..+..9.Bx
......x....Bx
......xx...xx
xxx+xxxxxxxxx
xx...xx
x.....x
x..8..x
x.....x
xxCCCxx
xxxxxxx
ENDMAP

NAME:   kb_rosetta
TAGS:   vaults_hard transparent misc_elf_vault
WEIGHT: 3 (Elf), 10
DEPTH:  D:6-, Depths, Vaults, Elf
SUBST:  x : xcvmnt
SUBST:  X : GtTU
: if you.in_branch("Vaults") then
FTILE:  t = floor_pebble_brown
:  vaults_hard_standard(_G)
: end
MAP
   ...   ...
  ..x.. ..x..
 ...xx...xx...
....xxx.xxx....
.xxx.xx.xx.xxx.
..xxx9x.x9xxx..
 ..xxxx.xxxx..
  .....X.....
 ..xxxx.xxxx..
..xxx9x.x9xxx..
.xxx.xx.xx.xxx.
....xxx.xxx....
 ...xx...xx...
  ..x.. ..x..
   ...   ...
ENDMAP

# Small chamber for a nice item (Eino)
NAME:   small_chamber_with_monster
TAGS:   extra
DEPTH:  D:8-, Depths, Elf, Crypt
MAP
xxxxxxx
xxG.Gxx
x..|..x
x..9..x
xx...xx
xxT.Txx
xx...xx
xxT.Txx
ENDMAP

# Evil grid
NAME:   minmay_evil_grid
DEPTH:  D:8-, Depths
NSUBST: A = 7:+ / *:c
NSUBST: B = 1:+ / 1:n / *:c
NSUBST: C = 1:+ / *:c
SUBST:  * = *|
MAP
ccCcccCcccCcc
c...c...c...c
C.9.A.9.A.9.C
c...c...c...c
ccAcccBcccAcc
c...c*.*c...c
C.9.B.8.B.9.C
c...c*.*c...c
ccAcccBcccAcc
c...c...c...c
C.9.A.9.A.9.C
c...c...c...c
ccCcccCcccCcc
ENDMAP

NAME:    dispersion_dpeg
TAGS:    transparent
DEPTH:   D:$, Depths
KITEM:   89 = * / |
KMONS:   8 = 8
KMONS:   9 = 9
KFEAT:   ^ = teleport trap / dispersal trap
KFEAT:   ~ = teleport trap / floor w:20
SHUFFLE: xm / cn / cn / cn
SUBST:   9 = 89, c : cvb
# Traps occur at the corners, but ensure we always have a dispersal-free path
# out of the center.
NSUBST:  a = ~ / ^, p = ~ / ^
MAP
............
............
..pxxmmxxp..
..x......x..
..x.amma.x..
..m.m99m.m..
..m.m99m.m..
..x.amma.x..
..x......x..
..pxxmmxxp..
............
............
ENDMAP

NAME:    pandoras_box_mu
TAGS:    no_monster_gen no_item_gen transparent
DEPTH:   Depths, Crypt:1-4
MARKER:  a = lua:fog_machine { \
                 pow_max = 10, delay_min = 10, delay_max = 40, \
                 size = 2, size_buildup_amnt = 5, \
                 size_buildup_time = 25, cloud_type = "black smoke" \
             }
KMONS:   a = vampire mosquito
KMONS:   b = green death
KMONS:   c = reaper
KMONS:   d = soul eater
KMONS:   e = chaos spawn
KMONS:   f = demonic crawler
KMONS:   g = glowing shapeshifter
KMONS:   h = shadow wraith
KMONS:   i = hell rat
KMONS:   j = clockroach
KMONS:   k = bes kemwar
KMONS:   l = large abomination
KMONS:   m = emperor scorpion
KMONS:   n = small abomination
KMONS:   o = unseen horror
KMONS:   p = spark wasp
KMONS:   q = goliath frog
KMONS:   r = wolf spider
KITEM:   abcdfghjiklmnopqr = $
KITEM:   e = $ q:66, any armour good_item / potion of experience q:1 pre_id / \
             scroll of acquirement pre_id
SHUFFLE: bcdfghjklnopqr
MAP
.............
.............
..v.......v..
...vvvvvvv...
...vgbcdev...
...vfahajv...
...vklanov...
...vpqrimv...
...vv===vv...
..v.......v..
.............
.............
ENDMAP

NAME:    onia_ninara_dug_in_and_dangerous
TAGS:    ruin_abyss transparent no_descent
DEPTH:   D:8-, !D:$, Depths:2-, !Depths:$, Abyss
ITEM:    wand of digging pre_id
ITEM:    scroll of teleportation pre_id q:2
ITEM:    parchment disc:earth / any ring / any talisman w:2
SHUFFLE: vcb, AB? / CD!, d<>, de
SUBST:   AD = 9, B = 8, C = 0
SUBST:   ? = %:10 *:50 |:60, ! = %:90 *:30 |:10
: if you.in_branch("Abyss") then
TAGS:    patrolling
SUBST:   de%*| = f
: end
KMASK:   x = no_wall_fixup
KMASK:   089%*|de<> = opaque
KPROP:   089%*|de<> = no_tele_into
MAP
...........
.vvnvvvnvv.
.vAAABAAAv.
.xxxxxxxxx.
.v???d???v.
.vvnvvvnvv.
.....@.....
ENDMAP

NAME:   minmay_librarian
TAGS:   no_monster_gen no_item_gen no_trap_gen
DEPTH:  D:9-, Elf, Depths
: if you.absdepth() > 24 then
MONS:   ancient lich w:25 / dread lich w:25 / royal mummy
ITEM:   any scroll w:6 / any book
: elseif you.absdepth() > 20 then
MONS:   lich w:60 / draconian annihilator w:20 / \
        draconian scorcher / draconian shifter
ITEM:   any scroll / any book
: elseif you.absdepth() > 15 then
MONS:   deep elf annihilator w:30 / deep elf sorcerer w:20 / \
        deep elf demonologist / deep elf death mage
ITEM:   any scroll / any book w:6
: elseif you.absdepth() > 12 then
MONS:   arcanist w:25 / occultist w:25 / necromancer w:20 / \
        deep elf pyromancer w:20 / deep elf zephyrmancer w:20 / \
        orc sorcerer / ogre mage / naga mage / vampire mage
ITEM:   scroll of identify w:2 / any scroll w:8 / any book w:4
: else
MONS:   arcanist w:25 / deep elf pyromancer w:25 / orc sorcerer / \
        kobold geomancer w:5 / kobold demonologist w:15
ITEM:   scroll of identify w:3 / scroll of amnesia w:2 / \
        any scroll w:5 / randbook numspells:2 w:3
: end
SUBST:  c : cx
TILE:   c = wall_studio
MAP
xxxxxxxxxxxxx
xd....1....dx
xc.........cx
xd.........dx
xc.........cx
xd.........dx
xc.........cx
xd.........dx
xc.........cx
xd.........dx
xxxxxx+xxxxxx
ENDMAP

NAME:   wad_scary_box
DEPTH:  D:9-, Depths, !Depths:$
WEIGHT: 4
FTILE:  ' = floor_pebble
COLOUR: ' = white
MAP
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxx...............x
x.x.+.......xx..xx.......xx..x
x..xcccccccc.xxxxxxxx..G.xx.Gxxx
xxx.0098+*|n.+.'.'.'..xx.......+
xxx.0098+**n.+.'.'.'..xx.......+
x..xcccccccc.xxxxxxxx..G.xx.Gxxx
x.x.+.......xx..xx.......xx..x
xxxxxxxxxxxxxx...............x
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
ENDMAP

NAME:   wad_mini_maze
TAGS:   transparent
DEPTH:  D:7-, Depths, !Depths:$
WEIGHT: 4
NSUBST: ? = 1:n / 1:+ / *:X
SUBST:  X : cccvvb
MAP
xxxxxxxxxxxxxxxxxxxxxxxxxx@xx
xXXXXXXXXXXXXXXXXXXXXXXXXX.Xx
xX9%......X.......X...X....Xx
xXXXXXX.X.XXXXX.X.XXX.X.XX.Xx
xX......X.......X.....X..X.Xx
xX.???XXX.XXXXXXXXXXX.XX.X.Xx
xX.?**?.......X.X...X.X..X.Xx
xX.?**?.XXXXX.X.X.X.X.XXXX.Xx
xX.?**?.....X.X.X.X.X.X....Xx
xX.X??XXX.X.XXX.X.X.X.X.XXXXx
xX.X9%..X.X.....X.X.X.X....Xx
xX.XXXX.X.X.XXX.X.X%X.XXXX.Xx
xX......X.X...X...X9X......Xx
xXXXXXXXX.XXXXXXXXXXXXXXXXXXx
xxxxxxxxx@xxxxxxxxxxxxxxxxxxx
ENDMAP

NAME:   wad_hexagon
TAGS:   transparent
WEIGHT: 4
DEPTH:  D:8-, Depths, !Depths:$
KFEAT:  t = tree
FTILE:  ' = floor_pebble
COLOUR: ' = white
MAP
xxx...xxxxxxxxxxxxxx...xxx
xx...xxxxxx........xx...xx
x...xxxxx..xxxxxxxx.xx...x
...xxxxx...xxxxxxxxx.xx...
..xxxxx...xxcccccccnx.xx..
.xxxxx..xxxxc'0...'cxx.xx.
.xxxx.xxx*.9v.'..'.cxxx.xx
@....xx**8..=.V''V....+..@
.xxxx.xxx*.9v.'..'.cxxx.xx
.xxxxx..xxxxc'...0'cxx.xx.
..xxxxx...xxcccccccnx.xx..
...xxxxx...xxxxxxxxx.xx...
x...xxxxx..xxxxxxxx.xx...x
xx...xxxxxx........xx...xx
xxx...xxxxxxxxxxxxxx...xxx
ENDMAP

NAME:   wad_rectangle_vault
DEPTH:  D:3-, Depths, !Depths:$
WEIGHT: 4
FTILE:  ; = floor_pebble
FTILE: "0U = floor_pebble_brown
COLOUR: "0 = brown
MAP
xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
x..xxx;;;;;.;;;;;.;;;;;xxx..x
x..xxxx;";...;";...;";xxxx..x
xx.x.x;""";.;"0";.;""";x.x.xx
@.x.x;"""0";""U0";""""0;x.x.@
xx.x.x;""";.;""";.;0"";x.x.xx
x..xxxx;";...;";...;0;xxxx..x
x..xxx;;;;;.;;;;;.;;;;;xxx..x
xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
ENDMAP

# Updated to not hide the loot area behind opaque walls and to scale numbers of
# monsters/loot in the chamber with depth of placement. -gammafunk
NAME:   wad_dig_loot
TAGS:   transparent no_descent
DEPTH:  D:8-, Elf, Depths, !Depths:$
WEIGHT: 4
KPROP:  %*8DEeF = no_tele_into
KMASK:  %*|8aDEeF' = opaque
KITEM:  EF = *
KMONS:  EF = 8
KMONS:  p = plant
SHUFFLE: DE
# Before D:12, a dig wand is required to access the loot area. From D:12, add a
# digging monster. Add another 8 in Elf and one more again for Depths. Add one
# more loot item with each added monster.
: if you.in_branch("D") and you.depth() >= 12 then
KITEM:  D = |
KMONS:  D = deep troll earth mage
SUBST:  EF = '
: elseif you.in_branch("Elf") then
KITEM:  D = |
KMONS:  D = patrolling cacodemon
KMONS:  e = patrolling deep elf demonologist
SUBST:  E = e, F = '
: elseif you.in_branch("Depths") then
KITEM:  D = |
KMONS:  D = deep troll earth mage / cacodemon
# D:8-11
: else
SUBST:  DE = v, F = '
: end
: if you.in_branch("Elf") then
TILE:   v = dngn_metal_wall_red
FTILE:  " = floor_infernal_blank
COLOUR: " = red
: else
FTILE:  " = floor_pebble_brown
COLOUR: " = brown
: end
MAP
@....vvvvv..G.@
.""".vvvvvp....
.."..vvvvv.."0.
.....vvvvv.""".
..G..vvvvv.....
vvvvv.....vvvvv
vvvvv."...vv*Dv
vvvvv."".GmF%8v
vvvvv."...vv*Ev
vvvvv0....vvvvv
ENDMAP

NAME:    evilmike_minifort
TAGS:    misc_elf_vault no_descent
DEPTH:   D:9-, Depths, !Depths:$, Elf
TILE:    x = wall_marble
COLOUR:  x = white
TILE:    c = wall_vines
FTILE:   ABCDEFcx+. = floor_vines
SHUFFLE: ABCDEF
NSUBST:  A = 1:> / * = .%
NSUBST:  B = 6:0 / *:., C = 6 = $0 / *:., D = 6 = %0 / *:.
NSUBST:  E = 1:98 / 1:*| / *:., F = 1:90 / 1:$ / *:.
SUBST:   ' = .
MAP
ccccc@'''''''@ccccc
cAAAcwwwwwwwwwcBBBc
cAAAcwwwwwwwwwcBBBc
cAAAcGwwwwwwwGcBBBc
cAAAccccc+ccccc.BBc
cAAAc.........+.BBc
cAA.c.........c.BBc
cAA.+..xxxxx..ccccc
cAA.c..xxxxx..+.DDc
ccccc.........c.DDc
cCC.+.........cDDDc
cCC.ccccc+cc+cccccc
cCCCcEEE..c...FFFFc
cCCCcEEEEEcFFFFFFFc
cCCCcEEEEEcFFFFFFFc
ccccccccccccccccccc
ENDMAP

NAME:    hangedman_feature_mirror
TAGS:    transparent extra allow_dup no_monster_gen
TAGS:    no_item_gen no_trap_gen no_pool_fixup patrolling
DEPTH:   D, Depths, Orc, Elf, Crypt, Snake, Shoals, Zot
WEIGHT:  10 (D), 4
KFEAT:   A = stone_arch
KFEAT:   D = any shop
KFEAT:   ^ : teleport trap / shaft trap
KFEAT:   Z = zot trap
SUBST:   A : C:20 D:20 ATVY^{[(<>, b : c:30 G:20 bvwtdGG123, 0 : 0:3 9:2 ':1
SUBST:   .' : .:99 W:1, [ : [], ( : ()
NSUBST:  { = 1:{ / 1:}, [ = 1:[ / 1:(, ] = 1:[ / 1:], ( = 1:] / 1:), ) = 1:( / 1:)
: if you.in_branch("D") or you.in_branch("Depths") then
:    if you.absdepth() < 2 then
SUBST:   CDY[{^ = T, 9 : 0'
:    elseif you.absdepth() < 5 then
SUBST:   CDY = T, 9 : 0'
:    elseif you.absdepth() > 20 then
MARKER:  A = lua:props_marker { portal=1 }
:    end
: elseif you.in_branch("Orc") then
SUBST:   G = I, t23 = 1:9 I:1
: elseif you.in_branch("Crypt") then
SUBST:   TV : VY, t123 : c
: elseif you.in_branch("Zot") then
SUBST:   D : V:9 Z:1, ^ : ^Z, t123 : G:9 Z:1
: else
SUBST:   A = T
: end
MAP
...
.b..
.0C.
.b..                                ...
...                                ..b.
                                   .C0.
                                   ..b.
                                    ...
ENDMAP

NAME:    hangedman_corner_corridor
TAGS:    transparent misc_elf_vault
WEIGHT:  5 (Snake, Elf), 10
DEPTH:   D:9-, Depths, Snake, Elf
SHUFFLE: 9* / 9* / *8, 098%* / 098%* / 098%* / !!!!$, y'Y" / 'y"Y, Y" / ??
SUBST:   Y = y, '"!? = ., y : z:100 ccvbm, z : x:100 ccvbm
: if you.absdepth() < 13 then
SUBST:   9 = 0, 8 = 9
: end
MAP
xxxxxxxxxx
xxxxxxxxxx
xx0.Y".0xx
xx.."Y..xx
@+..zz..+@
@+..zz..+@
xx..y'..xx
xx..'y..xx
xx..y'..xx
xx..zz..xxx
xx..zz..xxxxxx
xx..'y...xxxxxx
xx..y'....9%xxx
xx..'y.....*%xx
xx..zzy'yzz.9xxx
xx..zz'y'zz..xxxxxx@@xxxx
xx.......'y...xxxxx++xxxx
xxx%.9...y'...........0xx
xxxxxx*..'y............xx
 xxxxxx9.zzy'yzz'y'zzY"xx
    xxx..zz'y'zzy'yzz"Yxx
     xx%...............xx
     xxx..............0xx
     xxxxxxxxxxxxxx++xxxx
      xxxxxxxxxxxxx@@xxxx
ENDMAP

NAME:   minmay_small_thing
DEPTH:  D:4-8
SUBST:  9 = 999.
MAP
 xxxxxxxxxx
xx........@
x..xx.x.x.x
x.xx.xxxxxx
x..xx.x.x.x
xx..xx.x.xx
 xx.xxxxx.x
xx..x*.x.xx
x..xxx.x.*x
xx...9.9.xx
 xxxxxxxxx
ENDMAP

NAME:   minmay_crossroads
TAGS:   transparent
DEPTH:  D:4-8
SUBST:  0 = 0.
MAP
                xxxxxxx
    x@.0.@xx  xxx....{x
    xx..0..xxxx.....xxx
     xx.....x.....xxx
      xx........xxx
      xxx.....xxx
    xxx........xx
  xxx.....x.....xx
xxx.....xxxx..0..xx
x}....xxx  xx@.0.@x
xxxxxxx
ENDMAP

##################
# Stair vaults. They place a few random monsters but are mainly for variety.
NAME:    st_stairs_1
TAGS:    extra transparent allow_dup luniq_st_stairs
DEPTH:   D, Depths, Zot, Snake, Elf, Crypt
NSUBST:  ' = 1:> / *:., . = 2 = 0:19 .:1 / 2 = 0:1 .:4 / *:.
SUBST:   > = }])
MAP
.........
.G.....G.
.........
...'''...
...'''...
...'''...
.........
.G.....G.
.........
ENDMAP

NAME:    st_stairs_2
TAGS:    extra transparent allow_dup luniq_st_stairs
DEPTH:   D, Depths, Zot, Snake, Elf, Crypt
NSUBST:  . = 1:> / 2 = 0:19 .:1 / 2 = 0:1 .:4 / *:.
SUBST:   > = }])
SHUFFLE: abc
SUBST:   b:b., c:c.
SUBST:   a=x, b=x, c=x
MAP
.........
.a.b.b.a.
.........
.b.c.c.b.
.........
.b.c.c.b.
.........
.a.b.b.a.
.........
ENDMAP

NAME:    st_stairs_3
TAGS:    extra transparent allow_dup ruin_lair luniq_st_stairs
DEPTH:   D, Depths, Zot, Snake, Lair, Elf, Crypt
NSUBST:  ' = 1:> / 2 = 0:19 .:1 / 2 = 0:1 .:4 / *:.
SUBST:   > = }])
MAP
.........
.xxx.xxx.
.x.....x.
.x.'''.x.
...'''...
.x.'''.x.
.x.....x.
.xxx.xxx.
.........
ENDMAP

NAME:    st_stairs_4
TAGS:    extra transparent allow_dup luniq_st_stairs
DEPTH:   D, Depths, Zot, Snake, Lair, Elf, Crypt
NSUBST:  ' = 1:> / 2 = 0:19 .:1 / 2 = 0:1 .:4 / *:.
SUBST:   > = }])
MAP
x.x.x.x.x
.........
x.......x
...'''...
x..'''..x
...'''...
x.......x
.........
x.x.x.x.x
ENDMAP

NAME:    st_stairs_5
TAGS:    extra transparent allow_dup luniq_st_stairs
DEPTH:   D, Depths, Zot, Snake, Lair, Elf, Crypt
NSUBST:  ' = 1:> / 2 = 0:19 .:1 / 3 = 0:1 .:4 / *:.
SUBST:   > = }])
MAP
xx..xx..xx
x........x
..........
...''''...
x..''''..x
x..''''..x
...''''...
..........
x........x
xx..xx..xx
ENDMAP

NAME:    st_stairs_6
TAGS:    extra transparent allow_dup luniq_st_stairs
DEPTH:   D, Depths, Zot, Snake, Lair, Elf, Crypt
NSUBST:  ' = 1:> / 1 = 0:19 .:1 / 2 = 0:1 .:4 / *:.
SUBST:   > = }])
MAP
xx..xx
xG..Gx
..''..
..''..
xG..Gx
xx..xx
ENDMAP

NAME:    st_stairs_7
TAGS:    extra transparent allow_dup luniq_st_stairs
DEPTH:   D, Depths, Zot, Snake, Lair, Elf, Crypt
NSUBST:  ' = 1:> / 1 = 0:19 .:1 / 2 = 0:1 .:4 / *:.
SUBST:   > = }])
MAP
x.xx.x
..xx..
xx''xx
xx''xx
..xx..
x.xx.x
ENDMAP

# I like the way these ones can turn out,
# it reminds me of those rooms in Angband
NAME:    st_stairs_8
TAGS:    extra transparent allow_dup luniq_st_stairs
DEPTH:   D, Depths, Zot, Snake, Lair, Elf, Crypt
NSUBST:  . = 1:> / 1 = 0:19 .:1 / 2 = 0:1 .:4 / *:.
: random_stair(_G, ">")
MAP
x.x.x.x
.......
x.x.x.x
.......
x.x.x.x
.......
x.x.x.x
ENDMAP

NAME:    st_stairs_9
TAGS:    extra transparent allow_dup luniq_st_stairs
DEPTH:   D, Depths, Zot, Snake, Lair, Elf, Crypt
NSUBST:  . = 1:> / 2:0 / 2 = .:3 0:1 / *:.
: random_stair(_G, ">")
MAP
x.x.x.x.x
.........
x.x.x.x.x
.........
x.x.x.x.x
.........
x.x.x.x.x
.........
x.x.x.x.x
ENDMAP

NAME:    st_stairs_10
TAGS:    extra transparent allow_dup luniq_st_stairs
DEPTH:   D, Depths, Zot, Snake, Lair, Elf, Crypt
NSUBST:  . = 1:> / 2 = 0:19 .:1 / 4 = 0:1 .:4 / *:.
: random_stair(_G, ">")
MAP
x.x.x.x.x.x
...........
x.x.x.x.x.x
...........
x.x.x.x.x.x
...........
x.x.x.x.x.x
...........
x.x.x.x.x.x
...........
x.x.x.x.x.x
ENDMAP

NAME:    st_stairs_11
TAGS:    extra transparent allow_dup luniq_st_stairs
DEPTH:   D, Depths, Zot, Snake, Lair, Elf, Crypt
NSUBST:  . = 1:> / 3 = 0:19 .:1 / 5 = 0:1 .:9 / *:.
: random_stair(_G, ">")
MAP
x.x.x.x.x.x.x.x.x
.................
x.x.x.x.x.x.x.x.x
.................
x.x.x.x.x.x.x.x.x
.................
x.x.x.x.x.x.x.x.x
.................
x.x.x.x.x.x.x.x.x
.................
x.x.x.x.x.x.x.x.x
ENDMAP

NAME:    st_stairs_12
TAGS:    extra transparent allow_dup luniq_st_stairs
DEPTH:   D, Depths, Zot, Snake, Lair, Elf, Crypt
NSUBST:  . = 1:> / 1 : 0:19 .:1 / 2 = 0:1 .:4 / *:.
: random_stair(_G, ">")
MAP
x.x.x.x.x.x.x.x.x
.................
x.x.x.x.x.x.x.x.x
.................
x.x.x.x.x.x.x.x.x
.................
x.x.x.x.x.x.x.x.x
ENDMAP

NAME:    st_stairs_13
TAGS:    extra transparent allow_dup luniq_st_stairs
DEPTH:   D, Depths, Zot, Snake, Lair, Elf, Crypt
NSUBST:  . = 1:> / 1 : 0:19 .:1 / 2 = 0:1 .:4 / *:.
: random_stair(_G, ">")
MAP
x.x.x.x.x.x.x.x.x.x.x
.....................
x.x.x.x.x.x.x.x.x.x.x
.....................
x.x.x.x.x.x.x.x.x.x.x
ENDMAP

NAME:    st_stairs_14
TAGS:    extra transparent allow_dup luniq_st_stairs
DEPTH:   D, Depths, Zot, Snake, Elf, Crypt
NSUBST:  . = 1 : 0:19 .:1 / 2 = 0:1 .:4 / *:.
: random_stair(_G, ">")
SHUFFLE: abc / bab / cbb / bcb
SUBST:   a=x, b=., c:Gx
MAP
.......
.......
..aba..
..b>b..
..aba..
.......
.......
ENDMAP

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

NAME:   lightli_corner_chamber
TAGS:   transparent
DEPTH:  D:2-, Depths
KPROP:  $*09 = no_tele_into
KMASK:  $*09 = opaque
MAP
xxxxxxxxxxxx
xxxxxxx....x
xxxxx......+
xxxx.......x
xxx.....xxxx
xx....xxxxxx
xx...xmcccc
x....xc$9$c
x...xxc0*0c
x...xxc$9$c
x...xxccccc
xx+xxx
ENDMAP

NAME:   lightli_gold_pyramid
TAGS:   no_vmirror no_rotate
DEPTH:  Depths
COLOUR: .089+*|c = yellow
FTILE:  .089+*|c = floor_sandstone
TILE:   c = wall_tomb
MAP
       cnc
      cc|cc
      c***c
     cc***cc
     ccc+ccc
    cc8.8.8cc
    cc.....cc
    cccc=cccc
   cc.......cc
   c9.9.9.9.9c
  cc.........cc
  cccccc=cccccc
 cc...........cc
 c.............c
cc0.0.0.0.0.0.0cc
c...............c
cccccccc+cccccccc
ENDMAP

NAME:  lightli_airlock
DEPTH: D:11-, Snake, Shoals
: if not you.in_branch("D") then
SUBST: = = +
:   if you.in_branch("Shoals") then
SUBST: n = c
CLEAR: x
:   end
: end
KMASK: W = no_monster_gen
KPROP: W = no_tele_into
MAP
     xxxxx  xxxx
 WccccWWWccccWWxxxxx
 cc..ncWcn..nnWWWWWx
 c....cGc....cccncWx
 c.00.cnc.09.cc%*ccx
@=..9.+%+.0*.++%8|cx
 c.00.cnc.09.cc%*ccx
 c....cGc....cccncWx
 cc..ncWcn..nnWWWWWx
 WccccWWWccccWWxxxxx
     xxxxx  xxxx
ENDMAP

NAME: lightli_fourway_metalbox
DEPTH: D:9-, Depths
TAGS: transparent
NSUBST:   % = 1:* / *:%
NSUBST:   0 = 1:9 / *:0
MAP
vvvv..vvvv
v0%v++v%0v
v%v....v%v
vv......vv
.+......+.
.+......+.
vv......vv
v%v....v%v
v0%v++v%0v
vvvv..vvvv
ENDMAP

NAME:   minmay_close_crescents
TAGS:   transparent
DEPTH:  D:1-4
SUBST:  0 = 0.
MAP
 .........
..xxxx..x..
.xx00xx.xx.
.x0..%x.0x.
.x0.x%..0x.
.xx.xx00xx.
..x..xxxx..
 .........
ENDMAP

NAME:   minmay_cut_off
TAGS:   transparent
DEPTH:  D:1-4
SUBST:  0 = 0.
MAP
.
..
.x.
.x..
.x0x.
.x0xx.
.x0%xx.
.xxxxxx.
 .xx%0x.
  .xx0x.
   .x0x.
    ..x.
     .x.
      ..
       .
ENDMAP

NAME:   minmay_cupped
TAGS:   transparent
DEPTH:  D:1-4
SUBST:  0 = 0.
MAP
..........
.xxx...xx.
.x%xx..xx.
.xx%xx.0x.
..xx...0x.
...x..0xx.
.....0xxx.
.xx00xxx..
.xxxxxx...
.........
ENDMAP

NAME:   minmay_unequal
TAGS:   transparent
DEPTH:  D:1-4
SUBST:  0 = 0.
MAP
........
.xxx......
...xxx....
....0xxx...
....0.%xxx.
....0xxx...
...xxx.....
.xxx...xxx.
.....xxx...
...xxx0....
.xxx%.0....
...xxx0....
 ....xxx...
 ......xxx.
   ........
ENDMAP

NAME:   minmay_box_of_dots
TAGS:   transparent
DEPTH:  D:1-4
SUBST:  0 = 0., + : +.
MAP
 .........
..xxx+xxx..
.xx.....xx.
.x.0x0x0.x.
.+.x%x%x.+.
.x.0x0x0.x.
.xx.....xx.
..xxx+xxx..
 .........
ENDMAP

NAME:   minmay_quantized
TAGS:   transparent
DEPTH:  D:1-4
SUBST:  0 = 0.
MAP
    .....
    .xxx.
  ...x%x...
  .xxx.xxx.
...x0.0.0x...
.xxx.xxx.xxx.
....0xxx0.%x.
.xxx.xxx.xxx.
...x0.0.0x...
  .xxx.xxx.
  ...x%x...
    .xxx.
    .....
ENDMAP

NAME:   minmay_ruptured
TAGS:   transparent
DEPTH:  D:1-4
SUBST:  0 = 0.
MAP
 ..................
...xx.xx.....xx.xx..
.xxx.x.xx.x.xx.x.xx.
.x%..x000xxx000x.%x.
.xxx.x.xx.x.xx.x.xx.
...xx.xx.....xx.xx..
 ..................
ENDMAP

NAME:   minmay_bisected
TAGS:   transparent
DEPTH:  D:1-4
SUBST:  0 = 0.
MAP
.....
.xxx..
.x%xx..
.xx0x...
..xx00...
 ...00xx..
  ...x0xx.
   ..xx%x.
    ..xxx.
     .....
ENDMAP

NAME:   minmay_distorted
TAGS:   transparent
DEPTH:  D:1-4
SUBST:  0 = 0.
MAP
   ...
 .......
 .xxxxx.
..x.0.x..
.x0%0x...
..x.0.x..
 .xxxxx.
 .......
   ...
ENDMAP

NAME:   minmay_vboxes
TAGS:   transparent
DEPTH:  D:1-4
SUBST:  0 = 0.
MAP
.....         .....
.xxx..       ..xxx.
.x%x...     ...x%x.
.xx.xx..   ..xx.xx.
...x0x... ...x0x...
 ..xx.xx...xx.xx..
  ...x0x...x0x...
   ..xx0xxx0xx..
    ...x000x...
     ..x000x..
      .x%%%x.
      .xxxxx.
      .......
ENDMAP

NAME:    minmay_surrounded
TAGS:    transparent
DEPTH:   D:1-4
SUBST:   0 = 0.
KMASK:   * = opaque
KPROP:   * = no_tele_into
MAP
.........
.x0xxx0x.
.0.....0.
.x.mmm.x.
.x.m*m.x.
.x.mmm.x.
.0.....0.
.x0xxx0x.
.........
ENDMAP

NAME:    minmay_shallow_snake_nest
# deeper depths already have snake vaults
DEPTH:   D:1-3
: if you.absdepth() > 1 then
MONS:   ball python / nothing w:20, adder
: else
MONS:    ball python / nothing w:50, ball python / nothing w:50
: end
MONS:    plant / nothing, fungus / nothing
SUBST:   " = xxx3, ' = xx..13, 1 = 1 3:1
SHUFFLE: 3334
MAP
 xxxxxxx
xx"""""xx
x""1'1""x
x"1'2'1"x
x"'111'"x
x"1'1'1"x
xx"'1'"xx
 xx"@"xx
ENDMAP

NAME:    minmay_lizard_king
DEPTH:   D:1-13
MONS:    frilled lizard, iguana w:20 / crocodile w:1
MONS:    komodo dragon, basilisk, plant
SUBST:   5 = 51, 1 = 1.
: if you.absdepth() > 9 then
SUBST:   1 = 32211
: elseif you.absdepth() > 6 then
SUBST:   4 = 3, 1 = 21
: elseif you.absdepth() > 3 then
SUBST:   4 = 2
: else
SUBST:   4 = 1
: end
MAP
  xxxxxx
xxx5115x
x451551xx
xx155155x
 x555515x
 xxxxx5@
ENDMAP

NAME:    minmay_joined_circles
TAGS:    transparent
DEPTH:   D:2-
NSUBST:  ? = 1:+ / *:?
SUBST:   ? = +xxx
SUBST:   x : x:50 cvbnm
SHUFFLE: ABC
SUBST:   A = 0....%, B = 0.%, C = 0%
MAP
     .....
    ..xxx..
    .xxCxx.
    .?CCCx.
    .xxCxx....
  ....x+xxx?x..
 .xxxxx.xxBBxx.
.xxAAA+x+BBBBx.
.xAAAAAxxBBBBx.
.xAAAAAxxxBBxx.
.xAAAAA?.xxxx..
.xxAAAxx......
 .xxxxx.
  .....
ENDMAP

NAME:    minmay_diamond_spiral
TAGS:    transparent
DEPTH:   D:8-
SUBST:   ? = .G+m
SHUFFLE: xcvb / mnnn
: if you.absdepth() < 13 then
SUBST:   8 = 9
: end
MAP
          .
         .x.
        ..xx.
       .x..xx.
      .xxx..xx.
     .xx8xx..xx.
    .xx...xx..xx.
   .xx..x..xx..xx.
  .xx..xxx..xx..xx.
 .xx..xx|xx..xx..xx.
.xx8.xx|..?..|xx.8xx.
 .xx..xx..xx|xx..xx.
  .xx..xx..xxx..xx.
   .xx..xx..x..xx.
    .xx..xx...xx.
     .xx..xx8xx.
      .xx..xxx.
       .xx..x.
        .xx..
         .x.
          .
ENDMAP

NAME:    minmay_radiant
TAGS:    transparent
DEPTH:   D:8-
SUBST:   8 = 888.
SUBST:   x : xcvbnm G:1
: if you.absdepth() < 13 then
SUBST:   8 = 9
: end
MAP
 ..........
....xxxxx.....
..xxx..........
..x......xxxx...
.xx.........xx..
.x...xxx.....x..
.x...x8..xx..x...
.x...x.|.8x..x...
.x......|......x.
...x..x8.|.x...x.
...x..xx..8x...x.
 ..x.....xxx...x.
 ..xx.........xx.
 ...xxxx......x..
 ...........xxx..
 .......xxxxx....
      ..........
ENDMAP

NAME:  grunt_potential
TAGS:  no_pool_fixup
DEPTH: D:6-, Depths
: init_hm_decor_walldepth(_G, 'x')
SHUFFLE: wlvbn
: if you.absdepth() > 20 then
SUBST: 9 = 8
SUBST: 1 = 8
SUBST: * = |
NSUBST: % = 4:* / *:.
NSUBST: 0 = 2:9 / *:0
: elseif you.absdepth() >= 12 then
SUBST: 1 = 9
: else
SUBST: 1 = 0
SUBST: * = %
: end
KMONS: 0 = 0 band
KMONS: 9 = 9 band
MAP
       @
    xxx+xxx
  xxx.....xxx
 xx..0.w.0..xx
 x....%w%....x
xx...wwwww...xx
x......w......x
x.....%w%.....x
x%0...1*1...0%x
x.....%9%.....x
x.............x
xx...lllll...xx
 x....%.%....x
 xx...0.0...xx
  xxx.....xxx
    xxx+xxx
       @
ENDMAP

# It's intended that the loot item isn't obtainable without either entering los
# of at least some of the monsters or breaking walls, either of which is very
# likely to wake up these monsters.
NAME:   grunt_tough_drop
TAGS:   no_monster_gen no_trap_gen transparent
DEPTH:  D:4-, Depths
KMASK:  ^809 = opaque
KFEAT:  ^ = permanent teleport trap
KFEAT:  ~ = alarm trap
KFEAT:  a = iron_grate
KPROP:  8^ = no_tele_into
: if you.absdepth() < 9 then
SUBST: | = %
SUBST: 8 = 0
: elseif you.absdepth() < 18 then
SUBST: | = *
SUBST: 8 = 999000
: else
SUBST: 8 = 889900
: end
MAP
   .....
   .cnc.
....n|n....
.cccc+cccc.
.c8^a~a^8c.
.cc^c.c^cc.
.c8^a.a^8c.
.cc^c.c^cc.
.c8^a.a^8c.
.cccc+cccc.
...........
ENDMAP

# Some miniature stair vaults; these all place a couple of monsters,
# but they're mainly around for the decor (same principle as st's).
NAME:    grunt_ministairs_1
TAGS:    extra transparent allow_dup luniq_grunt_ministairs
DEPTH:   D:2-, Depths, Zot, Snake, Elf, Crypt
: grunt_ministairs_setup(_G, false)
MAP
  ...
 ..G..
.......
...{...
.......
 G...G
  ...
ENDMAP

NAME:    grunt_ministairs_2
TAGS:    extra transparent allow_dup luniq_grunt_ministairs
DEPTH:   D:2-, Depths, Zot, Snake, Elf, Crypt
: grunt_ministairs_setup(_G, false)
MAP
   .....
  .G...G.
 .........
.G...{...G.
 .........
  .G...G.
   .....
ENDMAP

NAME:    grunt_ministairs_3
TAGS:    extra transparent allow_dup luniq_grunt_ministairs
DEPTH:   D:2-, Depths, Zot, Snake, Elf, Crypt
: grunt_ministairs_setup(_G, false)
MAP
    @
xxxx+xxxx
x.......x
x.G...G.x
x.......x
x.G...G.x
x.......x
x.G...G.x
x...{...x
xxxxxxxxx
ENDMAP

NAME:    grunt_ministairs_4
TAGS:    extra transparent allow_dup luniq_grunt_ministairs
DEPTH:   D:2-, Depths, Zot, Snake, Elf, Crypt
: grunt_ministairs_setup(_G, true)
NSUBST:  @ = 1:@ / *:.
MAP
       .@.
       @G@
 xxxxx.....xxxxx
xx...+xx+xx+...xx
x{.G..xx.xx..G.(x
xx...xx...xx...xx
 xxxxxx.G.xxxxxx
      x...x
      xx[xx
       xxx
ENDMAP

NAME:    grunt_ministairs_5
TAGS:    extra transparent allow_dup luniq_grunt_ministairs
DEPTH:   D:2-, Depths, Zot, Snake, Elf, Crypt
: grunt_ministairs_setup(_G, true)
MAP
        @
 xxxxxxx+xxxxxxx
xx...xx...xx...xx
x{.G..+.G.+..G.(x
xx...xx...xx...xx
 xxxxxxx+xxxxxxx
      xx.xx
      x...x
      x.G.x
      x...x
      xx[xx
       xxx
ENDMAP

NAME:    grunt_ministairs_6
TAGS:    extra transparent allow_dup luniq_grunt_ministairs
DEPTH:   D:2-, Depths, Zot, Snake, Elf, Crypt
: grunt_ministairs_setup(_G, true)
NSUBST:  @ = 1:@ / *:.
MAP
xxxx .@..xxxx
x{.xx...xx.[x
x...x...x...x
xx.+x...x+.xx
 xxx.....xxx
.............
@.....G.....@
.............
 xxx.....xxx
xx.+x...x+.xx
x...x...x...x
x(.xx...xx.<x
xxxx .@..xxxx
ENDMAP

NAME:    grunt_ministairs_7
TAGS:    extra transparent allow_dup luniq_grunt_ministairs
DEPTH:   D:2-, Depths, Zot, Snake, Elf, Crypt
: grunt_ministairs_setup(_G, true)
MAP
    @
  xx+xx
 xx...xx
xxG...Gxx
x.......x
x.{.G.(.x
x.......x
xxG.[.Gxx
 xx...xx
  xxxxx
ENDMAP

NAME:    grunt_ministairs_8
TAGS:    extra transparent allow_dup luniq_grunt_ministairs
DEPTH:   D:2-, Depths, Zot, Snake, Elf, Crypt
: grunt_ministairs_setup(_G, false)
MAP
    xxx
   xxGx
  xx..+@
 xx..Gx
xx...xx
xG..xx
x.{.x
xG..xx
xx...xx
 xx..Gx
  xx..+@
   xxGx
    xxx
ENDMAP

NAME:    grunt_ministairs_9
TAGS:    extra transparent allow_dup luniq_grunt_ministairs
DEPTH:   D:2-, Depths, Zot, Snake, Elf, Crypt
: grunt_ministairs_setup(_G, false)
MAP
 xx...
xx..G..
x.......
x.....G..
x..{....@
x.....G..
x.......
xx..G..
 xx...
ENDMAP

NAME:    grunt_ministairs_10
TAGS:    extra transparent allow_dup luniq_grunt_ministairs
DEPTH:   D:2-, Depths, Zot, Snake, Elf, Crypt
: grunt_ministairs_setup(_G, true)
NSUBST:  @ = 1:@ / *:.
MAP
 xx...@...xx
xx..G...G..xx
x...........x
x.....G.....x
x..{.....(..x
x.....G.....x
x...........x
xx..G...G..xx
 xx...@...xx
ENDMAP

NAME:    grunt_ministairs_11
TAGS:    extra transparent allow_dup luniq_grunt_ministairs
DEPTH:   D:2-, Depths, Zot, Snake, Elf, Crypt
: grunt_ministairs_setup(_G, false)
NSUBST:  @ = 1:@ / *:.
MAP
     @
 xxxx+xxxx
xx.......xx
x.GxxxxxG.x
x.xx...xx.x
x.x.G.G.x.x
x.x..{..x.x
x.x.G.G.x.x
x.xx...xx.x
x.Gxx+xxG.x
xx.......xx
 xxxxxxxxx
ENDMAP

NAME:    grunt_ministairs_12
TAGS:    extra transparent allow_dup luniq_grunt_ministairs
DEPTH:   D:2-, Depths, Zot, Snake, Elf, Crypt
: grunt_ministairs_setup(_G, true)
MAP
xxxxx     xxxxx
x...xxx xxx...x
x.{...xxx...[.x
x.............x
xxx....G....xxx
  xxx.....xxx
    xx.@.xx
ENDMAP

NAME:    grunt_ministairs_13
TAGS:    extra transparent allow_dup luniq_grunt_ministairs
DEPTH:   D:2-, Depths, Zot, Snake, Elf, Crypt
: grunt_ministairs_setup(_G, true)
MAP
   @         @
 xx+xx     xx+xx
 x...xxx xxx...x
@+.G...xxx...G.+@
 x.............x
 xxx....{....xxx
   xxx.....xxx
     xx.G.xx
   xxx.....xxx
 xxx....(....xxx
 x.............x
@+.G...xxx...G.+@
 x...xxx xxx...x
 xx+xx     xx+xx
   @         @
ENDMAP

NAME:    grunt_ministairs_14
TAGS:    extra transparent allow_dup luniq_grunt_ministairs
DEPTH:   D:2-, Depths, Zot, Snake, Elf, Crypt
: grunt_ministairs_setup(_G, false)
MAP
      @
     x+x
     x.xx
xxxxxx..xx
x........xx
x.{...G...+@
x........xx
xxxxxx..xx
     x.xx
     x+x
      @
ENDMAP

NAME:    grunt_ministairs_15
TAGS:    extra transparent allow_dup luniq_grunt_ministairs
DEPTH:   D:2-, Depths, Zot, Snake, Elf, Crypt
: grunt_ministairs_setup(_G, true)
MAP
     @     @
    x+x   x+x
   xx.x   x.xx
  xx..xxxxx..xx
 xx...........xx
@+...G..{..G...+@
 xx...........xx
  xx..xxxxx..xx
   xx.x   x.xx
    x+x   x+x
     @     @
ENDMAP

NAME:    hangedman_minor_gate_pass
TAGS:    transparent
DEPTH:   D:4-9
: if you.absdepth() < 6 then
SHUFFLE: 0% / 0% / '"
SUBST:   1 = 0..
: else
SHUFFLE: 2% / 2% / 2% / d9 / d9 / '"
SUBST:   1 = 0...
: end
SUBST:   x : xxc, 2 = 0, d = %, '" = .
MAP
xxxxxxxxxxxxxxxxxxxxxxxxx
x.1.%.0.x.2.%.2.x.0.%.1.x
x.x.x.x.x.x.x.x.x.x.x.x.x
@.......................@
xxxxxxxxxxxx+xxxxxxxxxxxx
          ..10.
           .0.
ENDMAP

NAME:   minmay_hidden_floor
DEPTH:  D:12-, Depths
SUBST:  9 = 9999., 8 = 8888.
KPROP:  8*$ = no_tele_into
MAP
     @
cccccnccccc
c.........c
c.ccc9ccc.c
c.c8ncn8c.c
c.cn***nc.c
@.9c*$*c9.n@
cncn***nc.c
c.=8ncn8c.c
c.ccc9ccc.c
c.........c
cccccnccccc
     @
ENDMAP

NAME:    minmay_multi_spiral
TAGS:    transparent
SHUFFLE: AC
DEPTH:   Depths
SUBST:   A : ., Cx : ccvb
SUBST:   8 = . 0:1 9:1 8:1
MAP
         ......
         @CCCC..  xxxxxx
   xxx....AAACC.. x||||xxx
  xx88AAAA..AACC. xAAAA88xx
 xx8AAACCAAA.AAC..xCCCAAA8xx
 x8AACCCCCCAA.ACC8x||CCCAA8x
xx8ACC8888CCA.AAC8xx888CCA8xx
x8AAC88xx88CAA.AC8xxxx88CAA8x
x8ACC8xxxx8CCA.AC88xbxx8CCA8x
x8ACC8xxbx88CA.ACC8xxxx8CCA8x
x8AAC88xxxx8CA.AAC88xx88CAA8x
xx8ACC888xx8CAA.ACC8888CCA8xx
 x8AACCC||x8CCA.AACCCCCCAA8x
 xx8AAACCCx..CAA.AAACCAAA8xx
  xx88AAAAx .CCAA..AAAA88xx
   xxx||||x ..CCAAA....xxx
     xxxxxx  ..CCCC.
              .....@
ENDMAP

NAME:   kennysheep_kite_vault
TAGS:   no_item_gen no_monster_gen transparent
SUBST:  x : xcnvb
DEPTH:  D:8-, Depths
MAP
      ccc
     cc*cc
    cc.x.cc
   cc0xxx0cc
  cc...x...cc
  c..x.*.x..c
 cc.xxx.xxx.cc
cc.0.x0*0x.0.cc
c..x.0.x.0.x..+
c*xxx*xxx*xxx.+
c..x.0.x.0.x..+
cc.0.x0*0x...cc
 cc.xxx.xxx0cc
  c..x.*.x..c
  cc...x...cc
   cc0xxx0cc
    cc.x.cc
     cc*cc
      ccc
ENDMAP

NAME:   kennysheep_treasure_room
TAGS:   no_monster_gen no_pool_fixup extra
DEPTH:  D:12-, Depths
MAP
ccccc
c|||c
c888c
c=nnc
 @@@
ENDMAP

NAME:   kennysheep_four_rooms
TAGS:   no_monster_gen
DEPTH:  D:12-, Depths
MAP
 cccc cccc
cc..ccc..cc
+....+...0c
+....+...0c
cc..ccc..cc
 cnncxc++c
cc..ccc..cc
c.**.+....c
c8**.+....c
cc..ccc00cc
 cccc cccc
ENDMAP

#############################################################
NAME:   kennysheep_opposing_triangles
DEPTH:  D:4-, Depths, !D:$, !Depths:$
SUBST:  c:ccxxv
SUBST:  w:wl
MAP
               ww
 cccccccccccccwww
 +.........ccwww
 +........mcwwwc
 c...0...mmwwwcc
 c..0*..ccwwwccc
 c.....mcwwwmm.c
 c....mmwwwcm..c
 c...ccwwwcc...c
 c..mcwwwmm....c
 c.mmwwwcm.....c
 cccwwwcc..*0..c
 ccwwwmm...0...c
 cwwwcm........+
 wwwcc.........+
wwwccccccccccccc
ww
ENDMAP

# TODO: this can be hard to place because the boundaries are not passable;
# maybe add some dead space as a buffer?
NAME:    kennysheep_island_fort
TAGS:    no_pool_fixup no_descent
DEPTH:   D:8-, Depths:2-, !D:$, !Depths:$
SHUFFLE: {}'
KFEAT:   ' = .
: if crawl.coinflip() then
SUBST:  w : l
SUBST:  c : xxv
: else
SUBST:  c : ccb
: end
MAP
   wwwwwwww
  wwwwwwwwww
 wwwccmmccwww
wwwcc....ccwww
wwcc..8...ccww
wwc..cc+c..cww
wwm.0c**c0.mww
wwm..c|*c..mww
wwc..cccc..cww
wwcc......ccww
wwwcc....ccwww
 wwGcc++ccGww
 www.G..G.www
  www....www
   www}{www
    wwwwww
     wwww
ENDMAP

NAME:   kennysheep_just_a_vault
DEPTH:  D:8-, Depths, !D:$, !Depths:$
SUBST:  c : ccxxv
SUBST:  x : ccxxvbm
MAP
 ccccc
cc.8.cc
c.x+x.c
c.x|x.c
c.xxx.c
cc...cc
 cc+cc
ENDMAP

NAME:   kennysheep_orc_chapel
DEPTH:  D:3-4, Orc
SUBST:  $ = $.
: if you.in_branch("Orc") then
KMONS:  1 = orc high priest band
: else
KMONS:  1 = orc priest band
: end
KFEAT:  1 = altar_beogh
TILE:   x = wall_zot_yellow
MAP
 xxxxx
xx$1$xx
x$I$I$x
x$$$$$x
x$I.I$x
xx...xx
 xx+xx
ENDMAP

NAME:   kennysheep_jessica_study
TAGS:   transparent no_mons_gen
DEPTH:  D:2-3
: if crawl.x_chance_in_y(3, 10) then
NSUBST: d = 1:e / *:d
: end
KITEM:  d = any potion / any scroll / nothing w:30
KITEM:  e = randbook disc:necromancy slevels:2 owner:Jessica / \
            randbook disc:hexes slevels:2 owner:Jessica / \
            randbook disc:translocation slevels:2 owner:Jessica
MONS:   jessica, quokka
veto {{ return you.uniques("Jessica") }}
MAP
   .....
  .......
 ..xxxxx..
..xx.12xx..
..xd...dx..
..xd...dx..
..xd...dx..
..xx...xx..
 ..xx+xx..
  .......
   .....
ENDMAP

NAME:   kennysheep_underground_church
TAGS:   no_pool_fixup no_wall_fixup misc_elf_vault vaults_hard vaults_orient_s
DEPTH:  Vaults, !Vaults:$, Elf, Zot
: if you.in_branch("Elf") then
MONS:   deep elf high priest, deep elf pyromancer / deep elf zephyrmancer
SUBST:  - = +
: elseif you.in_branch("Vaults") then
KMONS:  1| = deep elf high priest
KMONS:  2 = orc knight / ironbound preserver / war gargoyle
: else -- Zot
MONS:   draconian stormcaller, base draconian / draconian monk w:2
KFEAT:  t = petrified_tree
SUBST:  - = +
: end
COLOUR: c = white
TILE:   c = wall_church
FTILE:  -.mcwFt12|*+ = floor_limestone
: single_cloud(_G, "F", "flame", false)
KPROP:  wF = no_tele_into
KMASK:  wF = no_monster_gen
SUBST:  F = w
KMASK:  w = opaque
MAP
 ccccccccccc
 cwwwwwwwwwc
ccwwwmmmwwwcc
cwwFmm|mmFwwc
cwwmm*1*mmwwc
cccc*222*cccc
ctcc.....cctc
c2.cc+++cc.2c
c...........c
cc.........cc
 cccc...cccc
    cc-cc
ENDMAP

NAME:  kennysheep_potato
DEPTH: D:2-, Depths, !D:$, !Depths:$
SUBST: % = %., 0 = 0.
: ks_random_setup(_G, true)
MAP
  cccFcccc
 ccwwHwwwccc
ccww....wwwcc
cww.......wwcc
cw....t....wwc
+....x.xxx..wcc
cw...x0%0x..wwc
cw...x%t%x...wc
cww..x0%0x...wc
ccw..xxx.x...ED
 cww....t....wc
 ccww.......wwc
  ccwww....wwcc
   cccwwwHwwcc
     ccccFccc
ENDMAP

NAME:  kennysheep_generic_room_2
DEPTH: D:2-, Depths, !D:$, !Depths:$
SUBST: % = %., 0 = 0.
: ks_random_setup(_G, true)
MAP
cccccccFccccccc
cwwwwwwHwwwwwwc
cwwww.....wwwwc
cwww.......wwwc
cww....t....wwc
cw...xx.xx...wc
cw...x0%0x...wc
+...t.%t%.t..ED
cw...x0%0x...wc
cw...xx.xx...wc
cww....t....wwc
cwww.......wwwc
cwwww.....wwwwc
cwwwwwwHwwwwwwc
cccccccFccccccc
ENDMAP

NAME:  kennysheep_generic_room_3
DEPTH: D:2-, Depths, !D:$, !Depths:$
SUBST: % = %., 0 = 0.
: ks_random_setup(_G, true)
MAP
  ccFFcc
 ccwHHwcc
ccww..wwcc
cwwxx.xwwc
+..x0t..ED
+...t0x.ED
cwwx.xxwwc
ccww..wwcc
 ccwHHwcc
  ccFFcc
ENDMAP

NAME:  kennysheep_generic_room_4
DEPTH: D:2-, Depths, !D:$, !Depths:$
SUBST: % = %., 0 = 0.
: ks_random_setup(_G, true)
MAP
ccccFFcccc
cwwwHHwwwc
cwww..wwwc
cwwxx.xwwc
+..x0t..ED
+...t0x.ED
cwwx.xxwwc
cwww..wwwc
cwwwHHwwwc
ccccFFcccc
ENDMAP

NAME:  kennysheep_generic_room_5
DEPTH: D:2-, Depths, !D:$, !Depths:$
SUBST: % = %., 0 = 0.
: ks_random_setup(_G, true)
MAP
ccccFFcccc
cwwwHHwwwc
cwxx..xxwc
cwxt0.txwc
+...%%0.ED
+..0%%..ED
cwxt.0txwc
cwxx..xxwc
cwwwHHwwwc
ccccFFcccc
ENDMAP

NAME:  kennysheep_generic_room_6
DEPTH: D:2-, Depths, !D:$, !Depths:$
SUBST: % = %., 0 = 0.
: ks_random_setup(_G, true)
MAP
ccccFFcccc
cwwwHHwwwc
cw.%..0.wc
cw0txxt%wc
+..xxxx.ED
+..xxxx.ED
cw%txxt0wc
cw.0..%.wc
cwwwHHwwwc
ccccFFcccc
ENDMAP

NAME:  kennysheep_generic_room_7
DEPTH: D:2-, Depths, !D:$, !Depths:$
SUBST: % = %., 0 = 0.
: ks_random_setup(_G, true)
MAP
ccccFFcccc
cwwwHHwwwc
cw....0.wc
cw0txx..wc
+..x%%x.ED
+..x%%x.ED
cw..xxt0wc
cw.0....wc
cwwwHHwwwc
ccccFFcccc
ENDMAP

NAME:  kennysheep_generic_room_8
DEPTH: D:2-, Depths, !D:$, !Depths:$
SUBST: % = %., 0 = 0.
: ks_random_setup(_G, true)
MAP
ccccFcccc
cwwwHwwwc
cww...wwc
cw.0x%.wc
+..xxx.ED
cw.%x0.wc
cww...wwc
cwwwHwwwc
ccccFcccc
ENDMAP

NAME:  kennysheep_generic_room_9
DEPTH: D:2-, Depths, !D:$, !Depths:$
SUBST: % = %., 0 = 0.
: ks_random_setup(_G, true)
MAP
ccccFcccc
cwwwHwwwc
cwxx.xxwc
cwx0x%xwc
+..xtx.ED
cwx%x0xwc
cwxx.xxwc
cwwwHwwwc
ccccFcccc
ENDMAP

NAME:  kennysheep_generic_room_10
DEPTH: D:2-, Depths, !D:$, !Depths:$
SUBST: % = %., 0 = 0.
: ks_random_setup(_G, true)
MAP
ccccFcccc
cwwwHwwwc
cw..t..wc
cw.x0x.wc
+.t%x%tED
cw.x0x.wc
cw..t..wc
cwwwHwwwc
ccccFcccc
ENDMAP

NAME:  kennysheep_generic_room_11
DEPTH: D:2-, Depths, !D:$, !Depths:$
SUBST: % = %., 0 = 0.
: ks_random_setup(_G, true)
MAP
ccccFcccc
cwwwHwwwc
cw..0..wc
cw.xxx.wc
+..txt.ED
cw.xxx.wc
cw..0..wc
cwwwHwwwc
ccccFcccc
ENDMAP

NAME:  kennysheep_generic_room_12
DEPTH: D:2-, Depths, !D:$, !Depths:$
SUBST: % = %., 0 = 0.
: ks_random_setup(_G, true)
MAP
cccFFccc
cwwHHwwc
cwx.xxwc
+.x0t.ED
+..t0xED
cwxx.xwc
cwwHHwwc
cccFFccc
ENDMAP

NAME:  kennysheep_generic_room_13
DEPTH: D:2-, Depths, !D:$, !Depths:$
SUBST: % = %., 0 = 0.
: ks_random_setup(_G, true)
MAP
cccFccc
cww.wwc
cw%x0wc
+.xtxED
cw0x%wc
cww.wwc
cccFccc
ENDMAP

NAME:  kennysheep_generic_room_14
DEPTH: D:2-, Depths, !D:$, !Depths:$
SUBST: 0 = 0.
: ks_random_setup(_G, true)
MAP
cccFcc
cwwHwc
+.t0wc
cw0tED
cwHwwc
ccFccc
ENDMAP

NAME:  kennysheep_generic_room_15
DEPTH: D:2-, Depths, !D:$, !Depths:$
SUBST: % = %., 0 = 0.
: ks_random_setup(_G, true)
MAP
cccFFccc
cwwHHwwc
cwt.0twc
+..xx.ED
+..xx.ED
cwt0.twc
cwwHHwwc
cccFFccc
ENDMAP

NAME:  kennysheep_generic_room_16
DEPTH: D:2-, Depths, !D:$, !Depths:$
SUBST: % = %., 0 = 0.
: ks_random_setup(_G, true)
MAP
cccccccFccccccc
cwwwwwwHwwwwwwc
cw...........wc
cw...........wc
cw...xxxxx...wc
cw...0%x%0...wc
cw.....x.....wc
+..xxxxtxxxx.ED
cw...0%x%0...wc
cw.....x.....wc
cw...xxxxx...wc
cw...........wc
cw...........wc
cwwwwwwHwwwwwwc
cccccccFccccccc
ENDMAP

NAME:  kennysheep_small_circle
DEPTH: D:4-, Depths, !D:$, !Depths:$
: ks_random_setup(_G, true)
: if crawl.coinflip() then
SUBST: * : %
SUBST: % = %$..
: else
SUBST: * : .
SUBST: % : {}OB
KFEAT: O = any shop
: end
SUBST: 0 = 0.
MAP
  ccDcc
 ccwEwcc
ccww0wwcc
cwwt*twwc
FH0*%*0HF
cwwt*twwc
ccww0wwcc
 ccw.wcc
  cc+cc
ENDMAP

NAME:  kennysheep_small_square
DEPTH: D:4-, Depths, !D:$, !Depths:$
: ks_random_setup(_G, true)
: if crawl.coinflip() then
SUBST: * : %
SUBST: % = %$..
: else
SUBST: * : .
SUBST: % : {}O
KFEAT: O = any shop
: end
SUBST: 0 = 0.
MAP
ccccDcccc
cwwwEwwwc
cwt.0.twc
cw..*..wc
FH0*%*0HF
cw..*..wc
cwt.0.twc
cwww.wwwc
cccc+cccc
ENDMAP

NAME:   kennysheep_inner_square
DEPTH:  D:14-, Depths, !Depths:$
: ks_random_setup(_G, false)
NSUBST: % : 1:|
SUBST:  % = *
SUBST:  9 = 9900.
MAP
   ccccDcccc
  ccwwwEwwwcc
 ccww..x..wwcc
ccww..xtx..wwcc
cww..x.x.x..wwc
cw..xtx.xtx..wc
cw.x.x9%9x.x.wc
FHxtx.%%%.xtxHF
cw.x.x9%9x.x.wc
cw..xtx.xtx..wc
cww..x.x.x..wwc
ccww..xtx..wwcc
 ccww..x..wwcc
  ccwww.wwwcc
   cccc+cccc
ENDMAP

NAME:   kennysheep_dice
DEPTH:  D:4-, Depths, !D:$, !Depths:$
SUBST:  % = %$., 0 = 0.
: ks_random_setup(_G, false)
MAP
ccccccccDDcccccccc
cwwwwwwwEEwwwwwwwc
cw..............wc
cw.txxt....txxt.wc
cw.xxxx....xxxx.wc
cw.xxxx....xxxx.wc
cw.txxt....txxt.wc
cw.....0..0.....wc
FH......%%......HF
FH......%%......HF
cw.....0..0.....wc
cw.txxt....txxt.wc
cw.xxxx....xxxx.wc
cw.xxxx....xxxx.wc
cw.txxt....txxt.wc
cw..............wc
cwwwwwww..wwwwwwwc
cccccccc++cccccccc
ENDMAP

NAME:   kennysheep_two_boxes
DEPTH:  D:14-, Depths, !Depths:$
: ks_random_setup(_G, false)
NSUBST: % : 1:|
SUBST:  % = *,  9 = 9900.
MAP
ccccccDcccccc
ctwwwwEwwwwtc
cw.........wc
cw.xxx.xxx.wc
cw.xtwEwtx.wc
cw.xw9%9wx.wc
FH..H%t%H..HF
cw.xw9%9wx.wc
cw.xtw.wtx.wc
cw.xxx.xxx.wc
cw.........wc
ctwwww.wwwwtc
cccccc+cccccc
ENDMAP

NAME:  kennysheep_diamond
DEPTH: D:4-, Depths, !D:$, !Depths:$
: ks_random_setup(_G, true)
: if crawl.coinflip() then
SUBST: * : %
SUBST: % = %$..
: else
SUBST: * : .
SUBST: % : {}OCB
KFEAT: O = any shop
: end
SUBST: 0 = 0.
MAP
       ccDcc
      ccwEwcc
     ccww.wwcc
    ccww.t.wwcc
   ccww.xxx.wwcc
  ccww.xxtxx.wwcc
 ccww.xxw.wxx.wwcc
ccww.xxw.0.wxx.wwcc
cww.xxw..*..wxx.wwc
FH.....0*%*0.....HF
cww.xxw..*..wxx.wwc
ccww.xxw.0.wxx.wwcc
 ccww.xxw.wxx.wwcc
  ccww.xxtxx.wwcc
   ccww.xxx.wwcc
    ccww.t.wwcc
     ccww.wwcc
      ccw.wcc
       cc+cc
ENDMAP

NAME:   kennysheep_windowed_goal
DEPTH:  D:4-, Depths, !D:$, !Depths:$
: if crawl.coinflip() then
SUBST:  O : 0
: else
KFEAT:  O = any shop
SUBST:  } : 0
: end
: if crawl.coinflip() then
SUBST:  w:.
: else
SUBST:  t:w
: end
: ks_random_setup(_G, true, true)
MAP
  ccccc
 ccwwwcc
ccw...wcc
+....}..m@
+..}O...m@
+....}..m@
ccw...wcc
 ccwwwcc
  ccccc
ENDMAP

NAME:  kennysheep_nondecorative_pillar
TAGS:  transparent
DEPTH: Depths:2-, !Depths:$
: ks_random_setup(_G, false, true)
MAP
     ...xtx....
    .....x......
   ..............
  ..x..........x..
 ..xx..........xx..
....................
.......wwwwww.......
......wwccccww......
......wcc||ccw.....x
x.....wc*88*cw....xt
tx....wc*..*cw.....x
x.....wcc..ccw......
......wwc++cww......
.......ww..ww.......
....................
 ..xx..........xx..
  ..x..........x..
   ..............
    ......x.....
     ....xtx...
ENDMAP

NAME:    minmay_checkerbox
TAGS:    transparent
DEPTH:   D:3-
SHUFFLE: "'
SUBST:   " = ., ' = x
SHUFFLE: xxxm
SUBST:   x : x:40 cvbm
: if you.absdepth() < 9 then
SUBST:   9 = 0
: end
MAP
 .......
."mx0xm".
.m'...'m.
.x.xmx.x.
.m.9|9.m.
.x.xmx.x.
.m'...'m.
."mx0xm".
 .......
ENDMAP

NAME:  minmay_bent
TAGS:  transparent
DEPTH: D:4-
SUBST: " : "'
SUBST: " : .:100 xcvbnmGTt0
SUBST: ' : .:100 xcvbnmGt0%
SUBST: 0 = 00.
: if you.absdepth() < 9 then
SUBST: 9 = 0
: end
MAP
     .....
    ..xxx0
  ...xx...0.
  ."0x*.'.x.
 ..0*x.'..x.
..xxxx9..xx.
.xx..9xxxx..
.x..'.x*0..
.x.'.*x0".
.0...xx...
  0xxx..
  .....
ENDMAP

NAME:    minmay_ruined_shrine
TAGS:    transparent
DEPTH:   D:4-
SUBST:   c = ccc.
SUBST:   c : c b:2 v:2
NSUBST:  0 = 2:0 / 6 = 0.. / *:.
SHUFFLE: '"
SUBST:   " : 0:75 ':75 xcvbnTG t:5
SUBST:   ' : 0:75 xcvbnTG t:5
: if you.absdepth() < 9 then
SUBST:   9 = 0
: end
MAP
    .......
   ..ccccc..
  ..ccccccc..
 ..ccc9C9ccc..
..ccc00"00ccc..
.ccc00'0'00ccc.
.cc*0000000*cc.
.cccccc0cccccc.
.cccccc0cccccc.
......000......
ENDMAP

NAME:    minmay_checkered_concentric_circles
TAGS:    transparent
DEPTH:   D:12-, Depths, Elf
SHUFFLE: vc / vc / vc / vc / vb / vn / cb / cn
NSUBST:  8 = 1:8 / 1:. / * = 8.
NSUBST:  9 = 1:9 / 1:. / * = 9.
MAP
     .....
   ...vcv...
  ..cvc8cvc..
 ..cv.9.9.vc..
 .cv9.....9vc.
..v...vcv...v..
.vc8.vc|cv.9cv.
.c8..+|||c...+.
.vc8.vc|cv.9cv.
..v...vcv...v..
 .cv9.....9vc.
 ..cv.9.9.vc..
  ..cvc8cvc..
   ...vcv...
     .....
ENDMAP

NAME:  minmay_tall_x
TAGS:  transparent
DEPTH: D:1-2
MAP
.......
.xx.xx.
..x0x..
 .%x%.
 0xbx0
 .%x%.
..x0x..
.xx.xx.
.......
ENDMAP

NAME:  minmay_split_cup_small
TAGS:  transparent
DEPTH: D:1-2
MAP
.......
.xxxxx.
.x0x%x.
.x0.%..
.x0x%x.
.xxxxx.
.......
ENDMAP

NAME:  minmay_split_cup_large
TAGS:  transparent
DEPTH: D:1-2
SUBST: b : xcvbmGT%0 .:50
MAP
.........
.xxxxxxx.
.x0...0x.
.xx0b0xx.
.x%%.%%x.
.xxx.xxx.
.........
ENDMAP

NAME:  minmay_tripent
TAGS:  transparent
DEPTH: D:1-2
MAP
 .. ...
..x.xx.
.xxx0x.
 .x%x.
.x0xxx.
.xx.x..
... ..
ENDMAP

NAME:  minmay_tiny_reverse_x
TAGS:  transparent
DEPTH: D:1-2
MAP
.. . ..
.x.x.x.
 .x%x.
.x0.0x.
 .x%x.
.x.x.x.
.. . ..
ENDMAP

NAME:  minmay_small_reverse_x
TAGS:  transparent
DEPTH: D:1-2
MAP
........
.x.xx.x.
..x0%x..
.x%bb0x.
.x0bb%x.
..x%0x..
.x.xx.x.
........
ENDMAP

NAME:   minmay_guardbox
TAGS:   transparent
DEPTH:  D:2-3
WEIGHT: 1
MAP
0000
0%%0
0%%0
0000
ENDMAP

NAME:    minmay_randomly_rotated_circles
TAGS:    transparent
DEPTH:   D:2-3
SHUFFLE: ABCDEFGH
SHUFFLE: IJKLMNOP
SUBST:   AI : ., BCDEFGHJKLMNOP : x
SUBST:   b : bxcvm 0:5 .:5 %:5
MAP
    ........
  ...BBBCCC...
 ..BBB....CCC..
 .AA........CD.
..A..JJJKKK..D..
.AA.II...0KL.DD.
.A..I0.%%.0L..D.
.A..I.%bb%.L..D.
.H..P.%bb%.M..E.
.H..P0.%%..M..E.
.HH.PO0..0MM.EE.
..H..OOONNN..E..
 .HG........EE.
 ..GGG....FFF..
  ...GGGFFF...
    ........
ENDMAP

NAME:    minmay_swirly_circle
TAGS:    transparent
DEPTH:   Depths
SUBST:   x : ccvvb
MAP
       ........
    ....xxxxxx....
   ..xxxx....9xxx..
  ..xxxx.xxxxxxxxx..
 ..xx|xx.xx|xxx.8xx..
 .xx8xxx.xxx8x.xx|xx.
 .xx.xxx.xxx.x.xxxxx.
..xxx...x...xx.xxxxx..
.x9xxxxxxxxx.xx....xx.
.x.xx8.x.9xx9x.xxxx.x.
.x.x|xx.xx**xx.xxxx.x.
.x.xxxx.xx**xx.xx|x.x.
.x.xxxx.x9xx9.x.8xx.x.
.xx....xx.xxxxxxxxx9x.
..xxxxx.xx...x...xxx..
 .xxxxx.x.xxx.xxx.xx.
 .xx|xx.x8xxx.xxx8xx.
 ..xx8.xxx|xx.xx|xx..
  ..xxxxxxxxx.xxxx..
   ..xxx9....xxxx..
    ....xxxxxx....
       ........
ENDMAP

NAME:   minmay_indecisive_spiral
TAGS:   transparent
DEPTH:  D:1-2
MAP
...........
.xxx.xxx.x.
...xxx...x.
.x.x.x.xxx.
.x...0.%x..
.xxx0x0xxx.
..x%.0...x.
.xxx.x.x.x.
.x...xxx...
.x.xxx.xxx.
...........
ENDMAP

NAME:   minmay_increasing_density
TAGS:   transparent
DEPTH:  D:2-
SUBST:  0 = 0.
MAP
.........................
x.......x.......x.......x
.....x......x......x.....
...x.....x.....x.....x...
..x....x....x....x....x..
x...x...x...x...x...x...x
...x..x..x..x..x..x..x...
x.x.x.x.x.x.x.x.x.x.x.x.x
x0xx0xx0xx0xxx0xx0xx0xx0x
xx0xxx0xxx%xxx%xxx0xxx0xx
xx0xxxx%xxxxxxxxx%xxxx0xx
xxx%xxxxxxxxxxxxxxxxx%xxx
xxxxxxxxxxxxxxxxxxxxxxxxx
ENDMAP

NAME:  minmay_starry_boxes
TAGS:  transparent
DEPTH: D:3-,Depths
SUBST: 0 = 0..
SUBST: x : xxxxxxcvb
MAP
 ...............
..xx...xxx...xx..
.xxx.x.x%x.x.xxx.
.xxx...x.x...xxx.
....xxx.0.xxx....
..x.x%x0x0x%x.x..
....xx0x.x0xx....
.xxx.0x.x.x0.xxx.
.x%.0x.x.x.x0.%x.
.xxx.0x.x.x0.xxx.
....xx0x.x0xx....
..x.x%x0x0x%x.x..
....xxx.0.xxx....
.xxx...x.x...xxx.
.xxx.x.x%x.x.xxx.
..xx...xxx...xx..
 ...............
ENDMAP

NAME:   minmay_diced_spiral
TAGS:   transparent
DEPTH:  D:2-
SUBST:  0 = 0.
MAP
..................
.xxxx.xxx.xx.x.xx.
.xxxx.xxx.xx.x.xx.
...............xx.
.xx.xxx.xx.x.x.xx.
.............x....
.xx.x.xx0x0x.x.xx.
.xx...0....x...xx.
....x.x.%..0.x.xx.
.xx.x.0..%.x.x....
.xx...x....0...xx.
.xx.x.x0x0xx.x.xx.
....x.............
.xx.x.x.xx.xxx.xx.
.xx...............
.xx.x.xx.xxx.xxxx.
.xx.x.xx.xxx.xxxx.
..................
ENDMAP

NAME:   minmay_quadrilaterals
TAGS:   transparent
DEPTH:  D:2-
SUBST:  x : x:40 cvbm
SUBST:  0 = 0.
MAP
.....................
..xxxx+xxxxxxx+xxxxx.
.xxx.....xxx.....xxx.
.xxxx.....xxx.....xx.
.x.xxx..0..xxx..0..x.
.x..xxx.....xxx....x.
.+...xxx.....xxx...+.
.x....xxxx+xxxxxx..x.
.x..0..x0...0x.xxx.x.
.xx....x..%..x..xxxx.
.xxx...+.%'%.+...xxx.
.xxxx..x..%..x....xx.
.x.xxx.x0...0x..0..x.
.x..xxxxxx+xxxx....x.
.+...xxx.....xxx...+.
.x....xxx.....xxx..x.
.x..0..xxx..0..xxx.x.
.xx.....xxx.....xxxx.
.xxx.....xxx.....xxx.
.xxxxx+xxxxxxx+xxxx..
.....................
ENDMAP

NAME:   minmay_3d_cube
TAGS:   transparent
DEPTH:  D:1-2
SUBST:  x : x:40 cvbm
SUBST:  0 = 0.
MAP
.........
.xxxxxxx..
.xx..0..x..
.x.x..0..x..
.x..xxxxxxx.
.x0.x0.0..x.
.x.0x.%...x.
.x..x0....x.
..x.x...%.x.
 ..xx.....x.
  ..xxxxxx+.
   .........
ENDMAP

NAME:   minmay_puff
TAGS:   transparent
DEPTH:  D:2-
SUBST:  0 = 0.
MAP
   xxxxx
xxxx...xxx
xx.......xx
x...xmx...xx
x..xx%xx...x
xx0..0xx...xxxxx
.xmxxmx...xx...xx
.........xx.....xx
@......xmx..xxx.0x
....xmxx...xx%0.xx
xxmx........mxxxx
....xmxx...xx%0.xx
@......xmx..xxx.0x
.........xx.....xx
.xmxxmx...xx...xx
xx0..0xx...xxxxx
x..xx%xx...x
x...xmx...xx
xx.......xx
xxxx...xxx
xxxxxxxx
ENDMAP

NAME:   minmay_fractal_squares_5
TAGS:   transparent
DEPTH:  D:2-
SUBST:  x : x:40 cvbm
SUBST:  0 = 0.
MAP
        ...
        .x.
       .....
     ...xxx...
     .x.x%x.x.
   .....x.x.....
   .x...0.0...x.
  .....xx0xx.....
...xxx0x...x0xxx...
.x.x%..0.%.0..%x.x.
...xxx0x...x0xxx...
  .....xx0xx.....
   .x...0.0...x.
   .....x.x.....
     .x.x%x.x.
     ...xxx...
       .....
        .x.
        ...
ENDMAP

NAME:   minmay_fractal_squares_gapless_5
TAGS:   transparent
DEPTH:  D:2-
SUBST:  x : x:40 cvbm
SUBST:  0 = 0.
MAP
      ...
     ..x..
    ..xxx..
    .xx%xx.
  ....x.x....
 ..x.xx0xx.x..
..xxxx0.0xxxx..
.xx%.0.%.0.%xx.
..xxxx0.0xxxx..
 ..x.xx0xx.x..
  ....+.x....
    .xx%xx.
    ..xxx..
     ..x..
      ...
ENDMAP

NAME:   minmay_fractal_squares_gapless_7
TAGS:   transparent
DEPTH:  D:9-,Depths
SUBST:  m : nx
SUBST:  x : cvb
SUBST:  ' : xcvbnGT .:70
SUBST:  9 = 09..
MAP
            ...
           ..x..
          ..xxx..
          .xx%xx.
        ....m.m....
       ..x.xx9xx.x..
      ..xxmx...xmxx..
     ..xx%.9.'.9.%xx..
    ..xxxxxx...xxxxxx..
    .xx%xxxxx.xxxxx%xx.
  ....m.xxxxx9xxxxx.m....
 ..x.xx9xxx.....xxx9xx.x..
..xxmx...xx.....xx...xmxx..
.xx%.9.'..9..'..9..'.9.%xx.
..xxmx...xx.....xx...xmxx..
 ..x.xx9xxx.....xxx9xx.x..
  ....m.xxxxx9xxxxx.m....
    .xx%xxxxx.xxxxx%xx.
    ..xxxxxx...xxxxxx..
     ..xx%.9.'.9.%xx..
      ..xxmx...xmxx..
       ..x.xx9xx.x..
        ....+.m....
          .xx%xx.
          ..xxx..
           ..x..
            ...
ENDMAP

NAME:   minmay_fractal_squares_diagonal_5
TAGS:   transparent
DEPTH:  D:3-, Depths
SUBST:  0 = 0..
MAP
... ... ... ...
.x...x. .x...x.
..xxx.. ..xxx..
 .x%x.   .x%x.
..xx+00000+xx..
.x..0xx+xx0..x.
... 0x...x0 ...
    0x...x0
... 0x%%%x0 ...
.x..0xxxxx0..x.
..xx+00000+xx..
 .x%x.   .x%x.
..xxx.. ..xxx..
.x...x. .x...x.
... ... ... ...
ENDMAP

NAME:    minmay_mirror_moons_of_madness
TAGS:    transparent
DEPTH:   D:9-, Depths
SHUFFLE: ccvvbb
MAP
     ........
   ...cncncn...
  ..ncncncncnc...
 ..ncnc0..0ncncn.
 .ncn0......0cnc.
..cn...nbnb...cn..
......nbnbnb..ncn.
.....nb|..|nb.0nc.
.....bn........cn.
.....nb........nc.
.....bn9..9bn.%cn.
......bnbnbn..cnc.
..nc...bnbn...nc..
 .cnc%......%ncn.
 ..cncn%..%cncn..
  ..cncncncncn..
   ...ncncnc...
     ........
ENDMAP

NAME:   minmay_circle_x
TAGS:   transparent
DEPTH:  D:2-
SUBST:  z : y:50 %0GTz
SUBST:  y : x:34 .:34 cvb G:2
SUBST:  x : xcvb
SUBST:  z = x
SUBST:  0 = 0..
MAP
  .......
 ..xxxxx..
..y0xxx0y..
.x0y0x0y0x.
.xx0y%y0xx.
.xxx%z%xxx.
.xx0y%y0xx.
.x0y0x0y0x.
..y0xxx0y..
 ..xxxxx..
  .......
ENDMAP

NAME:   minmay_between
TAGS:   transparent
DEPTH:  D:2-
SUBST:  0 = 0.
MAP
 .......
..x...x..
.xxx.xxx.
.00xxx00.
.xxx.xxx.
..x..%x...
 ...x%..x..
  .xxx.xxx.
  .00xxx00.
  .xxxxxxx.
  ..x...x..
   .......
ENDMAP

# Each chamber contains a different feature in a different arrangement of 5.
NAME:    minmay_chambers_of_fives
TAGS:    transparent
DEPTH:   D:5-10
SHUFFLE: ABCDG / EFHI0 / JKLMT / NOPQ" / RSYZ%
SHUFFLE: AFLPZ / BHMQR / CIJNS / DEKOY
SUBST:   BCDHIEMJKQNORSY = .
SUBST:   A = G, F = 00009, L = TTTTV, P = x, Z = %%%%*
SUBST:   " = x
SUBST:   x : xxxxxcccvb
MAP
      .........
      .xxx.xxx.
      .xI.H.Ix.
      .x.FEF.x.
      ..HE0EH..
      .x.FEF.x.
.......xI.H.Ix.......
.xxx.xxxxx.xxxxx.xxx.
.xD.C.DxZ.Y.ZxM.L.Mx.
.x.BAB.x.SRS.x.KJK.x.
..CAGAC.YR%RY.LJTJL..
.x.BAB.x.SRS.x.KJK.x.
.xD.C.DxZ.Y.ZxM.L.Mx.
.xxx.xxxxx.xxxxx.xxx.
.......xQ.P.Qx.......
      .x.ONO.x.
      ..PN"NP..
      .x.ONO.x.
      .xQ.P.Qx.
      .xxx.xxx.
      .........
ENDMAP

NAME:   minmay_shattered_shrine
DEPTH:  D:7-, Depths, Lair
TAGS:   transparent
KMONS:  p = plant
SUBST:  9 = 9., " = .:190 0:5 %:5, ' = .:30 0:5 %:5
MAP
.......................
.ccccccc""c"cc"ccccccc.
.cp9..pc"cc"c""cp9.9pc.
.c9nnn.c"cc""c"c9n+n9c.
.c.+*n.+""c"c""c.n*n.c.
.c9nnn.c"c"""c"c.nnn.c.
.cp9..pc"c""cc"cp...pc.
.ccccccc"c"c"c"ccc+ccc.
.""""""""ccccc"""""""".
.cc"c""cc'cc''"ccc"cc".
.c""c"c""''c''c""""""".
.cccc""ccccc'c"cc"ccc".
."c"cc"""c''c'c""""""".
.c"ccc"cc'cc'c""cccc"c.
.""""""""c""c""""cccc".
.ccc+ccc"ccc""""""""c".
.cp...pc"""cccc"cc""cc.
.c.nnn.c""ccc"cc"c"c"c.
.c.n*n.c"cccc"""c"cccc.
.c9n+n9c""cc"c"""""""c.
.cp9.9pc"c""""ccc""c"c.
.ccccccc"cc"cc"""""""".
.......................
ENDMAP

NAME:    minmay_pentangle
TAGS:    transparent
DEPTH:   D:3-6
SHUFFLE: '! / Q" / Q" / Q"
# Each chamber independently has either monsters or items
SHUFFLE: 12345adefg
SUBST:   12345 = 0..., adefg = %..., ! = ', ' : xcvb, ? : +., x : xxxxxcccvb
SUBST:   " = .:80 xcvbGTV%, Q = .
MAP
...................
.xxxxxxxx?xxxxxxxx.
.xxxx111x.x222xxxx.
.xx1111xx.xx2222xx.
.xx1111xx.xx2222xx.
.x1111+x...x+2222x.
.xxxxxx..'..xxxxxx.
.?.......'.......?.
.xxx..''.'.''..xxx.
.x4xx..''"''..xx3x.
.x44xx..'.'..xx33x.
.x444+.''.''.+333x.
.x44xx.'...'.xx33x.
.x4xx....x....xx3x.
.x44x..xx+xx..x33x.
.xx4x.xx555xx.x3xx.
.xxxx?xxxxxxx?xxxx.
...................
ENDMAP

NAME:    minmay_pentomino_pile
TAGS:    transparent
DEPTH:   D:2-4
SUBST:   0 = 0%
MAP
   ............
   ....xxx.....
   .xx.x.x.xxx.
....x.x.0.xx...
..x.x.xx.x..x..
..x.x.x.xxx0xx...
..xx.0x.0x..xx...
..x.xx.x..xx..xx.
.x.0.x.xxx.xx0xx.
.xx.xx0..x.x..x..
..xx..xxx.0.xx...
....x0.x.xxx...
   .xx.x.x.....
   ..xx..x...
   ..........
ENDMAP

NAME:   minmay_alternating_orb
TAGS:   transparent
DEPTH:  D:6-, Depths
WEIGHT: 5
SUBST:  x : xxxxxcccvb
MAP
     ......
  ....xxxx..
 ..xxx%%%xx.
 .xx%%xx%%x.
 .x%%x0xx%x.
..x%xx00x%x.
.x0x%%xx0x..
.x0xx%x00x.
.x00xx00xx.
.xx000xxx..
..xxxx...
 ......
ENDMAP

NAME:   minmay_microvault
DEPTH:  D:6-, Depths
MAP
c9c
c*c
ccc
ENDMAP

NAME:   amcnicky_mini_pool_medium
TAGS:   no_pool_fixup
WEIGHT: 5
DEPTH:  D:5-, Depths, Lair
SUBST:  p : wwwWWl, q = 0.
: if you.in_branch("Depths") then
SUBST:  x = c
: end
MAP
  xx...xx
 xx..p..xx
xx.qpppq.xx
x.qpppppq.x
..ppppppp..
.ppppppppp.
..ppppppp..
x.qpppppq.x
xx.qpppq.xx
 xx..p..xx
  xx...xx
ENDMAP

NAME:    nicolae_fountain_basement
TAGS:    transparent allow_dup luniq no_descent
DEPTH:   D:5-, Depths:2-, Snake:2-, Elf:2-, Crypt:2-
KMASK:   -'cnTUVY0%{[( = opaque
SHUFFLE: DE/TF
SUBST:   D : ---T, T : T:30 UV Y:3, F : n, E : cccn, H : cccn, \
         s = {[(, - = 0%----
MAP
    .....
    .FFF.
  ...HTH...
  .EEH-HEE.
...ED---DE...
.FHH-'''-HHF.
.FT--'s'--TF.
.FHH-'''-HHF.
...ED---DE...
  .EEH-HEE.
  ...HTH...
    .FFF.
    .....
ENDMAP

NAME:   nicolae_rejected_hall
TAGS:   transparent
DEPTH:  D:9-, Depths
NSUBST: D = + / n+, E = + / n+, F = + / n+, H = + / n+, J = + / n+
SUBST:  n : nccc, % = %%%*, * = ***|, 0 = 0..., 9 = 9..., 8 = 8...
MAP
    ccccccccc+ccccccccc
    c%...D0.....0E...%c
  ccc.89.c.......c.98.ccc
  c*.998.c0.0.0.0c.899.*c
ccc.899.%cc..T..cc%.998.ccc
c%.998.cccc0.0.0cccc.899.%c
c.899.*ccccc...ccccc*.998.c
c.98.ccccccc0.0ccccccc.89.c
c...%ccccccccJcccccccc%...c
cDccccccccc0...0cccccccccEc
c0.0cccccc%.0.0.%cccccc0.0c
c....0ccc0.9.0.9.0ccc0....c
c..0...0c.0.9.9.0.c0...0..c
+...T0..J..0.U.0..J..0T...+
c..0...0c.0.9.9.0.c0...0..c
c....0ccc0.9.0.9.0ccc0....c
c0.0cccccc%.0.0.%cccccc0.0c
cFccccccccc0...0cccccccccHc
c...%ccccccccJcccccccc%...c
c.98.ccccccc0.0ccccccc.89.c
c.899.*ccccc...ccccc*.998.c
c%.998.cccc0.0.0cccc.899.%c
ccc.899.%cc..T..cc%.998.ccc
  c*.998.c0.0.0.0c.899.*c
  ccc.89.c.......c.98.ccc
    c%...F0.....0H...%c
    ccccccccc+ccccccccc
ENDMAP

# With shadow creatures, summons, word of recall, and phantom mirror, this
# vault can get out of hand pretty quickly. You've got this, though.
NAME:    nicolae_keep_em_comin
TAGS:    transparent
DEPTH:   Depths:2-
KMONS:   1 = rakshasa / shadow demon / ironbound convoker / \
             deep elf demonologist / boggart / vampire mage
NSUBST:  D = + / c, E = + / c, F = + / c, H = + / c
# 40% chance of all three upstairs, 60% of just two.
SHUFFLE: {[(<<
# Generates between 8 and 16 monsters
NSUBST:  . = 8=1 / 8=1. / .
FTILE:   .'{[(<1+G = floor_mystic_chasm
MAP
cccc   cccc   cccc
cccccDccccccDccccc
cccc'''cccc'''cccc
ccc............ccc
 c'............'c
 H'..''''''''..'E
 c'..''''''''..'c
ccc..''G''G''..ccc
ccc..'''{['''..ccc
ccc..'''(<'''..ccc
ccc..''G''G''..ccc
 c'..''''''''..'c
 H'..''''''''..'E
 c'............'c
ccc............ccc
cccc'''cccc'''cccc
cccccFccccccFccccc
cccc   cccc   cccc
ENDMAP

# So named because the layout started as a doodle in my notebook.
NAME:  nicolae_doodle_vault
TAGS:  transparent
DEPTH: D:8-
KITEM: * = * w:30 / |
KMONS: * = 9 w:30 / 8
SUBST: 0 = .000, % = .%%%
MAP
  xx@xxxxxxxxx@xx
  x......x......x
xxx.xxxx.x.xxxx.xxx
x...x....x....x...x
@.xxx.x.xxx.x.xxx.@
x.x..0x0...0x0..x.x
x.x.xxxxx.xxxxx.x.x
x.x..0x*%.%*x0..x.x
x...x.x%xxx%x.x...x
xxxxx...xxx...xxxxx
x...x.x%xxx%x.x...x
x.x..0x*%.%*x0..x.x
x.x.xxxxx.xxxxx.x.x
x.x..0x0...0x0..x.x
@.xxx.x.xxx.x.xxx.@
x...x....x....x...x
xxx.xxxx.x.xxxx.xxx
  x......x......x
  xx@xxxxxxxxx@xx
ENDMAP

# Places an early-ish talisman with corresponding monsters and scenery
NAME:  hellmonk_talismancer
TAGS:  transparent no_item_gen patrolling
DEPTH: D:12-, Lair:2-, Orc:$
: local r = 0
: if you.branch() == "Lair" then
:   r = crawl.random_range(1, 4)
: elseif you.branch() == "Orc" then
:   r = crawl.random_range(3, 5)
: else
:   r = crawl.random_range(1, 9)
: end
: if r == 1 then
MONS:   eight-headed hydra / goliath frog
ITEM:   maw talisman / maw talisman randart w:1
SUBST:  " : ., . = . %:1
KITEM:  % = yak skeleton
: elseif r == 2 then
MONS:   anaconda
KMONS:  " = water moccasin
ITEM:   serpent talisman / serpent talisman randart w:1
KFEAT:  "' = shallow_water
NSUBST: " = 1:" / 1:' / * = "'
SUBST:  2 = .
: elseif r == 3 then
MONS:   fire dragon, lindwurm
KITEM:  d = dragon-coil talisman / dragon-coil talisman randart w:1
SUBST:  '" = l
: elseif r == 4 then
KMONS:  12 = boulder beetle
KITEM:  d = granite talisman / granite talisman randart w:1
SUBST:  " = G
: elseif r == 5 then
MONS:   dancing weapon ; rapier | scimitar | great sword | \
                         quick blade w:1 | triple sword w:1 | double sword w:1
ITEM:   blade talisman / blade talisman randart w:1
KITEM:  " = damaged long sword / damaged falchion
SUBST:  x = v, 2 = .
: elseif r == 6 then
MONS:   reaper, soul eater
KITEM:  d = talisman of death / talisman of death randart w:1
SUBST:  " = G
:   vault_granite_statue_setup(_G, "G", "gravestone")
: elseif r == 7 then
MONS:   air elemental
KMONS:  2" = raiju
KITEM:  d = storm talisman / storm talisman randart w:1
SUBST:  " = "...
MARKER: d = lua:fog_machine {cloud_type = "thin mist", \
             pow_min = 5, pow_max = 12, delay_min = 28, delay_max = 42, \
             size = 2, spread_rate = 2, start_clouds = 1 }
: elseif r == 8 then
MONS:   vampire mage
KMONS:  2" = vampire
KITEM:  d = sanguine talisman / sanguine talisman randart w:1
KFEAT:  " = fountain_blood
SUBST:  " = ""YY
: else
SUBST: 1d'" = .
: end
SUBST: x : xcc
MAP
xxxxxxxxxxx
xxxxxxxxxxx
xx"'xxx'"xx
xx'..1..'xx
xxx..2..xxx
xxxx.d.xxxx
xxx.....xxx
xx'.....'xx
xx"'x+x'"xx
xxxxx.xxxxx
xxxx+++xxxx
ENDMAP

NAME:    regret_index_sullied_sanctum
TAGS:    no_monster_gen no_item_gen vaults_room vaults_orient_e
DEPTH:   D:5-, !D:$, Lair, !Lair:$, Orc, Vaults, !Vaults:$, Zot, !Zot:$
WEIGHT:  5 (Vaults), 10
# Randomization comes first before monsters due to per-branch tilework.
NSUBST:  G = 3:G / 1:. / * = GGD.., c = 2:D / 45:c / * = ccc.
NSUBST:  . = 4:t / 4:x / 1:12 / 4:d / 2:e / 2:f / / *:.
NSUBST:  ~ = 2:x / 2 = t' / 4 = '. / *:., - = 2:x / 1 = t' / 3 = '. / *:.
SUBST:   0 = 122, z = c
: if you.in_branch("D") then
:   if you.depth() < 8 then
MONS:    dart slug / jackal zombie w:1
MONS:    shadow imp / howler monkey w:2 / drude w:2, bullfrog zombie / jelly w:5
NSUBST:  g = 1:g$$ / *:$, * = 1:% / *:$
:   elseif you.depth() < 11 then
MONS:    ufetubus / wight w:5, sky beast / sleepcap, hornet zombie / marrowcuda
NSUBST:  g = 1:g$ / *:$, * = 1:*% / *:%
:   elseif you.depth() < 14 then
MONS:    vampire mosquito / basilisk / simulacrum
MONS:    meliai simulacrum / acid dragon
MONS:    very large slime creature / shadowghast
NSUBST:  g = 1:g / * = g$
:   else
MONS:    large slime creature / redback, necromancer, hydra / flayed ghost
:   end
ITEM:    human skeleton / kobold skeleton w:3
: elseif you.in_branch("Lair") then
MONS:    hell rat / bullfrog w:3, basilisk / manticore w:3
MONS:    alligator / torpor snail w:6
ITEM:    centaur skeleton / spriggan skeleton
: elseif you.in_branch("Orc") then
MONS:    warg, troll / deep troll w:3, obsidian bat
ITEM:    dwarf skeleton / elf skeleton w:1
: elseif you.in_branch("Vaults") then
MONS:    large slime creature / crawling flesh cage w:4
MONS:    formless jellyfish, entropy weaver
ITEM:    troll skeleton / ogre skeleton w:6
NSUBST:  W = 2:1 / * = ef, g = 1:g / 1:h, . = 1:3, % = 1:|*%% / *:%
: else -- Zot
MONS:    spectral base draconian / death cob w:5
MONS:    shadow dragon / green draconian monk
MONS:    ghost moth / curse toe
ITEM:    oni skeleton / elf skeleton w:2 / apis skeleton w:2
SUBST:   g = h
: end
: if you.in_branch("Vaults") then
NSUBST:  @ = 2:. / *:x, & = 2:. / *:x
SUBST:   t = e, }) = .
CLEAR:   X
FTILE:   'V = floor_hall
FTILE:   .defgh%*|CDG123 = floor_pebble_brown
TILE:    c = wall_stone_smooth
: else
:   if you.in_branch("Zot") then
KMONS:   t = withered plant
NSUBST:  . = 1:2 / 1:3 / *:.
SHUFFLE: })]<>
TILE:    n = dngn_transparent_stone_magenta
:   else
:     if you.in_branch("Lair") then
FTILE:   .defgh%*|CDG123 = floor_sprouting_stone
:     end
KMONS:   t = toadstool / fungus w:2
SUBST:   }) = t
FTILE:   'tV = floor_pebble_green
:   end
NSUBST:  @ = 2:x / *:@, & = 2:@x / * = cx
SUBST:   X = x
: end
KMONS:   D = pile of debris
ITEM:    any weapon mundane damaged no_pickup
ITEM:    robe mundane damaged no_pickup
# XXX: Light ego would normally be on a helmet, but this is specifically
#      referencing Monk starting items.
ITEM:    robe good_item / quarterstaff good_item / orb ego:light pre_id / \
         amulet of faith pre_id / \
         potion of ambrosia q:1 pre_id / scroll of revelation q:1 pre_id
ITEM:    robe randart / lajatang randart / orb ego:light randart / \
         amulet of faith randart / manual of invocations pre_id / \
         potion of ambrosia q:3 pre_id / scroll of revelation q:3 pre_id
KITEM:   CD = large rock q:1
KITEM:   % = % / any scroll q:1
KFEAT:   C = altar_ecumenical
KPROP:   C = no_tele_into
COLOUR:  W = lightgreen
: vault_granite_statue_setup(_G, "G", "broken pillar")
: decorative_floor(_G, '?', "broken floral vase")
MAP
XXXXXXXXXX
XzzzzzcccXXXXXXXXX
Xznnn...cccccccccXXXXXXXXX
XznCng..c~......cccccccczXXXXXX
Xznnn.).~c.G..G.c......?zcccccccc
Xz0g....c~..ee...c.Vt.1.zc......@
Xc..}.WW~c..ee..c..tt2..zc.G..G.@
Xc....WWc~.G..G..c...tt.zc......@
Xc~c~c~ccc......c..1.tV.zc......@
Xcc~c~czzc~c~c~ccc1.....zc.G..G.@
Xc...1.3zcc~c~cczcc-c-c-zc......@
Xc.G..G.c~......zc-c-c-ccc-c-c-cc
Xc..*%.1~c.Vt...zc......-cc-c-c-c
Xc..%*..c~.tt...zc.G..G.c-......c
Xc.G..G.~c...tt.zc..ff..-c.Vt.1.&
Xc2.....c~...tV.zc..ff..c-.tW...&
Xccccccccc0.....zc.G..G.-c...Wt.&
XXXXXXXXXccccccczc?.....c-.1.tV.&
        XXXXXXXXXccccccccc......c
                XXXXXXXXXcccccccc
                        XXXXXXX
ENDMAP

################################################################
#
# <<8>> Minivaults with monsters guarding a thematic item.
#
# A series begun by minmay. More entries welcome!
# minmay: "Depths begin intentionally shallow; players should not
#          be able to beat these right away, but should be able
#          to flee. I'd like to see what other people can come up
#          with for more of these vaults!
#
# We use a standard weight of 3 for the vaults that place unrandarts, since
# these items tend to be particularly strong and are more interesting when they
# don't generate too frequently. Out-of-depth threats are encouraged, but when
# placing in earlier Dungeon, use threats that can be reasonably escaped if
# there's no runed door or transporter.
################################################################

# Ring of the Tortoise
#
NAME:   minmay_guarded_unrand_tortoise
DEPTH:  D:$, Depths
# Can place in Vaults as a hard room.
TAGS:   no_monster_gen no_item_gen transparent vaults_hard
WEIGHT: 3
: if you.in_branch("Vaults") then
SUBST:  v = x
:   vaults_hard_standard(_G)
: end
MONS:   patrolling iron troll
KMONS:  d = patrolling iron dragon
KITEM:  d = ring_of_the_tortoise no_pickup
MAP
...............
.vvvvv.@.vvvvv.
.v1.........1v.
.v.vvvvvvvvv.v.
.v.v1.....1v.v.
.v.v.vv.vv.v.v.
.v...v...v...v.
.v...v.d.v...v.
.v...v...v...v.
.v.v.vv.vv.v.v.
.v.v1.....1v.v.
.v.vvvvvvvvv.v.
.v1.........1v.
.vvvvv.@.vvvvv.
...............
ENDMAP

# Zonguldrok
#
NAME:   minmay_guarded_unrand_zonguldrok
DEPTH:  D:12-, Depths, Crypt
TAGS:   no_monster_gen no_item_gen transparent
WEIGHT: 3
: if you.in_branch("Depths") then
MONS:   place:Depths:$ spectre / place:Depths:$ draugr, bone dragon
: elseif you.in_branch("Crypt") then
MONS:   spectral storm dragon / spectral ettin / golden dragon draugr / \
        juggernaut draugr w:5 / ancient champion w:5
MONS:   bone dragon
: else
MONS:   place:D:$ spectre / place:D:$ draugr, ghoul
: end
ITEM:   skull_of_zonguldrok no_pickup
MAP
...............
.cc+cccccccccc.
.c...c1..c1.1c.
.c...c...+...c.
.c1.1c1..c...c.
.cc+ccc+ccc+cc.
.c...c1.1c1.1c.
.c...c.2.c...c.
.c1.1c1d1c...c.
.cc+ccccccc+cc.
.c...c..1c..1c.
.c...+...+...c.
.c1.1c..1c..1c.
.ccccccccccccc.
...............
ENDMAP

# Scythe of Curses
#
NAME:   minmay_guarded_unrand_curses
TAGS:   no_monster_gen no_item_gen transparent
DEPTH:  D:12-, Depths, Crypt
WEIGHT: 3
MONS:   reaper, reaper; scythe_of_curses, mummy, guardian mummy
KPROP:  12' = no_tele_into
KMASK:  12' = opaque
MAP
..............
.cccccc+cccccc.
.c3.........3c.
.c.+ccccccc+.c.
.c.c...4...c.c.
.c.c.mmmmm.c.c.
.c.c.m1'1m.c.c.
.+.c4m'2'm4c.+.
.c.c.m1'1m.c.c.
.c.c.mmmmm.c.c.
.c.c...4...c.c.
.c.+ccccccc+.c.
.c3.........3c.
.cccccc+cccccc.
...............
ENDMAP

# There's a sword stuck inside a stone. Some knights are milling around
# wondering how to get it out. If you can dig through rock and tame the
# sword's enchantment, you could become the monarch! Or not..... (by Shiori)
#
# This is not about guarding an unrandart, but very close in spirit. (dpeg)
# If the vault comes up in Orc or Elf, there will be natives around.
#
# The dancing weapon is very out of depth early in D, but digging it out
# is mostly a deliberate action and there are enough system warnings. (Index)
NAME:    sword_in_stone
TAGS:    no_monster_gen patrolling vaults_hard transparent no_descent
DEPTH:   D:6-, Depths, !Depths:$, Vaults, Orc, Elf
WEIGHT:  3
: local ss = "rapier | long sword . leather armour . buckler | nothing"
: local gs = "great sword . chain mail | plate armour"
: local ls = "falchion | scimitar . chain mail . kite shield"
: local rs = "long sword . robe | leather armour . kite shield"
KMONS:   A = gnoll sergeant ; trident . scale mail | chain mail . kite shield
: kmons("B = wight ; " .. ls .. " | nothing")
: kmons("C = Eustachio / orc warrior ; " .. ss .. ", " ..
:            "orc warrior ; " .. ss .. " / nothing")
: kmons("D = Blorkula the orcula / orc warrior ; " .. gs .. ", " ..
:           "orc warrior ; " .. gs .. " / nothing")
: kmons("E = Maurice / kobold brigand ; dart ego:poisoned . " .. ss .. ", " ..
:           "kobold brigand ; dart ego:poisoned . " .. ss .. " / nothing")
: kmons("F = Joseph / orc knight ; " .. ls .. ", " ..
:           "orc knight ; " .. ls .. " / nothing")
: kmons("G = Erica / arcanist ; " .. rs .. ", arcanist ; " .. rs .. " / nothing")
: kmons("H = Maggie / occultist ; " .. rs .. ", " ..
:           "occultist ; " .. rs .. " / nothing")
: kmons("I = Urug / orc knight ; " .. gs .. ", orc knight ; " .. gs .. " / nothing")
KMONS:   J = Harold / deep elf knight, deep elf knight / nothing
KMONS:   K = Donald / orc warlord, orc warlord / nothing
KMONS:   L = Louise / hell knight, hell knight / nothing
KMONS:   M = Frances / hell knight, hell knight / nothing
KMONS:   N = Agnes / spriggan defender, spriggan defender / nothing
KMONS:   O = Rupert / vampire knight, vampire knight / nothing
KMONS:   P = Asterion / ancient champion, ancient champion / nothing
KMONS:   Q = Frederick / draconian knight, draconian knight / nothing
KMONS:   R = Sojobo / tengu reaver, tengu reaver / nothing
: if crawl.one_chance_in(50) then
KMONS:   S = dancing weapon ; singing sword
KITEM:   s = singing sword
: else
KMONS:   S = dancing weapon ; scimitar good_item | great sword good_item | \
                              demon blade good_item | double sword good_item | \
                              double sword good_item
KITEM:   s = scimitar good_item / great sword good_item / \
             demon blade good_item / double sword good_item / \
             triple sword good_item
: end
KMONS:   o = orc warrior / orc knight w:5
KMONS:   e = deep elf knight
NSUBST:  k = 4:k / 2 = k. / *:.
SHUFFLE: bm
SUBST:   b = cccvvb
: if you.in_branch("Orc") then
NSUBST:  k = 1:A / 1:I / *:o
: elseif you.in_branch("Elf") then
NSUBST:  k = 2 = KLMN / *:e
: elseif you.absdepth() < 12 then
SUBST:   k = ABCD, S = s
: elseif you.absdepth() < 14 then
SUBST:   k = EFGH
: elseif you.absdepth() < 16 then
SUBST:   k = GHIJ
: elseif you.absdepth() < 20 then
SUBST:   k = KLMNO
: else
SUBST:   k = OPQR
: end
KMASK:   Ss = opaque
KPROP:   s = no_tele_into
FTILE:   ABCDEFGHJIKLMNOPQRS. = floor_limestone
FTILE:   m = floor_pebble_darkgray
MAP
kkkkkkk
kkkkkkk
kkmbmkk
kkbSbkk
kkmbmkk
kkkkkkk
kkkkkkk
ENDMAP

# obsidian axe
# A mini-temple of Makhleb; demons ahoy!
NAME:   grunt_guarded_unrand_obsidian_axe
TAGS:   no_monster_gen no_item_gen transparent
DEPTH:  D:$, Depths
WEIGHT: 3
MONS:   obsidian statue
MONS:   patrolling hell knight
MONS:   sun demon / soul eater / smoke demon / neqoxec / ynoxinul / chaos spawn
MONS:   ice devil / rust devil / orange demon / red devil / hellwing / \
        sixfirhy
SUBST:  b : bbc
KPROP:  ._-cGO12345 = bloody / nothing w:20
KFEAT:  _ = altar_makhleb
KFEAT:  - = altar_makhleb
KITEM:  - = obsidian_axe no_pickup
: single_cloud(_G, "O", "flame", false)
TILE:   b = bedevilled_crystal_gehenna / bedevilled_crystal_dis
: set_feature_name("crystal_wall", "bedevilled crystal wall")
MAP
      ccccc
      cO1Oc
      c2-2c
     cc323cc
    cc4.3.4cc
   cc.G4.4G.cc
  ccc4.....4ccc
.ccOc.G4.4G.cOcc.
.c4.c.......c.4c.
@+.2+.G.3.G.+2.+@
.c4.c..._...c.4c.
.ccOcb.O1O.bcOcc.
..ccccccccccccc..
 ...............
ENDMAP

# sword of the Dread Knight
# A temple to Yredelemnul, with a champion wielding the blade designate.
NAME:   grunt_guarded_unrand_dread_knight
TAGS:   no_monster_gen no_item_gen patrolling
DEPTH:  Depths, Crypt
WEIGHT: 3
MONS:   death knight ; sword_of_the_dread_knight . chain mail w:7 | \
                       plate armour w:1
MONS:   profane servitor, bone dragon, ghoul, death cob, skeletal warrior
MONS:   freezing wraith / phantasmal warrior / \
        jiangshi / flayed ghost / skeletal warrior
KFEAT:  _ = altar_yredelemnul
KFEAT:  - = open_door
MAP
    ccccc
    c2_3c
    c.1.c
    c465c
ccccc+++ccccc
ccc.......ccc
c7-.G...G.-7c
ccc.......ccc
c7-.G...G.-7c
ccc.......ccc
c7-.G...G.-7c
ccc.......ccc
c7-.G...G.-7c
ccc.......ccc
c7-.G...G.-7c
ccc.......ccc
ccccc+++ccccc
     .@.
ENDMAP

# autumn katana
# An autumnal forest, with warriors paying respect to the last wielder
NAME:    wheals_guarded_unrand_autumn_katana
TAGS:    no_monster_gen no_item_gen patrolling
DEPTH:   Depths
WEIGHT:  3
MONS:    minotaur, fire giant, frost giant, spriggan defender, \
         deep elf blademaster
SHUFFLE: 12345
ITEM:    autumn_katana no_pickup
SUBST:   u = t.
TILE:    t = DNGN_TREE_YELLOW / DNGN_TREE_LIGHTRED w:5 / DNGN_TREE_RED / \
             DNGN_TREE_DEAD w:5
COLOUR:  t = lightred w:5 / red / yellow / brown w:5
MAP
ttttttttttttttttttttt
ttttttttttttttttttttt
ttuuuuuuuuuuuuuuutttt
@.................ttt
ttuuuuuuuuuuuuuu..ttt
tttttttttttttttuu..tt
tttttttttttttttu1.ttt
ttttttttttttttu..tttt
ttttttttttttuu..ttttt
tttttT.4.........tttt
tttttGd....3..2..tttt
tttttT.5.........tttt
ttttttttttttttttttttt
ttttttttttttttttttttt
ENDMAP

NAME:    minmay_guarded_unrand_brilliance
TAGS:    transparent
DEPTH:   D:13-, Depths
MONS:    profane servitor
ITEM:    brilliance no_pickup
KFEAT:   _ = altar_yredelemnul
SUBST:   1 = 1.
MAP
         ...
         .c.
         .n.
  ...    .c.    ...
  .c... ..n.. ...c.
  ..cn...ncn...nc..
   .ncnc.cdc.cncn.
   ..n*ncn.ncn*n..
    .cn.nc.cn.nc.
   ...cn1n1n1nc...
....ncncn...ncncn....
.ncnc*..1._.1..*cncn.
....ncncn...ncncn....
   ...cn1n1n1nc...
    .cn.nc.cn.nc.
   ..n*ncn.ncn*n..
  ..ncnc.c.c.cncn..
  .ncn...n=n...ncn.
 ..cn.. ..... ..nc..
 .c...   .c.   ...c.
 ...     .n.     ...
         .c.
         ...
ENDMAP

NAME:    minmay_guarded_unrand_prune
TAGS:    transparent no_monster_gen
DEPTH:   D:12-
WEIGHT:  3
MONS:    deep elf pyromancer / deep elf zephyrmancer / ogre mage / occultist / \
         arcanist / kobold demonologist w:2 / kobold fleshcrafter w:2 / \
         naga mage w:2
ITEM:    glaive_of_prune no_pickup
SUBST:   " : .:50 ccvbn, ' : .:50 ccvbn, ? : .:50 ccvbn, ! : .:60 ccvbnT
NSUBST:  1 = 6:1 / 10=1.... / .
KMASK:   l = no_monster_gen
TILE:    b = dngn_crystal_magenta
MAP
     ...........
   ...lvlv1vlvl...
  ..vlvvvv1vvvvlv..
 ..lvvvlvl1lvlvvvl..
 .vvvlv1111111vlvvv.
..lvl111"'?'"111lvl..
.lvvv1"'?1"1?'"1vvvl.
.vvl11'111!111'11lvv.
.lvv1"?1!111!1111vvl.
.vvl1'111lvlvlvlvlvv.
.1111?"!1vvvvvvvvvvl.
.vvl1'111lvG.G.G.Gvv.
.lvv1"?1!vv.U...U.vl.
.vvl11'11lvG.b.b.Gvv.
.lvvv1"'1.+...d.Gvvl.
..lvl1111lvG.b.b.vl..
 .vvvlv11vv.U.G.vvv.
 ..lvvvlvlvG.Gvvvl..
  ..vlvvvvvvvvvlv..
   ...lvlvlvlvl...
     ...........
ENDMAP

NAME:    minmay_guarded_unrand_variability
TAGS:    transparent
DEPTH:   D:8-
WEIGHT:  3
ITEM:    mace_of_variability no_pickup
MONS:    chaos spawn
KFEAT:   _ = altar_xom
# walls are carefully placed and guarantee no islands
SUBST:   x = xcvbmGwWlTUVYt+ <:4 >:4 A:2 1:160
NSUBST:  1 = 2=1 / 2=% / 3=1%...... / .
MAP
...........
.1xxx11xxx.
.x1xxxx1xx.
.xxxxx1xxx.
.xxxx_xxxx.
.x1xx1xxx1.
.1xxxdxx1x.
.1xx1xxxxx.
.x11xxxxxx.
.xxxxxx1xx.
...........
ENDMAP

NAME:    minmay_guarded_unrand_staff_of_olgreb
TAGS:    no_monster_gen no_trap_gen transparent
DEPTH:   D:5-
WEIGHT:  3
ITEM:    staff_of_olgreb no_pickup
: if you.depth() < 9 then
MONS:    scorpion / redback w:5
MONS:    killer bee
MONS:    adder / water moccasin
: elseif you.depth() < 13 then
MONS:    redback / wolf spider w:5
MONS:    killer bee / hornet w:5
MONS:    water moccasin / black mamba
: else
MONS:    wolf spider / emperor scorpion w:5
MONS:    hornet / ghost moth w:5
MONS:    black mamba / sea snake
: end
# TODO: built in fallback for staff of olgreb is kind of dumb
NSUBST:  1 = 5=1 / 6=1.. / ., 2 = 5=2 / 9=2.. / ., 3 = 5=3 / 6=1.. / .
MAP
      ...
      .b.
      .b.
     ..b..
     .bbb.
     .ndn.
    ..b+b..
    .bb2bb.
   ..n222n..
  ..bb222bb..
 ..bb22222bb..
..bb2222222bb..
.bb=bb222bb=bb.
.n111bbnbb333n.
.b1111n*n3333b.
.b1111b*b3333b.
.n1111===3333n.
.bb111b.b333bb.
..bbb1b.b3bbb..
 ...bnb.bnb...
   .........
ENDMAP

NAME:    minmay_guarded_unrand_vampires_tooth
TAGS:    transparent
DEPTH:   D:10-, Crypt, Depths
WEIGHT:  3
: if you.in_branch("D") then
:   if you.depth() < 13 then
MONS:    vampire mosquito / tyrant leech w:5, vampire
:   else
MONS:    vampire mosquito / tyrant leech / vampire, vampire knight
:   end
: else
MONS:    vampire knight, vampire mage
:   if you.in_branch("Crypt") then
KMONS:   d = vampire bloodprince
:   end
: end
KITEM:   d = vampires_tooth no_pickup
MAP
.........
.ccc.ccc.
.1c...c1.
.cc...cc.
.1c2Y2c1.
.cc.d.cc.
.1c...c1.
.ccccccc.
.........
ENDMAP

NAME:    minmay_guarded_unrand_wrath_of_trog
TAGS:    transparent
DEPTH:   Elf, Depths
WEIGHT:  3
MONS:    spriggan berserker
ITEM:    wrath_of_trog no_pickup pre_id
NSUBST:  1 = 3=1 / 9=1...... / .
MAP
    .......
   .."""""..
  .."ttttt"..
 .."tt"""tt"..
.."tt"111"tt"..
."tt"11c11"tt".
."t"1c111c1"t".
."t"111d111"t".
."t"1c111c1"t".
."tt"11c11"tt".
.."tt"111"tt"..
 .."".. ..""..
  ....   ....
ENDMAP

NAME:    minmay_guarded_unrand_skullcrusher
TAGS:    transparent
DEPTH:   D:12-, Crypt
WEIGHT:  3
MONS:    laughing skull
: if you.in_branch("Crypt") then
MONS:    curse skull
NSUBST:  d = 1:d / *:*
NSUBST:  ' = 6:1 / 4 = 1.... / *:.
SUBST:   " = 1.., ! = 2.
: else
MONS:    skeletal warrior
NSUBST:  d = 1:d / *:%, ' = 4:1 / 6 = 1.... / *:.
NSUBST:  " = 2:1 / 2 = 1.. / *:., ! = 2:2 / *:.
: end
ITEM:    skullcrusher no_pickup pre_id
MAP
     .........
   ...ccccc.....
  ..ccc''cc..c...
 ..cc'''c'ccc..c..
 .cc'''''c'c.cc.c.
..c''''c''''ccccc..
.cc'''''''c''c'c.cc.
.c''''''''c''''''c.
.c'''''''''c'''''c.
.c'ccc'''''''ccc'c.
.c'ccncc'''ccncc'c.
.c'nnnnn'''nnnnn'c.
.c'ccncc'''ccncc'c.
.c''cnc'''''cnc''c.
.c'''''''c'''''''c.
.cc'''''ccc'''''cc.
..ccc''''c''''ccc..
 ...cc'''''''cc...
   ..c!c!c!c!c..
    .cdcdcdcdc.
    .cncncncnc.
    .c"c"c"c"c.
    .c"c"c"c"c.
    ...........
ENDMAP

NAME:    minmay_guarded_unrand_finisher
TAGS:    transparent
DEPTH:   D:7-
WEIGHT:  3
: if you.depth() < 13 then
MONS:    wraith, skeletal warrior
: else
MONS:    skeletal warrior, reaper
: end
ITEM:    finisher no_pickup pre_id
NSUBST:  2 = 2 / 1, 1 = 1.
NSUBST:  D = . / c, E = . / c
SUBST:   c = c .:2
MAP
.............
.DxxDxDxDxxD.
.x..xc1cx..x.
.x.c..x..c.x.
.Dx.ExExE.xD.
.xc.x2c2x.cx.
.D1xEcdcEx1D.
.xc.x2c2x.cx.
.Dx.ExExE.xD.
.x.c..x..c.x.
.x..xc1cx..x.
.DxxDxDxDxxD.
.............
ENDMAP

NAME:    minmay_guarded_unrand_resistance
TAGS:    no_monster_gen no_trap_gen transparent
DEPTH:   D:9-
WEIGHT:  3
MONS:    fire dragon, ice dragon
ITEM:    shield_of_resistance no_pickup
KMASK:   lw = opaque
MAP
...........
.vnnv=vnnv.
.n...1nlln.
.n.T..nlln.
.v....vnnv.
.n2..d..1n.
.vnnv....v.
.nwwn..V.n.
.nwwn2...n.
.vnnv=vnnv.
...........
ENDMAP

NAME:    chequers_guarded_unrand_ignorance
TAGS:    no_monster_gen no_trap_gen transparent
DEPTH:   D:7-, Orc
WEIGHT:  3
MONS:    orange crystal statue
ITEM:    tower shield_of_ignorance no_pickup
KPROP:   .d1 = no_tele_into
SUBST:   - = .
MAP
-----------
-cccc=cccc-
-c1.....1c-
-c.c...c.c-
-c.......c-
-n...d...n-
-c.......c-
-c.c...c.c-
-c1.....1c-
-cncc=cccc-
-----------
ENDMAP

NAME:    chequers_guarded_unrand_mask_of_the_dragon
TAGS:    no_monster_gen no_trap_gen
DEPTH:   Zot, !Zot:$
WEIGHT:  3
ITEM:    mask_of_the_dragon no_pickup
MONS:    storm dragon, shadow dragon, golden dragon, ghost moth, moth of wrath
# Shuffle one transporter destination location
NSUBST:  r = R / -
# Randomly swap which transporter is the entrance and the loot locations.
SHUFFLE: PQd|*$ / SRDEFH
# Replace non-loot locations with floor.
SUBST:   DEFH = -
# Place monsters randomly.
# 3 of each dragon (and up to 4 random extras), 3 ghost moth, 3 moth of wrath
NSUBST:  - = 3=1 / 3=2 / 3=3 / 4=123--- / 3=4 / 3=5 / -
KMASK: . = !opaque
# Place transporters
MARKER:  P = lua:transp_loc("mask_of_the_dragon_entry")
MARKER:  Q = lua:transp_dest_loc("mask_of_the_dragon_entry")
MARKER:  R = lua:transp_loc("mask_of_the_dragon_exit")
MARKER:  S = lua:transp_dest_loc("mask_of_the_dragon_exit")
MAP
         .........
 .........ccccccc.
 .ccccccccc-----c..
 .ccr--------c--cc..
 .cc--------ccc--cc..
  .ccc*$---cccF---cc.
   ..c|$---ccEHH---c.
   S.nd$---rcDH--Q-nP@
   ..c|$---ccEHH---c.
  .ccc*$---cccF---cc.
 .cc--------ccc--cc..
 .ccr--------c--cc..
 .ccccccccc-----c..
 .........ccccccc.
         .........
ENDMAP

####
# Maxwell's Thermic Engine
#
# Use demon blade as fallback here instead of double sword, to keep
# consistency with the Maxwell's demon reference.
#
NAME:   brannock_guarded_unrand_thermic_engine
TAGS:   no_monster_gen no_item_gen transparent
DEPTH:  Depths
WEIGHT: 3
ITEM:   maxwell's_thermic_engine no_pickup
MONS:   ice devil, blizzard demon, ice fiend
MONS:   sun demon, balrug, brimstone fiend
# 6-2-1, 9 total demons for each side
NSUBST: 1 = 6=1 / ., 2 = 2=2 / ., 3 = 3 / .
NSUBST: 4 = 6=4 / ., 5 = 2=5 / ., 6 = 6 / .
MAP
       @@@
 bbbbbb...bbbbbb
bb....bb+bb....bb
b32111.=.=.44456b
b32111.=.=.44456b
b32111.=.=.44456b
b32111.bnb.44456b
b32111.+d+.44456b
bb....bbbbb....bb
 bbbbbb   bbbbbb
ENDMAP

NAME:   wander_guarded_unrand_ratskin
TAGS:   no_monster_gen no_item_gen
DEPTH:  D:5-8
WEIGHT: 3
ITEM:   ratskin_cloak no_pickup
MONS:   river rat, hell rat
SUBST:  - = 1 .:50, ' = 112...
MAP
     xxxxxxxxx
  xxxx-x---x-xxx
xxx---x-xxx-x--xx
xx-xxxxxxxxxxxx-xx
x-xxxxxx''''''xx-xxx
xx--xx''''x'''dxx--xx
 xxx-xx''x'''''xxxx-x
 xx-xx'''''''xxxxx-xx
 x-xx-x-x-xxxxxxx-x-x
 xx-xx---x---xx--xxxx
 xx--xxx-------xxx
  x--xxxxxxxxxxx
  xxx@xx
ENDMAP

NAME:    hellmonk_guarded_unrand_starlight
TAGS:    transparent patrolling
DEPTH:   D:13-, Depths
WEIGHT:  3
ITEM:    cloak of starlight no_pickup
: if you.in_branch("D") then
MONS:    wretched star, cherub
SUBST:   D = 12 .:60
# Depths
: else
MONS:    wretched star, daeva / angel
SUBST:   D = 12..
: end
SHUFFLE: 12
MAP
                @
               v+v
               v.v
               v.v
               v.v
              vv.vv
              v...v
              v...v
             vv...vv
             v..1..v
            vv.....vv
           vv.......vv
          vv....v....vv
        vvv.v...v...v.vvv
     vvvv....v.vDv.v....vvvv
 vvvvv........vDvDv........vvvvv
@+.......2..vvDvdvDvv..2.......+@
 vvvvv........vDvDv........vvvvv
     vvvv....v.vDv.v....vvvv
        vvv.v...v...v.vvv
          vv....v....vv
           vv.......vv
            vv.....vv
             v..1..v
             vv...vv
              v...v
              v...v
              vv.vv
               v.v
               v.v
               v.v
               v+v
                @
ENDMAP

NAME:   hellmonk_guarded_unrand_salamander
TAGS:   no_monster_gen
DEPTH:  D:10-, Snake, !Snake:$, Depths
WEIGHT: 3
ITEM:   salamander_hide_armour no_pickup
: if you.in_branch("Snake") then
MONS:   salamander, salamander mystic, salamander tyrant
SUBST:  v = x
: elseif you.in_branch("Depths") then
MONS:   fire dragon, salamander tyrant, salamander tyrant
# D:10-12
: elseif you.depth() < 13 then
MONS:   salamander, salamander mystic
SUBST:  2 = 1, 3 = 2, 1 = 1.
# D:13-
: else
MONS:   salamander, salamander mystic, salamander tyrant
SUBST:  2 = 22.
: end
SUBST:  v : cv
MAP
vvvvvvvvvvvvvvvvv
vGllllllllGvGllGv
vl1..1....lvl..dv
vl...Gv..1lvl.3.v
vl...lv...lvl...v
vl...lv...GlG...v
vl...lv.1......2v
vG...Gv....2....v
vv+++vvvvvvvvvvvv
  @@
ENDMAP

NAME:   hellmonk_guarded_unrand_damnation
TAGS:   no_monster_gen
DEPTH:  D:13-, Elf
WEIGHT: 3
ITEM:   damnation no_pickup
: if you.in_branch("Elf") then
MONS:   deep elf sorcerer / deep elf high priest, hellion
KFEAT:  a = iron_grate
NSUBST: D = 2=2 / 1.
: else  -- D:13-
MONS:   efreet, hellion
NSUBST: D = 2 / 1..
SUBST:  a = c
: end
SUBST:  b = bc, c : cv
TILE:   b = bedevilled_crystal_gehenna
: set_feature_name("crystal_wall", "bedevilled crystal wall")
MAP
           ccc    ccccccc
 ccc       cDcccccccc..Dcc
 c.cc      c.......D.....cc
 c..cccccccc..ccac..cac...cc
 c.c..c..c......c....c.....cc
@+..c......DccccacdccaccbD.Dcc
 c.c..c..c......c....c.....cc
 c..cccccccc..ccac..cac...cc
 c.cc      c.......D.....cc
 ccc       cDcccccccc..Dcc
           ccc    ccccccc
ENDMAP

NAME:   hellmonk_guarded_unrand_cigotuvi
TAGS:   no_monster_gen
DEPTH:  D:9-
WEIGHT: 3
ITEM:   cigotuvi's_embrace no_pickup
: if you.depth() < 13 then
MONS:   zombie place:D:15, hellwing
SUBST:  1 = 1.
: else
MONS:   zombie place:Depths:1 / draugr place:D:$, soul eater
: end
KPROP:  D = no_tele_into
: dgn.delayed_decay(_G, 'D', 'human corpse')
MAP
     @
ccccc+ccccc
ccc.....ccc
cc.......cc
c1.......1c
c..nnnnn..c
c.1nDDDn1.c
c..nDDDn..c
c1.nDDDn.1c
c..nnnnn..c
c1.1.2.1.1c
cc.......cc
ccc2.d.2ccc
ccccccccccc
ENDMAP

NAME:   hellmonk_guarded_unrand_sphere_of_battle
TAGS:   transparent
DEPTH:  D:9-
WEIGHT: 3
ITEM:   sphere_of_battle no_pickup
MONS:   tengu conjurer, tengu reaver
: if you.depth() < 13 then
SUBST:  D = 1.
: else
NSUBST: D = 1 / 2
: end
NSUBST: a = + / b
MAP
    ........
  ...aaaaaa...
 ..aaa....aaa..
 .aa........aa.
..a...bbbb...a..
.aa..bbdDbb..aa.
.a...b....b...a.
.a.....bb.....a.
.a.....bb.....a.
.a...b....b...a.
.aa..bbD1bb..aa.
..a...bbbb...a..
 .aa........aa.
 ..aaa....aaa..
  ...aaaaaa...
    ........
ENDMAP

# this vault gives the item to a monster instead of placing it normally
NAME:   hellmonk_guarded_unrand_dark_maul
TAGS:   transparent no_monster_gen
DEPTH:  D:8-, Orc, Depths
WEIGHT: 3
: if you.in_branch("Depths") then
MONS:   ettin ; dark maul . great mace randart
MONS:   stone giant w:30 / ettin w:20 / juggernaut / titan / iron giant w:5
SUBST:  D = 222.
: elseif you.in_branch("Orc") then
MONS:   two-headed ogre ; dark maul . dire flail ego:heavy
MONS:   two-headed ogre / cyclops / orc knight / orc warlord w:2 \
        / stone giant w:2 / ettin w:2
SUBST:  D = 2..
# D:8-12
: elseif you.depth() < 13 then
MONS:   two-headed ogre ; dark maul \
            . dire flail | giant club | giant spiked club
MONS:   orc warrior / two-headed ogre / cyclops / orc knight w:2
SUBST:  D = 2...
# D:13-15
: else
MONS:   ettin ; dark maul . great mace ego:heavy good_item
MONS:   two-headed ogre / cyclops / orc knight / orc warlord w:5 \
        / stone giant w:5 / ettin w:5
SUBST:  D = 2.
: end
MAP
                    @@
vvvvvvvvvvvvvvvvvvvv++v
v.2+.....D......D..v..v
v..+..v.........v..v..v
v..v..v....D....v..v..v
v..v..v...v.v...v..v..v
v..v..v..D.1.D..v..v..v
v..v..v...v.v...v..v..v
v..v..v....D....v..v..v
v..v..v.........v..+..v
v..v..D......D.....+2.v
v++vvvvvvvvvvvvvvvvvvvv
 @@
ENDMAP

NAME:   hellmonk_guarded_unrand_gong
TAGS:   transparent no_monster_gen patrolling vaults_hard vaults_orient_n
DEPTH:  D:7-, Vaults
WEIGHT: 3
ITEM:   shield_of_the_gong no_pickup
MONS:   vault sentinel
: if you.in_branch("Dungeon") then
:     if you.depth() < 13 then
SUBST:  9 = .
:     else
NSUBST: 9 = 9 / .
:     end
# Vaults
: else
# Only one entrance in Vaults, and any door is handled by the layout.
SUBST:  va = x, @+ = .
CLEAR:  p'
FTILE:  ^-.19d = floor_metal_gold
: end
KFEAT:  ^ = alarm trap
SUBST:  - = ^...., ' = ^, a = +, p = @
MAP
      ^@^
     vv+vv
   vvv^.^vvv
  vv^-----^vv
  v^-------^v
 vv---vvv---vv
 v..-v.9.v-..v
 v1.v..d..v.1v
 v..-v.9.v-..v
 vv---vvv---vv
  v^-------^v
  vv^-----^vv
   vvv^.^vvv
     vvavv
      'p'
ENDMAP

NAME:   hellmonk_guarded_unrand_night
TAGS:   no_monster_gen patrolling
DEPTH:  D:7-
WEIGHT: 3
ITEM:   robe_of_night no_pickup
: if you.depth() < 13 then
MONS:   dream sheep, shadowghast
SUBST:  1 = 1.
: else
MONS:   dream sheep w:20 / satyr, shadow wraith
SUBST:  1 = 111.
: end
SUBST:  c : ccv
FTILE:  .12d+ = floor_limestone
COLOUR: .12d+ = yellow
MAP
    cccccc
  ccc1...ccc
 cc1.....2dcc
 c.....ccccc
cc..1ccc
c1..cc
c...c
c.2.c
c...c
c1..cc
cc..1ccc
 c.....ccccc
 cc1.......+@
  ccc1...ccc
    cccccc
ENDMAP

NAME:   hellmonk_guarded_unrand_gyre_and_gimble
TAGS:   no_monster_gen
DEPTH:  D:7-, Elf
WEIGHT: 3
ITEM:   gyre no_pickup
: if you.in_branch("Elf") then
MONS:   deep elf blademaster, deep elf blademaster
# D:6-12
: elseif you.depth() < 13 then
MONS:   two-headed ogre, spriggan
# D:13-
: else
MONS:   ettin, spriggan berserker ; rapier . animal skin
: end
KFEAT:  D = c
SUBST:  x : Dx, c : cv
COLOUR: xD = white
TILE:   x = wall_ice
TILE:   D = wall_marble
MAP
    xxbcc
   xxcdxcc
  xxc...xccc
   xxx2ccc
     x.c
   ccc.xxx
 ccc1...1xxx
ccG..x.c..Gxx
 ccc.....xxx
   cc...xx
    cc.xx
     x.c
    cx.cx
     x@c
ENDMAP

NAME:   hellmonk_guarded_unrand_vines
TAGS:   transparent ruin_lair
DEPTH:  D:7-, Lair
WEIGHT: 3
ITEM:   robe_of_vines no_pickup
KMONS:  p = plant
MONS:   troll, hydra, oklob plant
MONS:   shambling mangrove / thorn hunter
: if you.in_branch("D") then
:     if you.depth() < 13 then
NSUBST: ' = 2=1' / ', 1 = 2 / 1
:     else
NSUBST: 1 = 4 / 2, ' = 2=2 / '
:     end
# Lair
: else
:     if you.depth() < 4 then
NSUBST: 1 = 3 / 2, ' = 2 / '
:     else
NSUBST: 1 = 3 / 23, ' = 2=2 / '
:     end
: end
NSUBST: d = d / p
SUBST:  ' = p..
MAP
        xxxxxx
  ..'xxxxd'1dxxxx'..
 ''..'x'x'.....x'..''
xx'...''t'WW'''....'xx
xx'....'''WW't'....'xx
 ''..'x.....'x'x'..''
  ..'xxxxd1'dxxxx'..
        xxxxxx
ENDMAP

NAME:   hellmonk_guarded_unrand_frostbite
TAGS:   no_monster_gen
DEPTH:  D:7-
WEIGHT: 3
ITEM:   frostbite no_pickup
NSUBST: d = d / W
: if you.depth() < 13 then
MONS:   white imp, ice devil, freezing wraith
: else
MONS:   ice devil, freezing wraith, blizzard demon
: end
SUBST:  1 = 1., 2 = 2., 3 = 3.
COLOUR: x. = white
TILE:   x = wall_ice
FTILE:  . = floor_ice
MAP
          xxxxxx
       xxxx2332xxxx
 xxxxxxx11......11xxxxxxx
xxW3..................3Wxx
 xxx..1.2...xddx.2.1..xxx
 xW...xx..xddxxW..xx...Wx
xxx1.xxx.1WxxxxW1.xxx.1xxx
 xW...xx..WxxWWx..xx...Wx
 xxx......xWWx........xxx
xxW....................Wxx
 xxxxxxx..........xxxxxxx
       xxxx++++xxxx
ENDMAP

NAME:   hellmonk_guarded_unrand_rift
TAGS:   patrolling uniq_guarded_rift
DEPTH:  D:13-, Depths
WEIGHT: 2
ITEM:   rift no_pickup
MONS:   arcanist, occultist, tentacled starspawn, starcursed mass, wyrmhole
KFEAT:  t = demonic_tree
KFEAT:  _ = altar_lugonu / enter_abyss
: if you.in_branch("D") then
SUBST:  1 = 12..
NSUBST: D = 1:d / 1:3 / *:4
# Depths
: else
SUBST:  1 = 23..
NSUBST: D = 1:d / 1 = 4 5:2 / *:4
: end
SUBST:  c = ccvbx t:5
SUBST:  E = xxxcvlWbtTG_....
# Color weights similar to that used for rock in the Abyss.
COLOUR: x = blue:13 / red:66 / magenta:50 / brown:90 / lightgreen:68 \
            / lightred:110 / lightmagenta:38 / yellow / white
RTILE:  x = wall_abyss
MAP
   c       c       c
   c       c       c
  ccc     ccc     ccc
 ccDcc   ccDcc   ccDcc
ccE.Ecc ccE.Ecc ccE.Ecc
 c...c   c...c   c...c
 c.1.c   c.1.c   c.1.c
 c...c   c...c   c...c
 c...c   c...c   c...c
 c...c   cE.Ec   c...c
 c..EcccccE.EcccccE..c
 c..EEcccEE2EEcccEE..c
 c1....1..._...1....1c
 cc......EE.EE......cc
  ccccccccE1Ecccccccc
        ccE.Ecc
         c...c
         c...c
         c...c
         cE1Ec
         c...c
         c...c
         c...c
         cE.Ec
         c...c
         c...c
         c...c
         c@@@c
ENDMAP

NAME:   hellmonk_guarded_unrand_lears
TAGS:   transparent patrolling
DEPTH:  D:6-
WEIGHT: 3
ITEM:   lear's_hauberk no_pickup, hat plus:-2 pre_id
ITEM:   helmet plus:-2 pre_id, chain mail plus:-2 pre_id
ITEM:   pair of boots plus:-2 pre_id
ITEM:   pair of gloves plus:-2 pre_id
: if you.depth() < 9 then
MONS:   troll
: elseif you.depth() < 13 then
MONS:   tengu warrior
: else
MONS:   minotaur
: end
NSUBST: D = d / e / f / g / h / i
SUBST:  E : xcv, F : xcv, H : xcv, G = G.., T : T...
MAP
   .EEE.
   .EDE.
....E+E....
FFF.....HHH
FDF.G.G.HDH
FF+..T..+HH
....G1G....
HH+..T..+FF
HDH.G.G.FDF
HHH.....FFF
....E+E....
   .EDE.
   .EEE.
ENDMAP

NAME:   hellmonk_guarded_unrand_seven_league_boots
TAGS:   no_monster_gen
DEPTH:  D:10-, Lair, Depths
WEIGHT: 3
KITEM:  d = seven-league_boots no_pickup
KMONS:  d = guardian serpent
: if you.in_branch("Depths") then
MONS:   vampire knight
: elseif you.in_branch("Lair") then
MONS:   boulder beetle
: else
MONS:   phantasmal warrior
: end
SUBST:  D = FFW, H : JF, J : cx
NSUBST: F = 1 / 1. / 9 / 9=0.. / .
FTILE:  .019d = floor_grass_dark
FTILE:  E = floor_ice
COLOUR: E = white
MAP
        xxxxxxxxx
     xxxxWWEEEWWxxxx
   xxxWDDWWWWWWWWWWxxx
  xxWWWDHDWWWWWWWWWWWxx
 xxWWWDFFFDWWWWDDFFDDWxx
 xWWDDHFFHFDWWDFFJFFFHFx
xxWWWDFHFFDWWWDFFJFFFFFxx
xWWWWDFHFDWWJWWWDFJFFFFFx
@WWWDFFHDWWJJWWWDFJFFFFdx
xWWWWDJDWWWWWWWDDDHFFFFFx
xxWWWDJFFDWWWWDDFHDFFDDxx
 xWWDJFFFDWWWWDFFHFDDWWx
 xxWWDJFFDWWDWDFHFFDWWxx
  xxWWDDDWWWWWWDFDDWWxx
   xxxWWDWWWWWWWDWWxxx
     xxxxWEEEEEWxxxx
        xxxxxxxxx
ENDMAP

NAME:   hellmonk_guarded_unrand_zhor
TAGS:   transparent no_monster_gen
DEPTH:  D:7-, Lair
WEIGHT: 3
ITEM:   skin_of_zhor no_pickup, box of beasts w:100 /\
        scroll of summoning pre_id q:3 w:1
MONS:   rime drake, torpor snail, ice dragon
NSUBST: d = d / 1
SUBST:  e = e..
: if you.in_branch("D") then
:     if you.depth() < 13 then
SUBST:  2 = 1, 1 = 1..
:     else
NSUBST: 2 = 3 / 2
:     end
# Lair
: else
:     if you.depth() < 4 then
NSUBST: 2 = 2 / 1
SUBST:  1 = 1..
:     else
NSUBST: 1 = 1.
:     end
: end
MAP
            nnnn
           nndenn
          nn1.nn
         nn.1nn
    nnnnnn..nn
   nnd.nn.1nn
    nn..1.nn
     nn22nn
    nn..nn
   nn1..1nn
  nn..nn..nn
 nn...11...nn
nn+nnnnnnn+nnn
ENDMAP

NAME:   hellmonk_guarded_unrand_vitality_bloodlust
TAGS:   no_monster_gen
DEPTH:  D:7-
WEIGHT: 3
MONS:   deep troll, deep troll shaman
ITEM:   amulet_of_vitality no_pickup / necklace_of_bloodlust no_pickup
: if you.depth() < 13 then
NSUBST: 1 = 1:1 / 2:. / * =  1..
: else
NSUBST: 1 = 1:2 / * = 1.
: end
COLOUR: x. = lightred
TILE:   x = wall_pebble_red
FTILE:  .d1 = floor_pebble_lightred
MAP
    @
   x.x
  xx.xx
 xx...xx
xx.....xx
x.......x
x..1.1..x
x.......x
x1.....1x
x...1...x
xx1...1xx
 xx.d.xx
  xxxxx
ENDMAP

NAME:   dilly_guarded_unrand_elemental_staff
TAGS:   transparent patrolling no_monster_gen no_trap_gen
DEPTH:  D:8-, Elf, Depths
WEIGHT: 3
KPROP:  alpwq'r = no_tele_into
KMASK:  alpwq'r = no_item_gen
KMASK:  alpwq'r = opaque
KFEAT:  a = l
KFEAT:  p = w
: if you.in_branch("D") then
:     if you.depth() < 12 then
# Monsters 1 through 4 must be defined in order of fire, ice, earth, air.
MONS:   fire elemental, rime drake / ice devil, gargoyle, steam dragon
# Slot 5 are elemental themed moderate out of depth monsters, equivalent to no
# worse than a 9 spawn.
MONS:   efreet / white ugly thing / basilisk / boulder beetle / raiju \
         / tengu conjurer
# Slot 6 is an appropriate elementalist boss.
MONS:   deep elf pyromancer ; elemental staff . robe good_item
# Monster counts scale slowly, placing up to 1/3 of each type by Depths.
SUBST:  1 = 1...., 2 = 2...., 3 = 3...., 4 = 4...., 5 = 5...
:     elseif you.depth() < 14 then
MONS:   deep elf pyromancer / efreet
MONS:   rime drake / ice devil / white ugly thing
MONS:   basilisk / boulder beetle / catoblepas
MONS:   raiju / tengu conjurer
MONS:   fire crab / fire dragon / freezing wraith / earth elemental \
        / air elemental
MONS:   deep elf zephyrmancer ; elemental staff . robe good_item
SUBST:  1 = 1...., 2 = 2...., 3 = 3...., 4 = 4...., 5 = 5..
:     else
MONS:   deep elf pyromancer / efreet / fire crab w:5 / fire dragon w:5
MONS:   white ugly thing / freezing wraith / ice dragon w:5
MONS:   catoblepas / boulder beetle / earth elemental
MONS:   raiju / tengu conjurer / air elemental
MONS:   white very ugly thing / stone giant / thermic dynamo / \
        deep elf zephyrmancer
MONS:   tengu reaver ; elemental staff \
            . ring mail good_item | scale mail good_item . buckler good_item
SUBST:  1 = 1..., 2 = 2..., 3 = 3..., 4 = 4..., 5 = 5.
:     end
: elseif you.in_branch("Elf") then
MONS:   fire elemental / deep elf pyromancer / thermic dynamo w:5
MONS:   water elemental / thermic dynamo w:5
MONS:   earth elemental / deep troll earth mage w:5
MONS:   air elemental / deep elf zephyrmancer
MONS:   deep elf elementalist w:40 / fire giant / frost giant / iron dragon \
        / storm dragon
: mons(master_elementalist_setup(_G, false))
SUBST:  1 = 1..., 2 = 2..., 3 = 3..., 4 = 4...
CLEAR:  @>
: else -- Depths
MONS:   fire dragon / fire giant
MONS:   ice dragon / frost giant
MONS:   stone giant / iron troll / deep troll earth mage / iron dragon
MONS:   spriggan air mage / storm dragon
MONS:   hellephant / shard shrike / iron giant / titan
: mons(master_elementalist_setup(_G, false))
SUBST:  1 = 1.., 2 = 2.., 3 = 3.., 4 = 4..
CLEAR:  @>
: end
# Fog machine for each closed elemntal chamber.
MARKER: a = lua:fog_machine { cloud_type = "flame", pow_min = 5, \
             pow_max = 10, delay_min = 10, delay_max = 50, size_min = 4, \
             size_max = 13, excl_rad = -1 }
MARKER: p = lua:fog_machine { cloud_type = "freezing vapour", pow_min = 5, \
             pow_max = 10, delay_min = 10, delay_max = 50, size_min = 4, \
             size_max = 13, excl_rad = -1 }
MARKER: q = lua:fog_machine { cloud_type = "calcifying dust", pow_min = 5, \
             pow_max = 10, delay_min = 10, delay_max = 50, size_min = 4, \
             size_max = 13, excl_rad = -1 }
MARKER: r = lua:fog_machine { cloud_type = "thunder", pow_min = 5, \
             pow_max = 10, delay_min = 10, delay_max = 50, size_min = 4, \
             size_max = 13, excl_rad = -1 }
FTILE:  +123456alpwq'r. = floor_crystal_squares
MAP
              b
             nbn
            nblbn
           nblllbn
          bbllallbb
        >bbnblllbnbb@
       @+b11nblbn11b+>
       bb...1nbn1...bb
      bb4.5.1bbb1.5.3bb
     nbn4...bb.bb...3nbn
    nb'bn44b+...+b33nb'bn
   nb'''bnbb.....bbnb'''bn
  bb''r''bb...6...bb''q''bb
   nb'''bnbb.....bbnb'''bn
    nb'bn44b+...+b33nb'bn
     nbn4...bb.bb...3nbn
      bb4.5.2bbb2.5.3bb
       bb...2nbn2...bb
       >+b22nbwbn22b+@
        @bbnbwwwbnbb>
          bbwwpwwbb
           nbwwwbn
            nbwbn
             nbn
              b
ENDMAP

# The orcs have wrecked her old lab...
NAME:   pf_guarded_unrand_delatra
TAGS:   no_monster_gen
DEPTH:  D:2-6
WEIGHT: 3
KFEAT:  - = broken_door
ITEM:   delatra's gloves no_pickup, any potion no_pickup / any scroll no_pickup
MONS:   orc, orc wizard, orc warrior
: if you.depth() < 4 then
SUBST:  1 = 1..
: else
SUBST:  2 = 3
NSUBST: 1 = 2:2 / 1
: end
COLOUR: x. = blue
TILE:   x = wall_pebble_lightblue
FTILE:  .de123- = floor_pebble_blue
MAP
        @
       x-x
      xx.xx
      x...x
      xG.Gx
      x1.1x
xxxxxxxx-xxxx
x.e.x.......x
x...-.1...1.xxxxx
x1.1x.......x1.1x
xxxxx.1.2.1.-...x
    x...d...x.e.x
    xxxxxxxxxxxxx
ENDMAP

NAME:   pf_guarded_unrand_woodcutter
TAGS:   no_monster_gen
DEPTH:  D:2-8
WEIGHT: 3
ITEM:   woodcutter's axe no_pickup, hand axe
MONS:   gnoll, gnoll bouda, gnoll sergeant
: if you.depth() < 4 then
SUBST:  2 = 1
SUBST:  1 = 1..
: elseif you.depth() < 6 then
NSUBST: 2 = 2 / 1
: else
SUBST:  1 = 1 / 3
: end
MAP
     xxxxxxxxx
    xxtttttttxx
   xxttte.1.ttx
 xxxttt..ccnccx
xxttt1..1c..2cxx
xtte..t1.n1..ccx
@........+.3d.cx
xtt...1t.n1..ccx
xxttt1e.1c..2cxx
 xxxttt..ccnccx
   xxttt.1.ettx
    xxtttttttxx
     xxxxxxxxx
ENDMAP

# Beogh's priests aren't fond of competition.
NAME:   pf_guarded_unrand_meek
TAGS:   no_monster_gen
DEPTH:  D:3-9
WEIGHT: 3
ITEM:   staff of the Meek no_pickup
: dgn.delayed_decay(_G, '_', 'human corpse')
MONS:  orc, orc priest, orc warrior
: if you.depth() < 5 then
SUBST:  2 = .
SUBST:  1 = 1.
SUBST:  3 = 2
: elseif you.depth() >= 8 then
SUBST:  1 = 123
: end
KFEAT: G = orcish_idol
KFEAT: _ = altar_beogh
MAP
  ccc ccc
cccGcccGcc
c1...c.1.c
c.1cc..2Gcc
@...c1.3d_c
c.1cc..2Gcc
c1...c.1.c
cccGcccGcc
  ccc ccc
ENDMAP

NAME:   dilly_guarded_unrand_throatcut
TAGS:   no_monster_gen
DEPTH:  D:3-9
WEIGHT: 3
MONS:   kobold, kobold brigand, kobold demonologist
ITEM:   throatcutter no_pickup
KITEM:  "- = orc skeleton / goblin skeleton / hobgoblin skeleton /\
             gnoll skeleton
KFEAT:  a = x
KFEAT:  p = c
: if you.depth() < 5 then
SUBST:  1 = 1---, 23 = 1112
: elseif you.depth() < 7 then
SUBST:  1 = 2---, 3 = 2223
: else
NSUBST: 1 = 2--, 2 = 223
: end
SUBST:  " = "..., - = -., x = axx, c = pcc
KPROP:  ap = bloody
TILE:   cp = DNGN_STONE_DARK
MAP
   ccccc
  cc...cc
 cc..d..cc
 c.......c
 c1123211c
 c-11211-c
 cc-111-cc
  cc---cc
   cc+cc
    x"x
    x"x
   xx"xx
xxxx"""xxxx
+"""""""""+
xxxx"""xxxx
   xx"xx
    x"x
    x"x
    x+x
ENDMAP

# Natasha misses her master
NAME:   dilly_guarded_unrand_morg
TAGS:   no_monster_gen
DEPTH:  D:3-9
WEIGHT: 3
KMONS:  p = withered plant
MONS:   kobold draugr / zombie, spectral thing / simulacrum
MONS:   weeping skull, phantom, wraith
ITEM:   dagger randart ego:pain pre_id no_pickup
ITEM:   book of necromancy w:30 / book of decay w:5 / book of death w:5
: if you.depth() < 5 then
KMONS:  D = natasha, phantom
SUBST:  3 = 2, 2 = 1112
: elseif you.depth() < 8 then
KMONS:  D = wight band w:30 / wraith
SUBST:  3 = 34
: else
KMONS:  D = skeletal warrior w:30 / draugr
SUBST:  1 = 2, 3 = 5
: end
SUBST:  p = .ppp
COLOUR: t = brown
TILE:   t = dngn_tree_dead
: set_feature_name("tree", "dead tree")
MAP
 ttt
ttpttt
ttpeptt
tp3G3pt
tp2d2pt
ttp1Dptt
tpp1.ppttttt
ttppp..pppptt
 ttttpp....pt
    tttpppp..
      ttttt.@
ENDMAP

NAME:   dilly_guarded_unrand_devastator
TAGS:   no_monster_gen transparent
DEPTH:  D:4-12
WEIGHT: 3
ITEM:   devastator no_pickup, stone, large rock q:1
MONS:   ogre, two-headed ogre, gargoyle, boulder beetle
# 18 'a' squares. Use 11, saving 7 for 'D'.
NSUBST: a = 8=x / 3=G / D
NSUBST: ' = 20=e. / 10=f. / .
: if you.depth() < 7 then
NSUBST: D = 1 / 2=1. / xxG
: elseif you.depth() < 10 then
NSUBST: D = 2 / 2=2. / 3 / xxG
: else
NSUBST: D = 2 / 3 / 2=23.. / 4 / xxG
: end
FTILE:  xGdef1234. = floor_pebble
TILE:   G = dngn_statue_orb
MAP
  a'a'a
 '''''''
 a'a'a'a
'''''''''
a'a'd'a'a
'''''''''
 a'a'a'a
 '''''''
  a'a'a
ENDMAP

NAME:   hellmonk_guarded_unrand_hermit
TAGS:   no_monster_gen
DEPTH:  D:3-8
WEIGHT: 3
KFEAT:  _ = altar_ecumenical
KITEM:  _ = hermit's pendant no_pickup
NSUBST: E = . / xxx., H = . / xxx., J = . / xxx., L = . / xxx., M = . / xxx.
NSUBST: N = . / xxx., ' = 8 / .
SUBST:  D:wWlG, F = xxxxxG.
TILE:   G = dngn_crumbled_column
MAP
  xxx
 xxxxx
xxxxxxx
xx'''xx
x'''''x
x.._..x
xx...xx
xxD.Dxx
xxEEExx
xxF.Fxx
xxHHHxx
xxF.Fxx
xxJJJxx
xxF.Fxx
xxLLLxx
xxF.Fxx
xxMMMxx
xxF.Fxx
xxNNNxx
xxx@xxx
ENDMAP

NAME:    nicolae_guarded_unrand_lochaber
TAGS:    patrolling no_monster_gen no_item_gen
DEPTH:   D:10-, Depths
WEIGHT:  3
KITEM:   L = lochaber axe no_pickup
: if you.in_branch("D") then
# Two-headed ogres get half the weight because they get twice the armament.
KMONS:   a = orc knight ; war axe | broad axe | battleaxe w:5 / \
             deep elf knight ; war axe | broad axe | battleaxe w:5 / \
             tengu warrior ; war axe | broad axe | battleaxe w:5 / \
             two-headed ogre w:5 ; war axe | broad axe | battleaxe w:5 . \
                                   war axe | broad axe | battleaxe w:5
KMONS:   p = orc knight ; halberd | demon trident | glaive w:5 / \
             deep elf knight ; halberd | demon trident | glaive w:5 / \
             tengu warrior ; halberd | demon trident | glaive w:5 / \
             two-headed ogre w:5 ; halberd | demon trident | glaive w:5 . \
                                   halberd | demon trident | glaive w:5
KMONS:   L = ettin ; executioner's axe . bardiche
KMONS:   P = phantasmal warrior w:5 / nothing
: else
KMONS:   a = war gargoyle ; broad axe | battleaxe / \
             stone giant ; broad axe | battleaxe / \
             orc warlord ; broad axe | battleaxe / \
             ettin w:5 ; broad axe | battleaxe . broad axe | battleaxe
KMONS:   p = war gargoyle ; partisan | glaive / \
             stone giant ; partisan | glaive / \
             orc warlord ; partisan | glaive / \
             ettin w:5 ; partisan | glaive . partisan | glaive
KMONS:   L = deep elf blademaster ; executioner's axe . bardiche
KMONS:   P = phantasmal warrior / nothing w:5
: end
SHUFFLE: DE
SUBST:   D : cccT., E : GGGc.
MAP
G.....ccccccccccccccccc
.....Gcc.a.a.a.a.cccccc
..c++cc..........Pccccc
..c..cE.D.E.D.E.D.Ecccc
@.c..............P...cc
@.c................L..c
@.c..............P...cc
..c..cE.D.E.D.E.D.Ecccc
..c++cc..........Pccccc
.....Gcc.p.p.p.p.cccccc
G.....ccccccccccccccccc
ENDMAP

# Skysharks because that's what the slippers are made of. Elementals, anacondas,
# and throwing nets to demonstrate the hazards that the slippers can help you
# with. The merfolk will also have some nets and tridents, if you're not
# interested in the footwear.
NAME:   nicolae_guarded_unrand_slippers
TAGS:   no_item_gen no_monster_gen no_trap_gen no_pool_fixup transparent
DEPTH:  D:10-
WEIGHT: 3
KITEM:  s = slick slippers no_pickup
KMONS:  S = skyshark w:40 / nothing
KMONS:  ET = nothing w:20 / water elemental / anaconda / \
             w:20 merfolk ; trident w:45 | trident good_item | \
                            demon trident w:5 . throwing net q:4
KFEAT:  sS = W
KFEAT:  E = w
KFEAT:  T = T w:30 / V
KPROP:  sSEwWT` = no_tele_into
MAP
       .........
  ......cccnccc......
...ccccccwwwwwcccccc...
...cwwwwwEwEwE`````c...
@..cwSWSwwwwww`T`T`c..@
@..nwWsWWWWWWW`````=..@
@..cwSWSwwwwww`T`T`c..@
...cwwwwwEwEwE`````c...
...ccccccwwwwwcccccc...
  ......cccnccc......
       .........
ENDMAP

NAME:   nicolae_guarded_unrand_storm_shield
TAGS:   no_monster_gen no_trap_gen no_tele_into
DEPTH:  D:10-
KITEM:  S = storm queen's shield no_pickup
KMONS:  S = patrolling storm dragon
KMONS:  1 = sixfirhy w:20 / shock serpent w:20 / spark wasp w:20 / \
            air elemental / raiju
KMONS:  2 = tengu conjurer  / deep elf zephyrmancer / spriggan air mage w:3
NSUBST: 1 = 2 / 1111112
MAP
  xxx         xxx
 xxxxx  @@@  xxxxx
xxxxxxc.....cxxxxxx
xxxxxxccc=cccxxxxxx
xxxxccc.....cccxxxx
 xxxcG.......Gcxxx
  ccc....1....ccc
  .c...1...1...c.
 @.c...........c.@
 @.=..1..S..1..=.@
 @.c...........c.@
  .c...1...1...c.
  ccc....1....ccc
 xxxcG.......Gcxxx
xxxxccc.....cccxxxx
xxxxxxccc=cccxxxxxx
xxxxxxc.....cxxxxxx
 xxxxx  @@@  xxxxx
  xxx         xxx
ENDMAP

# A monster will have this equipped rather than it being on the ground
# Yo ho ho and a bottle o' rum
NAME:   beargit_guarded_unrand_captain_cutlass
TAGS:   no_monster_gen no_item_gen patrolling
DEPTH:  Shoals, Swamp, Crypt, Depths
WEIGHT: 3
# The captain and their parrot(s), the lore-invoking kraken,
# some undead crew members, and some lingering ghosts.
: if you.in_branch("Swamp") then
MONS:   skeletal warrior ; captain's cutlass . swamp dragon scales
MONS:   shard shrike zombie, kraken zombie / kraken simulacrum
MONS:   bog body / freezing wraith / spriggan berserker zombie / \
        spriggan draugr w:2
KMONS:  56 = bloated husk / hydra zombie
KMONS:  7 = ghost crab / will-o-the-wisp
NSUBST: w = 1:3 / 4:6 / 1:67 / 1:7 / *:w
SUBST:  ~ = t, ? = 4
KITEM: Z = human skeleton / spriggan skeleton
: elseif you.in_branch("Shoals") then
TAGS:   water_ok no_pool_fixup
# Shoals doesn't have any default undead themes, so instead have
# mostly wildlife that picked the crew's bones clean.
MONS:   skeletal warrior ; captain's cutlass . scale mail . buckler
MONS:   harpy draugr, kraken
MONS:   merfolk draugr / spectral snapping turtle w:4
KMONS:  56 = wind drake / manticore
KMONS:  7 = alligator snapping turtle
KMONS:  0 = harpy / sea snake / snapping turtle
NSUBST: w = 2:3 / 3:6 / 1:77w / *:w, 4 = 4:0 / 2:Z / *:4
SUBST:  ~ = @, ? = 0
KITEM: Z = human skeleton / merfolk skeleton
: elseif you.in_branch("Crypt") then
MONS:   ancient champion ; captain's cutlass . scale mail . kite shield
MONS:   shard shrike simulacrum / spectral shard shrike, spectral kraken
MONS:   skeletal warrior / jiangshi / vampire knight w:4 / \
        alligator snapping turtle draugr w:2 / sea snake draugr w:2
KMONS:  56 = flayed ghost / vampire mage
KMONS:  7 = curse skull
SUBST:  ~ = xw, ? = 2
NSUBST: w = 2:3 / 2:6 / 1:7 / 1:6w / *:w, . = 2:4
KITEM: Z = spriggan skeleton / merfolk skeleton
: else -- Depths
MONS:   ancient champion ; captain's cutlass . plate armour
MONS:   caustic shrike simulacrum / spectral caustic shrike
MONS:   kraken / kraken simulacrum / spectral kraken
MONS:   jiangshi / spriggan defender zombie / vampire knight w:4
KMONS:  56 = phantasmal warrior / spectral storm dragon
KMONS:  7 = flayed ghost / merfolk javelineer
NSUBST: w = 3:3 / 3:6 / 3:7 / 4 = 67w / *:w
SUBST:  ~ = xw, ? = 2
KITEM:  Z = any skeleton
: end
ITEM:   potion of moonshine pre_id, potion of ambrosia pre_id
ITEM:   scroll of immolation pre_id / % w:20
KFEAT:  67 = w
NSUBST: . = 10:d / 2:e / 8:Z / 3:` / 3:4 / 3 = 45.. / *:.
KPROP:  ` = bloody
: vault_metal_statue_setup(_G, "G", "mystic cage")
MAP
     WWWWWWWWWWWWWW.@.WWWWWWWWWWWWWW
    WWWWWWWWwwwwwww...wWwWwwWWWwwwwwww
   WwwwWwwwWwwwwwww.`.wwwwwwwWwwwwwwwwww
 wwwwwwwwwwwwwwwwww...wwwwwwwwwwwwwwwwww
wwwwwxxmxmxmxmxmx...`.wwwwwwwwwwwwwwwwwww
wwwwxxff.f+.....+............wwwwwwwwwwww
wwwwxf..fxx..4..x...............xxxxwwwwwwww
wwwxxxxxxxxxxxxxx.....4....>....x.4xxxxwwwwww
wwxx.G..x.......+...............x`.`.5xxxxwww
wwm.....x.......x....xxx........+.4.`.x4.xxwwww
wwx*12?.xxx+xxxxx....xxx........xxxxxxx.4|xxxww
wwm.....+...4...+....xxx..4.....+.....+.4xxwww
wwxx....x.......x...............x..4..xxxxwwww
wwwxxx+xxxxx+xxxx....4.....>....x..xxxxwwwwww
wwwwx$$$$$x...4.x...............xxxxwwwwwwww
wwwwxx$$$$x.....x............wwwwwwwwwwww
wwwwwxxxxxxmxmxmx.....wwwwwwwwwwwwwwwwww
 wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
  wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
  ~~~~~~~wwwwwww~~~w~w~ww~~~wwwwwwww
ENDMAP

NAME:    orjb1_guarded_unrand_arga
TAGS:    no_monster_gen no_trap_gen no_item_gen
DEPTH:   Vaults, Depths
WEIGHT:  3
KITEM:   d = arga no_pickup
MONS:    quicksilver dragon
TILE:    v = dngn_metal_wall_lightblue
MAP
 vv=====vv
 v.......v
 v...1...v
 vv.....vv
  v1...1v
  vv.d.vv
   vvvvv
ENDMAP

NAME:   orjb1_guarded_unrand_rift
TAGS:   no_monster_gen no_trap_gen no_item_gen uniq_guarded_rift
DEPTH:  Vaults, Elf
WEIGHT: 2
MONS:   dancing weapon ; damaged demon trident ego:distortion
KMONS:  D = dancing weapon ; rift
KMONS:  E = generate_awake occultist god:Lugonu name:mad_acolyte_of_Lugonu \
        n_rpl n_des n_noc col:lightgreen tile:mons_mad_acolyte_of_lugonu; \
        robe good_item . demon trident ego:distortion | demon trident ego:none \
        spells:smiting.20.priest;banishment.10.priest;invisibility.10.priest;
KMONS:  B = pile of debris
ITEM:   demon trident ego:none w:15 / demon trident ego:distortion / \
        demon trident ego:chaos w:5
ITEM:   elf skeleton / blink frog skeleton
KFEAT:  D = altar_lugonu
KFEAT:  E = stone_arch
NSUBST: ? = 3:1 / 4:d / *:., ! = 3:e / *:.
TILE:   c : stone_wall_abyss_a / stone_wall_abyss_b / stone_wall_abyss_c
MAP
      c===c
     cc..?cc
    cc!?..?cc
   cc??.DB.?cc
  cc.?.!EU!?.cc
 cc!.?.???!!?.cc
ccccccccccccccccc
ENDMAP

####

# From the dcss channel on the roguelikes discord:
# Lici the Crawler: @nicolae  FR some earlyish (d7-d11) vaults
#                   with lightning rod in them
# Iguana Iguana:    @nicolae  FR some earlyish (d7-d11) vaults
#                   with lightning rod and harm in them. FTFY
# You've got to give the people what they want.
NAME:   nicolae_have_a_lightning_rod
DEPTH:  D:7-11
KITEM:  L = lightning rod
KITEM:  H = scarf ego:harm pre_id
KMONS:  E = electric eel
KMONS:  R = patrolling raiju
KFEAT:  E = w
NSUBST: E = 2=E / 2=w / 2=Ew
veto {{
  return not items.pickable("lightning rod")
}}
MAP
xxxxxxxxxxxxxxxxxxxxxx
xxxxxwEwwxxxxxxxxxxxxx
xxxwww..wwwxxxxxxxxwwx
xwww...R..wEwxxxxEww.@
xw..........wwwwww...@
@.....ww..LH..ww.....@
@...wwwwww..........wx
@.wwExxxxwEw..R...wwwx
xwwxxxxxxxxwww..wwwxxx
xxxxxxxxxxxxxwwEwxxxxx
xxxxxxxxxxxxxxxxxxxxxx
ENDMAP

# I expanded Lici's request to a few other evokers.
# (See comment on nicolae_have_a_lightning_rod)
NAME:   nicolae_beast_mode
TAGS:   transparent
DEPTH:  D:7-11
KITEM:  D = box of beasts
# Even on juveniles, blinkbolt can be overwhelming, especially if you roll more
# than one shock beast. Explicitly specify beast facets here to avoid rolling
# any shock ones for the juveniles. The larval one, being the "boss" here, can
# still roll shock for now.
KMONS:  D = juvenile bat-sting mutant beast / juvenile fire-bat mutant beast / \
        juvenile bat-weird mutant beast / juvenile ox-bat mutant beast / \
        juvenile sting-fire mutant beast / juvenile weird-sting mutant beast / \
        juvenile sting-ox mutant beast / juvenile fire-weird mutant beast / \
        juvenile ox-fire mutant beast / juvenile weird-ox mutant beast
KMONS:  L = larval mutant beast
NSUBST: D = D / L / ., L = 2=L / 3=-L / -
SUBST:  - = .x, ` = x_
CLEAR:  _
veto {{
  return not items.pickable("box of beasts")
}}
MAP
     `xxxxx`
    `xx-.-x
  ..xx-L.....xx`
  .......-...-x`
`x-...-..L...-xx`
xxx-.L.....-..-xx`
xxx-.-.......L.-x`
xx-.....DD......x`
`x-..L..DDD..-.L.
 xx-.-...DD......
 `x-.L........L..
 `xx-..-.....-.-x`
  xx-..L..-L..-xx`
 `x..........-xx`
  ...-xxx-..xxxx
   .xxxxxx..xx`
     `xxx`
ENDMAP

NAME:   nicolae_rank_and_phial
TAGS:   transparent patrolling
DEPTH:  D:7-11
KITEM:  P = phial of floods
KMONS:  E = water elemental
KMONS:  P = patrolling merfolk
KFEAT:  E~ = w
KMASK:  E~ = no_pool_fixup
SUBST:  M = w.
NSUBST: E = 2=E / 2=Eww / *:w
veto {{
  return not items.pickable("phial of floods")
}}
MAP
MMMMMMMMMMM
MwwwwwwwwwM
MwE~~E~~EwM
Mw~wwwww~wM
Mw~w...w~wM
MwEw.P.wEwM
Mw~w...w~wM
Mw~wwWww~wM
MwE~~W~~EwM
MwwwwWwwwwM
MMMMMWMMMMM
ENDMAP

# Summoning a player illusion is probably too cruel at this depth, so a boggart
# or two doing shadow creatures will have to suffice thematically instead.
NAME:    nicolae_phantomly_mirrored
TAGS:    no_item_gen no_monster_gen no_trap_gen
DEPTH:   D:7-11
KITEM:   P = phantom mirror
# Using the same probabilities from mon-gear.cc.
KMONS:   O : w:60 two-headed ogre ; giant club . giant club / \
             w:30 two-headed ogre ; giant spiked club . giant spiked club / \
             w:9  two-headed ogre ; dire flail . dire flail / \
             w:1  two-headed ogre ; great mace . great mace
KMONS:   S = boggart
KFEAT:   DEFH = G
SHUFFLE: OS
{{
local statuetiles = {"dngn_statue_ancient_evil", "dngn_statue_ancient_hero",
   "dngn_statue_angel", "dngn_statue_archer", "dngn_statue_axe",
   "dngn_statue_cat", "dngn_statue_centaur", "dngn_statue_cerebov",
   "dngn_statue_demonic_bust", "dngn_statue_dragon", "dngn_statue_dwarf",
   "dngn_statue_elephant", "dngn_statue_hydra", "dngn_statue_imp",
   "dngn_statue_maw", "dngn_statue_mermaid", "dngn_statue_naga",
   "dngn_statue_orb", "dngn_statue_orb_guardian", "dngn_statue_polearm",
   "dngn_statue_princess", "dngn_statue_sigmund", "dngn_statue_snail",
   "dngn_statue_sword", "dngn_statue_tengu", "dngn_statue_tentacles",
   "dngn_statue_triangle", "dngn_statue_twins", "dngn_statue_wraith"}
tile("D : " .. util.random_from(statuetiles))
tile("E : " .. util.random_from(statuetiles))
tile("F : " .. util.random_from(statuetiles))
tile("H : " .. util.random_from(statuetiles))
}}
veto {{
  return not items.pickable("phantom mirror")
}}
MAP
xxxxxxxx
xxvvvvvxxxx
xxv...vvvvxxxx
xxv.H....vvvvxxxx
xvv....F....vvvvx
xv.....O..E....vx
@.........S..D.vx
@............P.vx
@.........S..D.vx
xv.....O..E....vx
xvv....F....vvvvx
xxv.H....vvvvxxxx
xxv...vvvxxxxx
xxvvvvvxxx
xxxxxxxx
ENDMAP

####
# A simple idea I had about vaults guarding highly valued dual-school spells
# alongside other thematic loot. Since these have a bit of a spoilery nature,
# they're still sorted with the other guarded unrands and less likely than
# default, but it'd be a nice concept to extend to other spells in game-long
# vaults like Permafrost Eruption, Hellfire Mortar, or Freezing Cloud....

NAME:    regret_index_guardbook_plasma_beam
TAGS:    no_monster_gen no_item_gen vaults_hard vaults_orient_n vaults_orient_s
DEPTH:   D:8-, Vaults, !Vaults:$, Elf, Depths, Zot
WEIGHT:  10 (Vaults), 6
SHUFFLE: d|
: if you.in_branch("D") then
:   if you.depth() < 10 then
MONS:    sky beast, fire bat
MONS:    fire elemental, tengu warrior ; long sword ego:electrocution . \
                                         leather armour . buckler
KMONS:   0 = orc wizard / steam dragon / centaur / marrowcuda
NSUBST:  . = 3:2 / 3 = 2. / *:.
:   elseif you.depth() < 12 then
MONS:    fire elemental, harpy
MONS:    deep elf pyromancer, tengu conjurer
KMONS:   0 = wyvern / red ugly thing / cyan ugly thing / fire bat band w:2
:   else
MONS:    salamander ; shortbow ego:flaming . spear ego:flaming, tengu conjurer
MONS:    deep elf zephyrmancer, efreet / fire dragon w:2
KMONS:   0 = centaur warrior / fire crab / \
             laughing skull band / thermic dynamo w:2
:   end
SUBST:   | = e
: else
:    if you.in_branch("Vaults") then
MONS:    lindwurm, crawling flesh cage / polterguardian / formless jellyfish
MONS:    ironbound thunderhulk / deep elf annihilator w:5
MONS:    hell knight w:2 / fire giant / yaktaur captain ; arbalest ego:flaming
KMONS:   0 = vault guard / ironbound preserver / centaur warrior
SUBST:   @ = ., u = c
TILE:    c = dngn_stone_wall_red
:   elseif you.in_branch("Elf") then
MONS:    deep elf pyromancer, deep elf zephyrmancer
MONS:    air elemental, dancing weapon ; scimitar ego:flaming
KMONS:   0 = glowing shapeshifter / deep elf annihilator w:5 / thermic dynamo w:5
COLOUR:  u = red
:   elseif you.in_branch("Depths") then
MONS:    hell knight / fire giant w:2, spriggan air mage / spark wasp w:4
MONS:    storm dragon, tengu reaver
KMONS:   0 = fire dragon / chonchon w:2 / spriggan rider w:2
:   else -- Zot
MONS:    black draconian, red draconian scorcher
MONS:    golden dragon, electric golem
KMONS:   0 = red draconian / storm dragon w:5 / moth of wrath w:5
NSUBST:  % = 1:)> / 1:]>
:   end
SUBST:   | = f
: end
: if you.in_branch("Vaults") then
CLEAR:   X
: else
SUBST:   X = x
: end
ITEM:    randbook disc:fire disc2:air spells:plasma_beam pre_id
ITEM:    staff of air / staff of fire / \
         fire dragon scales good_item / storm dragon scales good_item
ITEM:    staff of air randart / staff of fire randart / \
         fire dragon scales randart / storm dragon scales randart
KFEAT:   u = x
NSUBST:  z = 2:x. / * = x., . = 1:0 / *:.
: vaults_hard_standard(_G)
TILE:    u = wall_pebble_red
TILE:    v = dngn_metal_wall_lightcyan
MAP
  xx@x@x@xx     xxxxxxx     xxxx
  x...z...xxxxxxx..z..xxxxxxx.1xX
Xxx........$xzx$.......$xzx$..02X
X....vvuvv.......vvuvv.......u..X
Xz...v.d.v..u.u..v.%.v..u.u..v..X
X....v.4.v..vvv..v1.1v.......v..X
X....v...v.......v...v.......v..X
X..uuuu.uuuu...uuuu2uuuu4v4uuuu.X
X...v.....v.....v.....v.....v...X
X.uuuu3v3uuuu1uuuu...uuuu.uuuu..X
X..v.......v...v.......v...v....X
X..v.......v2.2v..vvv..v.3.v....X
X..v..u.u..v.%.v..u.u..v.|.v...zX
X..u.......vvuvv.......vvuvv....X
X20..$xzx$.......$xzx$........xxX
Xx1.xxxxxxx..z..xxxxxxx...z...x
 xxxx     xxxxxxx     xx@x@x@xx
ENDMAP

# Justicar's Regalia
# Bad guys in jail
NAME:    tekkud_guarded_unrand_justicar
TAGS:    no_monster_gen no_item_gen no_trap_gen vaults_hard vaults_orient_n
DEPTH:   Elf:2-, Vaults, !Vaults:$, Depths
WEIGHT:  3
MONS:    angel / cherub, fravashi / daeva
ITEM:    justicar's_regalia no_pickup, any amulet no_pickup
KFEAT:   m = iron_grate
: if you.in_branch("Elf") then
MONS:    deep elf pyromancer / deep elf zephyrmancer / \
         deep elf archer / deep elf knight
MONS:    deep elf elementalist / deep elf blademaster / deep elf master archer
MONS:    deep elf high priest / deep elf death mage / deep elf demonologist /\
         deep elf annihilator / balrug w:5 / blizzard demon w:5
SUBST:   2 = 2.
: elseif you.in_branch("Vaults") then
MONS:    vault guard w:30 / vault sentinel / peacekeeper w:5
MONS:    crystal guardian / vault warden / titan
MONS:    entropy weaver / death knight / polterguardian w:5 /\
         glowing orange brain w:8 / boggart w:8 / dread lich w:2
# if no_convoke ever gets added as a vault tag,
# this won't need the reduced holies subst.
SUBST:   1 = 1.., 2 = 2.., @ = .
: else -- Depths
MONS:    tengu warrior / spriggan defender w:8 / fire giant / \
         frost giant / stone giant / guardian sphinx w:14
MONS:    ophan / walking divine tome / pearl dragon w:5
MONS:    hell knight / rakshasa / chonchon / vampire mage / vampire knight / \
         alderking / dread lich / shadow demon / glowing orange brain
: end
NSUBST:  y = 3:3 / 2=33. / *:.
NSUBST:  z = 1:5 / 2=5. / *:.
TILE:    c = wall_stone_smooth
TILE:    v = dngn_metal_wall_white
COLOUR:  v = white
FTILE:   =+Gdeu.mn12345 = floor_pebble_darkgray
: vault_metal_statue_setup(_G, "G", "silver statue")
MAP
         @@@@@
      cccc+++cccc
      c.........c
      c.vvnnnvv.c
      c.vG...Gv.c
      c.v.....v.c
      c.v..d..v.c
ccccccc.v.....v.ccccccc
c....y..vG...Gv..y....c
c.vvvvvvnvv+vvnvvvvvv.c
c.vG...zm.2.2.=....Gv.c
c.v.....m3...3m..z..v.c
cyn5.e..m..4..m..e5.nyc
c.v.....m1...1m..z..v.c
c.vG...z=.3.3.m....Gv.c
c.vvvvvvnmmmm+nvvvvvv.c
c....y..v.....v..y....c
ccccccc.v..3..v.ccccccc
      c.n..G..n.c
      cyv.....vyc
      c.v.....v.c
      c.vn===nv.c
      c....y....c
      ccccccccccc
ENDMAP

###################################################################
#
# <<9>> Pre-Lair vaults with monsters guarding a manual
#       Manuals are most interesting early in the game when your character may
#       not yet be committed to a specific strategy. However, randomly
#       generated manuals are extremely rare and biased towards deeper levels,
#       and existing vaults that explicitly place manuals are all quite deep as
#       well. So here are some shallow vaults that place manuals!
#
#       These all have a mean of five monsters and a minimum of two, with the
#       exception of minmay_manual_mares which simply has 2 centaurs. There are
#       currently 10 vaults, with a total weight of 50.

NAME:   minmay_manual_maat
TAGS:   transparent
WEIGHT: 3
DEPTH:  D:4-8
ITEM:   any manual
NSUBST: 0 = 0 / ...0
SUBST:  0 = 0009
SUBST:  x : xxxxccvb
MAP
 .......
..xxxxx..
.xx...xx.
.x.xxxdx.
.xx...xx.
.x0xxxx..
.xx00.0.
.x0xxx.
.xx00..
.x0xxx.
.xx00..
.x0xxx.
.xx00..
.x0xxx.
.xx....
....
ENDMAP

NAME:   minmay_manual_macuahuitl
TAGS:   transparent
WEIGHT: 3
DEPTH:  D:4-8
ITEM:   any manual
NSUBST: 0 = 2=0 / ...0
SUBST:  0 = 0009
MAP
       ................
      ..cc.cc.cc.cc.c..
...  ..xxxxxxxxxxxxxcc.
.x...0xx.x.0x.0x.0xxx..
.xxxxx00x.0x.0x.0x.dxc.
.x...0xx.0x.0x.0x.0xx..
...  ..xxxxxxxxxxxxxcc.
      ..cc.cc.cc.cc.c..
       ................
ENDMAP

NAME:   minmay_manual_mail
TAGS:   transparent
WEIGHT: 7
DEPTH:  D:4-8
# crawl can mirror the vault, so no need to randomize these
ITEM:   any manual, ring mail
NSUBST: 0 = 2=0 / ...0
SUBST:  0 = 0009
MAP
 .........
..vvv0vvv..
.v...v...v..
.v.0vvv0vvv..
.v.v0v0v0v0v..
..vvvdvvvevvv..
 ..v0v0v0v0v.v.
  ..vvv0vvv0.v.
   ..v...v...v.
    ..vvv0vvv..
     .........
ENDMAP

NAME:   minmay_manual_mandibuliform
TAGS:   transparent
WEIGHT: 3
DEPTH:  D:4-8
NSUBST: 0 = 2=0 / ...0
SUBST:  0 = 0009
ITEM:   any manual
MAP
...
.x..
.xx..
0cxx..
0c.xx..
00.cxx..
0c0c.xx..
0c0..cxx..
.xxc000xx..
..xxxc0cxx..
 ...xxx00xx.
   ...xxxdx.
     ...xxx.
       .....
ENDMAP

# this layout tries to be as merciful to autoexplore as centaurs can be
NAME:   minmay_manual_mares
TAGS:   transparent
WEIGHT: 7
DEPTH:  D:4-8
ITEM:   any manual
MONS:   centaur
SUBST:  x : xxxxccvb
MAP
 .......
..xx.xx..
.xx...xx.
.x..xx.x.
...1d1...
.x.xx..x.
.xx...xx.
..xx.xx..
 .......
ENDMAP

NAME:   minmay_manual_mess
TAGS:   transparent
WEIGHT: 7
DEPTH:  D:4-8
ITEM:   any manual
NSUBST: 0 = d / 2=0 / ...0
SUBST:  0 = 0009
SUBST:  x : xxxxccvb
MAP
..........
.x.xx00xx..
..x0xxx00x..
 ..x00xxx0xx.
  ..xx00xx0x.
   .x0x000x..
   ..xx.xx..
    .......
ENDMAP

NAME:   minmay_manual_monolith
TAGS:   transparent
WEIGHT: 3
DEPTH:  D:4-8
ITEM:   any manual
NSUBST: 0 = 2=0 / ...0
SUBST:  0 = 0009
MAP
..0.0.0.0.0.0.
0ccccccdccccc.
.cccccccccccc0
.0.0.0.0.0.0..
ENDMAP

NAME:   minmay_manual_monstrance
TAGS:   transparent
WEIGHT: 7
DEPTH:  D:4-8
ITEM:   any manual
NSUBST: 0 = 2=0 / ...0
SUBST:  0 = 0009
SUBST:  x : xxxxccvb
MAP
    ...
    .x.
 ...0x0...
 .x.x0x.x.
...xx0xx...
.xxx0d0xxx.
...xx0xx...
 .x.x0x.x.
 ...x0x...
   .x0x.
  ..x0x..
 ..xx0xx..
 .xxx0xxx.
 ....0....
ENDMAP

NAME:   minmay_manual_moon
TAGS:   transparent
WEIGHT: 7
DEPTH:  D:4-8
ITEM:   any manual
NSUBST: 0 = 2=0 / ...0
SUBST:  0 = 0009
SUBST:  b : xcvbG.....
SUBST:  x : xxxxccvb
MAP
    ......
  ...xxxx..
 ..xxxxxxx..
.0xx...xxxx.
.x...00dxxx.
....00.0.xx.
 ..00b00.xx.
  ...00..x..
   ..0..xx.
    ....x..
     ..x0.
      ...
ENDMAP

# The asymmetry is intentional
NAME:   minmay_manual_mullet
TAGS:   transparent no_monster_gen
WEIGHT: 3
DEPTH:  D:4-8
ITEM:   any manual
NSUBST: 0 = 2=0 / ...0
SUBST:  0 = 0009
SUBST:  x : xxxxcccv
MAP
              WWWW   WWWW
             WWxxW  WWxxW
       WWWWWWWxxWWWWWxxWW   WWWW
   WWWWWxxxxxxxxxxxxxxWWWWWWWxxW
 WWWxxxxx.W.x0W..xW..xxxxxxWxxWW
WWxxx00..x.x.x.x..x0x0x.x.xxxWW
Wxxd000b..x.W.x.W..x0..W.W..+W
WWxxxx00...x.x.x.x.0x0x.x.xxxWW
 WWWWxxxxxx.x0W.x.Wx.xxxxxxWxxWW
    WWWWWWxxxxxxxxxxxxWWWWWWWxxW
         WWxxWWWWWWWWxxWW   WWWW
          WWxxW     WWxxW
           WWWW      WWWW
ENDMAP

###################################################################
#
# <<10>> The classics.
#        These are ancient minivaults, or expansions of them.
#
###################################################################

# Wizard's laboratory
NAME:  laboratory
DEPTH: D:12-, Depths, Elf
MONS:  arcanist, occultist, kobold fleshcrafter
MONS:  small abomination, large abomination
KFEAT: T = permanent teleport trap
: if you.branch() ~= "D" then
SUBST: 1 = 3
: else
SUBST: * = %, | = *
:   if you.depth() > 12 then
SUBST: 1 = 12
:   end
: end
: vault_metal_statue_setup(_G, "G", "mystic cage")
MAP
ccc+cccccc
cT......Gc
c........c
c......1.c
cG.......c
ccccccc+cc
c***c5454c
c|**+4445c
c||*c545Gc
cccccccccc
ENDMAP

# Lava pond
NAME: minivault_8
TAGS: transparent
DEPTH: D:9-, Elf:1-2
MONS: patrolling molten gargoyle
SUBST: F = G:99 F:1
KMONS: F = orange crystal statue / obsidian statue / ice statue
KMASK: FG = opaque
MAP
x.x.x.x.x.x.
.c.c.c.c.c.x
x...l1l...c.
.c.llllll..x
x.lllllll1c.
.c.llFGll..x
x..llGFll.c.
.c1lllllll.x
x..llllll.c.
.c...l1l...x
x.c.c.c.c.c.
.x.x.x.x.x.x
ENDMAP

# Evil zoo
NAME:   door_vault
TAGS:   allow_dup luniq vaults_hard
DEPTH:  D:13-, Elf, Vaults, !Vaults:$, Crypt, Depths, Zot, Dis, Geh, Tar, Coc
# Pick interesting monsters for dungeon branches.
: if you.in_branch("Elf") then
KMONS:  1 = dancing weapon / deep elf annihilator / deep elf blademaster / \
            deep elf master archer / deep elf sorcerer / \
            deep elf death mage / deep elf demonologist / \
            deep elf high priest / place:Elf:$ w:27
: elseif you.in_branch("Crypt") then
KMONS:  1 = reaper / ancient champion / vampire knight / flayed ghost / \
            eidolon / revenant soulmonger / ancient lich / dread lich / \
            curse skull w:15 / vampire bloodprince w:15 / place:Crypt:$ w:30
: elseif you.in_branch("Dis") then
KMONS:  1 = tormentor / hellion / shadow demon / tzitzimitl / \
            ice fiend / brimstone fiend / hell sentinel w:15 / \
            iron giant w:15 / place:Dis:$ w:30
: elseif you.in_branch("Geh") then
KMONS:  1 = tormentor / hellion / balrug / brimstone fiend w:15 / \
            oni incarcerator / ancient lich / dread lich / place:Geh:$ w:20
: elseif you.in_branch("Tar") then
KMONS:  1 = oblivion hound w:15 / death drake / undertaker / tormentor / \
            shadow demon / tzitzimitl w:15 / ancient lich / dread lich / \
            place:Tar:$ w:27
: elseif you.in_branch("Coc") then
KMONS:  1 = shard shrike w:15 / titan / blizzard demon / tormentor / \
            ice fiend w:15 / ancient lich / dread lich / place:Coc:$ w:24
: elseif you.in_branch("Zot") then
KMONS:  1 = nonbase draconian / orb of appropriateness / electric golem / \
            killer klown / ancient lich / dread lich / curse toe / \
            protean progenitor / place:Zot:$ w:20
# Dungeon, Vaults, and Depths get 8 spawns.
: else
KMONS:  1 = 8
:   vaults_hard_standard(_G)
: end
KMONS:  2 = 9
: door_vault_setup(_G)
MAP
..............
..............
..aaaaaaaaaa..
..a++++++++a..
..a++++++++a..
..a++1111++a..
..a++1221++a..
..a++1221++a..
..a++1111++a..
..a++++++++a..
..a++++++++a..
..aaaaaaaaaa..
..............
..............
ENDMAP

# No, John. You are the door vault
NAME:   reverse_door_vault
TAGS:   no_descent
DEPTH:  Depths:2-
WEIGHT: 4
KMONS:  1 = 8
KMONS:  2 = 9
: door_vault_setup(_G)
MAP
xxxxxxxxxxxxxx
x1...1..1.2.1x
x.++++++++++.x
x2++++++++++.x
x.++aaaaaa++.x
x1++a....a++1x
x.++a.(..a++.x
x.++a....a++.x
x1++a....a++1x
x.++aaaaaa++.x
x.++++++++++2x
x.++++++++++.x
x1.2.1..1...1x
xxxxxxxxxxxxxx
ENDMAP

# Closed-box minivault
NAME:  minivault_12
TAGS:  no_descent
DEPTH: D:8-, Depths, !Depths:$
KPROP: .><$*|9 = no_tele_into
KMASK: " = !opaque
MAP
""""""""""""
"nccccxcccn"
"c>9$9$9$<c"
"c.$9$9$.$c"
"c$.****$.c"
"c.$*||*.$x"
"x$.*||*$.c"
"c.$****.$c"
"c$9$9$9$.c"
"c<$9$9$9>c"
"ncccxccccn"
""""""""""""
ENDMAP

# Little trap spiral
NAME:    minivault_13
TAGS:    ruin_abyss transparent
DEPTH:   D:9-, Elf, Abyss
KMONS:   F = orange crystal statue / obsidian statue / ice statue
: if you.in_branch("Elf") then
KMONS:   9 = air elemental / thermic dynamo / dancing weapon / \
             deep elf annihilator / deep elf high priest
KMONS:   8 = deep elf sorcerer / deep elf death mage / \
             deep elf demonologist / deep elf elementalist / \
             deep elf blademaster w:5 / deep elf master archer w:5
: end
ITEM:    robe good_item / scale mail good_item
SHUFFLE: AB, CD, EH/FG
SUBST:   F = G:99 F:1, ABCD = $'
: if you.in_branch("Abyss") then
SUBST:   '| = dd$, = = +
: end
MAP
............
.xxxxxxxxxx.
.+..c..c.9x.
.x.B+.D+..x.
.ccccccc=cc.
.c.8+|0c8.c.
.c8$c.|c..c.
.cc+cccc+cc.
.c.9+.F+..c.
.c..cG.c9.c.
.cccccccccc.
............
ENDMAP

# Lava pond
NAME:  minivault_15
TAGS:  extra transparent no_descent
: if you.in_branch("D") then
KMONS: 1 = orange crystal statue / obsidian statue / ice statue
: else
KMONS: 1 = orange crystal statue
: end
KFEAT: 1 = <
KMASK: 1<|* = opaque
MAP
.........
...lll...
..vvlvv..
.lv|*|vl.
.ll*1*ll.
.lv|*|vl.
..vvlvv..
...lll...
.........
ENDMAP

NAME:   minivault_16
TAGS:   allow_dup extra luniq transparent
WEIGHT: 40
# as this replaces the former statue only minivaults
: if you.in_branch("D") then
MONS:   orange crystal statue / obsidian statue / ice statue
: else
MONS:   orange crystal statue
: end
SUBST:  G = G111
MAP
...........
...........
...........
...........
...........
.....G.....
.....%.....
...........
...........
...........
...........
ENDMAP

NAME: minivault_20
TAGS: allow_dup extra ruin_abyss transparent
DEPTH: D:9-, Elf, Abyss
MAP
............
.xxxx..xxxx.
.x........x.
.x..xxxx..x.
.x.x....x.x.
...x.x9.x...
...x.9x.x...
.x.x....x.x.
.x..xxxx..x.
.x........x.
.xxxx..xxxx.
............
ENDMAP

NAME:    minivault_25_ag
TAGS:    allow_dup extra ruin_abyss transparent
DEPTH:   D:9-, Elf, Abyss
KFEAT:   > = abyssal_stair
SHUFFLE: XY, ABCDE
SUBST:   X=x, Y=+
SUBST:   A=?, B=%%%*, C=T, D=0009, E=89
: if you.in_branch("Abyss") then
SUBST:   %* = >
: end
MAP
............
.xxXxxxxxxx.
.x........x.
.x.xYxxxx.Y.
.x.x....X.x.
.x.x.AA.x.x.
.x.x.AA.x.x.
.x.X....x.x.
.Y.xxxxYx.x.
.x........x.
.xxxxxxxXxx.
............
ENDMAP

NAME:  minivault_28
TAGS:  allow_dup ruin_abyss transparent
DEPTH: D:9-, Elf, Abyss
MAP
...........
.xxxx.xxxx.
.x.......x.
.x..999..x.
.x.9...9.x.
...9.I.9...
.x.9...9.x.
.x..999..x.
.x.......x.
.xxxx.xxxx.
...........
ENDMAP

# These next three are former food vaults
NAME:   grunt_livestock
TAGS:   extra no_monster_gen no_trap_gen patrolling
DEPTH:  D:7-14
MONS:   human ; animal skin . hand axe
{{
  local hog_weight = 14 - you.absdepth()
  if hog_weight <= 0 then
    mons("yak")
  else
    mons("hog w:" .. hog_weight .. " / yak w:1")
  end
}}
KFEAT:  K = iron_grate
KFEAT:  F = cache_of_meat
KFEAT:  - = open_door
MAP
.xxxxxxx
@+...$$x
.x...1Fx
 xKK-KKx
 x2...2x
 x.2.2.x
 xxxxxxx
ENDMAP

NAME:    hangedman_stone_soup
DEPTH:   D:10-14
TAGS:    extra patrolling no_rotate no_vmirror
# Branch representatives working together to cook some soup:
# D, Orc, Elf, Swamp, Shoals, Vaults, Crypt, Pan.
KMONS:   A = kobold
KMONS:   B = orc
KMONS:   C = deep elf pyromancer / deep elf zephyrmancer
KMONS:   D = spriggan
KMONS:   E = merfolk
KMONS:   F = human
KMONS:   G = vampire
KMONS:   H = crimson imp
KITEM:   1 = stone q:1 w:50 no_pickup / large rock q:1 w:24 / \
             mundane hand axe w:1 no_pickup
KITEM:   b = gold / nothing w:12
KFEAT:   1 = cache_of_fruit / cache_of_meat
KFEAT:   Yab = shallow_water
KMASK:   1Yac = no_monster_gen
MARKER:  Y = lua:fog_machine { cloud_type = "steam", pow_min = 1, \
                 pow_max = 10, delay = 60, size = 1, walk_dist = 0 }
: single_cloud(_G, "Z", "flame", false)
NSUBST:  c = 2:a / *:b
SHUFFLE: ABCDEFGH
MAP
 .......
..A...B..
..vv.vv..
..vcccv..
..vc1cv..
..vcYcv..
.CvvvvvD.
...Z.Z...
 .......
ENDMAP

NAME:     hangedman_ranch
DEPTH:    D:8-11
TAGS:     no_monster_gen patrolling
KMONS:    A = three-headed hydra / w:5 two-headed hydra
KMONS:    B = dream sheep
KMONS:    C = yak
KMONS:    D = kobold brigand
KMONS:    E = kobold brigand ; falchion ego:flaming | hand axe ego:flaming
KMONS:    F = plant
KITEM:    E = halberd
KFEAT:    H = cache_of_meat
KFEAT:    EF = shallow_water
TILE:     H = dngn_cache_of_pizza
MAP
cccccccccc
cAH+.....c
cHDcD..BBc
c+ccm+++cc
x.WF.....x
xFWW.t.t.x
xWEF..t..x
xFW..t.t.x
xFFW..W..x
xxxxx@xxxx
ENDMAP

# Welcome to Pandemonium Pizzeria; is this for carry-out or delivery?
# (Ideally the cashier would have a silly hat, but they can't wear hats.)
NAME:   grunt_pizzeria
DEPTH:  D:8-11
TAGS:   no_monster_gen no_trap_gen extra patrolling
MONS:   human ; short sword | rapier / orc warrior ; dagger / spriggan ; dagger
KFEAT:  d = cache_of_meat
KFEAT:  e = cache_of_baked_goods
TILE:   d = dngn_cache_of_pizza
: single_cloud(_G, "O", "flame", false)
MAP
xxxxxxx
xvvvdex
xvO+..x
xvvv.xx
x$1...x
xmmm.xx
x.....x
xmm+mmx
 ..@..
ENDMAP

NAME:   special_room
TAGS:   allow_dup luniq no_item_gen ruin_spider ruin_slime
TAGS:   no_monster_gen layout_rooms layout_corridors layout_passages
TAGS:   layout_narrow_caves layout_open_caves
CHANCE: 1% (Geh, Coc, Dis, Tar, Pan), 2%
DEPTH:  D:8-, Depths, Orc, Elf, Lair, Snake, Spider, Slime, Crypt, \
        Geh, !Geh:$, Coc, !Coc:$, Dis, !Dis:$, Geh, !Geh:$, Pan
KFEAT:  X = slimy_wall
# FIXME: subvaults still don't set feature names on a higher level.
#        For now, only the bee room uses this, so this should be fine.
: set_feature_name("decorative_floor", "flower patch")
{{
    -- An incredibly ugly kludge to avoid duplicating the list of valid
    -- branches/depths (and causing mysterious errors if it's not up to date).
    if not dgn.map_by_tag("special_room") and not is_validating() then
      return
    end

    local width = 6 + crawl.random2avg(3, 2)
    local height = 5 + crawl.random2avg(5, 2)

    extend_map { width = width, height = height }
    make_box { x1 = 0, y1 = 0, x2 = width - 1, y2 = height - 1, floor = 'O' }
    subvault('O : special_room')

    local entrance_x, entrance_y
    if crawl.coinflip() then
        entrance_x = crawl.coinflip() and 0 or width - 1
        entrance_y = crawl.random_range(1, height - 2)
    else
        entrance_x = crawl.random_range(1, width - 2)
        entrance_y = crawl.coinflip() and 0 or height - 1
    end

    mapgrd[entrance_x][entrance_y] = '@'

    if you.in_branch("Crypt") then
        subst("x = c")
    elseif you.in_branch("Slime") then
        subst("x = X")
    end
}}
MAP
ENDMAP

NAME:   special_room_vaults
TAGS:   allow_dup luniq unrand no_item_gen vaults_hard
DEPTH:  Vaults, !Vaults:$
{{
    local width = 6 + crawl.random2avg(3, 2)
    local height = 5 + crawl.random2avg(5, 1)

    extend_map { width = width, height = height, fill = 'O' }
    subvault('O : special_room')
}}
MAP
ENDMAP
