###############################################################################
# Zig Sprint
#
# General comments:
# - Obsidian axe, Gong and Maxwells are guaranteed in the equipment room, this
#   is because of an IRC joke/challenge involving beating a zig wearing these
#   items. Despite it being rather fun to use them in the map it may be
#   slightly imbalanced to hand them out.
#
# - Alternatively to the way this map is done, it would be better I think to
#   make the map a single room that regenerates and becomes bigger each time
#   you step on the down-stairs equivalent. Possibly in two different versions,
#   one like current Ziggurat (small levels, fight everything at once) and one
#   similar to Hell's Arena in DoomRL (much larger and battles spread out).
#   However this is beyond my capabilities.
#
# - Balance is intended to be similar to Zig, therefore extended levels are as
#   brutal as they should be. Orbs of fire, electric golems and fiends are all
#   thrown about as they should be in their respective monster sets.
#   - TODO: pretty much all of this needs rebalancing, over a decade later.
#     At minimum, we need to not just use place:Branch for future-proofing.
#     Probably a fifth set should be made to split up the current four?
#     Also, add in Swamp, player ghost, and conjurer floors.
#
# - The starting loot/equipment is probably the thing which may need to most
#   looking at, I have tried to make it reasonable enough for casters/stabbers
#   to progress through the early rooms which melee has no concern with
#   generally.
#
# - Some gods are rather strong due to regaining more piety than you use up to
#   kill things. In my testing Makhleb's greater demons and Chei's slouch are
#   two offenders for this.
#
###############################################################################

