git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7644 c06c8d41-db1a-0410-9941-cceddc491573
C3IXVWASG4ZZNG72FVRIT45VQHLBSP4YW5RE2JTJOQ3RAFRH5OUQC function fill_special_room(mon, lord_mon, pack)local level, tl_x, tl_y, br_x, br_y = dgn.get_special_room_info()-- Return early if we're being called during map validation.if not level thenreturnendif type(mon) == "table" thenlocal str = mon[1]for i = 2, table.getn(mon) dostr = str .. " / " .. mon[i]endmon = strendlocal lord_x, los_y = -1, -1if lord_mon thenlord_x = crawl.random_range(tl_x, br_x)lord_y = crawl.random_range(tl_y, br_y)endfor x = tl_x, br_x dofor y = tl_y, br_y doif (pack or not crawl.one_chance_in(4))and not (lord_x == x and lord_y == y)thendgn.create_monster(x, y, mon)endendendif lord_mon thendgn.create_monster(lord_x, lord_y, lord_mon)endendfunction sroom_kobold_lair()local level = dgn.get_special_room_info()-- Return early if we're being called during map validation.if not level thenreturnendlocal level_mons = 3if level < 4 thenlevel_mons = 0elseif level < 6 thenlevel_mons = 1elseif level < 9 thenlevel_mons = 2endlocal big_freq = 3 + level_monslocal small_freq = 10 - big_freqlocal mon = "kobold w:" .. small_freq .. " / big kobold w:" .. big_freqfill_special_room(mon, "big kobold")endfunction sroom_orc_lair()local level = dgn.get_special_room_info()
function fill_special_room(mon)
-- Return early if we're being called during map validation.if not level thenreturnendlocal monif level > 24 thenmon = "orc w:2 / orc warrior w:3 / orc knight w:2 / ogre w:2 / ".. "troll w:1"elseif level > 15 thenmon = "orc w:6 / orc knight w:1 / orc warrior w:2 / ogre w:1"elseif level > 9 thenmon = "orc w:8 / orc warrior w:2"elsemon = "orc w:9 / orc warrior w:1"endfill_special_room(mon)endfunction sroom_beehive()
local mons = {}mons[1] = "ooze w:" .. (27 - math.floor(level / 5))mons[2] = "jelly w:20"mons[3] = "brown_ooze w:" .. (3 + level)mons[4] = "death ooze w:" .. (2 + (2 * math.floor(level / 3)))if level >= 12 thenmons[5] = "azure jelly w:" .. (1 + math.floor((level - 12)/3))endif level >= 15 thenmons[6] = "acid blob w:" .. (1 + math.floor((level - 15) / 4))endfill_special_room(mons, nil, true)end