Module:Monsters: Difference between revisions

Adds average HP per chest when chest drops only foods (Eg.: Food Box 1)
(Added Barrier Dust drops to 'Always Drops')
(Adds average HP per chest when chest drops only foods (Eg.: Food Box 1))
Line 1,247: Line 1,247:
local hp = thisItem.healsFor * 10
local hp = thisItem.healsFor * 10
local minHeal, maxHeal = hp * row.minQuantity, hp * row.maxQuantity
local minHeal, maxHeal = hp * row.minQuantity, hp * row.maxQuantity
foodValue = foodValue + (dropChance * 0.01 * (minHeal + maxHeal) / 2)
local avgHpPerLoot = (dropChance * 0.01 * (minHeal + maxHeal) / 2)
foodValue = foodValue + avgHpPerLoot
result = result .. '||data-sort-value="' .. thisItem.healsFor .. '"'
result = result .. '||data-sort-value="' .. thisItem.healsFor .. '"'
result = result .. '|' .. Icons.Icon({'Hitpoints', type='skill', notext=true, nolink=true}) .. ' ' .. formatNumRange(minHeal, maxHeal)
result = result .. '|' .. Icons.Icon({'Hitpoints', type='skill', notext=true, nolink=true}) .. ' ' .. formatNumRange(minHeal, maxHeal)
result = result .. '||data-sort-value="' .. avgHpPerLoot .. '"'
result = result .. '|' .. Icons.Icon({'Hitpoints', type='skill', notext=true, nolink=true}) .. ' ' .. Shared.round(avgHpPerLoot, 2, 0)
end
end
end
end
11

edits