Module:HeroDataArrays: Difference between revisionsGive feedback
Jump to navigation
Jump to search
Gammaton32 (talk | contribs) No edit summary |
Gammaton32 (talk | contribs) added burst shots for ammo table |
||
| Line 296: | Line 296: | ||
p.heroClipSizeTable = function(frame) | p.heroClipSizeTable = function(frame) | ||
local heroClipSizeData = heroDataArray({"Name", "Weapon>ClipSize","Weapon>AltFire>AmmoConsumedPerShot","SpiritScaling>ClipSize"}) | local heroClipSizeData = heroDataArray({"Name", "Weapon>ClipSize","Weapon>BulletsPerBurst","Weapon>AltFire>AmmoConsumedPerShot","SpiritScaling>ClipSize"}) | ||
local rows = {} | local rows = {} | ||
| Line 304: | Line 304: | ||
clipSize = data["Weapon>ClipSize"] or 0, | clipSize = data["Weapon>ClipSize"] or 0, | ||
spiritClipSize = "+".. (tonumber(data["SpiritScaling>ClipSize"]) or 0), | spiritClipSize = "+".. (tonumber(data["SpiritScaling>ClipSize"]) or 0), | ||
bulletsPerBurst = data["Weapon>BulletsPerBurst"] or 0, | |||
burstClipSize = data["Weapon>ClipSize"] or 0 / data["Weapon>BulletsPerBurst"] or 0, | |||
ammoConsumedPerShot = data["Weapon>AltFire>AmmoConsumedPerShot"] or 0 | ammoConsumedPerShot = data["Weapon>AltFire>AmmoConsumedPerShot"] or 0 | ||
}) | }) | ||
| Line 315: | Line 317: | ||
columns = { | columns = { | ||
{ label = "Ammo", field = "clipSize" }, | { label = "Ammo", field = "clipSize" }, | ||
{ label = "Ammo Per Shot", field = "bulletsPerBurst" }, | |||
{ label = "Spirit Scaling", field = "spiritClipSize" }, | { label = "Spirit Scaling", field = "spiritClipSize" }, | ||
} | } | ||
| Line 428: | Line 431: | ||
-- 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" }) | "SpiritScaling>BulletDamage", "Weapon>BulletsPerShot", "Weapon>BulletsPerBurst"}) | ||
local rows = {} | local rows = {} | ||
| Line 435: | Line 438: | ||
name = name, | name = name, | ||
bulletDamage = tonumber(data["Weapon>BulletDamage"]) or 0, | bulletDamage = tonumber(data["Weapon>BulletDamage"]) or 0, | ||
bulletDamagePerShot = ((data["Weapon>BulletDamage"] or 0) * (data["Weapon>BulletsPerShot"] or 0) * (data["Weapon>BulletsPerBurst"] or 0)), | |||
scalingDamage = "+" .. tonumber(data["LevelScaling>BulletDamage"]) or 0, | scalingDamage = "+" .. tonumber(data["LevelScaling>BulletDamage"]) or 0, | ||
maxScalingDamage = tonumber(roundValue(data["Weapon>BulletDamage"] + data["LevelScaling>BulletDamage"] * soul_unlock.get_max("PowerIncrease"))) or 0, | maxScalingDamage = tonumber(roundValue(data["Weapon>BulletDamage"] + data["LevelScaling>BulletDamage"] * soul_unlock.get_max("PowerIncrease"))) or 0, | ||