Module:Statistic/Legacy/Shield

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 = {	["Energy"] = {		displayName = "Energy",		displayImage = "ShieldSlots-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 shield can sustain before being depleted. The shield no longer functions when depleted."		.. "\n\n"		.. "Energy is automatically restored at the end of each combat.",		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 shield prevents from being dealt to the host's health. Such damage is suffered by the shield instead.", relation = '+', },

["Recharge"] = { displayName = "Recharge", displayImage = "Recharge-Stat.png", displayValue = function(v) return v end, displayUnits = "energy/s", overview = "Regenerate %s while undisturbed", details = "This is the amount of health a shield regenerates per second, after not being hit for a certain amount of time equal to the Recharge Delay." .. "\n\n" .. "This does not function if the shield has been fully depleted.", relation = '+', },

["Recharge Delay"] = { displayName = "Recharge Delay", displayImage = "RechargeDelay-Stat.png", displayValue = function(v) return v end, displayUnits = "s", overview = "Start recharging after %s of not being disturbed", details = "This is how long it takes for a shield to start regenerating. The timer is reset every time the host gets hit.", 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 shield 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 shield 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 shield 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 shield 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 shield 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 shield 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 shield 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 shield 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 shield 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 shield 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 shield 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 shield 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 shield 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 shield 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.compositeStatistics = { ["Recharge Details"] = { displayName = "Recharge Details", displayImage = "Recharge-Stat.png", basicStats = { "Recharge", "Recharge Delay" }, overview = function(t) return string.format("Recharge %s after %s of not being disturbed. Does not work when fully depleted.", t[1], t[2]) end, },	["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