Module:Statistic/Legacy/Screen

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 = "ScreenSlots-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 screen can sustain before being depleted. The screen 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 screen prevents from being dealt to the host's health. Such damage is suffered by the screen instead.", relation = '+', },

["Phase Screen Charge"] = { displayName = "Phase Screen Charge", displayImage = "PhaseScreenCharge-Stat.png", displayValue = function(v) return v end, displayUnits = "energy/s", overview = "Charge %s until full, then enter Phase State", details = "This is the amount of energy a screen is charged by per second. When the energy reaches the current screen energy, Phase State is activated and the screen begins to drain." .. "\n\n" .. "This does not function if the current Screen Energy is lower than the Phase Threshold.", relation = '+', },

["Phase Screen Drain"] = { displayName = "Phase Screen Drain", displayImage = "PhaseScreenDrain-Stat.png", displayValue = function(v) return v end, displayUnits = "energy/s", overview = "Drain %s until empty, then exit Phase State", details = "This is the amount of energy a screen is drained by per second. When the energy reaches zero, Phase State is exited and the screen begins to charge.", relation = '-', },

["Phase Threshold"] = { displayName = "Phase Threshold", displayImage = "ScreenSlots-Stat.png", displayValue = function(v) return v end, displayUnits = "", overview = "Phase State cannot be maintained if screen energy is below %s", details = "This is the amount of energy of a screen below which Phase State can no longer be entered.", 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 screen 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 screen 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 screen 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 screen 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 screen 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 screen 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 screen 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 screen 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 screen 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 screen 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 screen 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 screen 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 screen 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 screen 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 = { ["Phasing Details"] = { displayName = "Phasing Details", displayImage = "EnteringPhaseState-Stat.png", basicStats = { "Phase Screen Charge", "Phase Screen Drain", "Phase Threshold" }, overview = function(t) return string.format("Charge %s until full, then enter Phase State; drain %s until empty, then exit Phase State. Phase State cannot be maintained if screen energy is below %s.", t[1], t[2], t[3]) 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