##############################################################################
#
# Bailey! (Zaba and dpeg)
#
# A small portal vault fixated on nasty weapons. (Axes and polearms by now.)
# Castle like layout, with inner bailey and moat. Medieval warfare themed.
#
# Currently, the depth is fixed at D:7-10
#
##############################################################################

{{
function bailey_portal(e, ptype)
  local timeout_turns = crawl.random_range(600, 800)

  local messager =
    timed_msg {
      initmsg = { "You hear the roar of battle.",
                  "There is an entrance to a bailey on this level. "
                  .. "Hurry and find it before the portal closes forever!" },
      finalmsg = "$F{The} has been lowered almost to the ground.",

      verb = 'creaking',
      noisemaker = 'portcullis',
        ranges = {
          { 5000, 'faint ' },  { 4000, '' },
          { 2500, 'steady ' }, { 1500, 'quick ' },
          { 0, 'loud ' }
      }
    }

  dgn.persist.bailey_type = "bailey_" .. ptype

  e.lua_marker('O',
      timed_marker {
        disappear = "The portal closes with a thud.",
        entity = 'portcullis',
        bailey_type = ptype,
        turns = timeout_turns,
        single_timed = true,
        floor = "stone_arch",
        feat_tile = "dngn_portal_bailey_gone",
        msg = messager })
  e.tags("uniq_bailey chance_bailey")
  e.chance(1000)

  e.kfeat("O = enter_bailey")
  e.tile("c = wall_stone_smooth")
end

function bailey_portal_axe(e)
  bailey_portal(e, 'axe')
end

function bailey_portal_polearm(e)
  bailey_portal(e, 'polearm')
end

-- colours
function bailey_setup(e)
  e.kfeat("< = exit_bailey")
end

-- In order to avoid repeating the lengthy monster definitions:

-- Axes.
function axe_returning(e)
  e.mons("generate_awake kobold ; boomerang ident:type q:2 | \
                                  boomerang ident:type q:1 / \
          generate_awake hobgoblin ; boomerang ident:type q:2 | \
                                     boomerang ident:type q:1")
end

function kobold_axe_returning(e)
  e.mons("generate_awake kobold ; boomerang ident:type q:2 | \
                                  boomerang ident:type q:1")
end

function easy_axe_fighter(e)
  e.mons("w:3 orc warrior ; hand axe w:60 | war axe . ring mail / \
          w:7 gnoll ; hand axe w:60 | war axe . leather armour / \
          w:10 hobgoblin ; hand axe w:60 | war axe . leather armour / \
          w:10 orc ; hand axe w:60 | war axe . leather armour / \
          w:12 goblin ; hand axe w:60 | war axe . leather armour")
end

function hard_axe_fighter(e)
  e.mons("w:9 orc warrior ; war axe | broad axe w:2 | battleaxe w:1 . \
                            ring mail | scale mail | chain mail | plate armour / \
          w:1 orc knight ; war axe | broad axe w:2 | battleaxe w:1 . \
                           ring mail | scale mail | chain mail | plate armour")
end

function orc_warlord_with_axe(e)
  e.mons("orc warlord ; \
          battleaxe good_item | broad axe good_item | \
          executioner's axe good_item w:1 . \
          chain mail w:20 | plate armour | crystal plate armour w:1")
end

-- Polearms.
function orc_with_polearm(e)
  e.mons("orc ; \
          spear | trident | halberd . \
          ring mail | scale mail | chain mail")
end

function orc_warrior_with_polearm(e)
  e.mons("orc warrior ; \
          spear w:5 | trident w:5 | halberd | glaive | bardiche w:1 . \
          ring mail | scale mail | chain mail | plate armour |\
          crystal plate armour w:1")
end

function orc_knight_with_polearm(e)
  e.mons("orc knight ; \
          trident w:5 | halberd | glaive | bardiche w:1 . \
          ring mail | scale mail | chain mail | plate armour | \
          crystal plate armour w:1")
end

function orc_warlord_with_polearm(e)
  e.mons("orc warlord ; \
          halberd good_item | glaive good_item | bardiche good_item w:1 . \
          chain mail w:20 | plate armour | crystal plate armour w:1")
end

}}

# Basic bailey entries ##########################################
default-depth: D:7-10

NAME: enter_bailey_1
TAGS: transparent
WEIGHT: 1
: local rnd = crawl.random2(2)
: if rnd == 0 then
:   bailey_portal_axe(_G)
: elseif rnd == 1 then
:   bailey_portal_polearm(_G)
: end
MAP
O
ENDMAP

NAME: enter_bailey_2
TAGS: transparent
: local rnd = crawl.random2(2)
: if rnd == 0 then
ITEM: hand axe
:   bailey_portal_axe(_G)
: elseif rnd == 1 then
ITEM: halberd / spear
:   bailey_portal_polearm(_G)
: end
MAP
.....
..d..
.dOd.
..d..
.....
ENDMAP

NAME: enter_bailey_3
TAGS: transparent
: local rnd = crawl.random2(2)
: if rnd == 0 then
MONS: goblin ; hand axe
:   bailey_portal_axe(_G)
: elseif rnd == 1 then
MONS: goblin ; spear
:   bailey_portal_polearm(_G)
: end
KMASK: wW = no_monster_gen
MAP
.........
.wwwwwww.
.wcccccw.
.wc.1.cw.
.wc1O1cw.
.wc.1.cw.
.wcc.ccw.
.wwwWwww.
.........
ENDMAP

NAME:   enter_bailey_4
TAGS:   transparent
WEIGHT: 5
: local rnd = crawl.random2(2)
: if rnd == 0 then
MONS:   goblin ; hand axe / hobgoblin ; hand axe / orc ; hand axe
MONS:   goblin ; boomerang ident:type q:2 | \
                 boomerang ident:type q:1 / \
        hobgoblin ; boomerang ident:type q:2 | \
                    boomerang ident:type q:1 / \
        orc ; boomerang ident:type q:2 | \
              boomerang ident:type q:1
SUBST: 1 = 122
:   bailey_portal_axe(_G)
: elseif rnd == 1 then
MONS:   goblin ; spear / hobgoblin ; spear / orc ; spear
:   bailey_portal_polearm(_G)
: end
KMASK: wW = no_monster_gen
MAP
...........
.wwwwwwwww.
.wcccccccw.
.wc>...Ocw.
.wc11111cw.
.wcc+++ccw.
.wwwwWwwww.
.wwwwWwwww.
...........
ENDMAP

NAME: enter_bailey_5
TAGS: transparent no_pool_fixup
: local rnd = crawl.random2(2)
: if rnd == 0 then
MONS: goblin ; boomerang ident:type q:2 | \
               boomerang ident:type q:1
