###############################################################################
# abyss.des: abyss random minivaults and abyssal rune vaults.
#
# Abyss vaults are picked by tag.
#
# Abyssal vaults should usually be minivaults and floating vaults. Encompass
# vaults will be rejected at compile time, and other orientations will produce
# weird results.

# 1/3 chance to appear on D:21-27, and guaranteed on D:25.
NAME: abyss_entry
TAGS: extra allow_dup can_overwrite replace_portal
DEPTH: D:21-27
CHANCE: 100% (D:25), 3333
: if you.where() == 'D:25' then
KFEAT: O = enter_abyss no_mimic
: else
KFEAT: O = enter_abyss
: end
MAP
O
ENDMAP

###############################################################################
# abyss random vaults
###############################################################################

###############################################################################
# Dummy vaults
NAME: abyss_furniture_dummy
TAGS: abyss dummy
CHANCE: 0 : 90%

NAME: abyss_rune_dummy
TAGS: abyss_rune dummy
CHANCE: 0 : 10%

NAME: abyss_exit_dummy
TAGS: abyss_exit dummy
CHANCE: 0 : 90%

###############################################################################
NAME: abyss_furniture_001
TAGS: abyss allow_dup
MAP
G.G
.V.
G.G
ENDMAP

#################################################################
# Ecumenical Temple... (1KB)
# 'cuz the fun haters removed overflow temples from the Abyss...
NAME:    abyss_greek_temple
TAGS:    no_rotate abyss
NSUBST:  . = 3:1 / 2:2 / *:.
SUBST:   ' = .
COLOUR:  " : white w:5 / none
SUBST:   " = .
MONS:    plant, bush
SHUFFLE: ABCDEFHIJKLMNOP
KFEAT:   A = altar_makhleb
KFEAT:   B = altar_xom
KFEAT:   C = altar_zin
KFEAT:   D = altar_the_shining_one
KFEAT:   E = altar_kikubaaqudgha
KFEAT:   F = altar_yredelemnul
KFEAT:   H = altar_vehumet
KFEAT:   I = altar_okawaru
KFEAT:   J = altar_sif_muna
KFEAT:   K = altar_trog
KFEAT:   L = altar_nemelex_xobeh
KFEAT:   M = altar_elyvilon
KFEAT:   N = altar_fedhas
KFEAT:   O = altar_cheibriados
KFEAT:   P = altar_ashenzari
MAP
''''''...............
''ccccccccccccccc....
''G'c"""""""""""ctt..
''''c"A"B"C"D"E"ctt..
''G'c"""""""""""cttt.
''''+"P"F"H"I"J"ctt..
''G'c"""""""""""ct...
''''c"K"L"M"N"O"ct..t
''G'c"""""""""""ct...
''ccccccccccccccct...
.......t......ttt....
ENDMAP

# Inspired by a bug which turned Lemuel's castle moat into draconians,
# a little outpost with either easier interior or exterior. ~HangedMan
NAME:   hangedman_abyss_monster_moat
TAGS:   abyss
MONS:   fire bat / bat simulacrum / spectral bat / vampire bat, \
        vampire, vampire knight / vampire mage w:7, \
        crimson imp / white imp / shadow imp / iron imp, \
        kobold demonologist, deep elf summoner / orc sorcerer w:7, \
        tarantella / vampire mosquito w:4 / rock worm w:3 / yellow wasp w:8
KMONS:  8 = demonic crawler
KMONS:  9 = emperor scorpion / spiny worm w:7
KMONS:  D = chaos spawn w:7 / ugly thing w:4 / small abomination / shapeshifter w:2
KMONS:  E = large abomination
KMONS:  F = very ugly thing / glowing shapeshifter w:7
SHUFFLE: 123/456/789/DEF
SUBST:  C = xccv
MAP
 CCCC  CCCCCCCCCC  CCCC
CC 1cccc+2....2+cccc1 CC
C 11n|3.ccc++ccc.3|n11 C
C 11c3|3c1 .. 1c3|3c11 C
  11ccncc11..11ccncc11
   11111111..11111111
    111111 .. 111111
 CC                  CC
  CCCCCC        CCCCCC
ENDMAP

NAME:   hangedman_abyss_sting
TAGS:   abyss no_item_gen no_monster_gen
KMONS:  1 = orange demon
KMONS:  2 = red wasp / yellow wasp / bumblebee w:2
KMONS:  3 = death drake / green death
KFEAT:  123 = W
KITEM:  23 = honeycomb / royal jelly w:2 / nothing
MAP
 xxxxxxx
xx22222xx
x2222222x
x22++xx3x
x22+1 xxx
x22x 1 xx
x22xx W x
xx23xx W
 xxxxxx W
ENDMAP

# "(He) opened the mailbox. There was nothing inside. Nothing after nothing came pouring out."
NAME:   not_minivault_9_hangedman
TAGS:   abyss
MARKER: X = lua: props_marker { connected_exclude="true" }
SUBST:  X = =
MONS:   lorocyproca / vapour / ghost moth w:2, unseen horror / shadow wraith
MAP
XXXXXXXXXX
XmXXmmXXmX
XXXXXXXXXX
XXX1111XXX
XmX1221XmX
XmX1221XmX
XXX1111XXX
XXXXXXXXXX
XmXXmmXXmX
XXXXXXXXXX
ENDMAP

NAME:   hangedman_abyss_overflow_altar
TAGS:   abyss no_item_gen no_monster_gen no_pool_fixup
MONS:   stone golem
KFEAT:  A = altar_lugonu
KFEAT:  B = permadry_fountain
SUBST:  x = xcv++, y = ..w, z = Wl
MAP
yyyyyyyy
yxxxxxxy
yxzzzzxy
yxzA1zxy
yxz.Bzxy
yxzzzzxy
yxxxxxxy
yyyyyyyy
ENDMAP

NAME:   hangedman_abyss_mock_shop
TAGS:   abyss no_monster_gen patrolling
KMONS:  1 = water elemental / nothing w:5
KMONS:  2 = statue name:archer tile:mons_statue_archer \
        n_adj; longbow ego:chaos . arrow q:40
KFEAT:  0 = abandoned_shop
KFEAT:  1 = permadry_fountain
SUBST:  x = xcv, . = ..W
MAP
     . .
  ..xx.xx..
xxxxx1$1xxxxx
x.2..$0$..2.x
xxxxx1$1xxxxx
  ..xx.xx..
     . .
ENDMAP

NAME:    hangedman_abyss_shoalhut
TAGS:    abyss no_pool_fixup patrolling
MONS:    red devil w:30 / smoke demon / eye of devastation w:5 / \
         unseen horror / ynoxinul / snapping turtle skeleton w:15
NSUBST:  = = 1:x= / *:x
SUBST:   1 = 1., x = xxxxcccvb, l = wWll
KMASK:   wWl = no_monster_gen
MAP
   l l
 lxx=xxl
 xx.1.xx
lx.1.1.xl
 =1.|.1=
lx.1.1.xl
 xx.1.xx
 lxx+xxl
   l l
ENDMAP

NAME:    abyss_fake_exit
TAGS:    abyss
KFEAT:   O = exit_abyss mimic
MAP
O
ENDMAP

NAME:    abyss_fake_rune
TAGS:    abyss
ITEM:    abyssal rune of Zot mimic
MAP
d
ENDMAP

###############################################################################
# abyss rune vaults
###############################################################################

NAME:  abyss_rune_water_cross
TAGS:  abyss_rune
KITEM: O = abyssal rune of Zot
MAP
ww.ww
ww.ww
..O..
ww.ww
ww.ww
ENDMAP

NAME:   due_abyss_rune
TAGS:   abyss_rune
KITEM:  O = abyssal rune of Zot
KMONS:  OL = lich / w:1 ancient lich
SUBST:  C = c+
NSUBST: L = 1:O / *:L
: colour("c = " .. dgn.random_colour() )
: colour(". = " .. dgn.random_colour() )
MAP
  ccccc
 ccccccc
ccLcLcLcc
cc+c+c+cc
@C.....C@
cc+c+c+cc
ccLcLcLcc
 ccccccc
  ccccc
ENDMAP

NAME:  evilmike_abyss_rune_tentacle_tunnel
TAGS:  abyss_rune
KITEM: O = abyssal rune of Zot
KMONS: K = kraken
KMONS: T = tentacled monstrosity
SUBST: T = Tw
KFEAT: KT = w
KFEAT: O = W
SUBST: D : cW
SUBST: . = w., w = WWWw, C = c., c = ccv
MAP
      CCcccCC
   CCCCccOccCCCC
 CCCCcccWcWcccCCCC
ccccccwWDWDWwcccccc
cTwwwwwwwwwwwwwwwTc
cTwwwwwwwwwwwwwwwTc
ccccccccwwwcccccccc
 CCCCCccwwwccCCCCC
   CCCcwwwwwcCCCC
    ..wwwwwww..
     .wwwKwww.
     ..wwwww..
      .wwwww.
      .......
       ..@..
ENDMAP

NAME:  evilmike_abyss_rune_siren
TAGS:  abyss_rune
KITEM: O = abyssal rune of Zot
SUBST: X = c., c = ccv
KPROP: l = no_cloud_gen
MONS:  generate_awake siren
MAP
XXXXcccXXXX
XXXccOccXXX
XXcc0n0ccXX
Xcc0nnn0ccX
Xc.......cX
Xc.N...N.cX
Xcc.....ccX
Xcc.lll.ccX
X c.l1l.cXX
Xcc.clc.ccX
Xc.......cX
Xc..ccc..cX
@+cccXccc+@
ENDMAP

# Two versions here - one narrow, one wide (wide one is a bit easier).
NAME:   evilmike_abyss_rune_acolytes_1
TAGS:   abyss_rune no_monster_gen
WEIGHT: 6
KITEM:  O = abyssal rune of Zot
KFEAT:  _ = altar_lugonu
FTILE:  ._+OAL = floor_crystal_squares
NSUBST: A = 2:L / *:.
SUBST:  ' = .
KMONS:  O = tentacled monstrosity / large abomination / chaos spawn
KMONS:  L = wizard hd:16 name:mad_acolyte_of_Lugonu n_rpl n_des col:lightgreen \
            tile:mons_hell_wizard priest_spells \
            spells:smiting;blink_other;invisibility;malign_gateway;blink ; \
            robe . quarterstaff ego:distortion | dagger ego:distortion
MAP
''''' ''''' '''''
'bbb'''bbb'''bbb'
'bAbbbbbAbbbbbAb'
'bblblblblblblbb''
'Gb...........bbb'
@'+.....L._b..+Ob'
'Gb...........bbb'
'bblblblblblblbb''
'bAbbbbbAbbbbbAb'
'bbb'''bbb'''bbb'
''''' ''''' '''''
ENDMAP

