##############################################################################
#
# The Sewer (Eino)
#
#
# The Sewer aspires to be an exciting place to go with a low level character.
#
# Flavour: drainage and sewer themed, so rats, kobolds, etc. Water is (dark
# and light) green.
# Gameplay: an early challenge, featuring monsters which are bland later but
# interesting when encountered at low level (green rat, giant frog etc.) Loot
# consists of renewable items; the harder maps contain a few good items.
#
##############################################################################

{{
function sewer_portal(e)
  local desc_long =
"Every settlement brings forth the unpleasant sewers and drains, ignored by "..
"most but hideaways for others. Old tales speak of dangerous creatures, "..
"bathing in disgustingly green water, preying on each other without mercy.  "..
"The tales also tell of the valuable items left by daring and unfortunate "..
"visitors, left to collect dust in the damp caverns. You have an uncanny "..
"feeling that the drain will fall apart rather soon."

  local timeout_turns = crawl.random_range(2700, 3300)

  local messager =
    timed_msg {
      visible = true,
      -- $F{xxx} will be substituted with the 'entity' property of the timed
      -- marker, or with the desc property (if entity is not set).
      messages = time_messages(timeout_turns/10,
                               "$F{The} is slowly rusting away.",
                               "$F{The} is rusting away.",
                               "$F{The} is quickly rusting away.",
                               "$F{The} is falling apart.")
    }

  e.lua_marker('O',
      timed_marker {
        disappear = "The drain falls to bits.",
        desc = "glowing drain",
        desc_long = desc_long,
        entity = 'drain',
        dst = "sewer",
        dstorigin = "in the sewers",
        overview = "glowing drain",
        turns = timeout_turns,
        floor = "floor",
        msg = messager })
  e.kfeat("O = enter_portal_vault")
  e.colour("O = lightgreen")
  e.tile("O = dngn_portal_sewer")
end

-- Use the following line in destination maps after all SUBSTs
-- : sewer_setup(_G)
-- Note that the function also defines < to be the exit portal.
function sewer_setup(e)
  e.kfeat("< = exit_portal_vault")
  e.colour("< = darkgrey")
  e.lrockcol("darkgrey")
  e.lfloorcol("lightgrey")
  e.colour("w = green")
  e.colour("W = lightgreen")
  e.lrocktile("wall_slime")
  e.lfloortile("floor_slime")
-- Random monster list and milestone.
  e.set_random_mon_list("bat w:20 / giant newt w:20 / small snake / \
                         ooze / worm / snake / giant cockroach / giant mite / \
                         giant gecko")
end

function sewer_milestone(e)
  crawl.mark_milestone("br.enter", "entered a Sewer.", true)
end
}}

# Basic sewer entries ##########################################
default-depth: D:3-6

NAME:   portal_sewer_entry_a
TAGS:   uniq_sewer no_monster_gen mini_float chance_sewer
CHANCE: 8%
: sewer_portal(_G)
COLOUR: W = green / cyan w:5
SUBST:  1 = 11234444444444
MONS:   rat / grey rat / green rat w:5
MONS:   small snake / snake w:2
MONS:   giant cockroach / giant mite / worm w:3
MONS:   nothing
MAP
.........
...111...
..1WWW1..
.1WWWWW1.
.1WWOWW1.
.1WWWWW1.
..1WWW1..
...111...
.........
ENDMAP

NAME:   portal_sewer_entry_b
TAGS:   uniq_sewer no_monster_gen chance_sewer
CHANCE: 8%
ORIENT: float
: sewer_portal(_G)
SUBST:  '=W. , W=WW1
KMONS:  1 = rat w:20 / grey rat w:20 / green rat/ small snake / snake w:2 / \
            giant cockroach / giant mite / worm w:3
KFEAT:  1 = W
COLOUR: W = green
MAP
xxxxxx
xOWWW'
xWWWW.
xWWW'.
xWWW..
xW'...
ENDMAP

NAME:   portal_sewer_entry_c
TAGS:   uniq_sewer no_monster_gen chance_sewer
CHANCE: 8%
WEIGHT: 4
: sewer_portal(_G)
NSUBST: c = 2:= / 2:n / *:c
NSUBST: W = 8:1 / *:W
SUBST:  1 = 111W
KMONS:  1 = rat w:20 / grey rat w:20 / green rat/ small snake / snake w:2 / \
             giant cockroach / giant mite / worm w:3
KFEAT:  1 = W
COLOUR: W = green / cyan w:5
MAP
.........
.ccccccc.
.cWWWWWc.
.cWWOWWc.
.cWWWWWc.
.cWWWWWc.
.ccccccc.
.........
ENDMAP

NAME:   portal_sewer_entry_d
TAGS:   uniq_sewer no_monster_gen chance_sewer
CHANCE: 8%
: sewer_portal(_G)
KMONS:  1 = big fish
KFEAT:  1 = W
COLOUR: W = green / cyan w:5
MAP
xxxxxxxxxx
xWOW1WWWWW@
xxxxxxxxxx
ENDMAP

NAME:   portal_sewer_entry_e
TAGS:   uniq_sewer no_monster_gen chance_sewer
CHANCE: 8%
: sewer_portal(_G)
ORIENT: northwest
NSUBST: X = 2:X / / *:x
SUBST:  X = ++=
SUBST:  w = WW.
NSUBST: W = 8:1 / *:W
SUBST:  1 = 111W
KMONS:  1 = rat w:20 / grey rat w:20 / green rat/ small snake / snake w:2 / \
            giant cockroach / giant mite / worm w:3
KFEAT:  1 = W
COLOUR: W = green / cyan w:5
MAP
xxxxxxxxx
xWWWXWww.
xWOWXWww.
xWWWXWww.
xXXXXWw..
xWWWWWw..
xwwwww...
xwww.....
x........
ENDMAP

NAME:   portal_sewer_entry_f
TAGS:   uniq_sewer no_monster_gen chance_sewer
CHANCE: 8%
: sewer_portal(_G)
NSUBST: W = 6:1 / *:W
KMONS:  1 = nothing w:5 / giant gecko / giant mite / giant cockroach
KFEAT:  1 = W
COLOUR: W = green / cyan w:5
MAP
xxxxxxxxxxx
.WWWWWWWWW.
@WWWWOWWWW@
.WWWWWWWWW.
xxxxxxxxxxx
ENDMAP

# The actual portal vaults #####################################
default-depth:

### KOBOLDS ################################################################

# Sewers with kobold settlements. Combined weight 50.

