Module:Statistic/Legacy/Ablative Armor

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 = {	["Ablative Health"] = {		displayName = "Ablative Health",		displayImage = "ArmorSlots-Stat.png",		displayValue = function(v) return v end,		displayUnits = "",		overview = "Can take %s damage before being depleted",		details = "This is the amount of damage a piece of ablative armor can sustain before being depleted."		.. "\n\n"		.. "The ablative armor does not function when depleted; deal damage in order to restore its health." .. "\n\n" .. "Unlike shields and screens, ablative armor is not restored at the end of the battle.", relation = '+', },

["Defense"] = { displayName = "Defense", displayImage = "Defense-Stat.png", displayValue = function(v) return v * 100 end, displayUnits = "%", overview = "Intercept %s of incoming damage", details = "This is the proportion of damage a piece of ablative armor prevents from being dealt to the host's health. Such damage is suffered by the ablative armor instead.", relation = '+', },

["Ablative Damage Threshold"] = { displayName = "Ablative Damage Threshold", displayImage = "WeaponSlots-Stat.png", displayValue = function(v) return v end, displayUnits = "", overview = "Restore ablative health for every %s damage dealt", details = "This is the amount of damage a host has to deal to enemy ships or modules to restore ablative armor by an amount equal to Ablative Recovery." .. "\n\n" .. "Enemies that are out of range still count towards the Damage Threshold. Spawned enemies also count, except for squadrons." .. "\n\n" .. "This is one overall counter that tracks across all damage types, and one individual counter for each damage type.", relation = '-', },

["Ablative Recovery"] = { displayName = "Ablative Recovery", displayImage = "Ablativerecovery.png", displayValue = function(v) return v end, displayUnits = "", overview = "Restore %s ablative health after dealing enough damage", details = "This is the amount of health restored to ablative armor every time the Damage Threshold is met, regardless of damage type.", relation = '+', },

["Ablative Energy Recovery"] = { displayName = "Ablative Energy Recovery", displayImage = "Ablativerecovery-en.png", displayValue = function(v) return v end, displayUnits = "", overview = "Restore an extra %s ablative health after dealing enough Energy Damage", details = "This is the amount of health restored to ablative armor every time the Damage Threshold is met for Energy Damage.", relation = '+', },

["Ablative Explosive Recovery"] = { displayName = "Ablative Explosive Recovery", displayImage = "Ablativerecovery-ex.png", displayValue = function(v) return v end, displayUnits = "", overview = "Restore an extra %s ablative health after dealing enough Explosive Damage", details = "This is the amount of health restored to ablative armor every time the Damage Threshold is met for Explosive Damage.", relation = '+', },

["Ablative Kinetic Recovery"] = { displayName = "Ablative Kinetic Recovery", displayImage = "Ablativerecovery-ki.png", displayValue = function(v) return v end, displayUnits = "", overview = "Restore an extra %s ablative health after dealing enough Kinetic Damage", details = "This is the amount of health restored to ablative armor every time the Damage Threshold is met for Kinetic Damage.", relation = '+', },

["Ablative Alien Recovery"] = { displayName = "Ablative Alien Recovery", displayImage = "Ablativerecovery-al.png", displayValue = function(v) return v end, displayUnits = "", overview = "Restore an extra %s ablative health after dealing enough Alien Damage", details = "This is the amount of health restored to ablative armor every time the Damage Threshold is met for Alien Damage.", relation = '+', },

["Ablative Plasma Recovery"] = { displayName = "Ablative Plasma Recovery", displayImage = "Ablativerecovery-pl.png", displayValue = function(v) return v end, displayUnits = "", overview = "Restore an extra %s ablative health after dealing enough Plasma Damage", details = "This is the amount of health restored to ablative armor every time the Damage Threshold is met for Plasma Damage.", relation = '+', },

["Ablative Blight Recovery"] = { displayName = "Ablative Blight Recovery", displayImage = "Ablativerecovery-bl.png", displayValue = function(v) return v end, displayUnits = "", overview = "Restore an extra %s ablative health after dealing enough Blight Damage", details = "This is the amount of health restored to ablative armor every time the Damage Threshold is met for Blight Damage.", relation = '+', },

["Ablative Void Recovery"] = { displayName = "Ablative Void Recovery", displayImage = "Ablativerecovery-vo.png", displayValue = function(v) return v end, displayUnits = "", overview = "Restore an extra %s ablative health after dealing enough Void Damage", details = "This is the amount of health restored to ablative armor every time the Damage Threshold is met for Void Damage.", relation = '+', },

["Devour Recovery"] = { displayName = "Devour Recovery", displayImage = "Ablativerecovery.png", displayValue = function(v) return v * 100 end, displayUnits = "%", overview = "Restore %s of ablative health when an enemy is destroyed within range", details = "This is the proportion of health restored to ablative armor every time an enemy host within maximum range is destroyed." .. "\n\n" .. "Spawned enemies also count, except for squadrons.", 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 = { ["Ablation Details"] = { displayName = "Ablation Details", displayImage = "AblationSlot-Stat.png", basicStats = { "Ablative Damage Threshold", "Ablative Recovery", "Ablative Energy Recovery", "Ablative Explosive Recovery", "Ablative Kinetic Recovery", "Ablative Alien Recovery", "Ablative Plasma Recovery", "Ablative Blight Recovery", "Ablative Void Recovery", "Devour Recovery" }, overview = function(t) local result = string.format("For every %s damage dealt, restore %s ablative health.\n", t[1], t[2]) if t[3] then result = result .. string.format("Separately, for every %s Energy damage dealt, restore %s ablative health.\n", t[1], t[3]) end if t[4] then result = result .. string.format("Separately, for every %s Explosive damage dealt, restore %s ablative health.\n", t[1], t[4]) end if t[5] then result = result .. string.format("Separately, for every %s Kinetic damage dealt, restore %s ablative health.\n", t[1], t[5]) end if t[6] then result = result .. string.format("Separately, for every %s Alien damage dealt, restore %s ablative health.\n", t[1], t[6]) end if t[7] then result = result .. string.format("Separately, for every %s Plasma damage dealt, restore %s ablative health.\n", t[1], t[7]) end if t[8] then result = result .. string.format("Separately, for every %s Blight damage dealt, restore %s ablative health.\n", t[1], t[8]) end if t[9] then result = result .. string.format("Separately, for every %s Void damage dealt, restore %s ablative health.\n", t[1], t[9]) end return result .. string.format("Whenever an enemy is destroyed within range, restore %s of ablative health.") end, }, }

return statistics