Anonymous

Module:CombatAreas: Difference between revisions

From Melvor Idle
getMonsterAreas: Add handling for Lair of the Spider Queen random monster pool
(Update for v1.1)
(getMonsterAreas: Add handling for Lair of the Spider Queen random monster pool)
Line 135: Line 135:


function p.getMonsterAreas(monsterID)
function p.getMonsterAreas(monsterID)
-- Special handling for Lair of the Spider Queen, which has a random list of enemies
local randomSpiderCheck = Shared.contains(GameData.rawData.spiderLairMonsters, monsterID)
return p.getAreas(
return p.getAreas(
        function(area)
function(area)
          return Shared.contains(area.monsterIDs, monsterID)  
return Shared.contains(area.monsterIDs, monsterID) or
        end)
(randomSpiderCheck and Shared.contains(area.monsterIDs, 'melvorTotH:RandomSpiderLair'))
end)
end
end