Anonymous

Module:Monsters: Difference between revisions

From Melvor Idle
_getMonsterTable: Amend alignment of monster style icon; getMonsterAttacks: Amend spacing for normal attack line
No edit summary
(_getMonsterTable: Amend alignment of monster style icon; getMonsterAttacks: Amend spacing for normal attack line)
Line 539: Line 539:
   end
   end
   if normalAttackChance == 100 then
   if normalAttackChance == 100 then
     result = iconText..'1 - '..p._getMonsterBaseMaxHit(monster)..' '..typeText..' Damage'
     result = iconText..' 1 - '..p._getMonsterBaseMaxHit(monster)..' '..typeText..' Damage'
   elseif normalAttackChance > 0 then
   elseif normalAttackChance > 0 then
     result = '* '..normalAttackChance..'% '..iconText..'1 - '..p.getMonsterBaseMaxHit(frame)..' '..typeText..' Damage'..result
     result = '* '..normalAttackChance..'% '..iconText..' 1 - '..p.getMonsterBaseMaxHit(frame)..' '..typeText..' Damage'..result
   elseif hasActiveBuffSpec then
   elseif hasActiveBuffSpec then
     --If the monster normally has a 0% chance of doing a normal attack but some special attacks can't be repeated, include it
     --If the monster normally has a 0% chance of doing a normal attack but some special attacks can't be repeated, include it
Line 1,210: Line 1,210:
     table.insert(tableParts, '\r\n|style="text-align:right" data-sort-value="' .. cmbLevel .. '" |' .. Shared.formatnum(cmbLevel))
     table.insert(tableParts, '\r\n|style="text-align:right" data-sort-value="' .. cmbLevel .. '" |' .. Shared.formatnum(cmbLevel))
     table.insert(tableParts, '\r\n|style="text-align:right" data-sort-value="' .. p._getMonsterHP(monster) .. '" |' .. Shared.formatnum(p._getMonsterHP(monster)))
     table.insert(tableParts, '\r\n|style="text-align:right" data-sort-value="' .. p._getMonsterHP(monster) .. '" |' .. Shared.formatnum(p._getMonsterHP(monster)))
     table.insert(tableParts, '\r\n|style="text-align:right;white-space:nowrap" |' .. p._getMonsterStyleIcon({monster, notext=true}))
     table.insert(tableParts, '\r\n|style="text-align:center" |' .. p._getMonsterStyleIcon({monster, notext=true}))
     table.insert(tableParts, '\r\n|style="text-align:right" data-sort-value="' .. atkSpeed .. '" |' .. Shared.round(atkSpeed, 1, 1))
     table.insert(tableParts, '\r\n|style="text-align:right" data-sort-value="' .. atkSpeed .. '" |' .. Shared.round(atkSpeed, 1, 1))
     table.insert(tableParts, '\r\n|style="text-align:right" data-sort-value="' .. maxHit .. '" |' .. Shared.formatnum(maxHit))
     table.insert(tableParts, '\r\n|style="text-align:right" data-sort-value="' .. maxHit .. '" |' .. Shared.formatnum(maxHit))