############################################################################
# Sewer with a small kobold camp, potion treasure and Ely/Zin altar.
# Easier than sewer_minmay_treatment, so more probably.
#
NAME:     sewer_kobolds
TAGS:     sewer no_item_gen no_monster_gen no_pool_fixup
WEIGHT:   35
ORIENT:   encompass
: if crawl.one_chance_in(12) then
SUBST:    C=c, X=w, V=W, v=w, *=f
: else
SUBST:    X=c, C=x, V=x, v=x, *=x
: end
SUBST:    ' = .W
SUBST:    ? = .x
: sewer_setup(_G)
# some fresh water for the kobolds
KFEAT:    Y = deep_water
KFEAT:    y = shallow_water
KFEAT:    E = altar_zin / altar_elyvilon w:30
KMONS:    q = big fish
KFEAT:    q = w
COLOUR:   q = green
MONS:     jackal / w:3 nothing, kobold / w:5 nothing, big kobold
SHUFFLE:  deef
ITEM:     potion of heal wounds / potion of healing
ITEM:     potion of healing / potion of healing q:2 w:5 / \
          potion of heal wounds / potion of heal wounds q:2 w:5
KITEM:    f = potion of levitation q:2, potion of restore abilities w:7 / \
          potion of gain intelligence / potion of gain strength / \
          potion of gain dexterity