{{
-- start TAG_MAJOR_VERSION == 34
function callback.zig_tele(data, triggerable, triggerer, marker, ev)
  local position = dgn.point(marker:pos())
  my_replicas = dgn.find_marker_positions_by_prop("teleport_spot",
                                                  data.teleport_spot)
  you.teleport_to(my_replicas[1].x, my_replicas[1].y)
  crawl.mpr("Your surroundings seem different!")
  if data.teleport_spot < 28 then
    crawl.mpr("Welcome to arena " .. data.teleport_spot .. ".")
    crawl.take_note("Entered arena " .. data.teleport_spot .. ".")
--  crawl.mark_milestone("sprint", "entered arena " .. data.teleport_spot ..
--                       " of Ziggurat Sprint.", "")
  end
end
-- end TAG_MAJOR_VERSION

function callback.zig_message(data, triggerable, triggerer, marker, ev)
  if data.arena_number > 1 then
    crawl.mpr("Welcome to arena " .. data.arena_number - 1 .. ".")
    crawl.take_note("Entered arena " .. data.arena_number .. ".")
--  crawl.mark_milestone("sprint", "entered arena " .. data.arena_number ..
--                       " of Ziggurat Sprint.", "")
  end
end

function callback.make_hatch(data, triggerable, triggerer, marker, ev)
    for replica in iter.replica_iterator("hatch", 1) do
        dgn.terrain_changed(replica.x, replica.y, "exit_dungeon", false)
        dgn.apply_area_cloud(replica.x, replica.y, 1, 10, 1, 9, "purple smoke", "other", -1)
    end
    crawl.mpr("<magenta>An exit appears before you!</magenta>")
end

function setup_room(e, id)
  -- Tags
  e.tags("no_item_gen")
  e.tags("no_trap_gen")
  e.tags("no_rotate")
  e.tags("no_hmirror")
  e.tags("no_vmirror")
  -- Subvault tag
  e.tags(e.name())

  -- Place the transporter entrance
  e.lua_marker('A', transp_loc("arena_" .. tostring(id)))
  e.colour("A = lightmagenta")

  if id > 1 then
    -- Place the transporter exit
    e.lua_marker('a', transp_dest_loc("arena_" .. tostring(id - 1)))
    local m_marker = TriggerableFunction:new { func="callback.zig_message",
                                             data = {arena_number = id} }
    m_marker:add_triggerer(DgnTriggerer:new { type="player_move" })
    e.lua_marker('a', m_marker)
    e.subst("a = .")

    -- Transform pillars
    e.subst("Z : XXX.")
    e.subst("z : XX.")
    e.colour("X = white")
    e.tile("X = wall_stone_white")

    -- Create items
e.kitem("1 = superb_item pre_id w:590 /\
            potion of heal wounds pre_id q:4 w:3 /\
            potion of haste pre_id q:4 w:3 /\
            scroll of fog w:1 pre_id /\
            potion of might pre_id w:2 /\
            scroll of acquirement q:1 w:1 pre_id /\
            scroll of enchant weapon pre_id q:4 w:2 /\
            scroll of enchant armour pre_id q:4 w:2 /\
            scroll of brand weapon pre_id")

    -- Place monsters
    if id < 7 then
      choose_mset_1(e)
    elseif id < 12 then
      choose_mset_2(e)
    elseif id < 21 then
      choose_mset_3(e)
    else
      choose_mset_4(e)
    end

  end
end

-- Monster sets. Rooms 1-5.
function choose_mset_1(e)
  local rnd = crawl.random2(132)
-- Slime
  if rnd < 9 then
    e.kmons("1 = jelly w:15 / endoplasm / slime creature w:5 / glass eye w:5 / golden eye w:5")
-- Snake
  elseif rnd < 19 then
    e.kmons("1 = ball python / adder / water moccasin w:5 / naga w:2")
-- Lair
  elseif rnd < 29 then
    e.kmons("1 = river rat / iguana / yak w:5 / jackal / wolf w:5 /\
                 bullfrog w:5")
-- Spider
  elseif rnd < 39 then
    e.kmons("1 = scorpion w:15 / scorpion simulacrum w:5 / tarantella w:5")
-- Crypt
  elseif rnd < 49 then
    e.kmons("1 = zombie / orc draugr / wight w:5 / \
                 weeping skull / phantom / bes kemwar w:5")
-- Abyss
  elseif rnd < 59 then
    e.kmons("1 = lesser demon w:20 / brain worm / weeping skull / neqoxec w:2")
-- Forest
  elseif rnd < 64 then
    e.kmons("1 = spriggan / wolf / black bear")
-- Shoals
  elseif rnd < 69 then
    e.kmons("1 = merfolk")
-- Hell
  elseif rnd < 79 then
    e.kmons("1 = zombie w:5 / jackal draugr w:5 / lesser demon w:15 / hell hound w:5")
-- Giant
  elseif rnd < 81 then
    e.kmons("1 = ogre / two-headed ogre / troll w:5 / cyclops w:3")
-- Fire
  elseif rnd < 83 then
    e.kmons("1 = fire vortex / hell hound / fire elemental w:15")
-- Ice
  elseif rnd < 85 then
    e.kmons("1 = ice beast / polar bear / white imp / simulacrum")
-- Air
  elseif rnd < 87 then
    e.kmons("1 = sky beast")
-- Earth
  elseif rnd < 89 then
    e.kmons("1 = rock fish / toenail golem w:2")
-- Dragon
  elseif rnd < 91 then
    e.kmons("1 = swamp drake / steam dragon / acid dragon")
-- Ranged
  elseif rnd < 93 then
    e.kmons("1 = centaur / yaktaur")
-- Vaults
  elseif rnd < 95 then
    e.kmons("1 = human")
-- Pan
  elseif rnd < 97 then
    e.kmons("1 = lesser demon / common demon w:2 / pandemonium lord w:1")
-- Tomb
  elseif rnd < 101 then
    e.kmons("1 = burial acolyte / mummy w:15 / zombie")
-- Elf
  elseif rnd < 111 then
    e.kmons("1 = deep elf pyromancer w:15 / water elemental")
-- Orc
  elseif rnd < 121 then
    e.kmons("1 = orc / orc wizard / orc priest")
-- Drac
  elseif rnd < 124 then
    e.kmons("1 = draconian / base draconian w:1")
-- Zot
  elseif rnd < 126 then
    e.kmons("1 = draconian / base draconian w:1 / death cob w:1")
-- Chaos
  elseif rnd < 130 then
    e.kmons("1 = shapeshifter hd:5 / ugly thing w:5")
-- Uniques
  else
    e.kmons("1 = Sigmund, Jessica, Blorkula the orcula, Crazy Yiuf, Dowan, \
               Duvessa, Edmund, Erica, Erolcha, Eustachio, Gastronok, \
               Grum, Grinder, Harold, Ijyb, Joseph, Josephine, \
               Maurice, Menkaure, Pikel, Prince Ribbit, \
               Pargi, Sonja, Sprozz, Terence, Urug, human")
  end
end

-- Monster sets. Rooms 6-10.
function choose_mset_2(e)
  local rnd = crawl.random2(141)
-- Slime
  if rnd < 9 then
    e.kmons("1 = jelly w:15 / endoplasm / slime creature /\
               glass eye w:5 / golden eye w:5 /\
               eye of devastation w:5 / shining eye w:5")
-- Snake
  elseif rnd < 19 then
    e.kmons("1 = ball python / adder / water moccasin / naga /\
                 black mamba w:5 / naga mage w:5")
-- Lair
  elseif rnd < 29 then
    e.kmons("1 =  river rat / iguana / yak / jackal / wolf / bullfrog /\
               cane toad w:5 / komodo dragon w:5 / basilisk w:5 /\
               place:Lair:1 w:30")
-- Spider
  elseif rnd < 34 then
    e.kmons("1 = scorpion w:15 / jumping spider w:5 / \
                 tarantella w:5 / culicivora")
-- Crypt
  elseif rnd < 44 then
    e.kmons("1 = place:D:7 zombie w:20 / place:D:4 draugr w:20 /\
                 wight / weeping skull / phantom")
-- Abyss
  elseif rnd < 54 then
    e.kmons("1 = small abomination / large abomination / lesser demon")
-- Forest
  elseif rnd < 64 then
    e.kmons("1 = spriggan / wolf / black bear / spriggan rider w:5 /\
               spriggan druid w:2")
-- Shoals
  elseif rnd < 74 then
    e.kmons("1 = merfolk w:20 / wind drake / centaur / cyclops w:3")
-- Hell
  elseif rnd < 80 then
    e.kmons("1 = place:D:7 zombie / hound draugr / lesser demon / hell hound")
-- Giant
  elseif rnd < 82 then
    e.kmons("1 = ogre / two-headed ogre / troll w:5 / cyclops w:5")
-- Fire
  elseif rnd < 84 then
    e.kmons("1 = fire vortex / hell hound / hell hog / fire elemental /\
               efreet")
-- Ice
  elseif rnd < 86 then
    e.kmons("1 = ice beast / polar bear / white imp / simulacrum /\
               rime drake / freezing wraith / ice devil")
-- Air
  elseif rnd < 88 then
    e.kmons("1 = sky beast / wind drake w:5 / hippogriff w:5")
-- Earth
  elseif rnd < 90 then
    e.kmons("1 = rock fish / kobold geomancer / basilisk /\
                 catoblepas w:5 / boulder beetle w:5 /\
                 toenail golem w:2 / gargoyle w:2")
-- Dragon
  elseif rnd < 92 then
    e.kmons("1 = swamp drake / rime drake / acid dragon / steam dragon / wyvern")
-- Ranged
  elseif rnd < 94 then
    e.kmons("1 = centaur / yaktaur / cyclops / centaur warrior w:3 /\
               yaktaur captain w:3")
-- Vaults
  elseif rnd < 99 then
    e.kmons("1 = place:Vaults:3 / yaktaur w:2 / vault guard w:5")
-- Pan
  elseif rnd < 104 then
    e.kmons("1 = lesser demon / common demon w:5 / pandemonium lord w:2")
-- Tomb
  elseif rnd < 109 then
    e.kmons("1 = place:Tomb:$ w:250 / royal mummy")
-- Elf
  elseif rnd < 119 then
    e.kmons("1 = place:Elf:$")
-- Orc
  elseif rnd < 129 then
    e.kmons("1 = orc / orc wizard / orc priest / orc warrior")
-- Drac
  elseif rnd < 132 then
    e.kmons("1 = draconian / base draconian w:5")
-- Zot
  elseif rnd < 134 then
    e.kmons("1 = draconian / base draconian w:5 / death cob w:1")
-- Chaos
  elseif rnd < 139 then
    e.kmons("1 = shapeshifter / ugly thing w:5 / neqoxec w:5 / shining eye w:2")
-- Uniques
  else
    e.kmons("1 = Sigmund, Jessica, Blorkula the orcula, Crazy Yiuf, Dowan, \
               Duvessa, Edmund, Erica, Erolcha, Eustachio, Gastronok, \
               Grum, Grinder, Harold, Ijyb, Joseph, Josephine, \
               Maurice, Menkaure, Pikel, Prince Ribbit, \
               Pargi, Sonja, Sprozz, Terence, Urug, human")
  end
end

-- Monster sets. Rooms 10-19.
function choose_mset_3(e)
  local rnd = crawl.random2(116)
-- Slime
  if rnd < 9 then
    e.kmons("1 = jelly w:15 / endoplasm / slime creature w:30 /\
               glass eye w:2 / golden eye w:5 / void ooze w:2 /\
               eye of devastation w:5 / shining eye w:5 / acid blob w:5 /\
               rockslime / star jelly w:5 / azure jelly w:5 /\
               great orb of eyes w:5 / glowing orange brain w:2")
-- Snake
  elseif rnd < 14 then
    e.kmons("1 = ball python / adder / water moccasin / naga /\
               black mamba / naga mage / naga warrior / nagaraja w:5 /\
               anaconda w:5 / guardian serpent")
-- Lair
  elseif rnd < 19 then
    e.kmons("1 =  place:Lair:1 / place:Lair:3 / place:Lair:$ w:5")
-- Spider
  elseif rnd < 24 then
    e.kmons("1 = place:Spider:$ w:70 / hornet")
-- Crypt
  elseif rnd < 34 then
    e.kmons("1 = place:D:$ zombie / place:D:7 draugr / skeletal warrior w:5 /\
                 ghoul w:2 / laughing skull w:5 / vampire w:5 /\
                 vampire mage w:5 / vampire knight w:5 / lich w:2 /\
                 shadowghast / phantasmal warrior w:5 / wight / necromancer")
-- Abyss
  elseif rnd < 39 then
    e.kmons("1 = lesser demon w:5 / place:Abyss")
-- "Forest"
  elseif rnd < 44 then
    e.kmons("1 = place:Lair:$ w:50 /\
               spriggan druid w:2 / spriggan air mage w:5 / spriggan berserker w:5")
-- Shoals
  elseif rnd < 49 then
    e.kmons("1 = place:Shoals:3 / place:Shoals:$ w:45 / merfolk javelineer /\
                 merfolk impaler / merfolk aquamancer")
    e.subst(". = W..")
    e.kfeat("1 = shallow_water")
-- Cocytus
  elseif rnd < 54 then
    e.kmons("1 = azure jelly / place:Coc:$ simulacrum / lich")
-- Gehenna
  elseif rnd < 59 then
    e.kmons("1 = hell knight / hell hog / fire giant / lich")
-- Tartarus
  elseif rnd < 64 then
    e.kmons("1 = place:Depths:$ zombie / place:D:$ draugr /\
                 soul eater / shadow dragon w:3 /\
                 place:D:$ spectral thing / ghoul w:2")
-- Dis
  elseif rnd < 69 then
    e.kmons("1 = crystal echidna / crystal guardian / hell knight")
-- Giant
  elseif rnd < 71 then
    e.kmons("1 = ogre w:5 / two-headed ogre / troll / cyclops /\
               stone giant w:5 / fire giant w:2 / frost giant w:2")
-- Fire
  elseif rnd < 73 then
    e.kmons("1 = fire vortex / hell hound / hell hog / fire elemental /\
               efreet / fire dragon / fire giant")
-- Ice
  elseif rnd < 75 then
    e.kmons("1 = ice beast / polar bear / white imp / simulacrum / rime drake/\
               freezing wraith / ice devil / ice dragon / frost giant /\
               blizzard demon")
-- Air
  elseif rnd < 77 then
    e.kmons("1 = air elemental / wind drake / spriggan air mage /\
               storm dragon / titan w:2")
-- Earth
  elseif rnd < 79 then
    e.kmons("1 = earth elemental w:15 / boulder beetle w:5 / gargoyle w:5 /\
                 catoblepas / mountainshell w:5 / crystal guardian /\
                 stone giant w:5 / iron dragon w:5")
-- Dragon
  elseif rnd < 81 then
    e.kmons("1 = swamp drake / rime drake / acid dragon / steam dragon /\
               death drake / swamp dragon / fire dragon / ice dragon / wyvern /\
               hydra")
-- Ranged
  elseif rnd < 83 then
    e.kmons("1 = centaur / yaktaur / cyclops / centaur warrior w:6 /\
               yaktaur captain w:6 / stone giant w:5 / merfolk javelineer w:5 /\
               deep elf master archer w:5")
-- Vaults
  elseif rnd < 87 then
    e.kmons("1 = vault guard w:60 / lich w:5 / yaktaur / yaktaur captain w:3 /\
                 stone giant / shadow dragon w:5")
-- Pan
  elseif rnd < 90 then
    e.kmons("1 = common demon / place:Pan / pandemonium lord w:5")
-- Tomb
  elseif rnd < 93 then
    e.kmons("1 = place:Tomb:$ w:100 / royal mummy")
-- Elf
  elseif rnd < 98 then
    e.kmons("1 = place:Elf:$ w:100 / deep elf sorcerer / deep elf blademaster /\
               deep elf master archer / deep elf annihilator / deep elf high priest")
-- Orc
  elseif rnd < 103 then
    e.kmons("1 = place:Orc:$ w:100 / orc knight / orc high priest w:5 / orc sorcerer w:5 /\
               stone giant w:2 / orc warlord w:5 / moth of wrath w:1")
-- Drac
  elseif rnd < 105 then
    e.kmons("1 = base draconian w:60 / nonbase draconian")
-- Zot
  elseif rnd < 107 then
    e.kmons("1 = base draconian w:15 / place:Zot:1 w:5 / orb guardian w:2")
-- Chaos
  elseif rnd < 111 then
    e.kmons("1 = shapeshifter / ugly thing w:5 / crawling flesh cage w:2 /\
                 very ugly thing w:5 / neqoxec w:5 /\
                 kobold fleshcrafter / chonchon w:2 /\
                 shining eye w:2 / glowing shapeshifter w:20")
-- Uniques
  elseif rnd < 114 then
    e.kmons("1 =  Blorkula the orcula / Crazy Yiuf / Dowan / Duvessa / Edmund /\
               Erica / Erolcha / Eustachio / Gastronok / Grum / Grinder /\
               Harold / Ijyb / Jessica / Joseph / Josephine / Maurice /\
               Menkaure / Pikel / Prince Ribbit / Pargi / Sigmund /\
               Sonja / Sprozz / Terence / Urug / Agnes / Aizul / Azrael /\
               Donald / Frances / Kirke / Louise / Nergalle / Nessos / Nikola /\
               Polyphemus / Roxanne / Rupert / Saint Roka / Snorg")
-- Holy
  else
    e.kmons("1 = daeva w:5 / angel / fravashi / cherub / ophan / \
                 apis w:5 / nothing w:88")
  end
end

-- Monster sets. Rooms 19-27.
function choose_mset_4(e)
local rnd = crawl.random2(142)
-- Slime
  if rnd < 9 then
    e.kmons("1 = jelly w:5 / slime creature w:25 / colossal amoeba w:5 /\
               glass eye w:2 / golden eye w:4 / void ooze w:4 / slymdra w:4 /\
               eye of devastation w:5 / shining eye w:4 / acid blob /\
               rockslime / azure jelly / star jelly / great orb of eyes w:4 /\
               morphogenic ooze w:2 / eye of draining w:2")
-- Snake
  elseif rnd < 14 then
    e.kmons("1 = anaconda / mana viper / shock serpent / naga mage /\
                 naga warrior / naga ritualist / naga sharpshooter /\
                 nagaraja / guardian serpent / salamander /\
                 salamander mystic / salamander tyrant")
-- Lair
  elseif rnd < 19 then
    e.kmons("1 = caustic shrike / hellephant / spriggan druid / skyshark /\
                 torpor snail / hydra / catoblepas / dire elephant")
-- Spider
  elseif rnd < 26 then
    e.kmons("1 = place:Spider:$ w:70 / ghost moth w:5 / broodmother /\
                 moth of wrath w:5")
-- Crypt
  elseif rnd < 34 then
    e.kmons("1 = place:Crypt:$ zombie / place:Crypt:$ draugr /\
                 skeletal warrior / ancient champion w:7 /\
                 laughing skull w:13 / vampire mage w:5 / vampire knight /\
                 lich w:5 / ancient lich w:2 / cognitogaunt w:5 /\
                 necromancer / vampire bloodprince")
-- Abyss
  elseif rnd < 42 then
    e.kmons("1 = starcursed mass / demonspawn corrupter / place:Abyss:$ w:270")
-- "Forest"
  elseif rnd < 47 then
    e.kmons("1 = caustic shrike / dire elephant / thorn hunter / eleionoma /\
                 satyr / alderking w:3 / spriggan defender /\
                 spriggan air mage / spriggan druid w:3 / spriggan berserker")
-- Shoals
  elseif rnd < 52 then
    e.kmons("1 = place:Shoals:$ w:45 / merfolk javelineer / merfolk impaler /\
                 merfolk aquamancer / sphinx marauder")
    e.kmons("2 = kraken")
    e.subst("1 = 1:15 2:1")
    e.subst(". = W.")
    e.kfeat("2 = deep_water")
    e.kfeat("1 = shallow_water")
-- Cocytus
  elseif rnd < 57 then
    e.kmons("1 = place:Coc:$ w:500 / ice fiend")
-- Gehenna
  elseif rnd < 62 then
    e.kmons("1 = place:Geh:$ w:500 / oni incarcerator")
-- Tartarus
  elseif rnd < 67 then
    e.kmons("1 = place:Tar:$ zombie / place:Depths:$ draugr / soul eater /\
                 shadow dragon w:5 / tzitzimitl w:1 /\
                 spectral thing place:Tar:$ / place:Tar:$ w:5")
-- Dis
  elseif rnd < 72 then
    e.kmons("1 = place:Dis:$ w:500 / hell sentinel")
-- Giant
  elseif rnd < 75 then
    e.kmons("1 = cyclops / stone giant / fire giant / frost giant /\
                 ettin / titan / juggernaut / iron giant / protean progenitor")
-- Fire
  elseif rnd < 78 then
    e.kmons("1 = hell hound / hell hog / fire elemental / efreet / fire dragon /\
                 will-o-the-wisp / fire giant / orb of fire w:5 / balrug")
-- Ice
  elseif rnd < 81 then
    e.kmons("1 = ice beast / polar bear / white imp / simulacrum / rime drake/\
               freezing wraith / ice devil / ice dragon / frost giant /\
               orb of winter w:5 / blizzard demon")
-- Air
  elseif rnd < 84 then
    e.kmons("1 = air elemental / wind drake / spriggan air mage /\
               storm dragon / titan / electric golem")
-- Earth
  elseif rnd < 87 then
    e.kmons("1 = walking earthen tome / war gargoyle /\
                 crystal guardian / stone giant / iron dragon /\
                 quicksilver dragon / walking crystal tome")
-- Dragon
  elseif rnd < 90 then
    e.kmons("1 = swamp drake / rime drake / acid dragon / steam dragon /\
               death drake / swamp dragon / fire dragon / ice dragon /\
               shadow dragon / iron dragon / quicksilver dragon /\
               golden dragon / wyrmhole / wyvern / hydra")
-- Ranged
  elseif rnd < 93 then
    e.kmons("1 = Vashnia, centaur / yaktaur / cyclops / centaur warrior /\
                 kobold blastminer / naga sharpshooter / yaktaur captain /\
                 stone giant / merfolk javelineer / deep elf master archer")
-- Vaults
  elseif rnd < 96 then
    e.kmons("1 = vault guard / vault warden / ironbound preserver w:4 /\
                 ironbound thunderhulk w:4 / ironbound mechanist w:4 /\
                 ancient lich w:4 / lich / yaktaur w:4 /\
                 yaktaur captain w:4 / stone giant w:4 / shadow dragon /\
                 iron dragon / titan w:4 / undying armoury w:4")
-- Pan
  elseif rnd < 100 then
    e.kmons("1 = place:Pan w:5 / pandemonium lord")
-- Tomb
  elseif rnd < 104 then
    e.kmons("1 = place:Tomb:$ w:100 / royal mummy")
-- Elf
  elseif rnd < 114 then
    e.kmons("1 = place:Elf:$ w:50 / deep elf sorcerer / deep elf blademaster /\
               deep elf master archer / deep elf annihilator / deep elf high priest")
-- Orc
  elseif rnd < 119 then
    e.kmons("1 = orc knight / orc high priest w:5 / orc sorcerer w:5 /\
                 stone giant / orc warlord / juggernaut w:5 /\
                 moth of wrath w:2 / undying armoury w:2")
-- Drac
  elseif rnd < 125 then
    e.kmons("1 = base draconian w:30 / nonbase draconian")
-- Zot
  elseif rnd < 128 then
    e.kmons("1 = base draconian / place:Zot:$ / orb guardian w:7")
-- Chaos
  elseif rnd < 136 then
    e.kmons("1 = chonchon w:1 / protean progenitor w:5 / \
                 glowing shapeshifter w:15 / glowing shapeshifter hd:27")
-- Uniques
  elseif rnd < 140 then
    e.kmons("1 =  Blorkula the orcula / Crazy Yiuf / Dowan / Duvessa / Edmund /\
               Erica / Erolcha / Eustachio / Gastronok / Grum / Grinder /\
               Harold / Ijyb / Jessica / Joseph / Josephine / Maurice /\
               Menkaure / Pikel / Prince Ribbit / Pargi / Sigmund /\
               Sonja / Sprozz / Terence / Urug / Agnes / Aizul / Azrael /\
               Donald / Frances / Kirke / Louise / Nergalle / Nessos / Nikola /\
               Polyphemus / Roxanne / Rupert / Saint Roka / Snorg /\
               Antaeus / Asmodeus / Boris / Cerebov / Dispater / Dissolution /\
               Ereshkigal / Frederick / Geryon / Gloorx Vloq / Ignacio /\
               Ilsuiw / Jory / Khufu / Lom Lobon / Mara / Margery / Mennas /\
               Mnoleg / Murray / Nobody / Sojobo / Enchantress /\
               Lernaean hydra / Serpent of Hell /\
               Royal Jelly / Tiamat / Vv / Xtahua / Nellie / Chuck")
-- Holy
  else
    e.kmons("1 = daeva / angel / cherub / pearl dragon / ophan / \
                 fravashi / apis")
  end
end

}}

