##############################################################################
# zot.des: The ultimate goal. The Orb must be placed (Z). These maps can and
#          should be serious challenges! Players dying on Zot:5 are okay :)
#
# Content: Zot entry vaults (these are on Depths:$ and contain the portal)
#          Zot vaults, mini and not so mini
#          Zot hall (on Zot:5)
#          Vaults that define the floor/wall colours for Zot:1-5
#
##############################################################################

{{
function zot_entry_setup(e)
    e.place("Depths:$")
    e.orient("float")
    e.kfeat("O = enter_zot")
    e.mons("patrolling base draconian")
    e.mons("fire dragon / ice dragon / storm dragon / \
            shadow dragon / bone dragon / golden dragon")
    e.mons("patrolling nonbase draconian")
    e.kmons("0 = ettin / tengu warrior / glowing shapeshifter w:5 / \
                 stone giant w:12 / spriggan berserker w:8 / hell knight w:5")
    e.kmons("9 = fire giant w:12 / titan w:8 / vampire knight / \
                 spriggan air mage w:8 / deep troll earth mage w:8 / \
                 tengu reaver / deep elf high priest w:12 / lich w:2")
end
}}

{{
-- Stuff for st's various vaults.
function st_zot_vaults_setup(e)
    e.tags("no_item_gen")
    e.depth("Zot, !Zot:$")
    e.kmons("D = acid dragon / fire dragon w:25 / ice dragon w:25 /\
               storm dragon w:20 / shadow dragon w:20 / golden dragon /\
               iron dragon w:5 / quicksilver dragon w:5 / bone dragon w:5 /\
               lindwurm w:2 / rime drake w:2 / death drake w:2 /\
               swamp dragon w:5")
    e.kmons("d = base draconian / nonbase draconian")
    e.kmons("Y = patrolling golden dragon")
    e.kitem("Y = |")
end
}}

