Module:HeroDataArrays: Difference between revisionsGive feedback
Jump to navigation
Jump to search
Gammaton32 (talk | contribs) No edit summary |
Gammaton32 (talk | contribs) added spirit scaling to all relevant stats |
||
| Line 153: | Line 153: | ||
p.heroRegenTable = function(frame) | p.heroRegenTable = function(frame) | ||
local heroRegenData = heroDataArray({"Name", "BaseHealthRegen"}) | local heroRegenData = heroDataArray({"Name", "BaseHealthRegen", "SpiritScaling>BaseHealthRegen"}) | ||
local rows = {} | local rows = {} | ||
| Line 159: | Line 159: | ||
table.insert(rows, { | table.insert(rows, { | ||
name = name, | name = name, | ||
baseHealthRegen = data["BaseHealthRegen"] or 0 | baseHealthRegen = data["BaseHealthRegen"] or 0, | ||
spiritHealthRegen = "+".. (tonumber(data["SpiritScaling>BaseHealthRegen"]) or 0), | |||
}) | }) | ||
end | end | ||
| Line 168: | Line 169: | ||
title = "Hero Base Health Regen", | title = "Hero Base Health Regen", | ||
columns = { | columns = { | ||
{ label = "HP/s", field = "baseHealthRegen" } | { label = "HP/s", field = "baseHealthRegen" }, | ||
{ label = "Spirit Scaling", field = "spiritHealthRegen" } | |||
} | } | ||
} | } | ||
| Line 292: | Line 294: | ||
p.heroClipSizeTable = function(frame) | p.heroClipSizeTable = function(frame) | ||
local heroClipSizeData = heroDataArray({"Name", "Weapon>ClipSize","Weapon>AltFire>AmmoConsumedPerShot"}) | local heroClipSizeData = heroDataArray({"Name", "Weapon>ClipSize","Weapon>AltFire>AmmoConsumedPerShot","SpiritScaling>ClipSize"}) | ||
local rows = {} | local rows = {} | ||
| Line 299: | Line 301: | ||
name = name, | name = name, | ||
clipSize = data["Weapon>ClipSize"] or 0, | clipSize = data["Weapon>ClipSize"] or 0, | ||
spiritClipSize = "+".. (tonumber(data["SpiritScaling>ClipSize"]) or 0), | |||
ammoConsumedPerShot = data["Weapon>AltFire>AmmoConsumedPerShot"] or 0 | ammoConsumedPerShot = data["Weapon>AltFire>AmmoConsumedPerShot"] or 0 | ||
}) | }) | ||
| Line 310: | Line 313: | ||
columns = { | columns = { | ||
{ label = "Ammo", field = "clipSize" }, | { label = "Ammo", field = "clipSize" }, | ||
{ label = "Spirit Scaling", field = "spiritClipSize" }, | |||
} | } | ||
}, | }, | ||
| Line 332: | Line 336: | ||
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", "SpiritScaling>RoundsPerSecond", "SpiritScaling>FireRate"}) | ||
local rows = {} | local rows = {} | ||
| Line 339: | Line 343: | ||
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, | ||
spiritRoundsPerSecond = "+".. (tonumber(data["SpiritScaling>RoundsPerSecond"]) or 0), | |||
spiritFireRate = "+".. (tonumber(data["SpiritScaling>FireRate"]) or 0), | |||
}) | }) | ||
end | end | ||
| Line 349: | Line 355: | ||
columns = { | columns = { | ||
{ label = "Rounds/s", field = "roundsPerSecond" }, | { label = "Rounds/s", field = "roundsPerSecond" }, | ||
{ label = "Spirit Scaling", field = "spiritRoundsPerSecond" }, | |||
} | } | ||
}, | }, | ||
| Line 418: | Line 425: | ||
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", | ||
"SpiritScaling>BulletDamage" }) | |||
local rows = {} | local rows = {} | ||
| Line 440: | Line 448: | ||
{ label = "Added per Boon", field = "scalingDamage" }, | { label = "Added per Boon", field = "scalingDamage" }, | ||
{ label = "At Max Boon", field = "maxScalingDamage" }, | { label = "At Max Boon", field = "maxScalingDamage" }, | ||
{ label = "Spirit Scaling", field = "spiritScalingDamage" }, | |||
} | } | ||
}, | }, | ||
| Line 663: | Line 672: | ||
p.heroMoveSpeedTable = function(frame) | p.heroMoveSpeedTable = function(frame) | ||
local heroMoveSpeedData = heroDataArray({"Name", "MaxMoveSpeed", "SprintSpeed"}) | local heroMoveSpeedData = heroDataArray({"Name", "MaxMoveSpeed", "SprintSpeed", "SpiritScaling>MaxMoveSpeed", "SpiritScaling>SprintSpeed"}) | ||
local rows = {} | local rows = {} | ||
| Line 672: | Line 681: | ||
sprintSpeed = tonumber(data["SprintSpeed"]) or 0, | sprintSpeed = tonumber(data["SprintSpeed"]) or 0, | ||
totalSpeed = tonumber(data["MaxMoveSpeed"] + data["SprintSpeed"]) or 0, | totalSpeed = tonumber(data["MaxMoveSpeed"] + data["SprintSpeed"]) or 0, | ||
spiritMoveSpeed = "+" .. (tonumber(data["SpiritScaling>MaxMoveSpeed"]) or 0), | |||
spiritSprintSpeed = "+" .. (tonumber(data["SpiritScaling>SprintSpeed"]) or 0), | |||
}) | }) | ||
end | end | ||
| Line 683: | Line 694: | ||
{ 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" }, | ||
{ label = "MS Spirit Scaling", field = "spiritMoveSpeed" }, | |||
{ label = "SS Spirit Scaling", field = "spiritSprintSpeed" }, | |||
} | } | ||
} | } | ||
| Line 699: | Line 712: | ||
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", | ||
"SpiritScaling>BulletResist", "SpiritScaling>TechResist", | |||
}) | |||
local rows = {} | local rows = {} | ||
| Line 706: | Line 721: | ||
name = name, | name = name, | ||
bulletResist = data["BulletResist"] or 0, | bulletResist = data["BulletResist"] or 0, | ||
bulletResistScaling = data["LevelScaling>BulletResist"] or 0, | |||
bulletResistSpiritScaling = data["SpiritScaling>BulletResist"] or 0, | |||
spiritResist = data["TechResist"] or 0, | spiritResist = data["TechResist"] or 0, | ||
spiritResistScaling = data["LevelScaling>TechResist"] or 0, | |||
spiritResistSpiritScaling = data["SpiritScaling>TechResist"] or 0, | |||
meleeResist = data["MeleeResist"] or 0, | meleeResist = data["MeleeResist"] or 0, | ||
critReduction = data["CritDamageReceivedPercent"] or 0 | critReduction = data["CritDamageReceivedPercent"] or 0 | ||
| Line 720: | Line 737: | ||
columns = { | columns = { | ||
{ label = "Bullet Resist (%)", field = "bulletResist" }, | { label = "Bullet Resist (%)", field = "bulletResist" }, | ||
{ label = "BR per Boon (%)", field = " | { label = "BR per Boon (%)", field = "bulletResistScaling" }, | ||
{ label = "BR Spirit Scaling (%)", field = "bulletResistSpiritScaling" }, | |||
} | } | ||
}, | }, | ||
| Line 727: | Line 745: | ||
columns = { | columns = { | ||
{ label = "Spirit Resist (%)", field = "spiritResist" }, | { label = "Spirit Resist (%)", field = "spiritResist" }, | ||
{ label = "SR per Boon (%)", field = " | { label = "SR per Boon (%)", field = "spiritResistScaling" }, | ||
{ label = "SR Spirit Scaling (%)", field = "spiritResistSpiritScaling" }, | |||
} | } | ||
}, | }, | ||