NAME:   sprint_v
TAGS:   sprint no_item_gen no_trap_gen no_pool_fixup no_rotate no_hmirror no_vmirror
DESC:   Sprint V: "Ziggurat Sprint"
ORDER:  5
ORIENT: encompass
: lfloorcol(util.random_from(
:   {"red", "blue", "green", "magenta", "brown", "lightgrey", "darkgrey"} ))
COLOUR:    x : lightred / lightblue / lightgreen / lightmagenta / yellow / darkgrey
TILE:      x : wall_zot_red / wall_zot_blue / wall_zot_green / wall_zot_magenta
SUBST:     x = X
SUBVAULT:  A : room_start
SUBVAULT:  B : room_1
SUBVAULT:  C : room_2
SUBVAULT:  D : room_3
SUBVAULT:  E : room_4
SUBVAULT:  F : room_5
SUBVAULT:  G : room_6
SUBVAULT:  H : room_7
SUBVAULT:  I : room_8
SUBVAULT:  J : room_9
SUBVAULT:  K : room_10
SUBVAULT:  L : room_11
SUBVAULT:  M : room_12
SUBVAULT:  N : room_13
SUBVAULT:  O : room_14
SUBVAULT:  P : room_15
SUBVAULT:  R : room_16
SUBVAULT:  S : room_17
SUBVAULT:  T : room_18
SUBVAULT:  U : room_19
SUBVAULT:  V : room_20
SUBVAULT:  W : room_21
SUBVAULT:  Y : room_22
SUBVAULT:  Z : room_23
SUBVAULT:  * : room_24
SUBVAULT:  % : room_25
SUBVAULT:  | : room_26
SUBVAULT:  $ : room_27
: lua_marker('a', transp_dest_loc("arena_28"))
KFEAT: ^ = granite_statue
COLOUR: .a^{ = magenta
FTILE:  .a^{< = floor_rough_magenta
KITEM: { = orb of zot
{{
    -- This is so you can't exploit the Abyss.
    local exit = TriggerableFunction:new{func="callback.make_hatch"}
    exit:add_triggerer(DgnTriggerer:new{type="player_move"})
    lua_marker('a', exit)
    lua_marker('<', props_marker {hatch=1})
    subst("< = .")
    subst("a = .")
}}
MAP
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxAAAAAAAAAAAAAAAxxUUUUUUUUUUUUUUUxRRRRRRRRRRRRRxPPPPPPPPPPPxxDDDDDxCCCCCxBBBBBx
xxAAAAAAAAAAAAAAAxxUUUUUUUUUUUUUUUxRRRRRRRRRRRRRxPPPPPPPPPPPxxDDDDDxCCCCCxBBBBBx
xxAAAAAAAAAAAAAAAxxUUUUUUUUUUUUUUUxRRRRRRRRRRRRRxPPPPPPPPPPPxxDDDDDxCCCCCxBBBBBx
xxAAAAAAAAAAAAAAAxxUUUUUUUUUUUUUUUxRRRRRRRRRRRRRxPPPPPPPPPPPxxDDDDDxCCCCCxBBBBBx
xxAAAAAAAAAAAAAAAxxUUUUUUUUUUUUUUUxRRRRRRRRRR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^^xMMMMMMMMMxLLLLLLLLLxKKKKKKKKKxx
xZZZZZZZZZZZZZZZZZxWWWWWWWWWWWWWWWx^...........^xMMMMMMMMMxLLLLLLLLLxKKKKKKKKKxx
xZZZZZZZZZZZZZZZZZxWWWWWWWWWWWWWWWx^..<..{..a..^xMMMMMMMMMxLLLLLLLLLxKKKKKKKKKxx
xZZZZZZZZZZZZZZZZZxWWWWWWWWWWWWWWWx^...........^xMMMMMMMMMxLLLLLLLLLxxxxxxxxxxxx
xZZZZZZZZZZZZZZZZZxWWWWWWWWWWWWWWWx^^^^^^^^^^^^^xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xZZZZZZZZZZZZZZZZZxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx$$$$$$$$$$$$$$$$$$$$x
xZZZZZZZZZZZZZZZZZx%%%%%%%%%%%%%%%%%%%x|||||||||||||||||||x$$$$$$$$$$$$$$$$$$$$x
xxxxxxxxxxxxxxxxxxx%%%%%%%%%%%%%%%%%%%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*****************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
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
ENDMAP

NAME:  room_start
TAGS:  no_item_gen no_trap_gen no_pool_fixup no_rotate no_hmirror no_vmirror
: setup_room(_G, 1)
KFEAT:  a = altar_ashenzari
KFEAT:  b = altar_beogh
KFEAT:  c = altar_cheibriados
KFEAT:  d = altar_dithmenos
KFEAT:  e = altar_elyvilon
KFEAT:  f = altar_fedhas
KFEAT:  g = altar_gozag
KFEAT:  h = altar_hepliaklqana
KFEAT:  j = altar_jiyva
KFEAT:  k = altar_kikubaaqudgha
KFEAT:  l = altar_lugonu
KFEAT:  m = altar_makhleb
KFEAT:  n = altar_nemelex_xobeh
KFEAT:  o = altar_okawaru
KFEAT:  q = altar_qazlal
KFEAT:  r = altar_ru
KFEAT:  s = altar_sif_muna
KFEAT:  t = altar_trog
KFEAT:  u = altar_uskayaw
KFEAT:  v = altar_vehumet
KFEAT:  w = altar_wu_jian
KFEAT:  x = altar_xom
KFEAT:  y = altar_yredelemnul
KFEAT:  z = altar_zin
KFEAT:  1 = altar_the_shining_one
KITEM:    B = plate armour mundane pre_id plus:5, \
              fire dragon scales mundane pre_id plus:5, \
              ice dragon scales mundane pre_id plus:5, \
              storm dragon scales mundane pre_id plus:5, \
              shadow dragon scales mundane pre_id plus:5, \
              golden dragon scales mundane pre_id plus:5, \
              crystal plate armour mundane pre_id plus:5
KITEM:    C = buckler mundane pre_id plus:3, \
              kite shield mundane pre_id plus:3, \
              tower shield mundane pre_id plus:3, \
              orb ego:guile, \
              orb ego:mayhem
KITEM:    D = broad axe mundane pre_id plus:5, \
              battleaxe mundane pre_id plus:5, \
              executioner's axe mundane pre_id plus:5
KITEM:    E = demon trident mundane pre_id plus:5, \
              partisan mundane pre_id plus:5, \
              bardiche mundane pre_id plus:5
KITEM:    F = demon whip mundane pre_id plus:5, \
              great mace mundane pre_id plus:5, \
              giant club mundane pre_id plus:5, \
              giant spiked club mundane pre_id plus:5
KITEM:    G = dagger mundane pre_id plus:5, \
              rapier mundane pre_id plus:5, \
              athame mundane pre_id plus:5, \
              quick blade mundane pre_id plus:5
KITEM:    H = demon blade mundane pre_id plus:5, \
              double sword mundane pre_id plus:5, \
              great sword mundane pre_id plus:5, \
              triple sword mundane pre_id plus:5
KITEM:    I = lajatang mundane pre_id plus:5
KITEM:    J = hand cannon mundane pre_id plus:5, \
              arbalest mundane pre_id plus:5, \
              triple crossbow mundane pre_id plus:5, \
              shortbow mundane pre_id plus:5, \
              orcbow mundane pre_id plus:5, \
              longbow mundane pre_id plus:5, \
              sling mundane pre_id plus:5
KITEM:    K = potion of curing q:9 pre_id, \
              potion of heal wounds q:9 pre_id, \
              potion of berserk rage q:2 pre_id, \
              potion of might q:5 pre_id, \
              potion of magic q:5 pre_id, \
              potion of experience q:1 pre_id, \
              potion of resistance q:4 pre_id, \
              potion of haste q:5 pre_id, \
              potion of invisibility q:2 pre_id, \
              potion of brilliance q:2 pre_id
KITEM:    L = scroll of blinking q:3 pre_id, \
              scroll of fear q:2 pre_id, \
              scroll of identify q:5 pre_id, \
              scroll of fog q:7 pre_id, \
              scroll of amnesia q:4 pre_id
KITEM:    N = any beam wand pre_id charges:7, \
              wand of iceblast pre_id charges:7, \
              wand of mindburst pre_id charges:7
KITEM:    P = ring of strength pre_id plus:6, \
              ring of strength pre_id plus:6, \
              ring of intelligence pre_id plus:6, \
              ring of intelligence pre_id plus:6, \
              ring of dexterity pre_id plus:6, \
              ring of dexterity pre_id plus:6, \
              ring of flight pre_id
KITEM:    R = obsidian_axe pre_id, \
              shield_of_the_gong pre_id, \
              maxwells_patent_armour pre_id, \
              dark_maul pre_id, \
              sniper pre_id, \
              majin-bo pre_id
KITEM:    T = storm_bow pre_id, \
              singing_sword pre_id, \
              mace_of_variability pre_id, \
              sword_of_power pre_id, \
              scythe_of_curses pre_id, \
              skull_of_zonguldrok pre_id, \
              wyrmbane pre_id, \
              plutonium_sword pre_id, \
              devastator pre_id, \
              firestarter pre_id
KITEM:    S = quill talisman, inkwell talisman, lupine talisman, \
              eel talisman, serpent talisman, spider talisman, \
              wellspring talisman, fortress talisman
KFEAT:    ^ = granite_statue
KFEAT:    & = granite_statue
COLOUR:   & = magenta

# Don't place the guaranteed artefacts (represented by glyphs R and T) any
# lower in this subvault. They are placed on the top line to ensure they are
# generated before any superb_items in the sprint. If the superb_items were
# generated before the guaranteed artefacts, they would be able to generate the
# guaranteed artefacts elsewhere in the sprint, which would prevent them from
# spawning in the initial room.

MAP
^g^h^j&A&k^l^m^
f.........RT..n
^.............^
e..HG.........o
^..IF.........^
d..JE.....S...q
^...D.....P...^
c......L......r
^...C..K..N...^
b...B.{.......s
^.............^
a.............t
^1^z^y^x^w^v^u^
ENDMAP

NAME:  room_1
: setup_room(_G, 2)
MAP
.GAG.
.....
.1.1.
.....
.....
..a..
ENDMAP

NAME:  room_2
: setup_room(_G, 3)
MAP
.GAG.
.111.
.....
.....
.....
.....
..a..
ENDMAP

NAME:  room_3
: setup_room(_G, 4)
MAP
.GAG.
.111.
..1..
.....
.....
.....
..a..
ENDMAP

NAME:  room_4
: setup_room(_G, 5)
MAP
..GAG...
..111...
...1....
........
........
.Z....Z.
...a....
ENDMAP

NAME:  room_5
: setup_room(_G, 6)
MAP
..GAG...
..111...
..1.1...
........
........
.Z....Z.
...a....
ENDMAP

NAME:  room_6
: setup_room(_G, 7)
MAP
..GAG..
..111..
..111..
.......
.......
.......
.......
.Z...Z.
...a...
ENDMAP

NAME:  room_7
: setup_room(_G, 8)
MAP
..GAG..
..111..
..111..
.......
.......
.......
.......
.Z...Z.
...a...
ENDMAP


NAME:  room_8
: setup_room(_G, 9)
MAP
...GAG...
..1111...
...111...
.........
.........
.........
.........
.Z.....Z.
....a....
ENDMAP

NAME:  room_9
: setup_room(_G, 10)
MAP
...GAG...
..11111..
...111...
.........
.........
.........
.........
.Z.....Z.
....a....
ENDMAP

NAME:  room_10
: setup_room(_G, 11)
MAP
...GAG...
..11111..
...1111..
.........
.........
.........
.........
.Z.....Z.
....a....
ENDMAP

NAME:  room_11
: setup_room(_G, 12)
MAP
...GAG...
..11111..
..11111..
.........
.........
.........
.........
.........
.Z.....Z.
....a....
ENDMAP

NAME:  room_12
: setup_room(_G, 13)
MAP
...GAG...
..111111.
..11111..
.........
.........
.........
.........
..z...z..
.Z.....Z.
....a....
ENDMAP

NAME:  room_13
: setup_room(_G, 14)
MAP
....GAG....
..1111111..
...11111...
...........
...........
...........
...........
..z.....z..
.zZz...zZz.
..z.....z..
.....a.....
ENDMAP

NAME:  room_14
: setup_room(_G, 15)
MAP
....GAG....
..1111111..
...111111..
...........
...........
...........
...........
..z.....z..
.zZz...zZz.
..z.....z..
.....a.....
ENDMAP

NAME:  room_15
: setup_room(_G, 16)
MAP
....GAG....
..1111111..
..1111111..
...........
...........
...........
...........
..z.....z..
.zZz...zZz.
..z.....z..
.....a.....
ENDMAP

NAME:  room_16
: setup_room(_G, 17)
MAP
.....GAG.....
..11111111...
...1111111...
.............
.............
.............
.............
.............
..z.......z..
.zZz.....zZz.
..z.......z..
.............
......a......
ENDMAP

NAME:  room_17
: setup_room(_G, 18)
MAP
.....GAG.....
..111111111..
..111111111..
.............
.............
.............
.............
.............
..z.......z..
.zZz.....zZz.
..z.......z..
.............
......a......
ENDMAP

NAME:  room_18
: setup_room(_G, 19)
MAP
.....GAG.....
.11111111111.
..111111111..
.............
.............
.............
.............
.............
..z.......z..
.zZz.....zZz.
..z.......z..
.............
......a......
ENDMAP

NAME:  room_19
: setup_room(_G, 20)
MAP
......GAG......
..11111111111..
..11111111111..
...............
...............
...............
...............
...............
...............
...............
...z.......z...
..zZz.....zZz..
...z.......z...
...............
.......a.......
ENDMAP

NAME:  room_20
: setup_room(_G, 21)
MAP
......GAG......
..11111111111..
..11111111111..
......111......
...............
...............
...............
...............
...............
...............
...z.......z...
..zZz.....zZz..
...z.......z...
...............
.......a.......
ENDMAP

NAME:  room_21
: setup_room(_G, 22)
MAP
......GAG......
..11111111111..
..11111111111..
....1111111....
...............
...............
...............
...............
...............
...............
...z.......z...
..zZz.....zZz..
...z.......z...
...............
.......a.......
ENDMAP

NAME:  room_22
: setup_room(_G, 23)
MAP
.......GAG.......
...11111111111...
...11111111111...
...11111111111...
.................
.................
.................
.................
.................
.................
.................
.................
...z.........z...
..zZz.......zZz..
...z.........z...
.................
........a........
ENDMAP

NAME:  room_23
: setup_room(_G, 24)
MAP
.......GAG.......
..1111111111111..
..1111111111111..
..1111111111111..
.................
.................
.................
.................
.................
.................
.................
....z.......z....
...zZz.....zZz...
....z.......z....
.................
.................
........a........
ENDMAP

NAME:  room_24
: setup_room(_G, 25)
MAP
.......GAG.......
.111111111111111.
.111111111111111.
.111111111111111.
.................
.................
.................
.................
.................
.................
.................
.................
....z.......z....
...zZz.....zZz...
....z.......z....
.................
.................
........a........
ENDMAP

NAME:  room_25
: setup_room(_G, 26)
MAP
........GAG........
.11111111111111111.
.11111111111111111.
.11111111111111111.
...................
...................
...................
...................
...................
...................
...................
...................
...................
...................
....z.........z....
...zZz.......zZz...
....z.........z....
...................
...................
.........a.........
ENDMAP

NAME:  room_26
: setup_room(_G, 27)
MAP
........GAG........
.11111111111111111.
.11111111111111111.
.11111111111111111.
.......11111.......
...................
...................
...................
...................
...................
...................
...................
...................
...................
....z.........z....
...zZz.......zZz...
....z.........z....
...................
...................
.........a.........
ENDMAP

NAME:  room_27
: setup_room(_G, 28)
: choose_mset_4(_G)
MAP
........GAG.........
.11111111.111111111.
.111111111111111111.
.111111111111111111.
......1111111.......
.........1..........
....................
....................
....................
....z..........z....
...zZz........zZz...
....z..........z....
....................
....................
....................
....z..........z....
...zZz........zZz...
....z..........z....
....................
....................
.........a..........
ENDMAP
