Module:Monsters: Difference between revisions

Reorganizing to hopefully fix issue with boss monsters getting left out
(More consistent quantity)
(Reorganizing to hopefully fix issue with boss monsters getting left out)
Line 608: Line 608:
       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', qty=count}))
      end
     else
     else
       count = count + 1
       count = count + 1
    end
    --Make sure the final monster in the dungeon gets counted
    if i == Shared.tableCount(monsterList) then
      local name = lastMonster.name
      table.insert(monsterList, Icons.Icon({lastMonster.name, type='monster', qty=count}))
     end
     end
   end
   end