{{
function callback.grunt_zot_stairs_overgrown_start(data, triggerable,
                                                   triggerer, marker, ev)
  if data.triggered == true then
    return
  end

  crawl.mpr("You have a sense of imminent foreboding.", "warning")
  dgn.persist.grunt_zot_stairs_overgrown_started = true
end

function callback.grunt_zot_stairs_overgrown_oklobify(data, triggerable,
                                                      triggerer, marker, ev)
  if triggerer.type ~= "turn" or triggerer.sub_type ~= "countdown" then
    return
  end

  if dgn.persist.grunt_zot_stairs_overgrown_started == nil then
    return
  end

  if data.count >= 10 then
    dgn.persist.grunt_zot_stairs_overgrown_started = nil
    return
  end

  local possible = {}
  local targets = dgn.find_marker_positions_by_prop("oklobify", 1)
  for _, pos in ipairs(targets) do
    local mons = dgn.mons_at(pos.x, pos.y)
    if mons ~= nil and mons.name ~= "oklob plant" then
      possible[#possible + 1] = pos
    end
  end

  if #possible == 0 then
    dgn.persist.grunt_zot_stairs_overgrown_started = nil
    return
  end

  data.count = data.count + 1

  local pos = possible[crawl.random2(#possible) + 1]
  local mons = dgn.mons_at(pos.x, pos.y)
  mons.dismiss()

  dgn.create_monster(pos.x, pos.y, "oklob plant")

  if not you.see_cell(pos.x, pos.y) then return end

  if not data.warned then
    data.warned = true
    crawl.mpr("One of the plants suddenly grows acid sacs!", "warning")
  else
    crawl.mpr("Another plant grows acid sacs!", "warning")
  end
end
}}

{{
-- Create colourful Zot glass
function coloured_glass(e)
  e.shuffle('roygbiv')
  e.kfeat('roygbiv = m')
  e.tile('r = dngn_transparent_wall_red')
  e.tile('o = dngn_transparent_wall_brown')
  e.tile('y = dngn_transparent_wall_yellow')
  e.tile('g = dngn_transparent_wall_green')
  e.tile('b = dngn_transparent_wall_blue')
  e.tile('i = dngn_transparent_wall')
  e.tile('v = dngn_transparent_wall_magenta')
  e.colour('r = red')
  e.colour('o = brown')
  e.colour('y = yellow')
  e.colour('g = green')
  e.colour('b = blue')
  e.colour('i = cyan')
  e.colour('v = magenta')
end
}}

##############################################################################
##############################################################################
#
# Zot entries (D side)
#
##############################################################################
##############################################################################

###########################
# Something to give the builder a chance if massive vaults keep failing.
# NOTE: Not currently used: larger entries are placed as primary vaults instead.
#
NAME:   zot_entry_small
TAGS:   zot_entry
KFEAT:  O = enter_zot
COLOUR: c = lightmagenta
COLOUR: .+ = magenta
TILE:   c = wall_zot_magenta
FTILE:  .O+ = floor_hall
MAP
xxxxxxxxx
xxxcccxxx
xxcc.ccxx
xcc...ccx
xc..O..+@
xcc...ccx
xxcc.ccxx
xxxcccxxx
xxxxxxxxx
ENDMAP

NAME:   evilmike_zot_entry_round
TAGS:   no_monster_gen zot_entry
SUBST:  = = nnn+
SUBST:  c: c:70 v:20 b:10
SUBST:  v: vcxlmb, n: nnnnvbcx
FTILE:  O.4G : floor_marble
SUBST:  4 = 122223
: zot_entry_setup(_G)
MAP
xxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxcccccccxxxxxxx
xxxcccccc..0..ccccccxx
xxcc......vvv......ccx
xxc.v......1......v.cx
xxc.2v...nn=nn...v..cx
xxc...nnnn...nnnn...cx
xxc...n....G....n..1cx
xcc...n.G..4..G.n...cc
xc.3.nn....v....nn...c
xc.v.n....v.v....n.v.+
xc.v.+.G.v.O.v.G.=.v.+
xc.v.n....v.v....n.v.+
xc.3.nn....v....nn...c
xcc...n.G..4..G.n...cc
xxc...n....G....n..1cx
xxc...nnnn...nnnn...cx
xxc.2v...nn=nn...v..cx
xxc.v......1......v.cx
xxcc......vvv......ccx
xxxcccccc..0..ccccccxx
xxxxxxxxcccccccxxxxxxx
xxxxxxxxxxxxxxxxxxxxxx
ENDMAP

# Sorry, no wand of wishing in this one
NAME:   evilmike_zot_entry_castle
TAGS:   no_monster_gen zot_entry layout_city
NSUBST: O = 1:O / *:A
SUBST:  ^ = ^..
SUBST:  s = ccc+
KFEAT:  ^ = alarm trap
FTILE:  "OADx = floor_marble
COLOUR: " = magenta
TILE:   x = wall_zot_magenta
COLOUR: x = magenta
FTILE:  .+cm^01234$ = floor_hall
SUBST:  D = +, "' = .
NSUBST: 3 = 1:9 / *:3
: zot_entry_setup(_G)
MONS:   base draconian ; glaive | halberd
MAP
'''''''''''''''''''''''''''''''''''''''''
'wwwwwwwww'''''''''''''''''''''wwwwwwwww'
'wcccccccwwwwwwwwwwwwwwwwwwwwwwwcccccccw'
'wc3....cccccmccccccmccccccmccccc....3cw'
'wc.""".+....2.............2....+.""".cw'
'wc."O".cccccccccccc+cccccccccccc."O".cw'
'wc.""".s..1.....=4w.w4=......0.s.""".cw'
'wc.....c.....cccccc.cccccc.""".c.....cw'
'wccccccc0....+...."""1...+."x".ccc+cccw'
'wwwwwwccccccccc.""""""".ccc""".c$$$.ccw'
''''''wm.......c.""""""".c4=..1.s$$$2mww'
''''''wc.x1x1x2c"""xxx"""cwcccccccccccw''
''''''WD"""""""D"""xxx"""+.+^^^^^^^^^+w''
''''''wc.x1x1x2c"""xxx"""cwcccccccccccw''
''''''wm.......c.""""""".c4=..1.s$$$2mww'
'wwwwwwccccccccc.""""""".ccc""".c$$$.ccw'
'wccccccc0....+...."""1...+."x".ccc+cccw'
'wc.....c.....cccccc.cccccc.""".c.....cw'
'wc.""".s..1.....=4w.w4=......0.s.""".cw'
'wc."O".cccccccccccc+cccccccccccc."O".cw'
'wc.""".+....2.............2....+.""".cw'
'wc3....cccccmccccccmccccccmccccc....3cw'
'wcccccccwwwwwwwwwwwwwwwwwwwwwwwcccccccw'
'wwwwwwwww'''''''''''''''''''''wwwwwwwww'
'''''''''''''''''''''''''''''''''''''''''
ENDMAP

NAME:   evilmike_zot_entry_gauntlet
TAGS:   no_monster_gen zot_entry
PLACE:  Depths:$
ORIENT: float
WEIGHT: 8
SUBST:  b: v.., v: c.
TILE:   X = wall_zot_magenta
FTILE:  -OD = floor_hall
COLOUR: -D = magenta
COLOUR: X = lightmagenta
KPROP:  O-X = no_tele_into
SUBST:  X = x
SUBST:  - = ., D = +
KFEAT:  O = enter_zot
# easy: 1, 2
: if crawl.coinflip() then
MONS:   pale draconian, steam dragon
: else
MONS:   grey draconian, wyvern
: end
# medium: 3, 4
: if crawl.coinflip() then
MONS:   yellow draconian, acid dragon
: else
MONS:   green draconian, swamp dragon
: end
# hard: 5, 6
: if crawl.coinflip() then
MONS:   red draconian, fire dragon
: else
MONS:   white draconian, ice dragon
: end
# harder: 7, 8
: if crawl.coinflip() then
MONS:   black draconian
KMONS:  8 = storm dragon
: else
MONS:   purple draconian
KMONS:  8 = quicksilver dragon
: end
# boss: 9, 0
KMONS:  9 = nonbase draconian
KMONS:  0 = golden dragon
MAP
ccc+ccccccccccccccccccc
cvb.bvcccvb.bvccccccccc
cb...bcccb.9.bccccccccc
c.1.1.ccc.0...+.ccccccc
cb222bcccb.9.bc..cccccc
cvb.bvcccvb.bvcc..ccccc
ccc+ccccccc+ccccc..cccc
ccc.ccccccc.cccccc..ccc
ccc+ccccccXDXcccccc+ccc
cvb.bvcccXX-XXcccvb.bvc
cb...bccXX---XXccb.8.bc
c.3.3.ccX--O--Xcc.7.7.c
cb444bccXX---XXccb...bc
cvb.bvcccXX-XXcccvb.bvc
ccc+ccccccXXXcccccc+ccc
ccc..ccccccccccccc..ccc
cccc..ccccccccccc..cccc
ccccc..ccvb.bvcc..ccccc
cccccc..cb.56bc..cccccc
ccccccc.+.....+.ccccccc
cccccccccb.56bccccccccc
cccccccccvb.bvccccccccc
ccccccccccccccccccccccc
ENDMAP

NAME:   evilmike_zot_entry_argh
TAGS:   no_monster_gen zot_entry patrolling transparent
# Grey dracs can escape from the islands if they have water. This is intentional.
SUBST:  G: GXm., m: mmlw
KMASK:  4 = opaque
KFEAT:  m = iron_grate
SUBST:  x: Xccv
NSUBST: 2 = 2:2 / *:-
TILE:   X = wall_zot_magenta
COLOUR: X = lightmagenta
SUBST:  X = x
COLOUR: . = white
FTILE:  -12O = floor_hall
SUBST:  - = .
KMONS:  O = nonbase draconian
: zot_entry_setup(_G)
MONS:   draconian stormcaller
MAP
xxxxxxxxxxxx@xxxxxxxxxxxx
xxx........---........xxx
xxmmm.....G.-.G.....mmmxx
x.m4m.......-.......m4m.x
x.mmm...G...-...G...mmm.x
x..........---..........x
x.....G....---....G.....x
x..........---..........x
x...G.....-----.....G...x
x........XX---XX........x
x.G.....-X1---1X-.....G.x
x-...------2-2------...-x
@-----------O-----------@
x-...------2-2------...-x
x.G.....-X1---1X-.....G.x
x........XX---XX........x
x...G.....-----.....G...x
x..........---..........x
x.....G....---....G.....x
x..........---..........x
x.mmm...G...-...G...mmm.x
x.m4m.......-.......m4m.x
xxmmm.....G.-.G.....mmmxx
xxx........---........xxx
xxxxxxxxxxxx@xxxxxxxxxxxx
ENDMAP

NAME:   evilmike_zot_entry_hall
TAGS:   no_monster_gen zot_entry patrolling
TILE:   X = wall_zot_magenta
COLOUR: X+- = magenta
SUBST:  X = c
FTILE:  -O+ = floor_hall
KPROP:  O- = no_tele_into
SUBST:  - = .
SUBST:  v: ....cnXblw, z:..cnXblw
NSUBST: d = 1:0 / 4:1 / 2:2 / *:.
SUBST:  D = +
: zot_entry_setup(_G)
MAP
                   cccccccccccc
                   cc..3....ccc
cccccccccccccccccccc.........cc
ccccccdccdccdccdccc..2XXXXX...c
ccc..............dc..XX---XX..c
D...vv.zz.vv.zz..cc..X-----X..c
D...vv.zz.vv.zz..+...X--O--+..c
D...vv.zz.vv.zz..cc..X-----X..c
ccc..............dc..XX---XX..c
ccccccdccdccdccdccc..2XXXXX...c
cccccccccccccccccccc.........cc
                  ccc..3....ccc
                  ccccccccccccc
ENDMAP

NAME:   evilmike_zot_entry_basic
TAGS:   no_monster_gen zot_entry transparent
TILE:   c = wall_zot_magenta
COLOUR: c+- = magenta
FTILE:  O-+c = floor_hall
KPROP:  O- = no_tele_into
SUBST:  - = .
NSUBST: d = 1:0 / 4:1 / 2:2 / 1:3
: zot_entry_setup(_G)
MAP
....d....
.dcc+ccd.
.cc---cc.
.c-----c.
dc--O--cd
.c-----c.
.cc---cc.
.dcccccd.
....d....
ENDMAP

NAME:   evilmike_zot_entry_diamond
TAGS:   no_monster_gen zot_entry transparent
KFEAT:  A = stone_arch
TILE:   c = wall_zot_magenta
COLOUR: c- = magenta
FTILE:  -O+Ac = floor_hall
KPROP:  -OcA = no_tele_into
SUBST:  - = .
NSUBST: 1 = 1:0 / *:1
NSUBST: 2 = 2:2 / *:.
NSUBST: 3 = 2:3 / *:2
: zot_entry_setup(_G)
MAP
      ..3..
     .2c+c2.
    ..cc-cc..
   1.cc---cc.1
  ..cc--O--cc..
 ..cccc---cccc..
.2cc-ccc-ccc-cc2.
.cc---ccccc---cc.
3+--A--ccc--A--+3
.cc---ccccc---cc.
.2cc-ccc-ccc-cc2.
 ..cccc---cccc..
  ..cc--A--cc..
   1.cc---cc.1
    ..cc-cc..
     .2c+c2.
      ..3..
ENDMAP

NAME:   grunt_zot_entry_hairpin
TAGS:   no_monster_gen zot_entry patrolling
COLOUR: ABC-_ = magenta
FTILE:  ABC-_O = floor_hall
SUBST:  _ = ., A = 2, B = 3, C = c, - = +
NSUBST: 3 = 1:993 / *:3
: zot_entry_setup(_G)
MAP
      cccccccccccccccccccc
    ccc..................cc
   cc...........0.........cc
  cc.....cccccccccccccc....c
  c.....cc...........ccc...c
 cc..1.cc1.CCCCCCCCC..c.1..c
@+....cc..CC_____A_CC.c...cc
@+..3.c.3.-____B__O_C0+2.cc
@+....cc..CC_____A_CC.c...cc
 cc..1.cc1.CCCCCCCCC..c.1..c
  c.....cc...........ccc...c
  cc.....cccccccccccccc....c
   cc...........0.........cc
    ccc..................cc
      cccccccccccccccccccc
ENDMAP

NAME:   grunt_zot_entry_funnels
TAGS:   no_monster_gen zot_entry patrolling transparent
COLOUR: 123c+. = magenta
FTILE:  123c+.O = floor_hall
NSUBST: 3 = 1:9 / *:3, 1 = 2:0 / *:1
: zot_entry_setup(_G)
MAP
      @       @
    cc+cc   cc+cc
    c...ccccc...c
    cc...ccc...cc
 cccxcc.1.c.1.ccxccc
 c.ccxcc.....ccxcc.c
@+..ccxcc.3.ccxcc..+@
 c...ccxcc+ccxcc...c
 cc.1.ccc...ccc.1.cc
  cc...c..2..c...cc
  ccc.3+.2O2.+3.ccc
  cc...c..2..c...cc
 cc.1.ccc...ccc.1.cc
 c...ccxcc+ccxcc...c
@+..ccxcc.3.ccxcc..+@
 c.ccxcc.....ccxcc.c
 cccxcc.1.c.1.ccxccc
    cc...ccc...cc
    c...ccccc...c
    cc+cc   cc+cc
      @       @
ENDMAP

NAME:   grunt_zot_entry_pinwheel
TAGS:   no_monster_gen zot_entry patrolling transparent
KFEAT:  A = stone_arch
COLOUR: 123c+. = magenta
FTILE:  123c+.AO = floor_hall
NSUBST: A = 1:O / *:A, 1 = 2:0 / *:1, 3 = 1:9 / *:3
: zot_entry_setup(_G)
MAP
       @
     cc+cc
    cc...c
   cc...cc ccccc
   c...cc cc.1.cc
   c1.1c cc.3...cc
   c.3.ccc.2.1...c
   cc.2.cc..ccc..+@
    cc..AcAcc cc.c
 ccc ccccccccc ccc
 c.cc ccAcA..cc
@+..ccc..cc.2.cc
 c...1.2.ccc.3.c
 cc...3.cc c1.1c
  cc.1.cc cc...c
   ccccc cc...cc
         c...cc
         cc+cc
           @
ENDMAP

NAME:   grunt_zot_entry_bicorn
TAGS:   no_monster_gen zot_entry transparent patrolling
COLOUR: 0123c+_ = magenta
FTILE:  0123+_OT = floor_hall
SUBST:  _ = .
NSUBST: 3 = 1:9 / *:3
: zot_entry_setup(_G)
MAP
            .....
          ...ccc...
         ..ccc_ccc..
        ..cc_____cc..
       ..cc_2_O_2_cc..
      ..cc___2_2___cc..
     ..cc___________cc..
    ..cc_____________cc..
    .cc____3__T__3____cc.
   ..c______1___1______c..
  ..cc_0_____________0_cc..
 ..cc_3___ccccccccc___3_cc..
..cc_1__ccc.......ccc__1_cc..
.cc___ccc...     ...ccc___cc.
.c__ccc...         ...ccc__c.
.c+cc...             ...cc+c.
..@...                 ...@..
ENDMAP

NAME:   grunt_zot_entry_tricorne
TAGS:   no_monster_gen zot_entry transparent patrolling
COLOUR: ABC_ = magenta
FTILE:  ABC-_O = floor_hall
SUBST:  _ = ., A = 2, B = 110, C = c, - = +
NSUBST: 3 = 1:9 / *:3
: zot_entry_setup(_G)
MAP
@......               ......@
.+cccc.................cccc+.
.c...ccccccccccccccccccc...c.
.cc...........c...........cc.
..cc...1....CCCCC....0...cc..
 ..c.0T...CCC___CCC...T1.c..
  .cc...3.C___A___C.3...cc.
  ..cc...C-_B___B_-C...cc..
   ..cc..C_________C..cc..
    ..c..C____O____C.cc..
     .cc.C_________C.cc.
     ..ccCC_A___A_CCcc..
      ..ccC___B___Ccc..
       .ccCCC___CCCcc.
       ..c..CC-CC..c..
        .cc.......cc.
        ..c...3...c..
         .cc..T..cc.
         ..c.1.0.c..
          .cc...cc.
          ..c...c..
           .c...c.
           .cc.cc.
           ..c.c..
            .c+c.
            ..@..
ENDMAP

NAME:   grunt_zot_entry_gee_three
TAGS:   no_monster_gen zot_entry transparent patrolling
COLOUR: ABC_ = magenta
FTILE:  ABC-_O = floor_hall
SUBST:  _ = ., A = 2, B = 1, C = c, - = +
NSUBST: 1 = 3:0 / 7:1 / *:., 3 = 1:9 / *:3
: zot_entry_setup(_G)
MAP
           .........
         ...ccccccc...
        ..ccc.CCC.ccc..
       ..cc...-_-...cc..
      ..cc...cC_Cc...cc..
     ..cc.1.cCC_CCc.1.cc..
     .cc....cC___Cc....cc.
    ..c..3.ccC___Ccc.3..c..
    .cc1...ccC___Ccc...1cc.
   ..c.....ccC___Ccc.....c..
.....c..T1.ccC_B_Ccc.1T..c.....
.ccccc.....ccC___Ccc.....ccccc.
@+..c......ccCA_ACcc......c..+@
.ccc....1..ccC___Ccc..1....ccc.
...ccc..T..ccC_O_Ccc..T..ccc...
.cccc.......cCC_CCc.......cccc.
@+......2...ccCCCcc...2......+@
.ccc.......1..c.c..1.......ccc.
...ccccc..T..1.3.1..T..ccccc...
  ....cc.......T.......cc....
  ..ccc..1..cc.1.cc..1..ccc..
 ..cc......ccc...ccc......cc..
 .cc...ccccc.c...c.ccccc...cc.
 @+.cccc.....c...c.....cccc.+@
 .ccc....   .c.1.c.   ....ccc.
 .....      .c...c.      .....
            .c...c.
            .cc.cc.
            ..c.c..
             .c.c.
             .c+c.
             ..@..
ENDMAP

NAME:   grunt_zot_entry_alcove
TAGS:   no_monster_gen zot_entry transparent patrolling
COLOUR: 29C-_ = magenta
FTILE:  29C-_O = floor_hall
SUBST:  _ = ., C = c
NSUBST: @ = 1:@ / *:.
: zot_entry_setup(_G)
MAP
     ccccccc
    ccCCCCCcc
    cCC_9_CCc
    cC_____Cc
    cC2_O_2Cc
    cC__2__Cc
    cCC___CCc
   cc.......cc
  cc..3...3..cc
 cc.1...0...1.cc
cc...1.....1...cc
.................
@.......T.......@
 ....1.....1....
   ....0.0....
       .@.
ENDMAP

##############################################################################
##############################################################################
#
# Zot petite vaults
#
##############################################################################
##############################################################################

# There's few vaults on Zot:5, tone down their chances.
NAME: dummy_balancer_zot
DEPTH: Zot:$
TAGS: dummy
ORIENT: float
WEIGHT: 60
MAP
x
ENDMAP

NAME:   lemuel_baited_zot_trap
TAGS:   allow_dup extra luniq
DEPTH:  Zot
WEIGHT: 20
KFEAT:  * = zot trap
KITEM:  * = any good_item
MAP
*
ENDMAP

###########################
# Halls of Wrath
#
NAME:   lemuel_halls_of_wrath
DEPTH:  Zot, !Zot:$
ORIENT: float
NSUBST: 1 = 6:2 / *=1
SUBST:  1 = 1 .:5
SUBST:  1 = 1 3
MONS:   troll / deep troll / iron troll / ogre / two-headed ogre
MONS:   moth of wrath
MONS:   stone giant / fire giant / frost giant / ettin / \
        w:5 efreet / w:3 titan
SUBST:  } = }:80 >, ) = ):80 >
MAP
cccccccccccccccccccccccc
c111111111111111111.n..c
c111111111111111111.n.)c
ccnnccccccccccccc++cc..c
c....G....G....G....c..c
+...................+..c
+...................+.}c
+...................+..c
c....G....G....G....c..c
ccnnccccccccccccc++cc..c
c111111111111111111.n.]c
c111111111111111111.n..c
cccccccccccccccccccccccc
ENDMAP

###########################
# Lich library
#
NAME:   lemuel_lich_library
DEPTH:  Zot, !Zot:$
TAGS:   no_monster_gen
MONS:   flying skull, lich, ancient lich / dread lich, necromancer
MONS:   vampire mage
ITEM:   any book mimic:10 w:20 / any scroll mimic:10
SUBST:  w:w?
SUBST:  ?=. 1:1
SUBST:  x:xc
SUBST:  4 = 4 5:2 .:4
MAP
wwwwwwwwwwwwwwwwwwwwwww
wwwwwwwwwwwwwwwwwwwwwww
wwxxxxxxxxx+xxxxxxxxxww
wwx....x.......x....xww
wwx....+...G...+....xww
wwx.4..x.......x..4.xww
wwx4.4.xxxx+xxxx.4.4xww
wwx.4.4xxx...xxx4.4.xww
wwx4.4.xxx.2.xxx.4.4xww
wwxxxxxxxxx+xxxxxxx+xww
wwxxxxxxxxx.xxxxxx$$xww
wwxdddxxxxx.x...xx$$xww
wwx.2.xxxxx.+.G.xxxxxww
wwx...xxxxx.x...xxxxxww
wwx...xxxxx.xxxxxxxxxww
wwxx+xxxxxx.xxxdddddxww
wwxx.xxxxxx.xxxd232dxww
wwxx.xxxxxx.xxxd...dxww
wwxx......+...+....dxww
wwxxxxxxxxxmxxxd...dxww
wwxxxxxxxxxGxxxdddddxww
wwxxxxxxxxxxxxxxxxxxxww
wwwwwwwwwwwwwwwwwwwwwww
wwwwwwwwwwwwwwwwwwwwwww
ENDMAP

###########################
# Lake of fire
#
NAME:  lemuel_lake_of_fire
DEPTH: Zot
SUBST: * =*l
KMONS: * = orb of fire
KFEAT: * = l
SUBST: .=.l
MAP
 ..ll..
..llll..
.llllll.
.ll**ll.
.ll**ll.
.llllll.
..llll..
 ..ll..
ENDMAP

###########################
# Globe of electric golems
#
NAME:  lemuel_golem_globe
DEPTH: Zot
TAGS:  no_rotate no_exits
KFEAT: ^ = permanent teleport trap / dispersal trap
KFEAT: m = iron_grate
SUBST: 1 = 1.
MONS:  electric golem
MAP
  mmmm
 mm..mm
mm.11.mm
m.1^^1.m
mm.11.mm
 mm..mm
  mmmm
ENDMAP

###################################################################
# Draconian Sentry Boxes
# There is an 70% chance all three downstairs will be here.
#
NAME:   lemuel_draconian_sentries
DEPTH:  Zot, !Zot:$
ORIENT: float
TAGS:   no_rotate uniq_draconian_sentries
MONS:   red draconian scorcher / green draconian stormcaller / yellow draconian stormcaller
SUBST:  } = }:80 >, ) = ):80 > , ] = ]:80 >
SUBST:  w:w., w=Ww
KFEAT:  m = iron_grate
MAP
............................
..mmm..................mmm..
..m1m..................m1m..
..mmm...mmmwwwwwwmmm...mmm..
........m1mwwwwwwm1m........
........mmmwwwwwwmmm........
mmm.....www...}..www.....mmm
m1m.....www..)...www.....m1m
mmm.....www...]..www.....mmm
........mmmwwwwwwmmm........
........m1mwwwwwwm1m........
..mmm...mmmwwwwwwmmm...mmm..
..m1m..................m1m..
..mmm..................mmm..
............................
ENDMAP

NAME:   lemuel_draconian_sentries_small
DEPTH:  Zot, !Zot:$
ORIENT: float
TAGS:   no_rotate uniq_draconian_sentries
MONS:   red draconian scorcher / green draconian stormcaller / yellow draconian stormcaller
SUBST:  } = }:80 >, ) = ):80 > , ] = ]:80 >
SUBST:  w:w., w=Ww
KFEAT:  m = iron_grate
MAP
................
................
..mmmwwwwwwmmm..
..m1mwwwwwwm1m..
..mmmwwwwwwmmm..
..www...}..www..
..www..)...www..
..www...]..www..
..mmmwwwwwwmmm..
..m1mwwwwwwm1m..
..mmmwwwwwwmmm..
................
................
ENDMAP

###########################
# Acid trip
# 70% chance of having all stairs.
NAME:   lemuel_acid_trip
DEPTH:  Zot, !Zot:$
ORIENT: centre
MONS:   oklob plant, acid blob, jelly, yellow draconian
MONS:   any nonbase yellow draconian
SUBST:  1 = 1:2 .
SUBST:  . = .:20 3:3 2:1
SUBST:  } = }:80 >, ) = ):80 >, ] = ]:80 >
MAP
       xx++xx
     xxx....xxx
   xxx..4444..xxx
  xx....4554....xx
 xx.....cccc.....xx
 x....ccc..ccc....x
xx...cc......cc...xx
x...cc..1111..cc...x
x...c...1}11...c...x
x.5.c...11]1...c.5.x
x...c...1)11...c...x
x...cc..1111..cc...x
xx...cc......cc...xx
 x....cc....cc....x
 xx....c....c....xx
  xx............xx
   xxx..4444..xxx
     xxx4554xxx
       xxxxxx
ENDMAP

###########################
# Firehouse
#
NAME:   lemuel_firehouse
DEPTH:  Zot, !Zot:$
ORIENT: centre
MONS:   orb of fire
MONS:   fire elemental
MONS:   red draconian
MONS:   any nonbase red draconian
MONS:   efreet
SUBST:  1=122, 3=322
SUBST:  4 = 2:20 4:5 3:15 .:20
MAP
          lllll
       lllllllllll
     lllll.....lllll
    llll....x....llll
   llll....xxx....llll
   llll...xx}xx...llll
  llll...xx]2)xx...llll
  llll..xx2...2xx..llll
 llll..xx...5...xx..llll
 llll..x...2.2...x..llll
llll...x.2xx+xx2.x...llll
llll...x.xx444xx.x...llll
llll...x.x44444x.x...llll
 llll..x.x44F44x.x..llll
 llll..x.x44444x.x..llll
  llll.x.xx444xx.x.llll
  llll.x.1x...x1.x.llll
   llllxxxx+++xxxxllll
    llll333...333llll
     lllll.....lllll
       lllll.lllll
          ll@ll
ENDMAP

######################################
# Circus (by mu)
# full of klowns, caged animals outside
NAME:   circus_mu
DEPTH:  Zot, !Zot:$
ORIENT: float
TAGS:   no_rotate no_hmirror no_monster_gen
MONS:   killer klown
MONS:   elephant / w:5 dire elephant / w:2 hellephant
MONS:   human ; club
SUBST:  1 = 1 2:5 3:20
SUBST:  2 = 2 2 .
SUBST:  % = !:10 .:20
KITEM:  ! = club / nothing
COLOUR: " : yellow
MAP
     ................
    .....xxxxx.............
   .....xx...xx.............
  .....xx..%..xx.....mmmmm...
 .....xx..%.%..xx....m222m....
.....xx.%..1..%.xx...m+mmm.....
....xx...%.%.%...xx............
...xx..%1"""""1%..xx....mmmmm..
..xx..%.""..."".%..xx...m222m..
.xx..%%.".....".%%..xx..m+mmm..
.x.%1..1"..1.."1..1%.x.........
.xx..%%.".....".%%..xx..3......
..xx..%.""..."".%..xx..........
...xx..%1"""""1%..xx...mmmmm...
....xx...%.%.%...xx....m222m...
.....xx.%..1..%.xx.....m+mmm..
 .....xx...%...xx............
  .....xx.%.%.xx............
   .....xx+++xx.....
    .....xx+xx.....
     .............
ENDMAP

######################################
# This is weird, but in Zot weirdness fits. (nrook)
NAME: nrook_zot_tub
DEPTH: Zot
KFEAT: X = W
MARKER: X = lua:fog_machine { cloud_type="steam", \
            pow_min = 2, pow_max = 10, delay = 25, \
            size = 2, walk_dist = 3, spread_rate= 10 }
KMONS: M = patrolling red draconian att:neutral / \
      patrolling red draconian scorcher att:neutral w:2 / \
      patrolling red draconian stormcaller att:neutral w:2 / \
      patrolling red draconian shifter att:neutral w:2 / \
      patrolling red draconian annihilator att:neutral w:2 / \
      patrolling red draconian knight att:neutral w:2 / \
      patrolling red draconian monk att:neutral w:2
KFEAT: M = W
KMONS: F = orb of fire att:neutral
KFEAT: F = W
MAP
     @
xxxxx+xxxxx
xWWWWWWWWWx
xWMWWMWWMWx
xWWXWXWXWWx
xWWWmmmWWWx
xWMXmFmXMWx
xWWWmmmWWWx
xWWXWXWXWWx
xWMWWMWWMWx
xWWWWWWWWWx
xxxxxxxxxxx
ENDMAP

###################################################
# Minmay's Elemental castle
# 50% electricity, 25% fire, 25% ice
NAME:    minmay_elemental_castle
ORIENT:  southwest
DEPTH:   Zot, !Zot:$
TAGS:    no_rotate
: if crawl.coinflip() then
MONS:    titan, storm dragon, electric golem
SUBST:   F = 3
ITEM:    lightning rod, book of lightning, staff of air, book of storms
: elseif crawl.coinflip() then
MONS:    frost giant, ice dragon
KMONS:   F = shard shrike
MARKER:  F = lua:fog_machine { cloud_type = "freezing vapour", \
              pow_min = 5, pow_max = 15, delay = 10, size = 2, \
              walk_dist = 0, spread_rate= 0 }
ITEM:    wand of iceblast, staff of cold, book of winter, \
         ozocubu's autobiography
SUBST:   w = l
SUBST:   W = l..
: else
MONS:    fire giant, fire dragon
KMONS:   F = balrug
MARKER:  F = lua:fog_machine { cloud_type = "flame", pow_min = 5, \
              pow_max = 15, delay = 10, size = 2, walk_dist = 0, \
              spread_rate= 0 }
ITEM:    book of the dragon, staff of fire, book of fire, book of annihilations
: end
SUBST:   1 = 112.
SUBST:   2 = 221.
SHUFFLE: defg
MAP
xx...................@@...................
xx.WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW.
xx.WwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwW.
xx.WwcccccccwwwwwwwwwwwwwwwwwwwwcccccccwW.
xx.Wwcd*%.1cwwwwwwwwwwwwwwwwwwwwc1.%*gcwW.
xx.Wwc*%...cwwwwwwwwwwwwwwwwwwwwc...%*cwW.
xx.Wwc%....ccccccccc++++ccccccccc....%cwW.
xx.Wwc................................cwW.
xx.Wwc1........2............2........1cwW.
xx.Wwcccc..........................ccccwW.
xx.Wwwwwc...cccccccccccccccccccc...cwwwwW.
xx.Wwwwwc...cccccccccccccccccccc...cwwwwW.
xx.Wwwwwc...cccccccccccccccccccc...cwwwwW.
xx.Wwwwwc.2.ccc*|*cccccccc*|*ccc.2.cwwwwW.
xx.Wwwwwc...ccc...cccccccc...ccc...cwwwwW.
xx.Wwwwwc...ccc...cccccccc...ccc...cwwwwW.
xx.Wwwwwc...ccc.F.cccccccc.F.ccc...cwwwwW.
xx.Wwwwwc...ccc...cccccccc...ccc...cwwwwW.
xx.Wwwwwc...ccc...cccccccc...ccc...cwwwwW.
xx.Wwwwwc..........................cwwwwW.
xx.Wwwwwc..........................cwwwwW.
xx.Wwwwwc...ccc..............ccc...cwwwwW.
xx.Wwwwwc...ccc....2....2....ccc...cwwwwW.
xx.Wwwwwc...ccc..............ccc...cwwwwW.
xx.Wwwwwc...ccc..............ccc...cwwwwW.
xx.Wwwwwc...ccc..............ccc...cwwwwW.
xx.Wwwwwc.2.ccc1............1ccc.2.cwwwwW.
xx.Wwwwwc...ccccccccc..ccccccccc...cwwwwW.
xx.Wwwwwc...ccccccccc..ccccccccc...cwwwwW.
xx.Wwwwwc...ccccccccc..ccccccccc...cwwwwW.
xx.Wwcccc..........................ccccwW.
xx.Wwc1........2............2........1cwW.
xx.Wwc................................cwW.
xx.Wwc%....cccccccccccccccccccccc....%cwW.
xx.Wwc*%...cwwwwwwwwwwwwwwwwwwwwc...%*cwW.
xx.Wwce*%.1cwwwwwwwwwwwwwwwwwwwwc1.%*fcwW.
xx.WwcccccccwwwwwwwwwwwwwwwwwwwwcccccccwW.
xx.WwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwW.
xx.WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW.
xx........................................
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
ENDMAP

###################################################
# Based on zotdef III. Idea from kilobyte.
NAME:   evilmike_crystal_ball_defense
TAGS:   no_rotate no_monster_gen
DEPTH:  Zot, !Zot:$
ORIENT: float
WEIGHT: 5
MONS:   oklob plant w:4 / lightning spire w:3
MONS:   obsidian statue / orange crystal statue / curse skull
# Not quite the orb, but but close enough
ITEM:   tin of tremorstones
NSUBST: 1 = 1:1 / 6 = 11. / *:., 3 = 1:1 / 4 = 11....... / *:.
SUBST:  } = }:80 >, ) = ):80 >, ] = ]:80 >
MAP
        xxxxxxxxx
        xxx.2.xxx
        xxx...xxx
        xx..1..xx
xxxxxxxxx1.....1xxxxxxxxx
xxxxxxx.....).....xxxxxxx
xxx.....1..}d]..1.....xxx
xx...xx.....>.....xx...xx
@x..xxxxx1.....1xxxxx..x@
.x.3xxxxxx..1..xxxxxx3.x.
.x..xxxxxxx...xxxxxxx..x.
.x..xxxxxxx...xxxxxxx..x.
.x..xxxxxxxx.xxxxxxxx..x.
.x..xxxxxxxx2xxxxxxxx..x.
.x..xxxxxxxx.xxxxxxxx..x.
.xx3.................3xx.
...x.................x...
...x......3.3.3......x...
xxxxxxxxxxxxxxxxxxxxxxxxx
ENDMAP

################################################################################
# A highlight reel of Xom's many altar vault gimmicks.
NAME:    hangedman_xom_zot_hilarity
TAGS:    no_monster_gen no_trap_gen no_pool_fixup patrolling transparent
DEPTH:   Zot, !Zot:$
WEIGHT:  3
# Gifts, too.
KMONS:   1 = guardian mummy ; randart dire flail ego:chaos | \
             randart great mace ego:chaos | randart battleaxe ego:chaos| \
             randart great sword ego:chaos | randart glaive ego:chaos | \
             randart scythe ego:chaos | randart dire flail | \
             randart great mace | randart battleaxe | randart great sword | \
             randart glaive | randart scythe
KMONS:   3 = guardian mummy ; randart fustibalus ego:chaos . sling bullet / \
             guardian mummy ; randart longbow ego:chaos . arrow / \
             guardian mummy ; randart triple crossbow . bolt / \
             guardian mummy ; randart fustibalus . sling bullet / \
             guardian mummy ; randart longbow . arrow / \
             guardian mummy ; randart arbalest . bolt
KMONS:   5 = guardian mummy ; wand of acid | scroll of summoning
KMONS:   7 = guardian mummy ; randart ring mail | randart scale mail | \
             randart chain mail | randart robe . scroll of summoning
KMONS:   2468 = killer klown
KMONS:   _ = ghost moth
KMONS:   90 = moth of wrath / butterfly w:30
KFEAT:   0 = zot trap
KFEAT:   ^~ = teleport trap / dispersal trap
KFEAT:   _ = altar_xom
KFEAT:   > = } mimic
KFEAT:   m = iron_grate
SUBST:   d = tGmcc, y = c`, c = cccccbbvvx, l = wl
NSUBST:  > = 1 = }:80 > / 1 = ):80 > / 1 = ]:80 > / >, 9 = 0 / 9
NSUBST:  ^ = ' / ^, ~ = " / ~, ` = 2=f / .
SHUFFLE: 12 / 34 / 56 / 78, 56, 78, ^' / ~"
MARKER:  f = lua:fog_machine { cloud_type = "seething chaos", pow_max = 17, \
             delay_min = 450, delay_max = 700, size = 1, excl_rad = 0 }
FTILE:   f = floor_pebble_lightmagenta
MAP
        ccccccc
     cccc2.1.2cccc
  @@ccyycm+m+mcyycc@@
  @..cl`yl```ly`lc..@
  c.c.```````````.c.c
 ccc.l````.c.````l.ccc
 cyl``c..`.>.`..c``lyc
 cy```.>.`d..`d>.```yc
cccy``.d.^~~^`...``yccc
c3ml`````m==mm^````lm6c
c.+``...^m999=~d..``+.c
c4m``c>.~=9_9=~.>c``m5c
c.+``..d~=999m^...``+.c
c3ml````^mm==m`````lm6c
cccy``...`^~~^.d.``yccc
 cy```.>d`..d`.>.```yc
 cyl``c..`.>.`..c``lyc
 ccc.l````.c.````l.ccc
  c.c.```````````.c.c
  @..cl`yl```ly`lc..@
  @@ccyycm+m+mcyycc@@
     cccc8.7.8cccc
        ccccccc
ENDMAP

################################################################################
# Space-filling minivaults by bh.

NAME:   bh_zot_ikea_curve
TAGS:   extra transparent
DEPTH:  Zot
MAP
xxxxxxxxxxxxx
@.....x.....@
@.....x.....@
xxxx..x..xxxx
x.....x.....x
x.....x.....x
x..xxxxxxx..x
x..x.....x..x
x..x.....x..x
x.....x.....x
x.....x.....x
xxxxxxxxxxxxx
ENDMAP

NAME:   bh_zot_lava_cross
TAGS:   extra
DEPTH:  Zot
MAP
     @@
    x..x
    x..x
    x..x
 xxxxllxxxx
@...l..l...@
@...l..l...@
 xxxxllxxxx
    x..x
    x..x
    x..x
     @@
ENDMAP

NAME:   bh_zot_levy_curve
TAGS:   extra
DEPTH:  Zot
SUBST:  W = Ww
MAP
          WWW.
          W.W..
          W.WWW
          ....W
         .....W
        ....WWW
       .......W
      ..www...W
     ...w.w.WWW
    ....wwwWW..
WWW.......W...
W........WW..
WWW..W..WW..
..W..W..W..
 .WWWWWWW.
ENDMAP

#################
# Dragon hoards.
#
# These range from small, essentially just flavour vaults,
# to large vaults with many dragons.
NAME:   st_single_dragon_hoard_1
TAGS:   extra
: st_zot_vaults_setup(_G)
MAP
 xxxxx
xx$x$xx
xx**xxx
x$xY*$x
xx$*$xx
 xx@xx
ENDMAP

NAME:   st_single_dragon_hoard_2
TAGS:   extra
: st_zot_vaults_setup(_G)
MAP
xxxxx
xx*Yx
x.$*x
x.xxx
x..xx
xx@xx
ENDMAP

NAME:   st_single_dragon_hoard_3
TAGS:   extra
: st_zot_vaults_setup(_G)
MAP
xxxxxxxx
xxxx$*xx
xx.$$Y*x
x...$*$x
xx.xx$xx
x...xxxx
xxx..xxx
xxxx@xxx
ENDMAP

NAME:   st_single_dragon_hoard_4
TAGS:   extra
: st_zot_vaults_setup(_G)
MAP
xxxxxxxxx
@.xxx**xx
xx..x$Y*x
x.xx.$$xx
xxx.xx$xx
xxxxxxxxx
ENDMAP

NAME:   st_small_dragon_hoard_1
TAGS:   extra
KITEM:  D = $
: st_zot_vaults_setup(_G)
MAP
xxxxxxxx
xxx*$xDx
xx*Y*x$x
xxx*$$xx
xD$$$x.x
xx$...xx
x.x....x
xx....xx
xxx..xxx
xxx@xxxx
ENDMAP

NAME:   st_small_dragon_hoard_2
TAGS:   extra
KITEM:  D = $
: st_zot_vaults_setup(_G)
MAP
xxxxxxxxxx
xxx$$$xxxx
xx$x*$$xxx
x*$*Y*xDxx
xD$x*$$$*x
xxx$$$$xxx
xxxx@xxxxx
ENDMAP

NAME:   st_small_dragon_hoard_3
TAGS:   extra
KITEM:  D = $
: st_zot_vaults_setup(_G)
MAP
xxxxxxxxxxxxxxxx
xxD$$xxD..xxx$xx
xx$x$$xx.x.x$x*x
x$*Y*$...xx.$$Yx
xx$*x$xx...xx$*x
xxxDxxx..xxxD$xx
xxxxxxx@x.xxxxxx
ENDMAP

NAME:   st_small_dragon_hoard_4
TAGS:   extra
KITEM:  D = $
: st_zot_vaults_setup(_G)
MAP
xxx@x.xxxxxxxxxxxx
xx.x.xxxxxxxxx.$xx
xxx..xxxxxxx..x$Dx
xxxx...xxx..xx$**x
xDxxxx....xxxDxYxx
x**x$x.x.x..xxxx*x
xxY$..xxxxx..xxxxx
xD*$xxxxxxxx...xxx
xxxxxxxxxxxx.xx@xx
ENDMAP

NAME:   st_small_dragon_hoard_5
TAGS:   extra
KITEM:  D = $
: st_zot_vaults_setup(_G)
MAP
xx..xxxxxxxxxxxxxx
x.xxxxxxxD*lxD*xxx
@x.xxxxx$xl$$l$**x
xx...xxx*$lllllYxx
..xx..xxx$.llll*Dx
xxxxx.xxxxx.llllxx
xxxxx...xx..lxllxx
xxxxxxx....xxlxxxx
xxxxxxxxxxxxxxxxxx
ENDMAP

NAME:   st_large_dragon_hoard_1
SUBST:  D = DD$
KITEM:  D = $
: st_zot_vaults_setup(_G)
MAP
xxxxxxx@xxxxxxxx
xxxx.x...lxxlxxx
xxx|x.llllxl.xxx
xxD$llxlllllx..x
xDxllxl|DDll....
x.lllD|Y*Dlllx.x
.xlxllD*Dlll$$xx
xx.llxllllxx*Dxx
xxx...xll.$Dxxxx
xxxxxx...xxxxxxx
xxxxxxx@xxxxxxxx
ENDMAP

NAME:   st_large_dragon_hoard_2
SUBST:  D = D$
KITEM:  D = $
: st_zot_vaults_setup(_G)
MAP
xxxxxxxxxxxxxxxxxxxxxxx
xxxxD$$Dxxxxxxxxxxxxxxx
xxxY*xx$$D$$xxxx...xxxx
xxx|$$|D$x*$$.x..x...xx
xxD$x|Y|D$Y*$...xxx.$$x
xxx$$D*$x$|$xx..xxx*$xx
xx$D$|$D$*xxxx.xxD|Y*xx
xxx$xY*$*Dxxx..xx$x|xDx
xxxxx|$D$xxx....xxD$Dxx
xxxxxxxxxxx..xx.xxxxxxx
xxxxxxxxxx..xxx...xxxxx
xxxxxxxx..x@xxxx.x..xxx
ENDMAP

NAME:   st_large_dragon_hoard_3
SUBST:  D = DDD$
KITEM:  D = $
: st_zot_vaults_setup(_G)
MAP
x.xx@xxxxxx.xxxxxxxxxxx
.xx...xxxxxx.xxxxxxxxxx
...xx..x......xxx....xx
xxxxxxx...xxxx....xx..x
xD$*xx..xxxx...xxxx$$xx
xxD$xxxx.x..xxxxxx$*$xx
xDx$$.x...x...xxxD*Y*Dx
xxxxxx..xxxxx..xxx$|$xx
xxxlx.x.lxlxxx.xxxx$$*x
xxlxll.lllxlxx..xxxDxDx
xxllxl$$Dlllxxx..xxx*xx
xxxlllxD*Dlxlxxx..xxxxx
xxlllDD|Y*llxxxxxx.xxxx
xxxxlx*D|Dxlllxxx....x.
xlllllD|Dlllxlxxx.xxx..
xxlxllllxllllllxxx.x.xx
xxxllxxlllxxlxxxxx..xxx
xxxxxxxxxxxxxxxx@.xxxxx
ENDMAP

# draconians are a bit more organised with their hoards.
NAME:   st_large_dragon_hoard_4
SUBST:  D = DDD$
KITEM:  D = $
KMONS:  1 = nonbase draconian band
: st_zot_vaults_setup(_G)
MAP
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
x$$$$xxxx.......xxxxxxxxxxxxxxxx
x$$$$xx......1....x*$*xxxx...xxx
xxx+xx..x.........+$|$xxx.....xx
xxx....xxxx......xx*$*xxx.xx...x
xx..xxxxxxxxxx..xxxxxxxx.xxx..xx
xxx..xxxD*Dxxxx...xxxxx..xxxx..x
xDxx.xx$*Y*$Dxxxx..x....xxxx..xx
xD$x.xxD$|D$$*xxxx...xxxxxxx..xx
xxx..xxx*$$$$$xxxxxxx$Dxxxx..xxx
xx.xxxxxxD$.1..x|*|xD|Dxx...xxxx
xxx..xxxxxx....+*|*xxDxx.x.xxxxx
xxxx.....x....xx|*|xxxx.x.xxxxxx
xxxxxx......xxxxxxxxx..x...xxxxx
xxxxxxxxxxxxxxxxxxxx.xxx@xx.xxxx
ENDMAP

# A mighty hoard indeed...
# Intended to be an extreme visual spectacle.
# Obviously lowering the amount of gold in stacks is necessary.
# There's about 800 gold.
NAME:   st_grand_hoard_of_tiamat
TAGS:   no_monster_gen
KMONS:  1 = patrolling Tiamat, patrolling golden dragon
SUBST:  D = DDD$
KITEM:  D = $
KITEM:  $ = gold q:1
: st_zot_vaults_setup(_G)
MAP
xxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxx*x$$x$x$$xxxxxxxxx
xxxxx*xxD*$xxD$$$xD$x$xxxxx
xxx$xD$x$$$$$$x$*$$$$x$$xxx
xx$$x$$$*xx$$$$*Yx$$$$$xxxx
xx$x*$x*Y*$D$$$$*$$xD$x$*xx
xxxxD$x$*$$$D|DD$$$x$$$$Dxx
xx$$x$$$$$DD*|*$DD$$$x$$xx.
xxx$$$$D$$$||1||$$$$$$$$$..
xx$x$x$$$$$D*|*$D$D$x$$$x.@
xxxD*$$x$*$D$|DD$$x*$$$xxx.
xx*xx$$$xY*xxD$$$$*Y*xxD$xx
xxx$$$x$$*$$$$Dx$xx*$x$$xxx
xxxxx$$xDxx$$x$$x$$x$$xxxxx
xxxxxxxxx$$x$$xx*Dxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxx
ENDMAP

#########################
# Minivaults based on the old orb chambers.
#
NAME:    zot_minivault_1
TAGS:    transparent
WEIGHT:  20
DEPTH:   Zot, !Zot:$
MAP
 xxxxxxxxxxx
xxx...0...xxx
xx..0...0..xx
x0.........0x
@..0..0..0..@
x0.........0x
xx..0...0..xx
xxx...0...xxx
 xxxxxxxxxxx
ENDMAP

# Based on orb_monky_inset
NAME:    zot_minivault_2
TAGS:    transparent
WEIGHT:  5
DEPTH:   Zot, !Zot:$
SUBST:   > = }]}
MAP
 xxxxxxxxxxx
xxx0.....0xxx
xx....0....xx
x0...xxx...0x
@...xxxxx...@
x0...xxx...0x
xx....0....xx
xxx0.....0xxx
 xxxxx.xxxxx
xx...0.0...xx
x...........x
x.....>.....x
xx.........xx
 xxxxxxxxxxx
ENDMAP

# Based on orb_two_ways
NAME:    zot_minivault_3
TAGS:    transparent
WEIGHT:  5
DEPTH:   Zot, !Zot:$
SUBST:   < = ([{000
MAP
 xxxxxxxxxxx
xxxx.....xxxx
xx....x...xxx
xx.<.xxx..xxx
xx...xx..xxxx
xxxxxx..xxxxx
xxxx.....xxxx
xxx..0x0..xxx
x0...xxx...0x
@..0xxxxx0..@
x0...xxx...0x
xxx..0x0..xxx
xxxx.....xxxx
xxxxx..xxxxxx
xxxx..xx...xx
xxx..xxx.<.xx
xxx...x....xx
xxxx.....xxxx
 xxxxxxxxxxx
ENDMAP

# Based on orb_monky_within_orb
NAME:    zot_minivault_4
TAGS:    transparent
DEPTH:   Zot, !Zot:$
COLOUR:  n = magenta
TILE:    n = dngn_transparent_stone_magenta
MAP
 xxxxxxxxxxx
xxx0.....0xxx
xx..nn0nn..xx
x..n0...0n..x
@..n.0.0.n..@
x..n0...0n..x
xx..nn0nn..xx
xxx0.....0xxx
 xxxxxxxxxxx
ENDMAP

# Based on orb_monky_twist
NAME:    zot_minivault_5
TAGS:    transparent
DEPTH:   Zot, !Zot:$
COLOUR:  n = magenta
TILE:    n = dngn_transparent_stone_magenta
MAP
 xxxxxxxxxxx
xxxnn...0.xxx
xxnn0.0.n..xx
xnnn....nn.0x
@.nn0.0.0nn.@
x0.nn....nnnx
xx..n.0.0nnxx
xxx.0...nnxxx
 xxxxxxxxxxx
ENDMAP

# Based on orb_nicolae_swirls
# Guarantees an upstairs and downstairs, and makes sure the player can see
# them both from one side.
# Stone is bordered by rock to make it stand out less and not look ugly.
NAME:    zot_minivault_6
TAGS:    transparent
DEPTH:   Zot, !Zot:$
SUBST:   < = ([{
SUBST:   > = }]}
COLOUR:  n = magenta
TILE:    n = dngn_transparent_stone_magenta
MAP
 xxxxxxxxxxxxx
xxcccccccccccxx
xccxxxxxxxxxccx
xcxx.......xxcx
xcx0...>...0xcx
xcx.........xcx
xcxx0.....0xxcx
xcxxxxx...xxxxx
xcxxxx..0nnn.
xxxx...0nnn0@
  ...0nnn....
  @0nnn0...xxxx
  .nnn...xxxxcx
xxxxx0..xxxxxcx
xcxx.......xxcx
xcx.........xcx
xcx0...<...0xcx
xcxx.......xxcx
xccxxxxxxxxxccx
xxcccccccccccxx
 xxxxxxxxxxxxx
ENDMAP

# Based on orb_nicolae_fourfold
NAME:    zot_minivault_7
TAGS:    transparent
WEIGHT:  5
DEPTH:   Zot, !Zot:$
SUBST:   > = }]}
MAP
 xxxxxxxxx
xx...0...xx
x0.0...0.0x
x..xx.xx..x
x..x...x..x
x..x.0.x..x
x..x...x..x
x..xx.xx..x
x.xx...xx.x
x.x.0.0.x.x
@.x0.>.0x.@
x.x.0.0.x.x
x.xx...xx.x
x..xx.xx..x
x..x...x..x
x..x.0.x..x
x..x...x..x
x..xx.xx..x
x0.0...0.0x
xx...0...xx
 xxxxxxxxx
ENDMAP

# Based on orb_grunt_hallway
NAME:    zot_minivault_8
TAGS:    transparent
WEIGHT:  5
DEPTH:   Zot, !Zot:$
SUBST:   > = }]}
MAP
 xxxxxxxxx
xxxx...xxxx
xxx0...0xxx
xxx..>..xxx
xxx0...0xxx
xxxx...xxxx
xxxx0.0xxxx
x00x...x00x
x..x...x..x
@..x0.0x..@
x..x...x..x
x..x...x..x
x..x0.0x..x
x.0x...x0.x
x.0x...x0.x
x..x0.0x..x
x..x...x..x
x.........x
xx.......xx
 xxxxxxxxx
ENDMAP

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

NAME: nicolae_zot_draconian_monastery
DEPTH: Zot, !Zot:$
ORIENT: float
TAGS: no_trap_gen no_monster_gen no_item_gen
MONS: draconian monk / base draconian w:15, patrolling draconian stormcaller, patrolling draconian knight
MONS: patrolling draconian scorcher
SHUFFLE: ]}), rybgmq, DZF
MARKER: + = lua:restrict_door()
# The choice of altar might matter more once monster gods are better implemented.
# Till then, it's just a style thing.
KFEAT: _ = altar_xom / altar_lugonu / altar_zin / altar_the_shining_one / \
           altar_makhleb / altar_qazlal / altar_yredelemnul
SUBST: 1 = 1.
# What kind of holy books would draconians have?
KITEM: D = book of the Dragon
KITEM: Z = randbook numspells:4 spells:ignition&fireball&animate_dead&airstrike title:the_Zealot
KITEM: F = randbook numspells:4 spells:starburst&fireball&sticky_flame&conjure_flame title:Fire_and_Brimstone
KITEM: _ = manual of invocations
COLOUR: r = red, y = yellow, b = blue, g = green, m = magenta, q = cyan, c = magenta
TILE: r = dngn_transparent_stone_red, y = dngn_transparent_stone_yellow, \
      b = dngn_transparent_stone_blue, m = dngn_transparent_stone_magenta, \
      g = dngn_transparent_stone_green, q = dngn_transparent_stone
KFEAT: rybgmq = n
MAP
           @.......................@
ccccccccccccqqcrrcyycbbcggcmmcqqcrrccccccccccc
cG............G..G..G..G..G..G..G..ccc.ccc.ccc
c...ccccc..T.......................cc...c...ccl
c]2.cccDccccc..1..1..1..1..1..1..1.c..1...1..cl
c...cc...cc........................cc.......ccll
cG..+..2....c.cc.cc.cc.cc.cc.cc.cc.cT........clll
cccccc...cccc.cc.cc.cc.cc.cc.cc.cc.ccc.......clllll
ccccTc...cccc......................ccc..1..1.c....l
@qc......1.........................+.........+..3.@
@mF.4.._......1..1..1..1..1..1..1..+.........+.T..@
@qc......1.........................+.........+..3.@
ccccTc...cccc......................ccc..1..1.c....l
cccccc...cccc.cc.cc.cc.cc.cc.cc.cc.ccc.......clllll
cG..+..2....c.cc.cc.cc.cc.cc.cc.cc.cT........clll
c...cc...cc........................cc.......ccll
c}2.cccZccccc..1..1..1..1..1..1..1.c..1...1..cl
c...ccccc..T.......................cc...c...ccl
cG............G..G..G..G..G..G..G..ccc.ccc.ccc
ccccccccccccqqcrrcyycbbcggcmmcqqcrrccccccccccc
           @.......................@
ENDMAP

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

NAME:    hangedman_zot_spectrum
TAGS:    no_monster_gen
DEPTH:   Zot, !Zot:$
KMONS:   A = red very ugly thing
KMONS:   B = red draconian
KMONS:   C = balrug / nonbase red draconian w:6
KMONS:   D = cyan very ugly thing
KMONS:   E = black draconian
KMONS:   F = electric golem / nonbase black draconian w:6
KMONS:   G = green very ugly thing
KMONS:   H = green draconian
KMONS:   I = green death / nonbase green draconian w:6
KMONS:   J = white very ugly thing
KMONS:   K = white draconian
KMONS:   L = shard shrike / nonbase white draconian w:6
KMONS:   M = brown very ugly thing
KMONS:   N = yellow draconian
KMONS:   O = acid blob / nonbase yellow draconian w:6
KMONS:   Z = golden dragon / killer klown / Tiamat, golden dragon / killer klown
KITEM:   BEHKN = $ w:15 / % w:25 / *
KITEM:   z = any good_item
KITEM:   Z = superb_item
# Rotates out loot, upstairs, downstairs,
# both (in an enclosed bubble), or nothing, at either end.
SHUFFLE: defg{>Z' / defg{<'' / fgde>{'Z / fgde<{'' / defg'|Z' / fgde|''Z / \
         fgfg''() / fgfg'')( / dede'''' / dede'''' / dede''''
SHUFFLE: ABC / DEF / GHI / JKL / MNO
SUBST:   d = @, e = ., f = x, g = c, c : ccb, Z = z Z:6, {' = .
NSUBST:  < = 1:{ / 1:[, > = 1:} / 1:]
MAP
 ddddxxxx
ddeeeecxxxxxxxx
dee{..cxxxccccx
de{'c+cccccBBcx
de.cc.......Acxxx
xe.+.......Accccx
xccc..Cc+ccccEEcx
xxxc..cc......Dcxxx
xxxc..+......Dccccx
 xxc..c..Fc+cccHHcx
 xcc..c..cc.....Gcxxx
 xcB.Ac..+.....Gccccx
 xcBAcc..c..Ic+ccKKcx
 xccccE.Dc..cc....Jcx
 xxxxcEDcc..+....Jccx
    xccccH.Gc..Lc+cgx
    xxxxcHGcc..cc.>gf
       xccccK.J+.Z.gf
       xxxxcKJcc>.ggf
          xccccggggff
          xxxxxxffff
ENDMAP

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

NAME:    hangedman_zot_vaults_quadrants
TAGS:    no_monster_gen no_item_gen transparent
DEPTH:   Zot, !Zot:$
ORIENT:  centre
# Humanoids, guardian beasts, the strongest; first V, then Zot.
MONS:    ettin / stone giant w:5 / fire giant / frost giant
MONS:    base draconian w:18 / guardian mummy w:1
MONS:    glowing shapeshifter w:20 / sphinx w:15 / quicksilver dragon w:20 / \
         iron dragon w:20 / shadow dragon / golden dragon
MONS:    fire dragon / ice dragon / storm dragon w:8 / moth of wrath w:12 / \
         ghost moth w:5 / tentacled monstrosity w:5 / bone dragon w:5
MONS:    titan / lich / deep elf annihilator w:3 / deep elf high priest w:4 / \
         deep elf sorcerer w:3 / glowing orange brain w:3 / war gargoyle w:3
MONS:    nonbase draconian w:20 / killer klown / orb of fire w:5 / \
         curse toe w:5 / ancient lich / dread lich / electric golem / death cob
SHUFFLE: EF
SUBST:   E : .
SHUFFLE: ABCDF, GH / GH / GH / HG
NSUBST:  1 = 3:1 / 3:2 / 1:112 / 1:122, 0 = 3:1 / 3:2 / 1:112 / 1:122
NSUBST:  3 = 3:3 / 3:4 / 1:334 / 1:344, 6 = 3:5 / 3:6 / 1:556 / 1:566
SUBST:   % = $%, * = %:3 *:1, | = %:60 *:25 |:15, 1 = 1:3 .:2
SUBST:   2 = 2:2 .:1, 3 = 3:4 .:1, 4 = 4:6 .:1, 5 = 5:6 .:1, 6 = 6:5 .:1
SUBST:   A : v:4 .:1, B : v:7 .:3, C : v:1 .:4, DFH = .
SUBST:   G : v:9 .:1, - : +., + : +:5 .:1, { : {:2 }:3 .:2
NSUBST:  { = 1:{ / 1:( / 1:[ / 1:<, } = 1:} / 1:) / 1:] / 1:>
SUBST:   ( = (:14 >:1 <:1 ):2, [ = [:14 >:1 <:1 ]:2, ) = ):70 >(, ] = ]:70 >[
MAP
       xx@@vvvvv@@xx
      xx..vvvvvvv..xx
      x..vvv6v6vvv..x
     xx.vvv.*v*.vvv.xx
    xx..vv3*|-|*3vv..xx
   xx..Gvvvv+v+vvvvG..xx
 xxx..H.vv0$%-%$0vv.H..xxx
xx...G...vv4$v$4vv...G...xx
x..vvvv...vv.v.vv...vvvv..x
@.vvvvvv..1v...v1..vvvvvv.@
@vvv3v0vv1...A...1vv0v3vvv@
vvv.*v$4vv.BC{DB.vv4$v*.vvv
vv6*|+%$...DEFEC...$%+|*6vv
vvvv-v-vv.A{F<F{A.vv-v-vvvv
vv6*|+%$...CEFED...$%+|*6vv
vvv.*v$4vv.BD{CB.vv4$v*.vvv
@vvv3v0vv1...A...1vv0v3vvv@
@.vvvvvv..1v...v1..vvvvvv.@
x..vvvv...vv.v.vv...vvvv..x
xx...G...vv4$v$4vv...G...xx
 xxx..H.vv0$%-%$0vv.H..xxx
   xx..Gvvvv+v+vvvvG..xx
    xx..vv3*|-|*3vv..xx
     xx.vvv.*v*.vvv.xx
      x..vvv6v6vvv..x
      xx..vvvvvvv..xx
       xx@@vvvvv@@xx
ENDMAP

####
# Revenge of the oklobs!!!
NAME:   grunt_zot_stairs_overgrown
DEPTH:  Zot, !Zot:$
ORIENT: float
MONS:   oklob plant, plant, bush, fungus
SUBST:  2 = 23
SUBST:  . = .:30 2 3 4
SUBST:  : = .
{{
local sm = TriggerableFunction:new {
  func="callback.grunt_zot_stairs_overgrown_start", triggered=false }
sm:add_triggerer(DgnTriggerer:new { type = "player_los" })
lua_marker('1', sm)

local tm = TriggerableFunction:new {
  func="callback.grunt_zot_stairs_overgrown_oklobify",
  repeated=true,
  data={warned = false, count = 0} }
tm:add_triggerer(DgnTriggerer:new { type="turn", delay_min=30, delay_max=100 })
lua_marker('}', tm)
}}
MARKER: 2 = lua:props_marker { oklobify=1 }
SHUFFLE: }])
SUBST: ] = ]>, ) = )>
MAP
      xxxxxxxxx
    xxxcccccccxxx
  xxxccc.....cccxxx
  xccc.........cccx
 xxc....:.:......cxx
 xcc...:.:.:.....ccx
xxc...:.222:2.....cx
xcc....:2:::2.....ccx
xc....:.2:222......cx
xc.....:2:}:2......cx
xc....:.2:1:2......cx
xc.....:2]:)2......cx
xc....:.22222......cx
xcc....:..........ccx
xxc.....:.........cxx
 xcc.....:.......ccx
 xxc......:......cxx
  xccc....:....cccx
  xxxccc:::::cccxxx
    xxccc+++cccxx
     xxxx@@@xxxx
ENDMAP

NAME:    hangedman_zot_gyre
TAGS:    extra transparent
DEPTH:   Zot
WEIGHT:  8
KITEM:   % = % no_pickup
KFEAT:   Z = zot trap
SHUFFLE: dD, eE, fF, gG, hH, dD / eE / fF / gG / hH
SHUFFLE: cCbB / cCbB / bBcC, qQ / qQ / ZZ / wl / '' / ''
SUBST:   defhH = X, DEF = ., g : X.., G : X.., ' = .
SUBST:   B = bbCc, C : bWcc, b : bbc, c : bWcc, X : bcxx, W : wl
NSUBST:  0 = 2 = 0:19 .:1 / *:.
KPROP:   l = no_cloud_gen
KMASK:   lw = no_monster_gen
COLOUR:  qQ = darkgray
FTILE:   qQ = floor_rough_darkgray
MARKER:  q = lua:fog_machine {cloud_type = "freezing vapour", \
             pow_min = 9, pow_max = 10, delay = 20, size_min = 1, size_max = 1, \
             start_clouds = 1, excl_rad = 0 }
MARKER:  Q = lua:fog_machine {cloud_type = "flame", \
             pow_min = 9, pow_max = 10, delay = 20, size_min = 1, size_max = 1, \
             start_clouds = 1, excl_rad = 0 }
:  if you.depth() == dgn.br_depth(you.branch()) then
SUBST:  { = {([<
:  else
SUBST:  { = {([<})]>%
:  end
MAP
           ......
         ..........
        ..xxxxxxx...
        ........hx...
      ....B......hx....
     .............x.....
    ..G.C.G.C.....ffxxx..
    ..x...x.......x......
   ...x...x...B...x...c....
  ....F...E.......x.........
 ...xxFxxxExxD..Q.eexxx.b.x.
 ..xH.......0xD...x.......x..
..xH......q...x..0x...c...x..
..x...........x..xd.......x..
..x.....b..dxx{xxd..b.....x..
..x.......dx..x...........x..
..x...c...x0..x...q......Hx..
..x.......x...Dx0.......Hx..
 .x.b.gxxee.Q..DxxExxxFxx...
 .........x.......E...F....
  ....c...x...B...x...x...
    ......x.......x...x..
    ..gxxff.....C.G.C.G..
     .....x.............
      ....xh......B....
        ...xh........
         ...xxxxxxx..
          ..........
            ......
ENDMAP

####
# Madness, frenzy, and lunacy, eh?
# bh's curves made me think of some weird yet orderly decorum for Zot.
NAME:    hangedman_zot_decor_unnerving_road
TAGS:    extra transparent no_pool_fixup
DEPTH:   Zot
WEIGHT:  8
SHUFFLE: @&, (), vb / vb / vb / bv / cc, lw / lw / lw / '', JK / LM / NO
SHUFFLE: JK / JK / JK / !!, LM / ??, NO / `` / `` / `` / ``, JKLMNO / JKLMNO / KJMLON
SUBST:   '!?`& = ., X : xxc, JLN = F, KMO = f
SUBST:   ( = (:1 .:14, ) = ):1 .:14
KMASK:   wlfF = no_monster_gen
COLOUR:  fF = darkgray
FTILE:   fF = floor_rough_darkgray
MARKER:  f = lua:fog_machine {cloud_type = "freezing vapour", \
             pow_min = 9, pow_max = 10, delay = 20, size_min = 1, size_max = 1, \
             start_clouds = 1, excl_rad = 0 }
MARKER:  F = lua:fog_machine {cloud_type = "flame", \
             pow_min = 9, pow_max = 10, delay = 20, size_min = 1, size_max = 1, \
             start_clouds = 1, excl_rad = 0 }
KPROP:   l = no_cloud_gen
MAP
      XXXX...&&.
      Xllvv......
    XXXlv..v....@
   XXlllv..v....@
   Xllvv.vvJ.....
 XXXlv..v.......
XXlllv..v....XXXX
Xllvv(vvL..ObbwwX
Xlv..v.....b..bwXXX
Xlv..v.....b..bwwwXX
Xllvv.vv....bb.bbwwX
XXlllv..v.....b..bwX
 XXXlv..v.....b..bwX
   XllvvN..Mbb)bbwwX
   XXXX....b..bwwwXX
    .......b..bwXXX
   .....Kbb.bbwwX
   @....b..bwwwXX
   @....b..bwXXX
   ......bbwwX
    .&&...XXXX
ENDMAP

NAME:    hangedman_zot_decor_checkerboard
TAGS:    extra transparent
DEPTH:   Zot
WEIGHT:  8
KFEAT:   Z = zot trap
SHUFFLE: @' / '@ / "" / "", defg / jkhi / HIJK / NOLM
SUBST:   d : wbb, e : wwb, g : lvv, f : llv
SUBST:   h : lvv, i : llv, j : wbb, k : wwb
SUBST:   H : wwwwb, I : wwwwb, J : llllv, K : llllv
SUBST:   L : lvvvv, M : lvvvv, N : wbbbb, O : wbbbb
SHUFFLE: bv / bv / bv / vb / xx / cc
NSUBST:  Z = 1 = (:1 Z:14 / 1 = ):1 Z:14 / Z
SUBST:   Z = ZZUG..., '" = .
KPROP:   l = no_cloud_gen
KMASK:   wl = no_monster_gen
MAP
.......     ...'...
.dw.lf.     .Hw.lJ.
.we.gl.     .wI.Kl.
@..Z...........Z.........
.lg.ew.hl.wj.lK.Iw.Ll.wN.
.fl.wd.li.kw.Jl.wH.lM.Ow.
.........Z...........Z..@
      .wk.il.     .wO.Ml.
      .jw.lh.     .Nw.lL.
      ...'...     .......
ENDMAP

NAME:    hangedman_zot_decor_slant
TAGS:    extra transparent
DEPTH:   Zot
WEIGHT:  8
KFEAT:   zZ = zot trap
KFEAT:   fF = floor
SHUFFLE: BVfF / VBFf, BV / BV / BV / wl, bv / bv / cc
SHUFFLE: aAuU / aAuU / aAuU / uUaA
SHUFFLE: AU / "", fF / fF / zz / '' / '', @! / !@ / ?? / ??
SUBST:   aAB = b, uUV = v, Z = ()G .:45 Z:25, '"!? = .
KMASK:   wlfF = no_monster_gen
COLOUR:  fF = darkgray
FTILE:   fF = floor_rough_darkgray
MARKER:  f = lua:fog_machine {cloud_type = "freezing vapour", \
             pow_min = 9, pow_max = 10, delay = 2, size_min = 1, size_max = 1, \
             start_clouds = 1, excl_rad = 0 }
MARKER:  F = lua:fog_machine {cloud_type = "flame", \
             pow_min = 9, pow_max = 10, delay = 2, size_min = 1, size_max = 1, \
             start_clouds = 1, excl_rad = 0 }
MAP
            ...!..
           ........
           ..UuuU..
         ....uuuu.!
         @vv.uuuu..
         .vv.uuuU..
      ......F......
      .vv.VV.vv...
      .vv.VV.vv.
   .@....Z....@.
   .bb.BB.bb.
 ...bb.BB.bb.
......f......
..Aaaa.bb.
..aaaa.bb@
!.aaaa....
..AaaA..
........
 ..!...
ENDMAP

NAME:    hangedman_zot_decor_scrapings
TAGS:    transparent extra
DEPTH:   Zot
KFEAT:   Z = zot trap
SHUFFLE: HIJKLM / HIJKLM / IHKJML
SUBST:   HJL : xxcb, I : x..., K : x..., M : x...
SUBST:   N : xcG.., O : xc..., P : xcG.., Z = ()G .:45 Z:25
MAP
           ..   ...
          .......x..
         ..x......x..
        ....x..O......
    ................x..
   ..J...P...L...N.I.H.
  ..x.x.....x.x.....x..
 ....K...M.Z.M...K....
..x.....x.x.....x.x...
.H.I.N...L...P...J...
..x.................
 ......O...x....
  ..x.......x..
   ..x........
    ...    ..
ENDMAP

NAME:    hangedman_zot_decor_tridents
TAGS:    transparent extra
DEPTH:   Zot
KFEAT:   Z = zot trap
SHUFFLE: vb / xy / XY
SUBST:   = = ()+Z .:60, - : ++., _ : +.., H : z., I : z., J : z.
SUBST:   K : zzwl...., L : zzzwl.., M : zzwl...
SUBST:   N : zzzwl.., O : zzwl..., P : zzwl.., XyYz = x
KMASK:   wl = no_monster_gen
MAP
         xxx.....
         xxx.......
         x...Iv.vv.
    .....x...v.....
  .....K.-.O...N..@
.........x...v.....
.bb.bJ..Pxv_vHv.vv.
.....b...x...v.....
@..L...M.=.M...L..@
.....b...y...v.....
.bb.bHb_byP..Jv.vv.
.....b...y.........
@..N...O.-.K.....
.....b...y.....
.bb.bI...y
.......yyy
  .....yyy
ENDMAP

####
# A bit of sporting fun...
NAME: grunt_zot_stairs_faceoff
DEPTH: Zot, !Zot:$
ORIENT: float
# The competitors:
{{
  local teams = { "black", "yellow", "green", "purple", "red", "white", }

  local team1num = crawl.random2(#teams) + 1
  local team1 = teams[team1num]

  -- ensures we can't roll the same team twice
  teams[team1num] = teams[#teams]

  local team2 = teams[crawl.random2(#teams - 1) + 1]

  mons(team1 .. " draconian")
  mons(team1 .. " draconian knight")
  mons(team2 .. " draconian")
  mons(team2 .. " draconian knight")
}}
# The refs:
MONS:   Killer Klown
# The ball / puck / whatever:
ITEM:   tin of tremorstones

KFEAT:  K = iron_grate
NSUBST: @ = 2:@ / *:x
SUBST:  } = }:80 >, ] = ]:80 >, ) = ):80 >
MAP
  xxxxxxxxxxxxxxxxxxxxxxx
 xx.....................xx
xx..mmmmmm.mmmmm.mmmmmm..xx
x..mm........5........mm..x
@.mm...................mm.@
x.m.KK.....1...3.....KK.m.x
x.m.K}..1.........3...K.m.x
x.m.K.1....2.d.4....3)K.m.x
x.m.K]..1.........3...K.m.x
x.m.KK.....1...3.....KK.m.x
@.mm...................mm.@
x..mm........5........mm..x
xx..mmmmmm.mmmmm.mmmmmm..xx
 xx.....................xx
  xxxxxxxxxxxxxxxxxxxxxxx
ENDMAP

####
# A microcosm of everything Zot: draconians, dragons, weird enemies,
# and fractal vault patterns.
NAME:   grunt_zot_stairs_mandelzot
TAGS:   no_monster_gen
DEPTH:  Zot, !Zot:$
ORIENT: east
SUBST:  } = }:80 >, ] = ]:80 >, ) = ):80 >
MONS:   nonbase draconian, base draconian w:30 / nothing, moth of wrath
MONS:   fire dragon w:30 / ice dragon w:30 / shadow dragon w:20 / \
        storm dragon w:50 / bone dragon w:30 / golden dragon w:35
