lua {{ function fill_special_room(e, mon, lord_mon, pack) if type(mon) == "table" then mon = util.join(" / ", mon) end e.default_subvault_glyphs() if pack then e.subst('. : 1') else e.subst('. = 1:30 .') end -- Limit the number of monsters. e.nsubst('1 = 24:1 / 3 = 1. / *:.') if lord_mon then e.nsubst('1 = 1:2 / *:1') e.kmons('2 = ' .. lord_mon) end e.kmons('1 = ' .. mon) end function sroom_kobold_lair(e) local level = you.absdepth() - 1 -- Return early if we're being called during map validation. if e.is_validating() then return end local level_mons = 3 if level < 4 then level_mons = 0 elseif level < 6 then level_mons = 1 elseif level < 9 then level_mons = 2 end local big_freq = 3 + level_mons local small_freq = 10 - big_freq local mon = "kobold w:" .. small_freq .. " / big kobold w:" .. big_freq if level > 11 or you.branch() == "Orc" then lord_mon = "kobold demonologist / big kobold" else lord_mon = "big kobold" end fill_special_room(e, mon, lord_mon) end function sroom_orc_lair(e) local level = you.absdepth() - 1 -- Return early if we're being called during map validation. if e.is_validating() then return end local mon -- Buff Orc:Foo rooms despite depth to be harder than regular floors in Orc. if you.branch() == "Orc" then mon = "orc w:12 / orc warrior w:5 / orc priest w:2 / " .. "orc knight w:1" lord_mon = "orc sorcerer w:1 / orc high priest w:9 / " .. "orc warlord w:5 / orc knight" else if level > 20 or you.branch() == "Elf" then mon = "orc w:5 / orc priest w:4 / orc warrior / orc knight w:8 / " .. " orc high priest w:1 / ogre w:1 / troll w:1" lord_mon = "orc warlord w:9 / orc high priest w:1" elseif level > 14 then mon = "orc w:9 / orc warrior w:5 / orc priest w:2 / " .. "orc knight w:3 / ogre w:1 " lord_mon = "orc knight / orc high priest w:9 / orc warlord w:1" elseif level > 9 then mon = "orc w:35 / orc warrior / orc priest w:3 / ogre w:2" lord_mon = "orc warrior w:1 / orc priest w:7 / orc knight w:2" else mon = "orc w:44 / orc warrior w:5 / ogre w:1" lord_mon = "orc warrior / orc priest w:5" end end fill_special_room(e, mon, lord_mon, true) if crawl.coinflip() then e.kfeat('2 = altar_beogh') end e.kitem('1. = gold level:' .. level - 4 .. ' w:1 / nothing w:8') e.kitem('2 = gold') end function sroom_beehive(e) if e.is_validating() then return end fill_special_room(e, "patrolling killer bee", "patrolling queen bee", true) e.kitem('12 = royal jelly / nothing') end function sroom_morgue(e) if e.is_validating() then return end local bodies local bodies_chance local weap = "" if you.branch() == "Geh" then weap = " ego:flaming ident:type" elseif you.branch() == "Coc" then weap = " ego:freezing ident:type" elseif you.branch() == "Dis" then weap = " good_item" elseif you.branch() == "Tar" then weap = " ego:draining ident:type" end local mons = {} mons[1] = "zombie w:14 / skeleton w:5 / spectral thing w:1" mons[2] = "shadow wraith w:2 / soul eater w:2 / vampire w:2 / " .. "flayed ghost w:2 / shadow w:2" mons[3] = "skeletal warrior w:15 ; great mace" .. weap .. " | glaive" .. weap .. " | battleaxe" .. weap mons[4] = "vampire knight w:5 ; great mace" .. weap .. " | glaive" .. weap .. " | battleaxe" .. weap if you.branch() == "Geh" then mons[5] = "fire giant zombie w:3 / fire giant skeleton w:3 / " .. "fire dragon zombie w:2 / fire dragon skeleton w:2" mons[6] = "flayed ghost" bodies = "fire giant corpse / fire giant skeleton / " .. "fire dragon corpse / fire dragon skeleton" bodies_chance = 40 elseif you.branch() == "Coc" then mons[5] = "hydra zombie w:3 / hydra simulacrum w:3 / " .. "alligator snapping turtle zombie w:2 / " .. "alligator snapping turtle skeleton w:2" mons[6] = "freezing wraith w:7 / bog body w:3" bodies = "frost giant corpse / frost giant skeleton / " .. "ice dragon corpse / ice dragon skeleton / " .. "alligator snapping turtle corpse / " .. "alligator snapping turtle skeleton / " .. "hydra corpse / hydra skeleton" bodies_chance = 40 elseif you.branch() == "Dis" then mons[5] = "iron troll zombie w:2 / iron troll skeleton w:2 / " .. "iron dragon zombie w:3 / iron dragon skeleton w:3" mons[6] = "ancient champion w:7 / phantasmal warrior w:3" bodies = "iron dragon corpse / iron dragon skeleton / " .. "iron troll corpse / iron troll skeleton" bodies_chance = 40 elseif you.branch() == "Tar" or you.branch() == "Crypt" then mons[5] = "eidolon w:6 / jiangshi w:6" mons[6] = "mummy priest w:2 / death knight w:2 / revenant w:2" bodies = "shadow dragon corpse / base draconian corpse / " .. "dire elephant corpse" bodies_chance = 33 else mons[5] = "necromancer / deep elf death mage w:5" mons[6] = "shadow dragon w:5" bodies = "any corpse / any skeleton" bodies_chance = 33 end if you.absdepth() > 27 then mons[7] = "reaper w:9 / bone dragon w:1" end if you.absdepth() > 24 or crawl.x_chance_in_y(you.absdepth() - 20, 5) then lord_mon = "lich" else lord_mon = "vampire mage" end fill_special_room(e, mons, lord_mon, true) if you.branch() == "Depths" or you.branch() == "Crypt" then e.kitem('2 = randbook disc:necromancy') else -- XXX: Any better ways to place the stair? e.kfeat('> = stone_stairs_down_i / stone_stairs_down_ii / ' .. 'stone_stairs_down_iii / escape_hatch_down / floor') e.nsubst('1 = 1:> / *:1') end e.subst(". = .:" .. (100 - bodies_chance) .. " _:" .. bodies_chance) e.subst("1 = 1:" .. (100 - bodies_chance) .. " !:" .. bodies_chance) e.kmons("! = " .. mons[1]) e.kfeat("_ = .") dgn.delayed_decay(e, '!_', bodies) end function sroom_jelly_pit(e) -- Return early if we're being called during map validation. if e.is_validating() then return end local level = you.absdepth() - 1 if you.branch() == "Slime" then level = you.absdepth() + 10 end local mons = {} mons[1] = "ooze w:" .. (27 - math.floor(level / 3)) mons[2] = "jelly w:15" mons[3] = "great orb of eyes w:" .. (3 + level) mons[4] = "death ooze w:" .. (2 + (2 * math.floor(level / 3))) if level >= 12 then mons[5] = "azure jelly w:" .. (1 + math.floor((level - 12)/3)) end if level >= 15 then mons[6] = "acid blob w:" .. (1 + math.floor((level - 15) / 4)) end fill_special_room(e, mons, nil, true) e.nsubst('1. = 2 = x1') if crawl.coinflip() and you.branch() ~= "Slime" then e.nsubst('1. = 1:A') e.kfeat('A = altar_jiyva') end end function sroom_mythical_zoo(e) -- Return early if we're being called during map validation. if e.is_validating() then return end local Z = you.absdepth() if you.branch() == "Elf" then Z = Z + 5 elseif you.branch() == "Lair" then Z = Z - 2 end local mons = {} mons[1] = "fire drake w:" .. math.max(38 - Z * 2, 1) mons[2] = "basilisk w:" .. math.max(38 - Z * 2, 1) mons[3] = "wyvern w:" .. math.max(42 - Z * 2, 1) mons[4] = "hippogriff w:" .. math.max(42 - Z * 2, 1) mons[5] = "hell hound w:" .. math.max(Z - 11, 1) mons[6] = "griffon w:" .. math.max(Z * 2 - 28, 1) mons[7] = "hydra w:" .. math.max(Z * 2 - 26, 1) mons[8] = "manticore w:" .. math.max(Z * 2 - 26, 1) if Z >= 16 then mons[9] = "harpy w:" .. (Z - 15) end if Z >= 19 then mons[10] = "fire dragon w:" .. (Z * 2 - 37) mons[11] = "sphinx w:" .. (Z - 18) end if Z >= 21 then lord_mon = "catoblepas / sphinx w:40 / hell beast w:20 / apis w:20" elseif Z >= 16 then lord_mon = "catoblepas / hydra w:40 / fire dragon w:35 / apis w:5" else lord_mon = "catoblepas / griffon w:40 / hydra w:40" end fill_special_room(e, mons, lord_mon, true) e.kitem('2 = gold good_item w:' .. Z - 7 .. ' / gold w:' .. Z + 7 .. ', ' .. 'box of beasts w:3 / nothing w:17') end }} ########################### NAME: special_room_kobold DEPTH: D:7-12, Orc:1-3 TAGS: special_room unrand WEIGHT: 11 : sroom_kobold_lair(_G) MAP ENDMAP NAME: special_room_orc DEPTH: D:9-, Orc:1-3, Elf, Vaults TAGS: special_room allow_dup unrand WEIGHT: 59 (D:8-12, Orc), 40 (D:13-, Elf:1), 32 : sroom_orc_lair(_G) MAP ENDMAP NAME: special_room_bee DEPTH: D:9-, Lair, Orc:1-3, Spider TAGS: special_room unrand WEIGHT: 30 (D:9-12, Orc, Lair:1-4), 24 (D:13-, Lair:5-7), 20 : sroom_beehive(_G) MAP ENDMAP NAME: special_room_morgue DEPTH: Depths, Crypt, Dis, Tar, Coc, Geh TAGS: special_room allow_dup unrand WEIGHT: 29 (Depths:1-3), 34 : sroom_morgue(_G) MAP ENDMAP NAME: special_room_jelly DEPTH: Depths, Lair:$, Slime TAGS: special_room allow_dup unrand WEIGHT: 9 (Lair:$), 13 (Depths:1-3), 40 : sroom_jelly_pit(_G) MAP ENDMAP NAME: special_room_mythical_zoo DEPTH: D:14-, Depths, Lair:4-, Elf TAGS: special_room allow_dup unrand WEIGHT: 20 (D:14-, Lair:4-6), 25 (Depths:1-3, Lair:7-, Elf), 28 : sroom_mythical_zoo(_G) MAP ENDMAP