##############################################################################
# -2- Twisted maps.
##############################################################################
#
# The maps in this section are harder to read... which means that you can
# learn more from them. There's a bunch of reasons why maps become rather
# complicated: several layers of SUBST/SHUFFLE operations, serious use of
# lua, use of SUBVAULTs or just plain obfusciation. Some maps simply have
# extremely long headers, so we put them here.
##############################################################################

##############################################################################
# 37 x 22 -- this one is huge and twisted, but it's also old...
NAME:   dpeg_arrival_water_fire
TAGS:   arrival no_monster_gen no_pool_fixup no_rotate
ORIENT: float
: local rnd = crawl.random2(12)
: if rnd == 0 then
NSUBST: A=*:., a=1:./*:l, b=1:./*:l
: elseif rnd == 1 then
NSUBST: B=*:., c=1:./*:l, d=1:./*:l, e=1:./*:l, f=1:./*:l, g=1:./*:l
: elseif rnd == 2 then
NSUBST: C=*:., h=1:./*:l, i=1:./*:l, j=1:./*:l, k=1:./*:l
: elseif rnd == 3 then
NSUBST: D=*:., m=1:./*:w, n=1:./*:w, o=1:./*:w, p=1:./*:w
: elseif rnd == 4 then
NSUBST: E=*:., q=1:./*:w, r=1:./*:w, s=1:./*:w
: elseif rnd == 5 then
NSUBST: F=*:., t=1:./*:w, u=1:./*:w, v=1:./*:w
: else
SUBST:  X=+, Y:YYY+
NSUBST: Y=1:+/*:x
: end
SUBST:  XY=x, ABCabcdefghijk=l, DEFmnopqrstuv=w
KPROP:  1G = no_tele_into
MONS:   bush w:1 / plant w:6 / fungus w:9 / nothing w:45
MONS:   fungus / nothing w:20
SUBST:  "=2', '=2..., 2:222.WW
: if crawl.coinflip() then
SUBST:  Z=x, z=+, V=x
: elseif crawl.coinflip() then
SUBST:  Z=x, V=+
NSUBST: z = 1:+ / *:x
: else
SUBST:  Zz=., V=x
: end
MARKER: { = lua:props_marker { arrival_stairs=1 }
veto {{
  local slave = dgn.find_marker_positions_by_prop( "arrival_stairs", 1 )
  if slave == nil then return false end
  if slave[1] == nil then return false end
  crawl.mpr("(".. slave[1].x .. "," .. slave[1].y .. ")")
  return not dgn.has_exit_from(slave[1])
}}
MAP
            xxxxxx@xxxxxx
       xxxxxx'''''''''''xxxxxx
   xxxxx.......'"""""'.......xxxxx
 xxx..........lll222www..........xxx
xx......lllkkklll222wwwppwwww......xx
x....gllglllCllll222wwwwDwwwwwww....x
x.lllffBxlljjjlxxXXXxxwwoowwxwwssww.x
xlAlxlBlxlllCxxx11111xxxwDwwxwwExwvvx
xllAxeeexllCxx111111111xxnnwxwEwxwFwx
xlbbxlBlxliix11111111111xwDwxrrrxwuux
xlAlxlddxlClx11111G11111xmmwxwEwxwwFx
xaalxlccxhhhx11111111111xwDwxqqqxwttx
x...x...x...xx111111111xx...x...x...x
x...V...V...xxYx11111xYxx...V...V...x
xZzZx...x...xx.xxxYxxx.xx...x...xZzZx
x..ZxZ..x...V...V...V...V...x..ZxZ..x
x....ZzZx...x...x.}.x...x...xZzZ....x
xx......xZzZxZzZx...xZzZxZzZx......xx
 xxx...........ZxZzZxZ...........xxx
   xxxxx.....................xxxxx
       xxxxxx.....{.....xxxxxx
            xxxxxxxxxxxxx
ENDMAP

#########################################
# Representatives of all player genuses, locked up.
NAME:    kb_arrival_jail
TAGS:    arrival no_monster_gen no_trap_gen
ORIENT:  north
SHUFFLE: ABCDEFGHIJKLMNOPQRSTUVWXYZ
KFEAT:   ABCDEFGHIJKLMNOPQRSTUVWXYZ = floor
KPROP:   ABCDEFGHIJKLMNOPQRSTUVWXYZ = no_tele_into
KMASK:   ABCDEFGHIJKLMNOPQRSTUVWXYZ = no_item_gen
KMONS:   A = human ; nothing
KMONS:   B = elf ; nothing
KMONS:   C = dwarf ; nothing
KMONS:   D = orc ; nothing
KMONS:   E = merfolk ; nothing
KMONS:   F = barachi ; nothing
KMONS:   G = kobold ; nothing
KMONS:   H = spriggan ; nothing
KMONS:   I = naga ; nothing
KMONS:   J = djinni
KMONS:   K = ogre ; nothing
KMONS:   L = troll
KMONS:   M = minotaur ; nothing
KMONS:   N = tengu ; nothing
KMONS:   O = draconian ; nothing
KMONS:   P = demonspawn ; nothing
KMONS:   Q = mummy
KMONS:   R = felid
KMONS:   S = ghoul
KMONS:   T = vampire spells:. ; nothing
KMONS:   U = demigod ; nothing
KMONS:   V = octopode ; nothing
KMONS:   W = formicid ; nothing
KMONS:   X = gargoyle ; nothing
KMONS:   Y = vine stalker ; nothing
KMONS:   Z = palentonga ; nothing
MAP
 ccccc
 c.{.c
 c...c
ccc+ccc
cAn.nBc
ccc.ccc
cCn.nDc
ccc.ccc
cEn.nFc
ccc.ccc
cGn.nHc
ccc.ccc
cIn.nJc
ccc.ccc
cKn.nLc
ccc.ccc
cMn.nNc
ccc.ccc
cOn.nPc
ccc.ccc
cQn.nRc
ccc.ccc
cSn.nTc
ccc.ccc
cUn.nVc
ccc.ccc
cWn.nXc
ccc.ccc
cYn.nZc
ccc+ccc
  c@c
ENDMAP

#########################################
# A horror show for the beginning adventurer
NAME:    shiori_arrival_whats_in_store_for_you
TAGS:    arrival no_monster_gen no_pool_fixup no_trap_gen
ORIENT:  west
KPROP:   M = no_tele_into
NSUBST:  M = 2=E / * = M E:2
KFEAT:   E = permanent teleport trap
KFEAT:   MNOQ = shallow_water
SHUFFLE: M/N/O/P/Q
SUBST:   P = MNO
KMASK:   EMNOQ = no_item_gen
#
# Player monsters:
KMONS: M = human / elf / orc; nothing / naga; nothing / draconian; nothing / \
           ogre; nothing / minotaur; nothing / troll / kobold; nothing / \
           mummy / ghoul / spriggan; nothing / dwarf; nothing / felid / \
           octopode; nothing / vampire spells:. / formicid; nothing / \
           gargoyle; nothing / vine stalker; nothing / djinni / \
           merfolk; nothing / palentonga / gnoll; nothing / barachi / \
           demonspawn / demigod / tengu; nothing
# Player monsters, zombie versions (undead, vine stalkers, gargoyles and djinni
# don't leave corpses):
KMONS: N = human zombie / elf zombie / orc zombie / naga zombie / \
           draconian zombie / ogre zombie / minotaur zombie / troll zombie / \
           kobold zombie / spriggan zombie / dwarf zombie / felid zombie / \
           octopode zombie / formicid zombie / merfolk zombie / \
           palentonga zombie / gnoll zombie / barachi zombie / \
           demonspawn zombie / demigod zombie / tengu zombie
# Player monsters, skeleton versions (octopodes and formicids drop out because
# they have no skeletons):
KMONS: O = human skeleton / elf skeleton / orc skeleton / naga skeleton / \
           draconian skeleton / ogre skeleton / minotaur skeleton / \
           troll skeleton / kobold skeleton / spriggan skeleton / \
           dwarf skeleton / felid skeleton / merfolk skeleton / \
           palentonga skeleton / gnoll skeleton / barachi skeleton / \
           demonspawn skeleton / demigod skeleton / tengu skeleton
# And now for something completely different (if any of these turn out to be
# able to escape or project spells out of their cells, they should be removed):
KMONS: Q = orb of fire / ice dragon / shadow dragon / iron dragon / \
           w:1 golden dragon / large abomination / tentacled monstrosity / \
           w:1 black draconian; nothing / \
           w:1 yellow draconian; nothing / w:2 green draconian; nothing / \
           w:1 purple draconian; nothing / w:2 red draconian; nothing / \
           w:1 white draconian; nothing / nothing
MAP
xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxcccccccxxxxxcccccccccxx
xxxxxxccMcMcMcccccccMcMcMcMcxx
xxxxxcccncncncMcMcMcncncncncccc@c
xxxxxcc......cncncnc.......nMcc+cc
xxxxxc{..............cncnc.cnc...ccc
xxxxxcc..........cncncMcMn.....>.nMc
xxxxxcccncncncncncMcMcccccncnc...ccc
xxxxxxccMcMcMcMcMcccccxxxcMcMcc+cc
xxxxxxxcccccccccccxxxxxxxcccccc@c
      xxxxxxxxxxxxx     xxxxxx
ENDMAP

#####################################
# I am the great and powerful Oz! Pay no attention to the man behind
# the curtain! ...if you stick close to the wall, you are always able
# to avoid the flame clouds.
NAME:   shiori_arrival_oz
TAGS:   arrival
ORIENT: float
MONS:   kobold / goblin / hobgoblin / nothing
MARKER: # = lua:fog_machine { \
            pow_max = 5, delay_min = 100, delay_max = 150, \
            size = 4, start_clouds = 1, \
            excl_rad = 1, \
            cloud_type = "flame" }
KFEAT:  # = l
FTILE:  ' = floor_rough_red
COLOUR: ' = red
SUBST:  ' = .
MAP
bbbbbbbbbbb
b....{....b
b.........b
b.........b
b..b...b..b
b.........b
b.........b
b..b'''b..b
b..'''''..b
@..'#'#'..@
b..b'G'b..b
b.........b
bbbb+b+bbbb
 +1+.b.+1+
 bbb.b.bbb
   b@b@b
ENDMAP

############################################################################
NAME:    dpeg_arrival_concentric_ovals
TAGS:    arrival no_monster_gen no_rotate
ORIENT:  float
SUBST:   ' : Wlncxxxv, " : Wlncxxxv
MAP
.........................
.......xxxxx+xxxxx.......
....xxxxxxxx.xxxxxxxx....
...xxxxxx.......xxxxxx...
..xxxxx...........xxxxx..
..xxxx....'''''....xxxx..
..xxx...'''''''''...xxx..
.xxxx..''.......''..xxxx.
.xxx...'..""+""..'...xxx.
.xxx..''.""..."".''..xxx.
.xxx..''."".{."".''..xxx.
.xxx..''.""..."".''..xxx.
.xxx...'.."""""..'...xxx.
.xxxx..''.......''..xxxx.
..xxx...''''.''''...xxx..
..xxxx....''+''....xxxx..
..xxxxx...........xxxxx..
...xxxxxx.......xxxxxx...
....xxxxxxxxxxxxxxxxx....
.......xxxxxxxxxxx.......
.........................
ENDMAP

##############################################################################
NAME:    dpeg_arrival_solitude
TAGS:    arrival no_monster_gen transparent
ORIENT:  float
SHUFFLE: C{! / B(' / V["
SUBST:   ([ = x
# TODO: there are ways for " and ' to get to @, which seems odd. (It'll cause
# issues if this map isn't transparent, at least.)
SUBST:   C=., !=@
SHUFFLE: B' / xx, V" / xx
SUBST:   B=., '=+, V=., "=+
NSUBST:  . = 1:d / *:.
ITEM:    stone
MAP
xxxxxxxxxxxxxxxxxxx....@
xxxxxxxCCCCCCCxxxxx.....
xxxxxCCxxxxxxxCCxxx.....
xxxxCxxxVVVVxxxxCxx.....
xxxCxxVVxxxxVVxxxCx.....
xxCxxVxxxBBxxxVxxCxxxxx'
!xCxVxxxBxx(xxxVxxCxxxBx
xCxxVxxBxxxxbxxVxxCxxxBx
xCxxVxBxx{cvxxVxxxCxxxBx
xCxVxxBxCxxx[VxxxCxxxBxx
xCxVxxBxxCCxxxxCCxxxBxxx
xCxVxxxBxxxCCCCxxxBBxxxx
xCxxVxxxBBxxxxxxBBxx'xxx
!xxxxVxxxxBBBBBBxxx.....
xxxxxxVVVxxxxxxxxV".....
xxxxxxxxxVVVVVVVVxx.....
xxxxxxxx"xxxxxxxxxx....@
ENDMAP

##############################################################################
NAME:    dpeg_arrival_connections
TAGS:    arrival no_tele_into
ORIENT:  float
SHUFFLE: {1F/[2G/(3H/]4I, Aa/Bb/Cc/Dd/Ee
SUBST:   ([ = .
SUBST:   A=+, a=...>, BCDEbcde=x, GHI=.
SUBST:   1=@, F=>, 2:2., 3:33., 4:444., 234:x
MAP
22222222xxxxx333
2[......BeeeD..3
2.G.....EbbdE..3
xAxxECxDxxdbB.(3
xxAxxecxddxaAH.3
x..FEcddxDAxxCxx
x.{.DdcbB.I....4
x...Bbbcx..]...4
x...CccxC......4
x111xxxxx4444444
ENDMAP

###################################################
# A simple little maze-like thing
NAME:    shiori_arrival_maze
ORIENT:  float
TAGS:    arrival no_monster_gen
NSUBST:  A= 2= + / 2= +x / *= x
NSUBST:  B= 2= + / 2= +x / *= x
NSUBST:  C= 2= + / *= +x
SUBST:   @ = @+
MAP
xxx@xxx@xxx@xxx
@.....B0B.....@
xCx.xAxxxAx.xCx
@.x.A.....A.x.@
x.x.x.....x.x.x
x.xBx..>..xBx.x
x.x.x..{..x.x.x
@.x.A.....A.x.@
xCx.xAxxxAx.xCx
@.....B0B.....@
xxx@xxx@xxx@xxx
ENDMAP

##############################################################################
# 41 x 20 -- this one is huge and twisted, but hopefully worth it.
# From cave/forest to hall.
NAME:     erik_arrival_cave_to_civilisation
TAGS:     arrival no_rotate
WEIGHT:   20
ORIENT:   float
SHUFFLE:  {[(
SUBST:    ?=C., !=CCC., C:ccxxt, ([ = .
SUBVAULT: _ : cave_to_hall_subvault / cave_to_temple_subvault w:5
MAP
xxxxxxxxxxxxxxxxxxxxxxxxxxx
xCCCCCCCCCCCCCCCCCCCCCCCCCxxxxxxxxxxxxxxx
xC[!..C...CC.??...C?....................x
xC..CC..CC.?C...C.?..C....C.............x
xC!C..C..C.C..?..C..?C.?.C____________..x
xC..CC!C.CC..C?.CC.......?____________..x
xC.CC...C.C..C..??..C..?C.____________..x
xC!.C.CCC.?C.?.C..CC...C..____________..x
xCC..CCC.C.C..C...?..C....____________..x
xC{CCC..CC.CC......CC.....____________..@
xC.C...C.CC.C..?C.........____________..x
xC!.CCCCCC.C...C..C?.CC...____________..x
xCCCC.C...C..C...C...?....____________..x
xC!!.!.CCC.C?....?.C...?..____________..x
xC..C!.C.C...C?...CC?...CC____________..x
xCC..CC.?C.CC....C....C...C._________...x
xC(.C..C.CC...C?.....??.................x
xCCCCCCCCCCCCCCCCCCCCCCCCCCxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxx
ENDMAP

NAME:    erik_arrival_cave_to_hall
TAGS:    cave_to_hall_subvault no_rotate
SHUFFLE: TTGGVY
SUBST:   X : cX
NSUBST:  X = 1:+ / *:c
KMASK:   T = no_monster_gen
MAP
...T....ccc.
.......ccccc
.......ccccc
.cXXc...ccc.
cX00Xc......
X>cc%X...T..
cXc%Xc......
.cXXc...ccc.
.......ccccc
.......ccccc
...T....ccc.
  .........
ENDMAP

NAME:    erik_arrival_cave_to_temple
# Intentionally higher chances for the non-Temple gods.
TAGS:    cave_to_temple_subvault no_rotate no_trap_gen
KPROP:   'tCD> = no_tele_into
NSUBST:  ' = 12:1 / 4:2 / 1:3 / *:.
# TODO this mask probably doesn't work:
KMASK:   'tCD> = no_item_gen
: local rnd = crawl.random2(9)
: if rnd == 0 then
KFEAT:   C = altar_beogh
SUBST:   DG = I
KMONS:   1 = orc / nothing
KMONS:   2 = orc wizard / orc priest / orc / nothing
KMONS:   3 = orc warrior
: elseif rnd == 1 then
KFEAT:   C = altar_lugonu
KFEAT:   D = enter_abyss
KMONS:   1 = quasit / iron imp / ufetubus / demonic crawler w:5
SUBST:   t : U...., 23 = 0
: elseif rnd == 2 then
KFEAT:   C = altar_jiyva
SUBST:   D = .
KMONS:   1 = jelly / endoplasm
SUBST:   t : U...., 23 = 0
: else
SUBST:   D = V
KMONS:   1 : gnoll / orc / 0 w:20
KMONS:   2 : ogre / 0 w:70
KMONS:   3 : troll / 0 w:70
SUBST:   t = T
: end
MAP
...T....ccc.
............
...xxxxxxxx.
..xxxxt't>x.
.xxxxx''''x.
.G.x$n'C''x.
...+0x''''x.
...+0x''''x.
.G.x$n'D''x.
.xxxxx''''x.
..xxxxt't>x.
  .xxxxxxxx
ENDMAP

###########################################################
# Basic island, with variations
NAME:   enne_arrival_octagon_isle
ORIENT: float
TAGS:   arrival no_monster_gen
FTILE:  '{ = floor_sand
SUBST:  ' = .
{{
    octa_room({
        oblique = crawl.random_range(3,7),
        replace = '.',
        outside = 'W',
        inside  = '.'
    })
    if crawl.coinflip() then
        smear_map({iterations=20, smear='x', onto='.W', boxy=true})
    end
}}
SUBST: W:xw
MAP
 xxxxxxxxxxxxx
x.............x
x.............x
x.............x
x.............x
......www......
.....w'''w.....
@....w'{'w....@
.....w'''w.....
......www......
x.............x
x.............x
x.............x
x.............x
 xxxxxxxxxxxxx
ENDMAP

#######################################################################
# Four elements.
# Pretty hazardous, but the Earth side is always safe to leave through.
# Players can safely watch at the clouds.
# This vault is great. I've seen players marvel at it. If need be, we
# may delegate it to another branch, where less caution measures are
# demanded. But I'd like to keep it on D:1 (dp).
NAME:    shiori_arrival_elements
TAGS:    arrival no_monster_gen no_tele_into
ORIENT:  float
MARKER:  D = lua:fog_machine { \
             pow_max = 10, delay_min = 50, delay_max = 300, \
             size = 8, start_clouds = 1, \
             cloud_type = "noxious fumes" }
SUBST:   D = E
FTILE:   EF = floor_slime
COLOUR:  EF = lightgreen
SUBST:   E = E n:1
MARKER:  W = lua:fog_machine{\
             pow_max = 10, delay_min = 50, delay_max = 300, \
             size = 8, start_clouds = 1, \
             cloud_type = "freezing vapour"}
SUBST:   W = w, w : HIWw, I = HWww
FTILE:   H = floor_rough_blue
COLOUR:  H = blue
SUBST:   J = w
MARKER:  K = lua:fog_machine {\
             pow_max = 10, delay_min = 50, delay_max = 300, \
             size = 8, start_clouds = 1, \
             cloud_type = "flame"}
SUBST:   K = l, l : LMMl , M = Lll
FTILE:   L = floor_rough_red
COLOUR:  L = red
SUBST:   N = l
MARKER:  O = lua:fog_machine{\
             pow_max = 20, delay_min = 50, delay_max = 300, \
             size = 12, start_clouds = 1, \
             cloud_type = "black smoke"}
SUBST:   O = P
FTILE:   PQ = floor_mud
COLOUR:  PQ = brown
SUBST:   P = P n:1
SUBST:   X : c.
NSUBST:  > : 1:> / *:.
KMASK:   EFHLW = no_item_gen
MAP
          ...
       cccnnnccc
      ccFFEEEFFcc
      cFEEEDEEEFc
      cFFEEEEEFFc
      ccFFFEFFFcc
  cccccccnnnnnccccccc
 ccHHccccc...cccccLLcc
 cHwHHccccc+cccccLLlLc
 cHwwHnccX...XccnLllLc
.nwwwHnJc..>..cNnLllln.
.nwWwwn.+.>{>.+.nllKln.
.nwwwHnJc..>..cNnLllln.
 cHwwHnccX...XccnLllLc
 cHwHHccccc+cccccLLlLc
 ccHHcccccG.GcccccLLcc
  cccccccnn+nnccccccc
      ccQQQPQQQcc
      cQQPPPPPQQc
      cQPPPOPPPQc
      ccQQPPPQQcc
       ccc+++ccc
ENDMAP

##############################################################################
# Three arrival vaults containing the same river.
NAME:    lemuel_arrival_river_bridge
TAGS:    arrival no_monster_gen
ORIENT:  float
SHUFFLE: {}, XXT
COLOUR:  ' : brown / white
FTILE:   ' = floor_dirt
SUBST:   '=., X=x, T:tttT, T=t x:1
: if not is_validating() and crawl.coinflip() then
TAGS:    no_pool_fixup
: end
WEIGHT:  3
MAP
xxxxxxxxxxxxxxxxxxx
xXXXXXXXXXXXXXXXXXx
xXXXX{.......}XXXXx
xXXXX.........XXXXx
xwXXX.........XXXXx
xwwXX.........XXXXx
xwwwX.........XXXXx
xXwwX.........XXXXx
xXwwww........XXXXx
xXXwwwwww'w...XXXXx
xXXXwwwww'wwwwXXXXx
xXXXXwwww'wwwwwwXXx
xXXXX...w'wwwwwwwXx
xXXXX........wwwwXx
xXXXX.........Xwwwx
xXXXX.........XXwwx
xXXXX.........XXXwx
xxxxx.........xxxxx
xxxxx....@....xxxxx
ENDMAP

NAME:    lemuel_arrival_river_ford
TAGS:    arrival no_monster_gen
ORIENT:  float
WEIGHT:  6
SHUFFLE: {}, XYZ
SUBST:   X=W, Y=w, Z=w
: if crawl.random2(3) > 0 then
SUBST:   T=x, "=., '=.
: else
SUBST:   "=T.., '=T...., T:Tttt, T=t x:1
: end
MAP
xxxxxxxxxxxxxxxxxxx
xTTTTTTTTTTTTTTTTTx
xTTTT{"""""""}TTTTx
xTTTT"."..."."TTTTx
xwTTT"'.''..."TTTTx
xwwTT".'""".'"TTTTx
xwwwT.''"""'."TTTTx
xTwwX".'.''.'"TTTTx
xTwwXw..'..''"TTTTx
xTTXwwwwwww.."TTTTx
xTTTXwwwwYYwwZTTTTx
xTTTTXwwYwwwwwZwTTx
xTTTT'..wwwwwZwwwTx
xTTTT''..''..wwwwTx
xTTTT''.''.'''Twwwx
xTTTT'.'.''.''TTwwx
xTTTT.........TTTwx
xxxxx.........xxxxx
xxxxx....@....xxxxx
ENDMAP

NAME:    lemuel_arrival_river_passageway
TAGS:    arrival no_monster_gen
ORIENT:  float
SHUFFLE: {}, ABC
SUBST:   A:+, B:x, C:x
WEIGHT:  1
MAP
xxxxxxxxxxxxxxxxxxx
xxxWA{.......}xxxxx
xxwWx.........xxxxx
xwwWB.........xxxxx
xwwWx.........xxxxx
xwwWC.........xxxxx
xxWwx.........xxxxx
xxWwwwww......xxxxx
xWxwwwwwwwwww.xxxxx
xWxxwwwwwwwwwwxxxxx
xxWxxwwwwwwwwwwwxxx
xxWxx.wwwwwwwwwwwxx
xxwWx......wwwwwwxx
xwxw+.........xwwwx
xwxxx.........xxwwx
xxxxx.........xxxwx
xxxxx.........xxxxx
xxxxx.........xxxxx
ENDMAP

##############################################################################
NAME:    dpeg_arrival_caged_fury
TAGS:    arrival no_rotate
MONS:    w:30 nothing / giant cockroach / w:2 worm
MONS:    w:30 nothing / endoplasm
MONS:    w:20 nothing / jackal / rat
MONS:    w:30 nothing / endoplasm / w:2 jelly / giant cockroach / w:2 worm / \
         w:5 jackal / w:5 rat
ORIENT:  float
FTILE:   1234ABCDEabcdem = floor_dirt
SHUFFLE: abcde / fghij
SUBST:   f=A, g=B, h=C, i=D, j=E
SUBST:   abcde = mx
SUBST:   ABCDE : mx
SHUFFLE: xc, 123
KMASK:   T = no_monster_gen
MAP
.................
.xxxxxxxxxxxxxxx.
.x4441321331444x.
.x4312132211324x.
.x4123213123134x.
.xABCDEm=medcbax.
.x.............x.
.+T....xxx....T+.
.x......{......x.
.x..T...]...T..x.
.xxx+xxxxxxx+xxx.
.................
ENDMAP

##############################################################################
NAME:    dpeg_arrival_pits
TAGS:    arrival no_monster_gen no_rotate no_pool_fixup
WEIGHT:  20
ORIENT:  float
: if crawl.one_chance_in(4) then
SUBST:   Yy=w, Zz=l, Xx"'=b
NSUBST:  U = 1:} / *:{
: elseif crawl.one_chance_in(3) then
SUBST:   U=., Yy=w, Zz=l
SHUFFLE: x_/'"
SUBST:   x=+, '=b, ":".b
NSUBST:  X = 1:} / *:{
: elseif crawl.one_chance_in(2) then
SUBST:   U=., Zz=l, Xx"'=b
NSUBST:  Y = 1:} / *:{, y = 1:. / *:w
: else
SUBST:   U=., Yy=w, Xx"'=b
NSUBST:  Z = 1:} / *:{, z = 1:. / *:l
: end
SHUFFLE: bxxx
MAP
 .......    .......
..wwww...  ...llll..
.wywwyw......lzllzl.
.wwYYww..UU..llZZll.
.wywwyw......lzllzl.
..wwww..b'bb..llll..
 ......bx"bxb......
      .'"XX"'.
      .bx"bxb.
      ..b'bb..
       ......
ENDMAP

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

NAME: nicolae_arrival_kraken_aquarium_a
TAGS: arrival no_monster_gen no_pool_fixup no_trap_gen generate_awake
ORIENT: float
WEIGHT: 1
KMONS: K = kraken att:neutral
KFEAT: K = w
NSUBST: ' = 12:! / *:'
KMONS: ! = human / elf / orc; nothing / naga; nothing / draconian; nothing / \
           ogre; nothing / minotaur; nothing / troll / kobold; nothing / \
           mummy / ghoul / spriggan; nothing / dwarf; nothing / felid / \
           octopode; nothing / vampire spells:. / formicid; nothing / \
           gargoyle; nothing / vine stalker; nothing / djinni / \
           merfolk; nothing / palentonga / gnoll; nothing / barachi / \
           demonspawn / demigod / tengu; nothing
KPROP: Kw'! = no_tele_into
KMASK: '! = no_item_gen
KFEAT: ' = .
MAP
  .......
 .........
..nnnnnnn..
..n'''''n..
..n'www'n..
..n'wKw'n.{
..n'www'n..
..n'''''n..
..nnnnnnn..
 .........
  .......
ENDMAP

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

NAME: nicolae_arrival_kraken_aquarium_b
TAGS: arrival no_monster_gen no_pool_fixup no_trap_gen
ORIENT: float
WEIGHT: 1
KMONS: K = kraken att:neutral
KFEAT: K = w
NSUBST: ' = 15:! / *:'
KMONS: ! = human / elf / orc; nothing / naga; nothing / draconian; nothing / \
           ogre; nothing / minotaur; nothing / troll / kobold; nothing / \
           mummy / ghoul / spriggan; nothing / dwarf; nothing / felid / \
           octopode; nothing / vampire spells:. / formicid; nothing / \
           gargoyle; nothing / vine stalker; nothing / djinni / \
           merfolk; nothing / palentonga / gnoll; nothing / barachi / \
           demonspawn / demigod / tengu; nothing
KPROP: Kw'! = no_tele_into
KMASK: '! = no_item_gen
KFEAT: ' = .
MAP
.........
.nnnnnnn.
.n'''''n.xxxxx
.n'www'n.x...x
.n'www'n+x...x
.n'wKw'n+..{.x
.n'www'n+x...x
.n'www'n.x...x
.n'''''n.xxxxx
.nnnnnnn.
.........
ENDMAP

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

NAME:    nagdon_arrival_double_spiral
TAGS:    arrival no_monster_gen no_trap_gen no_pool_fixup
ORIENT:  float
MONS:    plant, toadstool
: if crawl.coinflip() then
SUBST:   G : G:20 H:20 T:5 V:5 1:5 2:5 t:5 A:1 B:1 C:1
SUBST:   c : c:40 x:35 v:15 b:10
: elseif crawl.coinflip() then
SUBST:   . = W
SUBST:   ' = W.
SUBST:   G : 2:15 G:10 H:5 1:5 A:1 B:1 C:1
SUBST:   c : t:60 x:30 c:10
: else
:   if crawl.one_chance_in(4) then
SUBST:   . = W
SUBST:   ' = WW.
:   elseif crawl.one_chance_in(6) then
SUBST:   c = W
:   end
SUBST:   c : t:45
SUBST:   G : G:40 H:30 2:10 1:5 A:3 B:2
: end
KFEAT:   A = abandoned_shop
KFEAT:   B = stone_arch
NSUBST:  C = AB / c
SUBST:   H : G:60 T:5
SUBST:   '" = .
MAP
        ccc
     ccccGcccc
    cc.......cc
   cc.ccccccc.cc
  cc.cc.....cc.cc
  c.cc.cccc..cc.c
  c.c.cc...cc.c.c
 cc.c.c.cc.Gc.c.cc
 cG.c.c.cG.cc.c.Gc
 cc.c.c.cc....c.cc
  c.c.cc..cccGc.c
  c'cc.cc...ccc.c
  cc'cc.cccc...cc
   cc'cc...ccGcc
    cc'ccc.{ccc
     cc@"ccccc
        @@@
ENDMAP

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

NAME:    nagdon_arrival_zigzag_paths
TAGS:    arrival no_trap_gen no_monster_gen
ORIENT:  float
MONS:    plant, toadstool
ITEM:    orc skeleton / kobold skeleton / goblin skeleton / place:D:1 skeleton
: if crawl.one_chance_in(3) then
  SUBST:   GHIJ = x
  SUBST:   " = .
  SUBST:   & = @
:   if crawl.coinflip() then
    SUBST:   ' = .
    SUBST:   + = +:40 .:30 1:5 2:5
:     if not crawl.one_chance_in(3) then
      SHUFFLE: [({
:     end
:   else
    SUBST:   '(+ = x
:   end
: else
  SUBST:   "['(& = x
  SUBST:   + = H
:   if crawl.coinflip() then
    SUBST:   GIJ = G
    SUBST:   G : x.
    SUBST:   H : xGc
:   else
:     if crawl.coinflip() then
      SUBST:   H = x
      SHUFFLE: GHI
      SUBST:   G = I
      SUBST:   H = x
      SUBST:   I : G:3 1:5 2
      SUBST:   J : x d e A V >:5 2:5 1:1
      SUBST:   e = dx
:     else
:       if crawl.coinflip() then
        SUBST:   H : .:20 + 1:1
        SUBST:   J = H
        SUBST:   GI =  x
:       end
        SUBST:   GIJ : x b:1
        SUBST:   H : G T V:5 1:5 2:1 A:1
:     end
:   end
: end
SUBST:   x : x c:1
: if crawl.one_chance_in(3) then
  SUBST:   G = t
: elseif crawl.one_chance_in(10) then
  SUBST:   x = t
  SUBST:   1 : 2 T
: end
KFEAT:   A = abandoned_shop / stone_arch / shaft trap / teleport trap
NSUBST:  A = A / x
SUBST:   X = x
SUBST:   ([ = .
MAP
    XXXXXXXXXXXXXXXXXXXXXXXXXXXX
 XXXXxxxxxxxxxxxxxxxxxxxx"xxxxxx
 Xxxxxxxxxxxxx"xxxxxxxxx"x"xxxxxxx&
 Xxxxxx"xxxxx"x"xxxxxxx"Jxx"xxxxx"x
XXxx[x"x"xxx"Jxx"xxxxx"GHIxx"xxx"xx
XXxxx"Jxx"x"GHIxx"xxx"xx.xxxx"x"xxx
XxxxxGHIxx"xx.xxxx"x"xx.x.xxxx"xxx&
Xxxxxx.xxxxx.x.xxxx"xx.xxx.xxxx"x"x
Xxx{x.x.xxx.xxx.xxxxx.xxxxx.xxxx"xx
Xxxx.xxx.x.xxxxx.xxx.xxxxxxx.xxxxx@
XxxGHIxxx.xx'xxxx.x.xxxxXxxxx.xxx.@
XxxxJxx'GHI'x'xxxx.xxxxXXXxxxx.x.xx
Xxxxxx(x'J'xxx'xxG+IxxXX XXxxxx.x.x
XXxxxxxxx'xxxxx'x'JxxXX   XXxxGHIx@
 XXXxxxxxxxxxxxx'xxxxXX    XxxxJxxx
   XXXXxxxxXXXxxxxxxXX     Xxxxxxxx
      XXXXXX XXXXXXXXX     XXxxxxx
ENDMAP

NAME: nicolae_arrival_memento_mori
TAGS: arrival no_monster_gen no_trap_gen
ORIENT: float
SUBST: n = nN
KPROP: u = no_tele_into
KPROP: Nu = bloody
SUBST: N = n, u = uU
KMASK: uU = no_item_gen
: local race = you.race()
: local mons = you.monster()
: local skeltype = "skeleton"
: local yourname = string.gsub(you.name(), " ", "_")
: -- The corpseless. Before the game starts, you.monster() is "program bug".
: if (not crawl.game_started()) or race == "Vampire"
:     or race == "Mummy" or race == "Ghoul"
:     or race == "Gargoyle" or race == "Vine Stalker"
:     or race == "Djinni" or race == "Yak" then
:   mons = "human"
: end
: if you.race() == "Formicid" or you.race() == "Octopode" then
:   skeltype = "corpse"
: end
:
: dgn.delayed_decay(_G, 'u', mons .. " name:" .. yourname .. " corpse")
: dgn.delayed_decay(_G, 'U', mons .. " name:" .. yourname .. " " .. skeltype )
MAP
xxxxxxxxxxx
x.........x
x...nnn...x
x.{.nun...+
x...nnn...x
x.........x
xxxxxxxxxxx
ENDMAP
