4,687
edits
No edit summary |
m (Only allow Normal Damage monsters to show in the Stormsnap table) |
||
Line 20: | Line 20: | ||
-- Generate row per monster | -- Generate row per monster | ||
for i, monster in ipairs(GameData.rawData.monsters) do | for i, monster in ipairs(GameData.rawData.monsters) do | ||
local magicLevel = Monsters._getMonsterLevel(monster, 'Magic') | if monster.damageType == nil or monster.damageType == 'melvorD:Normal' then | ||
local magicLevel = Monsters._getMonsterLevel(monster, 'Magic') | |||
local rangedStrBonus = 111 + math.floor((6 * magicLevel)/33) | |||
local rangedAttBonus = math.floor(102 * (1 + ((6 * magicLevel)/5500))) | |||
if magicLevel > 1 then | |||
table.insert(tableParts, '\r\n|-\r\n|style="text-align: center;" |' .. Icons.Icon({monster.name, type='monster', size=50, notext=true})) | |||
table.insert(tableParts, '\r\n|style="text-align:left" |' .. Icons.Icon({monster.name, type='monster', noicon=true})) | |||
table.insert(tableParts, '\r\n|style="text-align:right" data-sort-value="' .. magicLevel .. '" |' .. Num.formatnum(magicLevel)) | |||
table.insert(tableParts, '\r\n|style="text-align:right" data-sort-value="' .. rangedAttBonus .. '" |' .. Num.formatnum(rangedAttBonus)) | |||
table.insert(tableParts, '\r\n|style="text-align:right" data-sort-value="' .. rangedStrBonus .. '" |' .. Num.formatnum(rangedStrBonus)) | |||
end | |||
end | end | ||
end | end |