Module:Statistic/Legacy/Weapon

local statistics = {}

--	displayName		|	The name to be displayed in the stat block. |	string --	displayImage	|	The image to be displayed in the stat block. |	string --	displayValue	|	The raw value that is going to be formatted. |	function (accepts the value of the stat, returns number or table of numbers) --	displayUnits	|	The units of the statistic when displayed. |	string or table of strings (note that "%" and Time" have special treatment) --	overview		|	The content of the hover tooltip in the stat block.		|	string (use table.unpack and string.format) --	details			|	The content of the help page.							|	string --	relation		|	The relationship of the statistic vs effectiveness.		|	char or table of chars (either '+', '-' or '') -- -- If tables are used, their size should be equal across displayValue, displayUnits and relation. statistics.basicStatistics = {	["Shield Bypass"] = {		displayName = "Shield Bypass",		displayImage = "Bypass-Stat.png",		displayValue = function(v) return v * 100 end,		displayUnits = "%",		overview = "Ignore %s of enemy shield defense",		details = "This is the proportion by which a weapon's outgoing damage ignores the Defense of enemy shields.",		relation = '+',	},

["Health Damage"] = { displayName = "Health Damage", displayImage = "HealthDamage-Stat.png", displayValue = function(v) return v * 100 end, displayUnits = "%", overview = "Deal %s extra damage to health", details = "This is the proportion by which a weapon's outgoing damage is amplified against the health of ships, modules, as well as equipped armor and ablative armor.", relation = '+', },

["Shield Damage"] = { displayName = "Shield Damage", displayImage = "ShieldDamage-Stat.png", displayValue = function(v) return v * 100 end, displayUnits = "%", overview = "Deal %s extra damage to shields", details = "This is the proportion by which a weapon's outgoing damage is amplified against shields.", relation = '+', },

["Ship Damage"] = { displayName = "Ship Damage", displayImage = "ShipDamage-Stat.png", displayValue = function(v) return v * 100 end, displayUnits = "%", overview = "Deal %s extra damage to all ships", details = "This is the proportion by which a weapon's outgoing damage is amplified against all ships.", relation = '+', },

["Module Damage"] = { displayName = "Module Damage", displayImage = "ModuleDamage-Stat.png", displayValue = function(v) return v * 100 end, displayUnits = "%", overview = "Deal %s extra damage to all modules", details = "This is the proportion by which a weapon's outgoing damage is amplified against all modules.", relation = '+', },

["Squadron Damage"] = { displayName = "Squadron Damage", displayImage = "WeaponSlots-Stat.png", displayValue = function(v) return v * 100 end, displayUnits = "%", overview = "Deal %s extra damage to all squadrons", details = "This is the proportion by which a weapon's outgoing damage is amplified against all squadrons.", relation = '+', },

["Corvette Damage"] = { displayName = "Corvette Damage", displayImage = "WeaponSlots-Stat.png", displayValue = function(v) return v * 100 end, displayUnits = "%", overview = "Deal %s extra damage to all corvettes", details = "This is the proportion by which a weapon's outgoing damage is amplified against all corvettes.", relation = '+', },

["Frigate Damage"] = { displayName = "Frigate Damage", displayImage = "FrigateDamage-Stat.png", displayValue = function(v) return v * 100 end, displayUnits = "%", overview = "Deal %s extra damage to all frigates", details = "This is the proportion by which a weapon's outgoing damage is amplified against all frigates.", relation = '+', },

["Cruiser Damage"] = { displayName = "Cruiser Damage", displayImage = "CruiserDamage-Stat.png", displayValue = function(v) return v * 100 end, displayUnits = "%", overview = "Deal %s extra damage to all cruisers", details = "This is the proportion by which a weapon's outgoing damage is amplified against all cruisers.", relation = '+', },

["Battlecruiser Damage"] = { displayName = "Battlecruiser Damage", displayImage = "WeaponSlots-Stat.png", displayValue = function(v) return v * 100 end, displayUnits = "%", overview = "Deal %s extra damage to all battlecruisers", details = "This is the proportion by which a weapon's outgoing damage is amplified against all battlecruisers.", relation = '+', },

["Battleship Damage"] = { displayName = "Battleship Damage", displayImage = "BattleshipDamage-Stat.png", displayValue = function(v) return v * 100 end, displayUnits = "%", overview = "Deal %s extra damage to all battleships", details = "This is the proportion by which a weapon's outgoing damage is amplified against all battleships.", relation = '+', },

["Destroyer Damage"] = { displayName = "Destroyer Damage", displayImage = "DestroyerDamage-Stat.png", displayValue = function(v) return v * 100 end, displayUnits = "%", overview = "Deal %s extra damage to all destroyers", details = "This is the proportion by which a weapon's outgoing damage is amplified against all destroyers.", relation = '+', },

["Cutter Damage"] = { displayName = "Cutter Damage", displayImage = "CutterDamage-Stat.png", displayValue = function(v) return v * 100 end, displayUnits = "%", overview = "Deal %s extra damage to all cutters", details = "This is the proportion by which a weapon's outgoing damage is amplified against all cutters.", relation = '+', },

["Specialist Damage"] = { displayName = "Specialist Damage", displayImage = "WeaponSlots-Stat.png", displayValue = function(v) return v * 100 end, displayUnits = "%", overview = "Deal %s extra damage to all specialists", details = "This is the proportion by which a weapon's outgoing damage is amplified against all specialists.", relation = '+', },

["Carrier Damage"] = { displayName = "Carrier Damage", displayImage = "CarrierDamage-Stat.png", displayValue = function(v) return v * 100 end, displayUnits = "%", overview = "Deal %s extra damage to all carriers", details = "This is the proportion by which a weapon's outgoing damage is amplified against all carriers.", relation = '+', },

["Dreadnought Damage"] = { displayName = "Dreadnought Damage", displayImage = "WeaponSlots-Stat.png", displayValue = function(v) return v * 100 end, displayUnits = "%", overview = "Deal %s extra damage to all dreadnoughts", details = "This is the proportion by which a weapon's outgoing damage is amplified against all dreadnoughts.", relation = '+', },

["Flagship Damage"] = { displayName = "Flagship Damage", displayImage = "WeaponSlots-Stat.png", displayValue = function(v) return v * 100 end, displayUnits = "%", overview = "Deal %s extra damage to all sector flagships", details = "This is the proportion by which a weapon's outgoing damage is amplified against all sector flagships.", relation = '+', },

["Altairian Damage"] = { displayName = "Altairian Damage", displayImage = "AltairianDamage-Stat.png", displayValue = function(v) return v * 100 end, displayUnits = "%", overview = "Deal %s extra damage to Altairian ships", details = "This is the proportion by which a weapon's outgoing damage is amplified against Altairian Hulls.", relation = '+', },

["Oligarch Damage"] = { displayName = "Oligarch Damage", displayImage = "OligarchDamage-Stat.png", displayValue = function(v) return v * 100 end, displayUnits = "%", overview = "Deal %s extra damage to Oligarch ships", details = "This is the proportion by which a weapon's outgoing damage is amplified against Oligarch Hulls.", relation = '+', },

["Umbra Damage"] = { displayName = "Umbra Damage", displayImage = "UmbraDamage-Stat.png", displayValue = function(v) return v * 100 end, displayUnits = "%", overview = "Deal %s extra damage to Umbra ships", details = "This is the proportion by which a weapon's outgoing damage is amplified against Umbra Hulls.", relation = '+', },

["Pharmakon Damage"] = { displayName = "Pharmakon Damage", displayImage = "PharmakonDamage-Stat.png", displayUnits = '', overview = "Deal %s extra damage to Pharmakon ships", details = "This is the proportion by which a weapon's outgoing damage is amplified against Pharmakon Hulls.", relation = '+', },

["Energy DPS"] = { displayName = "Energy DPS", displayImage = "En.png", displayValue = function(v) return v end, displayUnits = "", overview = "Deal an average of %s Energy Damage per second", details = "This is the amount of Energy Damage a weapon deals throughout the entire firing cycle, divided by the duration of the firing cycle in seconds.", relation = '+', },

["Explosive DPS"] = { displayName = "Explosive DPS", displayImage = "Ex.png", displayValue = function(v) return v end, displayUnits = "", overview = "Deal an average of %s Explosive Damage per second", details = "This is the amount of Explosive Damage a weapon deals throughout the entire firing cycle, divided by the duration of the firing cycle in seconds.", relation = '+', },

["Kinetic DPS"] = { displayName = "Kinetic DPS", displayImage = "Ki.png", displayValue = function(v) return v end, displayUnits = "", overview = "Deal an average of %s Kinetic Damage per second", details = "This is the amount of Kinetic Damage a weapon deals throughout the entire firing cycle, divided by the duration of the firing cycle in seconds.", relation = '+', },

["Alien DPS"] = { displayName = "Alien DPS", displayImage = "Al.png", displayValue = function(v) return v end, displayUnits = "", overview = "Deal an average of %s Alien Damage per second", details = "This is the amount of Alien Damage a weapon deals throughout the entire firing cycle, divided by the duration of the firing cycle in seconds.", relation = '+', },

["Plasma DPS"] = { displayName = "Plasma DPS", displayImage = "Pl.png", displayValue = function(v) return v end, displayUnits = "", overview = "Deal an average of %s Plasma Damage per second", details = "This is the amount of Plasma Damage a weapon deals throughout the entire firing cycle, divided by the duration of the firing cycle in seconds.", relation = '+', },

["Blight DPS"] = { displayName = "Blight DPS", displayImage = "Bl.png", displayValue = function(v) return v end, displayUnits = "", overview = "Deal an average of %s Blight Damage per second", details = "This is the amount of Blight Damage a weapon deals throughout the entire firing cycle, divided by the duration of the firing cycle in seconds.", relation = '+', },

["Void DPS"] = { displayName = "Void DPS", displayImage = "Vo.png", displayValue = function(v) return v end, displayUnits = "", overview = "Deal an average of %s Void Damage per second", details = "This is the amount of Void Damage a weapon deals throughout the entire firing cycle, divided by the duration of the firing cycle in seconds.", relation = '+', },

["Charge Time"] = { displayName = "Charge Time", displayImage = "Time-Stat.png", displayValue = function(v) return v end, displayUnits = "s", overview = "Take %s to charge up before firing", details = "This is the amount of time a weapon requires at the start of the firing cycle before it can enter the firing phase.", relation = '-', },

["Firing Time"] = { displayName = "Firing Time", displayImage = "Time-Stat.png", displayValue = function(v) return v end, displayUnits = "s", overview = "Take %s to open fire before cooling down", details = "This is the amount of time a weapon outputs damage during the firing cycle before it enters the reload phase.", relation = '', },

["Cooldown Time"] = { displayName = "Cooldown Time", displayImage = "Time-Stat.png", displayValue = function(v) return v end, displayUnits = "s", overview = "Take %s to cool down before restarting the process", details = "This is the amount of time a weapon requires at the end of the firing cycle before it cycles back to the charging phase.", relation = '-', },

["Shots per Cycle"] = { displayName = "Shots per Cycle", displayImage = "WeaponSlots-Stat.png", displayValue = function(v) return v end, displayUnits = "", overview = "Fire %s shots before reloading", details = "This is the number of times a weapon opens fire during the firing phase of the firing cycle.", relation = '', },

["Minimum Range"] = { displayName = "Minimum Range", displayImage = "Range-Stat.png", displayValue = function(v) return v end, displayUnits = "m", overview = "Can fire at enemies as close as %s away", details = "This is the minimum distance between a weapon and a target at which the weapon can still shoot at it.", relation = '-', },

["Maximum Range"] = { displayName = "Maximum Range", displayImage = "Range-Stat.png", displayValue = function(v) return v end, displayUnits = "m", overview = "Can fire at enemies at most %s away", details = "This is the maximum distance between a weapon and a target at which the weapon can still shoot at it.", relation = '+', },

["Projectile Range"] = { displayName = "Projectile Range", displayImage = "Range-Stat.png", displayValue = function(v) return v end, displayUnits = "m", overview = "Projectiles can travel up to %s", details = "This is the maximum distance a weapon's projectiles can travel before expiring.", relation = '+', },

["Weapon Speed"] = { displayName = "Weapon Speed", displayImage = "WeaponSpeed-Stat.png", displayValue = function(v) return v end, displayUnits = "m/s", overview = "Projectiles travel at %s", details = "This is the linear speed of a weapon's projectiles." .. "\n\n" .. "Beams are hitscan regardless of this value.", relation = '+', },

["Guided Flight Time"] = { displayName = "Guided Flight Time", displayImage = "Time-Stat.png", displayValue = function(v) return v end, displayUnits = "s", overview = "Projectiles track their target for %s", details = "This is the maximum time a weapon's projectiles can home in towards targets after being launched.", relation = '+', },

["AoE Radius"] = { displayName = "AoE Radius", displayImage = "AoERadius-Stat.png", displayValue = function(v) return v end, displayUnits = "m", overview = "Projectiles explode and damage enemies within %s", details = "This is the radius of a weapon's explosions. All enemies within are damaged by the principal amount.", relation = '+', },

["Spread Angle"] = { displayName = "Spread Angle", displayImage = "Spread-Stat.png", displayValue = function(v) return v end, displayUnits = "deg", overview = "Projectiles can be inaccurate up to %s", details = "This is the maximum angular deviation from the centerline that a weapon's projectiles can be launched." .. "\n\n" .. "The following weapons have an actual spread of half the listed value:\n" .. "* Scatter Missile\n\n" .. "* Frenzied Scatter Missile\n\n" .. "* HEX Missile\n\n" .. "* Frenzied HEX Missile\n\n" .. "* Fusion Torpedo\n\n" .. "* SICO Missile\n\n" .. "* NET Torpedo\n\n" .. "* Piercing NET^2 Torpedo\n\n" .. "* Piercing NET^2 Torpedo\n\n" .. "* Manifold Missile\n\n" .. "* Cluster Missile\n\n" .. "* Heavy Cluster Missile\n\n" .. "* Xeno Cluster Missile\n\n" .. "* Bombardment Torpedo\n\n" .. "* Heavy Bombardment Torpedo\n\n" .. "* Xeno Bombardment Torpedo", relation = '', },

["Spread Projectiles"] = { displayName = "Projectiles per Shot", displayImage = "WeaponSlots-Stat.png", displayValue = function(v) return v end, displayUnits = "", overview = "The fan consists of %s projectiles", details = "This is the number of projectiles a weapon expels for every shot. If this is equal to 1 and the spread is non-zero, the heading of the projectile is chosen randomly within the spread angle; otherwise it is uniformly distributed.", relation = '', },

["Chain Amount"] = { displayName = "Chain Amount", displayImage = "Chain-Stat.png", displayValue = function(v) return v end, displayUnits = "", overview = "Can bounce across up to %s different enemies", details = "This is the maximum number of enemies a weapon can bounce across.", relation = '+', },

["Chain Detection Range"] = { displayName = "Chain Detection Range", displayImage = "Range-Stat.png", displayValue = function(v) return v end, displayUnits = "m", overview = "Can bounce across enemies up to %s apart", details = "This is the range of the detection arc when searching for a valid target a weapon can bounce across.", relation = '+', },

["Chain Projectile Range"] = { displayName = "Chain Projectile Range", displayImage = "Range-Stat.png", displayValue = function(v) return v end, displayUnits = "m", overview = "Can bounce across enemies up to %s apart", details = "This is the maximum distance a weapon's projectiles can travel before expiring when bouncing.", relation = '+', },

["Chain Damage Modifier"] = { displayName = "Chain Damage Modifier", displayImage = "WeaponSlots-Stat.png", displayValue = function(v) return v * 100 end, displayUnits = "%", overview = "The weapon's damage is multiplied by %s per bounce", details = "This is the damage multiplier of weapon on each bounce.", relation = '+', },

["Piercing Amount"] = { displayName = "Piercing Amount", displayImage = "Piercing-Stat.png", displayValue = function(v) return v end, displayUnits = "", overview = "Can hit up to %s enemies in a line", details = "This is the maximum number of ships, modules or walls a weapon can hit in a line." .. "\n\n" .. "Squadrons can always be pierced.", relation = '+', },

["Wall Piercing Amount"] = { displayName = "Wall Piercing Amount", displayImage = "Piercing-Stat.png", displayValue = function(v) return v end, displayUnits = "", overview = "Can hit up to %s walls in a line", details = "This is the maximum number of walls a weapon can hit in a line.", relation = '+', },

["Ricochet Amount"] = { displayName = "Ricochet Amount", displayImage = "Ricochet-Stat.png", displayValue = function(v) return v end, displayUnits = "", overview = "Can bounce across up to %s enemies", details = "This is the maximum number of times a weapon can bounce across enemies.", relation = '+', },

["Ricochet Per Target"] = { displayName = "Ricochet Per Target", displayImage = "Ricochet-Stat.png", displayValue = function(v) return v end, displayUnits = "", overview = "Can hit the same enemy %s times", details = "This is the maximum number of times a weapon can hit the same enemy.", relation = '+', },

["Ricochet Detection Range"] = { displayName = "Ricochet Detection Range", displayImage = "Range-Stat.png", displayValue = function(v) return v end, displayUnits = "m", overview = "Can bounce across enemies up to %s apart", details = "This is the range of the detection arc when searching for a valid target a weapon can bounce across.", relation = '+', },

["Max Ricochet Angle"] = { displayName = "Max Ricochet Angle", displayImage = "RicochetAngle-Stat.png", displayValue = function(v) return v end, displayUnits = "deg", overview = "Can bounce across enemies in a %s arc centered at the heading of the projectile when it hit the previous target", details = "This is the width of the detection arc when searching for a valid target a weapon can bounce across.", relation = '+', },

["Ricochet Projectile Range"] = { displayName = "Ricochet Projectile Range", displayImage = "Range-Stat.png", displayValue = function(v) return v end, displayUnits = "m", overview = "Can bounce across enemies up to %s apart", details = "This is the maximum distance a weapon's projectiles can travel before expiring when bouncing.", relation = '+', },

["Ricochet Damage Modifier"] = { displayName = "Ricochet Damage Modifier", displayImage = "WeaponSlots-Stat.png", displayValue = function(v) return v * 100 end, displayUnits = "%", overview = "The weapon's damage is multiplied by %s per bounce", details = "This is the damage multiplier of weapon on each bounce.", relation = '+', }, }

