17,105
edits
(monsters -> monsterIDs to match game data) |
(Amend/correct handling for random ITM and random spider lair monsters) |
||
Line 953: | Line 953: | ||
local monIcon, monLevel, monHP, monMaxHit, monStyle, monCount | local monIcon, monLevel, monHP, monMaxHit, monStyle, monCount | ||
local monData = {} | local monData = {} | ||
if specialType ~= nil and Shared.contains({'Afflicted', 'SlayerArea'}, specialType) then | if specialType ~= nil and Shared.contains({'Afflicted', 'Spider', 'SlayerArea'}, specialType) then | ||
-- Special handling for Into the Mist | -- Special handling for Into the Mist | ||
if specialType == 'Afflicted' then | if specialType == 'Afflicted' then | ||
local iconQ = Icons.Icon({'Into the Mist', notext=true, nolink=true, img='Question'}) | local iconQ = Icons.Icon({'Into the Mist', notext=true, nolink=true, img='Question'}) | ||
monIcon = Icons.Icon({'Into the Mist', 'Afflicted Monster', nolink=true, img='Question'}) | monIcon = Icons.Icon({'Into the Mist', 'Afflicted Monster', nolink=true, img='Question'}) | ||
monLevel, monHP, monMaxHit, monStyle, monCount = iconQ, iconQ, iconQ, iconQ, monsterCount | |||
elseif specialType == 'Spider' then | |||
local iconQ = Icons.Icon({'', notext=true, nolink=true, img='Question'}) | |||
monLevel, monHP, monMaxHit, monStyle, monCount = iconQ, iconQ, iconQ, iconQ, monsterCount | monLevel, monHP, monMaxHit, monStyle, monCount = iconQ, iconQ, iconQ, iconQ, monsterCount | ||
elseif specialType == 'SlayerArea' then | elseif specialType == 'SlayerArea' then | ||
Line 1,029: | Line 1,032: | ||
for i, monsterID in pairs(area.monsterIDs) do | for i, monsterID in pairs(area.monsterIDs) do | ||
if not Shared.contains(usedMonsters, monsterID) then | if not Shared.contains(usedMonsters, monsterID) then | ||
if monsterID | if monsterID == 'melvorF:RandomITM' then | ||
--Special handling for Into the Mist | --Special handling for Into the Mist | ||
table.insert(returnPart, buildRow(monsterID, monsterCounts[monsterID], 'Afflicted')) | table.insert(returnPart, buildRow(monsterID, monsterCounts[monsterID], 'Afflicted')) | ||
elseif monsterID == 'melvorTotH:RandomSpiderLair' then | |||
table.insert(returnPart, buildRow(monsterID, monsterCounts[monsterID], 'Spider')) | |||
else | |||
table.insert(returnPart, buildRow(monsterID, monsterCounts[monsterID])) | |||
end | end | ||
table.insert(usedMonsters, monsterID) | table.insert(usedMonsters, monsterID) | ||
Line 1,082: | Line 1,087: | ||
for i, monsterID in Shared.skpairs(area.monsterIDs) do | for i, monsterID in Shared.skpairs(area.monsterIDs) do | ||
if monsterID ~= lastID then | if monsterID ~= lastID then | ||
if monsterID == 'melvorF:RandomITM' then | |||
if monsterID | --Special handling for Afflicted Monsters | ||
table.insert(monsterList, Icons.Icon({'Affliction', 'Afflicted Monster', img='Question', qty=count})) | |||
elseif monsterID == 'melvorTotH:RandomSpiderLair' then | |||
table.insert(monsterList, Icons.Icon({'Spider', img='Question', nolink=true, qty=count})) | |||
else | |||
else | local monster = p.getMonsterByID(monsterID) | ||
table.insert(monsterList, Icons.Icon({monster.name, type='monster', qty=count})) | |||
end | end | ||
lastMonster = monster | lastMonster = monster |