################################################################################
# d_encompass.des: Encompass vaults that can place somewhere in D.
################################################################################

################################################################################
# Zero! Nine! Eight!
#
NAME:    hangedman_slaughterboxes
TAGS:    no_pool_fixup no_monster_gen no_item_gen patrolling uniq_d_encompass
ORIENT:  encompass
DEPTH:   Depths:2-
PLACE:   D:$, Depths:$
WEIGHT:  1 (D:$), 2 (Depths:$), 10
MONS:    fungus, plant
KMONS:   S = 0 band
KMONS:   # = 9 band
KMONS:   = = draconian annihilator / draconian knight / draconian monk
KFEAT:   ^ = stone_arch
KFEAT:   - = enter_depths
KFEAT:   = = enter_zot
SHUFFLE: :;, `~, 34, 67, !?, XZ / yz
SUBST:   % = %:40 $:20 ., * = *:30 %, | = |:30 *
SHUFFLE: ABCDE / BADCE / AGHIC / ACGHE, BDF
SUBST:   ACF = ., BDGHI = x, E : .x
SHUFFLE: JKLMN / KJMLN / JPQRL / JLPQN, KMO
SUBST:   JLO = ., KMPQR = x, N : .x
SHUFFLE: cdefg / dcfeg / cijke / ceijg, dfh
SUBST:   ceh = ., dfijk = x, g : .x
SHUFFLE: nopqr / onqpr / ntuvp / nptur, oqs
SUBST:   nps = ., oqtuv = x, r : .x
SUBST:   X = xx', y= x'', Z = xx., z = x..
SUBST:   ;` = ., :~ = x, T = TTV, U = TUU
SUBST:   7? = ., 36! = 0, Y : 09, 5 = 09, 4 = 9
SUBST:   " : WW', _  = C, @ = G
NSUBST:  ' = 7:S / 2:# / 6 = S:3 .:2 / *:.
: if you.absdepth() > 20 then
: kmons('9 = place:Depths:' .. you.depth() - 1 .. ' 9')
SUBST:   & : a:45 c:8 vb x:2, a : c:15 vb
MARKER:  ^ = lua:props_marker { portal=1 }
:    if you.where() == dgn.level_name(dgn.br_entrance("Zot")) then
SUBST:   ) = =, >]} = .
:    end
: else
SUBST:   & : a:80 x:15 c:3 v:1 b:1, a : c:38 v:2 b:2
:    if you.where() == dgn.level_name(dgn.br_entrance("Depths")) then
SUBST:   }] = ., ) = -, > = <
:    end
: end
MAP
   xxxxxxxxxxxxxxx      xxxxx       xxxxx
  xxxxxxxxxxxxxxxxx    xxxxxxx    xxxxxxaaaaaaaaaaaaaaa
 xxxZZZZZZZZZZZZxxxxxxxxxXXXxxxxxxxxxZZaaaaaaaaaaaaaaaaa
