# Park by coolio.
#
# Park is a new serial vault that generates wide open areas with lots of trees
# and bushes.
{{
function init_park(e, plant_t, grass_f, vaults_f)
  e.tags('transparent')
  e.tags('extra')
  e.tags('decor')
  e.tags('serial_park')
  e.kmons('1 = ' .. plant_t)
  e.ftile(grass_f .. " = floor_grass_dark")
  e.ftile(vaults_f .. " = floor_vault")
end
}}

default-depth: D

NAME:   serial_park
TAGS:   allow_dup extra luniq_serial decor layout_open layout_open_caves
CHANCE: 1%
{{
  local c = 5 + crawl.random2(3)*crawl.random2(2)
  hook("post_place", function()
    dgn.place_maps{tag="serial_park", count=c}
  end)
}}

NAME:     serial_park_central
ORIENT:   centre
SUBST:    F : GGTTT
# This can occasionally produce pockets, but they're tagged as no_tele_into.
SUBST:    E = `````11t
SUBST:    < = ({[
SUBVAULT: H : serial_park_minivault
SUBVAULT: J : serial_park_minivault
KPROP:    ' = no_tele_into
: init_park(_G, "bush", "`E1t", "DTG")
MAP
    @       @@@
 xxx+xxxxxxxx+xxxxxxxxxxxx
 x.....x1111D.DtEEtttttttx
 x.....xDDDDD.DEEEtJJJJJtx
 x..% .+......DtEEEJJJJJE+
 x.....xDDDDD.DEEEEJJJJJEx
 x.....xEEEED.DtEEEJJJJJEx
 xxxxxxxEEEED.DEEEtJJJJJtx
 x11111EEEEED.DtEEttEEEttx
 xEEEEEEEEEED.DEEEEEEEEEEx
 xEEEEEEEEEED.DtEEEEDDDEEx
 xtEtEtEtEtD...DEEED.F.DEx
@xDDDDDDDDD..D..DDDD...DDx@
@+..........D<D..........+@
@xDD...DDDD..D..DDDDDDDDDx@
 xED.F.DEEED...DtEtEtEtEtx
 xEEDDDEEEEtD.DEEEEEEEEEEx
 xEEEEEEEEEED.DEEEEEEEEEEx
 xttEEEttEEtD.DEEEEE11111x
 xtHHHHHtEEED.DEEEExxxxxxx
 xEHHHHHEEEtD.DEEEEx.....x
 xEHHHHHEEEED.DDDDDx.....x
 xEHHHHHEEEtD......+..%..x
 xtHHHHHtEEED.DDDDDx.....x
 xttEEEttEEtD.D1111x.....x
 xxxxxxxxxxxx+xxxxxxxx+xxx
            @@@       @
ENDMAP

NAME:     serial_park_gazebo
ORIENT:   float
# Small chance of random altar.
SUBST:    F : GGGGTTTTVC
SUBST:    E = ```11t
SUBVAULT: H : serial_park_minivault
: init_park(_G, "bush", "`E1t", "DFTVC")
MAP
   ....
  .DDDD.
 .D111D.
.D11ccc.........
.D1cc.ccDDDDDDDD.
.D1c.F.cEEEEEEED.
.D1cc.ccEHHHHHED.
.DEEc+cEEHHHHHED.
.DEtD.DtEHHHHHED.
.DEED.DEEHHHHHED.
.DEtD.DtEHHHHHED.
.DDDD.DEEEEEEEED.
 .....DDDDDDDDDD.
      ..........
ENDMAP

NAME:     serial_park_square1
TAGS:     allow_dup
ORIENT:   float
SUBST:    E = ```11t
SUBVAULT: H : serial_park_minivault
: init_park(_G, "bush", "`E1t", "D")
MAP
.............
.DDDDDDDDDDD.
.DEEEEEEEEED.
.DEttEEEttED.
.DEtHHHHHtED.
.DEEHHHHHEED.
.DEEHHHHHEED.
.DEEHHHHHEED.
.DEtHHHHHtED.
.DEttEEEttED.
.DEEEEEEEEED.
.DDDDDDDDDDD.
.............
ENDMAP

