###############################################################################
# ziggurat.des - Ziggurat entry vaults and ziggurat layouts.
###############################################################################

# Most ziggurat code is in ziggurat.lua.
# XXX: Ziggurat code is incomplete.

: crawl_require("dlua/ziggurat.lua")

### Entry vaults to ziggurats ##########################################
#
# There is one Ziggurat in Depths.

default-depth: Depths

# In case there is an encompass vault on the level.
NAME:   ziggurat_fallback
TAGS:   zig_entry
KFEAT:  O = enter_ziggurat no_mimic
TAGS:   overwrite_floor_cell no_exits transparent
WEIGHT: 1
MAP
O
ENDMAP

NAME:   enter_ziggurat_a
TAGS:   zig_entry transparent
KFEAT:  O = enter_ziggurat no_mimic
COLOUR: ; : cyan / lightblue
COLOUR: ' = blue
FTILE:  ; = floor_hall
SUBST:  ' = .
SUBST:  ; = .
MAP
.......
.;;;;;.
.;''';.
.;'O';.
.;''';.
.;;;;;.
.......
ENDMAP

NAME:    enter_ziggurat_b
TAGS:    zig_entry transparent
KMASK:   O = opaque
KFEAT:   O = enter_ziggurat no_mimic
TAGS:    no_pool_fixup
SHUFFLE: wW' / l;_
COLOUR:  ; = red
COLOUR:  _ : blue / lightred
COLOUR:  ' = cyan
FTILE:   ' = floor_hall, _ = floor_hall, ; = floor_hall, O = floor_hall
SUBST:   '=. , ;=. , _=.
MAP
   ..'..
  ..'W'..
 ..'WwW'..
..'WwwwW'..
.'WwwOwwW'.
..'WwwwW'..
 ..'WwW'..
  ..'W'..
   ..'..
ENDMAP

NAME:    enter_ziggurat_c
TAGS:    zig_entry no_trap_gen transparent
KFEAT:   O = enter_ziggurat no_mimic
MONS:    lich / ancient lich / dread lich
MONS:    angel / daeva
MONS:    eye of devastation / floating eye / \
         great orb of eyes / shining eye
KPROP:   1Om = no_tele_into
SHUFFLE: 123x
SUBST:   1=1___, 2=2_, x=_
KMASK:   O123_ = opaque
KFEAT:   _ = floor
KFEAT:   m = iron_grate
MAP
    ...
   ..m..
  ..mmm..
 ..mm1mm..
..mm1O1mm..
 ..mm1mm..
  ..mmm..
   ..m..
    ...
ENDMAP

NAME:    enter_ziggurat_d
TAGS:    zig_entry no_trap_gen transparent
KFEAT:   O = enter_ziggurat no_mimic
MONS:    lich / ancient lich / dread lich
MONS:    angel / daeva
MONS:    eye of devastation / floating eye / \
         great orb of eyes / shining eye
KPROP:   1On; = no_tele_into
SHUFFLE: 123x
SUBST:   1=1___, 2=2_, x=_
SUBST:   ;=_
KFEAT:   n = iron_grate
KMASK:   O123_ = opaque
KFEAT:   _ = floor
MAP
    ...
   ..n..
  .nnnnn.
 ..n;1;n..
..nn1O1nn..
 ..n;1;n..
  .nnnnn.
   ..n..
    ...
ENDMAP

NAME:   enter_ziggurat_e
TAGS:   zig_entry transparent
KFEAT:  O = enter_ziggurat no_mimic
COLOUR: ; : cyan / lightblue
COLOUR: ' = blue
FTILE:  ; = floor_hall
SUBST:  ' = .
SUBST:  ; = .
MAP
.......
.;;;;;.
.;''';.
.;'O';.
.;''';.
.;;;;;.
.......
ENDMAP

