Module:Augmented degrade

local p = {}

local slots = { ['2h'] = 1.5, ['mh'] = 1.0, ['body'] = 1.0, ['legs'] = 1.0, ['shield'] = 0.5, ['oh'] = 0.5 }

function p.main(frame) local args = frame:getParent.args local level = tonumber(args.level or 1) local slot = string.lower(args.slot or '') local slot_multiplier = slots[slot] or 1 page_title = mw.title.getCurrentTitle.fullText

if level < 70 then drain = 1 else drain = (level-60)/7.2 end

drain = math.floor((drain * slot_multiplier * 100 + .5) / 100) local ret = string.format("The %s degrades with the charges stored in the universal charge pack. Without any reductions researched, this item degrades at a rate of %s charges per second. The charge pack can be replenished with Divine charges, which add 3,000 charges each.\n\n"..		"When the charge pack runs out of charges, augmented equipment loses its stats and gizmo effects. The item can also no longer gain any equipment experience. The item will still retain its gizmos and level, meaning nothing will be lost when the pack is recharged.",page_title,drain)

return ret end

return p