# Bayou by coolio.
#
# Bayou is a new serial vault that can appear in Dungeon, Snake Pits and Lair.
# There are no monster spawns so it can appear on any depth level.
#
# A Bayou level has a 'swampy' atmosphere (because everybody loves Swamp) by
# placing a large number of ponds and lakes with thick vegetation.

{{
function bayou_setup(e, large)
    e.tags('serial_bayou')
    if large == nil then
       e.tags('extra decor')
    end
    if you.in_branch("Snake") then
       e.weight('6')
    end
    e.kmons('12 = plant')
end
}}

default-depth: D, Lair, Snake, Depths

NAME:   serial_bayou
TAGS:   allow_dup extra luniq_serial decor
TAGS:   nolayout_encompass luniq_lairdec_liquid luniq_snakedec_liquid
CHANCE: 1%
{{
  local c = 4 + crawl.random2(3)*crawl.random2(2)
  hook("post_place", function()
    dgn.place_maps{tag="serial_bayou", count=c}
  end)
}}

NAME:   serial_bayou_pond_c
TAGS:   allow_dup
KFEAT:  2 = W
SUBST:  ? = WWtt2, . = ..W12
: bayou_setup(_G)
MAP
       1
    ..1W
 .11WWWW.
.WW????WW
.1?tttt?W.
1W?tttt?W1
.W?tttt?W1
.WW????W1.
 .1W1W1W.
  .....
   .1.
ENDMAP

NAME:   serial_bayou_pond_d
TAGS:   allow_dup
KFEAT:  1 = W
SUBST:  1 = 1W., W = WWWt
: bayou_setup(_G)
MAP
 11
 WWW1
1WWW1
 W11
ENDMAP

NAME:  serial_bayou_pond_e
TAGS:  allow_dup
KFEAT: 1 = W
SUBST: W = WWW1., . = ..t
: bayou_setup(_G)
MAP
.WWW.
WWWWW
.WWW.
ENDMAP

NAME:  serial_bayou_ford_a
TAGS:  transparent
KFEAT: 1 = W
SUBST: ? = Wt, V = Www, W = WWWW1, ! = W..
: bayou_setup(_G)
MAP
       ttttt
      tttttttt
     ??WW??WW??
    ?tWWWWWWWWW?
  ??tWWWWWW!!W!.@
  ?WWW!!.!......@
 @...............@
  @..!!.!.!!!!!WW???
   @?!W!!W?WWWWWWWWW?
    ?WWWWWWWWWVWWWWWW?
     ?WWWWWVwwwVWWWW?
      ?WWWVVwVWWW???
      ?WWWWWVWW?tt
      ?WWW?WW?
       t?ttt?
ENDMAP

NAME:   serial_bayou_shore_a
TAGS:   transparent allow_dup
DEPTH:  D, Lair, Snake
ORIENT: east
KFEAT:  1 = W
SUBST:  ? = Wt, V = Www, W = WWW1, ! = W1..
: bayou_setup(_G, true)
MAP
 @@      ttttxxxxxx
@..WWWWWWWWttttxxxx
 ..!WWWWWWWWWttttxx
 ..!WWWWWVVVVWWtttx
 ..!WWWWWVwwwVWWttx
 ...!WWWVwwwwwVWttx
 ...!WWWVwwwwwVWttx
 ..!WWWWVwwwwwVWttx
 ..!WWWWWVwwwVWtttx
 ..!WWWWWVwwwVttttx
@..WWWWWWWVVVWtttxx
@..WWWWWWWWWWttttxx
 @@      tttttttxxx
ENDMAP

NAME:   serial_bayou_shore_b
TAGS:   transparent allow_dup
DEPTH:  D, Lair, Snake
ORIENT: east
KFEAT:  1 = W
SUBST:  ? = Wt,  V = Www, W = WWW1, ! = W1..
: bayou_setup(_G)
MAP
  ???xxx
@.!W??xx
@.!WWW?x
@.!WVV?x
@.!WWW?x
@.!W??xx
  ???xxx
ENDMAP

NAME:   serial_bayou_lagoon_a
TAGS:   transparent
KFEAT:  1 = W
SUBST:  ? = W11., w = wwt
: bayou_setup(_G)
MAP
?????????
?WWt1W11???
??WWWwwwwW????
 ?????WtwwW11??
     ??1WwwtW1??
      ?11twwWW1?
      ??11ttwWW?
       ?1tWwwW1?
     ??11tWWW1??
  ????WWtWW????
 ??1WWWt1???
??WWtW1???
?W111???
?W1???
????
ENDMAP

NAME:  serial_bayou_lagoon_b
KFEAT: 1 = W
SUBST: ? = Wt, ! = !t, V = Www, W = WWWW1
FTILE: . = floor_dirt
CLEAR: !
: bayou_setup(_G, true)
MAP
   ?????     ???
  ?WWWWW?!!??ttt?
 WWWWWWWttttWVWWt?
@WWWWWWWWWWWVwVWWW?@@??
@....................WW?
@?WWWWWWWWWVwwVWWWw.wWWW?
  ?WWWWWWWWWVVWWWWw.wWWWW?
   ?WWWWW???WWWWWWw.VVWWWW?
    ?????   ?tttWWV.wVVVWWW?
             !tttWw.wwVVVWWW?
              !ttVw.wwwVVWWtt
              !ttWw.wwVVVVWtt
             !ttWWV.wVVVWttt
            ?tttVww.WWWWWtt
            ?WWVVww.WWWWttt
            ?WVwwww.WWWWtt
           ??WWWVww.WWWt?
          ?WWWWWWVw.WWW?
           ?WWWWWWV.WW?
            ?WWWWW?.??
             ?????@@@
ENDMAP

NAME:   serial_bayou_lake_a
TAGS:   transparent
KFEAT:  1 = W
NSUBST: ! = 1:@ / * = @tt
SUBST:  ? = Wt, V = Www, W = WWWW1
: bayou_setup(_G, true)
MAP
          !!!!!!!!!
      !!!!???????????!!
     ??????WWW?WWWWW????!!
   ???WWWWWWVVVVV?WW?WW???
  ??WWW?WWVVwwwwwVVWW?WWW?!
 ??WW?WWWVwwwwwwwwwVWWWWW???
!?WWWWWWVwwwwwwwwwwwVW?WWWW?!
!?W?WWWWVwwwwwwwwwwwVWWWWWW?!
!?WWW?WWVwwwwwwwwwwwVWWW?WW?!
 ??WW?WW?VwwwwwwwwwVW?WWWW??
  ??WWWWWWVVwwwwwVV?WW?WW??
    ???W?WWWWVVVVVWWWWWW??!
     !?????W?WWWWWWW?????!
       !!!???????????!!!
           !!!!!!!!!
ENDMAP

NAME:  serial_bayou_crossing
TAGS:  transparent
SUBST: ? = W1tt, W = WWW.
KFEAT: 1 = W
: bayou_setup(_G)
MAP
    t?@?t
    t?W?tt
    t?W?tt
  ttt?W?t
ttttt?W?ttttt
?????WWW?????
@WWWWWWWWWWW@
?????WWW?????
ttttt?W?ttttt
  ttt?W?t t
   tt?W?t
    t?W?tt
    t?@?t
ENDMAP