NAME:   enter_ziggurat_f
TAGS:   zig_entry no_trap_gen transparent
KFEAT:  O = enter_ziggurat no_mimic
MONS:   angel / nothing w:20
KPROP:  1Om; = no_tele_into
KFEAT:  ; = floor
KMASK:  1O; = opaque
MAP
    ...
   ..m..
  ..mmm..
 ..mm1mm..
..mm;O;mm..
 ..mm1mm..
  ..mmm..
   ..m..
    ...
ENDMAP

default-depth: Zig

#######################################################################
# Pillars for ziggurats.
# Ziggurat pillars are handled specially in ziggurat.lua. In particular:
# - ziggurat pillars do not need allow_dup. The pillar map is never
#   registered as used.
# - ziggurat pillars cannot use map markers.
#######################################################################
NAME: ziggurat_pillar_abc
TAGS: ziggurat_pillar unrand no_exits
WEIGHT: 20
SHUFFLE: dD / eD / eE
SUBST: ceE : bcmvxG
CLEAR: dD
MAP
dD
cd
ENDMAP

NAME: ziggurat_pillar_d
TAGS: ziggurat_pillar unrand no_exits
DEPTH: Zig:18-
SUBST: c : cxvb
MAP
 cc
ccc
cc
ENDMAP

NAME:  ziggurat_pillar_e
TAGS:  ziggurat_pillar unrand no_exits
DEPTH: Zig:18-
WEIGHT: 5
SUBST: c : bcv
MAP
 ccc
ccccc
ccccc
ccccc
 ccc
ENDMAP

NAME: ziggurat_pillar_centre_a
TAGS: ziggurat_pillar centered no_dump unrand no_exits
MAP
lll
lGl
lll
ENDMAP

NAME: ziggurat_pillar_centre_b
TAGS: ziggurat_pillar centered no_dump unrand no_exits
SHUFFLE: wb / lb / nb / cb / bx
MAP
 www
wwwww
wwbww
wwwww
 www
ENDMAP

NAME: ziggurat_pillar_centre_c
TAGS: ziggurat_pillar centered unrand no_exits
# This is evil. Monster sets are: summoners (1), smites (2), harmless (3).
# This pillar has tactical implications: you will have to stay away from it,
# and teleports are more risky.
MONS: dread lich / shadow demon / curse skull / \
      ironbound convoker / corrupter / deep elf demonologist
MONS: eye of devastation / floating eye / ghost moth / black sun / torpor snail
MONS: plant
: if you.depth() > 21 then
SUBST: 3 = 12222
: elseif you.depth() > 15 or you.depth() > 8 and crawl.coinflip() then
SUBST: 3 = 12
: end
KFEAT: m = iron_grate
MAP
mmm
m3m
mmm
ENDMAP

NAME: ziggurat_pillar_centre_monster
TAGS: ziggurat_pillar centered no_dump unrand no_exits
MONS: ice statue / orange crystal statue / obsidian statue
MAP
1
ENDMAP

NAME:    ziggurat_pillar_centre_def
TAGS:    ziggurat_pillar centered no_dump unrand no_exits
WEIGHT:  20
SHUFFLE: xy'z / xY'z / "Y"Z
SUBST:   xYZ : bcmvxG, y" = .
CLEAR:   'z
MAP
z'z'z
'x.x'
z.y.z
'x.x'
z'z'z
ENDMAP

NAME: ziggurat_pillar_centre_h
TAGS: ziggurat_pillar centered no_dump unrand no_exits
MONS: crimson imp
MAP
ccncc
c...c
n.1.n
c...c
ccncc
ENDMAP

NAME: ziggurat_pillar_centre_i
TAGS: ziggurat_pillar centered no_dump unrand no_exits
MAP
vlv
lvl
vlv
ENDMAP

NAME:  ziggurat_pillar_centre_j
TAGS:  ziggurat_pillar centered no_dump unrand no_exits
SUBST: x : bcmvxG
MAP
 x
xxx
 x
ENDMAP

