Anonymous

Module:Monsters: Difference between revisions

From Melvor Idle
m
Add resistance icon before resistance values
(Add getBossMonsterTable for creating a table of boss monsters only)
m (Add resistance icon before resistance values)
Line 1,780: Line 1,780:
table.insert(tableParts, '!!style="padding:0 1em 0 0"|' .. Icons.Icon({'Hitpoints', type='skill'}))
table.insert(tableParts, '!!style="padding:0 1em 0 0"|' .. Icons.Icon({'Hitpoints', type='skill'}))
table.insert(tableParts, '!!Attack Speed (s) !!colspan="3"|Max Hit ')
table.insert(tableParts, '!!Attack Speed (s) !!colspan="3"|Max Hit ')
table.insert(tableParts, '!!DR!!' .. Icons.Icon({'Coins', notext=true, nolink=true}) .. ' Coins !!Bones !!Locations')
table.insert(tableParts, '!!DR/AR!!' .. Icons.Icon({'Coins', notext=true, nolink=true}) .. ' Coins !!Bones !!Locations')


-- Generate row per monster
-- Generate row per monster
Line 1,792: Line 1,792:
local atkSpeed = p._getMonsterAttackSpeed(monster)
local atkSpeed = p._getMonsterAttackSpeed(monster)
local maxHit = p._getMonsterMaxHit(monster)
local maxHit = p._getMonsterMaxHit(monster)
local resistance = p._getMonsterResistance(monster)
local resistance, resistanceText = p._getMonsterResistance(monster)
local drReduce = p._getMonsterDrReduction(monster)
local drReduce = p._getMonsterDrReduction(monster)
local currVal = 0
local currVal = 0
Line 1,816: Line 1,816:
table.insert(tableParts, '\r\n|style="text-align:right"|' .. Num.formatnum(maxHit))
table.insert(tableParts, '\r\n|style="text-align:right"|' .. Num.formatnum(maxHit))
end
end
table.insert(tableParts, '\r\n|style="text-align:right" data-sort-value="' .. resistance .. '" |' .. resistance..'%')
table.insert(tableParts, '\r\n|style="text-align:right" data-sort-value="' .. resistance .. '" |' .. Icons.Icon({resistanceText, notext=true}) .. resistance..'%')
table.insert(tableParts, '\r\n|style="text-align:right" data-sort-value="' .. currVal .. '" |' .. currText)
table.insert(tableParts, '\r\n|style="text-align:right" data-sort-value="' .. currVal .. '" |' .. currText)
table.insert(tableParts, '\r\n|style="text-align:center" |' .. boneTxt)
table.insert(tableParts, '\r\n|style="text-align:center" |' .. boneTxt)