KFEAT:    f = shallow_water
MONS:     rat / grey rat / green rat w:2 / nothing w:3
epilogue{{
sewer_milestone(_G)
}}
MAP
        cccCCCCCCCCCCCC
        cwXvvvvvvvvvvvCCC         CCC
        cwccCCCCCCCCCvvVCCCC      C*CCC
        cwwc        CCCvvvvCCCC  CCvvvC
        ccwc          CCCCvvvvCCCCvvvvC
         cwcc            CCCCvvvvvvvvvC
        ccwwc               CCCCCCCCCCC
        cwwwc
        cwwwc
        cwwwc
        cWwwc
       ccWwWcc
       c.WwW.c
     ccc.WwW.c
     c<..WwW.c
     ccc.Www'c
       c.WwW.c
      cc'WwW'cc
      c.'WwW''ccccccccccccccccccccccccccccccccc
      c''WwWWWWWWWWWWWWWWWWWWWWWW..444.A.<..44c
      c''WwW''ccccccccccccccccccccccccccccccccc
      c.'WwW''c
      c.WWwWW'c
      c'WwwwW'c
      c'WwqwW'c
      c'WwwwW'c
      c.'WWW''c
      c..''''.c
xxxxxxcccc1ccccx
xefExxxx.122...xx
xdexxxx.2232.y..x
xx?.?xxx....yYy.x
 xx?.xxx?....y.xx
  x?x..?.?....xx
  xx???.xxxxxxx
   xxxxxx
ENDMAP

############################################################################
# Water treatment center, staffed by kobolds
#
NAME:   sewer_minmay_treatment
TAGS:   sewer no_item_gen no_monster_gen no_pool_fixup
WEIGHT: 15
ORIENT: encompass
MONS:   grey rat / rat w:2 / green rat w:1
MONS:   kobold / big kobold w:1
MONS:   small snake / snake w:5 / giant newt w:2 / ooze w:1
SUBST:   y : yyyyyyW., Y : YYYYYYWw
SUBST:   y = W., Y = Ww
ITEM:   potion of healing / potion of heal wounds / potion of might w:4 /\
        potion of brilliance w:4 / potion of agility w:4 /\
        potion of levitation w:4 / any scroll w:7 / any armour w:2 / any weapon w:2
: sewer_setup(_G)
: dgn.set_feature_desc_short("translucent stone wall",
: "large window")
: dgn.set_feature_desc_long("translucent stone wall",
: "A window embedded in the side of an enormous metal pipe, allowing "..
: "observation of the water flowing inside.")
KFEAT:  C = deep_water
epilogue{{
sewer_milestone(_G)
}}
MAP
vvvvxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxvvvv
vwwvxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxvCCv
vwwvxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxvCCv
vwwvxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxvCCv
vwwvxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxvCCv
vwwvxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxvCCv
vwwvxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxvCCv
vwwvxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxvCCv
vwwvvvvvvvxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxvvvvvvvCCv
vwwnddv..vxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx..v..vddnCCv
vwwnd2.2.v..3.xxxxxxx11111xxxxxxx11xxxxxx...3...v.2.2dnCCv
vwwvv.2..+......xxxx..11....xxxx11111xxx........+..2.vvCCv
vwwnd2.2.v......3.....xxx.........11...........3v.2.2dnCCv
vwwnddv..vyyy..........xxx...3...xx......3....yyv..vddnCCv
vwwvvvvvvvYYyy..xx.....xx.......3xxxx......xxyyYvvvvvvvCCv
vwwwwwwwwwwYYyyxxxx.....3.........xx....yyxxYYYYwcwcCcCCCv
vwwwwwwwwwwwYYYYYYxxyyyyyy.........yyyyyyYYYYwwwcwcwcCCCCv
vwwwwwwwwwwwwwwwwYYYYYYYYyyyyyyyyyyyYYYYYYwwwwwwwcwcCcCCCv
vwwwwwwwwwwwwwwwwwwwwwwwYYYYYYWYYYYYYwwwwwwwwwwwcwcwcCCCCv
vwwwwwwwwwwwwwwwwwwwwwwwwwYYYWYYYYYwwwwwwwwwwwwwwcwcCcCCCv
vwwwwwwwwwwwwwwwwwwwwwwwwYYyyyyyyyYYYYwwwwwwwwwwcwcwcCCCCv
vwwvvvvvvvwwwwwYYYYYYYYYYYyy.....yyyyYYYYwwwwwwwvvvvvvvCCv
vwwnd.v..vYYYYYYyyyyyyyyyyy........yyyyyYYYYYYYYv..v.dnCCv
vwwn.....vyyyyyyy......................yyyyyyyyyv.....nCCv
vwwvv222.+......................................+.222vvCCv
vwwn.....v...........xx.........................v.....nCCv
vwwnd.v..vx....1...xxxxx.......xx...............v..v.dnCCv
vwwvvvvvvvxxxx111xxxxxx...xx..xxxxx...1..xxx..xxvvvvvvvCCv
vwwvxxxxxxxxxxxxxxxxx<..xxxxx..xxxxxx111xxxxxxxxxxxxxxvCCv
vwwvxxxxxxxxxxxxxxxxxxxxxxxxxx..AxxxxxxxxxxxxxxxxxxxxxvCCv
vwwvxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxvCCv
vwwvxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxvCCv
vwwvxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxvCCv
vwwvxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxvCCv
vwwvxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxvCCv
vvvvxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxvvvv
ENDMAP

### FROGS ##################################################################

# Combined weight 30.

############################################################################
# Two fairly watery vaults with (usually) two giant frogs in the end.
# Loot are good items, and often a scroll of blinking.
#
NAME:     sewer_frog_island_01
TAGS:     sewer no_item_gen no_monster_gen no_pool_fixup
ORIENT:   encompass
WEIGHT:   10
SUBST:    - = WWW.
SHUFFLE:  |d
ITEM:     scroll of teleportation w:2 / scroll of blinking / \
          scroll of random uselessness w:1
MONS:     giant newt / small snake w:5 / giant cockroach / giant mite w:5 / \
          generate_awake giant newt / generate_awake small snake w:5 / \
          generate_awake giant cockroach / generate_awake giant mite w:5 / \
          giant gecko / snake w:8 / nothing w:8
NSUBST:   ! = 2:! / *:w
KFEAT:    ! = w
COLOUR:   ! = green
KMONS:    ! = giant frog / nothing w:2
: sewer_setup(_G)
epilogue{{
sewer_milestone(_G)
}}

MAP
ccccccccccccccccccccccccccccccccccc
c.11---------.................1111c
c1WWW-ccccccccccccccccccccccc1WWW1c
c1WwWWccccccccccccccccccccccc1WwW.c
c1WwwWccccccccccccccccccccccc.WwW.c
c.WwW1ccccccccccccccccccccccc.WwW-c
c.WwwWccccccc!!!!!!cccccccccc-WwW-c
c.Wwwwccccwwwwwwwww!!!ccccccc-WwW-c
c-WwwwccwwwWwwwwwwwwww!cccccc-WwW-c
c-WwwwcwwWW<-wwwwwwwwww!ccccc-WwW-c
c-Wwwwwwww-..-ww.--wwwww!cccc-WwW-c
c-WwWwwWww---.-.*.--wwwwwcccc-WwW-c
c-WwWWWwWww-.--***.wwwwwwcccc-WwW.c
c-WwWWwwwWww.---d-wwwwwwwcccc-WwW.c
c-WwWWWwwwW------wwwwwwwwcccc.WwW.c
c-WwWWWwwwwW---wwwwwwWwwccccc.WwW.c
c-WwW.WwwwwwwwwwwwwwWwwwccccc-WwW.c
c.WwW.WwwwwwWWwwwwwwwWccccccc-WwW-c
c.WwWW..WWWWwwWwWW.........---Www-c
c.WwwWWWWwwwWWwWWWWWWWWWWWWWWWWwW-c
c.WWwwwwwwwwwwwwwwwwwwwwwwwwwwwwW.c
c..WWWWWWWWWWWWWWWWWWWWWWWWWWWWwW-c
cc........................----WwW-c
 cccccccccccccccccccccccccccc-WwW-c
                     cccccccc-WwW-c
              cccccccc.----WWWWwW.ccccxxx
              c.<.A..--W-WWWWWWwwwwwwwwwx
              cccccccc.-..WW-.WWW1cccccxx
                     cccccccc11111c
                            ccccccc
ENDMAP

NAME:     sewer_frog_island_02
TAGS:     sewer no_item_gen no_monster_gen no_pool_fixup
ORIENT:   encompass
WEIGHT:   10
NSUBST:   ! = 2:! / *:w
SUBST:    - = WWWW.
KMONS:    W = giant newt / small snake / giant cockroach / giant mite / \
              giant gecko / snake w:4 / jelly w:2 / \
              nothing w:270
KFEAT:    W = W
KFEAT:    ! = w
COLOUR:   ! = green
KMONS:    ! = giant frog / nothing w:2
SHUFFLE:  edfgh$*
ITEM:     nothing, nothing
ITEM:     scroll of teleportation w:2 / scroll of blinking / \
          scroll of random uselessness w:1
ITEM:     nothing, nothing
KITEM:    de = *
: sewer_setup(_G)
epilogue{{
sewer_milestone(_G)
}}
MAP
           ccccccccccccc
        cccc-----------cccc
     cccc-----------------cccc
    cc-------ccccccccc-------cc
   cc-----cccc-------cccc-----cc
  cc----ccc-------------ccc----cc
  c----cc-----ccccccc-----cc----c
 cc---cc----ccc!!!!!ccc----cc---cc
 c----c----cc!w---ww!!cc----c----c
cc---cc---ccw--..---ww!cc---cc---c
c.---c----cw--.gh*.---w!c----c---c
c<.--c----c--.edf.-----!c----c---c
c.---c----c----$------w!c----c---c
cc---cc---c---.------w!cc---cc---c
 c----c---c--.------w!cc----c----c
 cc---cc--cc--c---wwccc----cc---cc
  c----cc--c--ccccccc-----cc----c
  cc----c--cc-..--------ccc----cc
   cc-------c..------cccc-----cc
    cccc---ccccccc-<-c-------cc
       cc--c-----ccccc----ccccc
        cccc-----------cccc--<c
           c---ccccccccc-...-cc
           c-----------..A.ccc
           c----------.ccccc
           ccccccccccccc
ENDMAP

############################################################################
# Sewer in the shape of the letter W. Sort of. Frogs at the end.
#
# Harder than the two other frog maps. Frogs are guaranteed, exit isn't
# reachable when frogs come to sight, and loot isn't handed out as a way
# to handle them.
NAME:    sewer_minmay_w
TAGS:    sewer no_item_gen no_monster_gen no_pool_fixup
WEIGHT:  10
ORIENT:  encompass
SHUFFLE: de
MONS:    grey rat / rat w:5 / green rat w:1
MONS:    small snake / snake w:5 / giant newt w:2 / ooze w:1
MONS:    giant frog
ITEM:    potion of healing / potion of heal wounds / potion of might /\
         potion of magic / potion of speed w:5 / potion of brilliance w:5
ITEM:    scroll of teleportation / scroll of blinking w:5 /\
         scroll of fear w:5 / scroll of magic mapping /\
         scroll of recharging / scroll of fog
SUBST:   y : yyyyyyW., Y : YYYYYYWw
SUBST:   y = W., Y = Ww
SUBST:   c = c x:1
: sewer_setup(_G)
epilogue{{
sewer_milestone(_G)
}}
MAP
xxxxxxxxxxxxxxxxxxxxxxccccccxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxcccc2..2ccccxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxccc..........cccxxxxxxxxxxxxxxxxx
xccccccxxxxxxxxxcc..............ccxxxxcccccccccccx
cc....ccxxxxxxxcc................ccxxxcdedcc3..3cc
c......cxxxxxxxc.1.1.1.2cc2.......cxxxce<e+2..2.2c
c..<A..cxxxxxxcc1.1.1.cccc+c......ccxxcdedc.2..2.c
c......cxxxxxxc1.1.1.ccxcddcc......cxxccccc2.2..2c
cyyyyyycxxxxxxcyyyyyycxxcddccyyyyyycxxxxxxcyyyyyyc
cYYWYYYcxxxxxxcYYWYYYcxxcccccYYYYWYcxxxxxxcYYWYYYc
cwYWYYwcxxxxxxcwYWYwwcxxxxxxcwwwYWYcxxxxxxcYYWYwYc
cwYYWYwcxxxxxxcwYWYYwcxxxxxxcwwYYWYcxxxxxxcwYWYYwc
cwwYWYwcxxxxxxcwwYWYwcxxxxxxcwYYWYYcxxxxxxcwYWWYwc
cwwYWYwcxxxxxxcwwYWYYcxxxxxxcYWWYYwcxxxxxxcwYYWYYc
cwYYWYwcxxxxxxcwwYYWYcxxxxxxcWYYYwwcxxxxxxcwwYWWYc
cwYWYYwcxxxxxxcwwwYWYcxxxxxxcWWYYYwcxxxxxxcwwYYWYc
cwYWYwwcxxxxxxcwwwYYWcxxxxxxcYWyWYYcxxxxxxcwwwYWYc
cwYWYwwcxxxxxxcwwwwYWcxxxxxxcWyyyyWcxxxxxxcwwYYWYc
cwYWYYwcxxxxxxcwwwwYWcxxxxxxcyy%%yycxxxxxxcwwYWWYc
cwYYWYwcxxxxxxcwwwYYWcxxxxxxcWyyyyWcxxxxxxcwwYWYYc
cwwYWYwcxxxxxxcwwwYWYcxxxxxxcYWWYWYcxxxxxxcwYYWYwc
cwwYWYwcxxxxxxcwwYYWYcxxxxxxcYYYWYYcxxxxxxcwYWWYwc
cwwYWYwcxxxxxxcwwYWYYcxxxxxxcwYWYYwcxxxxxxcwYWYYwc
cwwYWYwcxxxxxxcwYYWYwcxxxxxxcwYWYYwcxxxxxxcYYWYwYc
cYYYWYYcxxxxxxcwYWYwwcxxxxxxcYYYWYYcxxcccccYYWYYYc
cyyyyyycxxxxxxcyyyyyycxxxxxxcyyyyyycxxceeccyyyyyyc
c1.1.1.ccxxxxcc......cxxxxxxc1.1.1.ccxceecc......c
cc1.1.1.cccccc......ccxxxxxxcc1.1.1.cccc+c......cc
xc........cc........cxxxxxxxxc.1.1.1.2cc2.......cx
xcc................ccxxxxxxxxcc.1.1.1..........ccx
xxcc..............ccxxxxxxxxxxcc...2.2..2.2...ccxx
xxxccc..........cccxxxxxxxxxxxxccc..........cccxxx
xxxxxcccc2..2ccccxxxxxxxxxxxxxxxxcccc2..2ccccxxxxx
xxxxxxxxccccccxxxxxxxxxxxxxxxxxxxxxxccccccxxxxxxxx
ENDMAP

## BIG BADDIE (Purgy) ######################################################

# Threat is mostly a single larger creature, often Purgy. Combined weight 30.

NAME:     sewer_big_baddie
TAGS:     sewer no_item_gen no_monster_gen
ORIENT:   encompass
WEIGHT:   10
: sewer_setup(_G)
SUBST:    2 = 23
KMONS:    2 = crocodile
KMONS:    3 = Purgy, crocodile
ITEM:     potion of berserk rage / potion of speed w:5
MONS:     bat
epilogue{{
sewer_milestone(_G)
}}
MAP
 ccccccc
cc$***$cc
c..$*$..c
c.......c
c...2...c
c.......c
c.......c
cc.....cc
 ccc.ccc     ccccccc
   c.c      cc1.1..cc
   c.c     cc1..w...cc
   c.ccccccc...www...cc
   c..........wwwww.A.c
   c.ccccccc1..www...cc
   c.c     cc...w...cc
   c.c      cc1....cc
   c.c       ccccccc
   c.c
   c.c
   c.c
   c<c
   c.c
   cdc
   ccc
ENDMAP

###############################################################################
# Another one with a big bad monster. Likely to be a giant slug, which hits
# slightly harder than the crocodile, but is much slower.
#
NAME:   sewer_the_slug
TAGS:   sewer no_item_gen no_monster_gen no_pool_fixup
ORIENT: encompass
WEIGHT: 10
SUBST:  - = WW...
MONS:   kobold, jackal
SUBST:  3 = 334
KMONS:  3 = giant slug
KMONS:  4 = Purgy, giant slug
ITEM:   potion of levitation / potion of agility / potion of heal wounds / \
        potion of invisibility / potion of mutation / potion of degeneration /\
        scroll of blinking / scroll of teleportation / scroll of fear / \
        scroll of random uselessness / meat ration / royal jelly / \
        potion of blood / nothing w:140
: sewer_setup(_G)
epilogue{{
sewer_milestone(_G)
}}
MAP
   ccccccccc
   c%*c3c*%c
   c*-c-c-*c
   ccc---ccc
    cc---cc
    c-----c
   cc.---.cc
   c..-c-..c
  cc.-ccc-.cc
  c.--ccc--.c
  c--ccccc--c
  c.-ccccc-.c
  c.-ccccc-.c
  c--ccccc--c
  c.--ccc--.c
  cc--ccc--cc
   c.--c--.c
   cc-----cc
    c..-..c
    cc---cc
     c.-.c
     cc-cc
     cc-cc
   cccc-cccc
cccc..---..ccccc
cWWWWWWWWWWWWWWc
cccc.......ccccc
  ccc..c..cccxxxx
  c....c.21.cdddx
  c.A<.c2....dddx
  c....c1.1.cxxxx
  ccccccccccc
ENDMAP

############################################################################
# Purgy island. by co
# Purgy lives on this island, he appears in one of three places, if he is
# outside the loot room, you can get the loot without fighting him
# (if you are sneaky enough). Not much to walk on here, if you manage to
# confuse Purge he will probably drown. Some stone walls from the secret room
# can be seen from the island.
#
NAME:    sewer_co_purgy_island
TAGS:    sewer no_item_gen no_monster_gen no_pool_fixup
ORIENT:  encompass
WEIGHT:  10
#      Placing Purgy, he appears in one of three places. The crocodile serves
#      as the back-up, in case Purgy was already placed in the Dungeon.
SHUFFLE: PQR
KMONS:   P = Purgy, crocodile
SUBST:   Q = .
SUBST:   R = .
#      lesser monsters.
KFEAT:   1 = w
COLOUR:  1 = green
KMONS:   1 = giant newt / small snake w:5 / \
         generate_awake giant newt / generate_awake small snake w:5 / \
         snake w:4 / big fish w:3 / nothing w:6
#      loot
SUBST:   e = !!!!????%
KITEM:   ? = potion of levitation q:2 w:15 / potion of healing /\
         potion of heal wounds / potion of might / potion of magic /\
         potion of speed w:5 / potion of brilliance w:5
KITEM:   ! =  scroll of teleportation / scroll of fear w:5 /\
         scroll of blinking w:3 / scroll of magic mapping w:3 /\
         scroll of recharging w:2 / scroll of fog w:3
#      Randomized enviroment
SUBST:   . = .WW
SUBST:   X = xx.
SUBST:   Y = xw
: sewer_setup(_G)
epilogue{{
sewer_milestone(_G)
}}
MAP
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxcccxxxx
xxxxxxxxxxxxxxYYxxxYYYxxxxYYYxxxxxxcc.ccxxx
xxxxxxxxxxxxxYwwYYwwwwwYYwwwwccccccc.e.ccxx
xxxxxxxxxxYwwwwwwwwwwwwwwwwwwwwwww..*<*.cxx
xxxxxxxxxxYwwwwwwwwwwwwwwwwwwccccccc.e.ccxx
xxxxxxxxYYwwwwwwwwwwwwwwwwwwwwYxxxxcc.ccxxx
xxxxxxxYwwwwwwwwwwwwwwwwwww1wwwYxxxxcccxxxx
xxxxxxYwwwwwwwwwwwwwwwwwwwwwwwwwwxxxxxxxxxx
xxxxxxwwwww1wwwww....wwwwwwwwwww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wwwwwwwwwwwwwwwwwwwYYxxxxxxxxxx
xxxxxxxYwwwwwwwwwwwwwwwwwwwwwwYxxxxxxxxxxxx
xxxxxxxYwwwwwwwwwwwwwwwwwwwwwYxxxxxxxxxxxxx
xxxxxxxxYxYwwwwwwYYwwwwwwwYYwYxxxxxxxxxxxxx
xxxxxxxxxxxxYYYYxxxYYYxYYYxxYYxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
ENDMAP

### OTHER #####################################################################

# Other sorts of Sewer maps, each weighted 10. (Total 60).

###############################################################################
# If you can get to the middle, there are four doors to try; two will give you
# monsters, two will yield you treasure.
#
NAME:     sewer_fruit_machine
TAGS:     sewer no_item_gen no_monster_gen no_pool_fixup
ORIENT:   encompass
SHUFFLE:  QEDS
SUBST:    Q = 4, E = 5, D : fgh, S = $
NSUBST:   f = 1:f / *:'
NSUBST:   g = 2:g / *:'
NSUBST:   h = 3:h / *:'
#       some random monsters I: flying or big fish
NSUBST:   w = 4:" / *:w
KFEAT:    " = w
KMONS:    " = big fish w:2 / bat / nothing
COLOUR:   " = green
#       some random monsters II: standard Sewers set
NSUBST:   W = 4:? / *:W
KFEAT:    ? = W
KMONS:    ? = bat / giant newt / small snake / giant cockroach / \
              giant mite / giant gecko / ooze w:4 / worm w:4 / snake w:2
COLOUR:   ? = lightgreen
#       a little more random shallow water
SUBST:    - = W..
: sewer_setup(_G)
MONS:     bat / giant newt / small snake / giant cockroach / \
          giant mite / giant gecko / ooze w:4 / worm w:4 / snake w:2
SHUFFLE:  23
MONS:     bat / nothing w:2
MONS:     patrolling jackal
MONS:     worm / nothing w:3
MONS:     ooze / nothing w:2
#       chances are good you'll find something to cross the deep water
SHUFFLE:  de
ITEM:     scroll of fear / scroll of fog / scroll of teleportation w:50 / \
          scroll of blinking / scroll of identify / nothing
ITEM:     potion of levitation w:50 / potion of invisibility / \
          potion of might w:3 / potion of agility w:4 / \
          potion of brilliance w:3 / nothing
#       possibly rather generous loot, if you get to the center
ITEM:     scroll of vulnerability / scroll of identify / wizard hat / \
          potion of magic / potion of brilliance / potion of resistance
ITEM:     scroll of identify / scroll of recharging / potion of invisibility / \
          pair of gloves w:5 / pair of boots w:5 / potion of agility / nothing
ITEM:     scroll of identify / scroll of recharging / \
          potion of resistance / potion of might / potion of berserk rage / \
          buckler / nothing
KITEM:    ' = scroll of random uselessness w:30 / \
              scroll of identify / scroll of teleportation / \
              potion of confusion w:50 / potion of paralysis w:50 / \
              potion of mutation / potion of levitation / \
              wizard hat / buckler / pair of gloves w:5 / pair of boots w:5
epilogue{{
sewer_milestone(_G)
}}
MAP
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xwwwwwwwwwwwWWW-WW-W--WWWWW-WWW--W--WW-WW-WW-W-WWwwwwwwwwwwwx
xwwwwwwwwwww-wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww-wwwwwwwwwwwx
xwwwwwwwwwwwWwWW----WWWWWWWW-W-WWW-W-WW-WW-W-WWwWwwwwwwwwwwwx
xxxxxxxxxxxxWwWxxxxxxxxxxxxxxxxxxxxxxxWwWxxxxxWwWxxxxxxxxxxxx
           xWwWxxxxxxxxxxxxxxxxxxxxxxxWwWxxxxxWwWxxxxxxxx.1.xx
           x-wWxxxxQQQQxxxDDDDxxxxxxxxWwWxxxxx-wWxxxx1xx....1xx
           xWwWxxxxx++xxxxx++xxxxxxxxx-wWxxxxxWwW--W-.........x
           x-wWW-W..............<xxxxxWw-xxxxxWwWWW-1....A...1x
           x-wWWW--.............<xxxxxWwWxxxxxWwWW-.xxxx......x
           xWwWxxxxx++xxxxx++xxxxxxxxxWwWxxxxx-wWxxxxxxxxx.<xxx
           x-wWxxxxEEEExxxSSSSxxxxxxxx-w-xxxxxWw--xxxxxxxxxxx
   xxxxxxx x-wWxxxxxxxxxxxxxxxxxxxxxxxWwWxxxxxWw-xxxxxxxxxxxx
 xxx.d..dxxxWwWxxxxxxxxxxxxxxxxxxxxxxxWwWxxxxx-wWxxxxxxxxx.exx
xx.3...d.dxxWwWWWWWW---WW-W-WW-W-WWWW--wWxxxxxWwWxxxxxxxx-22ex
x.3....dxxxx-w-wwwwwwwwwwwwwwwwwwwwwww-w-xxxxxWwWWWWWWWW---2.ex
xx3...xxxxxxWwWW-W-WWW-W-W-WWWWW-WWWWWWw-xxxxxWw-wwwwwwww---2.x
 x3-...-xxxx-w-xxxxxxxxxxxxxxxxxxxxxxxWwWxxxxx-wWWWWWWW-----..x
 xxx------xxWwWxxxxxxxxxxxxxxxxxxxxxxxWwWxxxxxWwWxxxxxxxxx-.exx
xxxxxx------WwWxxxxxxxxxxxxxxxxxxxxxxxWwWxxxxxWwWxxxxxxxxxxxxx
xwwwwww--WWwwwWWWW-W-W-W-W-WWWW-W-W-W-W-WW---WWwwwwwwwwwwwwwx
xwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwx
xwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
ENDMAP

###############################################################################
# A sewer opening to sea by st_.
#
NAME:   sewer_sea
TAGS:   sewer no_item_gen no_monster_gen no_rotate no_pool_fixup
ORIENT: encompass
MONS:   rat w:3 / grey rat w:1 / nothing w:1, rat / grey rat / green rat
KMONS:  G = mermaid hd:3 name:malarious name_adjective
KMONS:  H = siren hd:3 name:sickly name_adjective
KMONS:  hJ = giant newt / small snake / snake / nothing w:2
KMONS:  g = giant newt / small snake / giant mite / giant cockroach / \
            giant gecko / nothing w:7
KFEAT:  gsh = W
KFEAT:  O = open_sea
COLOUR: gh = lightgreen
COLOUR: HJ = blue
KFEAT:  GnHJ = w
COLOUR: G = green
COLOUR: s = cyan
KITEM:  M = potion of levitation q:4
KITEM:  N = scroll of teleportation q:2
: sewer_setup(_G)
epilogue{{
sewer_milestone(_G)
}}
MAP
OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO
OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO
OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO
OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO
OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO
OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO
OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO                        cccc       cccccccc
OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO                       ccW.cc      cWW1..1c
OOOnnnnnnnnnnnnnnnnnnnOOOOOOOOOOOOOO                     cccWWW.ccccccccW..c..c
OOOnnnnnnnnnnnnnJnnnnnOOOOOOOOOOOOOO                     c<AWWWW...1.2...1.cc.c
OOOnnnnnnnnnnnnnnnnnnnOOOOOOOOOOOOOO                     cccccccccccccccccccc.c
OOOnnnnnnnnnJnnnscccccccccccccc  cccccccccccccccc ccccccccccwhwwwwwwwWwwwww2..c
OOOnnnnnnnnnnnns.+.....+...%Wwc  c1.....cc$$$.1McccwwWWWgWWWWWWWW..W..WW.Www..c
OOOnnnnnnnnHnnsW.ccccccc...%*Wc  c.ccccc.c.1.W.NcccwWWccccccccccccc11cccc.gwWwcc
OOOnnnnnnnnnnnsW.ccc.1cc...%*Wc  c2cwwcc.ccccWcccwwwc.c           cccc  cc..WWwc
OOOnnnnnnnnnJnsW.ccc..cc...*WWc ccwWgcwc.cGgwWWWWWWcc.c                  ccccwwc
OOOnnnnnnnnnnssWWccc1.cc<..WwccccwgWccwc.chwgWW..1....c            cccccccccccwc
OOOnnnnnnnnsssWWWWWc.1ccccccccwwwWW.1cwWWcWWW..2ccccccc            cGwwwwwwwwwwc
OOOnnnnnnnsssWWWWWWWWsswwswwwhcWW..1ccccWWWW1..cc                  ccccccccccccc
OOOnnnnnnnnssshWWWWc..cccccccccW.1.cc  ccW1..ccc
OOOnnnnnnnnnnssWgccc.2c  cwg2....ccc    cccccc
OOOnnnnnnnnnnnssWcccc1cc cgWcccccc
OOOnnnnnnnnnnnnsccccc..ccc.1c
OOOnnnnnnnnnnnnnsccccc1.1..cc
OOOnnnnnnnnnnnnnnnnnnccccccc
OOOnnnnnnnnnnnnnnnnnnnOOOOOOOOOOOOOO
OOOnnnnnnnnnnnnnnnnnnnOOOOOOOOOOOOOO
OOOnnnnnnnnnnnnnnnnnnnOOOOOOOOOOOOOO
OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO
OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO
OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO
OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO
OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO
OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO
OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO
OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO
ENDMAP

############################################################################
# 15 rooms, by co
# All rooms will always be accessible, except the room in the center, which
# is surrounded by deep water.
#
NAME:    sewer_co_15_rooms
TAGS:    sewer no_item_gen no_monster_gen no_pool_fixup
ORIENT:  encompass
MONS:    kobold / w:7 big kobold
MONS:    kobold / snake / small snake / w:7 worm / w:7 ooze / \
         rat / green rat / grey rat
SUBST:   . = W..
SUBST:   X = xx.
SUBST:   2 = 222..
#      generate path to center
SHUFFLE: BC/DE/GF/IH
SUBST:   B = w, C = W
SUBST:   DGI = c, EFH = x
#      generate path to the first cave.
SHUFFLE: JK/LM
SUBST:   JK = .
SUBST:   M = x, L = c
#      generate path to the second cave.
SHUFFLE: PN/QR
SUBST:   PN = .
SUBST:   Q = x, R = c
#      generate a paths between the big rooms.
SHUFFLE: yZzSsUuTgY
SUBST:   y = w
SUBST:   hVZzSsUuTgY = W
#      loot
SUBST:   e = !!!!?????
KITEM:   ? = potion of levitation w:5 / potion of levitation q:2 w:5 /\
         potion of healing / potion of heal wounds / potion of might /\
         potion of magic / potion of speed w:5 / potion of brilliance w:5
KITEM:   ! =  scroll of teleportation / scroll of fear w:5 /\
         scroll of blinking w:3 / scroll of magic mapping w:3 /\
         scroll of recharging w:2 / scroll of fog w:3
: sewer_setup(_G)
epilogue{{
sewer_milestone(_G)
}}
MAP
xxxxxxxxxxxxcccxxxxxxxcccxxxxxxxxxxxx
xxxxxxxxxxxcccccxxxxxcccccxxxxxxxxxxx
xxxxxxxxxxcc...ccxxxcc...ccxxxxXXXxxx
xxxxxxxxxxc.2...ccccc...2.cxxxx.1.Xxx
xxxxxxxxxxc..2..yyyyy..2..NPPP.e.1Xxx
xxxxxxxxxxc...2.ccccc.2...cxxxX.e.Xxx
xxxxxxxxxxcc...ccxxxcc...ccxxxxX.xxxx
xxxxxxxxxxxccZccxxxxxcczccxxxxxxQxxxx
xxxxxxxxxxxxcZcxxxxxxxczcxxxxxxxQxxxx
xxxxxxxxxxxxcZcxxxxxxxczcxxxxxxxQxxxx
xxcccccxxxxccZccxxxxxcczccxxxxccRccxx
xcc...ccxxcc...ccxxxcc...ccxxcc...ccx
cc.2...cccc.A...ccccc.e...cccc...2.cc
cc..2..SSSS..<.WwwwwwW....ssss..2..cc
cc...2.cccc.....ccBcc...e.cccc.2...cc
xcc...ccxxcc.W.ccxCxcc.W.ccxxcc...ccx
xxccUccxxxxccwccxx.xxccwccxxxxccuccxx
xxxcUcxxxxxxcwcxx1e.xxcwcxxxxxxcucxxx
xxxcUcxxxxxxcwDE.e<e.FGwcxxxxxxcucxxx
xxxcUcxxxxxxcwcxx.e1xxcwcxxxxxxcucxxx
xxccUccxxxxccwccxx.xxccwccxxxxccuccxx
xcc...ccxxcc.W.ccxHxcc.W.ccxxcc...ccx
cc...2.cccc.e...ccIcc.....cccc.2...cc
cc..2..TTTT....WwwwwwW.<..gggg..2..cc
cc.2...cccc...e.ccccc.....cccc...2.cc
xcc...ccxxcc...ccxxxcc...ccxxcc...ccx
xxccJccxxxxccVccxxxxxcchccxxxxcccccxx
xxxxKxxxxxxxcVcxxxxxxxchcxxxxxxxxxxxx
xxxxKxxxxxxxcVcxxxxxxxchcxxxxxxxxxxxx
xxxxKxxxxxxccVccxxxxxcchccxxxxxxxxxxx
xxxx.Xxxxxcc...ccxxxcc...ccxxxxxxxxxx
xxX.e.Xxxxc...2.ccccc.2...cxxxxxxxxxx
xxX1.e.MMML..2..YYYYY..2..cxxxxxxxxxx
xxX.1.xxxxc.2...ccccc...2.cxxxxxxxxxx
xxxXXXxxxxcc...ccxxxcc...ccxxxxxxxxxx
xxxxxxxxxxxcccccxxxxxcccccxxxxxxxxxxx
xxxxxxxxxxxxcccxxxxxxxcccxxxxxxxxxxxx
ENDMAP

############################################################################
# Tree sewer. by co
# This sewer is structured as a tree, in the sense that there are no loops.
# At each endpoint there is  monster or loot.
# At least you won't go in circles...
#
NAME:   sewer_co_tree
TAGS:   sewer no_item_gen no_monster_gen no_pool_fixup
ORIENT: encompass
MONS:   kobold / big kobold
MONS:   snake / small snake / worm
MONS:   ooze / rat / green rat / grey rat
# less water in the middle, more at the endpoints.
SUBST:  ~ = WWWW.
SUBST:  - = WW...
SUBST:  " = W...
NSUBST: ? = 4=ef / *=112233
KITEM:  e = potion of healing / potion of heal wounds / potion of might /\
        potion of magic / potion of speed w:5 / potion of brilliance w:5
KITEM:  f = scroll of teleportation / scroll of fear w:5 /\
        scroll of blinking w:3 / scroll of magic mapping w:3 /\
        scroll of recharging w:2 / scroll of fog w:3
: sewer_setup(_G)
epilogue{{
sewer_milestone(_G)
}}
MAP
xxxxxxxxxxxxxxcccccccccccccccccccccxxxxxxxxxxxxxx
xxxxxxxxxxxxxxc?c?c?c?cxxxc?c?c?c?cxxxxxxxxxxxxxx
xxxxxxxxxxxxxxcWcWc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xxxxxxxxxxcWcWcWcWcxxxcWcWcWcWcxxxxxxxxxxxxxx
xxxxxxxxxxxxxxc?c?c?c?cxxxc?c?c?c?cxxxxxxxxxxxxxx
xxxxxxxxxxxxxxcccccccccccccccccccccxxxxxxxxxxxxxx
ENDMAP

############################################################################
# Cracked pipes. by co
# Most of the time the player will move between the pipes through cracks,
# these will be filled with rats. Only two of the paths will be generated
# each map, but all three pipes will be accessable on all instances.
# One map in three, will end in a harder rat nest containing a dangerous
# orange rat. The harder rat nest also contains cheese and more loot.
#
NAME:    sewer_co_cracked_pipes
TAGS:    sewer no_item_gen no_monster_gen no_pool_fixup no_rotate no_vmirror
ORIENT:  encompass
#      water creatures
MONS:    giant newt / small snake w:5 / \
         generate_awake giant newt / generate_awake small snake w:5 / \
         snake w:2 / nothing w:4
KMONS:   2 = snake / big fish
KFEAT:   2 = W
COLOUR:  2 = lightgreen
#      generate first path.
SHUFFLE: BC/DE/FG
NSUBST:  B = 1:. / *:c
NSUBST:  C = 1:. / *:c
SUBST:   DEFG = c
#      generate second path.
SHUFFLE: HI/JK/LM
NSUBST:  H = 1:. / *:c
NSUBST:  I = 1:. / *:c
SUBST:   LMKJ = c
#      randomize enviroment
SUBST:   . = .W
SUBST:   V = .WWWW
SUBST:   X = xx"
#      Sometimes there's a rat nest in the end.
: if crawl.one_chance_in(3) then
NSUBST:  Y = 2:. /*:c
SUBST:   d = e
KMONS:   Z = nothing w:60 / rat w:2 / grey rat / green rat w:7
KITEM:   Z = cheese w:2 / nothing
KMONS:   R = orange rat
KFEAT:   ' = .
: else
SUBST:   Y = c
SUBST:   d = x
KFEAT:   Z = x
KFEAT:   R = x
KFEAT:   ' = x
: end
#      rat path
KPROP:   " = no_tele_into
KMONS:   " = nothing w:50 / rat / grey rat / green rat w:5
KPROP:   w = no_tele_into
#      loot
SUBST:   e = !!!!!?????%
KITEM:   ? = potion of healing / potion of heal wounds / potion of might /\
         potion of magic / potion of speed w:5 / potion of brilliance w:5
KITEM:   ! =  scroll of teleportation / scroll of fear w:5 /\
         scroll of blinking w:3 / scroll of magic mapping w:3 /\
         scroll of recharging w:2 / scroll of fog w:3
: sewer_setup(_G)
epilogue{{
sewer_milestone(_G)
}}
MAP
                        xxxxxxxxxxxxx
                        xxxxx''xxxxxx
                        xxx'ddddd'xxx
                        xxxZZZZZZZ'xx
                        xx'ZZZRZZZZ'x
                        x'ZZZZZZZZ'xx
                        x''ZZZZ''''xx
                        xx''''xx'x'xx
                        xx'xx'xx''xxx
                        x'xx'xxxxx'xx
                        x'xxx''x''xxx
                        xx''x'x''xxxx
 xxxxxxxxxxxxxxxxxxxxxxxxxxx'x'x'xxxxxxxxxxxxxxxxx
 xcccccccccccccccccccccccccYYYYYYYcccccccccccccccx
 xwwwwwwwwmwWe.....1......VVVVVVVVV......1.....<cx
 xwwwwwwwwmwWe.........1..VVVVVVVVV.1..........ecx
 xccccccccccccIIIIIIccccccccccKccccccMMMcccccMMMcx
 xxxxxxxxxxxxxx"xx"xxxxxxxxxxcVcxxxxxx"xxxxxxx"xxx
             xxx""xxxxxxxxxxxcVcxxxxxxx"xXxxx"xx
             xXxx"xxxxxxxxxxxcVcxxxxxxxx"xX""Xx
             xx""x"xxxxxxxxxxc2cxxxxxxxxx"x"xxx
             x"xxXxxxXxXxxxxxcVcxxxxxxxxxX"x"xx
             xx""""x"x"xxxxxxcVcxxxxxxxxx"xXx"xx
             xXxxxx"x"x"xxxxxcVcxxxxxxxxxx"xxx"x
 xxxxxxxxxxxxxxxxx"xxxxx"xxxxcVcxxxxxxxxxxx"Xx"xxxxxxxxxxxxx
 xcccccccccccccccHHHcccHHHccccJcccccccccccLLLLLLcccccccccccx
 xwwwwwwwwmwWe....1.......VVVVVVVVV........1...eWwmwwwwwwwwx
 xwwwwwwwwmwWe.........1..VVVVVVVVV..1.........eWwmwwwwwwwwx
 xccccccccccCCCccCCCccccccccccEccccccccccGGGcGGGcccccccccccx
 xxxxxxxxxxxx"xxxx"xxxxxxxxxxcVcxxxxxxxxxx"xxx"xxxxxxxxxxxxx
          xxxx"xx"xxxxxxxxxxxcVcxxxxxxxxxxx"x"xx
          xxxx"x"xxxxxxxxxxxxcVcxxxxxxxxxxxx""Xx
          xX""x"xXxxxxxxxxxxxc2cxxxxxxxXx"xX"xxx
          xxxx"xxxxxxxxxxxxxxcVcxxxxxxxx"xx"x"xx
           xxx""xXxXxxxxxxxxxcVcxxxxxxxx"x"xxx"x
           xxXxx"""xxxxxxxxxxcVcxxxxxxxxx"xxxXxx
           xxxx"xxx"xxxxxxxxxcVcxxxxxxxx"x"xxxxxxxxxxxxxxxxx
           xccBBBcBBBcccccccccDccccccccFFFFFcccccccccccccccx
           xc<............VVVVVVVVV.........1..eWwmwwwwwwwwx
           xcA........1...VVVVVVVVV.....1......eWwmwwwwwwwwx
           xcccccccccccccccccccccccccccccccccccccccccccccccx
           xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
ENDMAP

############################################################################
# Scattered pipes. by co
# The loot is often at the end of the pipes, with guarding monsters.
#
NAME:    sewer_co_scattered_pipes
TAGS:    sewer no_item_gen no_monster_gen no_pool_fixup
ORIENT:  encompass
KMONS:   P = plant / nothing
#      pipe monsters.
KFEAT:   1 = W
COLOUR:  1 = lightgreen
KMONS:   1 = giant newt / small snake w:5 /  generate_awake small snake w:5 / \
         snake w:7 / big fish w:5
SUBST:   1 = 1111W
#      other monsters
KMONS:   2 = jackal / kobold, w:5 big kobold / w:5 green rat, w:7 grey rat, rat
SUBST:   2 = 222222W.
#      loot
SUBST:   e = !!!?????%WWW
KFEAT:   !?% = W
COLOUR:  !?% = lightgreen
KITEM:   ? = potion of healing / potion of heal wounds / potion of might /\
         potion of magic / potion of speed w:5 / potion of brilliance w:5
KITEM:   ! =  scroll of teleportation / scroll of fear w:5 /\
         scroll of blinking w:3 / scroll of magic mapping w:3 /\
         scroll of recharging w:2 / scroll of fog w:3
SUBST:   . = .W
SUBST:   X = x.
SUBST:   Y = xxw
#
NSUBST:  B = 1:< / *:.
: sewer_setup(_G)
epilogue{{
sewer_milestone(_G)
}}
MAP
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxYxcccxxcccYYYxxxxxYYYxxxxxxxxxxxxxxx
xxxxxxYYwwcecwwcccwwwwYYYwwwwwYYYYwYxxxxxxxx
xxxxxYwwwwcWcwwcccwwwwwwwwwwwwwwwwwwwYxxxxxx
xxxxYwwwwwcWcwwcccwwwwwwwwwwwwwwwwwwwwYxxxxx
xxxxwwwww.cWcPPcccwwwwwwwwwwwwwwwwwwwwwYxxxx
xxxxww....cWcPPcecwwwwwwwwwwwwwwwwwwwwwYxxxx
xxxX...A<.PPPPxcWcccccccc.wwwwwwwwwwwwwwYxxx
xxx........PxxxcWceW1WWWW..wwwwwwwwwwwwwYxxx
xxx..Pcccccccccc1cccccccc..wwwwwww...wwwwYxx
xxxPPPWWWWW1WWecWPxxexxxX..wwwwww..e..wwwYxx
xxxPPPccccccccccWcPx2xxx...wwwwww.2B2.wwwYxx
xxx.....XxxxxxxcWc..xxxX...wwwwww..P..wwwYxx
xxxX.....XxxxxxcWcxxxxX....wwwwww.PPP.wwwYxx
xxxxX.....XxxxxcWcxxxX....wwwwwww.cWc.wwwYxx
xxxxX..2.....XxcWcxxX.....wwwwwwwwcWcwwwwYxx
xxxx....cWc....cWcX.......wwwwwwwwcWcwwwwYxx
xxxP.2..cWc..........2..Pccccccccwc1cwwwYxxx
xxxPP...c1c...P..2.....P.PwwwwwwwwcWcwwwYxxx
xxxPPP..cWc..PPP.......PPccccccccwcWcwwwwYxx
xxxXPPP.cec2.cWc.......P.wwwwwwwwwcWcwwwYxxx
xxxX.cccccccccWc.......P.wwwwwwwwwcWcwwwwYxx
xxxX.WWWW1WWecWc......P..wwwwwwwwwcWcwwwwxxx
xxxX.cccccccccWc.2...P..wwwwwwwwwPcWc.wwwYxx
xxxXXxxX.2.xPP1c....P...wwwwwwwwPPPPPP..wYxx
xxxxxxx.e.xPxcWc...PPPccccccccccccPPP...Xxxx
xxxxxxxxXXxxxcWc....PPWWWWW1WWW1WWPP..2.Xxxx
xxxxxxxxxxxxxcWc..2..PccccccccccccP..e..Xxxx
xxxX...XxxxxxcWc........wwwwwwww........Xxxx
xxX.2...Xxxx............wwwwwwww....PP..Xxxx
xxX...PcccccccccccPP....wwwwwwww.2.PPP.Xxxxx
xxX2ePPWWWWW1WWWWWP...wwwwwwwww....cWcXxxxxx
xxX..P.ccccccccccc.Pwwwwwwwwwww..XXcWcxxxxxx
xxxX....wwwwwwwwwwwwwwwwwwwwwww.XxxcWcxxxxxx
xxxYwwwwwwwwwwwwwwwwwwwwwwwwwwYxxxxc1cxxxxxx
xxxYwwwwwwwwwwwwwwwwwwwwwwwwwwxxxxxcWcxxxxxx
xxxYwwwwwwwwwwwwwwwwwwwwwwwwwYxxxX.cWc.Xxxxx
xxxxYwwwwwwwwwwwwwwwwwwwwwwwYxxxX..PPP..Xxxx
xxxxxwwwwwwwwwwwwwwwwwwwwwwxxxxxX..PB.2.Xxxx
xxxxxYwwwwwwwwwwwwwwwwwwwwYxxxxxX.2..e..Xxxx
xxxxxxYwwwwwwYYYYwwwYYYwwYxxxxxxxX.....Xxxxx
xxxxxxxYYYxYYxxxxYYYxxxYYxxxxxxxxxxXXXxxxxxx
ENDMAP
