4,951
edits
Falterfire (talk | contribs) (fuckin' spiders man) |
Falterfire (talk | contribs) (Making sure bosses get counted. Also still fuck spiders.) |
||
Line 599: | Line 599: | ||
for i, monsterID in pairs(area.monsters) do | for i, monsterID in pairs(area.monsters) do | ||
local monster = p.getMonsterByID(monsterID) | local monster = p.getMonsterByID(monsterID) | ||
if monster.id ~= lastID | if monster.id ~= lastID then | ||
if lastMonster ~= nil then | if lastMonster ~= nil then | ||
local name = lastMonster.name | local name = lastMonster.name | ||
if lastMonster.id == 51 then name = 'Spider2' end | if lastMonster.id == 51 then name = 'Spider2' end | ||
table.insert(monsterList, Icons.Icon({ | table.insert(monsterList, Icons.Icon({name, type='monster'})..' x'..count) | ||
end | end | ||
lastMonster = monster | lastMonster = monster | ||
lastID = monster.id | lastID = monster.id | ||
count = 1 | count = 1 | ||
--Make sure the final monster in the dungeon gets counted | |||
if i == Shared.tableCount(monsterList) then | |||
local name = lastMonster.name | |||
if lastMonster.id == 51 then name = 'Spider2' end | |||
table.insert(monsterList, Icons.Icon({lastMonster.name, type='monster'})..' x'..count) | |||
end | |||
else | else | ||
count = count + 1 | count = count + 1 |