lua {{
function randomise_colours(e)
    local colours = {
        "blue", "green", "cyan", "red", "magenta", "brown",
        "lightgrey", "darkgrey", "lightblue", "lightgreen", "lightcyan",
        "lightred", "lightmagenta", "yellow", "white"
    }

    local walls = {
        "wall_normal", "wall_hall", "wall_ice", "wall_lair",
        "wall_orc", "wall_snake", "wall_swamp", "wall_tomb", "wall_vault",
        "wall_zot_blue", "wall_zot_cyan", "wall_zot_lightgray",
        "wall_zot_green", "wall_zot_magenta", "wall_zot_red", "wall_zot_yellow",
        "wall_flesh", "wall_vines", "wall_pebble_red", "wall_yellow_rock",
        "wall_brick_gray", "wall_stone_gray", "wall_undead"
    }

    local floors = {
        "floor_normal", "floor_hall", "floor_ice", "floor_lair",
        "floor_orc", "floor_mosaic", "floor_swamp", "floor_tomb", "floor_vault",
        "floor_vines", "floor_rough_red", "floor_sand", "floor_grass",
        "floor_nerves", "floor_dirt", "floor_moss",
    }

    e.lrockcol(util.random_from(colours))
    e.lfloorcol(util.random_from(colours))
    e.lrocktile(util.random_from(walls))
    e.lfloortile(util.random_from(floors))
end
}}

NAME: arena_default
TAGS: arena_default
MARKER: A = feat: stone_stairs_up_i
MARKER: B = feat: stone_stairs_down_i
MARKER: O = feat: escape_hatch_up
SUBST: A = ., B = ., O = .
ORIENT: encompass
MAP
XXXXXXXXXXXXXXXXX
X...............X
X.......B.......X
X...............X
X...............X
X...............X
X...............X
X...............X
X.......O.......X
X...............X
X...............X
X...............X
X...............X
X...............X
X.......A.......X
X...............X
XXXXXXXXXXXXXXXXX
ENDMAP

# Metal-lined vault, when electricity reflection is important
NAME: arena_metal
TAGS: arena_metal
MARKER: A = feat: stone_stairs_up_i
MARKER: B = feat: stone_stairs_down_i
MARKER: O = feat: escape_hatch_up
SUBST: A = ., B = ., O = .
ORIENT: encompass
MAP
XXXXXXXXXXXXXXXXXXX
XvvvvvvvvvvvvvvvvvX
Xv...............vX
Xv.......B.......vX
Xv...............vX
Xv...............vX
Xv...............vX
Xv...............vX
Xv...............vX
Xv.......O.......vX
Xv...............vX
Xv...............vX
Xv...............vX
Xv...............vX
Xv...............vX
Xv.......A.......vX
Xv...............vX
XvvvvvvvvvvvvvvvvvX
XXXXXXXXXXXXXXXXXXX
ENDMAP
# Especially for immobile monsters... all locations are in LOS of each other
NAME: arena_small
TAGS: arena_small
MARKER: A = feat: stone_stairs_up_i
MARKER: B = feat: stone_stairs_down_i
MARKER: O = feat: escape_hatch_up
SUBST: A = ., B = ., O = .
ORIENT: encompass
MAP
XXXXXXXXXXXXXXXXX
XvvvvvvvvvvvvvvvX
XvvvvvvvvvvvvvvvX
XvvvvvvvvvvvvvvvX
Xvvvvvv.B.vvvvvvX
Xvvvv.......vvvvX
Xvvvv.......vvvvX
Xvvv.........vvvX
Xvvv....O....vvvX
Xvvv.........vvvX
Xvvvv.......vvvvX
Xvvvv.......vvvvX
Xvvvvvv.A.vvvvvvX
XvvvvvvvvvvvvvvvX
XvvvvvvvvvvvvvvvX
XvvvvvvvvvvvvvvvX
XXXXXXXXXXXXXXXXX
ENDMAP

# for fine-tuning interactions
NAME: arena_narrow
TAGS: arena_narrow
MARKER: A = feat: stone_stairs_up_i
MARKER: B = feat: stone_stairs_down_i
MARKER: O = feat: escape_hatch_up
SUBST: A = ., B = ., O = .
ORIENT: encompass
MAP
XXXXXXXXXXXXXXXXX
XXXXXX.....XXXXXX
XXXXXX..B..XXXXXX
XXXXXX.....XXXXXX
XXXXXX.....XXXXXX
XXXXXX.....XXXXXX
XXXXXX.....XXXXXX
XXXXXX.....XXXXXX
XXXXXX..O..XXXXXX
XXXXXX.....XXXXXX
XXXXXX.....XXXXXX
XXXXXX.....XXXXXX
XXXXXX.....XXXXXX
XXXXXX.....XXXXXX
XXXXXX..A..XXXXXX
XXXXXX.....XXXXXX
XXXXXXXXXXXXXXXXX
ENDMAP