:   bailey_portal_axe(_G)
: elseif rnd == 1 then
MONS: goblin ; spear
:   bailey_portal_polearm(_G)
: end
SHUFFLE: ABCD
SUBST: A : W, BCD : wW
KMASK: wW = no_monster_gen
MAP
.......
.wwDww.
.w1>1w.
.C.O.A.
.w1.1w.
.wwBww.
.......
ENDMAP

NAME:   enter_bailey_6
TAGS:   transparent
WEIGHT: 3
COLOUR: ; : red / lightred
SUBST:  ; = .
KMASK:  d = no_item_gen
KMASK:  d = no_monster_gen
KPROP:  d = no_tele_into
: local rnd = crawl.random2(2)
: if rnd == 0 then
:   set_feature_name("granite_statue", "granite statue wielding a mighty axe")
    TILE: G = dngn_statue_axe
:   bailey_portal_axe(_G)
: elseif rnd == 1 then
:   set_feature_name("granite_statue", "granite statue wielding a fearsome trident")
    TILE: G = dngn_statue_polearm
:   bailey_portal_polearm(_G)
: end
MAP
.....G.....
..G.....G..
...........
....;;;....
G...;O;...G
....;;;....
...........
..G.....G..
.....G.....
ENDMAP

# They were just having a party.
NAME:   enter_bailey_7
WEIGHT: 3
: local rnd = crawl.random2(2)
: if rnd == 0 then
MONS:   gnoll ; hand axe / goblin ; hand axe
:   bailey_portal_axe(_G)
: elseif rnd == 1 then
MONS:   gnoll ; spear / goblin ; spear
:   bailey_portal_polearm(_G)
: end
SUBST:  . = ...;!
COLOUR: ; = red
KITEM:  ! = potion of degeneration q:2 ident:type
KFEAT:  ! = floor
SUBST:  ; = .
MAP
x@x  xxxxxxx
x.x  x...1.x
x.xxxx.1...x
x....+..O..x
x.xxxx...1.x
x.x  x.1...x
x@x  xxxxxxx
ENDMAP

NAME:   enter_bailey_8
WEIGHT: 3
COLOUR: n = red
KMASK:  d = no_item_gen
KMASK:  d = no_monster_gen
KPROP:  d = no_tele_into
: local rnd = crawl.random2(2)
: if rnd == 0 then
:   set_feature_name("granite_statue", "granite statue wielding a mighty axe")
    TILE: G = dngn_statue_axe
:   bailey_portal_axe(_G)
: elseif rnd == 1 then
:   set_feature_name("granite_statue", "granite statue wielding a fearsome trident")
    TILE: G = dngn_statue_polearm
:   bailey_portal_polearm(_G)
: end
MAP
 xxxxxxxxxxx
 x.........@
 ccccGcccGcc
@+........OG
 ccGcccGcccc
 x.........@
 xxxxxxxxxxx
ENDMAP

NAME: lightli_bailey_entry_fortress
TAGS: transparent
WEIGHT: 1
: local rnd = crawl.random2(2)
: if rnd == 0 then
MONS: orc ; boomerang ident:type q:1 | \
            boomerang ident:type q:2 . hand axe
MONS: gnoll ; hand axe / goblin ; hand axe
:   bailey_portal_axe(_G)
: elseif rnd == 1 then
MONS: orc ; spear, gnoll ; spear / goblin ; spear
:   bailey_portal_polearm(_G)
: end
KMASK: W = no_monster_gen
MAP
WWWWWWWWWWWWWWW
Wccc.2.1.2.cccW
WcccccccccccccW
WcccccccccccccW
W.ccccccccccc.W
W2ccccccccccc2W
W.ccccccccccc.W
W1ccccccccccc1W
W.ccccccccccc.W
W2ccccccccccc2W
W.ccccccccccc.W
WcccccccccccccW
WcccccvOvcccccW
Wccc.2.1.2.cccW
WWWWWWWWWWWWWWW
ENDMAP

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

NAME:   bailey
TAGS:   allow_dup
PLACE:  Bailey
ORIENT: encompass
{{
  local btype = dgn.persist.bailey_type
  if not btype then -- Wizmode
    if crawl.coinflip() then
      btype = "bailey_axe"
    else
      btype = "bailey_polearm"
    end
  end
  if crawl.game_started() then
    local map = dgn.map_by_tag(btype)
    assert(map, "Couldn't find a map for " .. btype)
    dgn.place_map(map, false, false)
  end
}}
MAP
ENDMAP

##########
#        #
#  AXES  #
#        #
##########

############################################################################
# Bailey 2.
#
# Apart from weapons and armours left by the monsters, there are about 10
# potions useful in battle. If those monsters drink them first, of course...
# this used to be an axe map; it's polearm now and has been renamed accordingly
NAME:   bailey_polearm_nasty_gnolls
ORIENT: encompass
TAGS:   bailey_polearm no_rotate
: orc_with_polearm(_G)
MONS:   gnoll ; halberd ego:draining | halberd ego:electrocution ident:type
MONS:   orc warrior ; halberd ego:electrocution ident:type . plate armour /\
        orc knight ; halberd
NSUBST: d = 1:ddde / *:d, 1 = 5:1 / *=1., 2 = 5:2 / *=2.
: item(dgn.loot_potions)
ITEM:   potion of experience ident:type q:1 /\
        scroll of acquirement ident:type q:1
: bailey_setup(_G)
MAP
ccc ccc ccccc ccc ccc
cAccc1ccc2+2ccc1ccc1c
cc+cc+cc+ccc+cc+cc+cc
 cc.....cc cc.....cc
ccc.....ccccc.....ccc
c1+..<..+1c1+..T..+1c
ccc.....ccccc.....ccc
 cc....dcc ccd....cc
cc+cc+cc+ccc+cc+cc+cc
c1ccc1ccc2c2ccc1ccc2c
ccc ccc ccncc ccc c+c
c1ccc1ccc2c2ccc1ccc2c
cc+cc+cc+ccc+cc+cc+cc
 ccd.d.dcc ccd....cc
ccc.d2d.ccccc.....ccc
c1+d2U3d+1c1+..Y..+1c
ccc.d2d.ccccc.....ccc
 ccd.d.dcc cc.....cc
cc+cc+cc+ccc+cc+cc+cc
c<ccc1ccc2+2ccc1ccc1c
ccc ccc ccccc ccc ccc
ENDMAP