NAME:   evilmike_abyss_rune_acolytes_2
TAGS:   abyss_rune no_monster_gen
WEIGHT: 4
KITEM:  O = abyssal rune of Zot
KFEAT:  _ = altar_lugonu
FTILE:  ._+OL = floor_crystal_squares
SUBST:  ' = .
KMONS:  L = wizard hd:16 name:mad_acolyte_of_Lugonu n_rpl n_des col:lightgreen \
            tile:mons_hell_wizard priest_spells \
            spells:smiting;blink_other;invisibility;malign_gateway;blink ; \
            robe . quarterstaff ego:distortion | dagger ego:distortion
MAP
  '''''''''''
  'b'b'b'b'b'
'''bbbbbbbbb''
'bbblblblblbb'''
'bLl.......bbbb'
'bbb......b.bb''
@''+....._LbObb'
'bbb......b.bb''
'bLl.......bbbb'
'bbblblblblbb'''
'''bbbbbbbbb''
  'b'b'b'b'b'
  '''''''''''
ENDMAP

NAME:   evilmike_abyss_rune_seething_chaos
TAGS:   abyss_rune allow_dup
KITEM:  O = abyssal rune of Zot
MARKER: ! = lua:fog_machine { cloud_type = "seething chaos", \
            pow_min = 8, pow_max = 12, delay_min = 20, delay_max = 30, \
            size = 1, walk_dist = 1, spread_rate = 33 }