-- These have no innate values. --	displayName		|	The name to be displayed in the stat block. |	string --	displayImage	|	The image to be displayed in the stat block. |	string --	basicStats		|	The keys of the constituent statistics. |	string or table of strings --	overview		|	The content of the hover tooltip in the stat block. |	function (accepts the formatted values, returns string) statistics.compositeStatistics = { ["Firing Cycle Details"] = { displayName = "Firing Cycle Details", displayImage = "Recharge-Stat.png", basicStats = { "Charge Time", "Firing Time", "Cooldown Time", "Shots per Cycle" }, overview = function(t) return string.format("Initially charge up for %s, then fire % shots within %s, finally cool down for %s, and repeat.", t[1], t[4], t[2], t[3]) end, },

["Range Details"] = { displayName = "Range Details", displayImage = "Range-Stat.png", basicStats = { "Minimum Range", "Maximum Range", "Projectile Range" }, overview = function(t) return string.format("Can fire at targets %s-%s away; projectiles can travel up to %s.", t[1], t[2], t[3]) end, },	["Spread Details"] = { displayName = "Spread Details", displayImage = "Spread-Stat.png", basicStats = { "Spread Angle", "Spread Projectiles" }, overview = function(t) if t[1] == 0 then return string.format("Each shot consists of a single projectile that can be inaccurate up to %s.", t[2], t[1]) else return string.format("Each shot creates a fan of %s projectiles with half-angle %s.", t[2], t[1]) end end, },	["Chain Details"] = { displayName = "Chain Details", displayImage = "Chain-Stat.png", basicStats = { "Chain Amount", "Chain Detection Range", "Chain Projectile Range", "Chain Damage Modifier" }, overview = function(t) return string.format("Projectiles can bounce across up to %s enemies, each within %s of each other. Each bounce can travel a distance of at most %s and multiplies the damage of the projectile by %s.", t[1], t[2], t[3], t[4]) end, },

["Piercing Details"] = { displayName = "Piercing Details", displayImage = "Piercing-Stat.png", basicStats = { "Piercing Amount", "Wall Piercing Amount" }, overview = function(t) return string.format("Projectiles can hit up to %s enemies in a line, or %s walls.", t[1], t[2]) end, },

["Ricochet Details"] = { displayName = "Ricochet Details", displayImage = "Ricochet-Stat.png", basicStats = { "Ricochet Amount", "Ricochet Per Target", "Ricochet Detection Range", "Max Ricochet Angle", "Ricochet Projectile Range", "Ricochet Damage Modifier" }, overview = function(t) return string.format("Projectiles can bounce across up to %s times, with each enemy being hit up to %s times. Enemies in a %s arc of radius %s centered at the heading of the projectile when it hit the previous target are potential targets. Each bounce can travel a distance of at most %s and multiplies the damage of the projectile by %s.", t[1], t[2], t[4], t[3], t[5], t[6]) end, }, }

return statistics