git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7618 c06c8d41-db1a-0410-9941-cceddc491573
5DECJIOSMFWX7DMDTGVNPNV6QQP6O34F3XHFHRXGCTJUZMVIXT7QC
"Elf:7", "Orc:4", "Vault:8", "Slime:6",
"Snake:5", "Lair:10", "Tomb:3", "Crypt:5",
"Abyss", "Shoal:5", "Pan"
-- Dress up monster sets a bit.
"place:Elf:7 w:300 / deep elf blademaster / deep elf master archer / " ..
"deep elf annihilator / deep elf sorcerer / deep elf demonologist",
"place:Orc:4 w:120 / orc warlord / orc knight / stone giant",
"place:Vault:8",
"place:Slime:6",
"place:Snake:5",
"place:Lair:10",
"place:Tomb:3",
"place:Crypt:5",
"place:Abyss",
"place:Shoal:5",
depth_ge(6, "place:Pan w:100 / w:15 pandemonium lord"),
depth_lt(6, "place:Pan")
table.insert(res, fn(unpack(args)))
local nval = fn(unpack(args))
if nval ~= nil then
table.insert(res, nval)
end
end
end
return res
end
function util.filter(fn, list)
local res = { }
for _, val in ipairs(list) do
if fn(val) then
table.insert(res, val)