SUBST:  ! = ., X = x., x = xc
MONS:   bat, chaos spawn, dragon / ice dragon
MONS:   ogre mage, hill giant
MAP
 cccX X X
cc.ccX X X
c.O2cxx X X
cc2+c3xx X X
Xccc..1xx X X
 Xx3.1.4xx X X
X xx1.!.5xx X
 X xx4.1..xx X
X X xx5....xX ..@
 X X xx....xxx++x
  X X xx........x
   X X xxx....XXx
    X X  xxxxxxxx
ENDMAP

# Contains 1 to 3 hellephants. 3 is rare.
NAME:   evilmike_abyss_rune_elephants
TAGS:   abyss_rune allow_dup
KITEM:  O = abyssal rune of Zot
SUBST:  l = .....llllx, L: llllx
KPROP:  ' = no_tele_into
NSUBST: ' = 2:H / 9:E / *:.
SUBST:  H = 322, E = 221.
SUBST:  x : cccvvx, x = cccvvx
KMONS:  O = hellephant
MONS:   elephant, dire elephant, hellephant
MAP
  l..lllll..l
 l.lllllllll.l
l.llLLLLLLLll.l
.llLLlllllLLll.
.lLLll'''llLLl.
llLll'''''llLll
llLl''xxx''lLll
llLl''xO+''lLll
llLl''xxx''lLll
llLll'''''llLll
.lLLll'''llLLl.
.llLLlllllLLll.
l.llLLLLLLLll.l
 l.lllllllll.l
  l..lllll..l
ENDMAP

NAME:  evilmike_abyss_rune_shrine
TAGS:  abyss_rune
KITEM: _ = abyssal rune of Zot
KFEAT: _ = altar_lugonu
SUBST: c: cbvx
MONS:  generate_awake spatial vortex
MAP
...........
..ccccccc..
.ccG..1.cc.
..+..._1cc.
.ccG..1.cc.
..ccccccc..
...........
ENDMAP

NAME:   evilmike_abyss_rune_ettins
TAGS:   abyss_rune
KITEM:  O = abyssal rune of Zot
MONS:   ettin ; giant spiked club ego:distortion | giant club ego:distortion . \
                giant spiked club ego:chaos | giant club ego:chaos
SUBST:  x = xxccn, . = ...W
NSUBST: 1 = 4:1 / *:0
MAP
    ........
 ....xxx.xx..
 .xxxx.xx.xx..
 .x1x.x1xx.xx.
..xx.xxx.xx.x.
.xx.xx1x.x1xx.
.x.xx1O.xx.xx.
.xx.xx.xx.xxx.
..xx.xxxxx1xx.
 .x1x.x1x.xx..
 .xxxx.x.xx..
 ....xxxxx..
    .......
ENDMAP

NAME:  evilmike_abyss_rune_curve
TAGS:  abyss_rune allow_dup
KITEM: O = abyssal rune of Zot
SUBST: X = x.., Y: b., x = xc
MONS:  tormentor / hellion / bone dragon / neqoxec / iron dragon zombie
MAP
xxxxxXXXX
....xxxxXXX
.......xxxXX
..Y......xxXX
.......1..xxx
....Y...x.1Ox
.......1..xxx
..Y......xxXX
.......xxxXX
....xxxxXXX
xxxxxXXXX
ENDMAP

