##############################################################################
# tar.des: Special maps for Tartarus.
# Content: (mini)vaults particular to Tartarus, and/or first appearing in
#          Tar (order: Dis, Geh, Coc, Tar)
##############################################################################

: crawl_require('dlua/vault.lua')

{{
function tar_setup(e)
   e.place("Tar:$")
   e.tags("no_rotate")
   e.kmask('O = no_item_gen')
   e.kitem('O = bone rune of Zot')
end

function callback.grunt_gauntlet_trap_activate(data,triggerable,trigger,marker,ev)
    if not dgn.persist.grunt_gauntlet_trap_triggered then
    for slave in iter.slave_iterator("trap_wall2", 1) do
        local you_x, you_y = you.pos()
        if (dgn.mons_at(slave.x, slave.y) ~= nil or (slave.x == you_x and slave.y == you_y)) then
            return
        end
    end
        dgn.persist.grunt_gauntlet_trap_triggered = true
    for slave in iter.slave_iterator("trap_wall", 1) do
        dgn.terrain_changed(slave.x, slave.y, "floor", false)
        dgn.place_cloud(slave.x, slave.y, "foul pestilence", crawl.random2(5) + 5)
    end
    for slave in iter.slave_iterator("trap_wall2", 1) do
        dgn.terrain_changed(slave.x, slave.y, "stone_wall", false)
        dgn.colour_at(slave.x, slave.y, "lightmagenta")
    end
    crawl.mpr("You hear an unearthly scream, and the grinding of stone!",
             "warning")
    crawl.mpr("The path is suddenly blocked!", "warning")
    end
end

function tar_dig_maze(e, x, y)
  local delta = { {x =  2, y =  0},
                  {x = -2, y =  0},
                  {x =  0, y =  2},
                  {x =  0, y = -2} }
  local count = 0
  local passes = 0
  local i = 0
  local newx = 0
  local newy = 0
  local nextx = 0
  local nexty = 0
  while true do
    count = 0
    for i = 1, 4 do
      newx = x + delta[i].x
      newy = y + delta[i].y
      if e.is_valid_coord { x = newx, y = newy }
         and e.mapgrd[newx][newy] ~= '.'
         and e.mapgrd[newx][newy] ~= ' '
         and e.mapgrd[newx][newy] ~= '$'
         and e.mapgrd[newx][newy] ~= 'L' then
        count = count + 1
        if crawl.random2(count) == 0 then
          nextx = newx
          nexty = newy
        end
      end
    end
    if count == 0 then
        if passes == 0 then
          e.mapgrd[x][y] = 'L'
        end
        return
    end
    if nexty == y then
      newy = y
      if nextx - x < 0 then
        newx = nextx + 1
      else
        newx = nextx - 1
      end
    else
      newx = x
      if nexty - y < 0 then
        newy = nexty + 1
      else
        newy = nexty - 1
      end
    end
    passes = passes + 1
    e.mapgrd[newx][newy] = '.'
    e.mapgrd[nextx][nexty] = '.'
    tar_dig_maze(e, nextx, nexty)
  end
end
}}


##############################################################################
# Tartarus
##############################################################################

NAME:   lemuel_nasty_pond
DEPTH:  Tar
TAGS:   no_pool_fixup no_rotate
MONS:   withered plant
MONS:   oklob plant, ghoul, necrophage, blizzard demon / green death
SUBST:  W:w.
SUBST:  Z:w.
SUBST:  w = w .:1
SUBST:  . = .:15 1:1 w:1
SUBST:  1 = 1 2:2
SUBST:  3 = 3:9 4:1 .:2
COLOUR: . = none / green w:2
COLOUR: w = green / lightgreen
MAP
     ...WWWW3....
   .3..WWWWW....3...
 ....WWWwwW...3....3.
..Z.WWwwwwww3.....3...
3.ZZWwwwwwwwwww3......
.ZZZ..wwwww5wwwwww3...
..3Z..44wwwwwww33.....
.3ZZZ..44wwwwww3..3...
.ZZZZZ.44wwwww........
 ..ZZZZZ4wwww.3......
   3ZZZZwwwww....3.
     .ZZwww3.....
ENDMAP

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

NAME: grunt_tartarus_stairs_gauntlet_trap
DEPTH: Tar, !Tar:$
TAGS: generate_awake patrolling no_trap_gen
MONS: Tzitzimitl, shadow demon / reaper, soul eater, necrophage, shadow imp
{{
    dgn.persist.grunt_gauntlet_trap_triggered = false
    local trap_marker = TriggerableFunction:new {
        func = "callback.grunt_gauntlet_trap_activate",
        repeated = true}
    trap_marker:add_triggerer(DgnTriggerer:new {
        type="player_move"})
    lua_marker(':', trap_marker)
    lua_marker('H', trap_marker)
    lua_marker('-', trap_marker)
    lua_marker('1', trap_marker)
    lua_marker('e', trap_marker)
    lua_marker('}', trap_marker)
    lua_marker(']', trap_marker)
    lua_marker(')', trap_marker)
    lua_marker('d', props_marker {trap_wall=1})
    lua_marker('"', props_marker {trap_wall2=1})
}}
SUBST: d = c
SUBST: e = 2
COLOUR: c = lightmagenta
KPROP: "H-}]) = no_tele_into
MARKER: H = lua:fog_machine { \
                pow_min = 10, pow_max = 10, delay = 10, \
                size = 3, walk_dist = 1, spread_rate = 0, \
                cloud_type = "purple smoke" }
MAP
cccccccccccccccccccccc.......
c...2...............cG.5.....
cdcccccccccccccccccdcc...5...
c--H":e:c9c8c8c0c0c0cG.4..5..
c}--":::cdcdcdcdcdcdcc3.4..5.
c]1H":::+............+......@
c)--":::cdcdcdcdcdcdcc3.4..5.
c--H":e:c9c8c8c0c0c0cG.4..5..
cdcccccccccccccccccdcc...5...
c...2...............cG.5.....
cccccccccccccccccccccc.......
ENDMAP

