# "Undead" by dk
#
# Serial vault with an undead/graveyard theme

{{
function init_undead(e)
  e.tags('serial_undead')
  e.tags('extra')
  e.tags('allow_dup')
  e.weight('2')
  e.ftile('- = floor_pebble_brown')
  e.ftile('_ = floor_pebble_darkgray')
  e.colour('- = brown')

  e.subst('S = .....S')
  e.lua_marker('S', fog_machine { pow_max = 10, delay_min = 10, delay_max = 10,
                                  size = 5, start_clouds = 1,
                                  cloud_type = "black smoke" })
  e.subst('S = .')

  if you.absdepth() <= 3 then
    e.kmons('.-_ = zombie / skeleton / w:300 nothing')
  elseif you.absdepth() <= 6 then
    e.kmons('.-_ = w:25 zombie / skeleton / w:5 phantom / w:300 nothing')
  elseif you.absdepth() <= 9 then
    e.kmons('.-_ = w:30 zombie / w:20 wight / w:300 nothing')
  elseif you.absdepth() <= 12 then
    e.kmons('.-_ = w:30 zombie / w:10 wraith / w:10 vampire / \
             w:10 shadow / w:300 nothing')
  else
    e.kmons('.-_ = w:30 zombie / w:5 shadow / w:5 wraith / w:5 vampire / \
            w:15 skeletal warrior / w:300 nothing')
  end
  e.kmons('t = withered plant')

  e.tile('G = dngn_gravestone')
  e.set_feature_name("granite_statue", "a gravestone")
end
}}

NAME:   serial_undead
DEPTH:  D:2-
TAGS:   extra luniq_serial nolayout_encompass
CHANCE: 1%
{{
  local c = 4 + crawl.random2(3) * crawl.random2(4)
  hook("post_place", function()
    dgn.place_maps{tag="serial_undead", count=c}
  end)
}}

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

NAME:   serial_undead_a
SUBST:  . = ....-_
: init_undead(_G)
MAP
.....
.....
..S..
.....
.....
ENDMAP

NAME:   serial_undead_b
SUBST:  . = ...t
: init_undead(_G)
MAP
....
....
.S..
....
ENDMAP

NAME:   serial_undead_c
SUBST:  . = -_.......tGG
: init_undead(_G)
MAP
....
....
....
....
ENDMAP

NAME:   serial_undead_d
SUBST:  _ = -_
SUBST:  . = ......-_
FTILE:  G = FLOOR_PEBBLE_DARKGRAY
: init_undead(_G)
MAP
.....
.___.
._G_.
.___.
.....
ENDMAP

NAME:   serial_undead_e
SUBST:  . = ........--__ttG
: init_undead(_G)
MAP
....
..S.
....
....
ENDMAP

NAME:   serial_undead_f
SUBST:  . = .......--__tt
SUBST:  w = .wwW
: init_undead(_G)
MAP
..S...
.wwww.
wWWWww
.wWWW.
.wwww.
....S.
ENDMAP
