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

: crawl_require('dlua/vault.lua')

{{
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 kobold_axe_returning(e, glyph)
  e.kmons(glyph .. " = patrolling generate_awake kobold ; boomerang q:2 | \
                                                          boomerang q:1")
end

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

function hard_axe_fighter(e, glyph, no_knight)
  if no_knight == nil then
    no_knight = false
  end
  local axe = "war axe | broad axe w:2 | battleaxe w:1"
  local arm = "ring mail | scale mail | chain mail | plate armour"
  local ow = "orc warrior w:90 ; " .. axe .. " . " .. arm
  local ok = "orc knight ; " .. axe .. " . " .. arm

  if no_knight then
    e.kmons(glyph .. " = " .. ow)
  else
    e.kmons(glyph .. " = " .. ow .. " / " .. ok)
  end
end

function orc_warlord_with_axe(e, glyph)
  e.kmons(glyph .. " = 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, glyph)
  e.kmons(glyph .. " = orc ; spear | trident | halberd . \
                             ring mail | scale mail | chain mail")
end

function orc_warrior_with_polearm(e, glyph)
  e.kmons(glyph .. " = orc warrior ; spear w:5 | trident w:5 | partisan w:1 | \
                                     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, glyph)
  e.kmons(glyph .. " = orc knight ; trident w:5 | partisan w:2 | halberd | \
                                    glaive | bardiche w:1 . \
                                    ring mail | scale mail | chain mail | \
                                    plate armour | crystal plate armour w:1")
end

-- Unused for now.
function orc_warlord_with_polearm(e, glyph)
  e.kmons(glyph .. " = orc warlord ; partisan good_item | glaive good_item | \
                                     bardiche good_item w:1 . chain mail w:20 | \
                                     plate armour | crystal plate armour w:1")
end

function fortress_talisman_chance(e, glyph)
  e.kitem(glyph .. " = fortress talisman")
  e.subst(glyph .. " = " .. glyph .. " .:90")
end
}}

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

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 pre_id q:2 | \
                 boomerang pre_id q:1 / \
        hobgoblin ; boomerang pre_id q:2 | \
                    boomerang pre_id q:1 / \
        orc ; boomerang pre_id q:2 | \
              boomerang pre_id 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 pre_id q:2 | \
               boomerang pre_id 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 moonshine q:2 pre_id
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 pre_id q:1 | \
            boomerang pre_id 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  #
#        #
##########

# TODO: actually sort this file by axes and polearms again.

############################################################################
# Bailey 2.
#
# Apart from weapons and armours left by the monsters, there are about 10
# potions useful in battle. This used to be an axes map; it's polearms now,
# and has been renamed accordingly.
NAME:   bailey_polearm_nasty_gnolls
TAGS:   bailey_polearm no_rotate
ORIENT: encompass
: orc_with_polearm(_G, "1")
KMONS:   2 = gnoll ; halberd ego:draining | halberd ego:electrocution pre_id
KMONS:   3 = orc warrior ; halberd ego:electrocution pre_id . plate armour / \
             orc knight ; halberd . leather armour
KMONS:   4 = goblin rider
KFEAT:  ^ = tyrant's trap
KFEAT:  - = closed_clear_door
NSUBST: d = 1:ddde / *:d, 1 = 7:1 / * = 1., 2 = 6:2 / * = 2.
: item(dgn.loot_potions)
ITEM:   potion of experience pre_id q:1 /\
        scroll of acquirement pre_id q:1
: fortress_talisman_chance(_G, "f")
: 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.fcc ccd....cc
ccc.d2d.ccccc.d.4.ccc
c1+d2U3d+1c1+..Y..+1c
ccc.d2d.ccccc.4.^.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
TAGS:    bailey_axe no_rotate no_item_gen no_monster_gen no_pool_fixup
ORIENT:  encompass
: kobold_axe_returning(_G, "1")
KMONS:   2 = kobold brigand ; war axe . dart ego:poisoned | dart ego:curare w:5
: hard_axe_fighter(_G, "3")
KMONS:   4 = hippogriff
ITEM:    any good_item
ITEM:    dart ego:atropa q:4 / dart ego:datura q:4
: fortress_talisman_chance(_G, "f")
KFEAT:   4 = W
KFEAT:   - = tyrant's trap
KFEAT:   _ = altar_trog / altar_okawaru / altar_makhleb
SHUFFLE: qrs
SUBST:   v : ccv, 2 = 2., ? : -., q = x, r : x.., s = .
NSUBST:  1 = 3:2 / 2:. / * = 1., 3 = 1:3 / 1:. / * = 3.., 4 = 1:4 / 1:4WW / *:W
: 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...q...WWcccccxxx
xxxc1.1.WW.......WW.1.1cxxx
xxxc.ccc4W...r...W4ccc.cxxx
xxxc1.1.WW.......WW.1.1cxxx
xxxc.cccWW...s...WWccc.cxxx
xxxc1.1.WW.......WW.1.1cxxx
xxxc.cccWW...s...WWccc.cxxx
xxxc1.1.WW.......WW.1.1cxxx
xxxc.ccc4W...r...W4ccc.cxxx
xxxc1.1.WW.......WW.1.1cxxx
xxxcccccWW...q...WWcccccxxx
xxxxxxxccW.......Wccxxxxxxx
xxxxxxxxcccc+++ccccxxxxxxxx
xxxxxxxxxcc..f..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
: kobold_axe_returning(_G, "1>")
: easy_axe_fighter(_G, "2")
: hard_axe_fighter(_G, "3", false)
KMONS:   4 = patrolling hippogriff
ITEM:    any good_item
ITEM:    potion of enlightenment pre_id, ring of flight pre_id
ITEM:    pair of boots ego:flying pre_id
: fortress_talisman_chance(_G, "X")
KFEAT:   > = exit_bailey
KFEAT:   ^ = alarm trap
KFEAT:   - = tyrant's trap
NSUBST:  2 = 1:3 / * = 223., 4 = 1:4 / 1:443 / 1:223 / *:.
SUBST:   e : eeef, g:eg
NSUBST:  f = 1:f / *:e
SHUFFLE: EB / XY / XY, CD / zZ / zZ / zZ
SUBST:   zX = c, YZ = +
NSUBST:  E = 1:+ / *:c, C = 1:+ / *:c
SUBST:   BD = c
SUBST:   W = w:2 .:1 W:1, H = W., ~ = W
SUBST:   ? = c., N = nc
SUBST:   1 = 1., ^ = ^^.
#
: bailey_setup(_G)
MAP
ccccccccccccccccccccccccccccccccccccccccccccccccccc
cccccccccccccccccccccccccc..??.d.??d<cccccccccccccc
ccccccccccccccccccccccccc.??..???.e?ccccccccccccccc
ccccccccccccccccccccccccc2ccccccccccccccccccccccccc
ccccccccccccc14.........1.1........1ccccccccccccccc
cccccccccc1.......111ccccccccc1......cccccccccccccc
ccccccccc4...2....c+cc..e3eX.ccccCc..cccccccccccccc
cccccccc1...2T2...+..c.2.d.2.c21CdC..1ccccccccccccc
ccccccccc1...2..cEc..c.2.2.2.c.2cDc...1cccccccccccc
ccccccccccc.....EdB4.ccnc+cncc.4+dc..Wwwwwwwxxxxxxx
cccccccccc......cEc...^.....^...ccc.Wwwwwwwxxxxxxxx
xxxxxwwwwwwwW...wwc1.ccnc+cncc.1c1.wwwwwwwxxxxxxxxx
xxxxxxxwwwwwww~wwwcncc2.2.2.2ccncwwwwwwxxxxxxxxxxxx
xxxxxxxxx....~w~wwww>c.2.g.2.c>wwwwwxxxxxxxxxxxxxxx
xxxxxxxxxx......Wwwwwcccccccccwwwwxxxxxxxxxxxxxxxxx
xxxxxxxxxxx.......Wwwwwwwwwwwwwwxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxx.......WwwwwwwwwWxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxx.....ww......xxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxx...w~..<.xxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxx.~w....xxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxx.....xxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxx.-.xxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxx.-.xxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxx.....xxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxx.......xxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxx....A....xxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxx.........xxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxx.......xxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxx...xxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
ENDMAP

NAME:   bailey_axe_minmay_hex_keep
TAGS:   bailey_axe no_item_gen no_monster_gen
ORIENT: encompass
# 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
: easy_axe_fighter(_G, "1")
: hard_axe_fighter(_G, "2", false)
: orc_warlord_with_axe(_G, "3")
: item(dgn.loot_scrolls .. " / " .. dgn.loot_potions)
ITEM:   potion of experience pre_id q:1 /\
        scroll of acquirement pre_id q:1
: fortress_talisman_chance(_G, "f")
: bailey_setup(_G)
KFEAT:  C = c
SUBST:  I = t., 1 = 11.
NSUBST: 2 = 3:2 / * = 2.
TILE:   C = stone_smooth_wall_beogh
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...f...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
TAGS:   bailey_polearm no_rotate no_pool_fixup no_monster_gen
ORIENT: encompass
NSUBST: D = 1:+ / *:c
NSUBST: E = 1:+ / *:c
: orc_with_polearm(_G, "1")
: orc_warrior_with_polearm(_G, "2")
: orc_knight_with_polearm(_G, "3")
KMONS:  4 = goblin rider
NSUBST: 4 = 1:4 / 1:442 / *:1
NSUBST: ? = 1:334 / 1:224 / 1:. / * = 22222..
SUBST:  1 = 1 2:1 .
ITEM:   good_item crystal plate armour / good_item plate armour w:20 /\
        good_item golden 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
: fortress_talisman_chance(_G, "f")
: bailey_setup(_G)
MAP
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xA<xxxxxxxxxx.........xxxxxxxxxxxxx
xx..xxxxxxxx..WWWWWWW..xxxxxxxxxxxx
x..xxxxxxxx..WW.141.WW..xxxxxxxxxxx
xx..xxxxxx..WW..ccc..WW..xxxxxxxxxx
x..........WW.1ccfcc1.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....?cc1W.x
x.W..nc.$.cc..lll.lll..EE...cn..W.x
x.WW1.cc.cc..ll..?..ll..Ec.cc.1WW.x
x<.WW..c+c..ll?..T..?ll..c+c..WW.xx
xx.WW.4c+c......T<T......c+c4.WW.<x
x.WW1.cc.cD..ll?...?ll..cc.cc.1WW.x
x.W..cc...DD..lll.lll..cc.$.cc..W.x
x.W1cc?....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.141.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
TAGS:   bailey_polearm no_rotate no_pool_fixup no_monster_gen
ORIENT: encompass
MONS:   orc warrior w:5 ; arbalest  . ring mail | scale mail / \
        orc ; arbalest . ring mail | scale mail
: orc_with_polearm(_G, "2")
: orc_warrior_with_polearm(_G, "3")
: orc_knight_with_polearm(_G, "4")
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 pre_id q:1 / \
        scroll of acquirement pre_id q:1 /\
        scroll of enchant armour pre_id q:2 / \
        scroll of enchant weapon pre_id q:3
: fortress_talisman_chance(_G, "f")
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+2vf4.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
TAGS:   bailey_polearm no_item_gen no_monster_gen
ORIENT: encompass
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, "2")
: orc_warrior_with_polearm(_G, "3")
: orc_knight_with_polearm(_G, "4")
KMONS:  R = goblin rider
ITEM:   potion of experience pre_id q:1
: item(dgn.loot_potions)
ITEM:   scroll of brand weapon pre_id w:5 / \
        scroll of acquirement pre_id q:1 w:5 /\
        scroll of enchant weapon pre_id q:2
ITEM:   scroll of enchant weapon pre_id /\
        scroll of enchant armour pre_id /\
        scroll of summoning pre_id no_pickup
: fortress_talisman_chance(_G, "h")
KFEAT:  C = cache_of_meat
SUBST:  1 = 11., 2 = 22., 3 = 32.
SUBST:  4 = 43322.., 5 = 4333, 4 : 4R, C : CC.
NSUBST: ! = 1:deee / *:e
NSUBST: ? = 1:fffg / *:g
: bailey_setup(_G)
: decorative_floor(_G, 'B', "orcish standard")
MAP
cccccccccccccccccccccccccccccccccccccccccccccccccccccc
cc.<.......1cccccccc....1ccccccccc....1ccc.........Ccc
c.....Bc...12cccccc.....13c.....c.....14+....5......5c
c.....ccc..12c.$$.c..cc.13+.!!!.+..c..14+.......???..c
cA.....G...13+.$$.+..G..13+.!!!.+......4+......h???.<c
c.....ccc..12c.$$.c..cc.13+.!!!.+..c..14+.......???..c
c.....Bc...12cccccc.....13c.....c.....14+....5......5c
cc.<.......1cccccccc....1ccccccccc....1ccc.........Ccc
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
TAGS:   bailey_polearm no_item_gen no_monster_gen no_pool_fixup patrolling
ORIENT: encompass
: orc_with_polearm(_G, "1")
: orc_warrior_with_polearm(_G, "2")
KMONS:  3 = centaur ; javelin pre_id q:2 | javelin pre_id q:3 . \
                      spear | trident | halberd . \
                      ring mail | scale mail | chain mail
KMONS:  4 = goblin rider ; mundane spear . javelin q:1
NSUBST: _ = 7 = 2. / 10 = 1. / *:.
NSUBST: ; = 8 = 22. / 9 = 11. / *:.
NSUBST: ! = 12=11. / *:.
NSUBST: 3 = 7:3 / * = 3.., 4 = 1:43 / *:.
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 pre_id q:1 / \
            scroll of acquirement pre_id q:1 / \
            scroll of enchant armour pre_id q:3 w:20 / \
            scroll of enchant weapon pre_id q:3 w:20
: fortress_talisman_chance(_G, "f")
NSUBST: d = 1:e / * = d|
: bailey_setup(_G)
MAP
   ccccccccccccccccccccccccccccccccccccccccccccc
  ccwwwwwwwwwwwwwwwwwwwcccccccwwwwwwwwwwwwwwwwwcc
 ccwwwwwwwwwwwwwwwwwwwwwccccc____________3......cc
ccwwwwwwww;3;4;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.c.www.ww!$wwc
cww3w.;wwWWwwwwwWwww......+__c!w1ww!w..T.T..ww.w!.$wc
cwwf4..WWwwwdddWWwww..c...+__c3w!!!!w..<A<.....w..3wc
cww3w.;wwWWwwwwwWwww......+__c!w1ww!w..T.T..ww.w!.$wc
cww.w;..wwwWWWWWwww...ccccc__c!ww!w!www.c.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;4;3.wwwwwwwwccc_____________.......$c
 ccwwwwwwwwwwwwwwwwwwwwwccccc____________3......cc
  ccwwwwwwwwwwwwwwwwwwwcccccccwwwwwwwwwwwwwwwwwcc
   ccccccccccccccccccccccccccccccccccccccccccccc
ENDMAP

# 6 items and two gold piles for murdering a ton of gnolls
NAME:   bailey_polearm_gnolls_kennysheep
TAGS:   bailey_polearm no_item_gen no_monster_gen no_pool_fixup
ORIENT: encompass
MONS:   gnoll ; spear | trident | halberd . \
                ring mail | scale mail | chain mail . \
                throwing net | nothing
MONS:   gnoll sergeant ; halberd | glaive w:11 | partisan w:1 | 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
: fortress_talisman_chance(_G, "e")
FTILE:  4't = floor_grass_dark
KFEAT:  ' = floor
NSUBST: - = 2:1 / 27 = 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
xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xtttttttttttttttttttttttttttx
xttttwwwwwwwwwwwwwwwwwwwttttx
xtttww'''''''''''''''''wwtttx
xtttw'''''''''''''''''''wtttx
xtttw''cccccc-3-cccccc''wtttx
xtttw'cc---c-----c---cc'wtttx
xtttwcc----+--<--+---3ccwtttx
xtttwc-----c-----c-----cwtttx
xtttwcG---cccc+cccc.--Gcwtttx
xtttwc2--ccc--3--ccc--2cwtttx
xtttwc---cc2-----2cc---cwtttx
xtttwc---cc-------cc---cwtttx
xtttwc3--cc---e---cc---cwtttx
xtttwccc+cc--$G$--cc---cwtttx
xtttwc---cc-------cc---cwtttx
xtttwc---cc-------cc---cwtttx
xtttwc---ccc-----ccc---cwtttx
xtttwc55--ccc---ccc--55cwtttx
xtttwcG5255ccc+ccc5525Gcwtttx
xtttwc2353Rcc...ccR3532cwtttx
xtttwccccc+c.....c+cccccwtttx
xtttw'cddd.cc...cc.dddc'wtttx
xtttw'ccccccc+++ccccccc'wtttx
xtttw'''''''41.14'''''''wtttx
xtttww'''''''...'''''''wwtttx
xttttwwwwwwww...wwwwwwwwttttx
xttttt'''''''...'''''''tttttx
xttttttt'''''...'''''tttttttx
xtttttttt''''...''ttttttttttx
xtttttttttttt.A.ttttttttttttx
xttttttttttttt.tttttttttttttx
xtttttttttttt...ttttttttttttx
xttttttttttttt<tttttttttttttx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
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
TAGS:    bailey_axe no_item_gen no_monster_gen no_pool_fixup
ORIENT:  encompass
: easy_axe_fighter(_G, "1")
: hard_axe_fighter(_G, "2")
: local wm = "war axe | broad axe w:2 | battleaxe w:1 . scale mail | ring mail"
: kmons("3 = orc sorcerer ; " .. wm .. " / orc high priest ; " .. wm .. " / " ..
:           "kobold demonologist w:20 ; " .. wm)
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 pre_id q:2 / \
             scroll of enchant armour pre_id q:2 / \
             potion of experience pre_id q:1 / \
             scroll of acquirement pre_id q:1 / \
             any good_item book w:30
KITEM:   h = stone q:1 no_pickup
KITEM:   | = scroll of acquirement pre_id
KITEM:   $ = gold
: fortress_talisman_chance(_G, "i")
KFEAT:   ^ = zot trap
KFEAT:   B = altar_okawaru
KFEAT:   g = cache_of_meat
KFEAT:   4 = w
NSUBST:  | = 1:| / *:$
NSUBST:  w = 1:4 / 6 = 4w / *:w
NSUBST:  2 = 2:2 / * = 2.., 1 = 5 = 2. / 2:. / * = 11., 3 = 2:3 / * = 2
SHUFFLE: defg
NSUBST:  d = 1:D / *:d, e = 1:E / *:e, f = 1:F / *:f, g = 2:gh / *:h
: 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.....c+cc.Wwwwwwwwwx
xwwwwwwwwW.c..c.....B.....c..c.Wwwwwwwwwx
xwwwwwwwwW.c2Gc.....1.....cG2c.Wwwwwwwwwx
xwwwwwwwwW.c1.c1...3i3...1c.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
TAGS:   bailey_axe no_item_gen no_monster_gen no_pool_fixup
ORIENT: encompass
: easy_axe_fighter(_G, "1")
: kobold_axe_returning(_G, "2")
: hard_axe_fighter(_G, "3")
KMONS:  4 = hippogriff
: orc_warlord_with_axe(_G, "5")
: item(dgn.loot_potions .. " / " .. dgn.loot_scrolls)
ITEM:   potion of experience pre_id q:1 / scroll of acquirement pre_id q:1
: fortress_talisman_chance(_G, "f")
KFEAT:  C = c
: bailey_setup(_G)
SUBST:  1 = 1.., 2 = 22.
NSUBST: 3 = 2:3 / 1:344... / * = 3.
NSUBST: e = 1:e / *:d
TILE:   C = stone_smooth_wall_beogh
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.f.G..Wc.WWW..1tt
ttt..ccc+cW.........Wc+ccc..ttt
ttt2cc1..cW|eG.5.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
TAGS:   bailey_polearm no_item_gen no_monster_gen no_pool_fixup
ORIENT: encompass
: orc_with_polearm(_G, "1")
: orc_warrior_with_polearm(_G, "2")
: orc_knight_with_polearm(_G, "3")
KMONS:  4 = deep elf pyromancer ; robe . falchion / \
            deep elf zephyrmancer w:5 ; damaged robe . dagger
: item(dgn.loot_potions .. " / " .. dgn.loot_scrolls)
ITEM:   any armour good_item no_pickup
: fortress_talisman_chance(_G, "f")
SUBST:  1 = 1...
NSUBST: d = 2:$ / 4:d / * = e|
NSUBST: 2 = 2:2 / * = 2..., 3 = 1:332 / * = 2....
FTILE:  -t = floor_grass_dark
: bailey_setup(_G)
MAP
  cccc        cccc
  c$3cccccccccc3$c
  c32..11...11.23c
  cc.11G2332G11.cc
   c.1ccn==ncc1.c
   c.ccc....ccc.c
   c11c..4...c11c
   c21n..cc..n12c
   c21n$.cc.fn12c
   c..cddddddc..c
   c.cccddddccc.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_axe_vampire_castle_hellmonk
TAGS:    bailey_axe no_item_gen no_monster_gen no_pool_fixup
ORIENT:  encompass
MONS:    wolf zombie, vampire bat
MONS:    orc zombie, spectral orc warrior
MONS:    wyvern zombie, gargoyle ; war axe | broad axe w:2
MONS:    vampire ; war axe ego:vampirism w:15 | broad axe ego:vampirism w:2 | \
                   battleaxe ego:vampirism w:1 | executioner's axe ego:vampirism w:1 . \
                   ring mail | scale mail | chain mail
: item(dgn.loot_potions)
ITEM:    any armour good_item
KITEM:   f = orc skeleton
: fortress_talisman_chance(_G, "g")
NSUBST:  d = 2:d / 2:e / 1:| / * = dde|, f = 1:f / f..
NSUBST:  ; = 20 = t. / *:., - = 4:G / 2:1 / 9 = 1. / *:.
NSUBST:  2 = 5:2 / * = 2., 3 = 6:3 / 2:. / * = 3..., 4 = 2:4 / 2:5 / * = 4.
NSUBST:  6 = 1:6 / *:G, ! = 1:7 / *:G
SHUFFLE: A<
TILE:    t = dngn_tree_dead
COLOUR:  t = brown
: set_feature_name("tree", "dead tree")
: vault_granite_statue_setup(_G, "G", "gravestone")
: bailey_setup(_G)
MAP
   cccccc
  cc!dd!cc
 ccdd..ddcc
 c!..cc..!c
 c$.cccc.gc
 c..cccc..ccccccccccccc
 c...cc...c6......5cddc
 cc......cc.......5c44c
  cc....cc...ccccccc33c
  ccc++cc..3cc....5c..c
  c......333c......c+cccc
  c6......4........c.2.2c
  ccccccccc....c...c.222c
   c6....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
TAGS:   bailey_axe no_item_gen no_monster_gen no_pool_fixup
ORIENT: encompass
: easy_axe_fighter(_G, "1")
KMONS:  2 = human ; hand axe ego:heavy | war axe . scale mail | ring mail
KMONS:  3 = vault guard ; broad axe . chain mail | plate armour
KMONS:  4 = bullfrog
KMONS:  5 = prince ribbit, blink frog / cane toad w:1
KMONS:  6 = hippogriff
: item(dgn.loot_potions .. " / " .. dgn.loot_scrolls)
: fortress_talisman_chance(_G, "g")
KFEAT:  46 = shallow_water
SHUFFLE: AB
SUBST:  ; = W:3 ., B = <
NSUBST: ! = 24 = 1... / 20 = 2... / *:.
NSUBST: W = 32 = 4WWW / *:W, ? = 1:6W / *:W
NSUBST: d = 4:d / *=dd*$
: bailey_setup(_G)
MAP
           ccccc
          ccdddcc
          cdd3ddc
          c..5..c
          c.....c
          c..<..c
        ccc.....ccc
       ccwcc...cc?cc
      ccw??cc+ccWW?cc
      c?WW;;....!WW?c
     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 w:16 | trident w:16 | partisan w:1
MONS:   two-headed ogre ; halberd | glaive w:3 | bardiche w:1 . \
                          halberd | glaive w:3 | bardiche w:1
MONS:   goblin rider ; spear good_item
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 / partisan 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
: fortress_talisman_chance(_G, "g")
KFEAT:  C = cache_of_fruit / cache_of_baked_goods w:4
KFEAT:  D = deep_water
SUBST:  C : CC., ! = t:20 x c:3, - = t c:30 x
NSUBST: ' = 1:1 / 15 = 1... / 2 = 2... / *:.
NSUBST: " = 1:2 / 8 = 2... / *:., 3 = 1:3334 / *:.
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''-""!C.w.C!""-''cc
cc''-""tt.g.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