NAME:  evilmike_abyss_rune_tso_outpost
TAGS:  abyss_rune allow_dup no_monster_gen
KITEM: O = abyssal rune of Zot
KFEAT: _ = altar_the_shining_one
MONS:  angel, cherub, ophan
MAP
.......................
........ccc...cccccc...
.cccccGcc3ccGcc...2cc..
.+...ccc...ccc....cccc.
.+.T1.+.._..+.....+.Oc.
.+...ccc...ccc....cccc.
.cccccGcc3ccGcc...2cc..
........ccc...cccccc...
.......................
ENDMAP

NAME:  kb_abyss_rune_zappy
TAGS:  abyss_rune allow_dup
KITEM: O = abyssal rune of Zot
MONS:  lightning spire generate_awake
MAP
 1.1
.....
1.O.1
.....
 1.1
ENDMAP

NAME:   hangedman_abyss_rune_flesh_and_stone
TAGS:   abyss_rune no_monster_gen no_item_gen no_pool_fixup allow_dup
MONS:   catoblepas, stone golem, earth elemental, stone giant
KMONS:  O = rock worm
KITEM:  O = abyssal rune of Zot
KPROP:  l = no_cloud_gen
SUBST:  5 = 23
NSUBST: P = 1:O / 1:2
MAP
    .......
.ccccGclcGcccc.
 .cPccclcccPc.
  c+c5.l.5c+c
.cc1ccclccc1c.
 .c4c5.l.5c4c.
  c.ccclccc.c
.cc.c5.l.5c.cc.
 .c.c clc c.c.
  c.c5.l.5c.c
.cc ncclccn cc.
 .c+c2c2c2c+c.
  c3  c1c  3c
.cc3  + +  3cc.
 .ccccccccccc.
  .c c. .c c.
ENDMAP

NAME:   hangedman_abyss_rune_macabre_mess
TAGS:   abyss_rune allow_dup
KMONS:  1 = giant orange brain spells:brain_feed;cause_fear;\
            shadow_creatures;confuse;cantrip;teleport_self
KMONS:  2 = golden eye
KMONS:  3 = flying skull
KMONS:  4 = macabre mass hd:2 / macabre mass hd:3 / small abomination w:4
KMONS:  5 = neqoxec
KMONS:  6 = cacodemon
KMONS:  O = flying skull
KITEM:  O = abyssal rune of Zot
KFEAT:  n = iron_grate
KFEAT:  123456. = shallow_water w:1 / . w:9
KFEAT:  * = +
MARKER: * = lua:restrict_door()
SUBST:  c = ccccvb
MAP
 .cccccc4@4cccccc.
 cc .. ccWcc .. cc
.c 444. c5c .444 c.
cc44nnn.c+c.nnn44cc
c 4nn2n.....n2nn4 c
c54*13n.....n31*45c
c 4nn2n.....n2nn4 c
cc.4nnn.....nnn4.cc
.c ............. c.
 ccc .4nnnnn4. ccc
  .cc44n2O2n44cc.
   .c 4nn1nn4 c.
    cc44n*n44cc
    .c 44444 c.
     ccc 6 ccc
      .ccccc.
ENDMAP

NAME:    hangedman_abyss_rune_treasure_dump
TAGS:    abyss_rune no_monster_gen no_item_gen mini_float
WEIGHT:  2
KMONS:   12 = great orb of eyes perm_ench:shapeshifter
KMONS:   34 = guardian serpent perm_ench:shapeshifter
# Note: if anything in these two item sets becomes useful for more then a tiny
# fraction of characters finding the abyssal rune, remove or replace them.
KITEM:   24d = scroll of curse weapon w:5 q:1 / \
         scroll of random uselessness q:1 / sultana q:1 w:5 / \
         potion of water w:5 q:1 / club w:5 / staff w:5 / stone q:1 / \
         mundane dart q:1 / needle q:1 ego:sickness / mundane animal skin / \
         empty ebony casket w:5 / gold q:1
KITEM:   13e = rod of striking w:2 / wand of slowing / wand of magic darts / \
         wand of flame w:5 / wand of frost w:5 / lamp of fire w:2 / \
         plain deck w:2 / amulet of controlled flight w:5 / \
         whip not_cursed ego:reaching w:2 / cap not_cursed mundane race:none w:5
KITEM:   f = abyssal rune of zot mimic, abyssal rune of zot mimic
KITEM:   g = abyssal rune of zot mimic, abyssal rune of zot
SHUFFLE: 14 / 23
NSUBST:  f = 1:g / *:f, d = 2:e / 1:de / 1:de / *:d
SUBST:   x = xxxxc, c = cccvb
MAP
  ... x ...
 x .xxxxx. x
. .cdcdcdc. .
..cdddddddc..
.xddfd1dfddx.
 xcdddddddcx
xxdd4ded4ddxx
 xcdddddddcx
.xdd1dfd1ddx.
..cdddddddc..
. .cdcdcdc. .
 x .xxxxx. x
  ... x ...
ENDMAP

