Module:Sandbox/TheTrueShaman

local p = {} local getArgs = require('Module:Arguments').getArgs local loader = require('Module:Loader')

local string, table, yesno = loader.require('String', 'Table', 'Yesno')

local armorData = loader.require('Module:Armor/Data') local getArgs = require('Module:Arguments').getArgs

function p.getArmorData(frame) local args = getArgs(frame) local armor = (args[1] or args['armor']):lower local growth = args['growth'] or 5 local protection = args['protection'] or 5 local hpb = args[2] or args['hpb'] local fpb = args[3] or args['fpb'] local fragged = yesno(args['fragged'], false) local reforge = args[4] or args['reforge'] or nil return p._getArmorData(armor, growth, protection, hpb + fpb, reforge, fragged) end

function p._getArmorData(armorname, growth, protection, hpb, reforge, fragged) local dataString = "{{ArmorStats" --local wikitable = mw.html.create('table'):addClass('wikitable') --local row = wikitable:tag('tr') --	:tag('th'):wikitext('Health'):done --	:tag('th'):wikitext('Defense'):done --armor = armorData[armorname] --local hp = armor['stats']['total']['hp'] + 4*hpb + 15*growth --local def = armor['stats']['total']['def'] + 2*hpb + 3*protection --row = wikitable:tag('tr') --	:tag('td'):wikitext(hp):done --	:tag('td'):wikitext(def):done -- tostring(wikitable) end

return p