Anonymous

Module:Monsters: Difference between revisions

From Melvor Idle
m
added _getAfflictedMonsterIdList
(getChestDrops: Refactor to avoid modifying item object; Other optimizations)
m (added _getAfflictedMonsterIdList)
Line 1,519: Line 1,519:


return table.concat(resultPart)
return table.concat(resultPart)
end
function p._getAfflictedMonsterIdList()
idlist = {}
banned = {159, 160}
local darkwaters = Areas.getArea("Dark Waters")
for i, id in ipairs(darkwaters.monsters) do
table.insert(banned, id)
end
for i, monster in ipairs(MonsterData.Monsters) do
ok = true
for _, id in Shared.skpairs(banned) do
if monster.id == id then
ok = false
end
end
if ok then
local lvl = p._getMonsterCombatLevel(monster)
if lvl >= 165 and lvl <= 677 then
table.insert(idlist, monster.id)
end
end
end
return idlist
end
end


return p
return p
892

edits