NAME:   serial_park_square2
TAGS:   allow_dup
ORIENT: float
SUBST:  E = ```11t
# Small chance of random altar.
SUBST:  F : GGGGTTTTVC<>
: init_park(_G, "bush", "`E1t", "DFGTVC<>")
MAP
 .............
..DDDDD.DDDDD..
.DD111D.D111DD.
.D1EE1D.D1EE1D.
.D1EE1D.D1EE1D.
.D1111D.D1111D.
.DDDDD...DDDDD.
.......F.......
.DDDDD...DDDDD.
.D1111D.D1111D.
.D1EE1D.D1EE1D.
.D1EE1D.D1EE1D.
.DD111D.D111DD.
..DDDDD.DDDDD..
 .............
ENDMAP

NAME:     serial_park_square3
TAGS:     allow_dup
SUBST:    E  = ```11t
SUBVAULT: H : serial_park_minivault
: init_park(_G, "plant", "`E1t", "D")
MAP
  ... ...
 .DDD.DDD.
.DEEDDDEED.
.DEHHHHHED.
.DDHHHHHDD.
 .DHHHHHD.
.DDHHHHHDD.
.DEHHHHHED.
.DEEDDDEED.
 .DDD.DDD.
  ... ...
ENDMAP

NAME:     serial_park_paths
ORIENT:   float
SUBST:    E  = ```11t
SUBST:    t  : tt1
SUBST:    F  = GT
SUBVAULT: H : serial_park_minivault
: init_park(_G, "bush", "`E1t", "DFGT")
MAP
            @
 ............
 .DDDDDDDDDD.........
 .DttEEEEttD.DDDDDDD.
 .DttEEEEttD.DHHHHHD.
 .DEEEttEEED.DHHHHHD.
 .DEEEttEEED.DHHHHHD.
 .DDDDDDDDDD.DHHHHHD.
@............DHHHHHD.
 .DDDDD.DDDDDDEEEEED.
 .DEEED.DEEEEEEEEEED.
 .DEEED.DEEEEEEEEEED.
 .DEED...DDDDDDDDDDD.
 .DEED.F.............@
 .DEED...DDDDDDD.DDD.
 .DEEED.DEEEEEtD.DtD.
 .DEEED.DEEEEEtD.DtD.
 .DDDDDDDDDDDDtD.DtD.
 .DWWWWWWWWWWDtD.DtD.
 .DWFWWWWWWFWDtD.DtD.
 .DWWWWWWWWWWDtD.DtD.
 .DDDDDDDDDDDDDD.DtD.
 ................DDD.
               ......
                @
ENDMAP


NAME:   serial_park_avenue1
TAGS:   allow_dup
ORIENT: float
SUBST:  F  : tt~
SUBST:  t : tt1
: init_park(_G, "bush", "`E1t", "~DF")
MAP
   ..................................
   .DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD.
....DtEFEtEtEtEFEtEtEtEtEFEtEtEtEFEtD..
@...DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD.@
@.....................................@
@.DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD...@
..DtEFEtEtEtEFEtEtEtEtEFEtEtEtEFEtD....
 .DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD.
 ...................................
ENDMAP

NAME:    serial_park_fountain
ORIENT:  float
KPROP:   T = no_tele_into
KMASK:   T = opaque
: init_park(_G, "bush", "Et", "DFGT")
MAP
               ......
               .DDDDD.