###############################################################################
# abyss exit vaults
###############################################################################

NAME: abyss_exit_lava
TAGS: abyss_exit allow_dup
MAP
l.l
.O.
l.l
ENDMAP

NAME:  evilmike_abyss_exit_glass
TAGS:  abyss_exit allow_dup
KFEAT: O = exit_abyss
MAP
 mmm@
mm.mm
m.O.m
mm.mm
 mmm
ENDMAP

NAME:  evilmike_abyss_exit_plants
TAGS:  abyss_exit allow_dup
KFEAT: O = exit_abyss
SUBST: 1 = 112.
SUBST: . = .:100 1
MONS:  plant col:any, bush col:any
# TODO: Tiles!
MAP
 .......
.........
..11111..
..12221..
..12O21..
..12221..
..11111..
.........
 .......
ENDMAP

NAME:  evilmike_abyss_exit_1
TAGS:  abyss_exit allow_dup
KFEAT: O = exit_abyss
MAP
x+x
+O+
x+x
ENDMAP

NAME:  evilmike_abyss_exit_2
TAGS:  abyss_exit allow_dup
KFEAT: O = exit_abyss
SUBST: x = x:30 c:20 v:20 m:3 b:3
MAP
  @ xxxx
 x.xxxxxxx
xx.x.....xx
xx.x.xxx.xx
xx.x.xOx.xx
xx.x.x.x.xx
xx.x...x.xx
xx.xxxxx.xx
xx.......xx
 xxxxxxxxx
  xxxxxxx
ENDMAP

NAME:  evilmike_abyss_exit_3
TAGS:  abyss_exit allow_dup
KFEAT: O = exit_abyss
SUBST: . = ..Wwl
MAP
     .
    ...
   .....
  .......
 .........@
.....O.....
 .........
  .......
   .....
    ...
     .
ENDMAP

NAME:  evilmike_abyss_exit_4
TAGS:  abyss_exit allow_dup
KFEAT: O = exit_abyss
KFEAT: n = stone_arch
MAP
    x
    x
  ..x..
  .nxn.
xxxxxxxxx
  .Oxn.
  ..x..
 .  x
@   x
ENDMAP

NAME:   evilmike_abyss_exit_5
TAGS:   abyss_exit allow_dup
KFEAT:  O = exit_abyss
KFEAT:  n = stone_arch
NSUBST: n = 1:O / *:n, = = 1:+ / *:=
MAP
    x   x
  x x x x x
 xxxxxxxxxxx
  xnxnxnxnx
xxx=x=x=x=xxx
  x.........@
xxx=x=x=x=xxx
  xnxnxnxnx
 xxxxxxxxxxx
  x x x x x
    x   x
ENDMAP

NAME:  evilmike_abyss_exit_6
TAGS:  abyss_exit allow_dup
KFEAT: O = exit_abyss
SUBST: X: .x, x: xxxccvlw, .: ...W
MAP
  x x x
 x x x x x
xxxxxxxxx x
xX.XxX.Xxx x
x.x.x.x.x x
@XxX.XxOxx x
xxxxxxxxx x
 x x x x x
  x x x
ENDMAP

NAME:  evilmike_abyss_exit_7
TAGS:  abyss_exit allow_dup
KFEAT: O = exit_abyss
SUBST: x:xxcv
MAP
xx.xx
x.x.x
.xOx.
x.x.x
xx.xx
ENDMAP

NAME:  evilmike_abyss_exit_8
TAGS:  abyss_exit allow_dup
KFEAT: O = exit_abyss
SUBST: G : GGT, T : TV
MAP
...G...
.G...G.
.......
G..O..G
.......
.G...G.
...G...
ENDMAP

NAME:  evilmike_abyss_exit_9
TAGS:  abyss_exit allow_dup
KFEAT: O = exit_abyss
KMONS: O = tentacled monstrosity / large abomination / nothing w:5
SUBST: x = xxc
MAP
.xxx.
x...x
x.O.x
x...x
.xxx.
ENDMAP

NAME:  evilmike_abyss_exit_10
TAGS:  abyss_exit allow_dup
KFEAT: O = exit_abyss
SUBST: X = x.., x = xxxcv
MONS:  brain worm / w:5 neqoxec
MAP
XXXXXXXXXXX
XXXXXXXXXXX
XXxxxxxxxXX
XXx..1..xXX
XXx.xxx.xXX
XXx1.Ox....
XXx.xxx.xXX
XXx..1..xXX
XXxxxxxxxXX
XXXXXXXXXXX
XXXXXXXXXXX
ENDMAP

NAME:  evilmike_abyss_exit_11
TAGS:  abyss_exit allow_dup
KFEAT: O = exit_abyss
SUBST: b = bbx
MAP
   b.b
  bb.bb
 bb...bb
bb.....bb
b.......b
....O....
b.......b
bb.....bb
 bb...bb
  bb.bb
   b.b
ENDMAP

# Technically possible for this one to require dig, but pretty unlikely.
NAME:  evilmike_abyss_exit_12
TAGS:  abyss_exit allow_dup
KFEAT: O = exit_abyss
SUBST: X = x., x = xxx++=1
MONS:  w:2 trapdoor spider / nothing
MAP
XXXxxxXXX
XxxxxxxxX
XxxxxxxxX
xxxxxxxxx
xxxxOxxx+
xxxxxxxxx
XxxxxxxxX
XxxxxxxxX
XXXxxxXXX
ENDMAP