MONS:   Killer Klown / electric golem w:5 / curse toe w:5 / nothing
MONS:   orb of fire
MAP
                   xxxx
                   xllxxx
                   xllllx
                  xxllllxx
                 xxll.lllxx
              xxxxll.].lllxxxxx
              xllllll..lllllllx
             xxl3l.......lllllx
             xll...2.1.2...3llx
     xxxxxxxxx.l...........lllx
     xllxllxxll.....2.2.....llx
    xxllllllll..............llx
   xxlll....ll...5...........lx
  xxlll.2.2..l............4.llx
xxxlll......................llx
@......2.1.2.3......5..4.}6lllx
xxxlll......................llx
  xxlll.2.2..l............4.llx
   xxlll....ll...5...........lx
    xxllllllll..............llx
     xllxllxxll.....2.2.....llx
     xxxxxxxxx.l...........lllx
             xll...2.1.2...3llx
             xxl3l.......lllllx
              xllllll..lllllllx
              xxxxll.).lllxxxxx
                 xxll.lllxx
                  xxllllxx
                   xllllx
                   xllxxx
                   xxxx
ENDMAP

####
NAME: nicolae_moth_party
TAGS: no_pool_fixup no_monster_gen
DEPTH: Zot, !Zot:$
ORIENT: north
SUBST: l : lw
SHUFFLE: ]})>, 12
MONS: ghost moth, moth of wrath
MONS: any base draconian
MAP
xxxxxxxxxxxxxxxxxxxxxxxxxxx
xxx......xxxxxxxxx......xxx
xx.3.]....xxx}xxx....).3.xx
x...llll...x...x...llll...x
x..llllll.1..2..1.llllll..x
x..llllll.........llllll..x
x...llll...........llll...x
xx...........3...........xx
xxx......3.......3......xxx
xxxx..3.............3..xxxx
xxxxx.................xxxxx
xxxx...................xxxx
xxx.....................xxx
xx...lll...........lll...xx
xx..lllll..x...x..lllll..xx
xx...lll...x...x...lll...xx
xxx...3...xx...xx...3...xxx
xxxx.....xxx...xxx.....xxxx
xxxxxxxxxxx@@@@@xxxxxxxxxxx
ENDMAP