NAME: arena_corridor
TAGS: arena_corridor
MARKER: A = feat: stone_stairs_up_i
MARKER: B = feat: stone_stairs_down_i
MARKER: O = feat: escape_hatch_up
SUBST: A = ., B = ., O = .
ORIENT: encompass
MAP
XXXXXXXXXXXXXXXXX
XXXXXXXXBXXXXXXXX
XXXXXXXX.XXXXXXXX
XXXXXXXX.XXXXXXXX
XXXXXXXX.XXXXXXXX
XXXXXXXX.XXXXXXXX
XXXXXXXX.XXXXXXXX
XXXXXXXX.XXXXXXXX
XXXXXXXXOXXXXXXXX
XXXXXXXX.XXXXXXXX
XXXXXXXX.XXXXXXXX
XXXXXXXX.XXXXXXXX
XXXXXXXX.XXXXXXXX
XXXXXXXX.XXXXXXXX
XXXXXXXX.XXXXXXXX
XXXXXXXXAXXXXXXXX
XXXXXXXXXXXXXXXXX
ENDMAP

NAME: arena_pillarred
TAGS: arena_pillarred
MARKER: A = feat: stone_stairs_up_i
MARKER: B = feat: stone_stairs_down_i
MARKER: O = feat: escape_hatch_up
SUBST: A = ., B = ., O = G
ORIENT: encompass
MAP
XXXXXXXXXXXXXXXXX
X...............X
X.G...G.B.G...G.X
X...............X
X...G...G...G...X
X...............X
X.G...G...G...G.X
X...............X
X...G...O...G...X
X...............X
X.G...G...G...G.X
X...............X
X...G...G...G...X
X...............X
X.G...G.A.G...G.X
X...............X
XXXXXXXXXXXXXXXXX
ENDMAP

NAME: arena_lattice
TAGS: arena_lattice
MARKER: A = feat: stone_stairs_up_i
MARKER: B = feat: stone_stairs_down_i
MARKER: O = feat: escape_hatch_up
SUBST: A = ., B = ., O = X
ORIENT: encompass
MAP
XXXXXXXXXXXXXXXXX
X...............X
X.X...X.B.X...X.X
X...............X
X...X...X...X...X
X...............X
X.X...X...X...X.X
X...............X
X...X...O...X...X
X...............X
X.X...X...X...X.X
X...............X
X...X...X...X...X
X...............X
X.X...X.A.X...X.X
X...............X
XXXXXXXXXXXXXXXXX
ENDMAP

NAME: arena_river
TAGS: arena_river no_pool_fixup
MARKER: A = feat: stone_stairs_up_i
MARKER: B = feat: stone_stairs_down_i
MARKER: O = feat: escape_hatch_up
SUBST: A = ., B = ., O = w
ORIENT: encompass
MAP
XXXXXXXXXXXXXXXXX
X...............X
X.......B.......X
X...............X
X...............X
Xw..............X
Xww.............X
Xwww....wwwww...X
X.wwwwwwOwwwwww.X
X...wwwww....wwwX
X.............wwX
X..............wX
X...............X
X...............X
X.......A.......X
X...............X
XXXXXXXXXXXXXXXXX
ENDMAP

NAME: arena_swamp
TAGS: arena_swamp
MARKER: A = feat: stone_stairs_up_i
MARKER: B = feat: stone_stairs_down_i
MARKER: O = feat: escape_hatch_up
SUBST: A = ., B = ., O = x
SUBST: . = w:30 W .:5
SUBST: x = W .:5
ORIENT: encompass
MAP
XXXXXXXXXXXXXXXXX
X........xx.....X
X.......B..x....X
X..........x....X
X..........x....X
X..........x....X
X.........x.....X
X........x......X
X.......O.......X
X......x........X
X.....x.........X
X....x..........X
X....x..........X
X....x..........X
X....x..A.......X
X.....xx........X
XXXXXXXXXXXXXXXXX
ENDMAP

NAME: arena_pool
TAGS: arena_pool
MARKER: A = feat: stone_stairs_up_i
MARKER: B = feat: stone_stairs_down_i
MARKER: O = feat: escape_hatch_up
SUBST: A = ., B = ., O = .
SUBST: . = W
ORIENT: encompass
MAP
XXXXXXXXXXXXXXXXX
X...............X
X.......B.......X
X...............X
X...............X
X...............X
X...............X
X...............X
X.......O.......X
X...............X
X...............X
X...............X
X...............X
X...............X
X.......A.......X
X...............X
XXXXXXXXXXXXXXXXX
ENDMAP

