Editing Module:HeroDataArraysGive feedback
The edit can be undone.
Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
| Latest revision | Your text | ||
| Line 14: | Line 14: | ||
end | end | ||
end | end | ||
end | end | ||
| Line 33: | Line 20: | ||
if type(value) == "number" then | if type(value) == "number" then | ||
return util_module.round_to_sig_fig(value, 3) | return util_module.round_to_sig_fig(value, 3) | ||
end | end | ||
return value | return value | ||
| Line 67: | Line 38: | ||
for _, col in ipairs(tableDef.columns) do | for _, col in ipairs(tableDef.columns) do | ||
if r[col.field] ~= 0 and r[col.field] ~= nil then | if r[col.field] ~= 0 and r[col.field] ~= nil then | ||
hasValue = true | hasValue = true | ||
break | break | ||
end | end | ||
end | end | ||
| Line 101: | Line 70: | ||
cells = cells .. " || " .. (r[col.field] or 0) | cells = cells .. " || " .. (r[col.field] or 0) | ||
end | end | ||
t = t .. | t = t .. | ||
"|- \n" .. | "|- \n" .. | ||
"| style=\"text-align:left;\" | " .. | |||
frame:expandTemplate{ title = "PageRef", args = { r.name } } .. | |||
cells .. " \n" | cells .. " \n" | ||
end | end | ||
| Line 163: | Line 123: | ||
table.insert(rows, { | table.insert(rows, { | ||
name = name, | name = name, | ||
maxHealth = data["MaxHealth"] or 0, | maxHealth = tonumber(data["MaxHealth"]) or 0, | ||
scalingHealth = "+" .. data["LevelScaling>MaxHealth"] or 0, | scalingHealth = "+" .. tonumber(data["LevelScaling>MaxHealth"]) or 0, | ||
maxScalingHealth = (data["MaxHealth"] + data["LevelScaling>MaxHealth"] * soul_unlock.get_max("PowerIncrease")) or 0 | maxScalingHealth = tonumber(roundValue(data["MaxHealth"] + data["LevelScaling>MaxHealth"] * soul_unlock.get_max("PowerIncrease"))) or 0 | ||
}) | }) | ||
end | end | ||
table.sort(rows, function(a, b) return a.name:lower() < b.name:lower() end) | |||
local tableDefs = { | local tableDefs = { | ||
{ | { | ||
title = "Base Health Stats", | title = "Hero Base Health Stats", | ||
columns = { | columns = { | ||
{ label = "Starting", field = "maxHealth" }, | { label = "Starting", field = "maxHealth" }, | ||
| Line 193: | Line 153: | ||
p.heroRegenTable = function(frame) | p.heroRegenTable = function(frame) | ||
local heroRegenData = heroDataArray({"Name", " | local heroRegenData = heroDataArray({"Name", "BaseHealthRegen"}) | ||
local rows = {} | local rows = {} | ||
| Line 199: | Line 159: | ||
table.insert(rows, { | table.insert(rows, { | ||
name = name, | name = name, | ||
baseHealthRegen = data["BaseHealthRegen"] or 0 | baseHealthRegen = data["BaseHealthRegen"] or 0 | ||
}) | }) | ||
end | end | ||
table.sort(rows, function(a, b) return a.name:lower() < b.name:lower() end) | |||
local tableDefs = { | local tableDefs = { | ||
{ | { | ||
title = "Base Health Regen | title = "Hero Base Health Regen", | ||
columns = { | columns = { | ||
{ label = "HP/s", field = "baseHealthRegen | { label = "HP/s", field = "baseHealthRegen" } | ||
} | } | ||
} | } | ||
| Line 248: | Line 206: | ||
altBulletsPerShot = data["Weapon>AltFire>BulletsPerShot"] or 0 | altBulletsPerShot = data["Weapon>AltFire>BulletsPerShot"] or 0 | ||
}) | }) | ||
end | end | ||
table.sort(rows, function(a, b) return a.name:lower() < b.name:lower() end) | |||
local tableDefs = { | local tableDefs = { | ||
{ | { | ||
title = "Base Damage | title = "Hero Base Damage", | ||
columns = { | columns = { | ||
{ label = "Damage per sec", field = "DPS" }, | { label = "Damage per sec", field = "DPS" }, | ||
| Line 282: | Line 221: | ||
{ label = "Bullets Per Shot", field = "bulletsPerShot" }, | { label = "Bullets Per Shot", field = "bulletsPerShot" }, | ||
} | } | ||
} | }, | ||
{ | |||
title = "Hero Base Alt-Fire Damage", | |||
columns = { | |||
{ label = "Damage per sec", field = "altDPS" }, | |||
{ label = "Ammo Per Shot", field = "altAmmoConsumedPerShot" }, | |||
{ label = "Bullets per sec", field = "altRoundsPerSecond" }, | |||
{ label = "Bullet Damage", field = "altBulletDamage" }, | |||
{ label = "Bullets Per Shot", field = "altBulletsPerShot" }, | |||
} | |||
} | |||
} | } | ||
| Line 310: | Line 259: | ||
altBulletSpeed = data["Weapon>AltFire>BulletSpeed"] or 0 | altBulletSpeed = data["Weapon>AltFire>BulletSpeed"] or 0 | ||
}) | }) | ||
end | end | ||
table.sort(rows, function(a, b) | |||
return a.name:lower() < b.name:lower() | |||
end) | |||
local tableDefs = { | local tableDefs = { | ||
| Line 329: | Line 270: | ||
columns = { | columns = { | ||
{ label = "m/s", field = "bulletSpeed" } | { label = "m/s", field = "bulletSpeed" } | ||
} | |||
}, | |||
{ | |||
title = "Base Alt-Fire Bullet Velocity", | |||
columns = { | |||
{ label = "m/s", field = "altBulletSpeed" } | |||
} | } | ||
} | } | ||
| Line 345: | Line 292: | ||
p.heroClipSizeTable = function(frame) | p.heroClipSizeTable = function(frame) | ||
local heroClipSizeData = heroDataArray({"Name", "Weapon>ClipSize | local heroClipSizeData = heroDataArray({"Name", "Weapon>ClipSize","Weapon>AltFire>AmmoConsumedPerShot"}) | ||
local rows = {} | local rows = {} | ||
| Line 352: | Line 299: | ||
name = name, | name = name, | ||
clipSize = data["Weapon>ClipSize"] or 0, | clipSize = data["Weapon>ClipSize"] or 0, | ||
ammoConsumedPerShot = data["Weapon>AltFire>AmmoConsumedPerShot"] or 0 | ammoConsumedPerShot = data["Weapon>AltFire>AmmoConsumedPerShot"] or 0 | ||
}) | }) | ||
end | end | ||
table.sort(rows, function(a, b) return a.name:lower() < b.name:lower() end) | |||
local tableDefs = { | local tableDefs = { | ||
| Line 378: | Line 310: | ||
columns = { | columns = { | ||
{ label = "Ammo", field = "clipSize" }, | { label = "Ammo", field = "clipSize" }, | ||
} | } | ||
} | }, | ||
{ | |||
title = "Alt-Fire Ammo Cost", | |||
columns = { | |||
{ label = "Ammo Per Shot", field = "ammoConsumedPerShot" }, | |||
} | |||
} | |||
} | } | ||
| Line 396: | Line 332: | ||
p.heroRoundsPerSecondTable = function(frame) | p.heroRoundsPerSecondTable = function(frame) | ||
local heroRoundsPerSecondData = heroDataArray({"Name", "Weapon>RoundsPerSecond", "Weapon>AltFire>RoundsPerSecond | local heroRoundsPerSecondData = heroDataArray({"Name", "Weapon>RoundsPerSecond", "Weapon>AltFire>RoundsPerSecond"}) | ||
local rows = {} | local rows = {} | ||
| Line 403: | Line 339: | ||
name = name, | name = name, | ||
roundsPerSecond = data["Weapon>RoundsPerSecond"] or 0, | roundsPerSecond = data["Weapon>RoundsPerSecond"] or 0, | ||
altRoundsPerSecond = data["Weapon>AltFire>RoundsPerSecond"] or 0 | altRoundsPerSecond = data["Weapon>AltFire>RoundsPerSecond"] or 0 | ||
}) | }) | ||
end | end | ||
table.sort(rows, function(a, b) return a.name:lower() < b.name:lower() end) | |||
local tableDefs = { | local tableDefs = { | ||
| Line 426: | Line 349: | ||
columns = { | columns = { | ||
{ label = "Rounds/s", field = "roundsPerSecond" }, | { label = "Rounds/s", field = "roundsPerSecond" }, | ||
} | } | ||
} | }, | ||
{ | |||
title = "Base Alt-Fire Fire Rate", | |||
columns = { | |||
{ label = "Rounds/s", field = "altRoundsPerSecond" }, | |||
} | |||
} | |||
} | } | ||
| Line 444: | Line 372: | ||
p.heroFalloffRangeTable = function(frame) | p.heroFalloffRangeTable = function(frame) | ||
local heroFalloffRangeData = heroDataArray({"Name", "Weapon>FalloffStartRange", "Weapon>FalloffEndRange", "Weapon>AltFire>FalloffStartRange", "Weapon>AltFire>FalloffEndRange", | local heroFalloffRangeData = heroDataArray({"Name", "Weapon>FalloffStartRange", "Weapon>FalloffEndRange", "Weapon>AltFire>FalloffStartRange", "Weapon>AltFire>FalloffEndRange", | ||
"Weapon>AltFire>ExplosionRadius" | "Weapon>AltFire>ExplosionRadius"}) | ||
local rows = {} | local rows = {} | ||
| Line 452: | Line 380: | ||
falloffStartRange = data["Weapon>FalloffStartRange"] or 0, | falloffStartRange = data["Weapon>FalloffStartRange"] or 0, | ||
falloffEndRange = data["Weapon>FalloffEndRange"] or 0, | falloffEndRange = data["Weapon>FalloffEndRange"] or 0, | ||
altFalloffStartRange = data["Weapon>AltFire>FalloffStartRange"] or 0, | altFalloffStartRange = data["Weapon>AltFire>FalloffStartRange"] or 0, | ||
altFalloffEndRange = data["Weapon>AltFire>FalloffEndRange"] or 0, | altFalloffEndRange = data["Weapon>AltFire>FalloffEndRange"] or 0, | ||
altExplosionRadius = | altExplosionRadius = data["Weapon>AltFire>ExplosionRadius"] or 0 | ||
}) | }) | ||
end | end | ||
table.sort(rows, function(a, b) return a.name:lower() < b.name:lower() end) | |||
local tableDefs = { | local tableDefs = { | ||
| Line 483: | Line 393: | ||
{ label = "Minimum Range (m)", field = "falloffStartRange" }, | { label = "Minimum Range (m)", field = "falloffStartRange" }, | ||
{ label = "Maximum Range (m)", field = "falloffEndRange" }, | { label = "Maximum Range (m)", field = "falloffEndRange" }, | ||
{ label = " | } | ||
} , | |||
{ | |||
title = "Base Alt-Fire Falloff Range", | |||
columns = { | |||
{ label = "Minimum Range (m)", field = "altFalloffStartRange" }, | |||
{ label = "Maximum Range (m)", field = "altFalloffEndRange" }, | |||
{ label = "Explosion Radius (m)", field = "altExplosionRadius" }, | { label = "Explosion Radius (m)", field = "altExplosionRadius" }, | ||
} | } | ||
| Line 502: | Line 418: | ||
p.heroBulletDamageTable = function(frame) | p.heroBulletDamageTable = function(frame) | ||
-- Pull data | -- Pull data | ||
local heroBulletDamageData = heroDataArray({"Name", "Weapon>BulletDamage", "LevelScaling>BulletDamage", "Weapon>AltFire>BulletDamage", "LevelScaling>BulletDamageAltFire | local heroBulletDamageData = heroDataArray({"Name", "Weapon>BulletDamage", "LevelScaling>BulletDamage", "Weapon>AltFire>BulletDamage", "LevelScaling>BulletDamageAltFire"}) | ||
local rows = {} | local rows = {} | ||
| Line 509: | Line 424: | ||
table.insert(rows, { | table.insert(rows, { | ||
name = name, | name = name, | ||
bulletDamage = | bulletDamage = tonumber(data["Weapon>BulletDamage"]) or 0, | ||
scalingDamage = "+" .. tonumber(data["LevelScaling>BulletDamage"]) or 0, | |||
scalingDamage = "+" .. data["LevelScaling>BulletDamage"] or 0, | maxScalingDamage = tonumber(roundValue(data["Weapon>BulletDamage"] + data["LevelScaling>BulletDamage"] * soul_unlock.get_max("PowerIncrease"))) or 0, | ||
maxScalingDamage = (roundValue(data["Weapon>BulletDamage"] + data["LevelScaling>BulletDamage"] * soul_unlock.get_max("PowerIncrease"))) or 0, | altBulletDamage = tonumber(data["Weapon>AltFire>BulletDamage"]) or 0, | ||
altBulletDamage = data["Weapon>AltFire>BulletDamage"] or 0, | spiritScalingDamage = "+" .. (tonumber(data["SpiritScaling>BulletDamage"]) or 0), | ||
spiritScalingDamage = "+" .. (data["SpiritScaling>BulletDamage"] or 0), | |||
}) | }) | ||
end | end | ||
table.sort(rows, function(a, b) return a.name:lower() < b.name:lower() end) | |||
local tableDefs = { | local tableDefs = { | ||
{ | { | ||
title = "Base Bullet Damage Stats", | title = "Hero Base Bullet Damage Stats", | ||
columns = { | columns = { | ||
{ label = "Starting", field = "bulletDamage" }, | { label = "Starting", field = "bulletDamage" }, | ||
{ label = "Added per Boon", field = "scalingDamage" }, | { label = "Added per Boon", field = "scalingDamage" }, | ||
{ label = "At Max Boon", field = "maxScalingDamage" }, | { label = "At Max Boon", field = "maxScalingDamage" }, | ||
} | } | ||
}, | }, | ||
} | } | ||
local output = {} | local output = {} | ||
for _, def in ipairs(tableDefs) do | for _, def in ipairs(tableDefs) do | ||
| Line 611: | Line 463: | ||
table.insert(rows, { | table.insert(rows, { | ||
name = name, | name = name, | ||
lightMeleeDamage = data["LightMeleeDamage"] or 0, | lightMeleeDamage = tonumber(data["LightMeleeDamage"]) or 0, | ||
scalingDamage = "+" .. data["LevelScaling>LightMeleeDamage"] or 0, | scalingDamage = "+" .. tonumber(data["LevelScaling>LightMeleeDamage"]) or 0, | ||
maxScalingDamage = ( | maxScalingDamage = tonumber(roundValue(data["LightMeleeDamage"] + data["LevelScaling>LightMeleeDamage"] * soul_unlock.get_max("PowerIncrease"))) or 0, | ||
}) | }) | ||
end | end | ||
table.sort(rows, function(a, b) return a.name:lower() < b.name:lower() end) | |||
local tableDefs = { | local tableDefs = { | ||
{ | { | ||
title = "Base Light Melee Stats", | title = "Hero Base Light Melee Stats", | ||
columns = { | columns = { | ||
{ label = "Starting", field = "lightMeleeDamage" }, | { label = "Starting", field = "lightMeleeDamage" }, | ||
| Line 642: | Line 494: | ||
p.heroHeavyMeleeTable = function(frame) | p.heroHeavyMeleeTable = function(frame) | ||
-- Pull data | -- Pull data | ||
local heroHeavyMeleeData = heroDataArray({"Name", "HeavyMeleeDamage", "LevelScaling | local heroHeavyMeleeData = heroDataArray({"Name", "HeavyMeleeDamage", "LevelScaling>HeavyMeleeDamage"}) | ||
local rows = {} | local rows = {} | ||
| Line 648: | Line 500: | ||
table.insert(rows, { | table.insert(rows, { | ||
name = name, | name = name, | ||
heavyMeleeDamage = data["HeavyMeleeDamage"] or 0, | heavyMeleeDamage = tonumber(data["HeavyMeleeDamage"]) or 0, | ||
scalingDamage = "+" .. data["LevelScaling>HeavyMeleeDamage"] or 0, | scalingDamage = "+" .. tonumber(data["LevelScaling>HeavyMeleeDamage"]) or 0, | ||
maxScalingDamage = ( | maxScalingDamage = tonumber(roundValue(data["HeavyMeleeDamage"] + data["LevelScaling>HeavyMeleeDamage"] * soul_unlock.get_max("PowerIncrease"))) or 0, | ||
spiritScalingDamage = "+" .. (data["SpiritScaling>HeavyMeleeDamage"] or 0), | spiritScalingDamage = "+" .. (tonumber(data["SpiritScaling>HeavyMeleeDamage"]) or 0), | ||
}) | }) | ||
end | end | ||
table.sort(rows, function(a, b) return a.name:lower() < b.name:lower() end) | |||
local tableDefs = { | local tableDefs = { | ||
{ | { | ||
title = "Base Heavy Melee Stats", | title = "Hero Base Heavy Melee Stats", | ||
columns = { | columns = { | ||
{ label = "Starting", field = "heavyMeleeDamage" }, | { label = "Starting", field = "heavyMeleeDamage" }, | ||
{ label = "Added per Boon", field = "scalingDamage" }, | { label = "Added per Boon", field = "scalingDamage" }, | ||
{ label = "At Max Boon", field = "maxScalingDamage" }, | { label = "At Max Boon", field = "maxScalingDamage" }, | ||
} | } | ||
} | } | ||
| Line 690: | Line 541: | ||
}) | }) | ||
end | end | ||
table.sort(rows, function(a, b) return a.name:lower() < b.name:lower() end) | |||
local tableDefs = { | local tableDefs = { | ||
{ | { | ||
title = "Base Stamina Stats", | title = "Hero Base Stamina Stats", | ||
columns = { | columns = { | ||
{ label = "Stamina Bars", field = "stamina" }, | { label = "Stamina Bars", field = "stamina" }, | ||
| Line 714: | Line 565: | ||
p.heroDashTable = function(frame) | p.heroDashTable = function(frame) | ||
local heroDashData = heroDataArray({"Name", "GroundDashSpeed | local heroDashData = heroDataArray({"Name", "GroundDashSpeed"}) | ||
local rows = {} | local rows = {} | ||
| Line 720: | Line 571: | ||
table.insert(rows, { | table.insert(rows, { | ||
name = name, | name = name, | ||
dashSpeed = data["GroundDashSpeed"] or 0 | dashSpeed = data["GroundDashSpeed"] or 0 | ||
}) | }) | ||
end | end | ||
table.sort(rows, function(a, b) return a.name:lower() < b.name:lower() end) | |||
local tableDefs = { | local tableDefs = { | ||
{ | { | ||
title = "Base Dash Speed Stats", | title = "Hero Base Dash Speed Stats", | ||
columns = { | columns = { | ||
{ label = "Dash Speed (m/s)", field = "dashSpeed" }, | { label = "Dash Speed (m/s)", field = "dashSpeed" }, | ||
} | } | ||
} | } | ||
| Line 758: | Line 603: | ||
table.insert(rows, { | table.insert(rows, { | ||
name = name, | name = name, | ||
reloadTime = data["Weapon>ReloadTime"] or 0 | reloadTime = tonumber(data["Weapon>ReloadTime"]) or 0 | ||
}) | }) | ||
end | end | ||
table.sort(rows, function(a, b) return a.name:lower() < b.name:lower() end) | |||
local tableDefs = { | local tableDefs = { | ||
{ | { | ||
title = "Base Reload Time", | title = "Hero Base Reload Time Stats", | ||
columns = { | columns = { | ||
{ label = "Reload Time (s)", field = "reloadTime" }, | { label = "Reload Time (s)", field = "reloadTime" }, | ||
| Line 794: | Line 639: | ||
}) | }) | ||
end | end | ||
table.sort(rows, function(a, b) return a.name:lower() < b.name:lower() end) | |||
local tableDefs = { | local tableDefs = { | ||
{ | { | ||
title = "Base Reload Delay", | title = "Hero Base Reload Delay Stats", | ||
columns = { | columns = { | ||
{ label = "Reload Delay (s)", field = "reloadDelay" } | { label = "Reload Delay (s)", field = "reloadDelay" } | ||
| Line 817: | Line 662: | ||
p.heroMoveSpeedTable = function(frame) | p.heroMoveSpeedTable = function(frame) | ||
local heroMoveSpeedData = heroDataArray({"Name", "MaxMoveSpeed", " | local heroMoveSpeedData = heroDataArray({"Name", "MaxMoveSpeed", "SprintSpeed"}) | ||
local rows = {} | local rows = {} | ||
| Line 823: | Line 668: | ||
table.insert(rows, { | table.insert(rows, { | ||
name = name, | name = name, | ||
moveSpeed = data["MaxMoveSpeed"] or 0, | moveSpeed = tonumber(data["MaxMoveSpeed"]) or 0, | ||
sprintSpeed = data["SprintSpeed"] or 0, | sprintSpeed = tonumber(data["SprintSpeed"]) or 0, | ||
totalSpeed = | totalSpeed = tonumber(data["MaxMoveSpeed"] + data["SprintSpeed"]) or 0, | ||
}) | }) | ||
end | end | ||
table.sort(rows, function(a, b) return a.name:lower() < b.name:lower() end) | |||
local tableDefs = { | local tableDefs = { | ||
{ | { | ||
title = "Base Move Speed Stats", | title = "Hero Base Move Speed Stats", | ||
columns = { | columns = { | ||
{ label = "Move Speed (m/s)", field = "moveSpeed" }, | { label = "Move Speed (m/s)", field = "moveSpeed" }, | ||
{ label = "Sprint Speed (m/s)", field = "sprintSpeed" }, | { label = "Sprint Speed (m/s)", field = "sprintSpeed" }, | ||
{ label = "Total Speed (m/s)", field = "totalSpeed" }, | { label = "Total Speed (m/s)", field = "totalSpeed" }, | ||
} | } | ||
} | } | ||
| Line 861: | Line 698: | ||
p.heroDamageResistTable = function(frame) | p.heroDamageResistTable = function(frame) | ||
local heroDamageResistData = heroDataArray({"Name", "BulletResist", "LevelScaling>BulletResist", "TechResist", "LevelScaling>TechResist", "MeleeResist", "CritDamageReceivedPercent" | local heroDamageResistData = heroDataArray({"Name", "BulletResist", "LevelScaling>BulletResist", "TechResist", "LevelScaling>TechResist", "MeleeResist", "CritDamageReceivedPercent"}) | ||
local rows = {} | local rows = {} | ||
| Line 870: | Line 705: | ||
name = name, | name = name, | ||
bulletResist = data["BulletResist"] or 0, | bulletResist = data["BulletResist"] or 0, | ||
bulletScaling = data["LevelScaling>BulletResist"] or 0, | |||
spiritResist = data["TechResist"] or 0, | spiritResist = data["TechResist"] or 0, | ||
spiritScaling = data["LevelScaling>TechResist"] or 0, | |||
meleeResist = data["MeleeResist"] or 0, | meleeResist = data["MeleeResist"] or 0, | ||
critReduction = data["CritDamageReceivedPercent"] or 0 | critReduction = data["CritDamageReceivedPercent"] or 0 | ||
}) | }) | ||
end | end | ||
table.sort(rows, function(a, b) return a.name:lower() < b.name:lower() end) | |||
local tableDefs = { | local tableDefs = { | ||
{ | { | ||
title = "Base Bullet Resist Stats", | title = "Hero Base Bullet Resist Stats", | ||
columns = { | columns = { | ||
{ label = " | { label = "Bullet Resist (%)", field = "bulletResist" }, | ||
{ label = " | { label = "BR per Boon (%)", field = "bulletScaling" }, | ||
} | } | ||
}, | }, | ||
{ | { | ||
title = "Base Spirit Resist Stats", | title = "Hero Base Spirit Resist Stats", | ||
columns = { | columns = { | ||
{ label = " | { label = "Spirit Resist (%)", field = "spiritResist" }, | ||
{ label = " | { label = "SR per Boon (%)", field = "spiritScaling" }, | ||
} | } | ||
}, | }, | ||
{ | { | ||
title = "Base Melee Resist Stats", | title = "Hero Base Melee Resist Stats", | ||
columns = { | columns = { | ||
{ label = "Melee Resist (%)", field = "meleeResist" }, | { label = "Melee Resist (%)", field = "meleeResist" }, | ||
| Line 909: | Line 736: | ||
}, | }, | ||
{ | { | ||
title = "Base Crit Reduction Stats", | title = "Hero Base Crit Reduction Stats", | ||
columns = { | columns = { | ||
{ label = "Crit Reduction (%)", field = "critReduction" }, | { label = "Crit Reduction (%)", field = "critReduction" }, | ||
| Line 937: | Line 764: | ||
}) | }) | ||
end | end | ||
table.sort(rows, function(a, b) return a.name:lower() < b.name:lower() end) | |||
local tableDefs = { | local tableDefs = { | ||
{ | { | ||
title = "Base Crit Bonus Scale Stats", | title = "Hero Base Crit Bonus Scale Stats", | ||
columns = { | columns = { | ||
{ label = "Crit Bonus Scale (%)", field = "critBonusScale" } | { label = "Crit Bonus Scale (%)", field = "critBonusScale" } | ||
| Line 960: | Line 787: | ||
p.heroSpiritTable = function(frame) | p.heroSpiritTable = function(frame) | ||
local heroSpiritData = heroDataArray({"Name", " | local heroSpiritData = heroDataArray({"Name", "TechPower"}) | ||
local rows = {} | local rows = {} | ||
| Line 966: | Line 793: | ||
table.insert(rows, { | table.insert(rows, { | ||
name = name, | name = name, | ||
spiritScaling = "+".. data[" | spiritScaling = "+".. data["TechPower"] or 0, | ||
maxSpiritScaling = (data[" | maxSpiritScaling = tonumber(data["TechPower"] * soul_unlock.get_max("PowerIncrease")) or 0, | ||
}) | }) | ||
end | end | ||
table.sort(rows, function(a, b) return a.name:lower() < b.name:lower() end) | |||
local tableDefs = { | local tableDefs = { | ||
{ | { | ||
title = "Spirit Scaling Stats", | title = "Hero Spirit Scaling Stats", | ||
columns = { | columns = { | ||
{ label = "Spirit Per Boon", field = "spiritScaling" }, | { label = "Spirit Per Boon", field = "spiritScaling" }, | ||
| Line 980: | Line 807: | ||
} | } | ||
} | } | ||
} | } | ||