# Orange crystal and silver statue are very rare here...
# I want most characters to be able to actually use this exit
NAME:  evilmike_abyss_exit_13
TAGS:  abyss_exit allow_dup
KFEAT: O = exit_abyss
KMONS: O = w:1 orange crystal statue / w:2 silver statue / w: 20 ice statue / w: 15 oklob plant
MAP
O
ENDMAP

NAME:  evilmike_abyss_exit_14
TAGS:  abyss_exit allow_dup
KFEAT: O = exit_abyss
SUBST: x = xcv, 0 = 0.
MAP
x..x..x
.0.x.0.
...x...
xxxOxxx
...x...
.0.x.0.
x..x..x
ENDMAP

NAME:  evilmike_abyss_exit_15
TAGS:  abyss_exit allow_dup
KFEAT: O = exit_abyss
KMONS: O = unseen horror / lorocyproca / nothing
MONS:  small abomination / nothing
SUBST: X = x., x=xxc
MAP
 X X X
X XXX X
 XXXXX X
XXXXXXX X
xxxxxxxX X
+1+1+OxXX X
xxxxxxxX X
XXXXXXX X
 XXXXX X
X XXX X
 X X X
ENDMAP

NAME:   evilmike_abyss_exit_16
TAGS:   abyss_exit allow_dup
KFEAT:  O = exit_abyss
NSUBST: . = 1:O / *:.
SUBST:  c = cbx, + = +=, . = .....12
MONS:   slime creature, pulsating lump / giant amoeba
MAP
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+c+c+c
+.+.+.+.+.+
c+c+c+c+c+c
ENDMAP

NAME:  evilmike_abyss_exit_17
TAGS:  abyss_exit allow_dup
KFEAT: O = exit_abyss
SUBST: x = xxc, . = ...W, 0 = 0.
MAP
..xx0xx..
...xxx...
x...x...x
xx.V.V.xx
0xx.O.xx0
xx.V.V.xx
x...x...x
...xxx...
..xx0xx..
ENDMAP

NAME:   evilmike_abyss_exit_kraken
TAGS:   abyss_exit allow_dup
KFEAT:  O = exit_abyss
NSUBST: w = 1:m / *:w
KFEAT:  m = w
KMONS:  m = kraken
SUBST:  Z = wY, Y = wW, W = w., w=WWw
MAP
..WWWWWWW..
.WYYYYYYYW.
WYZZZZZZZYW
WYZwwwwwZYW
WYZwwwwwZYW
WYZwwOwwZYW
WYZwwwwwZYW
WYZwwwwwZYW
WYZZZZZZZYW
.WYYYYYYYW.
..WWWWWWW..
ENDMAP

# Fog machine parameters are the same as that swamp entry vault; you pretty
# much can't avoid the fog here, so I hope you have rMut.
NAME:   evilmike_abyss_exit_mutagenic
TAGS:   abyss_exit allow_dup
KFEAT:  O = exit_abyss
MARKER: O = lua:fog_machine {                               \
                pow_min = 8, pow_max = 12, delay = 25,      \
                size = 2, walk_dist = 1, spread_rate = 33,  \
                cloud_type = "mutagenic fog"                \
            }
MAP
...
.O.
...
ENDMAP

# Make sure to close the doors if you don't like what you see behind them...
NAME:   evilmike_abyss_exit_vortex
TAGS:   abyss_exit allow_dup
KFEAT:  O = exit_abyss
KFEAT:  n = stone_arch
SUBST:  x:xxxcv, 1=1., g:G.
SUBST:  G:Gb.
MONS:   spatial vortex
NSUBST: n = 1:O / *:n
MAP
     xxxxx
     x111x
     x1n1x
     x111x
    @x+++x@
xxxxx.....xxxxx
x111+..g..+111x
x1n1+.gGg.+1n1x
x111+..g..+111x
xxxxx.....xxxxx
    @x+++x@
     x111x
     x1n1x
     x111x
     xxxxx
ENDMAP

NAME:  evilmike_abyss_exit_chaos
TAGS:  abyss_exit allow_dup
KFEAT: O = exit_abyss
MONS:  chaos spawn
SUBST: 1 = 11., n : nc, c = cvb
MAP
 ccncc
cc.1.cccccc
c.1.1.c.1.cccc
n1.O..+......+@
c.1.1.c.1.cccc
cc.1.cccccc
 ccncc
ENDMAP

# This one is really, really weird...
NAME:  evilmike_abyss_exit_smiterflies
TAGS:  abyss_exit allow_dup
KFEAT: O = exit_abyss
KMONS: O = generate_awake statue spells:summon_butterflies;summon_butterflies;\
           summon_butterflies;summon_butterflies;summon_butterflies; \
           tile:mons_statue_mage col:lightblue
MONS:  smoke demon, deep elf priest
MAP
       ccc
     ccc1ccc
   ccc.....ccc
  cc.........cc
  c....2......c
 cc...........cc
 c.............c