##############################################################################
NAME:    hangedman_snap_crack_crunch
TAGS:    transparent no_monster_gen
DEPTH:   Tar, !Tar:$, Zot:1-4
: if you.in_branch("Tar") then
KMONS:   12 = patrolling reaper
KMONS:   34 = patrolling tormentor
KMONS:   56 = patrolling shadow demon
KMONS:   7 = skeletal warrior
KMONS:   8 = patrolling shadow imp
KMONS:   AB = lich
KMONS:   CD : vampire mage / mummy priest
KMONS:   EF : shadow dragon w:5 / death drake
KITEM:   | = nothing
: else
KMONS:   12 = patrolling lich / ancient lich / dread lich
KMONS:   34 = patrolling curse toe
KMONS:   56 = patrolling bone dragon
KMONS:   7 = death cob w:12 / zombie w:4 / skeleton w:4 / guardian mummy w:4
KMONS:   8 = patrolling death cob
KMONS:   ABCD = shadow dragon
KMONS:   EF = death drake
: end
KMONS:   0 = soul eater
KMONS:   Z = obsidian statue
KFEAT:   Z = zot trap
SHUFFLE: 1234, 12 / 34 / 56, ABCD, AB / CD / EF, {'" / {'" / }`_, {', }`, GHI
SUBST:   { : -_= |:3, } : -= |:2, ' : |:1 .:4, " = ., Z = Z:1 c:8
SUBST:   G : O:20 X, H : O X:50, I = X, X : xc
NSUBST:  - = 1:{ / 1:}, _ = 1:[ / 1 = (:80 <, = = 1:] / 1 = ):80 >
NSUBST:  7 = 3:7 / 3:0 / 2 = 70
MARKER:  O = lua:fog_machine { cloud_type = "foul pestilence", pow_min = 200, \
                pow_max = 300, delay = 25, size = 1, walk_dist = 0, excl_rad = 0 }
MAP
         xxxxxxxxx
        xxxx...7.xx.@@.
   xxxxxxxx..cc.7xx.....
  xxxxxxxx.AcXc..xx....@
  xxx......cGc...x.."..@
  xx.'....cXc....x.8....
  xx..cc..cc..cc..x..xxx
  xx..cXc.....cXc..xxxxxx
 xxx...cHc..1..cXc....7.x
xxxx....cXc.....cXc....7x
xxx..cc..cc..cc..cc..cc.x
xx.BcXc....{cXc.....cXc.x
x..cIc..2..cZc..3..cIc..x
x.cXc.....cXc{....cXcC.xx
x.cc..cc..cc..cc..cc..xxx
x7....cXc.....cXc....xxxx
x.7....cXc..4..cHc...xxx
xxxxxx..cXc.....cXc..xx
 xxx..x..cc..cc..cc..xx
 ....8.x....cXc....'.xx
 @.."..x...cGc......xxx
 @....xx..cXcD.xxxxxxxx
 .....xx7.cc..xxxxxxxx
  .@@.xx.7...xxxx
       xxxxxxxxx
ENDMAP

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

NAME:    hangedman_restless_catacombs
TAGS:    no_monster_gen
DEPTH:   Tar, !Tar:$
MONS:    soul eater, patrolling curse skull
MONS:    skeletal warrior / phantasmal warrior w:6 / \
         shadow wraith w:4 / guardian mummy w:4 / \
         ushabti w:2 / ghoul w:4
KMONS:   45 = vampire knight
KMONS:   67 = vampire mage
KMONS:   89 = flayed ghost
KMONS:   AB = mummy priest
KMONS:   CD = lich
NSUBST:  0 = 1:( / 1 : ):9 >:1 / 1 : 3:9 [:1 / 1:4 / 1:5 / 1:6 / 1:7 / *:3
SHUFFLE: 456789ABCD"
SUBST:   " = 3
MAP
xxxxxxxxxxxxxxxxx
xcccccccccccccccx
xcG.c0c0c0c0c.Gcx
xc.1c+c+c+c+c1.cx
xccc.........cccx
xc0+.........+0cx
xccc...x.x...cccx
xc0+..x...x..+0cx
xccc....2....cccx
xc0+..x...x..+0cx
xccc...x.x...cccx
xc0+.........+0cx
xccc.........cccx
xc.1c+c+c+c+c1.cx
xcG.c0c0c0c0c.Gcx
xcccccccccccccccx
xxxxxxxxxxxxxxxxx
ENDMAP

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

NAME:    hangedman_tartarus_temple_path
TAGS:    transparent extra
DEPTH:   Tar, !Tar:$
SHUFFLE: hH / hH / Hh, iI / iI / Ii
SUBST:   h : cccx, H : cxGF, i : cccx, I : cxGF
SUBST:   d = d., + = +..., { = {}...., c = c:49 .:1, C = c
MARKER:  F = lua:fog_machine { cloud_type = "foul pestilence", pow_min = 200, \
             pow_max = 300, delay = 25, size = 1, walk_dist = 0, excl_rad = 0 }
{{
dgn.delayed_decay(_G, 'd', 'base draconian corpse w:5 / ' ..
                           'base draconian skeleton / ' ..
                           'shadow dragon corpse w:5 / ' ..
                           'shadow dragon skeleton')
}}
MAP
 .@xxxxxxxxxxxxxxxxxxxxxxx@.
.x..cccccccCCCCCCCccccccc..x.
@...cd.c.dcccccccccd.c.dc...@
x...c.....cd.....dc.....c...x
xc..c..c..c...c...c..c..c..cx
xc..c..h..cF..i..Fc..h..c..cx
xc..+.dHd.+...I...+.dHd.+..cx
xc..c..h..cF..i..Fc..h..c..cx
xc..c..c..c...c...c..c..c..cx
x...c.....cd..{..dc.....c...x
@...cd.c.dcccccccccd.c.dc...@
.x..cccccccCCCCCCCccccccc..x.
 .@xxxxxxxxxxxxxxxxxxxxxxx@.
ENDMAP

NAME:   nicolae_tar_cuneiform_heaven
DEPTH:  Tar
WEIGHT: 10, 1 (Tar:$)
TAGS:   transparent decor extra allow_dup luniq tar_grunt_decor
MAP
................
........xxxxx...
.........xxx....
.........xxx....
.x...x....x.....
.xxx.xxx..x.....
.xxxxxxxxxxxxxx.
.xxx.xxx..x.....
.x...x....x.....
..........x.....
..........x.....
................
ENDMAP

NAME:   nicolae_tar_cuneiform_sun
DEPTH:  Tar
WEIGHT: 10, 1 (Tar:$)
TAGS:   transparent decor extra allow_dup luniq tar_grunt_decor
MAP
............
....x.xxxxx.
..xxx..xxx..
.xxxx..xxx..
..xxx...x...
....x...x...
..xxx...x...
.xxxx...x...
..xxx...x...
....x...x...
............
ENDMAP

NAME:   nicolae_tar_cuneiform_to_be
DEPTH:  Tar
WEIGHT: 10, 1 (Tar:$)
TAGS:   transparent decor extra allow_dup luniq tar_grunt_decor
MAP
...............
.xxxxx.........
..xxx..........
..xxxx.........
...x.xxx.......
...x.xxxxxxxxx.
...x.xxx.......
...x.x.........
...x...........
...x...........
...............
ENDMAP

NAME:   nicolae_tar_cuneiform_two
DEPTH:  Tar
WEIGHT: 10, 1 (Tar:$)
TAGS:   transparent decor extra allow_dup luniq tar_grunt_decor
MAP
.............
.xxxxx.xxxxx.
..xxx...xxx..
..xxx...xxx..
...x.....x...
...x.....x...
...x.....x...
...x.....x...
...x.....x...
...x.....x...
.............
ENDMAP

NAME:   nicolae_tar_cuneiform_three
DEPTH:  Tar
WEIGHT: 10, 1 (Tar:$)
TAGS:   transparent decor extra allow_dup luniq tar_grunt_decor
MAP
...................
.xxxxx.xxxxx.xxxxx.
..xxx...xxx...xxx..
..xxx...xxx...xxx..
...x.....x.....x...
...x.....x.....x...
...x.....x.....x...
...x.....x.....x...
...x.....x.....x...
...x.....x.....x...
...................
ENDMAP

NAME:   nicolae_tar_cuneiform_bird
DEPTH:  Tar
WEIGHT: 10, 1 (Tar:$)
TAGS:   transparent decor extra allow_dup luniq tar_grunt_decor
MAP
..................
....xxxxx...xxxxx.
.....xxx.....xxx..
.....xxx.....xxx..
.x....x....x..x...
.xxx..x..xxx..x...
.xxxxxxxxxxx..x...
.xxx..x..xxx..x...
.x....x....x..x...
......x.......x...
......x.......x...
..................
ENDMAP

NAME:   nicolae_tar_cuneiform_water
DEPTH:  Tar
WEIGHT: 10, 1 (Tar:$)
TAGS:   transparent decor extra allow_dup luniq tar_grunt_decor
MAP
.............
.xxxxx.xxxxx.
..xxx...xxx..
..xxx...xxx..
...x.....x...
...x...xxxxx.
...x....xxx..
...x....xxx..
...x.....x...
...x.....x...
.............
ENDMAP

NAME:   nicolae_tar_cuneiform_bread
DEPTH:  Tar
WEIGHT: 10, 1 (Tar:$)
TAGS:   transparent decor extra allow_dup luniq tar_grunt_decor
MAP
...................
.xxxxx.xxxxx.xxxxx.
..xxx...xxx...xxx..
..xxx...xxx...xxx..
...x.....x.....x...
...................
.....xxxxxxxxx.....
......xxxxxxx......
.......xxxxx.......
.......xxxxx.......
........xxx........
.........x.........
...................
ENDMAP

NAME:   nicolae_tar_cuneiform_oil
DEPTH:  Tar
WEIGHT: 10, 1 (Tar:$)
TAGS:   transparent decor extra allow_dup luniq tar_grunt_decor
MAP
.............
.x...........
.xxx.........
.xxxxxxxxxxx.
.xxx.........
.x...........
.............
.x...xxx.xxx.
.xxx..x...x..
.xxxxxxxxxxx.
.xxx..x...x..
.x....x...x..
.............
ENDMAP

NAME:   nicolae_tar_cuneiform_not
DEPTH:  Tar
WEIGHT: 10, 1 (Tar:$)
TAGS:   transparent decor extra allow_dup luniq tar_grunt_decor
MAP
..............
....xxxxx.....
.....xxx......
.....xxx......
.x....x.....x.
.xxx..x....x..
.xxxxxxxxxxxx.
.xxx..x..x....
.x....x.x.....
......xx......
......x.......
.....xx.......
..xxx.x.......
...xx.........
....x.........
..............
ENDMAP

NAME:   nicolae_tar_cuneiform_city
DEPTH:  Tar
WEIGHT: 10, 1 (Tar:$)
TAGS:   transparent decor extra allow_dup luniq tar_grunt_decor
MAP
.................
.....xxxxx.xxxxx.
......xxx...xxx..
......xxx...xxx..
.x.....x.....x...
.xxx...x.....x...
.xxxxxxxxxxxxx...
.xxx...x.....x...
.x.....x.....x...
.......x.....x...
.x.....x.....x...
.xxx...x.....x...
.xxxxxxxxxxxx....
.xxx.............
.x...............
.................
ENDMAP

NAME:    nicolae_tar_fractal_crypt
DEPTH:   Tar, !Tar:$
TAGS:    transparent
SHUFFLE: ae, bf, cg, dh
SUBST:   e : ae, f : bf, g : cg, h : dh
NSUBST:  a = + / x, b = + / x, c = + / x, d = + / x, e = + / x, f = + / x, \
         g = + / x, h = + / x, > = 1:} / 1:] / 1:) / .
SUBST:   d = x, 0 = 0009.., 9 = 998, ] = ...]>, ) = .....)>, X = ..x
SHUFFLE: }])
KMONS:   0 = 0 / 0 band w:5
KMONS:   9 = 9 band
KMONS:   8 = 8 band
MAP
xaxxxaxaxxxaxexxxexexxxex
h..x..x..x..x..x..x..x..b
xX.X.XxX.X.XxX.X.XxX.X.Xx
xxX0XxxxX0XxxxX0XxxxX0Xxx
x..X..X..X..x..X..X..X..x
h.Xx.....x.>x>.x.....xX.b
xxxxX.0.XxxxxxxxX.0.Xxxxx
h.Xx.....xxxxxxx.....xX.b
x..X..X...XXXXX...X..X..x
xxX0Xxxx.........xxxX0Xxx
x..X..xxX.0...0.Xxx..X..x
h.Xx.>xxX.......Xxx>.xX.b
xxxxxxxxX...9...Xxxxxxxxx
d.Xx.>xxX.......Xxx>.xX.f
x..X..xxX.0...0.Xxx..X..x
xxX0Xxxx.........xxxX0Xxx
x..X..X...XXXXX...X..X..x
d.Xx.....xxxxxxx.....xX.f
xxxxX.0.XxxxxxxxX.0.Xxxxx
d.Xx.....x.>x>.x.....xX.f
x..X..X..X..x..X..X..X..x
xxX0XxxxX0XxxxX0XxxxX0Xxx
xX.X.XxX.X.XxX.X.XxX.X.Xx
d.Xx..x..x..x..x..x..x..f
xgxxxgxgxxxgxcxxxcxcxxxcx
ENDMAP

