##############################################################################
# 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)
  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
    valid = "" -- should always coincide with depth_fraction() < 1
  end
  if you.depth_fraction() < 1 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 = *
: if you.absdepth() < 12 then
NSUBST:  1 = 1:1 / * = 11.
: else
NSUBST:  1 = 1:2 / 2 = 21 / 1:. / * = 11.
: end
MAP
 xxxxx
 x111x
 x1x1x.@.
 x+++x.x.
...........
  .x.x+++x
  .@.x1x1x
     x111x
     xxxxx
ENDMAP

# Beehive which needs digging to access.
NAME:   hive_lemuel
TAGS:   no_trap_gen transparent
DEPTH:  D:9-, Spider
MONS:   killer bee, meliai, queen bee, hornet
KMASK:  1234*R = opaque
KMONS:  *R = worm
KITEM:  * = *
KITEM:  R = potion of ambrosia ident:type
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 ident:type / 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
DEPTH:  D:13-, Elf, Crypt, Depths, Zot, Dis, Geh, Tar, Coc
WEIGHT: 1
KMONS:  12 = butterfly
: 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

# 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
KITEM:   01234 = % w:90 no_pickup / * no_pickup
SHUFFLE: ABCDEF / ABCDEF / ABCCBA, ABC, DEF, 13 / 13 / 31, {`
:  if you.in_branch("Abyss") then
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
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:1-2
MONS:   giant cockroach / nothing
MAP
   ....
  ..xx.
  .xx1..
 ..1xxx.
 .xxx1...
...1xxxx.
.xxxx1...
...1xxx.
 .xxx1..
 ..1xx.
  .xx..
  ....
ENDMAP

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

NAME:   nzn_sisyphean_effort
DEPTH:  D:9-12, Lair
MONS:   patrolling boulder beetle
KITEM:  e = potion of attraction ident:all
: dgn.delayed_decay(_G, 'd', 'human corpse')
MAP
xxxxxxxxx
@.......@
@..d1e..@
@.......@
xxxxxxxxx
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
MAP
 xxx
xxdx
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:3-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 skeleton name:skeletal_bat n_rpl n_des n_spe n_zom
# 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 hd:1
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
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
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
DEPTH:   D:13-, Elf, 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("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
KMONS:   1 = very ugly thing / apocalypse crab w:5 / shapeshifter hd:14 / \
             glowing shapeshifter / 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.
..'1..
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.
..'1...
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
: local b = crawl.random2(10)
: if b > 7 then
ITEM:  any good_item / any mimic
: elseif b > 1 then
ITEM:  any good_item w:1 / any mimic w:3
: else
ITEM:  any mimic
: end
MAP
...........
.xxxxxxxxx.
.xdddddddx.
.xdddddddx.
.xdddddddx.
.xdd.1.ddx.
.xxxx+xxxx.
...........
ENDMAP

NAME:  minmay_serpent_palace
TAGS:  no_monster_gen no_item_gen transparent
DEPTH: Depths
KMASK: 4 = opaque
MONS:  naga w:1 / naga warrior w:8 / naga mage w:4 / nothing w:1, nagaraja / guardian serpent
MONS:  ball python / adder / water moccasin / black mamba / anaconda w:20 / sea snake w:20 / nothing
MONS:  lindwurm
SUBST: 1 = 11., 3 = ...3
SUBST: c : cv
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.33c4l..l4c..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")
SUBST: ? : x@
SUBST: 1 = 1:10 .:1
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 transparent
DEPTH:   D:13-, Depths
MONS:    tengu warrior, harpy, tengu reaver
: if you.absdepth() < 18 then
SUBST:   3 = 2
: else
SHUFFLE: wW / ll
SUBST:   " = *|
: 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 / book of changes / \
        randbook disc:Poison disc2:Transmutation slevels:8 w:5 / \
        randbook numspells:4 title:Nature \
        spells:beastly_appendage&summon_small_mammal&call_canine_familiar&spider_form / \
        randbook numspells:4 title:Nature \
        spells:beastly_appendage&sting&wereblood&spider_form
KITEM:  f = dart ego:poisoned / dart ego:curare / dart ego:atropa
KITEM:  g = 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
SUBST:  5 = 25
SUBST:  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 / book of changes / \
        randbook disc:Poison disc2:Transmutation slevels:8 w:5 / \
        randbook numspells:4 title:Nature \
        spells:beastly_appendage&summon_small_mammal&call_canine_familiar&spider_form / \
        randbook numspells:4 title:Nature \
        spells:beastly_appendage&sting&wereblood&spider_form
KITEM:  f = dart ego:poisoned / dart ego:curare / dart ego:atropa
KITEM:  g = 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
SUBST:  5 = 25
SUBST:  7 = 78
: else
SUBST:  T = tx
SUBST:  ? = 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, worm, endoplasm
MONS:    giant cockroach, 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 = 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-12
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 ident:type / \
        buckler ego:reflection ident:type w:1 / \
        tower shield ego:reflection ident:type 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
NSUBST:  $ = $ / 4=$.. / *:.
NSUBST:  D = 3:d / 3=d.. / *:.
NSUBST:  E = e / 2=e. / .
: dgn.delayed_decay(_G, 'd', 'human skeleton')
: 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 = swamp dragon w:5 / fire dragon / ice dragon / storm dragon w:5
KMONS:   C = nonbase green draconian / draconian annihilator
KMONS:   D = golden dragon / shadow dragon / quicksilver dragon w:5 / \
            iron dragon w:5
: else
KMONS:   A = naga warrior / naga mage / naga
KMONS:   B = black mamba w:6 / anaconda
KMONS:   C = nagaraja / naga mage w:5 / guardian serpent w:5
KMONS:   D = guardian serpent / anaconda w:2
: 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''z'''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''''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


###############################################################################
#
# <<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 ; hunting sling . stone q:20
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
MAP
 xxxxxxx
xx.....xx
x.......x
x.......x
x.......x
xx.....xx
 xxx+xxx
  x...x
  x...x
  xx+xx
ENDMAP

NAME:   minmay_sticks_and_stones
TAGS:   patrolling transparent
DEPTH:  D:8-
WEIGHT: 5
KMONS:  1 = Joseph / cyclops, \
            yaktaur ; quarterstaff . hunting sling . stone / 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-8
MONS:    gnoll ; scythe . robe, hobgoblin ; scythe . robe, orc ; scythe . robe
SUBST:   n = 1:20 n:5
KMONS:   n = Sigmund, gnoll ; scythe . robe / \
             hobgoblin ; scythe . robe / orc ; scythe . robe
SHUFFLE: x+1 / x+1 / x+1 / y-5
SUBST:   - = y , y = 5, 5 = 1..
SUBST:   1 : 123444, 4 = 1223.., 1 = 1., 3 = 33.
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
ITEM:  any scroll / any potion
MAP
........
.cccccc.
.c.1ddc.
.c.cccc.
.c.22.c.
.c2..2c.
.cc..cc.
........
ENDMAP

NAME:  minmay_orc_keep
DEPTH: D:8-, Depths, Orc
: if you.in_branch("Depths") then
MONS:  orc knight, orc warlord, orc sorcerer / orc high priest
SUBST: % = *||
: elseif you.absdepth() > 12 then
MONS:  orc / orc warrior w:5, orc knight / orc warrior
MONS:  orc wizard / orc priest / orc sorcerer w:2 / orc high priest w:1
SUBST: % = %*
: else
MONS:  orc, orc warrior / orc, orc wizard / orc priest
: end
MAP
www.@.www
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 ; boomerang ego:dispersal q:2 / w:3 kobold brigand ; boomerang ego:dispersal q:4
MONS:   kobold ; boomerang ego:silver q:2 / w:3 kobold brigand ; boomerang ego:silver q:4
MONS:   kobold ; dart ego:curare q:1 / \
        w:3 kobold brigand ; dart ego:curare q:2
: if you.absdepth() > 13 then
SUBST:  1 = 3
: 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
KMASK:   1>"% = opaque
KFEAT:   " = floor
DEPTH:   D:11-, Orc, Elf
MONS:    deep elf pyromancer / deep elf zephyrmancer
SHUFFLE: _?/bb, _'/ww
SUBST:   ?_' = .
NSUBST:  1 = 2:% / 2 = 1% / *:1
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; hunting sling . stone | sling bullet w:3 . 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
DEPTH: D:9-, Lair:2-
TAGS:  no_monster_gen no_item_gen transparent
MONS:  patrolling necromancer, plant
MONS:  river rat simulacrum / wolf simulacrum / \
       yak simulacrum / polar bear simulacrum
MAP
............
.xxxxxxxxxx.
.x333x..%%x.
.x333+..xxx.
.x333x....x.
.xxxxx.3..x.
.....x..13x.
.2T2.+....x.
.....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
: dgn.delayed_decay(_G, 'e', 'rat skeleton')
: dgn.delayed_decay(_G, 'f', 'frilled lizard skeleton')
MONS:    rat / frilled lizard
KFEAT:   m = iron_grate
MARKER:  P = lua:fog_machine { cloud_type = "flame", \
             pow_min = 1000, pow_max = 1000, delay = 1, \
             size = 1, walk_dist = 0, start_clouds = 1, excl_rad = 0 }
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
DEPTH: D:10-, Depths:1, Orc
TAGS:  transparent
: if you.absdepth() > 18 then
MONS:  w:5 orc warlord / orc knight / orc warrior / orc sorcerer / w:5 orc wizard
: elseif you.absdepth() > 13 then
MONS:  orc knight / orc warrior / orc wizard / w:5 orc
: else
MONS:  orc warrior / orc wizard / orc
: end
MONS:  warg
MAP
.................
.wwwwwww..wwwwwww.
.wxxxxxx++xxxxxxw.
.wx%...x..x...%xw.
.wx.11.x..x.11.xw.
.wx.22.+..+.22.xw.
.wx.11.x..x.11.xw.
.wx%..%x..x%..%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
MARKER: ! = lua:fog_machine { \
                cloud_type = "foul pestilence", \
                pow_min = 100, pow_max = 100, delay = 10, \
                size = 1, walk_dist = 0, start_clouds = 1 \
            }
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:    wizard / deep elf pyromancer / deep elf zephyrmancer
ITEM:    any potion
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
ITEM:    randbook numspells:2 title:Sand
KFEAT:   ^ : shaft trap
SHUFFLE: defg, efghij, bm, bm / ++
MAP
   xxx@xxx     xxx@xxx
  xx.....xx   xx.....xx
 xx1.....dxxxxxf.....1xx
xx....^....xbx....^....xx
@....^<^.........^>^....@
xx....^....xmx....^....xx
 xxe.....1xxxxx1.....gxx
  xx.....xx   xx.....xx
   xxx@xxx     xxx@xxx
ENDMAP

#################################################################
# checkpoints with guards to alert nearby monsters, by Core Xii
NAME:   corexii_checkpoint_a
TAGS:   no_monster_gen no_item_gen allow_dup extra transparent
DEPTH:  D:4-, Elf
WEIGHT: 7
NSUBST: 1 = 2:1 / *:.
: if you.in_branch("Elf") then
MONS:   deep elf pyromancer / deep elf zephyrmancer
: else
MONS:   goblin / hobgoblin / kobold / orc
: end
MAP
x@xxxx
x.xxxx
x.m11+@
x.m11x
x.xxxx
x@xxxx
ENDMAP

NAME:    corexii_checkpoint_b
TAGS:    no_monster_gen no_item_gen allow_dup extra transparent
DEPTH:   D:4-, Elf
WEIGHT:  3
SHUFFLE: mA
SUBST:   A = x
NSUBST:  1 = 2:1 / *:.
: if you.in_branch("Elf") then
MONS:    deep elf pyromancer / deep elf zephyrmancer
: else
MONS:    goblin / hobgoblin / kobold / orc
: end
MAP
xxxxxxx
x......
x.xmmx.
x.A11x.
@.A11x@
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
DEPTH:  D:6-12, Shoals
MONS:   centaur, yaktaur, faun, centaur warrior
: if you.absdepth() > 11 then
NSUBST: 1 = 1:4 / 1:123 / *:1
: 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??x.wwwwwww
  wwww.xxxx.wwwwww
   wwwwww..wwwww
    wwwwwwwwwww
       wwwwww
ENDMAP

NAME:   kilobyte_rumbling_trees
TAGS:   transparent
DEPTH:  Depths, Elf, Lair:4-
MONS:   black bear / polar bear w:20 / wolf w:20
MONS:   patrolling boggart, patrolling spriggan druid
: if you.in_branch("Lair") then
SUBST:  ' = 2, 3 = .
: else
SUBST:  ' = .
: end
FTILE:  .t123%@ = floor_moss
MAP
ttttt       tttt@t
tttttt tt ttttt1tt
t1tttttttttttt.ttt
@t..ttttttttt.tttt
tttt.'t%ttt..tttt
tttttt.3..'ttttt
 ttttt.'tttttttt
 tttt'ttttttttt
tttt.tttttttt
tttt1tttttt
 tttt@ttt
ENDMAP

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

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

NAME:   minmay_rotating_lava
TAGS:   no_monster_gen transparent
DEPTH:  D:10-
MONS:   hell hound, hell knight band, hell knight
ITEM:   potion of flight ident:type q:3
KMASK:  .123*< = opaque
KPROP:  .123*< = no_tele_into
KFEAT:  ' = floor
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_hall
FTILE:  # = floor_rough_lightred
MARKER:  # = lua:fog_machine { cloud_type = "flame", \
                pow_min = 10, pow_max = 10, delay = 10, \
                size = 1, walk_dist = 0, start_clouds = 1, excl_rad = 0 }
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, vampire mage
KMONS:   8 = mummy priest
ITEM:    book of callings w:5 / book of the dryads w:20 / grand grimoire w:5 / \
         randbook disc:summoning numspells:6
ITEM:    manual of summonings
ITEM:    amulet of magic regeneration w:5 ident:type / \
            amulet of magic regeneration randart
ITEM:    box of beasts
KITEM:   % = any, any / gold / nothing, any / nothing
KITEM:   _ = scroll of summoning ident:type , scroll of summoning ident:type / nothing
KFEAT:   _ = altar_sif_muna
KMASK:   "'@ = !no_monster_gen
SHUFFLE: 12, 34, 12 / 34
NSUBST:  ' = 1:@ / * = .@
SUBST:   c : ccb
: if you.in_branch("Abyss") then
SUBST:   bc = xcccccvb
: elseif you.in_branch("Crypt") then
SUBST:   5 = 7, 6 = 8
: else
SHUFFLE: 56 / 78
: end
MAP
ccccccccccccccc
c24c5de6fd5c32c
c%%c*g...g*c%%c
c..cccc+cccc..c
c.............c
c.cG..%_%..Gc.c
c.............c
c..ccc+++ccc..c
c%%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 / Blork the orc w:1, swamp drake
KMONS:   0 = orc ; robe . wand of charming | wand of flame . \
                   potion of invisibility | potion of haste | nothing w:980
KMONS:   89 = deep elf pyromancer / deep elf zephyrmancer
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
FTILE:   F = floor_pebble_lightred
{{
  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
.5xx1xx2xxxxx
.5xx+xx+xx9xx
..x..60..xexx
..x.F..F.x+xx
@.-...6..-7xx
@.-...0..-'xx
..x.F..F.x+xx
..x..60..xdxx
.5xx+xx+xx8xx
.5xx3xx4xxxxx
..xxxxxxxxxxx
@@xxxxxxxxxxx
ENDMAP

NAME:  guppyfry_early_elven_hall
DEPTH: D:6-9
TAGS:  patrolling no_monster_gen transparent
MONS:  deep elf pyromancer / deep elf zephyrmancer, plant
ITEM:  any scroll / any potion / any book
SUBST: - = 2....GTd$%
MARKER: H = lua:props_marker { stop_explore = "statue" }
SUBST: HI = G
MAP
.............
.xxxxxxxxxxx.
.x...........
.x...........
.x+++xxxxxxH.
.x-.-+.......
.x1..+.......
.x-.-+.......
.x+++xxxxxxI.
.x...........
.x...........
.xxxxxxxxxxx.
.............
ENDMAP

NAME:  guppyfry_early_orc_mine
DEPTH: D:2-5
TAGS:  patrolling no_monster_gen transparent
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:6 / 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
DEPTH:   Snake, Elf, Orc, Zot
ITEM:    gold / any scroll / any book w:4
SUBST:   ? = 123d
: if 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 pyromancer / deep elf zephyrmancer
: elseif you.in_branch("Orc") then
MONS:    orc, orc warrior, orc wizard w:9 / orc sorcerer w:1
: else
MONS:    any draconian, draconian scorcher
MONS:    draconian annihilator / draconian knight
: end
MAP
............
.xxmxxxxmxx.
.x.?....?.x.
.x........x.
.x.xx++xx.x.
.+1xd33dx.+.
.+.xd33dx1+.
.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
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
DEPTH:  D:5-, Depths:1, Orc
MONS:   orc, orc warrior, orc knight, orc priest
MONS:   orc wizard, orc high priest, orc sorcerer
KMONS:  8 = orc warlord
: if you.absdepth() < 9 then
MONS: orc w:9 / orc warrior w:1
SUBST: 0 = 1:9 2:1
: elseif you.absdepth() < 15 then
SUBST: 0 = 1:6 / 2:2 / 3:1
: else
SUBST: 0 = 1:8 2:4 3:2 8:1
: end
: if you.absdepth() > 11 then
SUBST: 4 = 6, 5 = 57
: end
KFEAT: _ = altar_beogh
MAP
ccccccccccccccccccccc
cccc..000........cccc
c%ccI.050I..I..I..Icc
c*%cI.000..........1c
c_%+4.050..........1=
c*%cI.000..........1c
c%ccI.050I..I..I..Icc
cccc..000........cccc
ccccccccccccccccccccc
ENDMAP

NAME: lightli_orcish_oven
DEPTH: D:6-11, Orc
MONS: orc warrior, orc
:dgn.delayed_decay(_G, '1', 'rat corpse')
MAP
xxxxxxxxxx
xvvv....xx
xvl+.222.x
xvvv.212.x
xxxx...xxx
xxx.x..xxx
xxx+xx..xx
xdd.xx..xx
xddxx..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
SUBST:   c : vvb, @ = .
: end
MONS:     lich, wizard / naga mage / tengu conjurer, tengu reaver
ITEM:     book of power, robe good_item, hat good_item, robe, hat
KFEAT:    _ = altar_vehumet
SHUFFLE: ef, gh, ij
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:    deep elf pyromancer w:20 / deep elf zephyrmancer w:20 / tengu conjurer w:20 / \
         wizard 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
SHUFFLE: efgh
MAP
   xxxxxxxxxxx
  xxcccccccccxxxxxxxxx
  xcc2ccccc2cccccccccxx
  xc.c.ccc.c.ccbbbbbccx
 @xc.c.ccc.c.cbbe.fbbcx
.3.c.c.ccc.c.cb.2...bcx
@U..3.3...3.3.=.._1dbcx
.3.cccc.c.ccccb.2...bcx
 @xcccc.c.ccccbbg.hbbcx
  xcccc.c.cccccbbbbbccx
  xccccc2ccccccccccccxx
  xxcccccccccxxxxxxxxx
   xxxxxxxxxxx
ENDMAP

NAME: sigmund_edmund_badplayer
TAGS: no_item_gen no_monster_gen no_pool_fixup no_trap_gen transparent
DEPTH: D:4-7
KITEM: ( = flail / any armour
KITEM: s = scythe / robe
KMONS: S = Sigmund
KMONS: E = Edmund
MONS: plant w:25 / bush w:25 / nothing w:50
NSUBST: S = 1:S / *:.
NSUBST: E = 1:E / *:.
SHUFFLE: S / E
veto {{ return you.uniques("Edmund") or you.uniques("Sigmund") }}
MAP
....................
.xxxxxxxxxxxxxxxx...
.xEEEExWS....x..x11.
.x....xWE.......x11.
.x..xxxxxx.xxx..x11.
.x.........xsxx.xxx.
.xx...........xSSSx.
.x(..............Sx.
.xxxxxxx..xxxxxxxxx.
....................
ENDMAP

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

NAME: lightli_minifort
DEPTH: D:4-, Depths
TAGS: no_pool_fixup
: if you.in_branch("Depths") then
MONS: fire giant / frost giant / titan
: 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
MAP
wwwwwwwww
wccwwwccw
wcccccccw
wwc.*.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:  patrolling wizard, patrolling crimson imp
ITEM:  any book, any scroll
MAP
   bbbb
  bbdebb
 bb....bb
bb......bb
b...12...b
b........b
bb......bb
 bb....bb
  bb..bb
   b++b
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, Swamp, Snake, Spider, 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 . arrow . 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 . arrow . 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("Swamp") or you.in_branch("Spider")
:        or you.in_branch("Snake") then
MONS:   deep elf archer; longbow good_item . arrow . quarterstaff \
            . robe good_item
MONS:   deep elf knight; lajatang good_item . chain mail good_item
MONS:   dire elephant
MONS:   hell hound / raiju
MONS:   fungus / nothing, nothing
: elseif you.in_branch("Crypt") then
KITEM:  1 = longbow good_item, arrow, 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 = doom hound
KMONS:  5 = nothing
KMONS:  6 = ancient lich / deep elf death mage w:30 / lich / dread lich \
            / vampire mage
: else
# The elves have mastered the dungeon and allied with the darkness.
MONS:   deep elf master archer; longbow good_item | longbow randart . arrow \
            . 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
MONS:   doom hound
MONS:   nothing, nothing
: end
: if you.in_branch("Crypt") then
SUBST:  x = c
COLOUR: t = lightgrey w:5 / brown
TILE:   t = dngn_tree_dead
: set_feature_name("tree", "dead tree")
FTILE:  - = floor_crypt
: elseif you.in_branch("Swamp") then
SUBST:  - = --....W, x = t
FTILE:  -123456t = floor_grass
: elseif you.in_branch("Spider") then
SUBST:  t = x
: else
FTILE:  -123456t = floor_grass
FTILE:  P = floor_sand
: end
MARKER: P = lua:fog_machine { cloud_type = "flame", \
            pow_min = 1000, pow_max = 1000, delay = 1, \
            size = 1, walk_dist = 0, start_clouds = 1, excl_rad = 0 }
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 }
: dgn.delayed_decay(_G, 'P', 'rat skeleton')
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_hattery
DEPTH:  D:7-14
: if crawl.one_chance_in(8) then
:   dgn.delayed_decay(_G, 'e', 'spriggan name:skinned n_adj n_spe n_des corpse')
: else
SUBST: =e = x
: end
SUBST: = = +
ITEM:   hat
MONS:   spriggan col:white name:hatter n_suf ; robe . dagger
MAP
xxxxxx
xdd=ex
x.xxxx
x.1x
x+xx
ENDMAP

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

# An ogre roasts intruders over his little campfire.
NAME:   grunt_ogre_cave
DEPTH:  D:7-14
WEIGHT: 15
TAGS:   extra no_monster_gen no_trap_gen \
        patrolling
{{
  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
  dgn.delayed_decay(_G, 'g', 'orc skeleton / human skeleton / elf skeleton'
                             .. ' / dwarf skeleton')
}}
ITEM:   throwing net
MARKER: O = lua:fog_machine { cloud_type = "flame", pow_min = 10, \
                              pow_max = 10, delay = 10, size = 1, \
                              walk_dist = 0, excl_rad = 0 }
MAP
 xxxxx
xxxxxxx
xx..gxx
xx1Ogxx
xxd..xx
 xxx.xx
 xx.xx
 xx.xx
xx.xx
 .g.
  @
ENDMAP

NAME:     blue_anna_alchemist
DEPTH:    D:8-14
KITEM:    p =  potion of degeneration w:5 ident:all \
               / potion of ambrosia w:1 ident:all / nothing
MONS:     kobold brigand ; wand of flame ident:type . short sword \
              . dart ego:poisoned | dart ego:curare w:5
MAP
    c++c
ccccc..ccccc
cppc....cppc
cp.+.1..+.pc
cccc....cccc
cccccccccccc
ENDMAP

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

NAME:  minmay_nine_imps
DEPTH: D:7-14
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

# The Horrible House of Horrid Horrors (by Mu.)
# XXX: Undiggable glass has been converted to statues.
NAME:  horrible_house_mu
TAGS:  transparent
DEPTH: Depths
MONS:  boggart, unseen horror, rakshasa
MONS:  vampire knight, orange crystal statue
KMONS: P = plant
SUBST: p = P.
KMASK: l = no_monster_gen
MAP
.....................
.pp...............pp.
.pcccccccccccccccccp.
..c.$$$|||.|||$$$.c..
..c..$$$.....$$$..c..
..c.1....l4l....1.c..
..c...llll.llll...c..
..c...lGll.llGl...c..
..c.2lllc.5.clll2.c..
..c...llcccccll...c..
..c...lllllllll...c..
..c.3..hlllllh..3.c..
..c.......l.......c..
..c...............c..
..c...............c..
.pccnnnccc+cccnnnccp.
.pp.....pPPPp.....pp.
.........ppp.........
ENDMAP

NAME:   minmay_metal_thing
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

NAME:   bh_circular_ruins
TAGS:   transparent
DEPTH:  D:9-14
MONS:   human simulacrum
ITEM:   mundane long sword no_pickup
KITEM:  O = book of dreams
MARKER: O = lua:fog_machine { cloud_type = "flame", pow_min = 10, \
                              pow_max = 10, delay = 15, size = 2, \
                              walk_dist = 1, excl_rad = 1}
MAP
  ..
 .xxd  ...
.xx1..dxxx.
.x.......xx.
 d...xx...x.
  ..xx....x.
  d.x.O.x.d
 .x....xx..
 .x...xx...d
 .xx.......x.
  .xxxd..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:12-, Elf, !Elf:$
MONS:    red devil ; spear | trident . ring mail | scale mail
MONS:    red devil ; spear | trident . buckler
MONS:    red devil ; spear good_item | trident good_item
MONS:    red devil ; spear | trident . boomerang
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 / \
       nothing
MAP
..........
.m.mmmmmm.
.mx.x.x*m.
.m.x2x2xm.
.mx2x1x.m.
.m.x1x2xm.
.mx2x2x.m.
.m*x.x.xm.
.mmmmmm.m.
..........
ENDMAP

##### Orange demons (4), manticores, scorpions.
NAME:  einodemon_barbed_minivault
DEPTH: D:12-, Elf
TAGS:  patrolling transparent
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
DEPTH:  Lair:2-, !Lair:$, Swamp
: if you.in_branch("Swamp") then
MONS:   bloated husk / nothing
: else
MONS:   necrophage
: end
SUBST:  ' = 111.
SUBST:  ? = %%.
: dgn.delayed_decay(_G, '%', 'any corpse')
: if you.in_branch("Swamp") or you.depth() > 4 then
TAGS:   extra
: end
MAP
 ..'..?..
.?'.?.??'.
'?.www?.?.
.'wwwww.?.
?..ww?.?'.
 .?'.?...
ENDMAP

###############################################################################
# Kobold demonologist guarded by invisible demons. (nrook)
# 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 = w:5 shadow demon / lorocyproca
KITEM:  1 = | / *, * / %
FTILE:  12" = floor_pebble_darkgray
FTILE:  ' = floor_pebble_lightgray
COLOUR: 12 = darkgrey
COLOUR: ' = white
NSUBST: 2 = 1:2 / 4 = 2""" / *:"
MAP
    ...
  .'''''.
 .'''''''.
 '''222'''
.''22222''.
.''22122''.
.''22222''.
 '''222'''
 .'''''''.
  .'''''.
    ...
ENDMAP

#############################################################
# Fire demons vs. ice demons
NAME:   minmay_fire_ice_demons
TAGS:   no_monster_gen transparent
DEPTH:  D:4-, Depths, Coc, Geh
: if you.absdepth() > 24 then
MONS:   brimstone fiend
MONS:   ice fiend
MONS:   balrug / hellion
MONS:   blizzard demon
MONS:   crimson imp w:1 / nothing w:5
MONS:   white imp w:1 / nothing w:5
SUBST:  " = |
SUBST:  ' = |
: elseif you.absdepth() > 18 then
MONS:   balrug / hellion w:5
MONS:   blizzard demon
MONS:   sun demon / smoke demon w:5
MONS:   ice devil
MONS:   crimson imp w:1 / nothing w:3
MONS:   white imp w:1 / nothing w:3
SUBST:  " = |
SUBST:  ' = *
: elseif you.absdepth() > 12 then
MONS:   sun demon / smoke demon w:5, ice devil, crimson imp, white imp
SUBST:  " = *
SUBST:  ' = %
SUBST:  5 = .
SUBST:  6 = .
: else
MONS:   crimson imp, white imp
SUBST:  " = %
SUBST:  ' = .
SUBST:  3 = .
SUBST:  4 = .
SUBST:  5 = .
SUBST:  6 = .
: end
: if you.in_branch("Coc") or you.in_branch("Geh") then
SUBST:  | = .
: else
SUBST:  > = .
: end
MAP
............. .............
..ccccccc.........ccccccc..
.cc'3553ccc.....ccc4664'cc.
.c"'lll..5cc...cc6..www'"c.
.c1lllll..5..>..6..wwwww2c.
.c"'lll..5cc...cc6..www'"c.
.cc'3553ccc.....ccc4664'cc.
..ccccccc.........ccccccc..
............. .............
ENDMAP


NAME:    hallowed_hall
TAGS:    no_monster_gen no_trap_gen
DEPTH:   Depths
MONS:    pearl dragon, apis, ophan, plant
ITEM:    potion of curing ident:type / potion of heal wounds ident:type
KFEAT:   A = altar_the_shining_one
KFEAT:   B = altar_elyvilon
KFEAT:   C = altar_zin
COLOUR:  c = white
TILE:    c = wall_church
FTILE:   .+23GtABC = floor_limestone
COLOUR:  .23 = white
SHUFFLE: ABC
SUBST:   ' = .
MAP
xxxxxxxxx
xcccccccx
xcGdBdGcx
xcd.3.dcx
xcA...Ccx
xcd...dcx4''
xcG...Gcx'''''
xccc+cccx4''''''
xct...tcx''''''''
xc..2..cx'''''''''xx
xc.....+''''1'''''cx
xct....c'''''''''4cx
xccccccccccccccccccx
xxxxxxxxxxxxxxxxxxxx
ENDMAP

NAME:   hangedman_tell_no_tales
DEPTH:  D:9-, !D:$
TAGS:   no_monster_gen no_item_gen patrolling
MONS:   spriggan skeleton
MONS:   troll skeleton
KMONS:  A = unseen horror
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
ccxx1x1+DDc
c.x.x..mDDc
@.d.x2.mDDc
c.x.x..cc+c
ccxx1x.c1fc
 cccccccccc
ENDMAP

NAME:   hangedman_weighted_door
TAGS:   extra
DEPTH:  D:9-, Crypt
MONS:   zombie / skeleton
KMONS:  A = spectral thing / simulacrum
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
c@.....@c
ENDMAP

NAME:   hangedman_blasphemy
DEPTH:  Depths, Crypt
MONS:   patrolling hell hog
MONS:   apis skeleton, pearl dragon zombie
MONS:   patrolling profane servitor, death knight
COLOUR: G = lightgrey, t = w:5 lightgrey / brown, c = white
FTILE:  t' = floor_pebble_brown
TILE:   t = dngn_tree_dead, c = wall_stone_gray
KFEAT:  _ = altar_yredelemnul
MARKER: _ = lua:fog_machine { cloud_type = "foul pestilence", \
                              pow_min = 5, pow_max = 10, delay = 30, \
                              size = 1, walk_dist = 0, excl_rad = 0 }
: set_feature_name("tree", "dead tree")
MAP
@@xxxxxxxxxxxx
@..t....xxxxxxx
x...'''..c.2xxx
xt...tc'.c..xxx
x.'.11c'...G.2x
x.'t1cc't.....x
x.'ccc'G...ccxx
x..'''G'''...xx
xx...t.'_ccc.xx
xxcc...'cc3*.xx
xx......c34.xxx
xx2.G.c.c*.5xxx
xxxx..c...xxxx
xxxx2.xxxxxxxx
 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 / \
        hell beast / hellion / reaper / lorocyproca / tormentor
KITEM:  | = superb_item / any good_item / any w:5
: if you.in_branch("Depths") then
SUBST:  2 = 3, 4 = 5
: end
MAP
xxxxxxxxxxxx@@x
@.lxlll.l.l...x
@..xl..l.l.l.lx
x.{xl%vvvvvvvvx
x..m$*v22234vvx
xl.m2|122333|vx
x..m$*v22234vvx
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:    bat, phantom, vampire, unseen horror
MONS:    phantasmal warrior, vampire knight, jiangshi
# 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
: if you.in_branch("Crypt") then
SUBST:   4 = 7, 3 = 6, 2 = 5, 1 = 1444
SUBST:   c = v, x = c
: end
KITEM:   % = % no_pickup
KITEM:   * = * no_pickup
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
DEPTH:   D:8-, Crypt, Vaults, Depths
: if not you.in_branch("D") then
KFEAT:   D = altar_makhleb
KFEAT:   E = altar_the_shining_one
: end
SHUFFLE: '/-
NSUBST:  ' = D / 1=E, 1 = 1 / .
SUBST:   A = V:50 Y
: if you.in_branch("Vaults") then
SUBST:   c = v
: end
: if you.absdepth() <= 12 then
MONS:    vampire
: elseif you.absdepth() <= 15 then
MONS:    vampire mage
: else
MONS:    vampire knight
: end
MAP
       @
      c+c
     cc.cc
    cc...cc
   cc.....cc
  cc...1...cc
 cc...'c-...cc
ccA..1ccc1..Acc
 cc...-c'...cc
  cc...1...cc
   cc.....cc
    cc...cc
     cc.cc
      c+c
       @
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 . arrow q:30
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
DEPTH: D:12-, Depths, !Depths:$, Lair:2-, Coc, !Coc:$
KMONS: 1 = ice statue
KMONS: 2 = white imp / ice beast w:30 / polar bear / nothing w:50
KMONS: 3 = ice devil / ice dragon / freezing wraith
KMONS: 4 = ice fiend / blizzard demon
KMONS: 5 = shard shrike
KFEAT: 1 = >
: if you.absdepth() > 20 then
SUBST:  3 = 4, 2 = ..3
NSUBST: | = 1:1 / *:|
: end
: if you.in_branch("Cocytus") then
SUBST:  4 = 445, | = .
: else
SUBST: | = ||****%%%%
SUBST: T = TU
SUBST: W = w:20 W .:5
: end
SUBST: ' = W
MAP
T.WWW..........WWW.T
.'WWW..........WWW'.
WW'W.Wwww..wwwW.W'WW
WWW2WwwwwwwwwwwW2WWW
WW222wwwwwwwwww222WW
..W2WwwwwwwwwwwW2W..
.WWWWwwwwwwwwwwWWWW.
..WWWwww||||wwwWWW..
...WWwww|13|wwwwW...
..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:4-
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
DEPTH:   D:12-, Depths, !Depths:$
MONS:    crystal guardian, orange crystal statue
SUBST:   . = .:80 %$*|
KPROP:   .012 = no_tele_into
: if you.absdepth() > 16 then
SUBST:   0 = 1
: end
MAP
WWWWWWWWWWWWWW
WbbbbbbbbbbbbW
Wbb1.......0bW
Wbb.........bW
Wbb.........bW
Wnn.........bW
WW=....2....bW
Wnn.........bW
Wbb.........bW
Wbb.........bW
Wbb1.......0bW
WbbbbbbbbbbbbW
WWWWWWWWWWWWWW
ENDMAP

NAME:  minmay_more_statues
DEPTH: D:12-
MONS:  ice statue w:5 / obsidian statue / orange crystal statue
MAP
cccbcccccbcccccbccc
c.....c%*|*%c.....c
c.................c
b..1.....G.....1..b
c.................c
c.....c.....c.....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, floating 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:    minislime_mu
TAGS:    no_monster_gen no_item_gen transparent
DEPTH:   Depths, !Depths:$
MONS:    large slime creature, great orb of eyes
KMASK:   %$de = opaque
KITEM:   R = gold
ITEM:    scroll of teleportation ident:type q:2 / wand of digging
ITEM:    scroll of teleportation ident:type q:2 w:20 / wand of digging w:20 / \
         dagger ego:distortion ident:type
SUBST:   J = 1111111122
SHUFFLE: %!'"
NSUBST:  % = 1:d / * = %$
NSUBST:  ! = 1:d / * = %$
NSUBST:  ' = 1:d / * = %$
NSUBST:  " = 1:e / * = %$
MAP
...................
..J.............J..
.JJ...mmmm.mmm...J.
....mmm%m.Jm'mm....
...mm%%%m..m''mm...
...m%%%%m.mm'''mm..
..mm%%%%mJ.m''''m..
..m%%%%%mm.m''''m..
..mmmmmmm..mmmmmm..
...J..mJm.....mJ...
..mmm.....R.mJ..m..
..m!mmmmm...mmmmm..
..m!!!!!m..mm"""m..
..mm!!!!m.mm""""m..
...mm!!!m.Jm"""mm..
....mm!mmm.m""mm...
.J...m!mJ..m"mm....
..J..mmmm.mmmm..J..
...............JJ..
...................
ENDMAP

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:    floating 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 vortex, hell hound
NSUBST: ' = 4:' / *:.
MARKER: ' = lua:fog_machine { cloud_type = "flame", pow_min = 25, \
            pow_max = 75, delay = 50, size = 1, walk_dist = 0, excl_rad = 0 }
KPROP:  l = no_cloud_gen
MAP
xxxxxxxxx
xl.1xx23x
x1l'3x|2x
x.l''4xxx
x.ll''3xx
x.lll''1x
x'.llll.x
x.'...1lx
+xxxxxxxx
ENDMAP

NAME:   hangedman_eye_storm
TAGS:   no_monster_gen no_item_gen patrolling
DEPTH:  Depths, !Depths:$, Abyss
MONS:   golden eye, ophan, floating eye
MONS:   eye of devastation, great orb of eyes / shining eye w:5
NSUBST: 5 = 2:5 / *:4 5:15
KFEAT:  m = iron_grate
: if you.in_branch("Abyss") then
SUBST:  c = c:4 v:1 b:1
: 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+...mm.c
c1m...mm5mm...m.c
c+m.4.m|m2m.5.m+c
c.m...mm|mm...m1c
c.mm...mmm...mm.c
cc.m.5.....5.m.cc
 c.mm...5...mm.c
 cc.mmm...mmm.cc
  cc..mmmmm..cc
   ccc.1+..ccc
     ccccccc
ENDMAP

NAME:    hangedman_cracks_in_the_wall
TAGS:    no_monster_gen patrolling transparent
DEPTH:   D:12-, Depths, !Depths:$
MONS:    earth elemental
: if you.in_branch("D") then
MONS:    cyclops, basilisk, catoblepas
SUBST:   * = %%***, | = *|, c = x
: else
MONS:    stone giant, catoblepas, iron dragon
SUBST:   c : cxx
: end
SUBST:   5 = 111..
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_pool_fixup
DEPTH:   Depths
WEIGHT:  3
MONS:    patrolling spriggan air mage ; staff of air ident:type . robe
MONS:    patrolling spriggan rider ; spear ego:electrocution ident:type . buckler . robe
MONS:    lightning spire, sky beast, electric eel
KMONS:   E = ball lightning w:6 / \
             generate_awake air elemental w:7 / air elemental w:1
KITEM:   dT = any weapon good_item ego:electrocution ident:type, \
              lightning rod
KFEAT:   E = deep_water
KFEAT:   d = shallow_water
KFEAT:   T = permanent teleport trap / dispersal trap
MARKER:  T = lua:fog_machine { cloud_type = "rain", pow_max = 2, \
                 delay_min = 10, delay_max = 60, size = 4, walk_dist = 2 }
SHUFFLE: ab, {( / <<
NSUBST:  E = 11:E / *:e, 5 = 3:5 / *:w
SUBST:   e = E5w, a = v
MAP
 {bab bab bababtt
.baEabaEaba...abt4
@nEEwEwEEn1.4.2ntW
.baw5v5wab.3v3.ba@
 .bEnTnE=.4ndn4.+@
.baw5v5wab.3v3.ba@
@nEEwEwEEn1.4.2ntW
.baEabaEaba...abt4
 (bab bab bababtt
ENDMAP

NAME:   lightli_elemental_guards
DEPTH:  D:10-14
TAGS:   no_pool_fixup
MONS:   earth elemental
MONS:   air elemental
KMONS:  F = fire elemental
KFEAT:  F = lava
KMONS:  W = water elemental
KFEAT:  W = deep_water
MAP
xxxxxxxxxx
x%x.....2x
xx1......x
x........x
x...x*...x
x...wl...x
x........x
xww....llx
xWw....lFx
xxxx==xxxx
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:   D:13-
MONS:    patrolling cherub, patrolling dancing weapon ; great sword ego:flaming
KMONS:   p = plant
# TODO: this potion once was an apple, maybe just remove this with no apple
# flavor possible?
ITEM:    potion of ambrosia ident:type
NSUBST:  1 = 2:1 / *:.
NSUBST:  d = 2:d / *:.
SUBST:   3 = 33.
RTILE:   x = wall_lair
FTILE:   12p.dt@ = floor_lair
MAP
       xxx
  xxx xxpxx
 xxpxxxp.1xxx
xxppp2.1...px
xppp..ppx1.1x
xpdddpxxxp..xx
xpdtdpxxxx...@
xpddd.px xxp.@
xp...pxx  xxxx
xxpppxx
 xxxxx
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
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
DEPTH: D:6-, Depths, Vaults, Elf
SUBST: x : xcvmnt
SUBST: X : GtTU
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
KMASK: 89 = opaque
KMONS: 8 = 8
KMONS: 9 = 9
KITEM: 89 = % / * / w:1 |
KFEAT: X = permanent teleport trap / dispersal trap
KFEAT: Z : permanent teleport trap / w:30 x
SUBST: Y = 89, x : xcvb
MAP
............
............
...xxxxxx...
..x......x..
..x.ZXXZ.x..
..x.XYYX.x..
..x.XYYX.x..
..x.ZXXZ.x..
..x......x..
...xxxxxx...
............
............
ENDMAP

NAME:    pandoras_box_mu
DEPTH:   Depths, Crypt:1-4
TAGS:    no_monster_gen no_item_gen transparent
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 = giant cockroach
KMONS:   k = phantom
KMONS:   l = large abomination
KMONS:   m = scorpion
KMONS:   n = small abomination
KMONS:   o = unseen horror
KMONS:   p = hornet
KMONS:   q = goliath frog
KMONS:   r = wolf spider
KITEM:   e = any armour good_item / any weapon good_item / \
             scroll of acquirement ident:type
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
DEPTH:   D:8-, !D:$, Depths:2-, !Depths:$, Abyss
SHUFFLE: vcb, AB?/CD!, d<>, de
SUBST:   A=9, B=8, C=1, D=9
SUBST:   ? = %:10 *:50 |:60
SUBST:   ! = %:90 *:30 |:10
KMASK:   x = no_wall_fixup
KMASK:   189%*|de<> = opaque
KPROP:   189%*|de<> = no_tele_into
ITEM:    wand of digging ident:type
ITEM:    scroll of teleportation ident:type q:2
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-, 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
: else
MONS:   wizard w:50 / necromancer w:20 / deep elf pyromancer w:20 / \
        deep elf zephyrmancer w:20 / orc sorcerer / ogre mage / naga mage / \
        vampire mage / kobold demonologist w:5
ITEM:   any scroll / any book w:3
: end
MAP
xxxxxxxxxxxxx
xd....1....dx
xx.........xx
xd.........dx
xx.........xx
xd.........dx
xx.........xx
xd.........dx
xx.........xx
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
DEPTH:  D:8-, Elf, Depths, !Depths:$
WEIGHT: 4
KPROP:  %*8DEF = no_tele_into
KMASK:  %*|8aDEF' = 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 = deep elf elementalist
SUBST:  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
FTILE:  " = floor_pebble_brown
COLOUR: " = brown
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
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, Geh, Coc, Dis, Tar, Zot
WEIGHT:  10 (D), 1 (Geh, Coc, Dis, Tar, Zot), 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("Geh") or you.in_branch("Coc")
: or you.in_branch("Dis") or you.in_branch("Tar") then
SUBST:   DTV : Y:9 ^:1, t123 : G:9 ^:1, b : c
: 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
DEPTH:  Depths
TAGS:   no_vmirror no_rotate
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
    c.......c
   cc.......cc
   c9.9.9.9.9c
  cc.........cc
  c...........c
 cc...........cc
 c.............c
cc0.0.0.0.0.0.0cc
c...............c
cccccccc=cccccccc
ENDMAP

NAME: lightli_airlock
DEPTH: D:11-, Snake, Shoals
KPROP: W = no_tele_into
MAP
 WccccWWWccccWW
 cc..ccWcc..ccWWWWW
 c....cGc....cccccW
 c.00.ccc.09.cc%*cc
@=..9.+%+.0*.++%8|c
 c.00.ccc.09.cc%*cc
 c....cGc....cccccW
 cc..ccWcc..ccWWWWW
 WccccWWWccccWW
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, 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
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
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 misc_elf_vault transparent
DEPTH:  Depths, Elf, Zot
: if not you.in_branch("Zot") then
MONS:   deep elf high priest, deep elf pyromancer / deep elf zephyrmancer
:else
MONS:   draconian stormcaller, base draconian
:end
COLOUR: x = white
TILE:   x = wall_church
FTILE:  xmwFt12|*+. = floor_limestone
MARKER: F = lua:fog_machine { cloud_type = "flame", pow_min = 100, \
                              pow_max = 100, delay = 10, size = 1, \
                              walk_dist = 0, excl_rad = -1 }
KPROP:  wF = no_tele_into
SUBST:  F = w
KMASK:  w = opaque
MAP
 xxxxxxxxxxx
 xwwwwwwwwwx
xxwwwmmmwwwxx
xwwFmm|mmFwwx
xwwmm*1*mmwwx
xxxx*222*xxxx
xtxx.....xxtx
x2.xx+++xx.2x
x...........x
xx.........xx
 xxxx...xxxx
    xx+xx
ENDMAP

NAME:  kennysheep_potato
DEPTH: D:2-, Depths, !D:$, !Depths:$
SUBST: % = %.
SUBST: 0 = 0.
: ks_random_setup(_G)
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: % = %.
SUBST: 0 = 0.
: ks_random_setup(_G)
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: % = %.
SUBST: 0 = 0.
: ks_random_setup(_G)
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: % = %.
SUBST: 0 = 0.
: ks_random_setup(_G)
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: % = %.
SUBST: 0 = 0.
: ks_random_setup(_G)
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: % = %.
SUBST: 0 = 0.
: ks_random_setup(_G)
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: % = %.
SUBST: 0 = 0.
: ks_random_setup(_G)
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: % = %.
SUBST: 0 = 0.
: ks_random_setup(_G)
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: % = %.
SUBST: 0 = 0.
: ks_random_setup(_G)
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: % = %.
SUBST: 0 = 0.
: ks_random_setup(_G)
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: % = %.
SUBST: 0 = 0.
: ks_random_setup(_G)
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: % = %.
SUBST: 0 = 0.
: ks_random_setup(_G)
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: % = %.
SUBST: 0 = 0.
: ks_random_setup(_G)
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)
MAP
cccFcc
cwwHwc
+.t0wc
cw0tED
cwHwwc
ccFccc
ENDMAP

NAME:  kennysheep_generic_room_15
DEPTH: D:2-, Depths, !D:$, !Depths:$
SUBST: % = %.
SUBST: 0 = 0.
: ks_random_setup(_G)
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: % = %.
SUBST: 0 = 0.
: ks_random_setup(_G)
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)
: if crawl.coinflip() then
SUBST: * : %
SUBST: % = %$..
: else
SUBST: * : .
SUBST: % : {}OB
KFEAT: O = any shop
: end
SUBST: 0 = 0.
MAP
  ccDcc
 cwEwcc
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)
: 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)
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
SUBST:  % = %$.
SUBST:  0 = 0.
DEPTH:  D:4-, Depths, !D:$, !Depths:$
: ks_random_setup(_G)
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)
NSUBST: % : 1:|
SUBST:  % = *
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
TAGS:  extra
DEPTH: D:4-, Depths, !D:$, !Depths:$
: ks_random_setup(_G)
: 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)
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, 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

# Of course, since there are special_rooms already,
# a real dedication here has to step it up a little.
NAME:    hangedman_mysterious_dungeon_monster_house
TAGS:    no_monster_gen no_item_gen no_trap_gen no_pool_fixup allow_dup luniq
DEPTH:   Geh:2-, !Geh:$, Coc:2-, !Coc:$, Tar:2-, !Tar:$, Dis:2-, !Dis:$
WEIGHT:  5
# Specific allotment of monsters, terrain, and items for this small box.
# Monsters are in three tiers: generic undead, specific fodder, bosses.
# Terrain includes zot traps, and per-hell clouds, liquid, statues.
# Items include generic hellspawn weapon drops and free skeletons.
NSUBST:  . = 2:0 / 1:9 / 2:8 / 4 = 9:3 0:1 / 1 = 8:6 / 7:1 / *:.
NSUBST:  . = 1:* / 1:d / 6 = *:2 d:3 / *:.
NSUBST:  . = 1:^ / 1:^~ / 1:F~ / 4 = F~~ / 1:( / 1:> / *:.
KMONS:   0 = zombie / skeleton / necromancer w:6
KITEM:   * = battleaxe no_pickup / great mace no_pickup / \
             great sword no_pickup / glaive no_pickup / \
             scythe good_item no_pickup w:5 / demon whip no_pickup w:5 / \
             demon blade no_pickup w:5 / demon trident no_pickup w:5
: dgn.delayed_decay(_G, 'd', 'human skeleton')
KFEAT:   ^ = zot trap
: if you.in_branch("Geh") then
KMONS:   9 = sun demon / smoke demon / hell knight / \
             red devil w:5 / efreet w:5
KMONS:   8 = hellion / balrug
KMONS:   7 = brimstone fiend
MARKER:  F = lua:fog_machine {cloud_type = "flame", \
             pow_min = 8, pow_max = 10, delay = 100, \
             size_min = 1, size_max = 1, start_clouds = 1, excl_rad = 0 }
SUBST:   ~ = l
FTILE:   F = floor_volcanic
COLOUR:  F = lightred
: elseif you.in_branch("Coc") then
KMONS:   9 = ice devil w:15 / ice dragon / simulacrum w:5 / \
             skeletal warrior ; hunting sling ego:freezing ident:type . \
             mundane sling bullet . mace ego:freezing ident:type
KMONS:   8 = blizzard demon / lich / shard shrike / \
             reaper ; scythe ego:freezing ident:type
KMONS:   7 = ice fiend
MARKER:  F = lua:fog_machine {cloud_type = "freezing vapour", \
             pow_min = 8, pow_max = 10, delay = 100, \
             size_min = 1, size_max = 1, start_clouds = 1, excl_rad = 0 }
SUBST:   ~ = w
FTILE:   F = floor_nerves_blue
COLOUR:  F = lightblue
: elseif you.in_branch("Tar") then
KMONS:   9 = soul eater / shadow demon / vampire mage / flayed ghost
KMONS:   8 = tormentor / revenant / mummy priest
KMONS:   7 = tzitzimitl
MARKER:  F = lua:fog_machine {cloud_type = "foul pestilence", \
             pow_min = 8, pow_max = 10, delay = 100, \
             size_min = 1, size_max = 1, start_clouds = 1, excl_rad = 0 }
SUBST:   ~ = G
FTILE:   F = floor_crystal_squares
COLOUR:  F = lightmagenta
: elseif you.in_branch("Dis") then
KMONS:   9 = ynoxinul / rust devil w:5 / vampire knight w:5 / \
             phantasmal warrior / skeletal warrior ; mundane arbalest . \
             mundane bolt . mace good_item
KMONS:   8 = war gargoyle / iron dragon /  \
             dancing weapon ; great sword good_item | great mace good_item | \
                              glaive good_item | battleaxe good_item
KMONS:   7 = hell sentinel
SUBST:   xc = v, F~ = G
COLOUR:  G = cyan
TILE:    G = dngn_statue_iron
: set_feature_name("granite_statue", "iron statue")
: end
KPROP:   lw = no_tele_into
MAP
xxxxxxxxxxxx
xccccccccccx
xc........cx
xc........cx
xc........cx
xc........cx
xc........cx
xc........cx
xc........cx
xccccccccccx
xxxxxxxxxxxx
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
WEIGHT: 5
DEPTH:  D:5-, Depths, Lair
TAGS:   no_pool_fixup ruin_depths
SUBST:  p:wwwWWl
SUBST:  q=.0
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

################################################################
#
# <<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
: 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:$ zombie / place:Depths:$ skeleton, bone dragon
: else
MONS:   place:D:$ zombie / place:D:$ skeleton, bone dragon
: end
ITEM:   sword_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

# Crown of Dyrovepreva
#
NAME:   minmay_guarded_unrand_dyrovepreva
TAGS:   no_monster_gen no_item_gen transparent
DEPTH:  Depths
WEIGHT: 3
MONS:   patrolling crystal guardian
MONS:   orange crystal statue
ITEM:   crown_of_dyrovepreva no_pickup
KPROP:  12d' = no_tele_into
SUBST:  ' = .
MAP
        .............
       ...............
      ...bb.......bb...
     ...bbbb.....bbbb...
    ...bbbbbb...bbbbbb...
   ...bbbbbbbb2bbbbbbbb...
  ...bb'''bbb'''bbb'''bb...
 ...bb'''''b'''''b'''''bb...
...bbb''''1'''''''1''''bbb...
..bbbb'''''b'''''b'''''bbbb..
..bbbbb'''bbb'''bbb'''bbbbb..
...bbbbb'bbbbbbbbbbb'bbbbb...
....bbb''.bbb'''bbb'''bbb....
.....b'''''b''1''b'''''b.....
.....b'''''b''d''b'''''b.....
.....b'''''b''1''b'''''b.....
....bbb'''bbb'''bbb'''bbb....
...bbbbb'bbbbb'bbbbb'bbbbb...
..bbbbb'''bbb'''bbb'''bbbbb..
..bbbb'''''b'''''b'''''bbbb..
...bbb''''1'''''''1''''bbb...
 ...bb'''''b'''''b'''''bb...
  ...bb'''bbb'''bbb'''bb...
   ...bbbbbbbbbbbbbbbbb...
    ...bbbbbb...bbbbbb...
     ...bbbb.....bbbb...
      ...bb.......bb...
       ...............
        .............
ENDMAP

# Ring of the Mage
#
NAME:   minmay_guarded_unrand_mage
TAGS:   no_monster_gen no_item_gen transparent
DEPTH:  Depths
WEIGHT: 3
MONS:   wizard, orange crystal statue / obsidian statue
KMONS:  3 = lich w:40 / ancient lich / dread lich
KITEM:  3 = ring_of_the_mage no_pickup
KPROP:  32'+ = no_tele_into
KFEAT:  ' = floor
MAP
.......             .......
.ccccc..           ..ccccc.
.c...c...         ...c...c.
.c.1.+....       ....+.1.c.
.c...c.....     .....c...c.
.cc+cc......   ......cc+cc.
...........................
 ......WWWWWWWWWWWWW......
  .....WwwwwwwwwwwwW.....
   ....WwccncccnccwW....
    ...Wwc'''c'''cwW...
     ..Wwn'3'+'2'nwW..
      .Wwc'''c'''cwW.
      .Wwcccccc+ccwW.
      .Wwc'''c'''cwW.
     ..Wwn'2'+'2'nwW..
    ...Wwc'''c'''cwW...
   ....Wwcc=cccnccwW....
  .....WwwwWwwwwwwwW.....
 ......WWWWWWWWWWWWW......
...........................
.cc+cc......   ......cc+cc.
.c...c.....     .....c...c.
.c.1.+....       ....+.1.c.
.c...c...         ...c...c.
.ccccc..           ..ccccc.
.......             .......
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. (r-i)
NAME:    sword_in_stone
TAGS:    no_monster_gen patrolling vaults_hard transparent
DEPTH:   D:5-, Depths, !Depths:$, Vaults, Orc, Elf
WEIGHT:  3
KMONS:   A = gnoll sergeant ; trident . scale mail | chain mail . kite shield
KMONS:   B = wight ; falchion | long sword . ring mail | scale mail . kite shield | nothing
KMONS:   C = Blork the orc / orc warrior ; great sword . chain mail | plate armour, \
                             orc warrior ; great sword . chain mail | plate armour / nothing
KMONS:   D = Eustachio / orc warrior ; long sword | falchion . chain mail . kite shield, \
                         orc warrior ; long sword | falchion . chain mail . kite shield / nothing
KMONS:   E = Joseph / orc knight ; long sword | scimitar . chain mail . kite shield, \
                      orc knight ; long sword | scimitar . chain mail . kite shield / nothing
KMONS:   F = Urug / orc knight ; rapier | long sword . leather armour . buckler | nothing, \
                    orc knight ; rapier | long sword . leather armour . buckler | nothing / nothing
KMONS:   G = Erica / wizard ; long sword . robe | leather armour . kite shield, \
                     wizard ; long sword . robe | leather armour . kite shield / nothing
KMONS:   H = Harold / deep elf knight, deep elf knight / nothing
KMONS:   I = Donald / orc warlord, orc warlord / nothing
KMONS:   J = Louise / hell knight, hell knight / nothing
KMONS:   K = Frances / hell knight, hell knight / nothing
KMONS:   L = Agnes / spriggan defender, spriggan defender / nothing
KMONS:   M = Rupert / vampire knight, vampire knight / nothing
KMONS:   N = Asterion / ancient champion, ancient champion / nothing
KMONS:   O = Frederick / draconian knight, draconian knight / nothing
KMONS:   P = 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 ; long sword good_item | good_item great sword | \
                              demon blade good_item | triple sword good_item | \
                              double sword good_item
KITEM:   s = long sword good_item / good_item great sword / \
             demon blade good_item / triple sword good_item / double 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 = CF / *:o
: elseif you.in_branch("Elf") then
NSUBST:  k = 2 = IJKL / *:e
: elseif you.absdepth() < 10 then
SUBST:   k = ABCD, S = s
: elseif you.absdepth() < 13 then
SUBST:   k = EFGH
: elseif you.absdepth() < 16 then
SUBST:   k = FGHJ
: elseif you.absdepth() < 19 then
SUBST:   k = HIJKL
: else
SUBST:   k = LMNOP
: end
KMASK:   Ss = opaque
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
KPROP:  ._-cGO12345 = bloody / nothing w:20
KFEAT:  _ = altar_makhleb
KFEAT:  - = altar_makhleb
KITEM:  - = obsidian_axe no_pickup
MARKER: O = lua:fog_machine { cloud_type = "flame", pow_min = 10, \
                              pow_max = 10, delay = 10, size = 1, \
                              walk_dist = 0, excl_rad = 0}
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.
.ccOcc.O1O.ccOcc.
..ccccccccccccc..
 ...............
ENDMAP

# autumn katana
# An autumnal forest, with warriors paying respect to the last wielder
NAME:    wheals_unrand_guarded_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
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_prune
TAGS:    transparent no_monster_gen
DEPTH:   D:12-
WEIGHT:  3
MONS:    deep elf pyromancer / deep elf zephyrmancer / ogre mage / wizard / \
         kobold demonologist w:2 / vampire mage w:2 / naga mage w:2
NSUBST:  1 = 6:1 / 10=1.... / .
ITEM:    glaive_of_prune no_pickup
SUBST:   " : .:50 cvbnG
SUBST:   ' : .:50 cvbnG
SUBST:   ? : .:50 cvbnG
SUBST:   ! : .:60 cvbnGT
KMASK:   l = no_monster_gen
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 ident:all
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 ident:all
: 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
ITEM:    vampires_tooth no_pickup
: 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
: end
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:   D:13-, Depths
WEIGHT:  3
ITEM:    wrath_of_trog no_pickup ident:all
MONS:    spriggan berserker
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
ITEM:    skullcrusher no_pickup ident:all
MONS:    flying skull
: if you.in_branch("Crypt") then
MONS:    curse skull
NSUBST:  d = d / *
: else
MONS:    skeletal warrior
NSUBST:  d = d / %
: end
NSUBST:  ' = 12=1 / 14=1...... / .
SUBST:   " = 1., ! = 2.
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
ITEM:    finisher no_pickup ident:all
: if you.depth() < 13 then
MONS:    wraith, skeletal warrior
: else
MONS:    skeletal warrior, reaper
: end
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
KMASK:   lw = opaque
ITEM:    shield_of_resistance no_pickup
MONS:    fire dragon, ice dragon
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
ITEM:    tower shield_of_ignorance no_pickup
MONS:    orange crystal statue
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
ORIENT: float
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.
# D:13-
: else
MONS:   efreet, hellion
NSUBST: D = 2 / 1..
SUBST:  a = c
:end
SUBST:  c : cv
MAP
           ccc    ccccccc
 ccc       cDcccccccc..Dcc
 c.cc      c.......D.....cc
 c..cccccccc..ccac..cac...cc
 c.c..c..c......c....c.....cc
@+..c......DccccacdccacccD.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 / skeleton place:D:15, hellwing
SUBST:  1 = 1.
: else
MONS:   zombie place:Depths:1 / skeleton place:Depths:1, 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_staff_of_battle
TAGS:   transparent
DEPTH:  D:8-
WEIGHT: 3
ITEM:   staff_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:vorpal
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:vorpal 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'
: 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, shadow
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
DEPTH:  D:13-, Depths
WEIGHT: 3
ITEM:   rift no_pickup
MONS:   wizard, tentacled starspawn, starcursed mass
KFEAT:  t = demonic_tree
KFEAT:  _ = altar_lugonu / enter_abyss
: if you.in_branch("D") then
NSUBST: D = d / 3 / 2
SUBST:  1 = 1..
# Depths
: else
NSUBST: D = d / 3
SUBST:  1 = 12..
: 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 ident:all
ITEM:   helmet plus:-2 ident:all, chain mail plus:-2 ident:all
ITEM:   pair of boots plus:-2 ident:all
ITEM:   pair of gloves plus:-2 ident:all
: if you.depth() < 8 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
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
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
ITEM:   amulet_of_vitality no_pickup / necklace_of_bloodlust no_pickup
MONS:   deep troll, deep troll shaman
: if you.depth() < 13 then
SUBST:  1 = 1..
: else
NSUBST: 1 = 2 / 1
SUBST:  1 = 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
# D:9-D:11
:     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...
# D:12-13
:     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..
# D:14-
:     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 / shock serpent \
        / 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 / fire dragon w:5
MONS:   water elemental / ice dragon w:5
MONS:   earth elemental / stone giant w:5
MONS:   air elemental / deep elf zephyrmancer
MONS:   deep elf elementalist w:40 / fire giant / frost giant / iron dragon \
        / storm dragon
: master_elementalist_setup(_G, "6")
SUBST:  1 = 1..., 2 = 2..., 3 = 3..., 4 = 4...
# Depths
: else
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
: master_elementalist_setup(_G, "6")
SUBST:  1 = 1.., 2 = 2.., 3 = 3.., 4 = 4..
: 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

###################################################################
#
# <<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
MONS:  wizard, small abomination, large abomination
MAP
ccc+cccccc
c........c
c........c
c......1.c
c........c
ccccccc+cc
c***c3232c
c|**+2223c
c||*c3322c
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
DEPTH:  D:13-, Elf, 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 / ancient lich / dread lich / \
            curse skull 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 / \
            hell sentinel / ancient lich / dread lich / place:Geh:$ w:20
: elseif you.in_branch("Tar") then
KMONS:  1 = doom hound w:15 / death drake / bone dragon / 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 fire / electric golem / \
            killer klown /  ancient lich / dread lich / curse toe / \
            place:Zot:$ w:20
# Dungeon and Depths get 8 spawns.
: else
KMONS:  1 = 8
: 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
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
DEPTH: D:8-, Depths, !Depths:$
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
SHUFFLE: AB, CD, EH/FG
KITEM: ABCD = gold / nothing
SUBST: F = G:99 F:1
KMONS: F = orange crystal statue / obsidian statue / ice statue
MAP
............
.xxxxxxxxxx.
.+..c..c.9x.
.x.B+.D+..x.
.xcccccc=cx.
.x.8+|0c8.x.
.x8$c.|c..x.
.xc+cccc+cx.
.x.9+.F+..x.
.x..cG.c9.x.
.xxxxxxxxxx.
............
ENDMAP

# Lava pond
NAME:  minivault_15
TAGS:  extra transparent
: 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
SHUFFLE: XY, ABCDE
SUBST:   X=x, Y=+
SUBST:   A=?, B=%%%*, C=T, D=0009, E=89
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 misc_elf_vault 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
DEPTH:  D:7-14
TAGS:   extra no_monster_gen no_trap_gen patrolling
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:  - = open_door
MAP
.xxxxxxx
@+...edx
.x...1dx
 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, Hells.
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 = necrophage
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:   1Yab = 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 }
MARKER:  Z = lua:fog_machine { cloud_type = "flame", pow_min = 100, pow_max = 100, \
                 delay = 10, size = 1, walk_dist = 0, excl_rad = 0 }
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-14
WEIGHT:   10
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 ; nothing
KMONS:    F = plant
KITEM:    E = falchion ego:flaming ident:type / \
              hand axe ego:flaming ident:type
KITEM:    I = halberd
KFEAT:    EF = shallow_water
MAP
cccccccccc
cAH+.....c
cIDcD..BBc
c+ccm+++cc
x.WF.....x
xFWW.t.t.x
xWEF..t..x
xFW..t.t.x
xFFW..W..x
xxxxx@xxxx
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: 0.5% (Slime), 1% (Geh, Coc, Dis, Tar), 2% (Orc, Spider, Crypt, Pan), 3%
DEPTH:  D:8-, Depths, Orc, Elf, Lair, Snake, Spider, Slime, Crypt, \
        Geh, !Geh:$, Coc, !Coc:$, Dis, !Dis:$, Geh, !Geh:$, Pan
KFEAT:  X = slimy_wall
{{
    -- 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
CHANCE: 1%
DEPTH: Vaults:1-4
{{
    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