cc..2..........cc
c1......O.......+@
cc..2..........cc
 c.............c
 cc...........cc
  c....2......c
  cc.........cc
   ccc.....ccc
     ccc1ccc
       ccc
ENDMAP

NAME:  evilmike_abyss_exit_disperse
TAGS:  abyss_exit allow_dup
KFEAT: O = exit_abyss
SUBST: . = .:100 2
MONS:  centaur; bow . arrow ego:dispersal, plant
MAP
     xxx xxx xxx
   xxx1xxx1xxx1x
 xxx....x...x..xxx
xx...............x
x1.Ox............+@
xx...............x
 xxx....x...x..xxx
   xxx1xxx1xxx1x
     xxx xxx xxx
ENDMAP

NAME:     hangedman_abyss_exit_choices
TAGS:     abyss_exit allow_dup no_monster_gen
MONS:     warg, hell hound, giant leech, spiny worm, \
          crocodile, alligator, black mamba
KMONS:    8 = anaconda
KMONS:    9 = fire drake
KMONS:    0 = mottled dragon
KMONS:    A = elephant
KMONS:    B = catoblepas
KMONS:    C = golden eye
KMONS:    D = great orb of eyes
KMONS:    E = vapour
KMONS:    F = ball lightning
KMONS:    G = shadow wraith
KMONS:    H = unseen horror
NSUBST:   J = 1/2, K = 5/6, L = 9/0, M = C/D
SHUFFLE:  12/34, 56/78, 90/AB, CD/EF/GH
KFEAT:    N = exit_abyss
SUBST:    xc = ccv
MAP
. . . . . . . . . .
 .xx x x x x x x .
.ccccccccccccccccc.
.c +M+ +L+ +K+ +J+.
.cNcnc.cnc.cnc.cncm
.c +M+ +L+ +K+ +J+.
.ccccccccccccccccc.
 .xx x x x x x x .
. . . . . . . . . .
ENDMAP

###################################################################
# Distorted/chaotic kobolds (abyss exit version!) (Jude)
NAME:   due_exit_kobolds
TAGS:   no_rotate abyss_exit allow_dup
SUBST:  y  = c.
COLOUR: 1. = random
MARKER: P  = lua:fog_machine { cloud_type="blue smoke", walk_dist=1, \
             size=9, pow_max=20, delay=10, buildup_amnt=14, buildup_time=7, \
             spread_rate=3, start_clouds=1, colour="blue" }
KFEAT:  _ = altar_lugonu
KFEAT:  P = enter_abyss
KMONS:  1 = big kobold w:80 ; short sword | sabre | quick blade w:3 /\
            big kobold w:10 ; quick blade ego:distortion w:6 | \
                              sabre ego:distortion | short sword ego:distortion

KFEAT:  P = exit_abyss
MAP
  ccccc
 cc...cc
cc..P..cc
 cc...cc
 ccc.cccc
ccyy.yyyccc
cy..111.yyc
cc..1_1..cc
cyy.111..yc
cccyy..yycc
  ccc..ccc
    c++c
     @@
ENDMAP