@...............DtEtD.
@.DDDDDDDDDDDDDDDEEED.
@.DtEtEtEtEtEtEtEtEtD.
@.DDDDDDDDDDDDDDDEDDD.
@...............DtD...
 ..DDDDDDDDDDD..DED.
 .DGWWWWWWWWWGD.DtD.
 .DWWWWWWWWWWWD.DED.
 .DWWWWwwwWWWWD.DtD.
 .DWWWwwwwwWWWD.DED.
 .DWWwwGwGwwWWD.DtD.
 .DWWwwwTwwwWWD.DED.
 .DWWwwGwGwwWWD.DtD.
 .DWWWwwwwwWWWD.DED.
 .DWWWWwwwWWWWD.DtD.
 .DWWWWWWWWWWWD.DED.
 .DGWWWWWWWWWGD.DtD.
 ..DDDDDDDDDDD..DDD.
  ..................
             @@@@@
ENDMAP

NAME:   serial_park_tiny_pond
TAGS:   allow_dup
FTILE:  DG = floor_vault
FTILE:  Et = floor_grass
SUBST:  G = GGTV
: init_park(_G, "bush", "Et", "DGTV")
MAP
  ......
 .DDDDDD.
.DDWWWWD.
.DGWWWWD.
.DDWWWWD.
 .DDDDDD.
  ......
ENDMAP

NAME:    serial_park_tiny_1
TAGS:    allow_dup
SUBST:   E = `t1
: init_park(_G, "bush", "`E1t", "D")
MAP
  ..
 .DD.
.DEED.
.DEED.
 .DD.
  ..
ENDMAP

NAME:    serial_park_tiny_2
TAGS:    allow_dup
SUBST:   E = `t1
: init_park(_G, "bush", "`E1t", "D")
MAP
  ..
 .DD.
.DEED.
.DEED.
 .DEED.
 .DEED.
  .DD.
   ..
ENDMAP

NAME:     serial_park_minivault_5x5_1
TAGS:     serial_park_minivault allow_dup unrand
SUBST:    G = TTTGGt
: init_park(_G, "bush", "`Et", "DGT")
MAP
tEEEt
EEDEE
EDGDE
EEDEE
tEEEt
ENDMAP

NAME:     serial_park_minivault_5x5_2
TAGS:     serial_park_minivault allow_dup unrand
SUBST:    F  = TTTTWWWGVw
: init_park(_G, "bush", "`Et", "DFGTV")
MAP
tDWDt
DWWWD
WWFWW
DWWWD
tDWDt
ENDMAP

NAME:     serial_park_minivault_5x5_3
TAGS:     serial_park_minivault allow_dup unrand
: init_park(_G, "bush", "t", "D")
MAP
tc+ct
cc0cc
+0%0+
cc0cc
tc+ct
ENDMAP

NAME:     serial_park_minivault_5x5_4
TAGS:     serial_park_minivault allow_dup unrand
SUBST:    C : Ct
SUBST:    T : TTTTVVDG
: init_park(_G, "bush", "Et", "CDTVDG")
MAP
tEEEt
ETDTE
EDCDE
ETDTE
tEEEt
ENDMAP

NAME:     serial_park_minivault_5x5_5
TAGS:     serial_park_minivault allow_dup unrand
SUBST:    1 = 11`
: init_park(_G, "plant", "`E1t", "D")
MAP
tEEEt
E111E
E111E
E111E
tEEEt
ENDMAP

NAME:     serial_park_minivault_5x5_6
TAGS:     serial_park_minivault allow_dup unrand
SUBST:    D = ``1
FTILE:    1. = floor_swamp
SUBST:    1 = 111.
: init_park(_G, "fungus", "`t", "D")
MAP
tDDDt
DD1DD
D111D
DD1DD
tDDDt
ENDMAP

NAME:     serial_park_minivault_5x5_7
TAGS:     serial_park_minivault allow_dup unrand
SUBST:    1 = 111`
: init_park(_G, "bush", "`E1", "T")
MAP
E111E
1EEE1
1ETE1
1EEE1
E111E
ENDMAP

NAME:     serial_park_minivault_5x5_8
TAGS:     serial_park_minivault allow_dup unrand
SUBST:    1 : 11t
: init_park(_G, "bush", "`E1", "D")
MAP
11E11
11E11
EEEEE
11E11
11E11
ENDMAP