NAME:    ziggurat_pillar_centre_l
TAGS:    ziggurat_pillar centered no_dump unrand no_exits
SHUFFLE: X' / X' / 'X
SUBST:   xX : bcmvxG, ' = .
MAP
  x
 ...
xX'Xx
 ...
  x
ENDMAP

NAME:    ziggurat_pillar_centre_m
TAGS:    ziggurat_pillar centered no_dump unrand no_exits
DEPTH:   Zig:18-
SHUFFLE: X'" / X'" / 'X" / '"X
SUBST:   x : bcmvxG, X : bcmvxG, '" = .
MAP
  x.x
 .....
x."...x
..'X'..
x...".x
 .....
  x.x
ENDMAP

NAME:    ziggurat_pillar_centre_n
TAGS:    ziggurat_pillar centered no_dump unrand no_exits
DEPTH:   Zig:18-
WEIGHT:  5
SUBST:   x : w:40 bcmvxG
MAP
 ...
.wxw.
.....
.wxw.
 ...
ENDMAP

NAME:    ziggurat_pillar_centre_o
TAGS:    ziggurat_pillar centered no_dump unrand no_exits
WEIGHT:  5
SUBST:   x : bcmvx
MAP
 ...
..x..
..+..
..x..
 ...
ENDMAP

NAME: ziggurat_pillar_centre_oklobs
TAGS: ziggurat_pillar centered unrand no_exits
MONS: plant / oklob plant / nothing w:20
MAP
 111
11111
11111
11111
 111
ENDMAP

NAME:   ziggurat_pillar_centre_dead_trees
TAGS:   ziggurat_pillar centered unrand no_exits
SUBST:  T = t.
COLOUR: t = w:5 lightgrey / brown
TILE:   t = DNGN_TREE_DEAD
MAP
 TTT
TtttT
TtttT
TtttT
 TTT
ENDMAP

NAME:  ziggurat_pillar_centre_smoke
TAGS:  ziggurat_pillar centered unrand no_exits
WEIGHT: 5
MARKER:  Z = lua:fog_machine { cloud_type = "black smoke", \
         pow_min = 25, pow_max = 25, \
         delay = 30, size = 1, walk_dist = 3 }
MAP
 v..
.v.vv
..Z..
vv.v.
 ..v
ENDMAP

NAME:  ziggurat_pillar_centre_lightning
TAGS:  ziggurat_pillar centered no_dump unrand no_exits
MONS:  lightning spire
MAP
v...v
.....
..1..
.....
v...v
ENDMAP

NAME:    ziggurat_pillar_centre_more_plants
TAGS:    ziggurat_pillar centered unrand no_exits
DEPTH:   Zig:18-
WEIGHT:  5
MONS:    plant, bush, patrolling thorn hunter, patrolling shambling mangrove
SHUFFLE: 1t
SUBST:   1 : 12, 3 : 34..., x : bcmvxG
MAP
  .t.
 ..t.1
..1.3..
tt.x.tt
..3.1..
 1.t..
  .t.
ENDMAP

NAME:    ziggurat_pillar_centre_drop
TAGS:    ziggurat_pillar centered generate_awake unrand no_exits
DEPTH:   Zig:10-
WEIGHT:  5
MONS:    lost soul, rakshasa
KFEAT:   ~ = permanent teleport trap
KFEAT:   a = iron_grate
SHUFFLE: xbcv
SUBST:   9 : 00.
: if you.depth() > 18 then
SUBST:   0 : 0112
: end
MAP
  xax
 ax0xa
xx9.9xx
a0.~.0a
xx9.9xx
 ax0xa
  xax
ENDMAP

NAME:  ziggurat_pillar_centre_dispersal
TAGS:  ziggurat_pillar centered generate_awake unrand no_exits
KFEAT: ^ = dispersal trap
MAP
^G.G^
GG.GG
.....
GG.GG
^G.G^
ENDMAP

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

NAME: ziggurat1
PLACE: Zig
: ziggurat_level(_G)
MAP
ENDMAP