###################################################################
# < bmh> I got the idea after I introduced a bug where the whole floor of
#        the abyss turned into altars
NAME:   bmh_abyss_xom_lugonu_altar
TAGS:   abyss allow_dup
COLOUR: " : magenta w:2 / white
KFEAT:   _ = altar_lugonu
KFEAT:   X = altar_xom
SUBST:   a = XXX"
SUBST:   b = X"
SUBST:   c = XX"
SUBST:   d = X""
SUBST:   e = X"""
MAP
   ebe
  dcacd
 ec"""ce
 ba"_"ab
 ec"""ce
  dcacd
   ebe
ENDMAP

NAME:   bmh_abyss_demonologist_exit
TAGS:   abyss_exit allow_dup no_monster_gen
MONS:   generate_awake deep elf demonologist
MONS:   generate_awake kobold demonologist
MONS:   generate_awake orc sorcerer name:orc_demonologist name_replace name_descriptor
MONS:   generate_awake lich name:lich_demonologist name_replace name_descriptor \
                            spells:shadow_creatures;summon_greater_demon
SUBST:  d = ccxxW....
SUBST:  e = ccxxW...
SUBST:  f = ccxxW..
SUBST:  w = WW'..
SUBST:  ' = B..
SUBST:  " = B.
KFEAT:  0 = exit_abyss
KFEAT:  B = floor
KPROP:  B = bloody
MARKER: + = lua:props_marker { \
            door_open_prompt="This door is covered in dire warnings. " .. \
                             "Open it anyway?", \
            door_description_prefix="warning-scrawled " \
            }
MAP
fffffffffffffffffff
feeeeeeeeeeeeeeeeef
fedddddddddddddddef
fedd....cnc....ddef
fed..ccncWcncc..def
fed..c1lw0wl2c..def
fed..clnWWWnlc..def
fed..cwwWWWwwc..def
fed..cwwwWwwwc..def
fed..clnwwwnlc..def
fed..c3l"""l4c..def
fed..ccc"""ccc..def
fed....c+++c....def
fedd...'''''...ddef
fedddddddddddddddef
feeeeeeeeeeeeeeeeef
fffffffffffffffffff
ENDMAP

# Accompanied by a decoy vault, so that the silence field does not
# give the exit away.
NAME:   bmh_abyss_silent_exit
WEIGHT: 5
TAGS:   abyss_exit allow_dup no_monster_gen
MONS:   silent spectre
KFEAT:  0 = exit_abyss
SUBST:  c = cx..
SUBST:  d = cx....
SUBST:  x = cxxv
SUBST:  M : TEHS
KMONS:  T = generate_awake patrolling frost giant
KMONS:  E = generate_awake patrolling fire giant
KMONS:  H = generate_awake patrolling hellephant
KMONS:  S = generate_awake patrolling storm dragon
NSUBST: T = 6:T / *:.
NSUBST: E = 5:E / *:.
NSUBST: H = 5:H / *:.
NSUBST: S = 4:S / *:.
MARKER: + = lua:props_marker { \
            door_open_prompt="This door is covered in dire warnings. " .. \
                             "Open it anyway?", \
            door_description_prefix="warning-scrawled " \
        }
MAP
    ddddddd
  xxxxxxxxxxx
 xxcccccccccxx
dxcc...0...ccxd
 xxc.MMMMM.cxx
 dxc.MbbbM.cxd
 dxc.Mb1bM.cxd
 xxc.MbbbM.cxx
dxcc.MMMMM.ccxd
dxxcc.....ccxxd
 dxxxn+++nxxxd
   dc.....cd
      @@@
ENDMAP

# Decoy vault for bmh_abyss_silent_exit.
# Not an exit vault, still placed here.
# The vault is good Abyss furniture anyway, the silence field is interesting
# and we don't have to worry about abyssical bubbles either.
NAME:  bmh_abyss_silent_decoy_vault
TAGS:  abyss no_monster_gen no_item_gen no_tele_into
MONS:  generate_awake silent spectre
SUBST: a = xx.
SUBST: b = xx..
SUBST: c = x...
SUBST: x = xxxcccvvb
MAP
 cccccccccccccccccc
cbxxxaaaaxxxaaaaxxxbc
cbx.xxxxxx.xxxxxx.xbc
cax.......1.......xac
cbx.xxxxxx.xxxxxx.xbc
cbxxxaaaaxxxaaaaxxxbc
 ccccccccccccccccccc
ENDMAP

# Lower weight: this one will kill early Abyss visitors.
# TODO: Once Abyss monster generation takes into account the player (e.g. time
#       spent), we can adjust the horror/executioner probabilities.
NAME:   bmh_executioner_abyss_exit
WEIGHT: 3
TAGS:   abyss_exit allow_dup
KFEAT:  0 = exit_abyss
NSUBST: E = 2:1 / 2:2 / *:.
COLOUR: ' = gold
MONS: executioner
MONS: unseen horror
MAP
      xxx xxx
     xx.xx xx.xx
    xxEvExxxxEvExx
@vvvv.vvv.vv.vvv.vvvvvvvvvv
''''''''''''''''''0''''''Ev
 vvvvvvv.vvv.vv.vvv.vvvvvvv
       xxEvExxxxExExx
        xx.xx xx.xx
         xxx xxx
ENDMAP

NAME:  bmh_abyss_fiendish_exit
TAGS:  abyss_exit allow_dup no_monster_gen
KMONS: F = patrolling hell sentinel
KFEAT: F = floor
KFEAT: 0 = exit_abyss
KFEAT: % = floor
KFEAT: B = floor
KITEM: % = human skeleton / elf skeleton / dwarf skeleton / orc skeleton
SUBST: c = ccvm
SUBST: S = %%.
SUBST: B = BB.
SUBST: b = B..
KPROP: B = bloody
KPROP: F = bloody
MAP
    .
   .c.
  .bSb.
 .bBBBb.
.cSF0FSc.
 .bBBBb.
  .bSb.
   .c.
    .
ENDMAP

NAME:  guppyfry_abyss_exit_glass_guarded
TAGS:  abyss_exit allow_dup
KFEAT: O = exit_abyss
MAP
.............
.xmxmxmxmxmx.
m.m.......m.m
xm.mmm.mmm.mx
xxxx.....xxxx
x00...O...00x
xxxxxxlxxxxxx
lllllllllllll
mxmxmxmxmxmxx
.............
ENDMAP

NAME:  guppyfry_abyss_exit_spiral_guarded
TAGS:  abyss_exit allow_dup
KFEAT: O = exit_abyss
SUBST: - = llx
MAP
.0---------0
.-........--
..--------.-
.--.....--.-
.-.-----.-.-
.-.--O--.-.-
.-.-.---.-.-
.-.--...--.-
.-.-------.-
.--.......--
.0---------0
ENDMAP

NAME: guppyfry_abyss_exit_imp_island
TAGS:  abyss_exit allow_dup
KFEAT: O = exit_abyss
SUBST: - = Wwwww
MONS: crimson imp / white imp
MAP
.---------.
---..1..---
--..1.1..--
---..1..---
.---------.
.....O.....
.---------.
---..1..---
--..1.1..--
---..1..---
.---------.
ENDMAP
