Anonymous

Module:Monsters: Difference between revisions

From Melvor Idle
Added override for afflicted monsters for Into the Mist
No edit summary
(Added override for afflicted monsters for Into the Mist)
Line 570: Line 570:
       local name = monster.name
       local name = monster.name
       if monsterID == 51 then name = 'Spider2' end
       if monsterID == 51 then name = 'Spider2' end
       tableTxt = tableTxt..'\r\n|-\r\n|'..Icons.Icon({name, type='monster'})
       if monsterID ~= 0 then
      tableTxt = tableTxt..'||'..p.getMonsterCombatLevel(name)
        --Special handling for Into the Mist
      tableTxt = tableTxt..'||'..Shared.formatnum(p.getMonsterHP(name))
        tableTxt = tableTxt..'\r\n|-\r\n|'..Icons.Icon({name, type='monster'})
      tableTxt = tableTxt..'||'..Shared.formatnum(p.getMonsterMaxHit(name))
        tableTxt = tableTxt..'||'..p.getMonsterCombatLevel(name)
      tableTxt = tableTxt..'||'..p.getMonsterStyleIcon({name, nolink='true'})
        tableTxt = tableTxt..'||'..Shared.formatnum(p.getMonsterHP(name))
       tableTxt = tableTxt..'||'..monsterCounts[monsterID]
        tableTxt = tableTxt..'||'..Shared.formatnum(p.getMonsterMaxHit(name))
        tableTxt = tableTxt..'||'..p.getMonsterStyleIcon({name, nolink='true'})
        tableTxt = tableTxt..'||'..monsterCounts[monsterID]
       else
        tableTxt = tableTxt..'\r\n|-\r\n|'..Icons.Icon({'Into the Mist', 'Random Afflicted Monster', nolink=true, img='Question'})
        tableTxt = tableTxt..'||data-sort-value="0"|?'
        tableTxt = tableTxt..'||data-sort-value="0"|?'
        tableTxt = tableTxt..'||data-sort-value="0"|?'
        tableTxt = tableTxt..'||data-sort-value="0"|?'
        tableTxt = tableTxt..'||'..monsterCounts[monsterID]
      end
       table.insert(usedMonsters, monsterID)
       table.insert(usedMonsters, monsterID)
     end
     end