############################################################################
# Another actual bailey. Six good items plus two stacks of specialty darts.
NAME:   bailey_axe_3
ORIENT: encompass
TAGS:   bailey_axe no_rotate no_item_gen no_monster_gen no_pool_fixup
SUBST:  v : ccv
ITEM:   any good_item
ITEM:   dart ego:atropa q:4 / dart ego:datura q:4
KFEAT:  _ = altar_trog / altar_okawaru / altar_makhleb
: kobold_axe_returning(_G)
MONS: kobold brigand ; war axe . dart ego:poisoned | dart ego:curare w:5
: hard_axe_fighter(_G)
SUBST:  2 = 2.
NSUBST: 1 = 3:2 / *=1., 3 = 1:3 / *=3..
: bailey_setup(_G)
MAP
xxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxx.....xxxxxxxxxxx
xxxxxxxxxx...A...xxxxxxxxxx
xxxxxxxxxx.......xxxxxxxxxx
xxxxxxxxxxx..<..xxxxxxxxxxx
xxxxxxxxxxxc+++cxxxxxxxxxxx
xxxxxxxxxxxc...cxxxxxxxxxxx
xxxxxxxxcccc...ccccxxxxxxxx
xxxxxxxxxxxc...cxxxxxxxxxxx
xxxxxxxxcccc...ccccxxxxxxxx
xxxxxxxccW.......Wccxxxxxxx
xxxcccccWW.......WWcccccxxx
xxxc1.1.WW.......WW.1.1cxxx
xxxc.cccWW.......WWccc.cxxx
xxxc1.1.WW.......WW.1.1cxxx
xxxc.cccWW.......WWccc.cxxx
xxxc1.1.WW.......WW.1.1cxxx
xxxc.cccWW.......WWccc.cxxx
xxxc1.1.WW.......WW.1.1cxxx
xxxc.cccWW.......WWccc.cxxx
xxxc1.1.WW.......WW.1.1cxxx
xxxcccccWW.......WWcccccxxx
xxxxxxxccW.......Wccxxxxxxx
xxxxxxxxcccc+++ccccxxxxxxxx
xxxxxxxxxcc.....ccxxxxxxxxx
xxxxxxxxxc<d.3.d<cxxxxxxxxx
xxxxxxxxxc...G...cxxxxxxxxx
xxxxxxxxxcc3.e.3ccxxxxxxxxx
xxxxxxxxxxcvv+vvcxxxxxxxxxx
xxxxxxxxvvvv...vvvvxxxxxxxx
xxxxxxvvv.........vvvxxxxxx
xxxxxvv3...........3vvxxxxx
xxxxxv....2..2..2....vxxxxx
xxxxxv3......2......3vxxxxx
xxxxxvv.2....3....2.vvxxxxx
xxxxxxvvv.dd.e.dd.vvvxxxxxx
xxxxxxxxvvvv3_3vvvvxxxxxxxx
xxxxxxxxxxxvvvvvxxxxxxxxxxx
ENDMAP