NAME: arena_lava
TAGS: arena_lava
MARKER: A = feat: stone_stairs_up_i
MARKER: B = feat: stone_stairs_down_i
MARKER: O = feat: escape_hatch_up
SUBST: A = ., B = ., O = x
SUBST: . = l:30 .
SUBST: x = .
ORIENT: encompass
MAP
XXXXXXXXXXXXXXXXX
X........xx.....X
X.......B..x....X
X..........x....X
X..........x....X
X..........x....X
X.........x.....X
X........x......X
X.......O.......X
X......x........X
X.....x.........X
X....x..........X
X....x..........X
X....x..........X
X....x..A.......X
X.....xx........X
XXXXXXXXXXXXXXXXX
ENDMAP

NAME: arena_baffles
TAGS: arena_baffles
MARKER: A = feat: stone_stairs_up_i
MARKER: B = feat: stone_stairs_down_i
MARKER: O = feat: escape_hatch_up
SUBST: A = ., B = ., O = X
ORIENT: encompass
MAP
XXXXXXXXXXXXXXXXX
X...X...B...X...X
X.X.X.X.X.X.X.X.X
X.......X.......X
X.XXXXX.X.XXXXX.X
X.......X.......X
X.X.X.X.X.X.X.X.X
X...X.......X...X
XXX.X.XXOXX.X.XXX
X...X.......X...X
X.X.X.X.X.X.X.X.X
X.......X.......X
X.XXXXX.X.XXXXX.X
X.......X.......X
X.X.X.X.X.X.X.X.X
X...X...A...X...X
XXXXXXXXXXXXXXXXX
ENDMAP

NAME: arena_glassbaffles
TAGS: arena_glassbaffles
MARKER: A = feat: stone_stairs_up_i
MARKER: B = feat: stone_stairs_down_i
MARKER: O = feat: escape_hatch_up
SUBST: A = ., B = ., O = o
ORIENT: encompass
MAP
ooooooooooooooooo
o...o...B...o...o
o.o.o.o.o.o.o.o.o
o.......o.......o
o.ooooo.o.ooooo.o
o.......o.......o
o.o.o.o.o.o.o.o.o
o...o.......o...o
ooo.o.ooOoo.o.ooo
o...o.......o...o
o.o.o.o.o.o.o.o.o
o.......o.......o
o.ooooo.o.ooooo.o
o.......o.......o
o.o.o.o.o.o.o.o.o
o...o...A...o...o
ooooooooooooooooo
ENDMAP

NAME: arena_items
TAGS: arena_items no_item_gen
MARKER: A = feat: stone_stairs_up_i
MARKER: B = feat: stone_stairs_down_i
MARKER: O = feat: escape_hatch_up
SUBST: A = ., B = ., O = .
ORIENT: encompass
ITEM: any
ITEM: any potion
ITEM: any wand
: randomise_colours(_G)
MAP
XXXXXXXXXXXXXXXXX
XX.............XX
X.......B.......X
X.....ddddd.....X
X.....eeeee.....X
X......fff......X
X......ddd......X
X...............X
X.......O.......X
X...............X
X......ddd......X
X......fff......X
X.....eeeee.....X
X.....ddddd.....X
X.......A.......X
XX.............XX
XXXXXXXXXXXXXXXXX
ENDMAP

NAME: arena_smoke
TAGS: arena_smoke
MARKER: A = feat: stone_stairs_up_i
MARKER: B = feat: stone_stairs_down_i
MARKER: O = feat: escape_hatch_up
SUBST: A = ., B = ., O = .
MARKER:  S = lua:fog_machine { \
             pow_max = 10, delay_min = 10, delay_max = 10, \
             size = 56, start_clouds = 1, \
             cloud_type = "black smoke" }
SUBST: S = .
ORIENT: encompass
: randomise_colours(_G)
MAP
XXXXXXXXXXXXXXXXX
X...............X
X.......B.......X
X...............X
X...S.......S...X
X...............X
X...............X
X...............X
X.......O.......X
X...............X
X...............X
X...............X
X...S.......S...X
X...............X
X.......A.......X
X...............X
XXXXXXXXXXXXXXXXX
ENDMAP

NAME: arena_glassdoors
TAGS: arena_glassdoors
MARKER: A = feat: stone_stairs_up_i
MARKER: B = feat: stone_stairs_down_i
MARKER: O = feat: escape_hatch_up
SUBST: A = ., B = ., O = o
ORIENT: encompass
MAP
ooooooooooooooooo
o...o...B...o...o
o.o.o.o.o.o.o.o.o
o.......o.......o
o.o.o.o.o.o.o.o.o
o.......o.......o
o.oo+ooooooo+oo.o
o...o.......o...o
ooo+o+ooOoo+o+ooo
o...o.......o...o
o.oo+ooooooo+oo.o
o.......o.......o
o.o.o.o.o.o.o.o.o
o.......o.......o
o.o.o.o.o.o.o.o.o
o...o...A...o...o
ooooooooooooooooo
ENDMAP

