###############################################################################
# vaults.des: Entries to the Vaults branch.
#
# Note the regular (mini)vaults are no longer in vaults.des, they have been
# moved to mini.des, float.des and large.des. Portal vaults live in portal.des.
###############################################################################

{{
  -- Vault:8 common loot substitutions
  function vault8_loot(e)
    e.subst("? = | * .:40 ^:3")
    e.subst("| = | *:2")
    e.subst("* = * |:2")
  end

  -- Vault:8 cross-vault rune subsitution
  -- Turn 'O' into a rune (if it doesn't exist yet) or a good item
  function vault8_rune(e)
    if dgn.map_by_tag("vault8_rune") then
      e.subvault("O : vault8_rune")
    else
      e.subvault("O : vault8_norune")
    end
  end
}}

##############################################################################
# Vaults entries
##############################################################################
# Dummy Vaults entry

NAME:   vaults_0_dummy
TAGS:   vault_entry
WEIGHT: 60
ORIENT: float
MAP
O
ENDMAP

##############################################################################
# Generic Vaults entry
#
NAME:    david_vaults_1
TAGS:    vault_entry
MONS:    weight:20 nothing / weight:30 human / necromancer / wizard
ORIENT:  float
SHUFFLE: !=
SUBST:   ! = x
SUBST:   ' : cxv
MAP
xxxxx.@.'''''
x...+...'...'
x...x...'...'
x!x=x111'...'
@.x.x111+.O.'
x.x.x111'...'
x.x.x...'...'
x.+.x...'...'
xxxxx.@.'''''
ENDMAP

##############################################################################
# Vault monsters near stair
#
NAME: david_vaults_2
TAGS: vault_entry
MONS: weight:40 nothing / weight:30 yaktaur / yaktaur captain
MONS: weight:70 nothing / weight:40 ogre / weight:20 two-headed ogre / ogre mage
MONS: weight:100 nothing / shapeshifter
SHUFFLE: 123
ORIENT:  float
MAP
1111..@......
111..........
111..........
1............
@.....O.....@
.............
.............
.............
....@........
ENDMAP

##############################################################################
# Vaults patterns 0: vanguard
#
NAME:    david_vaults_3
TAGS:    vault_entry
ORIENT:  float
MONS:    human, human / Donald, human / human / Norris, human / Wayne
SHUFFLE: 2345
MAP
@..........@
....1131....
...1....1...
..1......1..
..2..O{..1..
..1..()..4..
..1......1..
...1....1...
....1511....
@..........@
ENDMAP

##############################################################################
# Vaults patterns I
#
NAME:    david_vaults_4
TAGS:    vault_entry
ORIENT:  float
SHUFFLE: 123456
MONS:    dragon / golden dragon / ice dragon / iron dragon / shadow dragon /\
         storm dragon
MONS:    freezing wraith / shadow wraith / wight / wraith
MONS:    deep troll / iron troll / rock troll / troll
MONS:    cyclops / ettin / fire giant / frost giant / hill giant /\
         stone giant / titan
MONS:    necromancer / shapeshifter / vault guard / wizard
MONS:    nothing
MONS:    shapeshifter / weight:30 nothing
SUBST:   1=.1, 2=.2, 3=.3, 4=.4, 5=.5, *:*.%
SUBST:   x : xcv
MAP
@..........@
.xxxxxxxxxx.
.x..12345.x.
.x.xxxxx..x.
.x.x***x..x.
.x.+**Ox..x.
.xxxxxxx..x.
...777....x.
.xx...xxxxx.
@..........@
ENDMAP

##############################################################################
# Vaults patterns II
#
NAME:   david_vaults_5
TAGS:   vault_entry
ORIENT: float
SUBST:  ! : ! .
SUBST:  ? : ? .
SUBST:  ? = .:30 0:10 9:4 8:1 %:10 *:4 |:1
SUBST:  ! = .:30 0:10 9:4 8:1 %:10 *:4 |:1
MAP
xxxxxxxxxxxxxx
xOx!x!x?x!x?xx
xx!x?x!x!x?x!x
x!x!x!x?x!x?xx
xx?x!x?x?x?x!x
x!x?x.x.x.x.xx
xx?x?x.x.x.x.x
x?x?x!x?x.x.xx
xx!x!x!x?x.x.x
xxxxxxxxxxxxx@
ENDMAP

##############################################################################
# The Guard of Blades
#
NAME:    erik_vaults_1
TAGS:    vault_entry
MONS:    dancing weapon
ORIENT:  float
SHUFFLE: vcxxx
MAP
.............
.............
.....v.v.....
....vvvvv....
.....1O1.....
....vvvvv....
.....v.v.....
.............
.............
ENDMAP

##############################################################################
# Above As Below
#
NAME:    erik_vaults_2
TAGS:    vault_entry
MONS:    vault guard
ORIENT:  float
SHUFFLE: vxxx, bcc
MAP
vvvvvv.vvvvvv
vvvvvv.vvvvvv
vvvvbb.bbvvvv
vvvvb111bvvvv
.....1O1.....
vvvvb111bvvvv
vvvvbb.bbvvvv
vvvvvv.vvvvvv
vvvvvv.vvvvvv
ENDMAP

##############################################################################
# Vaults specific vaults
##############################################################################

##############################################################################
# Jelly drop Vaults version
#
NAME:   lemuel_jelly_drop_b
MONS:   jelly
TAGS:   uniq_jelly_drop no_wall_fixup
WEIGHT: 5
KFEAT:  a = teleport trap
DEPTH:  Vault
MAP
vvvvvvvvvvvv
vvv......vvv
vv.vvvvvv.vv
v1v.....vv.v
vvvvvvvv.v.v
vav111111vav
v.v.vvvvvvvv
v.vv.....v1v
vv.vvvvvv.vv
vvv......vvv
vvvvvvvvvvvv
ENDMAP

##############################################################################
# The Hell Knights are playing the Vault tonight. Rock! \m/ (Shiori)
#
NAME:   metal_show
ORIENT: float
DEPTH:  Vault:3-7
TAGS:   no_secret_doors no_monster_gen no_item_gen no_wall_fixup
COLOUR: M = magenta
COLOUR: K = magenta
FTILE:  M = floor_rough_red, K = floor_rough_red, # = floor_rough_red
MARKER: # = lua:fog_machine{\
            pow_max = 15, delay_min = 100, delay_max = 150, \
            size = 1, size_buildup_amnt = 10, \
            size_buildup_time = 1000 }
KFEAT:  # = fountain_blood
# the talent:
: if crawl.one_chance_in(10) then
NSUBST: M = M / K.
: else
SUBST:  M = .
: end
KMONS:  K = patrolling hell knight
KMONS:  M = patrolling Margery
# the staff-- manager and bartender:
KMONS:  S = human; robe
# the bouncers:
KMONS:  B: iron troll / cyclops / stone giant / minotaur / vault guard
# the fans:
SUBST:  F = 011112223334455679.........
MONS:   human; leather armour|ring mail . knife|club|ankus|whip|nothing
MONS:   elf; robe|leather armour . w:24 quarterstaff|w:1 lajatang|w:75 nothing
# these are Sludge Elves.
MONS:   ghoul / necrophage / rotting hulk / vampire
MONS:   wizard / necromancer
MONS:   big kobold / kobold demonologist
MONS:   deep elf fighter / w:5 deep elf knight / w:3 deep elf mage /\
        w:2 deep elf priest
MONS:   Ijyb / Blork the Orc / Urug / Erolcha / Snorg / Terence / Jessica /\
        Sigmund / Psyche / Erica / Norbert / Agnes / Maud / Louise / Rupert /\
        Wayne / Duane / Norris / goblin
KITEM:  ! = any potion / potion of confusion, \
            any potion / potion of paralysis, any potion / potion of slowing
KITEM:  $ = q:132 gold / q:66 gold / q:33 gold
MAP
@...............
.vvvvvvvvvvvvv..
.v!+.MMMM.+S$v...
.v!v.KKKK.v$$vF...
.vvvv#MM#vvvvvFF..
.v..FFFFFFvFFvFF..
.v!mFvFFvFvFF+BF..
.v!mFFFFFFvFFvFF..
.v!mFFFFFFvFF+BF..
.v!mFvFFvFvFFvFF..
.v!mFFFFFFvFF+BF..
.vSmFFFFFFvFFvFF..
.vvvvvBBvvvFFvFF..
.vFFFFFFFFFFFvF..
.vvvvvvvvvvvvv..
@...............
ENDMAP

###############################################################################
# The Teleporter! There's some nice loot, but you'll have to fight your way to
# it.
NAME:       the_teleporter
{{
-- Find the slave of the teleporter and move to it.
local function teleporter (data, triggerable, triggerer, marker, ev)
  local position = dgn.point(marker:pos())
  my_slaves = dgn.find_marker_positions_by_prop("teleport_spot",
    data.teleport_spot)

  if you.teleport_to(my_slaves[1].x, my_slaves[1].y, true) then
    crawl.mpr("Your surroundings suddenly seem different!")
  else
    crawl.mpr("There is a strange hissing noise.")
  end
end

-- Lua marker magic!
local m_marker = TriggerableFunction:new {
  func=teleporter,
  data = {teleport_spot=1},
  repeated=true }
local e_marker = TriggerableFunction:new {
  func=teleporter,
  data = {teleport_spot=2},
  repeated=true }
m_marker:add_triggerer(DgnTriggerer:new { type="player_move" })
e_marker:add_triggerer(DgnTriggerer:new { type="player_move" })

lua_marker('M', m_marker)
lua_marker('E', e_marker)

-- And the slaves.
lua_marker('e', portal_desc { teleport_spot=1})
lua_marker('m', portal_desc { teleport_spot=2})
}}
ORIENT:     float
DEPTH:      Vault:3-7
TAGS:       no_secret_doors no_monster_gen no_item_gen uniq_the_teleporter \
            patrolling
COLOUR:     ME = yellow
MONS:       iron golem / crystal golem / stone golem
TILE:       EM = dngn_the_teleporter_vaults
SUBST:      EM = .
SUBST:      em = U
MARKER:     v = lua:props_marker { veto_shatter="veto" }
MAP
.........                                   .........
.vvvvvvv.                                   .ccccccc.
.vvvEvvv.                                   .cccMccc.
.vvv+vvv.                                   .ccc+ccc.
.vU...Uv.                                   .c00100c.
.v.|*|.v.                                   .c01m10c.
.v.*e*.v.                                   .c00100c.
.v.|*|.v.                                   .ccc+ccc.
.vU...Uv.                                   ...@@@...
.vvvvvvv.
.........
ENDMAP

##############################################################################
# Vaults:8 last level of the vaults -- dungeon.cc will change all these 'x's
##############################################################################
#
# This map traditionally allows controlled teleports. Even with the now
# random placement of the rune, this seems fine: some of the spots are
# awkward to reach via teleport, and there is now always a monster on the
# rune.
#
# Vaults:8 extensively uses subvaults. To provide another Vault:8 quadrant
# variation, create a map tagged vault8_quadrant that is 27x24. It should
# have three blank cells on one corner (see any existing quadrant for an
# example), which will be used to orient that corner towards the middle of
# the map. Each quadrant must be capable of generating a rune, which
# should be done by placing an 'O' glyph and calling vault8_rune(_G).
#
# There is a lot of variance among the possible quadrants but we do ensure
# that (exactly) one quadrant with rich loot is generated.

###############################################################################
# The main vault for Vault:8.
#
NAME:     vaults_vault
PLACE:    Vault:8
ORIENT:   encompass
TAGS:     no_rotate no_dump
SUBVAULT: A : vault8_quadrant_prize
SUBVAULT: B : vault8_quadrant
SUBVAULT: C : vault8_quadrant
SUBVAULT: D : vault8_quadrant
SUBST:    ABCD = .
MONS: vault guard
{{
  local detail = "is etched with murals depicting, in great and gruesome "..
"detail, exactly what will be done to anyone caught stealing from the "..
"Vaults. It makes you feel queasy."

  dgn.set_feature_desc_short("metal wall", "heavily etched metal wall")
  dgn.set_feature_desc_long("metal wall", "This metal wall " .. detail)

  dgn.set_feature_desc_short("wall of green crystal",
                             "heavily etched wall of green crystal")
  dgn.set_feature_desc_long("wall of green crystal",
                            "This wall of green crystal " .. detail)
}}
MAP
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxx..............................................................xxxx
xxxx..............................................................xx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A....BBBBBBBBBBBBBBBBBBBBBBBBBBB..xxxx
xxxx..AAAAAAAAAAAAAAAAAAAAAAAAAAA....BBBBBBBBBBBBBBBBBBBBBBBBBBB..xxxx
xxxx..AAAAAAAAAAAAAAAAAAAAAAAAAAA....BBBBBBBBBBBBBBBBBBBBBBBBBBB..xxxx
xxxx..AAAAAAAAAAAAAAAAAAAAAAAAAAA....BBBBBBBBBBBBBBBBBBBBBBBBBBB..xxxx
xxxx..AAAAAAAAAAAAAAAAAAAAAAAAAAA....BBBBBBBBBBBBBBBBBBBBBBBBBBB..xxxx
xxxx..AAAAAAAAAAAAAAAAAAAAAAAAAAA.11.BBBBBBBBBBBBBBBBBBBBBBBBBBB..xxxx
xxxx..AAAAAAAAAAAAAAAAAAAAAAAAAA.1111.BBBBBBBBBBBBBBBBBBBBBBBBBB..xxxx
xxxx..AAAAAAAAAAAAAAAAAAAAAAAAA.1....1.BBBBBBBBBBBBBBBBBBBBBBBBB..xxxx
xxxx...........................1..(<..1...........................xxxx
xxxx..........................11.[..{.11..........................xxxx
xxxx...........................1..<<..1...........................xxxx
xxxx............................1....1............................xxxx
xxxx..CCCCCCCCCCCCCCCCCCCCCCCCC..1111..DDDDDDDDDDDDDDDDDDDDDDDDD..xxxx
xxxx..CCCCCCCCCCCCCCCCCCCCCCCCCC..11..DDDDDDDDDDDDDDDDDDDDDDDDDD..xxxx
xxxx..CCCCCCCCCCCCCCCCCCCCCCCCCCC....DDDDDDDDDDDDDDDDDDDDDDDDDDD..xxxx
xxxx..CCCCCCCCCCCCCCCCCCCCCCCCCCC....DDDDDDDDDDDDDDDDDDDDDDDDDDD..xxxx
xxxx..CCCCCCCCCCCCCCCCCCCCCCCCCCC....DDDDDDDDDDDDDDDDDDDDDDDDDDD..xxxx
xxxx..CCCCCCCCCCCCCCCCCCCCCCCCCCC....DDDDDDDDDDDDDDDDDDDDDDDDDDD..xxxx
xxxx..CCCCCCCCCCCCCCCCCCCCCCCCCCC....DDDDDDDDDDDDDDDD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CCCCCCCCCCCCCCC....DDDDDDDDDDDDDDDDDDDDDDDDDDD..xxxx
xxxx..............................................................xxxx
xxxx..............................................................xxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
ENDMAP


##############################################################################
# Vault:8 - the subvault used to place the rune.
#
# Used by the 'vault8_rune()' function in the prelude.
#
NAME:  vault8_rune
TAGS:  vault8_rune
KMONS: O = 8 / 9
KITEM: O = silver rune of Zot
MAP
O
ENDMAP

##############################################################################
# Vault:8 - the subvault used for potential rune locations that do not
# contain the real rune.
#
# Used by the 'vault8_rune()' function in the prelude.
#
NAME:  vault8_norune
TAGS:  vault8_norune allow_dup
KMONS: o = 8 / 9
: if crawl.random2(13) == 12 then
KFEAT:   o = any shop
: else
KITEM:   o = any good_item
: end
MAP
o
ENDMAP

##############################################################################
# Vault:8 - Rooms Quadrant
#
# This quadrant uses a subvault for each room. Any subvault tagged
# vault8_room_rune should be guaranteed to provide a rune. Any subvault
# tagged vault8_room should just provide loot. Note that the rooms
# are not all the same sizes.
#
# about 24 |
NAME:     vault8_rooms
TAGS:     vault8_quadrant_prize
SHUFFLE:  AC/BD, EG/FH, IKN/MJL
SUBST:    A=., B=xx=, C=+, D=x, E=+, F=xx=, G=., H=x
SUBST:    I=., M=xx=, J=x, K=+, N=+, L=xx=
SUBST:    a:x.
SHUFFLE:  VXYZ
SUBVAULT: V : vault8_room_rune
SUBVAULT: X : vault8_room
SUBVAULT: Y : vault8_room
SUBVAULT: Z : vault8_room
SUBST:    VXYZ = .
MAP
xxxxxxxxxxxxxxxxxxxxxxxxxxx
x.........................x
x.xxxxxxxxxxx..xxxxxxxxJxIx
x.xVVVVVVVVVx..xXXXXXXXXx.x
x.xVVVVVVVVVx..xXXXXXXXXx.x
x.xVVVVVVVVVx..xXXXXXXXXx.x
x.xVVVVVVVVVx..xXXXXXXXXx.x
x.xVVVVVVVVVx..xXXXXXXXXx.x
x.xVVVVVVVVVx..xXXXXXXXXx.x
x.xVVVVVVVVVL..KXXXXXXXXx.x
x.NVVVVVVVVVxxxxxxxxxxxxx.x
xMxxxxxxxxxxx99988......A.x
x...........G99xxxxxxxxDx.x
x.xxxxxxxxxFx99xZZZZZZZZx.x
x.xYYYYYYYYYx88xZZZZZZZZx.x
x.xYYYYYYYYYx..xZZZZZZZZx.x
x.xYYYYYYYYYx..xZZZZZZZZx.x
x.xYYYYYYYYYx..xZZZZZZZZx.x
x.xYYYYYYYYYx..xZZZZZZZZx.x
x.xYYYYYYYYYx..CZZZZZZZZx.x
x.xxxxxxxxxEx..xxxxxxxxxx.a
x...........H..B..........
xxxxxxxxxxxxxxxxxxxxxxxxa
ENDMAP

##############################################################################
# Vault:8 - Rooms Quadrant - Traps and Loot Subvault
#
# Replace each square with traps or loot, but mostly floor.
#
NAME: vault8_room_traps_and_loot
TAGS: vault8_room
: default_subvault_glyphs()
SUBST: . = ?
: vault8_loot(_G)
MAP
ENDMAP

##############################################################################
# Vault:8 - Rooms Quadrant - Border Subvault
#
# Fill the room with loot, but leave an empty border.
#
NAME: vault8_room_border
TAGS: vault8_room
{{
    default_subvault_glyphs()
    local w, h = subvault_size()

    local i
    for i in iter.subvault_iterator(_G) do
      if i.x == 0 or i.x == w-1 or i.y == 0 or i.y == h-1 then
        -- border
        mapgrd[i.x][i.y] = '.'
      else
        -- inside
        mapgrd[i.x][i.y] = '*'
      end
    end
}}
: vault8_loot(_G)
MAP
ENDMAP

##############################################################################
# Vault:8 - Rooms Quadrant - Diamond Subvault
#
# Fill the room with money in a diamond pattern.
#
NAME: vault8_room_diamond
TAGS: vault8_room
{{
    default_subvault_glyphs()
    local w, h = subvault_size()

    local i
    for i in iter.subvault_iterator(_G) do
      if (i.x + i.y) % 2 == 0 then
        mapgrd[i.x][i.y] = '$'
      else
        mapgrd[i.x][i.y] = '.'
      end
    end
}}
: vault8_loot(_G)
MAP
ENDMAP

##############################################################################
# Vault:8 - Rooms Quadrant - Rune Subvault
#
# Potentially contains the rune.
#
NAME: vault8_room_rune
TAGS: vault8_room_rune
SUBST: ^ = ^.
: vault8_loot(_G)
: vault8_rune(_G)
MAP
......
.^^^^.
.^||^.
.^O|^.
.^||^.
.^^^^.
......
ENDMAP


##############################################################################
# Vault:8 - Cross Quadrant
# about 2 |
NAME: vault8_cross
TAGS: vault8_quadrant
NSUBST:  U = 1:. / *:xxxx=
NSUBST:  V = 1:. / *:xxxx=
SUBST:   - = 8 9 .:20
: vault8_loot(_G)
: vault8_rune(_G)
MAP
xxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxx.................xxxxx
xxx.......-.....-.......xxx
xxx...-.............-...xxx
xx.......................xx
xx.-....xxxxxxxxxxx....-.xx
xx......x.........x......xx
xx....xxU.........Uxx....xx
xx..-.x....xxxxx....x....xx
xx....x.-.Vx$$$xx...x.-..xx
xx....x..xx$***$xx..x....xx
xx.-..x..x$$*O*$$x-.x....xx
xx....x..xx$***$xx..x....xx
xx....x...Vx$$$xV...x..-.xx
xx..-.xxx-.xxxxx..Uxx....xx
xx......x.........x......xx
xx......xxxxxxxxxxx.-....xx
xxx...-.................xxx
xxx........-....-.......xxx
....xx................xxxxx
 ...xxxxxxxxxxxxxxxxxxxxxxx
  ..xxxxxxxxxxxxxxxxxxxxxxx
ENDMAP

##############################################################################
# Vault:8 - Diamond Quadrant
# about 4 |
NAME: vault8_diamond
TAGS: vault8_quadrant
SHUFFLE: !_
SUBST:   ! = | * .:20
SUBST:   _ = 8 9 .:20
SUBST:   a : x .
: vault8_loot(_G)
: vault8_rune(_G)
MAP
xxxxxxxxxxxxxxxxxxxxxxx.a
xx!x.x.x!x.x.x.x.x.x.x.x.a
x.x.x.x.x.x.x.x!x.x.x_x.x.a
xx.x!x.x.x.x.x.x.x.x!x.x.x.
x.x.x.x.x_x.x.x_x.x.x.x.x.x
xx.x.x.x.x.x.x.x.x.x.x.x_xx
x.x.x!x.x.x.x.x.x.x!x.x.x.x
xx.x_x.x.x!x.x.x.x.x.x.x.xx
x.x.x.x.x_x.x.x.x.x.x.x.x.x
xx.x.x.x.x.x.x.x.x.x.x.x!xx
x_x.x!x.x.x.x.x.x!x.x_x.x.x
xx.x.x.x.x.x.x.x.x.x.x.x.xx
x.x.x_x.x.x.x.x.x.x.x.x_x.x
xx.x.x.x.x.x.x_x.x.x.x.x.xx
x!x.x.x.x!x.x.x.x.x.x.x.x.x
xx.x.x.x.x.x.x!x.x.x.x.x.xx
x.x.x.x.x.x.x.x.x.x_x.x.x.x
xx.x_x.x.x.x.x.x.x.x.x.x_xx
x.x!x.x.x.x.x.x.x!x.x.x.x.x
xx.x.x.x.x.x.x_x.x.x.x.x.xx
x.x.x.x.x.x_x.x.x.x.x.x.x.x
xO.x.x_x.x.x!x.x.x.x.x!x_xx
xxxxxxxxxxxxxxxxxxxxxxxxxxx
ENDMAP

##############################################################################
# Vault:8 - Stripes Quadrant
# about 5 |
NAME: vault8_stripes
TAGS: vault8_quadrant
# double use of Y=Y. and Z=Z. for decreasing variance
SUBST:   Y = Y ., Z = Z .
SUBST:   Y = Y ., Z = Z .
SUBST:   Y = 9:30 8:10 .:40
SUBST:   Z = 9:10 8:30 .:40
SUBST:   a : x .
: vault8_loot(_G)
: vault8_rune(_G)
MAP
  axaxxaaxaxxxxxxxxxxxxxxxx
 .......................??x
a................Y..Z...??x
x..Y..Y..Y..Y..Y..Z..Y..Y.x
a...Y..Y..Y..Z..Y..Y..Z...x
x.Y..Y..Y..Y..Z..Y..Z..Y..x
x..Y..Y..Z..Z..Y..Y..Y..Z.x
a...Y..Z..Y..Y..Z..Y..Y...x
a.Y..Y..Z..Z..Y..Y..Y..Z..x
x..Z..Y..Y..Y..Z..Y..Y..Y.x
x...Y..Y..Z..Y..Z..Z..Y...x
x.Z..Z..Y..Y..Z..Y..Z..Z..x
x..Y..Z..Y..Z..Z..Y..Z..Z.x
x...Z..Z..Z..Y..Z..Z..Y...x
x.Y..Z..Y..Z..Z..Z..Z..Z..x
x..Z..Y..Z..Y.............x
x...Y..Z..Z..Z...ZZZZZZZZ.x
x....Z..Y..Z..Y..Z........x
x..Z..Z..Y..Z....Z..??????x
x...Z..Y..Z..Z...Z..??????x
x??..Y..Z..Z..Z..Z..??????x
x??.................?????Ox
xxxxxxxxxxxxxxxxxxxxxxxxxxx
ENDMAP

##############################################################################
# Vault:8 - Clover Quadrant (by Mu.)
# about 4 |
NAME:   vault8_clover
TAGS:   vault8_quadrant
SUBST:  Q = 8 9 .:20
NSUBST: ? = 1:O / *:*
NSUBST: " = 1:. / *:x
: vault8_loot(_G)
: vault8_rune(_G)
MAP
  xxxxxxxxxxxxxxxxxxxxxxxxx
 .........................x
x.........................x
x..xxxxxxxxxQQQxxxxxxxxx..x
x..x?**....x...x....**?x..x
x..x**..Q..x...x..Q..**x..x
x..x*..Q...x...x...Q..*x..x
x..x..Q....xx"xx....Q..x..x
x..x...................x..x
x..xxxxxxxx.....xxxxxxxx..x
x..Q......x.....x......Q..x
x..Q......"....."......Q..x
x..Q......x.....x......Q..x
x..xxxxxxxx.....xxxxxxxx..x
x..x...................x..x
x..x..Q....xx"xx....Q..x..x
x..x*..Q...x...x...Q..*x..x
x..x**..Q..x...x..Q..**x..x
x..x?**....x...x....**?x..x
x..xxxxxxxxxQQQxxxxxxxxx..x
x.........................x
x.........................x
xxxxxxxxxxxxxxxxxxxxxxxxxxx
ENDMAP

##############################################################################
# Vault:8 - Triangles Quadrant (by Mu.)
# about 19 |
NAME:   vault8_triangles
TAGS:   vault8_quadrant_prize
SUBST:  Q = 8 9 .:20
NSUBST: ? = 1:O / *:|
SUBST:  " = =:1 x:99
SUBST:  ! = x:20 .
: vault8_loot(_G)
: vault8_rune(_G)
MAP
xxxxxxxxxxxxxxxxxxxxxxxxxxx
x.........................x
x.!x..Q..xx............x!.x
x..xx.....xx.Q...Q..Q.xx..x
x...xx..Q..xx........xx.Q.x
x....xx.....xx.Q..Q.xx....x
x..Q..xx..Q..xx****xx.Q...x
x......xx.....xx**xx......x
x....Q..xx..Q.."xxx|Q.....x
x........xx.....xx||....Q.x
x......Q.|x"..Q.."x|Q.....x
x..Q.....*|xx.....xx......x
x......Q.|xxx"..Q..xx.Q...x
x........xx||xx.....xx....x
x....Q..xx||||xx..Q..xx.Q|x
x......xx..Q.Q.xx.....xx||x
x..Q..xx........xx..Q..xx?x
x....xx..Q.....Q.xx.....xxx
x...xx............xx..Q..xx
x..xx..Q....Q....Q.xx.....x
x.!x...............|xx....x
x..................|?xx...
xxxxxxxxxxxxxxxxxxxxxxxxx
ENDMAP

##############################################################################
# Vault:8 - Not Diamond Quadrant (by Mu.)
# about 8 |
NAME:   vault8_not_diamond
TAGS:   vault8_quadrant
SUBST:  Q = 8 9 *:20
: vault8_loot(_G)
: vault8_rune(_G)
MAP
xxxxxxxxxxxxxxxxxxxxxxxxx
xx.xQx.x.x.x.x.x.x.x.x.x..
x.x.x.x.x.x.x.x.x.x.x.xQx.x
xx.x.x.x.xQx.x.xQx.x.x.x.xx
x.x.xxxxxxxxx.xxxxxxxxx.x.x
xxQxxxxxxxxx.x.xxxxxxxxx.xx
x.x.xxxxxxxx...xxxxxxxx.x.x
xx.xxxxxxx...Q...xxxxxxxQxx
x.x.xxxxx.........xxxxx.x.x
xx.xxxxx...|$|$|...xxxxx.xx
xQx.x.x....$***$....x.x.x.x
xx.x.x.x.Q.|*O*|.Q.x.x.x.xx
x.x.x.x....$***$....x.x.xQx
xx.xxxxx...|$|$|...xxxxx.xx
x.x.xxxxx.........xxxxx.x.x
xx.xxxxxxx...Q...xxxxxxx.xx
x.x.xxxxxxxx...xxxxxxxx.x.x
xxQxxxxxxxxx.x.xxxxxxxxxQxx
x.x.xxxxxxxxx.xxxxxxxxx.x.x
xx.x.x.x.xQx.x.xQx.x.x.x.xx
x.x.x.x.x.x.x.x.x.x.x.x.x.x
xx.xQx.x.x.x.x.x.x.x.xQx.xx
xxxxxxxxxxxxxxxxxxxxxxxxxxx
ENDMAP

##############################################################################
# Vault:8 - Boxes (by Mu.)
# about 11 |
NAME:   vault8_boxes
TAGS:   vault8_quadrant
NSUBST: a = 1:+ / *:x
NSUBST: b = 1:+ / *:x
NSUBST: c = 1:+ / *:x
NSUBST: d = 1:+ / *:x
NSUBST: e = 1:+ / *:x
NSUBST: f = 1:+ / *:x
NSUBST: g = 1:+ / *:x
SHUFFLE:        ABCDEFG
SUBST:  ABC = Q
SUBST:  D = |*$Q
SUBST:  E = |
SUBST:  F = *
NSUBST: G = 1:O / *:Q
SUBST:  Q = 8 9 .:20
: vault8_loot(_G)
: vault8_rune(_G)
MAP
xxxxxxxxxxxxxxxxxxxxxxxxxxx
x.........................x
x..........xxbxx..........x
x..........xBBBx..........x
x..xxaxx...bBBBb...xxcxx..x
x..xAAAx...xBBBx...xCCCx..x
x..aAAAa...xxbxx...cCCCc..x
x..xAAAx...........xCCCx..x
x..xxaxx...........xxcxx..x
x..........xxdxx..........x
x..........xDDDx..........x
x....Q.....dDDDd.....Q....x
x..........xDDDx..........x
x..........xxdxx..........x
x..xxfxx...........xxgxx..x
x..xFFFx...........xGGGx..x
x..fFFFf...xxexx...gGGGg..x
x..xFFFx...xEEEx...xGGGx..x
x..xxfxx...eEEEe...xxgxx..x
x..........xEEEx..........x
x..........xxexx..........x
 .........................x
  xxxxxxxxxxxxxxxxxxxxxxxxx
ENDMAP

##############################################################################
# Vault:8 - Corners Quadrant (by Mu.)
# about 25 |
NAME:   vault8_corners
TAGS:   vault8_quadrant_prize
SUBST:  Q = 8 9 .:10
NSUBST: $ = 1:O / *:$
SUBST:  $ = | *:20 $
SUBST:  a = x.
: vault8_loot(_G)
: vault8_rune(_G)
MAP
xxxxxxxxxxxxxxxxxxxxxxxxxxx
x$$$$x.......xQQ...x..$$$$x
x$$$$x.......xQQ...x.x$$$$x
x$$$$x..xxx..x..x..x.x$$$$x
x$$$$x..xxx..x..x..x.x$$$$x
x.xxxx..xxx..x..x..x.xxxxxx
x.......xxx.....xQQ.......x
xxxxxx..xxx.....xQQ.......x
x.......xxxxxxxxxxxxxxxx..x
x.......xQQ...$$$$xQQ.....x
x..xxxxxxQQxxx$$$$xQQ.....x
xQQ.....x..xxx$$$$x..xxxxxx
xQQ.....x..xxx$$$$x.....QQx
xxxxxx..x..xxxxxxxx.....QQx
x.......x..xxxxxxxxxxxxx..x
x.......x.................x
x..xxxxxx.................x
xQQ.....x..xxxxxxxxx.xxxxxx
xQQ.....x..xxx$$$$xx.x$$$$x
xxxxxx..x..xxx$$$$xx.x$$$$x
a.......xQQxxx$$$$xx.x$$$$x
 .......xQQ...$$$$xx..$$$$x
  axxxxxxxxxxxxxxxxxxxxxxxx
ENDMAP

##############################################################################
# Vault:8 - Flips Quadrant (by Mu.)
# about 21 |
NAME:   vault8_flips
TAGS:   vault8_quadrant_prize
NSUBST: ; = 3:l / 3:z / 3:A / *:.
SUBST:  Q = 8 9
SUBST:  $ = | * $
KFEAT:  l = teleport trap
KFEAT:  z = zot trap
KFEAT:  A = alarm trap
SUBST:  s = x:250 =:1
SUBST:  a = x.
: vault8_loot(_G)
: vault8_rune(_G)
MAP
xxxxxxxxxxxxxxxxxxxxxxxxxxx
xQQQ......................x
xQQQxxxxxxxxxxxxxxxxxxxxs.x
xQQQ....................x.x
x.x.xxxxxxxxxxxxxxxxxxs.x.x
x.x.xQQQ..............x.x.x
x.x.xQQQxxxxxxxxxxxxs.x.x.x
x.x.xQQQ;;;;;;;;$$$$x.x.x.x
x.x.x.x;;;;;;;;;$$$$x.x.x.x
x.x.x.x;;;;;;;;;$$$$x.x.x.x
x.x.x.x;;;;;;;;;$$$$x.x.x.x
x.x.x.x;;;;;;;;;$$$$x.x.x.x
x.x.x.x;;;;;;;;;$$$$x.x.x.x
x.x.x.x$$$$$$$$$$$$$x.x.x.x
x.x.x.x$$$$$$$$$$$$$x.x.x.x
x.x.x.x$$$$$$$$$$$$Ox.x.x.x
x.x.x.sxxxxxxxxxxxxxx.x.x.x
x.x.x................QQQx.x
x.x.sxxxxxxxxxxxxxxxxQQQx.x
x.x..................QQQx.x
x.sxxxxxxxxxxxxxxxxxxxxxx.a
x.........................
xxxxxxxxxxxxxxxxxxxxxxxxa
ENDMAP

##############################################################################
# Vault:8 - Construction Quadrant (by Mu.)
# about 21 |
NAME:   vault8_construction
TAGS:   vault8_quadrant_prize
NSUBST: $ = 1:O / *:$
SUBST:  $ = |*$.
SUBST:  c = xnQ.
SUBST:  Q = 8 9 .
NSUBST: D = 1:+ / *:x
SUBST:  a = xn..
: vault8_loot(_G)
: vault8_rune(_G)
MAP
  axxxxxxxxxxxxxxxxxxxxxxxx
 ..c.c.c.c.c.c.c.c.c.c.c.cx
a.c.c.c.c.c.c.c.c.c.c.c.c.x
xc.c.c.c.c.c.c.c.c.c.c.c.cx
x.c.c.c.c.c.c.c.c.c.c.c.c.x
xc.c.c.c.c.c.c.c.c.c.c.c.cx
x.c.c.c.c.c.c.c.c.c.c.c.c.x
xc.c.c.c.c.c.c.c.c.c.c.c.cx
x.c.c.c.c.c.c.c.c.c.c.c.c.x
xc.c.c.c.c.c.c.c.c.c.c.c.cx
x.c.c.c.c.c.c.c.c.c.c.c.c.x
xDxDxDxDxDxDxDxDxDxDxDxDxDx
x.........................x
x.........................x
x.Qx..x..x..xQx..x..x..xQ.x
x.........................x
x.........................x
xxx+xxxx+xxxx+xxxx+xxxx+xxx
x$$$$x$$$$$x$$$x$$$$$x$$$$x
x$$$$x$$$$$x$$$x$$$$$x$$$$x
x$$$$x$$$$$x$$$x$$$$$x$$$$x
x$$$$x$$$$$x$$$x$$$$$x$$$$x
xxxxxxxxxxxxxxxxxxxxxxxxxxx
ENDMAP

##############################################################################
# Vault:8 - Long Quadrant (by Mu.)
# about 8 |
NAME:   vault8_long
TAGS:   vault8_quadrant
SUBST:  Q = 8 9 .:10
NSUBST: $ = 1:O / *:$
SUBST:  $ = |**$
SUBST:  a = x.
: vault8_loot(_G)
: vault8_rune(_G)
MAP
xxxxxxxxxxxxxxxxxxxxxxxxa
x.........................
x.........................a
x.........................x
x..xxxxxxxxxxxxxxxxxxxxx..x
x....QQQ............$$$x..x
x....QQQ............$$$x..x
x..xxxxxxxxxxxxxxxxxxxxx..x
x..x$$$............QQQ....x
x..x$$$............QQQ....x
x..xxxxxxxxxxxxxxxxxxxxx..x
x....QQQ............$$$x..x
x....QQQ............$$$x..x
x..xxxxxxxxxxxxxxxxxxxxx..x
x..x$$$............QQQ....x
x..x$$$............QQQ....x
x..xxxxxxxxxxxxxxxxxxxxx..x
x....QQQ............$$$x..x
x....QQQ............$$$x..x
x..xxxxxxxxxxxxxxxxxxxxx..x
x.........................x
x.........................x
xxxxxxxxxxxxxxxxxxxxxxxxxxx
ENDMAP
