Module:Boss
From IdleOn MMO Wiki
Documentation for this module may be created at Module:Boss/doc
local p = {}
local NumberFormater = require("Module:NumberFormater")
local DefenseCalc = require("Module:DefenseCalc")
local Utility = require("Module:Utility")
function p.bossAttacksInfoBox(frame)
local frameArgs = frame.args
local attackList = Utility.explode(frameArgs.attackList,",")
local damageList = Utility.explode(frameArgs.damageList,",")
local ret = ""
for i = 1, #attackList do
ret = ret .. "<div class='pi-item pi-data pi-item-spacing pi-border-color' data-source=''><h3 class='pi-data-label pi-secondary-font' style='width: 80px;'>" .. attackList[i] .. "</h3><div class='pi-data-value pi-font'>"
if(damageList[i])
then
local atkDamage = damageList[i]
local defZero = DefenseCalc.calc({ args = { Attack = atkDamage } })
ret = ret .. NumberFormater.formatnumberwithtootip(damageList[i]) .. " <span class='simple-tooltip simple-tooltip-inline tooltipstered' data-simple-tooltip='<span class='text-only'>Required defense for zero damage</span>'>(" .. NumberFormater.formatwithseperator(defZero) .. ")</span></div></div>"
else
ret = ret .. "N/A</div></div>"
end
end
return ret
end
return p