NAME: nicolae_zot_crop_circle
DEPTH: Zot, !Zot:1
TAGS: no_monster_gen transparent
SHUFFLE: {[(
NSUBST: p = 2:2 / 1:12 / 1
MONS: plant, death cob
MAP
   ..@..
  .......
 ...ppp...
...p...p...
..p.....p..
@.p..{..p.@
..p.....p..
...p...p...
 ...ppp...
  .......
   ..@..
ENDMAP


NAME: nicolae_zot_stationary_front
DEPTH: Zot
ORIENT: float
TAGS: transparent no_pool_fixup patrolling
SHUFFLE: Gg/Gg/Gg/Hh, Pp/Pp/Pp/Qq
SUBST: GP = x, g = r, p = c, HQ = @, hq = .
COLOUR: r = red, c = blue
KMONS: R = nonbase red draconian
KMONS: C = nonbase white draconian
KMONS: D = fire dragon
KMONS: I = ice dragon
KFEAT: r = c
MAP
    xxx                   xxx
   xxrxx                 xxrxx
  xxrrrxx               xxrrrxx
 xxrrlrrxx             xxrrlrrxx
xxrrlllrrxx           xxrrlllrrxx
xrrllDllrrxxxxxxPxxxxxxrrllDllrrxxxxxxPxxxxx
rrll...llrrcccccpcccccrrll...llrrcccccpccccc
@....R..........C..........R..........C....@
rrrrrgrrrrrccw.....wccrrrrrgrrrrrccw.....wcc
xxxxxGxxxxxxcww...wwcxxxxxxGxxxxxxcww...wwcx
           xccwwIwwccx           xccwwIwwccx
           xxccwwwccxx           xxccwwwccxx
            xxcccccxx             xxcccccxx
             xxxxxxx               xxxxxxx
ENDMAP

NAME: amethyst_zot_foddershock
DEPTH: Zot, !Zot:$
TAGS: no_monster_gen transparent
MONS: lightning spire, patrolling electric golem
NSUBST: % = 2:!, % = 2:a
KMONS: ! = patrolling death cob
:dgn.delayed_decay(_G, 'a', 'random draconian corpse')
MAP
@xxxxx@
.......
x.....x
x.%%%.x
x.%1%.x
x2%%%2x
xx...xx
 xxxxx
ENDMAP

NAME:    hangedman_zot_diagonal_lockstep
TAGS:    transparent extra decor
DEPTH:   Zot
ITEM:    % no_pickup
KFEAT:   Z = zot trap
SHUFFLE: ABCDEFG, defg / hijk / mnop / qrst, defg, hjik, mnop
SUBST:   A : xbvcZ, B : xbvc, C : xxbvc, D : xxbvc, EFG = x
SUBST:   d : xxZ, h = x, e : xx., i : xx., f : x.., j : x.., m : x..
SUBST:   gknopqrst = .
:  if you.depth() == dgn.br_depth(you.branch()) then
SUBST:  { = {([ <:5 Z:5
:  elseif you.depth() == "1" then
SUBST:  { = {:40 })]> d:20 Z:20
:  else
SUBST:  { = {([<})]> d:20 Z:20
:  end
MAP
             Dq...iC
        .....rD...Ch..
        .......x.x...p
        ...mF...x...o.
       Es..F...x.x....
 ......tE.x..kx...x..eB
 ........x...Cj....x.xd
A..fB...x.x.....G...x..
.A.xg.nG...{...Gn.gx.A.
..x...G.....x.x...Bf..A
dx.x....jC...x........
Be..x...Ck..x.Et......
 ....x.x...F..sE
 .o...x...Fm...
 p...x.x.......
 ..hC...Dr.....
   Ci...qD
ENDMAP

# Inspired by a distant submission from nicolae-,
# a revelation: nothing in Zot makes any sense!
NAME:    hangedman_orp_of_zott
TAGS:    no_monster_gen
DEPTH:   Zot, !Zot:$
ORIENT:  northwest
WEIGHT:  5
# Cheap plastic imitations, mostly. Well, maybe not cheap...
MONS:    ugly thing w:15 / raiju / guardian serpent / harpy zombie / \
         base draconian perm_ench:shapeshifter / boggart / \
         orb spider w:5 / great orb of eyes w:5 / rakshasa w:5
MONS:    very ugly thing w:20 / deep elf annihilator w:15 / \
         deep elf death mage w:15 / balrug w:15 / \
         quicksilver dragon / death knight / crystal guardian
MONS:    curse skull w:15 / apocalypse crab / lorocyproca / acid blob
MONS:    butterfly
ITEM:    stone q:1 no_pickup, large rock q:1 no_pickup
ITEM:    sling bullet q:1 no_pickup, tin of tremorstones no_pickup
# Altars obliquely refer to those temple maps.
KFEAT:   D = altar_lugonu / altar_jiyva / altar_beogh w:5 / C w:20
KFEAT:   ~ = zot trap
SHUFFLE: Xy / Xy / Xy / Aa
NSUBST:  A = 1:. / 19 = X:9 .:1 / *:X
SUBST:   X : X Y Z:4, X = bbbbvnc, Y = bvvvvnc, Z = bbvnncc
SUBST:   az = bbvc, y = x, B : x.
NSUBST:  2 = 4 = 2223 / *:2, . = 3:0 / 3 = 9. / 1:4 / *:., 1 = 1:1.. / *:1
# 1/15 chance for two downward staircases, 9/15 for (only) one.
SHUFFLE: ])defG, fgGCD~
MAP
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xx1.............+''''''''''''''''''''''''''''''
xx1.............+'''''''''''''''''''''''''''''''
xXX......XXXXXXXXXXXXXXX''''''XXXXXXXXXXXXXX'''''
xzXX......XyyyyyyyyyyyX''''''XXyyyyyyyyyyyyXX''''
xyyXX.....XXyxxxxxxxyXX'''''XXyyxxxxxxxxxxyyXX'''
xxyyXX....%XyxxBBBxxyX1....XXyyxxxxxxxxxxxxyyXX''
xxxyyX....1zzxxxBxxxzz.....XyyxxxxxxxxxxxxxxyyX''
xxxxyX....%z2.x.1.x.2z1....XyxxxxxxxxxxxBxxxxyX'
xxxxyX....Xzx...]...xzX....XyxxxxxxxxxBBxBxxxyX'
xxxyyX....Xz%.x...x.%zX....XyyxxxxxxBBxxxxBxxyX''
xxyyXX...Xzzzzzz+zzzzzzX...XXyyxxxd........2zzX''
xxyXX...zzz1.........1zzz...XXyxxxxx......%zzX'''
xxyX...zzX1...........1Xzz...Xyyyyyyyy1..1zzX''''
xxXX+++z.................z+++XXXXXXXzzzz+zzX''''
xx1...................................+112z1'''
xxXX.........................XXXXXXXzzzz+zzX''''
xxyXXXX...................XXXXyyyyyyy1...1zzX''''
xxxyyyXXX...............XXXyyyyxxx%.......%zzX'''
xxxxxyyyXX.............XXyyyxxxe...........2zzX'
xxxxxxxyyX...zzz1zzz...XyyxxxxxxxxBBBxxxxxByyXX'
xxxxxxxxyX..Xz1z+z1zX..XyxxxxxxxxxxxxBBBxBxyXX'''
xxxxxxxxyX.2zzX%%%Xzz2.XyxxxxxxxxxxxxxxxBxyyX'''
xxxxxxxxyzzzz1.%)%.1zzzzyxxxxxxxxxxxxxxxxxyX1''
xxxxxxxxyX'1zzX%%%Xzz1'XyxxxxxxxxxxxxxxxxxyyX'''
xxxxxxxxyX''Xz2zzz2zX''XyxxxxxxxxxxxxxxxxxxyXX'''
xxxxxxxyyX'''zzz1zzz'''XyyxxxxxxxxxxxxxxxxxyyXX'
xxxxxyyyXX'''''''''''''XXyyyxxxxxxxxxxxxxxxyyXX'
xxyyyyXXX'''''''''''''''XXXyyyyxxxxxxxxxyyyyXX'''
xyyXXXX'''''''''''''''''''XXXXyyyyyyyyyyyXXXX'''
xXXX'''''''''''''''''''''''''XXXXXXXXXXXXX'''''
xx''''''''''''''''''''''''''''''''''''''''''''
   ''''''   ''''@''''   '''''''''   '''''''''
ENDMAP

NAME:    hangedman_zot_wheel_spokes
TAGS:    transparent extra decor
DEPTH:   Zot, !Zot:$
# Swap positions in unit's potential spots
# with the spokes and / or the center, maybe.
SHUFFLE: AGMBHN / AHMBGN / AGNBJM
SHUFFLE: CIOFLR / CLOFIR / CIRFLO
SHUFFLE: DJPEKQ / DJQEKP / DJQEKP
SHUFFLE: AGM / BHN / CIO / DJP / EKQ / FLR
# Make those slots random walls or floor.
SUBST:   AGM : xxxxcccbbv, BHN : xxxxcccbbv
SUBST:   CIO : xxxxcccbbv .:100
SUBST:   DJP : xxxxcccbbv .:100, EFKLQR = .
MAP
      ...CDEF...
      ..F.AB.C..
........EB..AD..
........DA..BE..
.IJKL...C.BA.F..
L.GH.I...FEDC...
KH..GJ.OPQR.......
JG..HKR.MN.O......
I.HG.LQN..MP.IJKL.
.LKJI.PM..NQL.GH.I
......O.NM.RKH..GJ
.......RQPO.JG..HK
  ...CEDF...I.HG.L
  ..F.AB.C...LKJI.
  ..EB..AE........
  ..DA..BD........
  ..C.BA.F..
  ...FEDC...
ENDMAP

# Originally a submitted wizlab of "Nikola's Generator",
# with random drops of summoned ball lightning.
# Uncontrolled blinks near the turbines are dangerous!
NAME:   infiniplex_zot_generator
TAGS:   no_pool_fixup no_item_gen no_monster_gen no_trap_gen
DEPTH:  Zot, !Zot:$
ORIENT: south
MONS:   shock serpent w:12 / raiju / sixfirhy, black draconian
MONS:   war gargoyle / dancing weapon ; scimitar good_item / spark wasp w:5
MONS:   black draconian monk / black draconian shifter / storm dragon
MONS:   ghost moth / moth of wrath / death cob / \
        tentacled monstrosity / killer klown w:5
MONS:   patrolling electric golem
MONS:   patrolling black draconian annihilator ; cloak good_item . \
        rapier ego:electrocution
KMONS:  zZ = ball lightning
KMONS:  O = diamond obelisk
KMONS:  S = lightning spire
ITEM:   lightning rod, book of lightning
ITEM:   quick blade ego:electrocution good_item ident:type w:5 / \
        double sword ego:electrocution good_item ident:type w:5 / \
        executioner's axe ego:electrocution good_item ident:type w:5 / \
        eveningstar ego:electrocution good_item ident:type w:5 / \
        bardiche ego:electrocution good_item ident:type w:5 / \
        lajatang ego:electrocution good_item ident:type w:5 / \
        rapier ego:electrocution good_item ident:type / \
        scimitar ego:electrocution good_item ident:type / \
        dire flail ego:electrocution good_item ident:type / \
        trident ego:electrocution good_item ident:type / \
        quarterstaff ego:electrocution good_item ident:type
ITEM:   scroll of blinking q:1 / scroll of blinking q:2 / \
        scroll of teleportation q:3 w:30 / any scroll good_item / \
        staff of air ident:type
KFEAT:  yz = w
KFEAT:  YZ" = W
KFEAT:  # = iron_grate
NSUBST: . = 8:1 / 6:2 / 4 = 12. / *:., ' = 2:3 / 4:4 / 4 = 345 / *:.
NSUBST: d = 1:d / 1:|ee / *:f, f = 1:f / *:g
NSUBST: w = 3:z / *:w, W = 2:Z / *:W
SUBST:  ` = ., ) = )>>
KPROP:  -_ly"O> = no_tele_into
MARKER: - = lua:fog_machine { cloud_type = "steam", walk_dist = 3, \
                              pow_max = 100, pow_min = 10, delay = 20, \
                              size = 1, start_clouds = 5, excl_rad = 0 }
TILE:   v = dngn_metal_iron
FTILE:  -_ = floor_pebble_darkgray
MAP
                 vvvvvvvvv
                 vd`d`d`dv
                 v```7```v         vvvvv
                 vf``'``fv         vyyyv
                 v``6`6``v         vyyyv
                 v```````v         vyyyv
   vvvvvvvvvvvvvvv###S###v         vyyyv
   v..............```````v         vyyyv
   v.S...S...S...S```'```vvvvvvvvvvv###vvv@vvv
   v...'...'...'..`````````````````#www#.....v
   v.'...}...)...'```'```````````f`#www#..'..v
   v..............`````````````````#www#.....v
   vvvvvvWWvvvvvvvvvvvvvvv##########www#.....v
   vyywwwWWwwwwwwwwwwwwwwwwwwwwwwwwwwww#..'..v
 vvvy#ww#WW##########wwwwwwwwwwwwwwwwww#.'.'.v
 vyyy#yy#...........#w################w#..'..v
 vyyy#yy#...........#w#..............#w#.....v
 vyyy#yy#...........#w#..............#w#.....v
 v__-#yyvvv.........#w#..............#w#..'..v
vvvvv#yyyyvv....WWvvvwvvvWW..........WWW.....v
vllll-yy###vvvvvvWWWvwvWWW#########..WWW.....v
vllll_y##"""""""vvWWvwvWW##"""""""#vvvwvvvv..v
vvvvvv##"""""""""vvWvwvW##"""""""""vvvwwwwv..v
xxxxxvv"""""""""""#WWWWW#"""""""""""vvww#wv..v
    xvv"""""""""""##WWW##"""""""""""vvww#wv..v
    xv"""""""""""""#WWW#"""""""""""""vyy#wv..v
    xv>"""""O""""">#WWW#>"""""O""""">vyy#yv..v
    xv"""""""""""""#WWW#"""""""""""""vyy#y'..v
    xvv"""""""""""##WWW##"""""""""""vvyy#yY..v
    xxv"""""""""""#WWWWW#"""""""""""vyyy#yYY.v
     xvv"""""""""##Wv#vW##"""""""""##yyy#yYYYv
     xxvv"""""""##vvvyvvv##"""""""##__-_#yYYYv
      xxvvvvvvvvvvvxvyvxvvvvvvvv###__ll_#-YYYv
       xxxxxxxxxxxxxvyvxxxxxxxxvvvvvvllvvvvvvv
        xxxxxxxxxxxxvyvxxxxxxxxxxxxxvllvxxxxxx
        xxxxxxxxxxxxvyvxxxxxxxxxxxxxvllvx
        xxxxxxxxxxxxvyvxxxxxxxxxxxxxvvvvx
        xxxxxxxxxxxxvvvxxxxxxxxxxxxxxxxxx
        xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
ENDMAP

NAME: cheibrodos_zot_enchanting_chambers
TAGS: no_item_gen no_monster_gen
DEPTH: Zot
ORIENT: float
MONS: purple draconian, purple draconian stormcaller \
      / purple draconian scorcher / purple draconian monk \
      / purple draconian knight / purple draconian shifter \
      / purple draconian annihilator
MONS: quicksilver dragon, killer klown
NSUBST: - = 2:1 / 3=112.. / 1 = 3:1 ., " = 1:1 / 3=122. / 1=34
NSUBST: ' = 2:1 / 2=12 / 2:3 / 1=34.., ; = 2:1 / 3=112.. / 1=3:1 .
NSUBST: _ = 1:1 / 3=122. / 1=34, p = 2:1 / 2=12 / 2:3 / 1=34..
SUBST: | = |*
MAP
      xxxxx xxxxx xxxxx
     xxpppxxx___xxx;;;xx.
     x|ppp.b____.b;;;;.b.
     x|ppb.+_b_b.+;b;;.+@
     x|ppp.b____.b;;;;.b.
     xxpppxxm___xxx;;;xx.
      xxxxxm...mxxxxxxx
   xxxxxxxm...mxxxxx
 .xx---xxx"""mxx'''xx
 .b.----b.""""b.'''|x
 @+.--b-+.b"b"+.b''|x
 .b.----b.""""b.'''|x
 .xx---xxx"""xxx'''xx
   xxxxx xxxxx xxxxx
ENDMAP

##########################################################################
# Some decorative multi-coloured glass columns
NAME:   skrybe_zot_glass_1
TAGS:   transparent decor no_pool_fixup
DEPTH:  Zot
SUBST: W : Wwl
KMASK:  Wwl = no_monster_gen
: coloured_glass(_G)
MAP
  .....    .....
 ..WWW..  ..WWW..
..WWrWW....WWyWW..
.WWrrrWW..WWyyyWW.
.WrrrrrW..WyyyyyW.
.WWrrrWW..WWyyyWW.
..WWrWW....WWyWW..
 ..WWW......WWW..
  ..............
  ..............
 ..WWW......WWW..
..WWoWW....WWgWW..
.WWoooWW..WWgggWW.
.WoooooW..WgggggW.
.WWoooWW..WWgggWW.
..WWoWW....WWgWW..
 ..WWW..  ..WWW..
  .....    .....
ENDMAP

NAME:   skrybe_zot_glass_2
TAGS:   transparent decor no_pool_fixup
DEPTH:  Zot
SUBST:  l : Wwl
KPROP:  l = no_cloud_gen
KMASK:  Wwl = no_monster_gen
: coloured_glass(_G)
MAP
      .....
 ......lll......
..lll.lloll.lll..
.llrlllooolllyll.
.lrrrlooooolyyyl.
.llrlllooolllyll.
..lll.lloll.lll..
 ......lll......
      .....
ENDMAP

NAME:   skrybe_zot_glass_3
TAGS:   transparent decor no_pool_fixup
DEPTH:  Zot
SUBST:  l : Wwl
SUBST:  ( : ([{.
KMASK:  Wwl = no_monster_gen
KPROP:  l = no_cloud_gen
: coloured_glass(_G)
MAP
xxxxxx@@@xxxxxx
xlllll...lllllx
xlrrrl...looolx
xlrrll...lloolx
xlrll.....llolx
xlll.......lllx
@.............@
@......(......@
@.............@
xlll.......lllx
xlyll.....llglx
xlyyll...llgglx
xlyyyl...lggglx
xlllll...lllllx
xxxxxx@@@xxxxxx
ENDMAP

##############################################################################
# The circus has come to town

# A manic carousel. The carnie operators are in the center, behind the
# mechanicals surrounded by the ride and riders.
#
# The player either comes downstairs and finds themselves on the ride,
# or needs to fight through the crowd lined up to find the way down.
NAME:    ebering_klown_carousel
DEPTH:   Zot, !Zot:$
ORIENT:  float
TAGS:    no_monster_gen no_trap_gen
MONS:    killer klown, ancient lich / dread lich, death cob
NSUBST:  - = 2 / 3 = 3.. / *:.
: if (crawl.coinflip()) then
NSUBST:  > = 1 = }:80 > / 1 = ):80 > / 1 = ]:80 >
SUBST:   1 = 1 0:30 .
: else
NSUBST:  G = 3={[( / *:G
NSUBST:  1 = 6 = 1. / *=0...
NSUBST:  > = >. / *:.
: end
NSUBST:  ^ = 4:^ / *=^..
SUBST:   a = aaax.
KFEAT:   a = iron_grate
KFEAT:   ^ = dispersal trap
: coloured_glass(_G)
MAP
         ...........
       ...............
      .....vxxrxxo.....
     ....xvv1r1r1oox....
    ....bbx...^...xyx....
    ...gx1.........1xx...
......xg1^....G....^1gx...
......yx..G.......G..xb...
...V.xy......aaa......bb..
.V...xo.....a---a.....1x..
.....^.....a-->--a....ix..
......1^1G.a->---a.G1^1i..
.....^.....a-->--a....ix..
.V...xo.....a---a.....1x..
...V.xr......aaa......vv..
......rx..G.......G..xv...
......xv1^....G....^1rx...
    ...vx1.........1xr...
    ....iix...^...xoo....
     ....xbb1g1g1yyx....
      .....bxxgxxy.....
       ...............
         ...........
ENDMAP

# The three ring circus, with the player descending in mid show
NAME:    ebering_greatest_show_in_zot
DEPTH:   Zot, !Zot:$
ORIENT:  float
TAGS:    no_monster_gen no_trap_gen
SUBST:   x : x b:1
SUBST:   < = {[(
KFEAT:   ^ = alarm trap / zot trap
# The possible acts:
MONS:    red draconian scorcher, red draconian, juggernaut
MONS:    tentacled monstrosity, ancient lich / dread lich, electric golem
MONS:    draconian
SHUFFLE: ABCDEFHI
# Fire breathers: Red draconians, with some scorchers
NSUBST:  A = 3 = 112 / 9 = 2. / *:.
# The strongman (juggernaut) and Contortionists (tentacled mons)
NSUBST:  B = 3 / 8 = 4. / *:.
# The Magic act: An Ancient Lich and elec golems
NSUBST:  C = 5 / 6 / 2 = 6. / *:.
# The Acrobats: pale draconians, with some monks, and nets
NSUBST:  D = 3 = qqp / 9 = p. / 9 = - / *:.
KMONS:   p = grey draconian
KMONS:   q = grey draconian monk
KFEAT:   - = net trap
# The Beasts: moths and Dragons
NSUBST:  E = 3 = r. / 6 = ss. / *:.
KMONS:   r = moth of wrath / ghost moth
KMONS:   s = quicksilver dragon / storm dragon / \
             shadow dragon / iron dragon / \
             bone dragon / golden dragon w:5
# The Freakshow: death cobs and maybe a curse toe
NSUBST:  F = 8 = z. / 1 = y .:50 / *:.
KMONS:   y = curse toe
KMONS:   z = death cob
# The Jugglers:  draconian shifters and draconians
NSUBST:  H = 3 = aa7 / 9 = 7. / *:.
KMONS:   a = draconian shifter
# Those laffy daffy Klowns
NSUBST:  I = 8 = k. / *:.
KMONS:   k = killer klown
MAP
               xxx
             xxxlxxx
  xxxxx    xxxl...lxxx    xxxxx
 xxAAAxxxxxxl..BBB..lxxxxxxCCCxx
xxAAAAAxxxxl..BBBBB..lxxxxCCCCCxx
+AA...AA.....BB...BB.....CC...CC+
+AA.<.AAG.l..BB.<.BB..l.GCC.<.CC+
+AA...AA.....BB...BB.....CC...CC+
xxAAAAAxxxxl..BBBBB..lxxxxCCCCCxx
 xxAAAxxxxxxl..BBB..lxxxxxxCCCxx
  xxxxx    xxxl...lxxx    xxxxx
             xx+++xx
             Gx...xG
             .......
             ...V...
             .......
             ..m^m..
             ..m7m..
             @@mmm@@
ENDMAP

##############################################################################
##############################################################################
#
# hall_of_Zot_5
#
##############################################################################
##############################################################################

NAME:    hall_of_Zot
PLACE:   Zot:$
ORIENT:  north
TAGS:    no_dump no_trap_gen
KITEM:   Z = Orb of Zot
MONS:    patrolling orb guardian, orange crystal statue / w:20 obsidian statue
MONS:    electric golem, killer klown, ancient lich / dread lich, orb of fire
# Traps to spread throughout the vault. Fewer alarm traps as those have a big
# effect on the vault as a whole.
KFEAT:   ~ = zot trap / dispersal trap / permanent teleport trap / net trap \
             / alarm trap w:5
# Flat distribution of traps for specific sections.
KFEAT:   ^ = zot trap / dispersal trap / permanent teleport trap / alarm trap \
             / net trap
KMASK:   ^~ = no_item_gen
# Place a minimum number of traps and some extra liches in each lower wing.
NSUBST:  d = 2=5. / 4=~ / ., h = 2=5. / 4=~ / .
# In a each upper wing, place a few monsters along with locations for the main
# monster set on '?'. Use more central areas in the upper wings to do this.
NSUBST:  f = 3 / 4 / 6 / 9 = ? .:8 / e, k = 3 / 4 / 6 / 9 = ? .:8 / j
# Minimum number of traps in each upper wing.
NSUBST:  e = 4=~ / ., j = 4=~ / .
# Each upper wing has equal chance to get one of three sets that most heavily
# weight a specific monster: killer klown, ancient lich, or orb of fire.
SUBST:   ? : KLM
SUBST:   K = 0 4:40 5 6 ., L = 0 4 5:40 6 ., M = 0 4 5 6:40 .
# Make a final sprinkling of traps throughout the vault.
SUBST:   . = ~ .:600
# Put traps in wing entrances with decreased odds on one side to make double
# trapped entrances rarer.
SUBST:   D = ^..., H = ^.
# For upper-wing entrances, sometimes put statue monsters, traps, or statues.
SUBST:   E = 2 ^:20 G .:80, J = 2 ^:20 G .:80
# For the orb chamber, some guaranteed and random traps. About 4 on-average.
NSUBST:  - = 2=^ / * = ^ .:240
# Colours
COLOUR:     cX = lightmagenta
LFLOORCOL:  magenta
LROCKCOL:   lightmagenta
LFLOORTILE: floor_rough_magenta
LROCKTILE:  wall_zot_lightmagenta
validate {{ return has_exit_from_glyph('Z') }}
MAP
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXeeeeeeeeeeeeeXXXXXXXXXXXXXXXXXXXXXXXXXjjjjjjjjjjjjjXXXXXXXXXXXXXX
XXXXXXXXXXXXeeeeeeeeeeeeeeeeeeeXXXXXXXXXXXXXXXXXXXjjjjjjjjjjjjjjjjjjjXXXXXXXXXXX
XXXXXXXXXXXeeeeeeeeeeeeeeeeeeeeeeXXXXXXXXXXXXXXXjjjjjjjjjjjjjjjjjjjjjjXXXXXXXXXX
XXXXXXXXXXeeeeeeeeeeeeeeeeeeeeeeeeXXXXXXXXXXXXXjjjjjjjjjjjjjjjjjjjjjjjjXXXXXXXXX
XXXXXXXXXXeeeeeeefffffffffffffeeeeXXX---1---XXXjjjjkkkkkkkkkkkkkjjjjjjjXXXXXXXXX
XXXXXXXXXXXeeeeeefffffffffffffeeeeXX--1---1--XXjjjjkkkkkkkkkkkkkjjjjjjXXXXXXXXXX
XXXXXXXXXXXXeeeeefffffffffffffeeeeX1---------1XjjjjkkkkkkkkkkkkkjjjjjXXXXXXXXXXX
XXXXXXXXXXXXXeeeefffffffffffffeeeee--1--Z--1--jjjjjkkkkkkkkkkkkkjjjjXXXXXXXXXXXX
XXXXXXXXXXXXeeeeefffffffffffffeeeeX1---------1XjjjjkkkkkkkkkkkkkjjjjjXXXXXXXXXXX
XXXXXXXXXXXeeeeeefffffffffffffeeeeXX--1---1--XXjjjjkkkkkkkkkkkkkjjjjjjXXXXXXXXXX
XXXXXXXXXXeeeeeeefffffffffffffeeeeXXX---1---XXXjjjjkkkkkkkkkkkkkjjjjjjjXXXXXXXXX
XXXXXXXXXXeeeeeeefffffffffffffeeeecXXXXXXXXXXXcjjjjkkkkkkkkkkkkkjjjjjjjXXXXXXXXX
XXXXXXXXXXXeeeeeeeeeeeeeeeeeeeeeecccccccccccccccjjjjjjjjjjjjjjjjjjjjjjXXXXXXXXXX
XXXXXXXXXXXXeeeeeeeeeeeeeeeeeeeXcccccccccccccccccXjjjjjjjjjjjjjjjjjjjXXXXXXXXXXX
XXXXXXXXXXXXXeeeeeeeeeeeeeeeXXXXcccccccccccccccccXXXXjjjjjjjjjjjjjjjXXXXXXXXXXXX
XXXXXXXXXXXXXXE111EccXXXXXXXXXXXcccccccccccccccccXXXXXXXXXXXccJ111JXXXXXXXXXXXXX
XXXXXXXXXXXccdddddddddddddddDD1.ccccccccccccccccc.1HHhhhhhhhhhhhhhhhccXXXXXXXXXX
XXXXXXXXXXccddddddddddddddddcc1...ccccccccccccc...1cchhhhhhhhhhhhhhhhccXXXXXXXXX
XXXXXXXXXccddddddddddddddddddccc...ccccccccccc...ccchhhhhhhhhhhhhhhhhhccXXXXXXXX
XXXXXXXXXcddddddddddddddddddddccc...............ccchhhhhhhhhhhhhhhhhhhhcXXXXXXXX
XXXXXXXXXcddddddddddddddddddddcXcc.............ccXchhhhhhhhhhhhhhhhhhhhcXXXXXXXX
XXXXXXXXXcddddddddddddddddddddcXXc.............cXXchhhhhhhhhhhhhhhhhhhhcXXXXXXXX
XXXXXXXXXcddddddddddddddddddddcXXcc.1...1...1.ccXXchhhhhhhhhhhhhhhhhhhhcXXXXXXXX
XXXXXXXXXcddddddddddddddddddddcXXXc...........cXXXchhhhhhhhhhhhhhhhhhhhcXXXXXXXX
XXXXXXXXXcddddddddddddddddddddcXXcc...........ccXXchhhhhhhhhhhhhhhhhhhhcXXXXXXXX
XXXXXXXXXccddddddddddddddddddccXXc.............cXXcchhhhhhhhhhhhhhhhhhccXXXXXXXX
XXXXXXXXXXccddddddddddddddddccXXcc.............ccXXcchhhhhhhhhhhhhhhhccXXXXXXXXX
XXXXXXXXXXXccddddddddddddddccXXXc...............cXXXcchhhhhhhhhhhhhhccXXXXXXXXXX
XXXXXXXXXXXXccccccccccccccccXXXXcccccccc@ccccccccXXXXccccccccccccccccXXXXXXXXXXX
ENDMAP

##############################################################################
##############################################################################
#
# For colouring the walls and floors of the first four levels
#
##############################################################################
##############################################################################

NAME:       hall_of_Zot_1
DEPTH:      Zot:1
CHANCE:     100%
TAGS:       extra transparent allow_dup no_dump
LFLOORCOL:  lightgrey
LROCKCOL:   white
LFLOORTILE: floor_rough_lightgray
LROCKTILE:  wall_zot_white
MAP
.
ENDMAP

NAME:       hall_of_Zot_2
DEPTH:      Zot:2
CHANCE:     100%
TAGS:       extra transparent allow_dup no_dump
LFLOORCOL:  white
LROCKCOL:   blue
LFLOORTILE: floor_rough_white
LROCKTILE:  wall_zot_blue
MAP
.
ENDMAP

NAME:       hall_of_Zot_3
DEPTH:      Zot:3
CHANCE:     100%
TAGS:       extra transparent allow_dup no_dump
LFLOORCOL:  blue
LROCKCOL:   lightblue
LFLOORTILE: floor_rough_blue
LROCKTILE:  wall_zot_lightblue
MAP
.
ENDMAP

NAME:       hall_of_Zot_4
DEPTH:      Zot:4
CHANCE:     100%
TAGS:       extra transparent allow_dup no_dump
LFLOORCOL:  lightblue
LROCKCOL:   magenta
LFLOORTILE: floor_rough_lightblue
LROCKTILE:  wall_zot_magenta
MAP
.
ENDMAP
