Module:Statistic/Legacy/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 = {	["Health"] = {		displayName = "Health",		displayImage = "ArmorSlots-Stat.png",		displayValue = function(v) return v end,		displayUnits = "",		overview = "Can take %s damage before being destroyed",		details = "This is the amount of damage a piece of armor can sustain before being destroyed.",		relation = '+',	},

["Energy Resistance"] = { displayName = "Energy Resistance", displayImage = "En.png", displayValue = function(v) return v * 100 end, displayUnits = "%", overview = "Take %s less Energy Damage", details = "This is the proportion by which incoming Energy Damage to a piece of armor is reduced.", relation = '+', },	["Explosive Resistance"] = { displayName = "Explosive Resistance", displayImage = "Ex.png", displayValue = function(v) return v * 100 end, displayUnits = "%", overview = "Take %s less Explosive Damage", details = "This is the proportion by which incoming Explosive Damage to a piece of armor is reduced.", relation = '+', },	["Kinetic Resistance"] = { displayName = "Kinetic Resistance", displayImage = "Ki.png", displayValue = function(v) return v * 100 end, displayUnits = "%", overview = "Take %s less Kinetic Damage", details = "This is the proportion by which incoming Kinetic Damage to a piece of armor is reduced.", relation = '+', },

["Alien Resistance"] = { displayName = "Alien Resistance", displayImage = "Al.png", displayValue = function(v) return v * 100 end, displayUnits = "%", overview = "Take %s less Alien Damage", details = "This is the proportion by which incoming Alien Damage to a piece of armor is reduced.", relation = '+', },

["Plasma Resistance"] = { displayName = "Plasma Resistance", displayImage = "Pl.png", displayValue = function(v) return v * 100 end, displayUnits = "%", overview = "Take %s less Explosive Damage", details = "This is the proportion by which incoming Plasma Damage to a piece of armor is reduced.", relation = '+', },

["Blight Resistance"] = { displayName = "Blight Resistance", displayImage = "Bl.png", displayValue = function(v) return v * 100 end, displayUnits = "%", overview = "Take %s less Blight Damage", details = "This is the proportion by which incoming Blight Damage to a piece of armor is reduced.", relation = '+', },

["Void Resistance"] = { displayName = "Void Resistance", displayImage = "Vo.png", displayValue = function(v) return v * 100 end, displayUnits = "%", overview = "Take %s less Void Damage", details = "This is the proportion by which incoming Void Damage to a piece of armor is reduced.", relation = '+', },

["Energy Nebula Resistance"] = { displayName = "Energy Nebula Resistance", displayImage = "En-n.png", displayValue = function(v) return v * 100 end, displayUnits = "%", overview = "Take %s less damage from Energy Nebula", details = "This is the proportion by which incoming Energy Nebula Damage to a piece of armor is reduced.", relation = '+', },	["Explosive Nebula Resistance"] = { displayName = "Explosive Nebula Resistance", displayImage = "Ex-n.png", displayValue = function(v) return v * 100 end, displayUnits = "%", overview = "Take %s less damage from Explosive Nebula", details = "This is the proportion by which incoming Explosive Nebula Damage to a piece of armor is reduced.", relation = '+', },	["Kinetic Nebula Resistance"] = { displayName = "Kinetic Nebula Resistance", displayImage = "Ki-n.png", displayValue = function(v) return v * 100 end, displayUnits = "%", overview = "Take %s less damage from Kinetic Nebula", details = "This is the proportion by which incoming Kinetic Nebula Damage to a piece of armor is reduced.", relation = '+', },

["Alien Nebula Resistance"] = { displayName = "Alien Nebula Resistance", displayImage = "Al-n.png", displayValue = function(v) return v * 100 end, displayUnits = "%", overview = "Take %s less damage from Alien Nebula", details = "This is the proportion by which incoming Alien Nebula Damage to a piece of armor is reduced.", relation = '+', },

["Plasma Nebula Resistance"] = { displayName = "Plasma Nebula Resistance", displayImage = "Pl-n.png", displayValue = function(v) return v * 100 end, displayUnits = "%", overview = "Take %s less damage from Plasma Nebula", details = "This is the proportion by which incoming Plasma Nebula Damage to a piece of armor is reduced.", relation = '+', },

["Blight Nebula Resistance"] = { displayName = "Blight Nebula Resistance", displayImage = "Bl-n.png", displayValue = function(v) return v * 100 end, displayUnits = "%", overview = "Take %s less damage from Blight Nebula", details = "This is the proportion by which incoming Blight Nebula Damage to a piece of armor is reduced.", relation = '+', },

["Void Nebula Resistance"] = { displayName = "Void Nebula Resistance", displayImage = "Vo-n.png", displayValue = function(v) return v * 100 end, displayUnits = "%", overview = "Take %s less damage from Void Nebula", details = "This is the proportion by which incoming Void Nebula Damage to a piece of armor is reduced.", 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.compoundStatistics = { ["Damage Resistance Details"] = { displayName = "Damage Resistance Details", displayImage = "ResistanceSlot-Stat.png", basicStats = { "Energy Resistance", "Explosive Resistance", "Kinetic Resistance", "Alien Resistance", "Plasma Resistance", "Blight Resistance", "Void Resistance", "Energy Nebula Resistance", "Explosive Nebula Resistance", "Kinetic Nebula Resistance", "Alien Nebula Resistance", "Plasma Nebula Resistance", "Blight Nebula Resistance", "Void Nebula Resistance" }, overview = function(t) local result = "Resist" if t[1] then result = result .. t[1] .. " Energy," end if t[2] then result = result .. t[2] .. " Explosive," end if t[3] then result = result .. t[3] .. " Kinetic," end if t[4] then result = result .. t[4] .. " Alien," end if t[5] then result = result .. t[5] .. " Plasma," end if t[6] then result = result .. t[6] .. " Blight," end if t[7] then result = result .. t[7] .. " Void," end if t[8] then result = result .. t[8] .. " Energy Nebula," end if t[9] then result = result .. t[9] .. " Explosive Nebula," end if t[10] then result = result .. t[10] .. " Kinetic Nebula," end if t[11] then result = result .. t[11] .. " Alien Nebula," end if t[12] then result = result .. t[12] .. " Plasma Nebula," end if t[13] then result = result .. t[13] .. " Blight Nebula," end if t[14] then result = result .. t[14] .. " Void Nebula," end return result:sub(1, -2) .. string.format(" damage.", t[10], t[11]) end, }, }

return statistics