Module:HeroDataArrays: Difference between revisions

Jump to navigation Jump to search
Health table hopefully works?
mNo edit summary
Line 41: Line 41:
end
end


p.heroHealthTable = function()
p.heroHealthTable = function(frame)
heroHealthData = heroDataArray({"Name", "MaxHealth", "LevelScaling>Health"})
heroHealthData = heroDataArray({"Name", "MaxHealth", "LevelScaling>Health"})


z =  
z = "{| class=\"wikitable sortable\" \n"..
[[{| class="wikitable sortable"
"|+ Hero Base Health Stats \n"..
|+ Hero Base Health Stats
"! Hero !! Starting !! Added per PI !! At Max PI \n"
! Hero !! Starting !! Added per PI !! At Max PI
]]
for i,a in pairs(heroHealthData) do
for i,a in pairs(heroHealthData) do
z=z..
z = z..
[[|-
"|- \n"..
| {{PageRef|]]..a["Name"]..[[|type=Hero}} || ]]..a["MaxHealth"]..[[ || ]]..a["LevelScaling>Health"]..[[ || a billion
"| "..frame:expandTemplate{title="PageRef", args={a["Name"], ['type']="Hero"}}..
]]
" || "..a["MaxHealth"].." || "..a["LevelScaling>Health"].." || a billion \n"
end
end