NAME: arena_wall
TAGS: arena_wall
MARKER: A = feat: stone_stairs_up_i
MARKER: B = feat: stone_stairs_down_i
MARKER: O = feat: escape_hatch_up
SUBST: A = ., B = ., O = o
ORIENT: encompass
MAP
XXXXXXXXXXXXXXXXX
X...............X
X.......B.......X
X...............X
X...............X
X...............X
X...............X
X...............X
Xxx.xxooOooxx.xxX
X...............X
X...............X
X...............X
X...............X
X...............X
X.......A.......X
X...............X
XXXXXXXXXXXXXXXXX
ENDMAP

NAME: arena_glasswall
TAGS: arena_glasswall
MARKER: A = feat: stone_stairs_up_i
MARKER: B = feat: stone_stairs_down_i
MARKER: O = feat: escape_hatch_up
SUBST: A = ., B = ., O = o
ORIENT: encompass
MAP
XXXXXXXXXXXXXXXXX
X...............X
X.......B.......X
X...............X
X...............X
X...............X
X...............X
X...............X
Xxx.ooooOoooo.xxX
X...............X
X...............X
X...............X
X...............X
X...............X
X.......A.......X
X...............X
XXXXXXXXXXXXXXXXX
ENDMAP

NAME: arena_doorwall
TAGS: arena_doorwall
MARKER: A = feat: stone_stairs_up_i
MARKER: B = feat: stone_stairs_down_i
MARKER: O = feat: escape_hatch_up
SUBST: A = ., B = ., O = o
ORIENT: encompass
MAP
XXXXXXXXXXXXXXXXX
X...............X
X.......B.......X
X...............X
X...............X
X...............X
X...............X
X...............X
XXX+XXooOooXX+XXX
X...............X
X...............X
X...............X
X...............X
X...............X
X.......A.......X
X...............X
XXXXXXXXXXXXXXXXX
ENDMAP


NAME: arena_small_deep_pool
TAGS: arena_small_deep_pool
MARKER: A = feat: stone_stairs_up_i
MARKER: B = feat: stone_stairs_down_i
MARKER: O = feat: escape_hatch_up
SUBST: A = ., B = ., O = .
SUBST: . = w
ORIENT: encompass
MAP
XXXXXXXXXXXXXXXXX
XvvvvvvvvvvvvvvvX
XvvvvvvvvvvvvvvvX
XvvvvvvvvvvvvvvvX
Xvvvvvv.B.vvvvvvX
Xvvvv.......vvvvX
Xvvvv.......vvvvX
Xvvv.........vvvX
Xvvv....O....vvvX
Xvvv.........vvvX
Xvvvv.......vvvvX
Xvvvv.......vvvvX
Xvvvvvv.A.vvvvvvX
XvvvvvvvvvvvvvvvX
XvvvvvvvvvvvvvvvX
XvvvvvvvvvvvvvvvX
XXXXXXXXXXXXXXXXX
ENDMAP


NAME: arena_chaos
TAGS: arena_chaos
MARKER: A = feat: stone_stairs_up_i
MARKER: B = feat: stone_stairs_down_i
MARKER: O = feat: escape_hatch_up
SUBST: A = ., B = ., O = .
ORIENT: encompass
MARKER: T = lua:fog_machine { cloud_type="seething chaos", \
            pow_min = 20, pow_max = 40, delay = 10, \
            size = 2, walk_dist = 0, spread_rate= 75 }
KFEAT: T = .
MAP
XXXXXXXXXXXXXXXXX
X...............X
X.......B.......X
X...............X
X..T....T....T..X
X...............X
X...............X
X...............X
X.....T.O.T.....X
X...............X
X...............X
X...............X
X..T....T....T..X
X...............X
X.......A.......X
X...............X
XXXXXXXXXXXXXXXXX
ENDMAP


NAME: arena_forest
TAGS: arena_forest
MARKER: A = feat: stone_stairs_up_i
MARKER: B = feat: stone_stairs_down_i
MARKER: O = feat: escape_hatch_up
SUBST: A = ., B = ., O = .
ORIENT: encompass
MAP
XXXXXXXXXXXXXXXXX
X.tttt...tttttttX
Xt....ttB.ttttttX
Xt.ttttttt.tttttX
Xtt.tttttt.tttttX
Xtt.ttttt.tt..ttX
Xtt.tttt....ttttX
Xttt.tt..tttttttX
Xtttt...O...ttttX
Xttttttt..tt.tttX
Xtttt....tttt.ttX
Xtt..tt.ttttt.ttX
Xttttt.tttttt.ttX
Xttttt.ttttttt.tX
Xtttttt.Att....tX
Xttttttt...tttt.X
XXXXXXXXXXXXXXXXX
ENDMAP