xxxZ............ZxxxxxxXX'''XXxxxxxZZ..aaalalalalalalaaaa
xxZ..`x~x`x~x`x..ZZXXXX'''x'''XXZZZ....aalllllllllllllaaaa
xxZ.`x........`....'''''''x''''''......aal%%%%*****|||laaa
xxZ.x..~xxx`x.x....'x'''x'''x'''x...{..aal%........38|llaa
xxZ.~.~x''''`.~...x'''x'''x'''x''.x..[.aal%.&4&&..&&3|laaa
xxZ.x.x'`~`'x.x....'x'''x'''x'''x...(..aal%.48&&.&&&.*llaa
xxZ.`.x'~0~'x.`....''''''''''''''......aal%.&&&...&..*laaa
xxZ.x.x'`~`'x.x..aaaaaaaaaaaaaaaaaaaaaaaal%.&&.|.....*llaa
xxZ.~.`''''x~.~.aaaaraaaaaaaEaaaaaaaaaaal&&.....|.&&.*laaa
xxZ.x.x`xxx~..x.aa9...0.&.0..67aalllllll&&&+.....&&&.%llaa
xxZ.`........x`.aa.nop.&+&.ADC6aal%%%%%%&&.m+...&&84.%laaa
xxZ.x`x~x`x~x`..ar.qrq..&..BEB.Eal%90&...+m.m+..&&4&.%llaa
xxZ.............aa.pon.&+&.CDA.aal%0.&.0..+m.m+......%laaa
xxxZ.......aaaaaaa....9.&.....0aal%&&......+m.&&%%%%%%llaa
 xxxZ.....aaaaNaaaa.a.aaaa.&.&.aal%......<..+&&&lllllllaaa
 xxxZ.BAD.aa9....aaa+a+a0a&+&+&aaaaa+a+a5....&&laaaaaaaaaax
  xxX'CEA'aa.JKL..aaa....a.&.&.aaaa.a.aaa..0.%laaaaaaaaaaxx
  xxX'DCB'aN.MNM.a+acde..a...!?.&......a+....%laa.......Zxx
  xxX'''''aa.LKJ..a.fgf.%a.nop!&+&.]1U..a..&&%laa..)....Zxx
  xxX'''''aa....9a+.edc0%a.qrq..&..1@1.a+.&.0%laa.>.>..Zxxx
  xxX'LKJ'aa.&.&.aa...08*a.pon.&+&.U1}..a.&09%laa......Zxx
  xxX'MNM'aa&+&+&a0..%%*aa9.....&......aa%%%%%laa..x..Zxxx
 xxxX'JKL'aa.&.&.aaaaaaaa+aaaaaaa..&.&.aallllllaa.....Xxx
 xxX''''''aa....0.&.....0aa&...+.a&+&+&aaaaaaaaaa'x'x'Xxx
 xxX''''''aa.ABC.&+&.JKL.aY&.&.a+a.&.&.aaaaaEaaaa'''''Xxx
 xxX'CBA''aE.DED..&..MNM.a..efc..a...!?.&.0..67aa''x''Xxx
 xxX'DED''aa.CBA.&+&.LKJ.a.&dgf&.a.nqp!&+&.ABC6aa''''''Xxx
 xxX'ABC''aa9.....&.0....a%0cde..a.oro..&..DED.Ea'x'x''Xxxx
 xxX''''''aaaaEaaaaa.&.&.a*80&.&&a.pqn.&+&.CBA.aa'''''''Xxx
 xxX''''''aaaaaaaaaa&+&+&a|*%..Yaa9.....&.....0aa''x'xx'Xxx
 xxX'pon''aawwwwwwaa.&.&.aaaaaaaa+aaaaaaaa.&.&.aa'''''''Xxx
 xxX'qrq''aaw2112waa....5.&.....0aa*%%..0a&+&+&aa'x'x''Xxxx
 xxX'nop''aaw..T.Wa..DCB.&+&.JML.a*80...aa.&.&.aa''''''Xxx
 xxX''''''aaw....W+a.AEC..&..KNK.a%0cfe.+a9...0aa''x''Xxx
 xxX''''''aaw.2..Wa..BAD.&+&.LMJ.a%.dgd.a..nqp.aa'''''Xxx
 xxxX'edc'aaw....W+a......&.0....a..efca+a.oro.ra'x'x'Xxx
  xxX'fgf'aaw...@waaa.a.aaaa.&.&.a....aaa..pqn.aa'''''Xxx
  xxX'cde'aaw._..wwa+a+aaaaa&+&+&a0a+a+aaa....9aa..x..Zxxx
  xxX'''''aaw....@wwWWWWwwaa.&.&.aaaa.a.aaaaraaaa.....Zxxxx
  xxX'''''.aW......@....2waa....0.&.9....aaaaaaa.......Zxxx
  xxX'cde'.+W.._.......T1waa.ADC.&+&.JML.aa.............Zxx
  xxZ'fgd'.+W....._..2..1waE.BEB..&..KNK.Na..;x:x;x:x;x.Zxx
 xxxZ.efc..aww..........2waa.CDA.&+&.LMJ.aa.;x........;.Zxx
xxxxZ......aawWWWwwwwwwwwwaa9.....&.....9aa.x..:xxx;x.x.Zxx
xxxX'''2'..aaa++aaaaaaaaaaaaaaEaaaaaaaNaaaa.:.:x'''';.:.Zxx
xxX''''''........aaaaaaaaaaaaaaaaaaaaaaaaa..x.x';:;'x.x.Zxx
xxX''''''2....''''''''''''''''''''''''''....;.x':0:'x.;.Zxx
xxX'2'^'''''.cde''efc''''''''''''LMJ''BAD...x.x';:;'x.x.Zxx
xxX'''""'''2.fgd''dgd''pqn''CDA''KNK''CEA...:.;''''x:.x.Zxx
xxX''^""^'''.efc''cfe''oro''BEB''JML''DCB...x.x;xxx:..x.Zxx
xxX'''^'''''..'''''''''nqp''ADC'''''''''....;........x;.Zxx
xxX'''''2'''ZZZXXXXXXX''''''''''XXXXXXXXZZ..x;x:x;x:x;..Zxx
xxxX'''''''XxxxxxxxxxxXXXXXXXXXXxxxxxxxxxxZ............Zxxx
 xxxXXXXXXXxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxZZZZZZZZZZZZxxx
  xxxxxxxxxxx        xxxxxxxxxxxxx       xxxxxxxxxxxxxxxx
   xxxxxxxxx                              xxxxxxxxxxxxxx
ENDMAP

###############################################################################
#  This vault exercises varied old ideas for the Vaults branch:
#  a primarily humanoid-based monster set, a focus on placing groups,
#  and a pattern-based layout emphasizing lots of distinct rooms.
#  Of course, HangedMan twisted these ideas thoroughly.
#  Many thanks to elliott for writing the band placement lua!
#
NAME:    hangedman_spin_cycle
TAGS:    no_monster_gen no_item_gen no_trap_gen patrolling uniq_d_encompass
ORIENT:  encompass
DEPTH:   Depths:2-
PLACE:   D:$, Depths:$
WEIGHT:  1 (D:$), 2 (Depths:$), 10
KMONS:   - = plant
KMONS:   _ = demonic plant
KMONS:   mo = vault guard
KMONS:   p = floating eye
KMONS:   q : great orb of eyes w:7 / guardian serpent w:3
KMONS:   r = ettin / deep troll shaman / stone giant / frost giant
KMONS:   t = draconian knight / draconian scorcher / draconian annihilator
{{
local bands = {
    [65 - you.absdepth() * 3] =
        { "cyclops", "tengu warrior", "centaur warrior", },
    [42 - you.absdepth() * 2] =
        { "kobold demonologist", "tengu conjurer", "deep elf pyromancer",
          "deep elf zephyrmancer", "necromancer", "yaktaur", "Azrael",
          "Kirke", },
    [26 - you.absdepth()] =
        { "glowing orange brain", "spriggan berserker", "wizard",
          "skeletal warrior", "salamander tyrant", "rakshasa", },
    [you.absdepth() * 2 - 37] =
        { "deep elf death mage", "spriggan air mage", "deep troll shaman", },
    [you.absdepth() * 2 - 42] =
        { "spark wasp", "hell knight", "naga sharpshooter", "vampire mage",
          "orc warlord", "vampire knight", "stone giant",
          "deep elf high priest", "spriggan defender", },
    [you.absdepth() - 18] =
        { "lich", "ancient champion", "tengu reaver", "Margery",
          "Saint Roka", "Sojobo", },
}
local kmonsters = {}
for weight, monsters in pairs(bands) do
    if weight > 0 then
        for _, mons in ipairs(monsters) do
            if not you.uniques(mons) then
                table.insert(kmonsters, mons .. " band w:" .. weight)
            end
        end
    end
end
util.sort(kmonsters)
kmons("s = " .. table.concat(kmonsters, " / "))
}}
KITEM:   ? = any ring randart w:390 / ring_of_the_octopus_king
KITEM:   ! = ring of slaying / ring of wizardry / any good_item ring no_uniq w:75
KITEM:   | = | / any good_item
KFEAT:   ^ = permanent teleport trap
KFEAT:   ~ = teleport trap
KFEAT:   aD = stone_arch
KFEAT:   A = enter_hell
KFEAT:   & = enter_pandemonium
KFEAT:   @ = enter_abyss
KFEAT:   B = enter_depths
KFEAT:   C : C / any shop
KFEAT:   Z = enter_zot
SHUFFLE: <d` / {e1 / (f2 / [g3, >h4 / }i5 / )j6 / ]k7, (f2 / )j6, 15
: if you.absdepth() > 17 then
SUBST:   ( = D, ) = C
MARKER:  C = lua:props_marker { portal=1 }
MARKER:  D = lua:props_marker { portal=1 }
:     if crawl.random2(you.depth()-15) > (you.depth()-18) then
SUBST:   A&@ = a, _ = -, l = W
:     else
SHUFFLE: aA&@
:     end
:     if you.where() == dgn.level_name(dgn.br_entrance("Zot")) then
NSUBST:  (D = Z / D
SUBST:   f = ', 2 = t
:     end
: else
SUBST:   A&@ = a, _ = -, l = W
:     if you.where() == dgn.level_name(dgn.br_entrance("Depths")) then
NSUBST:  ( = B / T
SUBST:   f = ', 2 = r
:     end
: end
SUBST:   {} = **|||, ) = C, [ = !, ] = ?
NSUBST:  < = { / ( / [, > = } / ) / ]
SUBST:   d = 0, e = 009, f = %, g = 0, h = 0, i = 009, j = %, k = 0
SUBST:   ` = >, 1 = 9988s, 2 = 009, 3 = s, 4 = `, 5 = 998ss, 6 = 009, 7 = s
SHUFFLE: })]` / {([>, ?!, mo / pq, pq / pq / pq / qp / pp / qq
SHUFFLE: LM / LM / LM / LM / LM / LM / ML / ML / MM
SHUFFLE: NO / NO / NO / NO / NO / NO / ON / ON / OO
SHUFFLE: PQ / PQ / PQ / PQ / QP, RS / RS / RS / SR
SHUFFLE: EF / GH / Iu / yz
SUBST:   LNPR : x, MOQS : ~, J : ~xxx, K : ~xxxx, c : x:7 c:1, v : v:7 c:1
SUBST:   Iy = D, uz = a
NSUBST:  ~ = 2:~ / ~. / 75 = ~ .:4490 / 225 = ~ .:9990 / .
COLOUR:  "-_ = green
COLOUR:  '`089rs%*|!? = white
FTILE:   ^"aAFHuz@&-_U = floor_grass
: if crawl.coinflip() then
FTILE:   '`<{([>})]089rst%*|!?BCTDEGIZy = floor_vault
: else
FTILE:   '`<{([>})]089rst%*|!?BCTDEGIZy = floor_pebble_darkgray
: end
MARKER:  E = lua:transp_loc("spin_cycle_entry")
MARKER:  F = lua:transp_dest_loc("spin_cycle_entry")
MARKER:  G = lua:transp_dest_loc("spin_cycle_exit")
MARKER:  H = lua:transp_loc("spin_cycle_exit")
MAP
                          vvvvvvv
                         vv'%<%'vv
                 vvvv    vd'''''dv    vvvv
                vv%'vvvvvv'''`'''vvvvvv'%vv
               vv{''evvcccc+ccc+ccccvvg''[vv
               v%'1'''cc...........cc'''3'%v
               v'''cc+c.......N.....c+cc'''v
               vve'c.....L~~~~OO~......c'gvv
                vv'+....~MM~~~~N~~~....+'vv
          xxxx xcccc..~~~~L~~~~OO~~~~..ccv  xxxx
         xxJJxxx~~~..~~~~~MM~~~~N~~Q~~..ccxxxKKxx
         xJJJJxx~~~~px~~~~~L~~~~OO~~x~~~~~xxKKKKx
         xJJJJx~~~~~xm~~~~~MM~~~~N~~~P~~~~~xKKKKx
         xxJJ~~~~~~~~~~~~~~.L...~~~~~~~~~~~~~KKxx
    vvvv  xxx~www~~~~~~~~~.......~~~~~~~~www~xxxx
   vv%'vv xx~~www~x~~~.....c+c+c....~~~x~www~~~xx vvvvv
  vv(''fvvc~~~ww~R~~~.....cc'''cc.....~~R~ww~~~~cvv'%vvv
  v%'2'''cc~~~~~RS~~..c+ccc''4''ccc+c..~SR~~~~~~cvf''(vv
  v'''cc+c.~~~~x~~...cc''kch'''hci''cc..~~x~~~~~c'''2'%v
  vvf'c....~~~~~~....+'7''cc%>%cc''5'+..~~~~~~~.c+cc'''v
   vv'+...~~P~~~..c+cck''%bbbEbbb%''ic...~~~~xq....c'fvv
   vvcc..~~x~~~..cc'jbbb%]bbnnnbb}%bbc+c..~~~ox~...+'vv
   vcc...~Q~~~~..+'6'bbbbbbblllbbbbbbj'cc..~~~~~~..ccvv
   vc....~~~~~~..c'''%bbbbbbl^lbbbbbb'6'+..~~~~~~...ccv
 vvvc...~~~ON~~..cj'%)bblllllFllllbb%'''c..~~~~~~....cv
vvg'c..~~ONO~~..ccccbbbbla""""""Albb)%'jc..~~~~~~~...cvvv
v'''+..ONO~~~..cc'icbbbbl"""U"_""lbbbbcccc..~~~~~ML..c'evv
v%''c.NO~~~~~..+'''%bnlll"_""""""lbbbbck'cc..~~MLM~..+'''v
v['3c..~~~~~ML.c'5'}Gnl^H""""""U"lllnb%'''+..MLM~~~..c''%v
v%''c..~~~MLM..+'''%bnlll"U""""""u^lnI]'7'c.LM~~~~~..c1'{v
v'''+..~MLM~~..cc'icbbbbl""""""_"lllnb%'''+..~~~~~ON.c''%v
vvg'c..LM~~~~~..ccccbbbbl""_"U"""lbbbbck'cc..~~~ONO..+'''v
 vvvc...~~~~~~~..ch'%>bbl@""""""&lbbbbcccc..~~ONO~~..c'evv
   vc....~~~~~~..c'''%bbllllzlllllbb>%'hc..~~NO~~~~..cvvv
   vcc...~~~~~~..+'4'bbbbbbl^lbbbbbb%'''c..~~~~~~~...cv
   vvcc..~~~~~~..cc'hbbbbbblllbbbbbbb'4'+..~~~~Q~...ccv
  vvv'+...~xo~~~..c+cbb%]bbnnnbb}%bbbh'cc..~~~x~~..ccvv
  vvd'c....qx~~~~...ck''%bbbybbb%''icc+c..~~~P~~...+'vvv
  v'''cc+c.~~~~~~~..+'7''cc%)%cc''5'+....~~~~~~....c'dvv
  v%'`'''c~~~~~x~~..cc''kcj'''jci''cc...~~x~~~~.c+cc'''v
  vv<''dvc~~~~~~RS~..c+ccc''6''ccc+c..~~SR~~~~~cc'''`'%v
   vv%'vvc~~~~ww~R~~.....cc'''cc.....~~~R~ww~~~cvvd''<vv
    vvvv cxx~~www~x~~.....c+c+c.....~~~x~www~~xx vv'%vv
          xxx~www~~~~~~~~.......~~~~~~~~~www~xxx  vvvv
         xxKK~~~~~~~~~~~~~..L..~~~~~~~~~~~~~~JJxx
         xKKKKx~~~~~P~~~N~~~MM~~~~~~mx~~~~~xJJJJx
         xKKKKxx~~~~~x~~OO~~~L~~~~~~xp~~~~xxJJJJx
         xxKKxxxxc..~~Q~~N~~~MM~~~~~~..~~~xxxJJxx
          xxxx  vcc..~~~~OO~~~L~~~~~..ccccc xxxx
               vv'+....~~~N~~~MM~~....+'vv
              vve'c.....~~OO~~~L~.....c'gvv
              v'''cc+c.....N.......c+cc'''v
              v%'1'''cc...........cc'''3'%v
              vv{''evvcccc+ccc+ccccvvg''[vv
               vv%'vvvvvv'''2'''vvvvvv'%vv
                vvvv    vf'''''fv    vvvv
                        vv'%(%'vv
                         vvvvvvv
ENDMAP

################################################################################
# Giving players the runaround...

default-depth:

NAME: grunt_runaround
TAGS: no_monster_gen uniq_d_encompass
PLACE: Depths:$
DEPTH: D:$, Depths:2-
WEIGHT: 1 (D:$), 2 (Depths:$), 10
ORIENT: encompass
SUBVAULT: B : grunt_runaround_doors_1
SUBVAULT: C : grunt_runaround_doors_2
SUBVAULT: D : grunt_runaround_doors_3
SUBVAULT: E : grunt_runaround_doors_4
: if you.where() == dgn.level_name(dgn.br_entrance("Zot")) then
KFEAT:  Z = stone_wall
TILE:   Z = wall_zot_magenta
COLOUR: Z = lightmagenta
SUBVAULT: F : grunt_runaround_zot
NSUBST: < = 1:{ / 1:[ / 1:( / 2:< / *=A
: elseif you.where() == dgn.level_name(dgn.br_entrance("Depths")) then
KFEAT:  Z = metal_wall
SUBST:  9 = 0
SUBVAULT: F : grunt_runaround_depths
NSUBST: < = 1:{ / 1:[ / 1:( / 2:< / *=A
: else
KFEAT: Z = metal_wall
SUBVAULT: F : grunt_runaround_loot
NSUBST: < = 1:{ / 1:[ / 1:( / 1:] / 1:) / *=A
: end
{{
local room_centres = { 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k',
                       'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O',
                       'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W' }
for i = 1, #room_centres do
  subst(room_centres[i] .. ' : .:21 w l c v b:2')
end
}}
#KMASK: 09 = !no_monster_gen
SUBST: 0 = 0.
SUBST: 9 = 90
KMONS: 0 = 0 band
KMONS: 9 = 9 band
KFEAT: G = granite_statue / fountain_blue / fountain_sparkling w:1 / \
           floor w:21
MARKER: A = lua:props_marker { portal=1 }
KFEAT:  A = floor
MAP
                  cccccccccccccccc
                ccc.......<......ccc
             cccc..................cccc
           ccc..c..0.dddGddGddd.0..c..ccc
          cc....BB................BB....cc
         cc...0..c.cBBccccccccBBc.c..0...cc
        cc......cccc.....cc.....cccc......cc
       cc..kk.ccc...HH...CC...II...ccc.ee..cc
      cc<.Gk.BB..HHGH..0.CC.0..IGII..BB.eG.<cc
     cc..kk.cc...H.......cc.......I...cc.ee..cc
    cc..Gk.cc..0....cCCccccccCCc....0..cc.eG..cc
   cc..kk.ccc.....ccc..........ccc.....ccc.ee..cc
   c...k.cccCC..CCc.c..0.QQ.0..c.cCC..CCccc.e...c
  cc....Bc..CCccc...DD..QGGQ..DD...cccCC..cB....cc
  c..0.cB....ccc..0..c........c..0..ccc....Bc.0..c
  c....c..0..cc.PP...cDDccccDDc...RR.cc..0..c....c
 cccB.cc....Cc.PG..DDc...ZZ...cDD..GR.cC....cc.Bccc
 c..Bcc.OO..C..P..cc...9.EE.9...cc..R..C..JJ.ccB..c
cc....c.O..cc.0..ccZ..9G.EE.G9..Zcc..0.cc..J.c....cc
c..0.cc.G..c....DcZEE....ZZ....EEZcD....c..G.cc.0..c
c....B.OO.cccD..D..EEZZEEZZEEZZEE..D..Dccc.JJ.B....c
c..j.B.O..C..Dccc...ZZZFFFFFFZZZ...cccD..C..J.B.f..c
c..j.c....C....D..9.ZZFFFFFFFFZZ.9..D....C....c.f..c
c..j.c..0.c.0..D.9G.EFFFFFFFFFFE.G9.D..0.c.0..c.f..c
c..G.c....c..W.c....EFFFFFFFFFFE....c.S..c....c.G..c
c<.j.ccCCcc.WG.cZEEZZFFFFFFFFFFZZEEZc.GS.ccCCcc.f..c
c..j.ccCCcc.WG.cZEEZZFFFFFFFFFFZZEEZc.GS.ccCCcc.f.<c
c..G.c....c..W.c....EFFFFFFFFFFE....c.S..c....c.G..c
c..j.c..0.c.0..D.9G.EFFFFFFFFFFE.G9.D..0.c.0..c.f..c
c..j.c....C....D..9.ZZFFFFFFFFZZ.9..D....C....c.f..c
c..j.B.N..C..Dccc...ZZZFFFFFFZZZ...cccD..C..K.B.f..c
c....B.NN.cccD..D..EEZZEEZZEEZZEE..D..Dccc.KK.B....c
c..0.cc.G..c....DcZEE....ZZ....EEZcD....c..G.cc.0..c
cc....c.N..cc.0..ccZ..9G.EE.G9..Zcc..0.cc..K.c....cc
 c..Bcc.NN..C..V..cc...9.EE.9...cc..T..C..KK.ccB..c
 cccB.cc....Cc.VG..DDc...ZZ...cDD..GT.cC....cc.Bccc
  c....c..0..cc.VV...cDDccccDDc...TT.cc..0..c....c
  c..0.cB....ccc..0..c........c..0..ccc....Bc.0..c
  cc....Bc..CCccc...DD..UGGU..DD...cccCC..cB....cc
   c...i.cccCC..CCc.c..0.UU.0..c.cCC..CCccc.g...c
   cc..ii.ccc.....ccc..........ccc.....ccc.gg..cc
    cc..Gi.cc..0....cCCccccccCCc....0..cc.gG..cc
     cc..ii.cc...M.......cc.......L...cc.gg..cc
      cc<.Gi.BB..MMGM..0.CC.0..LGLL..BB.gG.<cc
       cc..ii.ccc...MM...CC...LL...ccc.gg..cc
        cc......cccc.....cc.....cccc......cc
         cc...0..c.cBBccccccccBBc.c..0...cc
          cc....BB................BB....cc
           ccc..c..0.hhhGhhGhhh.0..c..ccc
             cccc..................cccc
                ccc......<.......ccc
                  cccccccccccccccc
ENDMAP

NAME: grunt_runaround_doors_1
TAGS: grunt_runaround_doors_1 allow_dup unrand
SHUFFLE: ABCDEFGH
SHUFFLE: IJKLMNOPQRSTUVWX
SUBST: ABCDEFGIJ : +, HKLMNOPQRSTUVWX : c
CLEAR: _
MAP
            AA                BB
                II        JJ
_
_
         XX                      KK
_
_
_
_
    W                                  L
    W                                  L
_
H                                          C
H                                          C
_
_
 V                                        M
 V                                        M
_
_
_
_
_
_
_
_
 U                                        N
 U                                        N
_
_
G                                          D
G                                          D
_
    T                                  O
    T                                  O
_
_
_
_
         SS                      PP
_
_
                RR        QQ
            FF                EE
ENDMAP

NAME: grunt_runaround_doors_2
TAGS: grunt_runaround_doors_2 allow_dup unrand
SHUFFLE: ABCDEFGH
SHUFFLE: IJKLMNOPQRSTUVWX
SUBST: ABCDEFGIJ : +, HKLMNOPQRSTUVWX : c
CLEAR: _
MAP
                  AA
                  AA
_
              XX      II
_
     HH  WW                JJ  BB
     HH                        BB
_
_
     V                          K
     V                          K
_
_
_
   U                              L
   U                              L
_
_
GG                                  CC
GG                                  CC
_
_
   T                              M
   T                              M
_
_
_
     S                          N
     S                          N
_
_
     FF                        DD
     FF  RR                OO  DD
_
              QQ      PP
_
                  EE
                  EE
ENDMAP

NAME: grunt_runaround_doors_3
TAGS: grunt_runaround_doors_3 allow_dup unrand
SHUFFLE: ABCDEFGH
SHUFFLE: IJKLMNOPQRSTUVWX
SUBST: ABCDEFGIJ : +, HKLMNOPQRSTUVWX : c
CLEAR: _
MAP
       AA        BB
_
         II    JJ
      XX          KK
_
_
   W                  L
H  W                  L  C
H                        C
  V                    M
  V                    M
_
_
_
_
  U                    N
  U                    N
G                        D
G  T                  O  D
   T                  O
_
_
      SS          PP
         RR    QQ
_
       FF        EE
ENDMAP

NAME: grunt_runaround_doors_4
TAGS: grunt_runaround_doors_4 allow_dup unrand
SHUFFLE: ABCDEFGH
SHUFFLE: IJKLMNOP
SUBST:   ABCDEFGI : +, HJKLMNOP : Z
: if you.where() == dgn.level_name(dgn.br_entrance("Zot")) then
KFEAT:  Z = stone_wall
TILE:   Z = wall_zot_magenta
COLOUR: Z = lightmagenta
: else
KFEAT:  Z = metal_wall
: end
CLEAR: _
MAP
        AA
        AA
  HH          BB
  HH  PP  II  BB
_
_
   O          J
   O          J
GG              CC
GG              CC
   N          K
   N          K
_
_
  FF  MM  LL  DD
  FF          DD
        EE
        EE
ENDMAP

NAME: grunt_runaround_loot
TAGS: grunt_runaround_loot allow_dup unrand
SHUFFLE: }>de
SUBST: d = %, e = A
NSUBST: % = 4:| / 8:* / *=%
KMONS: 9 = 9 band
KMONS: 8 = 8 band
MAP
  ......
 ..9..9..
..8.%%.8..
.9.%%%%.9.
..%%}>%%..
..%%de%%..
.9.%%%%.9.
..8.%%.8..
 ..9..9..
  ......
ENDMAP

NAME: grunt_runaround_depths
TAGS: grunt_runaround_depths allow_dup unrand
SHUFFLE: O3hi
SUBST: hi = .
NSUBST: 1 = 1:2 / *=1
KFEAT: O = enter_depths
MONS: tengu warrior band w:15 / tengu conjurer band w:15 / \
      deep troll earth mage band / hell knight band / vampire knight band
MONS: ettin w:20 / stone giant w:20 / fire giant / frost giant / \
      fire dragon w:12 / ice dragon w:8 / titan
MONS: caustic shrike w:5 / very ugly thing band w:20
MAP
  ......
 ...cc...
..1....1..
..........
.c..Oh..c.
.c..i3..c.
..........
..1....1..
 ...cc...
  ......
ENDMAP

NAME: grunt_runaround_zot
TAGS: grunt_runaround_zot allow_dup unrand
COLOUR: .1defghijO = magenta
FTILE: .1defghijO = floor_hall
SHUFFLE: defg
SHUFFLE: Ohij
SUBST: hij = .
NSUBST: 1 = 1:2 / *=1
KFEAT: O = enter_zot
KMONS: d = golden dragon
KMONS: e = quicksilver dragon
KMONS: f = storm dragon
KMONS: g = shadow dragon
MONS: base draconian
MONS: nonbase draconian
MAP
  ......
 ..1..1..
..d....e..
.1......1.
....Oh....
....ij....
.1......1.
..f....g..
 ..1..1..
  ......
ENDMAP

##############################################################
NAME:   kennysheep_town
TAGS:   uniq_d_encompass
ORIENT: encompass
DEPTH:  D:8-11
WEIGHT: 5
KMONS:  op = plant
KMONS:  P = bush
KMONS:  1 = merfolk
KMONS:  2 = orc warrior / kobold brigand / two-headed ogre / troll / gnoll sergeant
KMONS:  3 = orc priest / orc wizard / centaur / gnoll shaman
KMONS:  4 = orc / hound / kobold / goblin / hobgoblin / gnoll
KMONS:  5 = yak / hog / bullfrog w:40
KMONS:  6 = wyvern w:6 / manticore w:3 / black bear w:19
KITEM:  o5 = gold / nothing w:1000
SUBST:  M = tww.!, p = pP!!!!!
NSUBST: 1 = 1:1 / *:., H = 20:H / 5:% / 160:. / * = .:25 %:1 4
NSUBST: F = 5:5 / 5 = 55o / * = o:100 R:57
NSUBST: ' = 2:6 / 3 = 66... / *:., " = 2:6 / 3 = 66... / *:.
NSUBST: ` = 3:6 / 4 = 66... / *:., - = 1:6 / 2 = 6.. / *:.
NSUBST: } = 1:] / 1:) / 1:} / * = **23..
TILE:   x = wall_pebble_brown
FTILE:  !pPt = floor_grass / floor_dirt w:1
FTILE:  5oR = floor_dirt
SUBST:  ! = .
MAP
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxx'''''''''''xxxxxxwwwwwwwxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxx''''''''''''''''''xxxxwwwwwwwxxxxxxxxxxxxxxxxxxxxx""""""""xxxxxxxxxxxxxxxx
xxxx'''''''xx'}''xxx'''''xxxxwwwwwwxxxxxxxxxxxxxxxxx"""""xxxxxx""""""""xxxxxxxxx
xxx''''xxxxxxx*'*xxxxx''''xxxwwwwwwxxxxxxxxxxxxxxxx""xx"xxxxxxxxxxxxx""""xxxxxxx
xxx!'xxxxxxxxxxxxxxxxxxx'!xxxxwwwwwxxxxxxxxxxxxx!x""xxx"""xxxxxxxxxxxxxx""xxxxxx
xtt!!xxxxxxttttttxxxxxxt!!ttttwwwwwxxxxxxttttttt!""xxxxxx!!!xxxxxxxx*xx"""xxxxxx
xtt!!tttttttttttttttttt!!tttttwwwwww!!ptttttttttp!!xxxxtttt!!xxxxxxxx""""xxxxxxx
xtt!!tttttttttttttttttt!tttttt!wwwwww!ppttttttttpp!tttttttt!ptttxxxxxxxx"""xxxxx
xttt!!tttttpppptttttttt!tppppt!wwwwwww!pttpptttttp!tttttttt!ttttxxxxxxxxxx"""xxx
xttt!!tptpppppppptttttp!pp!!!!!wwwwwwwwppppppppttp!ttttttttt!ttttxxxxxxxxxxx*xxx
xtttt!!ppppwwwppppppppp!!!!!!!!!wwwwwwww!!!!!!ppp!pttttttttt!ptttttttxxxxxxx}xxx
xtttp!!!wwwwwwwwppw!!!!!!wwwwwwwwwwwwwwwww!!!!!!!!!ptttttttt!!ptttttttxxxxxxxxxx
xtttp!!!wccmmccwwwwwwwwwwccmmccwwwwwwwwwwwwwwwwwwww!pptttttttt!pttttttttxxxxxxxx
xttpp!!!wcHHHHcRRRRwRRRRRcHHHHcwww!wwwwwwwwwwwwwwww..!ptttttttt!pttttttttpxxxxxx
xtttp!!!wmH3HHcRRRRRRRRRRcHH3Hmww!!!!wwwwwwwwwwwwwwww.!ppppptpp!!ppppppptp!!xxxx
xtttp!!!wmHHHHcRRRRRRRRRRcHHHHmww!!!!!!wwwwwwwwwwwwwwww!!!!!!!!!!!!!!!!!!!!!xxxx
xtttp!!!wcHHHHccccccccccccHHHHcw!!!!!!.!!!!!!!!wwwwwwww.FFFFFFFFFFFFFFFFFFF!!xxx
xtttp!!!wcccHHHHHHHHHHHHHHHHcccw!!!!!...!!!!!!!!!wwwwwww!!!!!!!!!!!!!!!!!!!!!xxx
xttpp!!!wRRcHcccccc++ccccccHcRRww!!!..G..!!!!!!!!wwwwwwwFFFFFFFFFFFFFFFFFFF!!!!x
xttp!!!!wRRcHc|**c2HHHHHH2cHcRRww!!cc...cc!!!!!!wwwwwwww!!!!!!!!!!!!!!!!!!!!!!!x
xttp!!!!wRRcHc***+HHHHHH3HcHcRRw!!.cc...cc.!!!!!wwwwwwwwFFFFFFFFFFFFFFFFFFF!!!!x
xttp!!!wRRRcHc|**c2HHHHHH2cHcRRw!...........!!!!wwwwwwww!!!!!!!!!!!!!!!!!!!!!!!x
xttpp!!wwRRcHccccccccccccccHcRR!..G...C...G..!!wwwwwwwwwwFFFFFFFFFFFFFFFFFF!!!!x
xtttpp!!wcccHHHHHH2HH2HHHHHHcccw!...........!!!wwwwwwwww!!!!!!!!!!!!!!!!!!!!!!!x
xttttp!!wcHHHHccccHHHHccccHHHHcw!!.cc...cc.!!!!wwwwwwwwwFFFFFFFFFFFFFFFFFFF!!!!x
xttttp!!wmHHHHcRRcHHHHcRRcHHHHmw!!!cc...cc!!!!wwwwwwwwww!!!!!!!!!!!!!!!!!!!!!!!x
xttttp!!wmH3HHcRRcc++ccRRcHH3Hmw!!!!..G..!!!!wwwwwwwwwwwFFFFFFFFFFFFccccccc!!!!x
xtttpp!!wcHHHHcRRRR..RRRRcHHHHcww!!!!...!!!!wwwwwwwwwwww!!!!!!!!!!!!cHHH}Hc!!!!x
xtttppp!wccmmccRRRw..RwRRccmmccw!!!!!...!!!wwwwwwwwwwwwwFFFFFFFFFFFFcHHHHHc!!!!x
xtttttppwwwwwwwwwww..wwwwwwwwwww!!!!!...!!wwwwwwww!!wwww.!!!!!!!!!!!c++cccc!!!!x
xttttttpp!!!www!ww!..!!!!!!!!!!!!!!!!...!wwwwccc!!!!!wwwwFFFFFFFFFFFF..!!!!!!!!x
xtttttttppppp!!!!!!..!cccc!!!!!!!!!!!...wwwwccHcc!!!!wwww!!!!!!!!!!!!..!!!!!!!tx
xttttttttttttp!!!!!..!cH}c!!!!!!!!!!!...wwwccHHHcc!!wwwww!F!F!F!F!F!F..cccc!!!tx
xttttttttttpp!!!!!!..!cHHc!!!!!!!!!!!...wwwcHH}HHc!!wwwwwwF!F!F!F!F!F..+HHc!tttx
xttttttttppp!!!!!!!..!c+cc!!!!!!cccc!...wwwccHHHcc!!wwwwwwF!F!F!F!F!F..cH}c!tttx
xtttttttp!!!!!!!!!!.....!!!!!!!!c}Hc!...wwwwccHc+.!!wwwww!F!F!F!F!F!F..cccc!tttx
xttttttp!!!cccccc.......!!!!!!!!cHHc!...wwww!ccc..!!wwwww!F!F!F!F!F!F..!!!!!tttx
xttttttp!!!cHHHH+....!!!!!cccc!!cc+c!...wwww!!!!..!!wwwww!F!F!F!F!F!F..!!!tttttx
xttttttp!!!cH}HHc!!..!!!!!cH}c!!!..!!...wwww!!!!..!!wwwww!F!F!F!F!F!F..!!ttttttx
cccctt...!!cHHHHc!!..!!!!!cHHc!!!..!!...wwww!!!!..!!wwwww!F!F!F!F!F!F..t!ttttttx
cHHct.....!cHHHHc!!.3!!!!!c+cc!!!..!!...wwww!!!!..!wwwww!!F!F!F!F!F!F..t!!tttttx
c}H+..ttp..cccccc!!.T..................................................tt!!ttttx
cccctttpp!.............................................................tt!!!tttx
 xtttttp!!!..........!!!!!!..!!!!..!!!!!wwww!!!!!!wwwwww!!!...!!!!!!!tttt!t!!ttx
 xtttttp!!!!cc+c!!!..!!!!!cc+c!!c+cc!!!!wwwww!!!!!wwwww!!!!...!!!!!!!ttt!ttt!ttx
 xttttpp!!!!cHHc!!!..!!!!!cHHc!!cHHc!!!wwwwww!!!!wwwwww!!!c+++c!!!!!!ttt!ttt!ttx
 xttttp!!!!!c}Hc!!!c+cc!!!c}Hc!!cHHc!!!wwwwww!!!wwwwww!!!cc...cc!!!!!ttt!ttt!ttx
xxxttpp!!!!!cccc!!!cHHc!!!cccc!!cH}c!!wwwwwww!!wwwwwww!!cc.....cc!!!!ttt!ttt!ttx
xxxxpp!!!!!!!!!!!!!c}Hc!!!!!!!!!cccc!!wwwwwwwwwwwwwwww!!c...{...c!!!tttt!!tt!ttx
xxxx!!!!!!!!!!!!!!!cccc!!!!!!!!!!!!!MwwwwwwwwwwwwwwwwM!!c.......c!!tttttt!t!!ttx
xxxx!!xxx!!!!!!!!!!!!!!!!!!!!!!!!!!!MwwwwwwwwwwwwwwwMM!!c..(.[..c!!tttttt!t!tttx
xxxx``xxxx!!!!!!!!!!!!!!!!!!!!!!!!!MwwwwwwwwwwwwwwwMM!!!cc.....cc!!ttttttt!ttttx
xxxxx`xxxx!!!!!!!!!!!!!!!!!!!!!!MM!MwwwwwwwwwwwwwwMM!MMM!cc...cc!!ttttttt!!!tttx
xxxxx``xxx!!x!!!!!!!M!M!!!!!!!MMMwMMwwwwwwwwwwwwwMM!MwwMM!ccccc!!ttttttt!!t!ttxx
xxxxxx`xxx``xxxMMMMMMwM!!!!!!!MwwwMMMwwwwwwwwwwwMM..MwwwM!!!!!!!!ttttttt!tt!txxx
xxxxxx`xx```xxxxwwwwwwMMMMMM!!MwwM.!MwwwwwwwwwMMM....MMMM!!!!!!!!tttttt!!tt!txxx
xxxxxx``````.xxxwwwwMMMMwwwwM!MMMM.MwwwwwwwwMMM..MMMM...!!!!!!!!!tt!!!!!ttt!txxx
xxxxxxx```xx.`xxxxxMM!.!MMwMw!!....MwwwwwwwMM..MMwwwM..MMM!MM!!!!!!!!!ttttt!txxx
xxxxxxx``xxxx``xxxx..MMM!....!wwMM.MwcccccwM.wwwwwwwM.wwww!wMM!!!!!tttttttt!!xxx
xxxxxx``xxxxxx`xxxxx.MwwMMwM!wwwwwM.ccwwwccM.MwwwwMMM.wwwM!MwMM!tttttttttxx!!xxx
xxxxxx`xxxxxxxx`xxxxx.MwwwM.....ww.ccwwwwwcc.MMMMMM..MM....MwwMMttttttttxxx!!-xx
xxxxx``xxxxxxx```xxxxx.Mww.MMMMM..Mcww*1..wcM......MMwwwwM..!wwMttttttttxxx!--xx
xxxxx`xxx`````xx`xxxxx..MM!MwwwwMM.+W.*}*.W+.M.MMwwwwwwwwMM!!!MMttttttttxxx---xx
xx```````xxxxxxx`xxxxxxxwwM.Mwwwww.cw.1*1wwcwM.MwwwwwwxxwwM!!xxxxxxxxxxxxx----xx
x````xxxxxxxxxxx``xxxxxxwwM...MwwMMccwwwwwccwMMMwxxxxxxxwwMxxxxxxxxxxxxxxx-----x
x```xxxxxxxxxxxx`````xxxxxxxxxxxxxxxccwwwccwwwxxxxxxxxxxxxxxxxxxxxxxxxxxxx---}-x
x`}`xxxxxxxxxxxxx```}`xxxxxxxxxxxxxxxcccccwwwwxxxxxxxxxxxxxxxxxxxxxxxxxxxxx----x
x*``xxxxxxxxxxxxxx```*xxxxxxxxxxxxxxxxxxxwwwwwxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
ENDMAP