NAME:    hangedman_damned_closets
TAGS:    no_monster_gen
DEPTH:   Tar, !Tar:$
ORIENT:  float
MONS:    shadow w:6 / shadow wraith / wraith w:6
MONS:    soul eater, tormentor / shadow demon w:12
MONS:    patrolling lost soul
KMONS:   56 = flayed ghost
KMONS:   78 = eidolon
KMONS:   90 = phantasmal warrior
KMONS:   AB : spectral titan / spectral ettin
KMONS:   C = patrolling revenant w:19 / patrolling tzitzimitl w:1
KFEAT:   C = } / ) / ] / > w:30 / floor w:5
SHUFFLE: 4C / 56 / 78 / 90 / AB, 567890AB, yz / yz / zy, YZ / YZ / ZY
SUBST:   X : x., y : xxx., z = ., { = {..
MAP
    xxxxxxxxxxxxxxxxxxxx
    cccccccccccccccccccx
    c.......yz.....1xxcx
    c.......yz..3...xGcx
    c.......x.......x4cx
  @cc..1..x.x...xxx.+Ccx
  .c...2...x.xxx...xxccx
  .+......ZY.......xGcxx
x..+.......YZ......x5cx
x.cc.......x...2...+6cx
x.c.xxxx..x.x..1..xxccx
x{c.....xxX.......xGcxx
..c.......Xxx.....x7cx
.cc..1..x.x..xxxx.+8cx
.+...2...x.......xxccx
.+......ZY.......xGcxx
@c.......YZ......x9cx
cc...xxx.x...2...+0cx
c.xxx...x.x..1..xxccx
c.......x.......xGcxx
c...3..zy.......xAcx
c1.....zy.......+Bcx
cccccccccccccccccccx
xxxxxxxxxxxxxxxxxxxx
ENDMAP

# A bit of a tribute to Jory's old silence vault, except
# hopefully this time with some choice in using the silence;
# the aura extends to the edge of the walls with the main doors.
NAME:    hangedman_tartarus_silent_blood_keep
TAGS:    no_monster_gen transparent patrolling
DEPTH:   Tar, !Tar:$
ORIENT:  float
WEIGHT:  5
MONS:    zombie / skeleton / spectral thing w:4
MONS:    jiangshi / phantasmal warrior w:4 / shadow wraith w:4, vampire mage
MONS:    vampire knight ; demon whip | demon trident | demon blade . \
                          plate armour | chain mail
MONS:    soul eater, tormentor w:3 / shadow demon w:1, silent spectre
KMONS:   9 = reaper / lorocyproca w:6
KMONS:   J = Jory w:9 / tzitzimitl w:1, tzitzimitl
NSUBST:  J = 1:J / *:9, 8 = 1:6 / * = 5:19 6:1
SUBST:   A : x.., B : x.., ] = ]>
MAP
          xx  xx  xx  xx  xx  xx
         xxxxxxxxxxxxxxxxxxxxxxxxx
       xxxxxxxxxxxxxxxxxxxxxxxxxxx
      ..xx..xx....2.....xx.........
    ....A......4c.3..4...B.....ccc...
  .............ccc+ccc......82ccccc..
...ccc1.......ccc.2.ccc..cccccc1c1cc.
..ccccc18ccccccc)56..ccccc....+..7cc.
.cc1c1cccc....+J.3<4.J+....cccc1c1cc.
.cc7..+....ccccc..65]ccccccc81ccccc..
.cc1c1cccccc..ccc.2.ccc.......1ccc...
..ccccc82......ccc+ccc.............
...ccc.....B...3..4.c3......A....
  .........xx.....2....xx..xx..
   xxxxxxxxxxxxxxxxxxxxxxxxxxxx
   xxxxxxxxxxxxxxxxxxxxxxxxxx
     xx  xx  xx  xx  xx  xx