############################################################################
# River.
#
# Loots consists of six good items and some flight gear.
#
NAME:    bailey_axe_4
ORIENT:  encompass
TAGS:    bailey_axe no_rotate no_item_gen no_monster_gen no_pool_fixup
#
ITEM:    any good_item
ITEM:    potion of enlightenment ident:type
ITEM:    ring of flight ident:type
ITEM:    pair of boots ego:flying ident:type
SUBST:   e : eeef, g:eg
NSUBST:  f = 1:f / *:e
SHUFFLE: EB / XY / XY / XY
SUBST:   X = c, Y = +
NSUBST:  E = 1:+ / *:c
SUBST:   B = c
SHUFFLE: CD / XY / XY / XY
SUBST:   X = c, Y = +
NSUBST:  C = 1:+ / *:c
SUBST:   D = c
#
KFEAT:   ^ = alarm trap
SUBST:   W = w:2 .:1 W:1
SUBST:   ? = c.
SUBST:   N = nc
SUBST:   H = W.
SUBST:   ~ = W
# the following KMONS duplicates monster 1 from kobold_axe_returning
KFEAT:   ( = exit_bailey
KMONS:   ( = generate_awake kobold ; boomerang ident:type q:2 | \
                                     boomerang ident:type q:1
#
: kobold_axe_returning(_G)
: easy_axe_fighter(_G)
: hard_axe_fighter(_G)
SUBST:   1 = 1., ^ = ^^.
NSUBST:  2 = 1:3 / *=223.
#
: bailey_setup(_G)
MAP
ccccccccccccccccccccccccccccccccccccccccccccccccccc
cccccccccccccccccccccccccc..??.d.??d<cccccccccccccc
ccccccccccccccccccccccccc.??..???.e?ccccccccccccccc
ccccccccccccccccccccccccc2ccccccccccccccccccccccccc
ccccccccccccc1.....................1ccccccccccccccc
cccccccccc1.........1ccccccccc1......cccccccccccccc
ccccccccc....2....c+cc..e3e..ccccCc..cccccccccccccc
cccccccc1...2T2...c..c.2.d.2.c21CdC...ccccccccccccc
ccccccccc1...2..cEc..c.2...2.c.2cDc...1cccccccccccc
ccccccccccc.....EdB..cccc+cccc..+dc..Wwwwwwwxxxxxxx
cccccccccc1.1...cEc...^.....^...ccc1Wwwwwwwxxxxxxxx
xxxxxwwwwwwwW1.1..c1.cccc+cccc.1c1Hwwwwwwwxxxxxxxxx
xxxxxxxwwwwwww~wW1cncc2.2.2.2ccncwwwwwwxxxxxxxxxxxx
xxxxxxxxx....~wwwwww(c.2.g.2.c(wwwwwxxxxxxxxxxxxxxx
xxxxxxxxxx......Wwwwwccncncnccwwwwxxxxxxxxxxxxxxxxx
xxxxxxxxxxx.......Wwwwwwwwwwwwwwxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxx........WwwwwwwwWxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxx.............xxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxx......<..xxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxx.......xxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxx.....xxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxx...xxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxx...xxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxx.....xxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxx.......xxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxx.........xxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxx....A....xxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxx.........xxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxx.......xxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxx...xxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
ENDMAP

NAME:   bailey_axe_minmay_hex_keep
ORIENT: encompass
TAGS:   bailey_axe no_item_gen no_monster_gen
# Loot consists of 8 good potions and scrolls in the last outer room, with a
# lot of gold and especially good items in the (very dangerous) center room.
#
# I believe that loot is a bit much, but other baileys suffer from that as
# well... added the warlord in an attempt to make it more even.  --dpeg
: item(dgn.loot_scrolls .. " / " .. dgn.loot_potions)
ITEM:   potion of experience ident:type q:1 /\
        scroll of acquirement ident:type q:1
: easy_axe_fighter(_G)
: hard_axe_fighter(_G)
: orc_warlord_with_axe(_G)
: bailey_setup(_G)
SUBST:  I = t., 1 = 11.
NSUBST: 2 = 3:2 / *=2.
MAP
ttttttttttttttttttttttttttttttttttttt
ttttttttttttttttttttttttttttttttttttt
tttttttttttttttcccccccttttttttttttttt
ttttttttttttttccdd<ddcctttttttttttttt
ttttttttttttttcdd2.2ddctttttttttttttt
tttttttttttttcc.......ccttttttttttttt
tttttttttttttc.........cttttttttttttt
ttttttttttttcc.1.....1.cctttttttttttt
ttttttccccccc2...1T1...2ccccccctttttt
tttttcc1.2.1cc.1.....1.cc1.2.1ccttttt
tttttc.......+....2....+.......cttttt
ttttcc.......cc.1...1.cc.......cctttt
ttttc.........c.......c.........ctttt
tttcc...1.1...ccGG.GGcc...1.1...ccttt
tttc2....T....1ccc+ccc1....T....2cttt
tttcc...1.1...ccc...ccc...1.1...ccttt
ttttc.........c1.....1c.........ctttt
ttttcc.......cc..1.1..cc.......cctttt
tttttc.......c2.......2c.......cttttt
tttttcc1...1cc..1...1..cc1...1ccttttt
ttttttcc+cccc.....3.....cccc+cctttttt
tttttcc.....cc..1...1..cc.....ccttttt
tttttc1.....1c2.......2c1.....1cttttt
ttttcc.......cc.......cc.......cctttt
ttttc1.......1c|$$$$$|c1.......1ctttt
tttcc.........cc$$e$$cc.........ccttt
tttc2....T....1ccccccc1....T....2cttt
tttcc.........cc1.1.1cc.........ccttt
ttttc1.......1c.......c1.......1ctttt
ttttcc.......cc1.....1cc.......cctttt
tttttc1......+.........+......1cttttt
tttttcc.....cc.........cc.....ccttttt
ttttttccccccc.....T.....ccccccctttttt
ttttttttttttcc.........cctttttttttttt
tttttttttttttc.........cttttttttttttt
tttttttttttttcc.......ccttttttttttttt
ttttttttttttttc.......ctttttttttttttt
ttttttttttttttcc.....cctttttttttttttt
tttttttttttttttcc+++ccttttttttttttttt
ttttttttttttttI.......Itttttttttttttt
ttttttttttttttI.......Itttttttttttttt
tttttttttttttI....<....Ittttttttttttt
tttttttttttttI.........Ittttttttttttt
tttttttttttttI....A....Ittttttttttttt
tttttttttttttI.........Ittttttttttttt
ttttttttttttttII.....IItttttttttttttt
ttttttttttttttttIIIIItttttttttttttttt
ttttttttttttttttttttttttttttttttttttt
ttttttttttttttttttttttttttttttttttttt
ENDMAP

##############
#            #
#  POLEARMS  #
#            #
##############

############################################################################
# A polearm bailey.
#
# Loot consists of three items, among them one piece of good heavy body
# armour and another piece of good additional armour. Apart from what the
# orcs leave lying around.
#
NAME:   bailey_polearm_1
ORIENT: encompass
TAGS:   bailey_polearm no_rotate no_pool_fixup no_monster_gen
NSUBST: D = 1:+ / *:c
NSUBST: E = 1:+ / *:c
: orc_with_polearm(_G)
: orc_warrior_with_polearm(_G)
: orc_knight_with_polearm(_G)
SUBST:  2 = 22223..
SUBST:  1 = 1 2:1 .
ITEM:   good_item crystal plate armour / good_item plate armour w:20 /\
        good_item gold dragon scales w:3 / good_item ice dragon scales w:3 /\
        good_item fire dragon scales w:3 / good_item storm dragon scales w:3 /\
        good_item shadow dragon scales w:3
ITEM:   good_item cloak / good_item pair of gloves /\
        good_item helmet / good_item pair of boots /\
        good_item tower shield / good_item kite shield
: bailey_setup(_G)
MAP
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xA<xxxxxxxxxx.........xxxxxxxxxxxxx
xx..xxxxxxxx..WWWWWWW..xxxxxxxxxxxx
x..xxxxxxxx..WW.1.1.WW..xxxxxxxxxxx
xx..xxxxxx..WW..ccc..WW..xxxxxxxxxx
x..........WW.1cc.cc1.WW..........x
x.WWWWWWWWWW..ccd|ecc..WWWWWWWWWW.x
x.W1..1..1..1cc.....cc1..1..1..1W.x
x.W.ccncccccccccc+ccccccccccncc.W.x
x.W1cc.$$$.cc.........cE....2cc1W.x
x.W..nc.$.cc..lll.lll..EE...cn..W.x
x.WW1.cc.cc..ll..2..ll..Ec.cc.1WW.x
x<.WW..c+c..ll2..T..2ll..c+c..WW.xx
xx.WW..c+c......T<T......c+c..WW.<x
x.WW1.cc.cD..ll2...2ll..cc.cc.1WW.x
x.W..cc...DD..lllllll..cc.$.cc..W.x
x.W1cc2....Dc.........cc.$$$.cc1W.x
x.W.ccccccccccccc+ccc+ccccccccc.W.x
x.W1..1..1..1cc.....cc1..1..1..1W.x
x.WWWWWWWWWW..cc.<.cc..WWWWWWWWWW.x
x..........WW.1nc.cn1.WW..........x
xxxxxxxxxx..WW..ccc..WW..xxxxxxxxxx
xxxxxxxxxxx..WW.1.1.WW..xxxxxxxxxxx
xxxxxxxxxxxx..WWWWWWW..xxxxxxxxxxxx
xxxxxxxxxxxxx.........xxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
ENDMAP

############################################################################
# Donjon.
#
# Loot is only three items, which have a good chance of being selected by
# hand, including useful manuals.
#
NAME:   bailey_polearm_2
ORIENT: encompass
TAGS:   bailey_polearm no_rotate no_pool_fixup no_monster_gen
MONS:   orc warrior w:5 ; arbalest  . ring mail | scale mail / \
        orc ; arbalest . ring mail | scale mail
: orc_with_polearm(_G)
: orc_warrior_with_polearm(_G)
: orc_knight_with_polearm(_G)
MONS:   orc knight
SUBST:  1 = 111., 2 = 233.
NSUBST: 4 = 1:4 / *=433322..
SUBST:  W : W..
SUBST:  X = I G C
KFEAT:  C = altar_beogh
ITEM:   manual of armour / manual of fighting / manual of shields /\
        good_item bardiche / good_item executioner's axe /\
        good_item triple sword / good_item arbalest / good_item triple crossbow
ITEM:   potion of experience ident:type q:1 / \
        scroll of acquirement ident:type q:1 /\
        scroll of enchant armour ident:type q:2 / \
        scroll of enchant weapon ident:type q:3
NSUBST: d = 1:e / *:d|
: bailey_setup(_G)
MAP
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
x<.....................................<x
x.A.....................................x
x.......................................x
x.......................................x
x.....WwwwwwWWWWWWWWWWWWWWWWWwwwwwW.....x
x.....wwcncwwWWWWWWWWWWWWWWWwwcncww.....x
x.....wcc1ccwWWWWWWWWWWWWWWWwcc1ccw.....x
x.....wn111.WWWWWWWWWWWWWWWWW.111nw.....x
x.....wcc1<cwWWWWWWWWWWWWWWWwc<1ccw.....x
x.....wwc.ccwWWWWWWcccWWWWWWwcc.cww.....x
x.....WwwWwwwWWWcccccccccWWWwwwWwwW.....x
x.....WWWWWWWWWccWWWWWWWccWWWWWWWWW.....x
x.....WWWWWWWWccWWc+c+cWWccWWWWWWWW.....x
x.....WWWWWWWWcWWcc2c2ccWWcWWWWWWWW.....x
x.....WWWWWWWccWccvvvvvccWccWWWWWWW.....x
x.....WWWWWWWccW+2vd4dv2+WccWWWWWWW.....x
x.....WWWWWWWccWccv4X4vccWccWWWWWWW.....x
x.....WWWWWWWccW+2v.4.v2+WccWWWWWWW.....x
x.....WWWWWWWccWccvv+vvccWccWWWWWWW.....x
x.....WWWWWWWccWWcc<d<ccWWcWWWWWWWW.....x
x.....WWWWWWWWWWWcc+++cWWccWWWWWWWW.....x
x.....WWWWWWWWWWWccWWWWWccWWWWWWWWW.....x
x.....WwwWwwwWWWWccWWWWccWWWwwwWwwW.....x
x.....wwc.ccwWWWWcccccccWWWWwcc.cww.....x
x.....wcc1<cwWWWWWWWWWWWWWWWwc<1ccw.....x
x.....wn111.WWWWWWWWWWWWWWWWW.111nw.....x
x.....wcc1ccwWWWWWWWWWWWWWWWwcc1ccw.....x
x.....wwcncwwWWWWWWWWWWWWWWWwwcncww.....x
x.....WwwwwwWWWWWWWWWWWWWWWWWwwwwwW.....x
x.......................................x
x.......................................x
x.......................................x
x<.....................................<x
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
ENDMAP

############################################################################
# Infantry
#
# You will have to battle some battalions where the monsters in the back
# will generally have polearms.
# Loot comes in three stages: money, potions, scrolls. No special weapons and
# armours.
#
NAME:   bailey_polearm_5
ORIENT: encompass
TAGS:   bailey_polearm no_item_gen no_monster_gen
ITEM:   potion of experience ident:type q:1
: item(dgn.loot_potions)
ITEM:   scroll of brand weapon ident:type w:5 / \
        scroll of acquirement ident:type q:1 w:5 /\
        scroll of enchant weapon ident:type q:2
ITEM:   scroll of enchant weapon ident:type /\
        scroll of enchant armour ident:type /\
        scroll of summoning ident:type no_pickup
SUBST:  1 = 11.
SUBST:  2 = 22.
SUBST:  3 = 32.
SUBST:  4 = 43322..
SUBST:  5 = 4333
NSUBST: ! = 1:deee / *:e
NSUBST: ? = 1:fffg / *:g
MONS:   orc warrior ; spear w:5 | trident w:5 | halberd | hand axe | war axe /\
        orc w:110   ; spear w:5 | trident w:5 | halberd | hand axe | war axe
: orc_with_polearm(_G)
: orc_warrior_with_polearm(_G)
: orc_knight_with_polearm(_G)
: bailey_setup(_G)
MAP
cccccccccccccccccccccccccccccccccccccccccccccccccccccc
cc.<.......1cccccccc....1ccccccccc....1ccc..........cc
c......c...12cccccc.....13c.....c.....14+....5......5c
c.....ccc..12c.$$.c..cc.13+.!!!.+..c..14+.......???..c
cA.....G...13+.$$.+..G..13+.!!!.+.....14+.......???.<c
c.....ccc..12c.$$.c..cc.13+.!!!.+..c..14+.......???..c
c......c...12cccccc.....13c.....c.....14+....5......5c
cc.<.......1cccccccc....1ccccccccc....1ccc..........cc
cccccccccccccccccccccccccccccccccccccccccccccccccccccc
ENDMAP

############################################################################
# same loot as polearms 2, other than the bonus javelins
# the player starts right in the middle of a fight
NAME:   bailey_polearm_flooded_kennysheep
ORIENT: encompass
TAGS:   bailey_polearm no_item_gen no_monster_gen no_pool_fixup patrolling
: orc_with_polearm(_G)
: orc_warrior_with_polearm(_G)
MONS:   centaur ; javelin ident:type q:2 | \
            javelin ident:type q:3 . spear | trident | halberd . \
            ring mail | scale mail | chain mail
NSUBST: _ = 8 = 2. / 10 = 1. / *:.
NSUBST: ; = 9 = 22. / 9 = 11. / *:.
NSUBST: ! = 12=11. / *:.
NSUBST: 3 = 8:3 / * = 3..
SUBST:  / = 12
KITEM:  d = manual of armour / manual of fighting / manual of shields /\
            good_item bardiche / good_item executioner's axe /\
            good_item triple sword
KITEM:  e = potion of experience ident:type q:1 / \
            scroll of acquirement ident:type q:1 / \
            scroll of enchant armour ident:type q:3 w:20 / \
            scroll of enchant weapon ident:type q:3 w:20
NSUBST: d = 1:e / * = d|
: bailey_setup(_G)
MAP
   ccccccccccccccccccccccccccccccccccccccccccccc
  ccwwwwwwwwwwwwwwwwwwwcccccccwwwwwwwwwwwwwwwwwcc
 ccwwwwwwwwwwwwwwwwwwwwwccccc____________3......cc
ccwwwwwwww;3;.;3.wwwwwwwwccc_____________.......$c
cwwwwwww..wwwwwww..wwwwwwwc_______Tcccccccccc+cccc
cwwwww..www;.;.;www..wwwwwc____ccccc!!!!!.......wc
cwwww.www.........www.wwwwc___cc!!!!wwwwwwwww...wc
cwwww.w.............w.wwwwc___c!T!www!!!....ww..wcc
cwww.ww.T.........T.ww.wwwc___c!!ww!!wwwwwww....wwcc
cwww3w...;.;.;.;.;...w.wwwc__Tc!ww!www.....www!!.wwcc
cww.ww;.;.wwwwwww.;..ww3wwc__cc!w!ww!!wwwww..ww!!Twwc
cww.w;..wwwWWWWWwww...ccccc__c!ww!w!www...www.ww!$wwc
cww3w.;wwWWwwwwwWwww......+__c!w1ww!w..T.T..ww.w!.$wc
cww....WWwwwdddWWwww......+__c3w!!!!w..<A<.....w..3wc
cww3w.;wwWWwwwwwWwww......+__c!w1ww!w..T.T..ww.w!.$wc
cww.w;..wwwWWWWWwww...ccccc__c!ww!w!www...www.ww!$wwc
cww.ww;.;.wwwwwww.;..ww3wwc__cc!w!ww!!wwwww..ww!!Twwc
cwww.w...;.;.;.;.;...w.wwwc__Tc!ww!www.....www!!.wwcc
cwww.ww.T.........T.ww.wwwc___c!!ww!!wwwwwww....wwcc
cwwww.w.............w.wwwwc___c!T!www!!!....ww..wcc
cwwww.www.........www.wwwwc___cc!!!!wwwwwwwww...wc
cwwwww3.www;.;.;www..wwwwwc____ccccc!!!!!.......wc
cwwwwwww..wwwwwww..wwwwwwwc_______Tcccccccccc+cccc
ccwwwwwwww;3;.;3.wwwwwwwwccc_____________.......$c
 ccwwwwwwwwwwwwwwwwwwwwwccccc____________3......cc
  ccwwwwwwwwwwwwwwwwwwwcccccccwwwwwwwwwwwwwwwwwcc
   ccccccccccccccccccccccccccccccccccccccccccccc
ENDMAP

#6 items and two gold piles for murdering a bunch of gnolls
NAME:   bailey_polearm_gnolls_kennysheep
ORIENT: encompass
TAGS:   bailey_polearm no_item_gen no_monster_gen no_pool_fixup
MONS:   gnoll ; spear | trident | halberd . \
            ring mail | scale mail | chain mail . \
            throwing net | nothing
MONS:   gnoll sergeant ; halberd | glaive | bardiche w:1 . \
            chain mail w:20 | plate armour | crystal plate armour w:1
MONS:   gnoll bouda ; spear | trident | halberd . \
            ring mail | scale mail
MONS:   hound, wolf
KMONS:  R = grum, gnoll sergeant ; halberd . plate armour
ITEM:   any good_item
FTILE:  4't = floor_grass
KFEAT:  ' = floor
NSUBST: _ = 40 = 1... / *:., 2 = 4:2 / * = 2., 3 = 4:3 / * = 3.
NSUBST: R = 1:R22 / *:2, 5 = 2:5 / * = 5..
SUBST:  d = dd|
: bailey_setup(_G)
MAP
xxxxxxxxxxxxxxxxxxxxxxxxxxx
xtttttttttttttttttttttttttx
xttttwwwwwwwwwwwwwwwwwttttx
xtttww'''''''''''''''wwtttx
xtttw'''''''''''''''''wtttx
xtttw''ccccc_3_ccccc''wtttx
xtttw'cc___c___c___cc'wtttx
xtttwcc____+___+____ccwtttx
xtttwc_____c___c_____cwtttx
xtttwcG____cc+cc3___Gcwtttx
xtttwc2___cc_3_cc___2cwtttx
xtttwc___cc2___2cc___cwtttx
xtttwc3__c_______c___cwtttx
xtttwccc+c__$G$__c___cwtttx
xtttwc___c_______c___cwtttx
xtttwc___cc_____cc___cwtttx
xtttwc__55cc___cc55__cwtttx
xtttwcG5255cc+cc5525Gcwtttx
xtttwc2353Rc___cR3532cwtttx
xtttwccccc+c___c+cccccwtttx
xtttw'cddd.c___c.dddc'wtttx
xtttw'cccccc+++cccccc'wtttx
xtttw''''''41.14''''''wtttx
xtttww''''''...''''''wwtttx
xttttwwwwwww...wwwwwwwttttx
xttttt''''''...''''''tttttx
xttttttt''''...''''tttttttx
xtttttttt'''...'ttttttttttx
xttttttttttt.A.tttttttttttx
xtttttttttttt.ttttttttttttx
xtttttttttttt.ttttttttttttx
xtttttttttttt<ttttttttttttx
xxxxxxxxxxxxxxxxxxxxxxxxxxx
ENDMAP

# loosely based on nethack's castle
# loot is 4 of each: weapons, armour, and potions/scrolls
# 1 of each is a guaranteed good item
# along with 1 guaranteed acquirement scroll and 3 gold piles in the bastions
NAME:   bailey_axe_of_yendor_kennysheep
ORIENT: encompass
TAGS:   bailey_axe no_item_gen no_monster_gen no_pool_fixup
: easy_axe_fighter(_G)
: hard_axe_fighter(_G)
KMONS:  3 = orc sorcerer ; war axe | broad axe w:2 | battleaxe w:1 . \
            ring mail | scale mail  / \
        orc high priest ; war axe | broad axe w:2 | battleaxe w:1 . \
            ring mail | scale mail / \
        kobold demonologist w:20 ; war axe | broad axe w:2 | battleaxe w:1 . \
            ring mail | scale mail
KMONS:  4 = electric eel
KITEM:  d = any weapon
KITEM:  D = any weapon good_item
KITEM:  e = any armour
KITEM:  E = any armour good_item
:kitem("f = " .. dgn.loot_potions .. " / " .. dgn.loot_scrolls)
KITEM:  F = scroll of enchant weapon ident:type q:2 / \
            scroll of enchant armour ident:type q:2 / \
            potion of experience ident:type q:1 / \
            scroll of acquirement ident:type q:1 / \
            any good_item book w:30
KITEM:  | = scroll of acquirement ident:type
KITEM:  $ = gold
NSUBST: | = 1:| / *:$
KFEAT:  ^ = zot trap
KFEAT:  B = altar_okawaru
NSUBST: w = 10 = 4w / *:w
NSUBST: 2 = 2:2 / * = 2..
NSUBST: 1 = 6 = 2. / * = 11.
NSUBST: 3 = 2:3 / * = 2
SHUFFLE: defg
NSUBST: d = 1:D
NSUBST: e = 1:E
NSUBST: f = 1:F
SUBST:  g = .
: bailey_setup(_G)
MAP
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwx
xwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwx
xwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwx
xwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwx
xwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwx
xwwwwwwwwccccccWWWWWWWWWWWccccccwwwwwwwwx
xwwwwwwwwc|+1.......<.......1+|cwwwwwwwwx
xwwwwwwwwccc2.ccnncc3ccnncc.2cccwwwwwwwwx
xwwwwwwwwc2...cdd.c...c.eec...2cwwwwwwwwx
xwwwwwwwwc....cdd.c...c.eec....cwwwwwwwwx
xwwwwwwwwc+c+cc+cccG.Gccc+cc+c+cwwwwwwwwx
xwwwwwwwwW.c11c...c.2.c...c11c.Wwwwwwwwwx
xwwwwwwwwW.c11ccc+cG.Gc+ccc11c.Wwwwwwwwwx
xwwwwwwwwW.c11cff.c...c.ggc11c.Wwwwwwwwwx
xwwwwwwwwW.c11cff.c...c.ggc11c.Wwwwwwwwwx
xwwwwwwwwW.c11c+nncc+ccnn+c11c.Wwwwwwwwwx
xwwwwwwwwW.cc+c...1.1.1...c+cc.Wwwwwwwwwx
xwwwwwwwwW.c..c.....B.....c..c.Wwwwwwwwwx
xwwwwwwwwW.c2Gc.....1.....cG2c.Wwwwwwwwwx
xwwwwwwwwW.c1.c....3.3....c.1c.Wwwwwwwwwx
xwwwwwwwwW.c1GcccccccccccccG1c.Wwwwwwwwwx
xwwwwwwwwW.c.1...ccccccc...1.c.Wwwwwwwwwx
xwwwwwwwwW.c.G...c..1..c...G.c.Wwwwwwwwwx
xwwwwwwwwW.c.....c.1.1.c.....c.Wwwwwwwwwx
xwwwwwwwwc+cccc..c..T..c..cccc+cwwwwwwwwx
xwwwwwwwwc....c..+.1.1.+..c....cwwwwwwwwx
xwwwwwwwwc2...c..+.....+..c...2cwwwwwwwwx
xwwwwwwwwccc2.ccccc+++ccccc.2cccwwwwwwwwx
xwwwwwwwwc|+1.c...........c.1+|cwwwwwwwwx
xwwwwwwwwccccccWWWW...WWWWccccccwwwwwwwwx
xwwwwwwwwwwwwwwwwww...wwwwwwwwwwwwwwwwwwx
xwwwwwwwwwwwwwwwwww...wwwwwwwwwwwwwwwwwwx
xwwwwwwwwwwwwwwwwww...wwwwwwwwwwwwwwwwwwx
xwwwwwwwwwwwwwwwwww...wwwwwwwwwwwwwwwwwwx
xwwwwwwwwwwwwwww.........wwwwwwwwwwwwwwwx
xxxxxxxxxxxxxxxxx.......xxxxxxxxxxxxxxxxx
                x.......x
                x.......x
                x...<...x
                x.......x
                xxx...xxx
                  x.A.x
                  xxxxx
ENDMAP

# same loot as minmay_hex_keep, and a similar warlord fight
# slightly more of the loot is outside of the warlord's room
# the warlord fight is a little easier, and the outer fights are harder
NAME:   bailey_axe_bossmonster_kennysheep
ORIENT: encompass
TAGS:   bailey_axe no_item_gen no_monster_gen no_pool_fixup
: item(dgn.loot_potions .. " / " .. dgn.loot_scrolls)
ITEM:   potion of experience ident:type q:1 / \
            scroll of acquirement ident:type q:1
: easy_axe_fighter(_G)
: kobold_axe_returning(_G)
: hard_axe_fighter(_G)
: orc_warlord_with_axe(_G)
: bailey_setup(_G)
SUBST:  1 = 1.., 2 = 22.
NSUBST: 3 = 2:3 / * = 3.
NSUBST: e = 1:e / *:d
MAP
      ccccc         ccccc
     ccd$1cc       cc1$dcc
    ccd...1cc     cc1...dcc
   cc.......ccccccc.......cc
  ccd.G21G...31.13...G12G.dcc
  cd..23...............32..dc
  c$..1.................1..$c
  c...G......c===c......G...c
ttcc......cnncWWWcnnc......cctt
tttcc1....cWWWWWWWWWc....1ccttt
ttt2cc1...cW.G...G.Wc...1cc2ttt
ttt.1ccc+ccc.......ccc+ccc1.ttt
tt1..WWW.cWW.G...G.WWc.WWW..1tt
tt...WWW.cW.........Wc.WWW...tt
t<.2.WWW.cW....<....Wc.WWW.2.<t
tt...WWW.cc..1...1..cc.WWW...tt
tt1..WWW.cW..G...G..Wc.WWW..1tt
ttt..ccc+cW.........Wc+ccc..ttt
ttt2cc1..cW|eG.4.Ge|Wc..1cc2ttt
tttcc....ccWWnnnnnWWcc....ccttt
ttcc......cccn...nccc......cctt
ttc21......1.......1......12ctt
ttc..G..G.............G..G..ctt
ttc21.....................12ctt
ttcc.......................cctt
ttwcc...G...cc+++cc...G...ccwtt
ttwwcc.....cc.....cc.....ccwwtt
ttwwwcc...cc.......cc...ccwwwtt
tttwwwccccc.........cccccwwwttt
ttttwwwwwww....A....wwwwwwwtttt
tttttwwwwww.........wwwwwwttttt
tttttttttttttt.<.tttttttttttttt
ttttttttttttttttttttttttttttttt
ENDMAP

# orcs are holding an elf hostage... but their prisoner isn't happy to see you.
# 6 gold piles, 4 good potions/scrolls, 4 good armours / superb items
NAME:   bailey_polearm_elven_captive_hellmonk
ORIENT: encompass
TAGS:   bailey_polearm no_item_gen no_monster_gen no_pool_fixup
: item(dgn.loot_potions .. " / " .. dgn.loot_scrolls)
ITEM:   any armour good_item no_pickup
: orc_with_polearm(_G)
: orc_warrior_with_polearm(_G)
: orc_knight_with_polearm(_G)
MONS: deep elf pyromancer / deep elf zephyrmancer w:5
SUBST:  1 = 1...
NSUBST: d = 2:$ / 4:d / * = e|
NSUBST: 2 = 2:2 / * = 2..., 3 = 1:3 / * = 2....
FTILE:  -t = floor_grass
: bailey_setup(_G)
MAP
  cccc        cccc
  c$3cccccccccc3$c
  c32..11...11.23c
  cc.11G2332G11.cc
   c.1ccn==ncc1.c
   c..cc....cc..c
   c11c..4...c11c
   c21n..cc..n12c
   c21n..cc..n12c
   c..cddddddc..c
   c..ccddddcc..c
xxxc..cccccccc..c
xxcc...G1..1G...cc
xxc11..........11c  tt
x-c$2cccc++cccc2$ctttt
--cccc--.22.--cccc--ww
--------....-------www
t----t--....------wwww
tttt---c1..1c---wwwwww
ttwwwwwc....cwwwwwwwww
wwwwwwwc....cwwwwwwwtt
wwwwwwwc....cwwwwww-t
wwwwwwwc....cwwww---t
www----c....c------tt
ww------....------tt
t--t-t--....-tt-
tt------....--t-
    ----....----
     --......--
     -........-
     t..A..<..t
     t........t
     tt......tt
      tttttttt
ENDMAP

# vampire castle
# total of 9 items, which may be good potions, good armour, or superb item.
# The vampires themselves will have some good weapons as well.
NAME:    bailey_polearm_vampire_castle_hellmonk
ORIENT:  encompass
TAGS:    bailey_polearm no_item_gen no_monster_gen no_pool_fixup
:item(dgn.loot_potions)
ITEM:    any armour good_item
MONS:    wolf zombie, vampire bat
MONS:    orc zombie, orc warrior zombie
MONS:    gargoyle
MONS:    vampire ; halberd ego:vampirism w:15 | glaive ego:vampirism w:3 \
             | bardiche ego:vampirism w:1 \
             . scale mail | chain mail
NSUBST:  d = 2=d / 2=e / | /  dde|, f = f / f..
NSUBST:  ; = 20=t. / ., - = 4=G / 12=1. / .
NSUBST:  2 = 5=2 / 2., 3 = 6=3 / 3..., 4 = 3=4 / 4., 5 = 5 / G
NSUBST:  ! = 6 / G
SHUFFLE: A<
TILE:    t = dngn_tree_dead, G = dngn_gravestone
COLOUR:  t = w:5 lightgrey / w:5 darkgrey / brown
: dgn.delayed_decay(_G, 'f', 'orc skeleton')
: set_feature_name("tree", "dead tree")
: set_feature_name("granite_statue", "a gravestone")
: bailey_setup(_G)
MAP
   cccccc
  cc!dd!cc
 ccdd..ddcc
 c!..cc..!c
 c..cccc..c
 c..cccc..ccccccccccccc
 c...cc...c5......5cddc
 cc......cc.......5c44c
  cc....cc...ccccccc33c
  ccc++cc..3cc....5c..c
  c......333c......c+cccc
  c5......4........c.2.2c
  ccccccccc....c...c.222c
   c5....4cc..cc...+..2.c
   c.......cccc....+.2.2c
   c..;;;...c43.cccc.22.c
ccccc..;;;..333.c34c....ct
cdf4c.;;;.;;;...c43c+cc+ctt
cfffc.;;;;.;;;..c33..c....tt
cff4c..;;;;;;.;.c....c.---.t
ccc+cc.;;.;;;;;.cccc+c.---.t
  c43c.;.;;;.;;...333c.---.t
  c33+..;;;.;.;;;...3c---.tt
  cccc...;;;;;;;;...cc---.t
   c........;;;.;...c.--..t
   c.........;;;....c.--.tt
   c...x..x........cc.--.t
   c333x..xc+ccccc+c.---.tt
   c...x..xc..333.4c.----.ttt
   c...x33xc4.333..c.----.wwt
 ttc...x..xccccccc+c.---.wwwt
tttccccx..x.............wwwtt
twwwwwwx..xwwwwwwwwwwwwwwwtt
twwwwwwx..xwwwwwwwwwwwwwttt
ttx....x..x....xttttttttt
  xx..........xx
   xxx......xxx
    x........x
    x..A..<..x
    xx......xx
     xxxxxxxx
ENDMAP

# Prince Ribbit's fortress
# If Prince Ribbit has already generated, his attendants have recovered the
# wrong frog by mistake. Whoops!
# Nine items, mostly consumables. Guaranteed broad axes from the vault guards.
NAME:   bailey_axe_froggy_fort_hellmonk
ORIENT: encompass
TAGS:   bailey_axe no_item_gen no_monster_gen no_pool_fixup
: item(dgn.loot_potions .. " / " .. dgn.loot_scrolls)
: easy_axe_fighter(_G)
MONS:   human ; hand axe ego:heavy | war axe . scale mail | ring mail
MONS:   vault guard ; broad axe . chain mail | plate armour
KMONS:  4 = bullfrog
KMONS:  5 = prince ribbit, blink frog / cane toad w:1
KFEAT:  4 = shallow_water
SHUFFLE: AB
SUBST:  ; = W:3 ., B = <
NSUBST: ! = 24 = 1... / 20 = 2... / *:.
NSUBST: W = 36 = 4WWW / *:W
NSUBST: d = 4:d / *=dd*$
: bailey_setup(_G)
MAP
           ccccc
          ccdddcc
          cdd3ddc
          c..5..c
          c.....c
          c..<..c
        ccc.....ccc
       ccwcc...ccWcc
      ccwWWcc+ccWWWcc
      cwWW;;!!!!!WWWc
     ccwWW;;!;;;!!!!cc
     cwWWW;;;;;;Wwww!c
     cwWWW;;;;;Wwccc+c
     cwWWW;;.;WwccW..c
   cccwWWW;;.;WwcW..Wc
  cc!cwWWW;;.Wwcc..Wcc
 cc!!ccwWWW;.Wwcd..Wc
cc!!!!cwWwwW.Wwcd3Wcc
c!!!!!ccwccw.Wwccccc
c!!!!!!ccccw..Wwc
c!!!!!!+!!cw..Wwc
ccc+cccc!!ccc+ccc
ccWWWcc!!!c!!!!!c
cWWWWWc!!!c!!!!!c
cWWWWWc!!!cccc!!c
cWWWWWc!!!!c!!!!c
ccWWc+c+c!!!!!!cc
 cccc...cc!!!!cc
   c.....cccccc
   c.A.B.c
   c.....c
   cc...cc
    ccccc
ENDMAP

# A short but intense spriggan/ogre bailey
# Nine items, with chances for some delicious dragon scales
NAME:   bailey_polearm_enchanted_keep_hellmonk
TAGS:   bailey_polearm no_item_gen no_monster_gen no_pool_fixup
ORIENT: encompass
MONS:   ogre ; halberd | glaive w:3
MONS:   spriggan ; spear | trident
MONS:   two-headed ogre ; halberd | glaive w:3 | bardiche w:1 . \
                          halberd | glaive w:3 | bardiche w:1
KMONS:  D = steam dragon / acid dragon w:3
: item(dgn.loot_potions .. " / " .. dgn.loot_scrolls)
ITEM:   rapier good_item / quarterstaff good_item / lajatang good_item w:5 / \
        broad axe good_item w:5 / scimitar good_item w:5
ITEM:   good_item ice dragon scales w:3 /\
        good_item fire dragon scales w:3 / good_item swamp dragon scales w:3 /\
        good_item acid dragon scales w:3 / good_item steam dragon scales w:3 /\
        good_item quicksilver dragon scales w:3
KFEAT:  D = deep_water
SUBST:  ! = t:20 x c:3, - = t c:30 x
NSUBST: ' = 20 = 1... / 2 = 2... / *:.
NSUBST: " = 1:2 / 12 = 2... / *:., 3 = 1:3 / *:.
NSUBST: d = 1:d / 1:e / 1:ef / * = d:14 e:1 f:1
FTILE:  ;tA< = floor_grass
: bailey_setup(_G)
MAP
      ccccccccc
     ccccccccccc
    ccc"""""""ccc
   ccc''"""""''ccc
  ccc'''"WWW"'''ccc
 ccc''----W----''ccc
ccc''--"""""""--''ccc
cc''--""ttttt""--''cc
cc''-""ttdddtt""-''cc
cc''-""!ddwdd!""-''cc
cc''-""!dwDwd!""-''cc
cc''-""!..w..!""-''cc
cc''-""tt...tt""-''cc
cc''--""t!W!t""--''cc
ccc''--3"""""3--''cc
  cc''--""3""--''cc
   cc''-------''cc
    cc.........cc
     cc.......cc
      ccWWWWWcc
       xWWWWWx
     xxxWWWWWxxx
    xx;;;;;;;;;xx
   xx;;;;;;;;;;;xx
   x;;;;A;;;<;;;;x
   xx;;;;;;;;;;;xx
    xx;;;;;;;;;xx
     xxx;;;;;xxx
       xxxxxxx
ENDMAP