ENDMAP

##############################################################################
# Ereshkigal (Tartarus)
##############################################################################

NAME:    tar_old
ORIENT:  encompass
MONS:    patrolling Ereshkigal, reaper, shadow demon, shadow
MONS:    lich / ancient lich / dread lich, shadow dragon / death drake w:1
MONS:    tzitzimitl
KMONS:   8 = ghoul
KMONS:   9 = vampire mage / vampire knight
KMONS:   0 = soul eater
KMONS:   Z = skeleton / zombie
SUBST:   ? = ?..., ? = 2., 0 = 002
SHUFFLE: 3569
: serpent_of_hell_setup(_G)
: tar_setup(_G)
MAP
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxx..............................................................xxxx
xxxx..............................................................xxxx
xxxx.................cccc..........ccc............................xxxx
xxxx.............ccccc..cccc.....ccc.cccc.........................xxxx
xxxx...........ccc.........ccccccc.....cc.........................xxxx
xxxx.........ccc........6...........V..cc.........................xxxx
xxxx........cc4........................cc...........xxxxxxxx......xxxx
xxxx........cc44xxx++xxx......D........cc..........xx......xx.....xxxx
xxxx........ccxxx......xxx.......ccc++ccc....6....xx........xx....xxxx
xxxx........cxx..........xxx.....ccc44ccc.........x..........x....xxxx
xxxx........cx............xx....cccc44cc.........xx.9......7.xx...xxxx
xxxx.......ccx.G........G.xxx7ccc..c44c..........x....||||....x...xxxx
xxxx.......cxx............xxxcc..................x....||||....x...xxxx
xxxx......ccx..............xxc...................xx.9......9.xx...xxxx
xxxx......ccx..G........G..xxc..x.........x.......x..........x....xxxx
xxxx......ccx..............xcc......??............xx........xx....xxxx
xxxx.......cxx............xxc......2222............xx......xx.....xxxx
xxxx.......ccx.G........G.xcc.......??..............xxxxxxxx......xxxx
xxxx........cx7..........7xc......................................xxxx
xxxx........cxx....17....xxc....x.........x.......................xxxx
xxxx........ccxxx......xxxcc......................................xxxx
xxxx........cccc+xxxxxx+cccc.................................3....xxxx
xxxx........cc$$cccccccc$$cc......................................xxxx
xxxx.........cc$$$$O$$$$$cc.......................................xxxx
xxxx..........cccccccccccc......x.........x............V..........xxxx
xxxx..............................................................xxxx
xxxx...........................................cccccccccccccccc...xxxx
xxxx...........................................cccccccccccccccc...xxxx
xxxx..................................6........cc$$$$$xx|||||cc...xxxx
xxxx.......3........V...........x.........x....cc$$$$$xx|||||cc...xxxx
xxxx................................7..........ccxxcccccccccccc...xxxx
xxxx...........................................ccxxcccccccccccc...xxxx
xxxx...........................................cc44744xx00000cc...xxxx
xxxx.......ccccccccc+ccccccccc.................cc44444xx88888cc...xxxx
xxxx.......c.................c..x.........x..ccccccccccccxxxxcc...xxxx
xxxx.......c.x.x.x.x.x.x.x.x.c.................ccccccccccxxxxcc...xxxx
xxxx.......c.................c......................+........cc...xxxx
xxxx.......cx5x.x.x.x.x.x.x5xc......................+........cc...xxxx
xxxx.......c.................c.................ccccccccccxxxxcc...xxxx
xxxx.......c.x.x.x.x5x.x.x.x.c..x.........x..ccccccccccccxxxxcc...xxxx
xxxx.......c.................c.................ccZZZZZxx88888cc...xxxx
xxxx.......cxxxxxxx.x.xxxxxxxc.................ccZZZZZxx00000cc...xxxx
xxxx.......c$$$$$$x....x$$$||c.................ccxxcccccccccccc...xxxx
xxxx.......c$x$$x$xx.x.x$x$x|c.................ccxxcccccccccccc...xxxx
xxxx.......c||||||+....+$$$||c..x....3....x....cc||xx444xx|||cc...xxxx
xxxx.......ccccccccccccccccccc.................cc||xx444xx|7|cc...xxxx
xxxx...........................................cccccccccccccccc...xxxx
xxxx...........................................cccccccccccccccc...xxxx
xxxx..............................................................xxxx
xxxx..............................................................xxxx
xxxx........(...........................................[.........xxxx
xxxx..............................................................xxxx
xxxx..............................................................xxxx
xxxx..............................{...............................xxxx
xxxx..............................................................xxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
ENDMAP


##############################################################################
# Ereshkigal (Tartarus) by Mu.
##############################################################################
NAME:     tar_mu
ORIENT:   encompass
MONS:     patrolling Ereshkigal, tzitzimitl, reaper, soul eater, shadow demon
MONS:     shadow dragon, shadow wraith
KMONS:    8 = shadow imp
: serpent_of_hell_setup(_G)
SUBVAULT: = : tar_mu_maze
# position of the loot chamber varies
SHUFFLE:  AB
SUBST:    A = %
SUBST:    B = x
KFEAT:    % = .
KMONS:    % = soul eater w:20 / shadow wraith w:15 / reaper w:5 / nothing w:20
KITEM:    % = | / $
SUBST:    4 = 3333444455566778
KMONS:    s = eidolon
KMONS:    t = phantasmal warrior
: tar_setup(_G)
MAP
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxx..............................................................xxxx
xxxx.4.............................4.........................(..{.xxxx
xxxx..ccccccccccccccccccccccccccccc...............................xxxx
xxxx..c===========================+...............................xxxx
xxxx..c===========================c.............................[.xxxx
xxxx..c===========================c...............................xxxx
xxxx..c===========================c...............................xxxx
xxxx..c===========================c..............3ccccccc3........xxxx
xxxx..c===========================c............7ccccccccccc7......xxxx
xxxx..c===========================c...........3ccccc$$$ccccc3.....xxxx
xxxx..c===========================c..........7cccc$$$$$$$cccc7....xxxx
xxxx..c===========================c..........7ccc$$$$$$$$$ccc7....xxxx
xxxx..c===========================c..........ccc$$$$$$$$$$$ccc....xxxx
xxxx..c===========================c..........ccc.2.$$$$$.2.ccc....xxxx
xxxx..c===========================c.........ccc....xxxxx....ccc...xxxx
xxxx..c===========================c.........ccc..xxxxxxxxx..ccc...xxxx
xxxx..c===========================c.........cc..xxxxxxxxxxx..cc...xxxx
xxxx..c===========================c.........cc+cxxxxxxxxxxxc+cc...xxxx
xxxx..c===========================c.........cc.c...........c.cc...xxxx
xxxx..c===========================c.........cc.c.xxxxxxxxx.c.cc...xxxx
xxxx..c===========================c.........cc.c+xxxxxxxxc+c.cc...xxxx
xxxx..c===========================c.........cc.c.xx.444.xc.c.cc...xxxx
xxxx..c===========================c.........cc.c.cx.444.xc.c.cc...xxxx
xxxx..c===========================c.........cc.c.cxxxxxxxc.c.cc...xxxx
xxxx..c===========================c.........cc.c.cccxxxccc.c.cc...xxxx
xxxx..c===========================c.........cc.c...cxxxc...c.cc...xxxx
xxxx..c===========================c.........cc.c.cccxxxccc.c.cc...xxxx
xxxx..c===========================c.........cc.c.cx|2.2|xc.c.cc...xxxx
xxxx..c===========================c.........cc.c.cx|$$$|xc.c.cc...xxxx
xxxx..c===========================c.........cc.c.ccccxcccc.c.cc...xxxx
xxxx..c===========================c.........cc.c....cxc....c.cc...xxxx
xxxx..c===========================c.........cc.c.ccccxcccc.c.cc...xxxx
xxxx..c===========================c.........cc.c.cxx|||xxc.c.cc...xxxx
xxxx..c===========================c.........cc.c.cxx|||xxc.c.cc...xxxx
xxxx..c===========================c.........cc+c.ccccccccc.c+cc...xxxx
xxxx..c===========================c..........c.c.....c.....c.c....xxxx
xxxx..c===========================c............c...........c......xxxx
xxxx..c===========================c...............................xxxx
xxxx..c===========================c...............4.4.4.4.........xxxx
xxxx..c===========================c................4...4..........xxxx
xxxx..c===========================c...........x.................xxxxxx
xxxx..c===========================c..........xxx...............xxxxxxx
xxxx..c===========================c.........xxxxxx+xxxxxxxxx+xxxxxxxxx
xxxx..c===========================c.........xxxxxx.x|$...$|x.xxxxxxxxx
xxxx..ccccccccccccc===============c.........xxxxxx.xxx2.2xxx.xxxAAAAxx
xxxx..cc..........+===============c........xxxxxxx.xxxxxxxxx.xxxAAAAxx
xxxx..cc..........c===============c........xxxxxxx..xxxxxxx..xxxAAAAxx
xxxx..cc..........c===============c........xxxxxxxx.........xxxxAAAAxx
xxxx..cc....2.....c===============c.......xxxxxxxxxx.......xxxxxxxxxxx
xxxx..cc.s...2..s.c===============c.......xxxxxxxxxxx.....xxAAAAAAAAxx
xxxx..cc.7..1...7.c===============c......xxBBBBBBBxxxx...xxxAAAAAAAAxx
xxxx..cc..........c===============c......xxBBBBBBBxxxxx.xxxxAAAAAAAAxx
xxxx..cc..........c===============c.....xxxBBBBBBBxxxxx+xxxxxxxxxxxxxx
xxxx..cc.5.t..t.5.c===============c.....xxxxxxxxxxxx..............$$xx
xxxx..cc.$$$O$$$$.ccccccccccccccccc.....xxBBBBxBBBBx.4...4.......$$$xx
xxxx..ccccccccccccccccccccccccccccc.....xxBBBBxBBBBx...4..4.....$$$$xx
xxxx.4..............................4..xxxBBBBxBBBBx.2..4..4...$$$$$xx
xxxx..................................xxxxBBBBxBBBBx..........$$$$$$xx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
ENDMAP

NAME:     tar_mu_maze
# only to shut up the validator
ORIENT:   encompass
TAGS:     tar_mu_maze no_rotate no_hmirror no_vmirror unrand
: tar_dig_maze(_G, 0, 0)
NSUBST:   L = 2:M / 3 = M. / 5:N / 5:P / 5:V / 1:L / *:.
NSUBST:   . = 5:Q / *:.
KFEAT:    L = zot trap
KMONS:    M = tzitzimitl
KFEAT:    N = floor
KITEM:    N = superb_item
KMONS:    N = patrolling tzitzimitl / patrolling soul eater
KFEAT:    P = floor
KITEM:    P = star_item
KMONS:    P = patrolling reaper / nothing
KMONS:    Q = generate_awake unseen horror
SUBST:    V = V / .
MAP
ccccccccccccccccccccccccccc
ccccccccccccccccccccccccccc
ccccccccccccccccccccccccccc
ccccccccccccccccccccccccccc
ccccccccccccccccccccccccccc
ccccccccccccccccccccccccccc
ccccccccccccccccccccccccccc
ccccccccccccccccccccccccccc
ccccccccccccccccccccccccccc
ccccccccccccccccccccccccccc
ccccccccccccccccccccccccccc
ccccccccccccccccccccccccccc
ccccccccccccccccccccccccccc
ccccccccccccccccccccccccccc
ccccccccccccccccccccccccccc
ccccccccccccccccccccccccccc
ccccccccccccccccccccccccccc
ccccccccccccccccccccccccccc
ccccccccccccccccccccccccccc
ccccccccccccccccccccccccccc
ccccccccccccccccccccccccccc
ccccccccccccccccccccccccccc
ccccccccccccccccccccccccccc
ccccccccccccccccccccccccccc
ccccccccccccccccccccccccccc
ccccccccccccccccccccccccccc
ccccccccccccccccccccccccccc
ccccccccccccccccccccccccccc
ccccccccccccccccccccccccccc
ccccccccccccccccccccccccccc
ccccccccccccccccccccccccccc
ccccccccccccccccccccccccccc
ccccccccccccccccccccccccccc
ccccccccccccccccccccccccccc
ccccccccccccccccccccccccccc
ccccccccccccccccccccccccccc
ccccccccccccccccccccccccccc
ccccccccccccccccccccccccccc
ccccccccccccccccccccccccccc
ccccccccccccccccccccccccccc
ccccccccccccccccccccccccccc
           cccccccccccccccc
           cccccccccccccccc
           cccccccccccccccc
           cccccccccccccccc
           cccccccccccccccc
           cccccccccccccccc
           cccccccccccccccc
           cccccccccccccccc
           cccccccccccccccc
           cccccccccccccccc
ENDMAP

##############################################################################
# Ereshkigal (Tartarus) by minmay
##############################################################################

NAME:   tar_minmay_river
ORIENT: encompass
MONS:   patrolling Ereshkigal, reaper, shadow demon, tzitzimitl, soul eater
FTILE:  "5!?^ = floor_green_bones
SUBST:  5 = 5:10 3:1
NSUBST: " = 2:4 / 4:3
NSUBST: 2 = 3:4 / *:2
NSUBST: w = 3=Ew / 20=Fw / *:w
NSUBST: ! = 2:. / *:c
NSUBST: ? = 2:. / *:c
NSUBST: ^ = 2:. / *:c
KMONS:  E = spectral kraken
KMONS:  F = spectral swamp worm
KFEAT:  EFw = deep_water
KMASK:  Ww = no_monster_gen
: serpent_of_hell_setup(_G)
: tar_setup(_G)
: set_border_fill_type("permarock_wall")
MAP
cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
ccc$$$$$cccc........cccc$$$$$c|||||O||||||c$$$$$cccc........cccc$$$$$ccc
ccc$$$ccc....cccccc....ccc$$$c|cccccccccc|c$$$ccc....cccccc....ccc$$$ccc
ccc$$cc...cccc....cccc...cc$$c+c........c+c$$cc...cccc....cccc...cc$$ccc
ccc$cc..ccc....cc....ccc..cc+cc....14....cc+cc..ccc....cc....ccc..cc$ccc
ccc$c..cc...cccccccc...cc...2c............c2...cc...cccccccc...cc..c$ccc
ccc+c.cc..ccc......ccc..cc..cc............cc..cc..ccc......ccc..cc.c+ccc
ccc2..c..cc...cccc...cc..c..c4............4c..c..cc...cccc...cc..c..2ccc
cccc.cc.cc..ccc..ccc..cc.cc.c..............c.cc.cc..ccc..ccc..cc.cc.cccc
cccc.c..c..cc......cc..c..c.c....cc++cc....c.c..c..cc......cc..c..c.cccc
ccc..c.cc.cc..cccc..cc.cc.c.c...cc....cc...c.c.cc.cc..cccc..cc.cc.c..ccc
ccc.cc.c..c..cc..cc..c..c.c.cc..c......c..cc.c.c..c..cc..cc..c..c.cc.ccc
ccc.c..c.cc.cc....cc.cc.c....c.cc...D..cc.c....c.cc.cc....cc.cc.c..c.ccc
ccc.c.cc.c..c..cc.+2..c.c....c.c........c.c....c.c..2+.cc..c..c.cc.c.ccc
ccc.c.cc.c..c..cc.ccc.c.c....c.c........c.c....c.c.ccc.cc..c..c.cc.c.ccc
ccc.c..c.cc.cc......c.c.c....c3c........c3c....c.c.c......cc.cc.c..c.ccc
ccc.cc.c..c..cc+c...c...c2cc2ccccc++++ccccc2cc2c...c...c+cc..c..c.cc.ccc
ccc..c.cc.cc..c2c...ccc.c+c...cc........cc...c+c.ccc...c2c..cc.cc.c..ccc
cccc.c..c..cc...cccc33c...c...c..........c...c...c33cccc...cc..c..c.cccc
cccc.cc.cc..ccc....c33cccccc..c..c....c..c..cccccc33c....ccc..cc.cc.cccc
cccc..c..cc...cccc.ccc|||c.c.....c....c.....c.c|||ccc.cccc...cc..c..cccc
ccccc.cc..ccc........c||cc.cc...cc....cc...cc.cc||c........ccc..cc.ccccc
ccc.c..cc...cccccccc.c|cc...cc2cccc33cccc2cc...cc|c.cccccccc...cc..c.ccc
ccc.cc..ccc..2....2+.ccc.....cccc2cccc2cccc.....ccc.+2....2..ccc..cc.ccc
ccc..cc...cccc....cccc............................cccc....cccc...cc..ccc
cc..............WWWWWWWWWWWWWWWWWWWWWWW...............................cc
cc..WWWWWWWWWWWWWWwwwwwwwwwwwwwwWwwwwwWWWWWWWW........................cc
ccWWWWwwwwwwwwwwwWwwwwwwwwwwwwwWwwwwwwwwwwwwWWWWWWWWWW................cc
ccwwwwWwwwwwwwwwwWwwwwwwwwwwwwwWwwwwwwwwwwwwWwwwwwwwwWWWWWWWWWWWWW....cc
ccwwwwWwwwwwwwwwwwWwwwwwwwwwwwwWwwwwwwwwwwwWwwwwwwwwwwwWwwwwwwwwwWWWWWcc
ccwwwwWwwwwwwwwwwwWwwwwwwwwwwwwWwwwwwwwwwwwWwwwwwwwwwwWwwwwwwwwwwWwwwwcc
ccwwwwwWwwwwwwwwwwWwwwwwwwwwwwWwwwwwwwwwwwWwwwwwwwwwwwWwwwwwwwwwwWwwwwcc
ccwwwwwWwwwwwwwWWWWWWWWWWWWWWWWWWWwwwwwwwwWwwwwwwwwwwwWwwwwwwwwwwWwwwwcc
ccwwwWWWWWWWWWWWcc""""""""""cccccWWWWWWwwwWwwwwwwwwwwWwwwwwwwwwwwWwwwwcc
ccWWWW"""^^^^^ccc^^^ccccccc^^c""c"""""WWWWWWWWwwwwwwwWwwwwwwwwwwWwwwwwcc
cc"""""""c""""""c""""c5"c""""c""c""""""""""""WWWWWWWWWWWwwwwwwwwWwwwwwcc
ccc^^^cccc""c""""""""c""c""""c"""""c^^^cccc"""""""""c""WWWWWWWWWWWWWwwcc
ccc""""c""""c""c"""ccc"""""""cc""""c""""""cccccc^^^^cccc"""""""""""WWWcc
ccc""ccc""""c""c"""""c""""c""c"""c"c"""c"5c""""""""""""c^^^^c^^^c"""""cc
ccc""""c""""c""c"""""""cccc""c5""c"c"""cccc"""""c""""c""""""c"""c"c""ccc
cccc""""""ccccccccc""""c""c""cccccccc"""c"c"""c"c""ccccc""""c""ccccccccc
ccc""""""""c"""c"5cc""""""c""c""""""""""c"""""c"c"""c5""""""""cc5""c"ccc
cc""""c""""c""""""c"""""""c"""""""c"""""""""cccccc??c""""c"""""c"""""ccc
cc""ccc""""c""""""c""cccccc"""""""c""""""c"""""c""""ccccccc"""cc"""""ccc
cc""""c"""??"""cccc"""""c"""""""ccc""""""c""""cc""""c"5c"""""""cccc""ccc
cc""""ccccc"""""""c"""""c"""""""""c""""""c"""??c""c""""c"""""""""c"""ccc
cc"""""5c""""c""""c????cc"""""c""5c"""cc"ccccc""""c""""c""c""""""c""""cc
cc??ccccc""""c""""""""""c???cccccccc???c"""c""""""c""ccc""ccc????c""""cc
cc""""""c""""c""""""""""c"""""c""""""""c""5ccccc""c""""c??c"""""""""""cc
ccc""""""""""c"c"""""""""""cccc""""""""ccccc""""""c"""""""c""c"""cccc"cc
ccc"""""""""ccccccccccc"""""""c""""""""""""c""""""c"""""ccccccc""c5"""cc
cccccc""""ccc"""5c""""""""""""c""""""""""""c"""ccccc"""cc""""""""cc"""cc
ccc5""""""""c""""c""""""""c"""""""""ccc""""c"""c""5cc"""""cc"""""c""cccc
ccc""""""""""""""cccc!!!!"c!!!!!ccccc""""""""""c"""c"""""""cccc!!!!!!ccc
ccccc!!!!!!!!!cccc""""""c"c""""""c""cccccc!!!""c"""ccc!!!ccc"""""""""ccc
cc"""""""c""""c"c"""""""cccc"""""c""c5""""""cccc"ccc"""""""c""""c""ccccc
cc""""""cc""""c"c""""""""""c""""""""c""""""""""c"""""""""""c""cccc"""ccc
cc"""""""c""""c""""""""c""5cccc""""ccc""""""""cc"""""""c"cccccc"c""""ccc
cc"""""cccc"""c"""""""cccccc"""""""""c"""""""""""""ccccc"c"""5c"c"""""cc
ccc"""""""cc"""""c""""""c""c"""""c"""c""""""c""""""""""ccc""""c"""""c"cc
ccc"c"""""c""""""c""""""c""""""ccc""""""""""c""""""""""""c""ccc""c""c"cc
cccccccc""c""""""cccc"""c""""""""ccccccc"""ccc"""""""""""c"""""""ccccccc
ccc...c"""""""cccc""""""c""cc""""c...c"""""""c""""""c""""c""""""cc...ccc
ccc.{..""""""""c"""""c""""""cc"""c.(.."""c""5cccc"""c"c""""""c"""..[.ccc
ccc...c""""""""c"""""c""""""c"""cc...c"""ccccc""""""c"c""""""c"""c...ccc
cccccccccc"""""""""ccccccc"""""""ccccc"""""""""""""ccccc""""cccccccccccc
cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
ENDMAP

##############################################################################
# Ereshkigal (Tartarus) by Grunt
##############################################################################

NAME:   tar_grunt
TAGS:   overwritable
ORIENT: encompass
{{
  extend_map{width = 70, height = 70}
  fill_area{fill = 'X', border = 'x'}
  fill_area{x1 = 2, y1 = 2, x2 = 67, y2 = 67, fill = '_', border = '-'}
  fill_area{x1 = 4, y1 = 4, x2 = 65, y2 = 65, fill = '.'}
  subst('X = xx.')
  subst('- = x.')
  subst('_ = x..')
  -- The remove_isolated_glyphs doesn't seem to consistently get rid of
  -- pockets in the border, so...
  kprop('X-_ = no_tele_into')
  remove_isolated_glyphs { find = '.', replace = 'x', percent = 100 }
  tar_setup(_G)
  hook("post_place", function()
    local map, vplace = dgn.resolve_map(dgn.map_by_tag("tar_grunt_ereshkigal"))
    local x = (dgn.GXM / 2) - 5 + crawl.random2(11)
    local y = (dgn.GYM / 2) - 5 + crawl.random2(11)
    local res = dgn.place_map(map, false, true, x, y)
    if not res then
      error("Failed to place Ereshkigal chamber somehow!")
    end
    dgn.place_maps{tag="tar_grunt_big_loot",    count=1, die_on_error = true}
    dgn.place_maps{tag="tar_grunt_small_loot",  count=3}
    dgn.place_maps{tag="tar_grunt_decor",       count=15}
    dgn.place_maps{tag="tar_grunt_mons1",       count=10}
    dgn.place_maps{tag="tar_grunt_mons2",       count=10}
  end)
}}

NAME:    tar_grunt_ereshkigal
TAGS:    tar_grunt_ereshkigal unrand
MONS:    patrolling Ereshkigal, Tzitzimitl, shadow demon / reaper
MONS:    lich w:40 / ancient lich / dread lich
KMASK:   O = no_item_gen
KITEM:   O = bone rune of Zot
: serpent_of_hell_setup(_G)
: tar_dig_maze(_G, 9, 21)
KFEAT:   - = floor
NSUBST:  L = 2:2 / 3:4 / 8:3 / *:.
MAP
ccccccccccccccccccccc
ccccccc$$$O$$$ccccccc
ccccccc$$$$$$$ccccccc
ccccccc$.....$ccccccc
ccccccc...1...ccccccc
ccccccc.......ccccccc
ccccccc..2.2..ccccccc
ccccccc.......ccccccc
ccccccccc+++ccccccccc
ccccccccc---ccccccccc
ccccccccccccccccccccc
ccccccccccccccccccccc
ccccccccccccccccccccc
ccccccccccccccccccccc
ccccccccccccccccccccc
ccccccccccccccccccccc
ccccccccccccccccccccc
ccccccccccccccccccccc
ccccccccccccccccccccc
ccccccccccccccccccccc
ccccccccccccccccccccc
ccccccccc---ccccccccc
ccccccccc+++ccccccccc
       ........
       xx3.4xx
       xx.D.xx
       .......
       xx...xx
       xx...xx
       .......
        x...x
        .....
        x...x
        .....
        x...x
        .....
        x.2.x
ENDMAP

NAME: tar_grunt_big_loot
TAGS: tar_grunt_big_loot unrand
MONS: Tzitzimitl / shadow dragon, shadow demon / reaper
MONS: lich w:40 / ancient lich / dread lich
MAP
..................
.cccccccccccccccc.
.c|$x.2c||c2.x$|c.
.c$.x..c||c..x.$c.
.c..c..c||c..c..c.
.c..c$|c$$c|$c..c.
.c..c|$c$$c$|c..c.
.c..c..c$$c..c..c.
.c..c..c22c..c..c.
.c2.c3.c13c.3c.2c.
.c..cxxcxxcxxc..c.
.c..c$...1..$c..c.
.c..c|$.3..$|c..c.
.c..cccccccccc..c.
.c$.x..1..2..x.$c.
.c|$x........x$|c.
.ccccccc++ccccccc.
........@@........
ENDMAP

NAME:   tar_grunt_small_loot
TAGS:   tar_grunt_small_loot allow_dup unrand no_exits
MONS:   shadow demon w:20 / reaper w:15 / shadow wraith w:10 / soul eater w:5
NSUBST: x = 1:m / *:x
MAP
cccxccc
c..$..c
c.$|$.c
x$|1|$x
c.$|$.c
c..$..c
cccxccc
ENDMAP

NAME:   tar_grunt_small_decor_pillar
TAGS:   tar_grunt_decor transparent allow_dup unrand no_exits
WEIGHT: 60
{{
  local size = crawl.random2(6) + 1
  local glyphs = { {'A', 2},
                   {'B', 3},
                   {'C', 4},
                   {'D', 5},
                   {'E', 6} }
  for i = 1, #glyphs do
    if size >= glyphs[i][2] then
      subst(glyphs[i][1] .. ' = x')
    else
      clear(glyphs[i][1])
    end
  end
}}
MAP
xABCDE
AABCDE
BBBCDE
CCCCDE
DDDDDE
EEEEEE
ENDMAP

NAME: tar_grunt_decor_1
TAGS: tar_grunt_decor transparent allow_dup unrand
SUBST: G : GV
MAP
...
.G.
...
ENDMAP

NAME: tar_grunt_decor_3
TAGS: tar_grunt_decor transparent allow_dup unrand
SUBST: G : GV
MAP
 .....
...G...
.G...G.
.......
ENDMAP

NAME: tar_grunt_decor_4
TAGS: tar_grunt_decor transparent allow_dup unrand
SUBST: G : GV
MAP
......
.G..G.
......
......
.G..G.
......
ENDMAP

NAME: tar_grunt_decor_6
TAGS: tar_grunt_decor transparent allow_dup unrand
SUBST: G : GV
MAP
 ......
 .G..G.
........
.G....G.
........
 .G..G.
 ......
ENDMAP

NAME: tar_grunt_decor_8
TAGS: tar_grunt_decor transparent allow_dup unrand
SUBST: G : GV
MAP
  ......
 ..G..G..
..........
.G......G.
..........
.G......G.
..........
 ..G..G..
  ......
ENDMAP

NAME: tar_grunt_decor_cross_ortho
TAGS: tar_grunt_decor transparent allow_dup unrand
MAP
  ....
  .xx.
...xx...
.xxxxxx.
.xxxxxx.
...xx...
  .xx.
  ....
ENDMAP

NAME: tar_grunt_decor_cross_diag
TAGS: tar_grunt_decor transparent allow_dup unrand
MAP
...  ...
.xx..xx.
.xxxxxx.
 .xxxx.
 .xxxx.
.xxxxxx.
.xx..xx.
...  ...
ENDMAP

NAME: tar_grunt_decor_circle_5
TAGS: tar_grunt_decor transparent allow_dup unrand
SUBST: G : GV
MAP
  ...
 .xxx.
.x...x.
.x.G.x.
.x...x.
 .xxx.
  ...
ENDMAP

NAME: tar_grunt_decor_octagon_7
TAGS: tar_grunt_decor transparent allow_dup unrand
SUBST: G : GV
MAP
   ...
  .xxx.
 .x...x.
.x.....x.
.x..G..x.
.x.....x.
 .x...x.
  .xxx.
   ...
ENDMAP

NAME:    tar_grunt_mons_1
TAGS:    tar_grunt_mons_1 transparent allow_dup unrand
MONS:    shadow imp
MAP
1
ENDMAP

NAME:    tar_grunt_mons_2
TAGS:    tar_grunt_mons_2 transparent allow_dup unrand
MONS:    soul eater
MAP
1
ENDMAP

##############################################################################
# Ereshkigal (Tartarus) Cathedral by Grunt
##############################################################################

NAME:     tar_grunt_cathedral
ORIENT:   encompass
MONS:     patrolling Ereshkigal, patrolling tzitzimitl, reaper, shadow demon
MONS:     lich w:40 / ancient lich / dread lich, shadow dragon
MONS:     shadow wraith / soul eater
NSUBST:   K = 1:D / *:.
: serpent_of_hell_setup(_G)
NSUBST:   P = 1:O / *:|
KITEM:    $ = $ no_pickup
SHUFFLE:  {([<
: tar_setup(_G)
MAP
ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
ccccccc.........................ccccc.........................ccccccc
ccccc7.........................................................7ccccc
ccc..............................7.7..............................ccc
c.....7cc.....................ccccccccc.....................cc7.....c
c....cccccc.................ccc|||||||ccc.................cccccc....c
c..cccccccccc.............ccc...........ccc.............cccccccccc..c
c..cccccccccccc....{....ccc......5.5......ccc....[....cccccccccccc..c
c..cccccccccccccc.....ccc......ccccccc......ccc.....cccccccccccccc..c
c..cccccccccccccccccccc......ccc.....ccc......cccccccccccccccccccc..c
c..+......c...+...ccc......ccc.........ccc......ccc...+...c......+..c
c..+......+.4.+.6.+..7...ccc.............ccc...7..+.6.+.4.+......+..c
c..c...6..+.3.c...+....ccc.................ccc....+...c.3.+..6...c..c
c..c......c..ccc++c++ccc.....................ccc++c++ccc..c......c..c
c..c..ccccc||cc...+.............ccccc.............+...cc||ccccc..c..c
c..c..cccccccc.7..+............cc$P$cc............+..7.cccccccc..c..c
c..c..ccccccc...ccc..6.........c.ccc.c.........6..ccc...ccccccc..c..c
c..c..cccccc...cc..............c.ccc.c..............cc...cccccc..c..c
c..c..ccccc...cc...........4...c.....c...3...........cc...ccccc..c..c
c..c..ccccc..cc.........cc.....c..2..c.....cc.........cc..ccccc..c..c
c..c..ccccc..c.........cccc....cc...cc....cccc.........c..ccccc..c..c
c..c..ccccc..c.........cccc.....c...c.....cccc.........c..ccccc..c..c
c..c......c..c..........cc......c...c......cc..........c..c......c..c
c..c...7..+..c........3.......................4........c..+..7...c..c
c..c......+..c..............K...........K..............c..+......c..c
c..c......c..c.........................................c..c......c..c
c..c..ccccc..c......cccccc.....cc...cc.....cccccc......c..ccccc..c..c
c..c..ccccc..c.....cc....ccc...c.....c...ccc....cc.....c..ccccc..c..c
c.7c..ccccc$3c.....c$cc.......................cc$c.....c4$ccccc..c7.c
c..c..ccccc$$c.....cPcc.2.........1.........2.ccPc.....c$$ccccc..c..c
c.7c..ccccc$4c.....c$cc.......................cc$c.....c3$ccccc..c7.c
c..c..ccccc..c.....cc....ccc...c.....c...ccc....cc.....c..ccccc..c..c
c..c..ccccc..c......cccccc.....cc...cc.....cccccc......c..ccccc..c..c
c..c......c..c.........................................c..c......c..c
c..c......+..c.........................................c..+......c..c
c..c...7..+..c..............K...........K..............c..+..7...c..c
c..c......c..c........4.........c...c.........3........c..c......c..c
c..c..ccccc..c..........cc......c...c......cc..........c..ccccc..c..c
c..c..ccccc..c.........cccc....cc...cc....cccc.........c..ccccc..c..c
c..c..ccccc..cc........cccc....c..2..c....cccc........cc..ccccc..c..c
c..c..ccccc...cc........cc.....c.....c.....cc........cc...ccccc..c..c
c..c..cccccc...cc..........3...c.ccc.c...4..........cc...cccccc..c..c
c..c..ccccccc...ccc..6.........c.ccc.c.........6..ccc...ccccccc..c..c
c..c..cccccccc.7..+............cc$P$cc............+..7.cccccccc..c..c
c..c..ccccc||cc...+.............ccccc.............+...cc||ccccc..c..c
c..c......c..ccc++c++ccc.....................ccc++c++ccc..c......c..c
c..c...6..+.3.c...+....ccc.................ccc....+...c.3.+..6...c..c
c..+......+.4.+.6.+..7...ccc.............ccc...7..+.6.+.4.+......+..c
c..+......c...+...ccc......ccc.........ccc......ccc...+...c......+..c
c..cccccccccccccccccccc......ccc.....ccc......cccccccccccccccccccc..c
c..cccccccccccccc.....ccc......ccccccc......ccc.....cccccccccccccc..c
c..cccccccccccc....(....ccc......5.5......ccc....<....cccccccccccc..c
c..cccccccccc.............ccc...........ccc.............cccccccccc..c
c....cccccc.................ccc|||||||ccc.................cccccc....c
c.....7cc.....................ccccccccc.....................cc7.....c
ccc..............................7.7..............................ccc
ccccc7.........................................................7ccccc
ccccccc.........................ccccc.........................ccccccc
ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
ENDMAP
