From b6bc0a10082418b2b3a8e11440afe829ee99efde Mon Sep 17 00:00:00 2001 From: Regisle Date: Sat, 4 Mar 2023 17:09:23 +1030 Subject: [PATCH 01/25] move display stats to their own file --- src/Modules/Build.lua | 215 +-------------------------- src/Modules/BuildDisplayStats.lua | 236 ++++++++++++++++++++++++++++++ 2 files changed, 238 insertions(+), 213 deletions(-) create mode 100644 src/Modules/BuildDisplayStats.lua diff --git a/src/Modules/Build.lua b/src/Modules/Build.lua index 1eb0ebabdb..a3036c892e 100644 --- a/src/Modules/Build.lua +++ b/src/Modules/Build.lua @@ -235,219 +235,8 @@ function buildMode:Init(dbFileName, buildName, buildXML, convertBuild) -- List of display stats -- This defines the stats in the side bar, and also which stats show in node/item comparisons - -- This may be user-customisable in the future - self.displayStats = { - { stat = "ActiveMinionLimit", label = "Active Minion Limit", fmt = "d" }, - { stat = "AverageHit", label = "Average Hit", fmt = ".1f", compPercent = true }, - { stat = "PvpAverageHit", label = "PvP Average Hit", fmt = ".1f", compPercent = true, flag = "isPvP" }, - { stat = "AverageDamage", label = "Average Damage", fmt = ".1f", compPercent = true, flag = "attack" }, - { stat = "AverageDamage", label = "Average Damage", fmt = ".1f", compPercent = true, flag = "monsterExplode", condFunc = function(v,o) return o.HitChance ~= 100 end }, - { stat = "AverageBurstDamage", label = "Average Burst Damage", fmt = ".1f", compPercent = true, condFunc = function(v,o) return o.AverageBurstHits and o.AverageBurstHits > 1 and v > 0 end }, - { stat = "PvpAverageDamage", label = "PvP Average Damage", fmt = ".1f", compPercent = true, flag = "attackPvP" }, - { stat = "Speed", label = "Attack Rate", fmt = ".2f", compPercent = true, flag = "attack", condFunc = function(v,o) return v > 0 and (o.TriggerTime or 0) == 0 end }, - { stat = "Speed", label = "Cast Rate", fmt = ".2f", compPercent = true, flag = "spell", condFunc = function(v,o) return v > 0 and (o.TriggerTime or 0) == 0 end }, - { stat = "Speed", label = "Effective Trigger Rate", fmt = ".2f", compPercent = true, condFunc = function(v,o) return (o.TriggerTime or 0) ~= 0 end }, - { stat = "WarcryCastTime", label = "Cast Time", fmt = ".2fs", compPercent = true, lowerIsBetter = true, flag = "warcry" }, - { stat = "HitSpeed", label = "Hit Rate", fmt = ".2f", compPercent = true, condFunc = function(v,o) return not o.TriggerTime end }, - { stat = "HitTime", label = "Channel Time", fmt = ".2fs", compPercent = true, flag = "channelRelease", lowerIsBetter = true, condFunc = function(v,o) return not o.TriggerTime end }, - { stat = "ChannelTimeToTrigger", label = "Channel Time", fmt = ".2fs", compPercent = true, lowerIsBetter = true, }, - { stat = "TrapThrowingTime", label = "Trap Throwing Time", fmt = ".2fs", compPercent = true, lowerIsBetter = true, }, - { stat = "TrapCooldown", label = "Trap Cooldown", fmt = ".3fs", lowerIsBetter = true }, - { stat = "MineLayingTime", label = "Mine Throwing Time", fmt = ".2fs", compPercent = true, lowerIsBetter = true, }, - { stat = "TotemPlacementTime", label = "Totem Placement Time", fmt = ".2fs", compPercent = true, lowerIsBetter = true, condFunc = function(v,o) return not o.TriggerTime end }, - { stat = "PreEffectiveCritChance", label = "Crit Chance", fmt = ".2f%%" }, - { stat = "CritChance", label = "Effective Crit Chance", fmt = ".2f%%", condFunc = function(v,o) return v ~= o.PreEffectiveCritChance end }, - { stat = "CritMultiplier", label = "Crit Multiplier", fmt = "d%%", pc = true, condFunc = function(v,o) return (o.CritChance or 0) > 0 end }, - { stat = "HitChance", label = "Hit Chance", fmt = ".0f%%", flag = "attack" }, - { stat = "HitChance", label = "Hit Chance", fmt = ".0f%%", condFunc = function(v,o) return o.enemyHasSpellBlock end }, - { stat = "TotalDPS", label = "Hit DPS", fmt = ".1f", compPercent = true, flag = "notAverage" }, - { stat = "PvpTotalDPS", label = "PvP Hit DPS", fmt = ".1f", compPercent = true, flag = "notAveragePvP" }, - { stat = "TotalDPS", label = "Hit DPS", fmt = ".1f", compPercent = true, flag = "showAverage", condFunc = function(v,o) return (o.TriggerTime or 0) ~= 0 end }, - { stat = "TotalDot", label = "DoT DPS", fmt = ".1f", compPercent = true }, - { stat = "WithDotDPS", label = "Total DPS inc. DoT", fmt = ".1f", compPercent = true, flag = "notAverage", condFunc = function(v,o) return v ~= o.TotalDPS and (o.PoisonDPS or 0) == 0 and (o.IgniteDPS or 0) == 0 and (o.ImpaleDPS or 0) == 0 and (o.BleedDPS or 0) == 0 end }, - { stat = "BleedDPS", label = "Bleed DPS", fmt = ".1f", compPercent = true, warnFunc = function(v) return v >= data.misc.DotDpsCap and "Bleed DPS exceeds in game limit" end }, - { stat = "CorruptingBloodDPS", label = "Corrupting Blood DPS", fmt = ".1f", compPercent = true, warnFunc = function(v,o) return v >= data.misc.DotDpsCap and "Corrupting Blood DPS exceeds in game limit" end }, - { stat = "BleedDamage", label = "Total Damage per Bleed", fmt = ".1f", compPercent = true, flag = "showAverage" }, - { stat = "WithBleedDPS", label = "Total DPS inc. Bleed", fmt = ".1f", compPercent = true, flag = "notAverage", condFunc = function(v,o) return v ~= o.TotalDPS and (o.TotalDot or 0) == 0 and (o.PoisonDPS or 0) == 0 and (o.ImpaleDPS or 0) == 0 and (o.IgniteDPS or 0) == 0 end }, - { stat = "IgniteDPS", label = "Ignite DPS", fmt = ".1f", compPercent = true, warnFunc = function(v) return v >= data.misc.DotDpsCap and "Ignite DPS exceeds in game limit" end }, - { stat = "IgniteDamage", label = "Total Damage per Ignite", fmt = ".1f", compPercent = true, flag = "showAverage" }, - { stat = "BurningGroundDPS", label = "Burning Ground DPS", fmt = ".1f", compPercent = true, warnFunc = function(v,o) return v >= data.misc.DotDpsCap and "Burning Ground DPS exceeds in game limit" end }, - { stat = "MirageBurningGroundDPS", label = "Mirage Burning Ground DPS", fmt = ".1f", compPercent = true, condFunc = function(v,o) return v ~= o.BurningGroundDPS end, warnFunc = function(v,o) return v >= data.misc.DotDpsCap and "Mirage Burning Ground DPS exceeds in game limit" end }, - { stat = "WithIgniteDPS", label = "Total DPS inc. Ignite", fmt = ".1f", compPercent = true, flag = "notAverage", condFunc = function(v,o) return v ~= o.TotalDPS and (o.TotalDot or 0) == 0 and (o.PoisonDPS or 0) == 0 and (o.ImpaleDPS or 0) == 0 and (o.BleedDPS or 0) == 0 end }, - { stat = "WithIgniteAverageDamage", label = "Average Dmg. inc. Ignite", fmt = ".1f", compPercent = true }, - { stat = "PoisonDPS", label = "Poison DPS", fmt = ".1f", compPercent = true, warnFunc = function(v) return v >= data.misc.DotDpsCap and "Poison DPS exceeds in game limit" end }, - { stat = "CausticGroundDPS", label = "Caustic Ground DPS", fmt = ".1f", compPercent = true, warnFunc = function(v,o) return v >= data.misc.DotDpsCap and "Caustic Ground DPS exceeds in game limit" end }, - { stat = "MirageCausticGroundDPS", label = "Mirage Caustic Ground DPS", fmt = ".1f", compPercent = true, condFunc = function(v,o) return v ~= o.CausticGroundDPS end, warnFunc = function(v,o) return v >= data.misc.DotDpsCap and "Mirage Caustic Ground DPS exceeds in game limit" end }, - { stat = "PoisonDamage", label = "Total Damage per Poison", fmt = ".1f", compPercent = true }, - { stat = "WithPoisonDPS", label = "Total DPS inc. Poison", fmt = ".1f", compPercent = true, flag = "poison", flag = "notAverage", condFunc = function(v,o) return v ~= o.TotalDPS and (o.TotalDot or 0) == 0 and (o.IgniteDPS or 0) == 0 and (o.ImpaleDPS or 0) == 0 and (o.BleedDPS or 0) == 0 end }, - { stat = "DecayDPS", label = "Decay DPS", fmt = ".1f", compPercent = true }, - { stat = "TotalDotDPS", label = "Total DoT DPS", fmt = ".1f", compPercent = true, condFunc = function(v,o) return o.showTotalDotDPS or ( v ~= o.TotalDot and v ~= o.TotalPoisonDPS and v ~= o.CausticGroundDPS and v ~= (o.TotalIgniteDPS or o.IgniteDPS) and v ~= o.BurningGroundDPS and v ~= o.BleedDPS and v~= o.CorruptingBloodDPS and v ~= o.MirageCausticGroundDPS and v ~= o.MirageBurningGroundDPS) end, warnFunc = function(v) return v >= data.misc.DotDpsCap and "DoT DPS exceeds in game limit" end }, - { stat = "ImpaleDPS", label = "Impale Damage", fmt = ".1f", compPercent = true, flag = "impale", flag = "showAverage" }, - { stat = "WithImpaleDPS", label = "Damage inc. Impale", fmt = ".1f", compPercent = true, flag = "impale", flag = "showAverage", condFunc = function(v,o) return v ~= o.TotalDPS and (o.TotalDot or 0) == 0 and (o.IgniteDPS or 0) == 0 and (o.PoisonDPS or 0) == 0 and (o.BleedDPS or 0) == 0 end }, - { stat = "ImpaleDPS", label = "Impale DPS", fmt = ".1f", compPercent = true, flag = "impale", flag = "notAverage" }, - { stat = "WithImpaleDPS", label = "Total DPS inc. Impale", fmt = ".1f", compPercent = true, flag = "impale", flag = "notAverage", condFunc = function(v,o) return v ~= o.TotalDPS and (o.TotalDot or 0) == 0 and (o.IgniteDPS or 0) == 0 and (o.PoisonDPS or 0) == 0 and (o.BleedDPS or 0) == 0 end }, - { stat = "MirageDPS", label = "Total Mirage DPS", fmt = ".1f", compPercent = true, condFunc = function(v,o) return v > 0 end }, - { stat = "CullingDPS", label = "Culling DPS", fmt = ".1f", compPercent = true, condFunc = function(v,o) return (o.CullingDPS or 0) > 0 end }, - { stat = "ReservationDPS", label = "Reservation DPS", fmt = ".1f", compPercent = true, condFunc = function(v,o) return (o.ReservationDPS or 0) > 0 end }, - { stat = "CombinedDPS", label = "Combined DPS", fmt = ".1f", compPercent = true, flag = "notAverage", condFunc = function(v,o) return v ~= ((o.TotalDPS or 0) + (o.TotalDot or 0)) and v ~= o.WithImpaleDPS and ( o.showTotalDotDPS or ( v ~= o.WithPoisonDPS and v ~= o.WithIgniteDPS and v ~= o.WithBleedDPS ) ) end }, - { stat = "CombinedAvg", label = "Combined Total Damage", fmt = ".1f", compPercent = true, flag = "showAverage", condFunc = function(v,o) return (v ~= o.AverageDamage and (o.TotalDot or 0) == 0) and (v ~= o.WithPoisonDPS or v ~= o.WithIgniteDPS or v ~= o.WithBleedDPS) end }, - { stat = "ExplodeChance", label = "Total Explode Chance", fmt = ".0f%%" }, - { stat = "CombinedAvgToMonsterLife", label = "Enemy Life Equivalent", fmt = ".1f%%" }, - { stat = "Cooldown", label = "Skill Cooldown", fmt = ".3fs", lowerIsBetter = true }, - { stat = "SealCooldown", label = "Seal Gain Frequency", fmt = ".2fs", lowerIsBetter = true }, - { stat = "SealMax", label = "Max Number of Seals", fmt = "d" }, - { stat = "TimeMaxSeals", label = "Time to Gain Max Seals", fmt = ".2fs", lowerIsBetter = true }, - { stat = "AreaOfEffectRadiusMetres", label = "AoE Radius", fmt = ".1fm" }, - { stat = "BrandAttachmentRangeMetre", label = "Attachment Range", fmt = ".1fm", flag = "brand" }, - { stat = "BrandTicks", label = "Activations per Brand", fmt = "d", flag = "brand" }, - { stat = "ManaCost", label = "Mana Cost", fmt = "d", color = colorCodes.MANA, pool = "ManaUnreserved", compPercent = true, lowerIsBetter = true, condFunc = function(v,o) return o.ManaHasCost end }, - { stat = "ManaPercentCost", label = "Mana Cost", fmt = "d%%", color = colorCodes.MANA, pool = "ManaUnreservedPercent", compPercent = true, lowerIsBetter = true, condFunc = function(v,o) return o.ManaPercentHasCost end }, - { stat = "ManaPerSecondCost", label = "Mana Cost per second", fmt = ".2f", color = colorCodes.MANA, pool = "ManaUnreserved", compPercent = true, lowerIsBetter = true, condFunc = function(v,o) return o.ManaPerSecondHasCost end }, - { stat = "ManaPercentPerSecondCost", label = "Mana Cost per second", fmt = ".2f%%", color = colorCodes.MANA, pool = "ManaUnreservedPercent", compPercent = true, lowerIsBetter = true, condFunc = function(v,o) return o.ManaPercentPerSecondHasCost end }, - { stat = "LifeCost", label = "Life Cost", fmt = "d", color = colorCodes.LIFE, pool = "LifeUnreserved", compPercent = true, lowerIsBetter = true, condFunc = function(v,o) return o.LifeHasCost end }, - { stat = "LifePercentCost", label = "Life Cost", fmt = "d%%", color = colorCodes.LIFE, pool = "LifeUnreservedPercent", compPercent = true, lowerIsBetter = true, condFunc = function(v,o) return o.LifePercentHasCost end }, - { stat = "LifePerSecondCost", label = "Life Cost per second", fmt = ".2f", color = colorCodes.LIFE, pool = "LifeUnreserved", compPercent = true, lowerIsBetter = true, condFunc = function(v,o) return o.LifePerSecondHasCost end }, - { stat = "LifePercentPerSecondCost", label = "Life Cost per second", fmt = ".2f%%", color = colorCodes.LIFE, pool = "LifeUnreservedPercent", compPercent = true, lowerIsBetter = true, condFunc = function(v,o) return o.LifePercentPerSecondHasCost end }, - { stat = "ESCost", label = "Energy Shield Cost", fmt = "d", color = colorCodes.ES, pool = "EnergyShield", compPercent = true, lowerIsBetter = true, condFunc = function(v,o) return o.ESHasCost end }, - { stat = "ESPerSecondCost", label = "ES Cost per second", fmt = ".2f", color = colorCodes.ES, pool = "EnergyShield", compPercent = true, lowerIsBetter = true, condFunc = function(v,o) return o.ESPerSecondHasCost end }, - { stat = "ESPercentPerSecondCost", label = "ES Cost per second", fmt = ".2f%%", color = colorCodes.ES, compPercent = true, lowerIsBetter = true, condFunc = function(v,o) return o.ESPercentPerSecondHasCost end }, - { stat = "RageCost", label = "Rage Cost", fmt = "d", color = colorCodes.RAGE, pool = "Rage", compPercent = true, lowerIsBetter = true, condFunc = function(v,o) return o.RageHasCost end }, - { stat = "RagePerSecondCost", label = "Rage Cost per second", fmt = ".2f", color = colorCodes.RAGE, pool = "Rage", compPercent = true, lowerIsBetter = true, condFunc = function(v,o) return o.RagePerSecondHasCost end }, - { stat = "SoulCost", label = "Soul Cost", fmt = "d", color = colorCodes.RAGE, pool = "Soul", compPercent = true, lowerIsBetter = true, condFunc = function(v,o) return o.SoulHasCost end }, - { }, - { stat = "Str", label = "Strength", color = colorCodes.STRENGTH, fmt = "d" }, - { stat = "ReqStr", label = "Strength Required", color = colorCodes.STRENGTH, fmt = "d", lowerIsBetter = true, condFunc = function(v,o) return v > o.Str end, warnFunc = function(v) return "You do not meet the Strength requirement" end }, - { stat = "Dex", label = "Dexterity", color = colorCodes.DEXTERITY, fmt = "d" }, - { stat = "ReqDex", label = "Dexterity Required", color = colorCodes.DEXTERITY, fmt = "d", lowerIsBetter = true, condFunc = function(v,o) return v > o.Dex end, warnFunc = function(v) return "You do not meet the Dexterity requirement" end }, - { stat = "Int", label = "Intelligence", color = colorCodes.INTELLIGENCE, fmt = "d" }, - { stat = "ReqInt", label = "Intelligence Required", color = colorCodes.INTELLIGENCE, fmt = "d", lowerIsBetter = true, condFunc = function(v,o) return v > o.Int end, warnFunc = function(v) return "You do not meet the Intelligence requirement" end }, - { stat = "Omni", label = "Omniscience", color = colorCodes.RARE, fmt = "d" }, - { stat = "ReqOmni", label = "Omniscience Required", color = colorCodes.RARE, fmt = "d", lowerIsBetter = true, condFunc = function(v,o) return v > (o.Omni or 0) end, warnFunc = function(v) return "You do not meet the Omniscience requirement" end }, - { }, - { stat = "Devotion", label = "Devotion", color = colorCodes.RARE, fmt = "d" }, - { }, - { stat = "TotalEHP", label = "Effective Hit Pool", fmt = ".0f", compPercent = true }, - { stat = "PvPTotalTakenHit", label = "PvP Hit Taken", fmt = ".1f", flag = "isPvP", lowerIsBetter = true }, - { stat = "PhysicalMaximumHitTaken", label = "Phys Max Hit", fmt = ".0f", color = colorCodes.PHYS, compPercent = true, }, - { stat = "LightningMaximumHitTaken", label = "Elemental Max Hit", fmt = ".0f", color = colorCodes.LIGHTNING, compPercent = true, condFunc = function(v,o) return o.LightningMaximumHitTaken == o.ColdMaximumHitTaken and o.LightningMaximumHitTaken == o.FireMaximumHitTaken end }, - { stat = "FireMaximumHitTaken", label = "Fire Max Hit", fmt = ".0f", color = colorCodes.FIRE, compPercent = true, condFunc = function(v,o) return o.LightningMaximumHitTaken ~= o.ColdMaximumHitTaken or o.LightningMaximumHitTaken ~= o.FireMaximumHitTaken end }, - { stat = "ColdMaximumHitTaken", label = "Cold Max Hit", fmt = ".0f", color = colorCodes.COLD, compPercent = true, condFunc = function(v,o) return o.LightningMaximumHitTaken ~= o.ColdMaximumHitTaken or o.LightningMaximumHitTaken ~= o.FireMaximumHitTaken end }, - { stat = "LightningMaximumHitTaken", label = "Lightning Max Hit", fmt = ".0f", color = colorCodes.LIGHTNING, compPercent = true, condFunc = function(v,o) return o.LightningMaximumHitTaken ~= o.ColdMaximumHitTaken or o.LightningMaximumHitTaken ~= o.FireMaximumHitTaken end }, - { stat = "ChaosMaximumHitTaken", label = "Chaos Max Hit", fmt = ".0f", color = colorCodes.CHAOS, compPercent = true }, - { }, - { stat = "MainHand", childStat = "Accuracy", label = "MH Accuracy", fmt = "d", condFunc = function(v,o) return o.PreciseTechnique end, warnFunc = function(v,o) return v < o.Life and "You do not have enough Accuracy for Precise Technique" end, warnColor = true }, - { stat = "OffHand", childStat = "Accuracy", label = "OH Accuracy", fmt = "d", condFunc = function(v,o) return o.PreciseTechnique end, warnFunc = function(v,o) return v < o.Life and "You do not have enough Accuracy for Precise Technique" end, warnColor = true }, - { stat = "Life", label = "Total Life", fmt = "d", color = colorCodes.LIFE, compPercent = true }, - { stat = "Spec:LifeInc", label = "%Inc Life from Tree", fmt = "d%%", color = colorCodes.LIFE, condFunc = function(v,o) return v > 0 and o.Life > 1 end }, - { stat = "LifeUnreserved", label = "Unreserved Life", fmt = "d", color = colorCodes.LIFE, condFunc = function(v,o) return v < o.Life end, compPercent = true, warnFunc = function(v) return v <= 0 and "Your unreserved Life is below 1" end }, - { stat = "LifeRecoverable", label = "Life Recoverable", fmt = "d", color = colorCodes.LIFE, condFunc = function(v,o) return v < o.LifeUnreserved end, }, - { stat = "LifeUnreservedPercent", label = "Unreserved Life", fmt = "d%%", color = colorCodes.LIFE, condFunc = function(v,o) return v < 100 end }, - { stat = "LifeRegenRecovery", label = "Life Regen", fmt = ".1f", color = colorCodes.LIFE, condFunc = function(v,o) return o.LifeRecovery <= 0 and o.LifeRegenRecovery ~= 0 end }, - { stat = "LifeRegenRecovery", label = "Life Recovery", fmt = ".1f", color = colorCodes.LIFE, condFunc = function(v,o) return o.LifeRecovery > 0 and o.LifeRegenRecovery ~= 0 end }, - { stat = "LifeLeechGainRate", label = "Life Leech/On Hit Rate", fmt = ".1f", color = colorCodes.LIFE, compPercent = true }, - { stat = "LifeLeechGainPerHit", label = "Life Leech/Gain per Hit", fmt = ".1f", color = colorCodes.LIFE, compPercent = true }, - { }, - { stat = "Mana", label = "Total Mana", fmt = "d", color = colorCodes.MANA, compPercent = true }, - { stat = "Spec:ManaInc", label = "%Inc Mana from Tree", color = colorCodes.MANA, fmt = "d%%" }, - { stat = "ManaUnreserved", label = "Unreserved Mana", fmt = "d", color = colorCodes.MANA, condFunc = function(v,o) return v < o.Mana end, compPercent = true, warnFunc = function(v) return v < 0 and "Your unreserved Mana is negative" end }, - { stat = "ManaUnreservedPercent", label = "Unreserved Mana", fmt = "d%%", color = colorCodes.MANA, condFunc = function(v,o) return v < 100 end }, - { stat = "ManaRegenRecovery", label = "Mana Regen", fmt = ".1f", color = colorCodes.MANA, condFunc = function(v,o) return o.ManaRecovery <= 0 and o.ManaRegenRecovery ~= 0 end }, - { stat = "ManaRegenRecovery", label = "Mana Recovery", fmt = ".1f", color = colorCodes.MANA, condFunc = function(v,o) return o.ManaRecovery > 0 and o.ManaRegenRecovery ~= 0 end }, - { stat = "ManaLeechGainRate", label = "Mana Leech/On Hit Rate", fmt = ".1f", color = colorCodes.MANA, compPercent = true }, - { stat = "ManaLeechGainPerHit", label = "Mana Leech/Gain per Hit", fmt = ".1f", color = colorCodes.MANA, compPercent = true }, - { }, - { stat = "EnergyShield", label = "Energy Shield", fmt = "d", color = colorCodes.ES, compPercent = true }, - { stat = "EnergyShieldRecoveryCap", label = "Recoverable ES", color = colorCodes.ES, fmt = "d", condFunc = function(v,o) return o.CappingES end }, - { stat = "Spec:EnergyShieldInc", label = "%Inc ES from Tree", color = colorCodes.ES, fmt = "d%%" }, - { stat = "EnergyShieldRegenRecovery", label = "ES Regen", color = colorCodes.ES, fmt = ".1f", condFunc = function(v,o) return o.EnergyShieldRecovery <= 0 and o.EnergyShieldRegenRecovery ~= 0 end }, - { stat = "EnergyShieldRegenRecovery", label = "ES Recovery", color = colorCodes.ES, fmt = ".1f", condFunc = function(v,o) return o.EnergyShieldRecovery > 0 and o.EnergyShieldRegenRecovery ~= 0 end }, - { stat = "EnergyShieldLeechGainRate", label = "ES Leech/On Hit Rate", color = colorCodes.ES, fmt = ".1f", compPercent = true }, - { stat = "EnergyShieldLeechGainPerHit", label = "ES Leech/Gain per Hit", color = colorCodes.ES, fmt = ".1f", compPercent = true }, - { }, - { stat = "Ward", label = "Ward", fmt = "d", color = colorCodes.WARD, compPercent = true }, - { }, - { stat = "Rage", label = "Rage", fmt = "d", color = colorCodes.RAGE, compPercent = true }, - { stat = "RageRegenRecovery", label = "Rage Regen", fmt = ".1f", color = colorCodes.RAGE, compPercent = true }, - { }, - { stat = "TotalDegen", label = "Total Degen", fmt = ".1f", lowerIsBetter = true }, - { stat = "TotalNetRegen", label = "Total Net Recovery", fmt = "+.1f" }, - { stat = "NetLifeRegen", label = "Net Life Recovery", fmt = "+.1f", color = colorCodes.LIFE }, - { stat = "NetManaRegen", label = "Net Mana Recovery", fmt = "+.1f", color = colorCodes.MANA }, - { stat = "NetEnergyShieldRegen", label = "Net ES Recovery", fmt = "+.1f", color = colorCodes.ES }, - { }, - { stat = "Evasion", label = "Evasion rating", fmt = "d", color = colorCodes.EVASION, compPercent = true }, - { stat = "Spec:EvasionInc", label = "%Inc Evasion from Tree", color = colorCodes.EVASION, fmt = "d%%" }, - { stat = "MeleeEvadeChance", label = "Evade Chance", fmt = "d%%", color = colorCodes.EVASION, condFunc = function(v,o) return v > 0 and o.MeleeEvadeChance == o.ProjectileEvadeChance end }, - { stat = "MeleeEvadeChance", label = "Melee Evade Chance", fmt = "d%%", color = colorCodes.EVASION, condFunc = function(v,o) return v > 0 and o.MeleeEvadeChance ~= o.ProjectileEvadeChance end }, - { stat = "ProjectileEvadeChance", label = "Projectile Evade Chance", fmt = "d%%", color = colorCodes.EVASION, condFunc = function(v,o) return v > 0 and o.MeleeEvadeChance ~= o.ProjectileEvadeChance end }, - { }, - { stat = "Armour", label = "Armour", fmt = "d", compPercent = true }, - { stat = "Spec:ArmourInc", label = "%Inc Armour from Tree", fmt = "d%%" }, - { stat = "PhysicalDamageReduction", label = "Phys. Damage Reduction", fmt = "d%%", condFunc = function() return true end }, - { }, - { stat = "BlockChance", label = "Block Chance", fmt = "d%%", overCapStat = "BlockChanceOverCap" }, - { stat = "SpellBlockChance", label = "Spell Block Chance", fmt = "d%%", overCapStat = "SpellBlockChanceOverCap" }, - { stat = "AttackDodgeChance", label = "Attack Dodge Chance", fmt = "d%%", overCapStat = "AttackDodgeChanceOverCap" }, - { stat = "SpellDodgeChance", label = "Spell Dodge Chance", fmt = "d%%", overCapStat = "SpellDodgeChanceOverCap" }, - { stat = "EffectiveSpellSuppressionChance", label = "Spell Suppression Chance", fmt = "d%%", overCapStat = "SpellSuppressionChanceOverCap" }, - { }, - { stat = "FireResist", label = "Fire Resistance", fmt = "d%%", color = colorCodes.FIRE, condFunc = function() return true end, overCapStat = "FireResistOverCap"}, - { stat = "FireResistOverCap", label = "Fire Res. Over Max", fmt = "d%%", hideStat = true }, - { stat = "ColdResist", label = "Cold Resistance", fmt = "d%%", color = colorCodes.COLD, condFunc = function() return true end, overCapStat = "ColdResistOverCap" }, - { stat = "ColdResistOverCap", label = "Cold Res. Over Max", fmt = "d%%", hideStat = true }, - { stat = "LightningResist", label = "Lightning Resistance", fmt = "d%%", color = colorCodes.LIGHTNING, condFunc = function() return true end, overCapStat = "LightningResistOverCap" }, - { stat = "LightningResistOverCap", label = "Lightning Res. Over Max", fmt = "d%%", hideStat = true }, - { stat = "ChaosResist", label = "Chaos Resistance", fmt = "d%%", color = colorCodes.CHAOS, condFunc = function(v,o) return not o.ChaosInoculation end, overCapStat = "ChaosResistOverCap" }, - { stat = "ChaosResistOverCap", label = "Chaos Res. Over Max", fmt = "d%%", hideStat = true }, - { label = "Chaos Resistance", val = "Immune", labelStat = "ChaosResist", color = colorCodes.CHAOS, condFunc = function(o) return o.ChaosInoculation end }, - { }, - { stat = "EffectiveMovementSpeedMod", label = "Movement Speed Modifier", fmt = "+d%%", mod = true, condFunc = function() return true end }, - { }, - { stat = "FullDPS", label = "Full DPS", fmt = ".1f", color = colorCodes.CURRENCY, compPercent = true }, - { stat = "FullDotDPS", label = "Full Dot DPS", fmt = ".1f", color = colorCodes.CURRENCY, compPercent = true, condFunc = function (v) return v >= data.misc.DotDpsCap end, warnFunc = function (v) return "Full Dot DPS exceeds in game limit" end }, - { }, - { stat = "SkillDPS", label = "Skill DPS", condFunc = function() return true end }, - } - self.minionDisplayStats = { - { stat = "AverageDamage", label = "Average Damage", fmt = ".1f", compPercent = true }, - { stat = "Speed", label = "Attack/Cast Rate", fmt = ".2f", compPercent = true, condFunc = function(v,o) return v > 0 and (o.TriggerTime or 0) == 0 end }, - { stat = "HitSpeed", label = "Hit Rate", fmt = ".2f" }, - { stat = "Speed", label = "Effective Trigger Rate", fmt = ".2f", compPercent = true, condFunc = function(v,o) return (o.TriggerTime or 0) ~= 0 end }, - { stat = "TotalDPS", label = "Hit DPS", fmt = ".1f", compPercent = true }, - { stat = "TotalDot", label = "DoT DPS", fmt = ".1f", compPercent = true }, - { stat = "WithDotDPS", label = "Total DPS inc. DoT", fmt = ".1f", compPercent = true, condFunc = function(v,o) return v ~= o.TotalDPS and (o.PoisonDPS or 0) == 0 and (o.IgniteDPS or 0) == 0 and (o.ImpaleDPS or 0) == 0 and (o.BleedDPS or 0) == 0 end }, - { stat = "BleedDPS", label = "Bleed DPS", fmt = ".1f", compPercent = true, warnFunc = function(v) return v >= data.misc.DotDpsCap and "Minion Bleed DPS exceeds in game limit" end }, - { stat = "WithBleedDPS", label = "Total DPS inc. Bleed", fmt = ".1f", compPercent = true, condFunc = function(v,o) return v ~= o.TotalDPS and (o.TotalDot or 0) == 0 and (o.PoisonDPS or 0) == 0 and (o.ImpaleDPS or 0) == 0 and (o.IgniteDPS or 0) == 0 end }, - { stat = "IgniteDPS", label = "Ignite DPS", fmt = ".1f", compPercent = true, warnFunc = function(v) return v >= data.misc.DotDpsCap and "Minion Ignite DPS exceeds in game limit" end }, - { stat = "WithIgniteDPS", label = "Total DPS inc. Ignite", fmt = ".1f", compPercent = true, condFunc = function(v,o) return v ~= o.TotalDPS and (o.TotalDot or 0) == 0 and (o.PoisonDPS or 0) == 0 and (o.ImpaleDPS or 0) == 0 and (o.BleedDPS or 0) == 0 end }, - { stat = "PoisonDPS", label = "Poison DPS", fmt = ".1f", compPercent = true, warnFunc = function(v) return v >= data.misc.DotDpsCap and "Minion Poison dps exceeds in game limit" end }, - { stat = "PoisonDamage", label = "Total Damage per Poison", fmt = ".1f", compPercent = true }, - { stat = "WithPoisonDPS", label = "Total DPS inc. Poison", fmt = ".1f", compPercent = true, condFunc = function(v,o) return v ~= o.TotalDPS and (o.TotalDot or 0) == 0 and (o.IgniteDPS or 0) == 0 and (o.ImpaleDPS or 0) == 0 and (o.BleedDPS or 0) == 0 end }, - { stat = "DecayDPS", label = "Decay DPS", fmt = ".1f", compPercent = true }, - { stat = "TotalDotDPS", label = "Total DoT DPS", fmt = ".1f", compPercent = true, condFunc = function(v,o) return v ~= o.TotalDot and v ~= o.ImpaleDPS and v ~= o.TotalPoisonDPS and v ~= (o.TotalIgniteDPS or o.IgniteDPS) and v ~= o.BleedDPS end, warnFunc = function(v) return v >= data.misc.DotDpsCap and "Minion DoT DPS exceeds in game limit" end }, - { stat = "ImpaleDPS", label = "Impale DPS", fmt = ".1f", compPercent = true, flag = "impale" }, - { stat = "WithImpaleDPS", label = "Total DPS inc. Impale", fmt = ".1f", compPercent = true, flag = "impale", condFunc = function(v,o) return v ~= o.TotalDPS and (o.TotalDot or 0) == 0 and (o.IgniteDPS or 0) == 0 and (o.PoisonDPS or 0) == 0 and (o.BleedDPS or 0) == 0 end }, - { stat = "CullingDPS", label = "Culling DPS", fmt = ".1f", compPercent = true, condFunc = function(v,o) return (o.CullingDPS or 0) > 0 end }, - { stat = "ReservationDPS", label = "Reservation DPS", fmt = ".1f", compPercent = true, condFunc = function(v,o) return (o.ReservationDPS or 0) > 0 end }, - { stat = "CombinedDPS", label = "Combined DPS", fmt = ".1f", compPercent = true, condFunc = function(v,o) return v ~= ((o.TotalDPS or 0) + (o.TotalDot or 0)) and v ~= o.WithImpaleDPS and v ~= o.WithPoisonDPS and v ~= o.WithIgniteDPS and v ~= o.WithBleedDPS end}, - { stat = "Cooldown", label = "Skill Cooldown", fmt = ".3fs", lowerIsBetter = true }, - { stat = "Life", label = "Total Life", fmt = ".1f", color = colorCodes.LIFE, compPercent = true }, - { stat = "LifeRegenRecovery", label = "Life Recovery", fmt = ".1f", color = colorCodes.LIFE }, - { stat = "LifeLeechGainRate", label = "Life Leech/On Hit Rate", fmt = ".1f", color = colorCodes.LIFE, compPercent = true }, - { stat = "EnergyShield", label = "Energy Shield", fmt = "d", color = colorCodes.ES, compPercent = true }, - { stat = "EnergyShieldRegenRecovery", label = "ES Recovery", fmt = ".1f", color = colorCodes.ES }, - { stat = "EnergyShieldLeechGainRate", label = "ES Leech/On Hit Rate", fmt = ".1f", color = colorCodes.ES, compPercent = true }, - } - self.extraSaveStats = { - "PowerCharges", - "PowerChargesMax", - "FrenzyCharges", - "FrenzyChargesMax", - "EnduranceCharges", - "EnduranceChargesMax", - "ActiveTotemLimit", - "ActiveMinionLimit", - } + self.displayStats, self.minionDisplayStats, self.extraSaveStats = LoadModule("Modules/BuildDisplayStats") + if buildName == "~~temp~~" then -- Remove temporary build file os.remove(self.dbFileName) diff --git a/src/Modules/BuildDisplayStats.lua b/src/Modules/BuildDisplayStats.lua new file mode 100644 index 0000000000..6488e47be1 --- /dev/null +++ b/src/Modules/BuildDisplayStats.lua @@ -0,0 +1,236 @@ +-- Path of Building +-- +-- Module: Build Display Stats +-- Loads the displayStats and extraSaveStats. +-- + +local t_insert = table.insert + +local StatList = { + { + { stat = "ActiveMinionLimit", label = "Active Minion Limit", fmt = "d", displayStat = true, extraSaveStat = true }, + { stat = "AverageHit", label = "Average Hit", fmt = ".1f", compPercent = true, displayStat = true }, + { stat = "PvpAverageHit", label = "PvP Average Hit", fmt = ".1f", compPercent = true, flag = "isPvP", displayStat = true }, + { stat = "AverageDamage", label = "Average Damage", fmt = ".1f", compPercent = true, flag = "attack", displayStat = true }, + { stat = "AverageDamage", label = "Average Damage", fmt = ".1f", compPercent = true, minionDisplayStat = true }, + { stat = "AverageBurstDamage", label = "Average Burst Damage", fmt = ".1f", compPercent = true, condFunc = function(v,o) return o.AverageBurstHits and o.AverageBurstHits > 1 and v > 0 end, displayStat = true }, + { stat = "PvpAverageDamage", label = "PvP Average Damage", fmt = ".1f", compPercent = true, flag = "attackPvP", displayStat = true }, + { stat = "Speed", label = "Attack Rate", fmt = ".2f", compPercent = true, flag = "attack", condFunc = function(v,o) return v > 0 and (o.TriggerTime or 0) == 0 end, displayStat = true }, + { stat = "Speed", label = "Cast Rate", fmt = ".2f", compPercent = true, flag = "spell", condFunc = function(v,o) return v > 0 and (o.TriggerTime or 0) == 0 end, displayStat = true }, + { stat = "Speed", label = "Attack/Cast Rate", fmt = ".2f", compPercent = true, condFunc = function(v,o) return v > 0 and (o.TriggerTime or 0) == 0 end, minionDisplayStat = true }, + { stat = "HitSpeed", label = "Hit Rate", fmt = ".2f", minionDisplayStat = true }, + { stat = "ServerTriggerRate", label = "Trigger Rate", fmt = ".2f", compPercent = true, condFunc = function(v,o) return (o.TriggerTime or 0) ~= 0 end, displayStat = true }, + { stat = "ServerTriggerRate", label = "Trigger Rate", fmt = ".2f", compPercent = true, condFunc = function(v,o) return (o.TriggerTime or 0) ~= 0 end, minionDisplayStat = true }, + { stat = "Speed", label = "Effective Trigger Rate", fmt = ".2f", compPercent = true, condFunc = function(v,o) return (o.TriggerTime or 0) ~= 0 and o.ServerTriggerRate ~= o.Speed end, displayStat = true }, + { stat = "Speed", label = "Effective Trigger Rate", fmt = ".2f", compPercent = true, condFunc = function(v,o) return (o.TriggerTime or 0) ~= 0 and o.ServerTriggerRate ~= o.Speed end, minionDisplayStat = true }, + { stat = "WarcryCastTime", label = "Cast Time", fmt = ".2fs", compPercent = true, lowerIsBetter = true, flag = "warcry", displayStat = true }, + { stat = "HitSpeed", label = "Hit Rate", fmt = ".2f", compPercent = true, condFunc = function(v,o) return not o.TriggerTime end, displayStat = true }, + { stat = "TrapThrowingTime", label = "Trap Throwing Time", fmt = ".2fs", compPercent = true, lowerIsBetter = true, displayStat = true }, + { stat = "TrapCooldown", label = "Trap Cooldown", fmt = ".3fs", lowerIsBetter = true, displayStat = true }, + { stat = "MineLayingTime", label = "Mine Throwing Time", fmt = ".2fs", compPercent = true, lowerIsBetter = true, displayStat = true }, + { stat = "TotemPlacementTime", label = "Totem Placement Time", fmt = ".2fs", compPercent = true, lowerIsBetter = true, displayStat = true }, + { stat = "PreEffectiveCritChance", label = "Crit Chance", fmt = ".2f%%", displayStat = true }, + { stat = "CritChance", label = "Effective Crit Chance", fmt = ".2f%%", condFunc = function(v,o) return v ~= o.PreEffectiveCritChance end, displayStat = true }, + { stat = "CritMultiplier", label = "Crit Multiplier", fmt = "d%%", pc = true, condFunc = function(v,o) return (o.CritChance or 0) > 0 end, displayStat = true }, + { stat = "HitChance", label = "Hit Chance", fmt = ".0f%%", flag = "attack", displayStat = true }, + { stat = "HitChance", label = "Hit Chance", fmt = ".0f%%", condFunc = function(v,o) return o.enemyHasSpellBlock end, displayStat = true }, + { stat = "TotalDPS", label = "Hit DPS", fmt = ".1f", compPercent = true, flag = "notAverage", displayStat = true }, + { stat = "PvpTotalDPS", label = "PvP Hit DPS", fmt = ".1f", compPercent = true, flag = "notAveragePvP", displayStat = true }, + { stat = "TotalDPS", label = "Hit DPS", fmt = ".1f", compPercent = true, flag = "showAverage", condFunc = function(v,o) return (o.TriggerTime or 0) ~= 0 end, displayStat = true }, + { stat = "TotalDPS", label = "Hit DPS", fmt = ".1f", compPercent = true, minionDisplayStat = true }, + { stat = "TotalDot", label = "DoT DPS", fmt = ".1f", compPercent = true, displayStat = true }, + { stat = "TotalDot", label = "DoT DPS", fmt = ".1f", compPercent = true, minionDisplayStat = true }, + { stat = "WithDotDPS", label = "Total DPS inc. DoT", fmt = ".1f", compPercent = true, flag = "notAverage", condFunc = function(v,o) return v ~= o.TotalDPS and (o.PoisonDPS or 0) == 0 and (o.IgniteDPS or 0) == 0 and (o.ImpaleDPS or 0) == 0 and (o.BleedDPS or 0) == 0 end, displayStat = true }, + { stat = "WithDotDPS", label = "Total DPS inc. DoT", fmt = ".1f", compPercent = true, condFunc = function(v,o) return v ~= o.TotalDPS and (o.PoisonDPS or 0) == 0 and (o.IgniteDPS or 0) == 0 and (o.ImpaleDPS or 0) == 0 and (o.BleedDPS or 0) == 0 end, minionDisplayStat = true }, + { stat = "BleedDPS", label = "Bleed DPS", fmt = ".1f", compPercent = true, warnFunc = function(v) return v >= data.misc.DotDpsCap and "Bleed DPS exceeds in game limit" end, displayStat = true }, + { stat = "BleedDPS", label = "Bleed DPS", fmt = ".1f", compPercent = true, warnFunc = function(v) return v >= data.misc.DotDpsCap and "Minion Bleed DPS exceeds in game limit" end, minionDisplayStat = true }, + { stat = "BleedDamage", label = "Total Damage per Bleed", fmt = ".1f", compPercent = true, flag = "showAverage", displayStat = true }, + { stat = "WithBleedDPS", label = "Total DPS inc. Bleed", fmt = ".1f", compPercent = true, flag = "notAverage", condFunc = function(v,o) return v ~= o.TotalDPS and (o.TotalDot or 0) == 0 and (o.PoisonDPS or 0) == 0 and (o.ImpaleDPS or 0) == 0 and (o.IgniteDPS or 0) == 0 end, displayStat = true }, + { stat = "WithBleedDPS", label = "Total DPS inc. Bleed", fmt = ".1f", compPercent = true, condFunc = function(v,o) return v ~= o.TotalDPS and (o.TotalDot or 0) == 0 and (o.PoisonDPS or 0) == 0 and (o.ImpaleDPS or 0) == 0 and (o.IgniteDPS or 0) == 0 end, minionDisplayStat = true }, + { stat = "IgniteDPS", label = "Ignite DPS", fmt = ".1f", compPercent = true, warnFunc = function(v) return v >= data.misc.DotDpsCap and "Ignite DPS exceeds in game limit" end, displayStat = true }, + { stat = "IgniteDPS", label = "Ignite DPS", fmt = ".1f", compPercent = true, warnFunc = function(v) return v >= data.misc.DotDpsCap and "Minion Ignite DPS exceeds in game limit" end, minionDisplayStat = true }, + { stat = "IgniteDamage", label = "Total Damage per Ignite", fmt = ".1f", compPercent = true, flag = "showAverage", displayStat = true }, + { stat = "BurningGroundDPS", label = "Burning Ground DPS", fmt = ".1f", compPercent = true, warnFunc = function(v,o) return v >= data.misc.DotDpsCap and "Burning Ground DPS exceeds in game limit" end, displayStat = true }, + { stat = "WithIgniteDPS", label = "Total DPS inc. Ignite", fmt = ".1f", compPercent = true, flag = "notAverage", condFunc = function(v,o) return v ~= o.TotalDPS and (o.TotalDot or 0) == 0 and (o.PoisonDPS or 0) == 0 and (o.ImpaleDPS or 0) == 0 and (o.BleedDPS or 0) == 0 end, displayStat = true }, + { stat = "WithIgniteDPS", label = "Total DPS inc. Ignite", fmt = ".1f", compPercent = true, condFunc = function(v,o) return v ~= o.TotalDPS and (o.TotalDot or 0) == 0 and (o.PoisonDPS or 0) == 0 and (o.ImpaleDPS or 0) == 0 and (o.BleedDPS or 0) == 0 end, minionDisplayStat = true }, + { stat = "WithIgniteAverageDamage", label = "Average Dmg. inc. Ignite", fmt = ".1f", compPercent = true, displayStat = true }, + { stat = "PoisonDPS", label = "Poison DPS", fmt = ".1f", compPercent = true, warnFunc = function(v) return v >= data.misc.DotDpsCap and "Poison DPS exceeds in game limit" end, displayStat = true }, + { stat = "PoisonDPS", label = "Poison DPS", fmt = ".1f", compPercent = true, warnFunc = function(v) return v >= data.misc.DotDpsCap and "Minion Poison dps exceeds in game limit" end, minionDisplayStat = true }, + { stat = "CausticGroundDPS", label = "Caustic Ground DPS", fmt = ".1f", compPercent = true, warnFunc = function(v,o) return v >= data.misc.DotDpsCap and "Caustic Ground DPS exceeds in game limit" end, displayStat = true }, + { stat = "PoisonDamage", label = "Total Damage per Poison", fmt = ".1f", compPercent = true, displayStat = true }, + { stat = "PoisonDamage", label = "Total Damage per Poison", fmt = ".1f", compPercent = true, minionDisplayStat = true }, + { stat = "WithPoisonDPS", label = "Total DPS inc. Poison", fmt = ".1f", compPercent = true, flag = "poison", flag = "notAverage", condFunc = function(v,o) return v ~= o.TotalDPS and (o.TotalDot or 0) == 0 and (o.IgniteDPS or 0) == 0 and (o.ImpaleDPS or 0) == 0 and (o.BleedDPS or 0) == 0 end, displayStat = true }, + { stat = "WithPoisonDPS", label = "Total DPS inc. Poison", fmt = ".1f", compPercent = true, condFunc = function(v,o) return v ~= o.TotalDPS and (o.TotalDot or 0) == 0 and (o.IgniteDPS or 0) == 0 and (o.ImpaleDPS or 0) == 0 and (o.BleedDPS or 0) == 0 end, minionDisplayStat = true }, + { stat = "DecayDPS", label = "Decay DPS", fmt = ".1f", compPercent = true, displayStat = true }, + { stat = "DecayDPS", label = "Decay DPS", fmt = ".1f", compPercent = true, minionDisplayStat = true }, + { stat = "TotalDotDPS", label = "Total DoT DPS", fmt = ".1f", compPercent = true, condFunc = function(v,o) return o.showTotalDotDPS or ( v ~= o.TotalDot and v ~= o.TotalPoisonDPS and v ~= o.CausticGroundDPS and v ~= (o.TotalIgniteDPS or o.IgniteDPS) and v ~= o.BurningGroundDPS and v ~= o.BleedDPS ) end, warnFunc = function(v) return v >= data.misc.DotDpsCap and "DoT DPS exceeds in game limit" end, displayStat = true }, + { stat = "TotalDotDPS", label = "Total DoT DPS", fmt = ".1f", compPercent = true, condFunc = function(v,o) return v ~= o.TotalDot and v ~= o.ImpaleDPS and v ~= o.TotalPoisonDPS and v ~= (o.TotalIgniteDPS or o.IgniteDPS) and v ~= o.BleedDPS end, warnFunc = function(v) return v >= data.misc.DotDpsCap and "Minion DoT DPS exceeds in game limit" end, minionDisplayStat = true }, + { stat = "ImpaleDPS", label = "Impale Damage", fmt = ".1f", compPercent = true, flag = "impale", flag = "showAverage", displayStat = true }, + { stat = "ImpaleDPS", label = "Impale DPS", fmt = ".1f", compPercent = true, flag = "impale", minionDisplayStat = true }, + { stat = "WithImpaleDPS", label = "Damage inc. Impale", fmt = ".1f", compPercent = true, flag = "impale", flag = "showAverage", condFunc = function(v,o) return v ~= o.TotalDPS and (o.TotalDot or 0) == 0 and (o.IgniteDPS or 0) == 0 and (o.PoisonDPS or 0) == 0 and (o.BleedDPS or 0) == 0 end , displayStat = true }, + { stat = "WithImpaleDPS", label = "Total DPS inc. Impale", fmt = ".1f", compPercent = true, flag = "impale", condFunc = function(v,o) return v ~= o.TotalDPS and (o.TotalDot or 0) == 0 and (o.IgniteDPS or 0) == 0 and (o.PoisonDPS or 0) == 0 and (o.BleedDPS or 0) == 0 end, minionDisplayStat = true }, + { stat = "ImpaleDPS", label = "Impale DPS", fmt = ".1f", compPercent = true, flag = "impale", flag = "notAverage", displayStat = true }, + { stat = "WithImpaleDPS", label = "Total DPS inc. Impale", fmt = ".1f", compPercent = true, flag = "impale", flag = "notAverage", condFunc = function(v,o) return v ~= o.TotalDPS and (o.TotalDot or 0) == 0 and (o.IgniteDPS or 0) == 0 and (o.PoisonDPS or 0) == 0 and (o.BleedDPS or 0) == 0 end, displayStat = true }, + { stat = "MirageDPS", label = "Total Mirage DPS", fmt = ".1f", compPercent = true, condFunc = function(v,o) return v > 0 end, displayStat = true }, + { stat = "CullingDPS", label = "Culling DPS", fmt = ".1f", compPercent = true, condFunc = function(v,o) return (o.CullingDPS or 0) > 0 end, displayStat = true }, + { stat = "CullingDPS", label = "Culling DPS", fmt = ".1f", compPercent = true, condFunc = function(v,o) return (o.CullingDPS or 0) > 0 end, minionDisplayStat = true }, + { stat = "CombinedDPS", label = "Combined DPS", fmt = ".1f", compPercent = true, flag = "notAverage", condFunc = function(v,o) return v ~= ((o.TotalDPS or 0) + (o.TotalDot or 0)) and v ~= o.WithImpaleDPS and ( o.showTotalDotDPS or ( v ~= o.WithPoisonDPS and v ~= o.WithIgniteDPS and v ~= o.WithBleedDPS ) ) end, displayStat = true }, + { stat = "CombinedDPS", label = "Combined DPS", fmt = ".1f", compPercent = true, condFunc = function(v,o) return v ~= ((o.TotalDPS or 0) + (o.TotalDot or 0)) and v ~= o.WithImpaleDPS and v ~= o.WithPoisonDPS and v ~= o.WithIgniteDPS and v ~= o.WithBleedDPS end}, + { stat = "CombinedAvg", label = "Combined Total Damage", fmt = ".1f", compPercent = true, flag = "showAverage", condFunc = function(v,o) return (v ~= o.AverageDamage and (o.TotalDot or 0) == 0) and (v ~= o.WithPoisonDPS or v ~= o.WithIgniteDPS or v ~= o.WithBleedDPS) end, displayStat = true }, + { stat = "Cooldown", label = "Skill Cooldown", fmt = ".3fs", lowerIsBetter = true, displayStat = true }, + { stat = "Cooldown", label = "Skill Cooldown", fmt = ".3fs", lowerIsBetter = true, minionDisplayStat = true }, + { stat = "SealCooldown", label = "Seal Gain Frequency", fmt = ".2fs", lowerIsBetter = true, displayStat = true }, + { stat = "SealMax", label = "Max Number of Seals", fmt = "d", displayStat = true }, + { stat = "TimeMaxSeals", label = "Time to Gain Max Seals", fmt = ".2fs", lowerIsBetter = true, displayStat = true }, + { stat = "AreaOfEffectRadius", label = "AoE Radius", fmt = "d", displayStat = true }, + { stat = "BrandAttachmentRange", label = "Attachment Range", fmt = "d", flag = "brand", displayStat = true }, + { stat = "BrandTicks", label = "Activations per Brand", fmt = "d", flag = "brand", displayStat = true }, + { stat = "ManaCost", label = "Mana Cost", fmt = "d", color = colorCodes.MANA, pool = "ManaUnreserved", compPercent = true, lowerIsBetter = true, condFunc = function(v,o) return o.ManaHasCost end, displayStat = true }, + { stat = "ManaPercentCost", label = "Mana Cost", fmt = "d%%", color = colorCodes.MANA, pool = "ManaUnreservedPercent", compPercent = true, lowerIsBetter = true, condFunc = function(v,o) return o.ManaPercentHasCost end, displayStat = true }, + { stat = "ManaPerSecondCost", label = "Mana Cost per second", fmt = ".2f", color = colorCodes.MANA, pool = "ManaUnreserved", compPercent = true, lowerIsBetter = true, condFunc = function(v,o) return o.ManaPerSecondHasCost end, displayStat = true }, + { stat = "ManaPercentPerSecondCost", label = "Mana Cost per second", fmt = ".2f%%", color = colorCodes.MANA, pool = "ManaUnreservedPercent", compPercent = true, lowerIsBetter = true, condFunc = function(v,o) return o.ManaPercentPerSecondHasCost end, displayStat = true }, + { stat = "LifeCost", label = "Life Cost", fmt = "d", color = colorCodes.LIFE, pool = "LifeUnreserved", compPercent = true, lowerIsBetter = true, condFunc = function(v,o) return o.LifeHasCost end, displayStat = true }, + { stat = "LifePercentCost", label = "Life Cost", fmt = "d%%", color = colorCodes.LIFE, pool = "LifeUnreservedPercent", compPercent = true, lowerIsBetter = true, condFunc = function(v,o) return o.LifePercentHasCost end, displayStat = true }, + { stat = "LifePerSecondCost", label = "Life Cost per second", fmt = ".2f", color = colorCodes.LIFE, pool = "LifeUnreserved", compPercent = true, lowerIsBetter = true, condFunc = function(v,o) return o.LifePerSecondHasCost end, displayStat = true }, + { stat = "LifePercentPerSecondCost", label = "Life Cost per second", fmt = ".2f%%", color = colorCodes.LIFE, pool = "LifeUnreservedPercent", compPercent = true, lowerIsBetter = true, condFunc = function(v,o) return o.LifePercentPerSecondHasCost end, displayStat = true }, + { stat = "ESCost", label = "Energy Shield Cost", fmt = "d", color = colorCodes.ES, pool = "EnergyShield", compPercent = true, lowerIsBetter = true, condFunc = function(v,o) return o.ESHasCost end, displayStat = true }, + { stat = "ESPerSecondCost", label = "ES Cost per second", fmt = ".2f", color = colorCodes.ES, pool = "EnergyShield", compPercent = true, lowerIsBetter = true, condFunc = function(v,o) return o.ESPerSecondHasCost end, displayStat = true }, + { stat = "ESPercentPerSecondCost", label = "ES Cost per second", fmt = ".2f%%", color = colorCodes.ES, compPercent = true, lowerIsBetter = true, condFunc = function(v,o) return o.ESPercentPerSecondHasCost end, displayStat = true }, + { stat = "RageCost", label = "Rage Cost", fmt = "d", color = colorCodes.RAGE, pool = "Rage", compPercent = true, lowerIsBetter = true, condFunc = function(v,o) return o.RageHasCost end, displayStat = true }, + { stat = "RagePerSecondCost", label = "Rage Cost per second", fmt = ".2f", color = colorCodes.RAGE, pool = "Rage", compPercent = true, lowerIsBetter = true, condFunc = function(v,o) return o.RagePerSecondHasCost end, displayStat = true }, + { stat = "SoulCost", label = "Soul Cost", fmt = "d", color = colorCodes.RAGE, pool = "Soul", compPercent = true, lowerIsBetter = true, condFunc = function(v,o) return o.SoulHasCost end, displayStat = true }, + }, { + { stat = "Str", label = "Strength", color = colorCodes.STRENGTH, fmt = "d", displayStat = true }, + { stat = "ReqStr", label = "Strength Required", color = colorCodes.STRENGTH, fmt = "d", lowerIsBetter = true, condFunc = function(v,o) return v > o.Str end, warnFunc = function(v) return "You do not meet the Strength requirement" end, displayStat = true }, + { stat = "Dex", label = "Dexterity", color = colorCodes.DEXTERITY, fmt = "d", displayStat = true }, + { stat = "ReqDex", label = "Dexterity Required", color = colorCodes.DEXTERITY, fmt = "d", lowerIsBetter = true, condFunc = function(v,o) return v > o.Dex end, warnFunc = function(v) return "You do not meet the Dexterity requirement" end, displayStat = true }, + { stat = "Int", label = "Intelligence", color = colorCodes.INTELLIGENCE, fmt = "d", displayStat = true }, + { stat = "ReqInt", label = "Intelligence Required", color = colorCodes.INTELLIGENCE, fmt = "d", lowerIsBetter = true, condFunc = function(v,o) return v > o.Int end, warnFunc = function(v) return "You do not meet the Intelligence requirement" end, displayStat = true }, + { stat = "Omni", label = "Omniscience", color = colorCodes.RARE, fmt = "d", displayStat = true }, + { stat = "ReqOmni", label = "Omniscience Required", color = colorCodes.RARE, fmt = "d", lowerIsBetter = true, condFunc = function(v,o) return v > (o.Omni or 0) end, warnFunc = function(v) return "You do not meet the Omniscience requirement" end, displayStat = true }, + }, { + { stat = "Devotion", label = "Devotion", color = colorCodes.RARE, fmt = "d", displayStat = true, displayStat = true }, + }, { + { stat = "TotalEHP", label = "Effective Hit Pool", fmt = ".0f", compPercent = true, displayStat = true }, + { stat = "PvPTotalTakenHit", label = "PvP Hit Taken", fmt = ".1f", flag = "isPvP", lowerIsBetter = true, displayStat = true }, + { stat = "PhysicalMaximumHitTaken", label = "Phys Max Hit", fmt = ".0f", color = colorCodes.PHYS, compPercent = true, displayStat = true }, + { stat = "LightningMaximumHitTaken", label = "Elemental Max Hit", fmt = ".0f", color = colorCodes.LIGHTNING, compPercent = true, condFunc = function(v,o) return o.LightningMaximumHitTaken == o.ColdMaximumHitTaken and o.LightningMaximumHitTaken == o.FireMaximumHitTaken end, displayStat = true }, + { stat = "FireMaximumHitTaken", label = "Fire Max Hit", fmt = ".0f", color = colorCodes.FIRE, compPercent = true, condFunc = function(v,o) return o.LightningMaximumHitTaken ~= o.ColdMaximumHitTaken or o.LightningMaximumHitTaken ~= o.FireMaximumHitTaken end, displayStat = true }, + { stat = "ColdMaximumHitTaken", label = "Cold Max Hit", fmt = ".0f", color = colorCodes.COLD, compPercent = true, condFunc = function(v,o) return o.LightningMaximumHitTaken ~= o.ColdMaximumHitTaken or o.LightningMaximumHitTaken ~= o.FireMaximumHitTaken end, displayStat = true }, + { stat = "LightningMaximumHitTaken", label = "Lightning Max Hit", fmt = ".0f", color = colorCodes.LIGHTNING, compPercent = true, condFunc = function(v,o) return o.LightningMaximumHitTaken ~= o.ColdMaximumHitTaken or o.LightningMaximumHitTaken ~= o.FireMaximumHitTaken end, displayStat = true }, + { stat = "ChaosMaximumHitTaken", label = "Chaos Max Hit", fmt = ".0f", color = colorCodes.CHAOS, compPercent = true, displayStat = true }, + }, { + { stat = "Life", label = "Total Life", fmt = "d", color = colorCodes.LIFE, compPercent = true, displayStat = true }, + { stat = "Life", label = "Total Life", fmt = ".1f", color = colorCodes.LIFE, compPercent = true, minionDisplayStat = true }, + { stat = "Spec:LifeInc", label = "%Inc Life from Tree", fmt = "d%%", color = colorCodes.LIFE, condFunc = function(v,o) return v > 0 and o.Life > 1 end, displayStat = true }, + { stat = "LifeUnreserved", label = "Unreserved Life", fmt = "d", color = colorCodes.LIFE, condFunc = function(v,o) return v < o.Life end, compPercent = true, warnFunc = function(v) return v <= 0 and "Your unreserved Life is below 1" end, displayStat = true }, + { stat = "LifeRecoverable", label = "Life Recoverable", fmt = "d", color = colorCodes.LIFE, condFunc = function(v,o) return v < o.LifeUnreserved end, displayStat = true }, + { stat = "LifeUnreservedPercent", label = "Unreserved Life", fmt = "d%%", color = colorCodes.LIFE, condFunc = function(v,o) return v < 100 end, displayStat = true }, + { stat = "LifeRegenRecovery", label = "Life Regen", fmt = ".1f", color = colorCodes.LIFE, displayStat = true }, + { stat = "LifeRegenRecovery", label = "Life Regen", fmt = ".1f", color = colorCodes.LIFE, minionDisplayStat = true }, + { stat = "LifeLeechGainRate", label = "Life Leech/On Hit Rate", fmt = ".1f", color = colorCodes.LIFE, compPercent = true, displayStat = true }, + { stat = "LifeLeechGainRate", label = "Life Leech/On Hit Rate", fmt = ".1f", color = colorCodes.LIFE, compPercent = true, minionDisplayStat = true }, + { stat = "LifeLeechGainPerHit", label = "Life Leech/Gain per Hit", fmt = ".1f", color = colorCodes.LIFE, compPercent = true, displayStat = true }, + }, { + { stat = "Mana", label = "Total Mana", fmt = "d", color = colorCodes.MANA, compPercent = true, displayStat = true }, + { stat = "Spec:ManaInc", label = "%Inc Mana from Tree", color = colorCodes.MANA, fmt = "d%%", displayStat = true }, + { stat = "ManaUnreserved", label = "Unreserved Mana", fmt = "d", color = colorCodes.MANA, condFunc = function(v,o) return v < o.Mana end, compPercent = true, warnFunc = function(v) return v < 0 and "Your unreserved Mana is negative" end, displayStat = true }, + { stat = "ManaUnreservedPercent", label = "Unreserved Mana", fmt = "d%%", color = colorCodes.MANA, condFunc = function(v,o) return v < 100 end, displayStat = true }, + { stat = "ManaRegenRecovery", label = "Mana Regen", fmt = ".1f", color = colorCodes.MANA, displayStat = true }, + { stat = "ManaLeechGainRate", label = "Mana Leech/On Hit Rate", fmt = ".1f", color = colorCodes.MANA, compPercent = true, displayStat = true }, + { stat = "ManaLeechGainPerHit", label = "Mana Leech/Gain per Hit", fmt = ".1f", color = colorCodes.MANA, compPercent = true, displayStat = true }, + }, { + { stat = "EnergyShield", label = "Energy Shield", fmt = "d", color = colorCodes.ES, compPercent = true, displayStat = true }, + { stat = "EnergyShield", label = "Energy Shield", fmt = "d", color = colorCodes.ES, compPercent = true, minionDisplayStat = true }, + { stat = "EnergyShieldRecoveryCap", label = "Recoverable ES", color = colorCodes.ES, fmt = "d", condFunc = function(v,o) return o.CappingES end, displayStat = true }, + { stat = "Spec:EnergyShieldInc", label = "%Inc ES from Tree", color = colorCodes.ES, fmt = "d%%", displayStat = true }, + { stat = "EnergyShieldRegenRecovery", label = "Energy Shield Regen", color = colorCodes.ES, fmt = ".1f", displayStat = true }, + { stat = "EnergyShieldRegenRecovery", label = "Energy Shield Regen", fmt = ".1f", color = colorCodes.ES, minionDisplayStat = true }, + { stat = "EnergyShieldLeechGainRate", label = "ES Leech/On Hit Rate", color = colorCodes.ES, fmt = ".1f", compPercent = true, displayStat = true }, + { stat = "EnergyShieldLeechGainRate", label = "ES Leech/On Hit Rate", fmt = ".1f", color = colorCodes.ES, compPercent = true, minionDisplayStat = true }, + { stat = "EnergyShieldLeechGainPerHit", label = "ES Leech/Gain per Hit", color = colorCodes.ES, fmt = ".1f", compPercent = true, displayStat = true }, + }, { + { stat = "Ward", label = "Ward", fmt = "d", color = colorCodes.WARD, compPercent = true, displayStat = true }, + }, { + { stat = "Rage", label = "Rage", fmt = "d", color = colorCodes.RAGE, compPercent = true, displayStat = true }, + { stat = "RageRegenRecovery", label = "Rage Regen", fmt = ".1f", color = colorCodes.RAGE, compPercent = true, displayStat = true }, + }, { + { stat = "TotalDegen", label = "Total Degen", fmt = ".1f", lowerIsBetter = true, displayStat = true }, + { stat = "TotalNetRegen", label = "Total Net Regen", fmt = "+.1f", displayStat = true }, + { stat = "NetLifeRegen", label = "Net Life Regen", fmt = "+.1f", color = colorCodes.LIFE, displayStat = true }, + { stat = "NetManaRegen", label = "Net Mana Regen", fmt = "+.1f", color = colorCodes.MANA, displayStat = true }, + { stat = "NetEnergyShieldRegen", label = "Net Energy Shield Regen", fmt = "+.1f", color = colorCodes.ES, displayStat = true }, + }, { + { stat = "Evasion", label = "Evasion rating", fmt = "d", color = colorCodes.EVASION, compPercent = true, displayStat = true }, + { stat = "Spec:EvasionInc", label = "%Inc Evasion from Tree", color = colorCodes.EVASION, fmt = "d%%", displayStat = true }, + { stat = "MeleeEvadeChance", label = "Evade Chance", fmt = "d%%", color = colorCodes.EVASION, condFunc = function(v,o) return v > 0 and o.MeleeEvadeChance == o.ProjectileEvadeChance end, displayStat = true }, + { stat = "MeleeEvadeChance", label = "Melee Evade Chance", fmt = "d%%", color = colorCodes.EVASION, condFunc = function(v,o) return v > 0 and o.MeleeEvadeChance ~= o.ProjectileEvadeChance end, displayStat = true }, + { stat = "ProjectileEvadeChance", label = "Projectile Evade Chance", fmt = "d%%", color = colorCodes.EVASION, condFunc = function(v,o) return v > 0 and o.MeleeEvadeChance ~= o.ProjectileEvadeChance end, displayStat = true }, + }, { + { stat = "Armour", label = "Armour", fmt = "d", compPercent = true, displayStat = true }, + { stat = "Spec:ArmourInc", label = "%Inc Armour from Tree", fmt = "d%%", displayStat = true }, + { stat = "PhysicalDamageReduction", label = "Phys. Damage Reduction", fmt = "d%%", condFunc = function() return true end, displayStat = true }, + }, { + { stat = "BlockChance", label = "Block Chance", fmt = "d%%", overCapStat = "BlockChanceOverCap", displayStat = true }, + { stat = "SpellBlockChance", label = "Spell Block Chance", fmt = "d%%", overCapStat = "SpellBlockChanceOverCap", displayStat = true }, + { stat = "AttackDodgeChance", label = "Attack Dodge Chance", fmt = "d%%", overCapStat = "AttackDodgeChanceOverCap", displayStat = true }, + { stat = "SpellDodgeChance", label = "Spell Dodge Chance", fmt = "d%%", overCapStat = "SpellDodgeChanceOverCap", displayStat = true }, + { stat = "SpellSuppressionChance", label = "Spell Suppression Chance", fmt = "d%%", overCapStat = "SpellSuppressionChanceOverCap", displayStat = true }, + }, { + { stat = "FireResist", label = "Fire Resistance", fmt = "d%%", color = colorCodes.FIRE, condFunc = function() return true end, overCapStat = "FireResistOverCap"}, + { stat = "FireResistOverCap", label = "Fire Res. Over Max", fmt = "d%%", hideStat = true, displayStat = true }, + { stat = "ColdResist", label = "Cold Resistance", fmt = "d%%", color = colorCodes.COLD, condFunc = function() return true end, overCapStat = "ColdResistOverCap", displayStat = true }, + { stat = "ColdResistOverCap", label = "Cold Res. Over Max", fmt = "d%%", hideStat = true, displayStat = true }, + { stat = "LightningResist", label = "Lightning Resistance", fmt = "d%%", color = colorCodes.LIGHTNING, condFunc = function() return true end, overCapStat = "LightningResistOverCap", displayStat = true }, + { stat = "LightningResistOverCap", label = "Lightning Res. Over Max", fmt = "d%%", hideStat = true, displayStat = true }, + { stat = "ChaosResist", label = "Chaos Resistance", fmt = "d%%", color = colorCodes.CHAOS, condFunc = function(v,o) return not o.ChaosInoculation end, overCapStat = "ChaosResistOverCap", displayStat = true }, + { stat = "ChaosResistOverCap", label = "Chaos Res. Over Max", fmt = "d%%", hideStat = true, displayStat = true }, + { label = "Chaos Resistance", val = "Immune", labelStat = "ChaosResist", color = colorCodes.CHAOS, condFunc = function(o) return o.ChaosInoculation end, displayStat = true }, + }, { + { stat = "EffectiveMovementSpeedMod", label = "Movement Speed Modifier", fmt = "+d%%", mod = true, condFunc = function() return true end, displayStat = true }, + }, { + { stat = "FullDPS", label = "Full DPS", fmt = ".1f", color = colorCodes.CURRENCY, compPercent = true, displayStat = true }, + { stat = "FullDotDPS", label = "Full Dot DPS", fmt = ".1f", color = colorCodes.CURRENCY, compPercent = true, condFunc = function (v) return v >= data.misc.DotDpsCap end, warnFunc = function (v) return "Full Dot DPS exceeds in game limit" end, displayStat = true }, + }, { + { stat = "SkillDPS", label = "Skill DPS", condFunc = function() return true end, displayStat = true }, + }, { + { stat = "PowerCharges", extraSaveStat = true }, + { stat = "PowerChargesMax", extraSaveStat = true }, + { stat = "FrenzyCharges", extraSaveStat = true }, + { stat = "FrenzyChargesMax", extraSaveStat = true }, + { stat = "EnduranceCharges", extraSaveStat = true }, + { stat = "EnduranceChargesMax", extraSaveStat = true }, + { stat = "ActiveTotemLimit", extraSaveStat = true }, + } +} + +local displayStats = {} +local minionDisplayStats = {} +local extraSaveStats = {} + +-- This may be user-customisable in the future +local statCount = 0 +for _, statGroup in ipairs(StatList) do + if statCount > 0 then + t_insert(displayStats, { }) + statCount = 0 + end + for _, stat in ipairs(statGroup) do + if stat.displayStat then + stat.displayStat = nil + t_insert(displayStats, stat) + statCount = statCount + 1 + end + if stat.minionDisplayStat then + stat.minionDisplayStat = nil + t_insert(minionDisplayStats, stat) + ConPrintTable(stat) + end + if stat.extraSaveStat then + stat.extraSaveStat = nil + t_insert(extraSaveStats, stat.stat) + end + end +end + +return displayStats, minionDisplayStats, extraSaveStats \ No newline at end of file From b8ceffe7fe2492225ff702a64f4762ee03806bbe Mon Sep 17 00:00:00 2001 From: Regisle Date: Sat, 4 Mar 2023 21:06:10 +1030 Subject: [PATCH 02/25] add loading/saving custom displayStats to settings and remove duplicates --- src/Modules/Build.lua | 3 + src/Modules/BuildDisplayStats.lua | 139 ++++++++++++++++++------------ src/Modules/Main.lua | 38 ++++++++ 3 files changed, 123 insertions(+), 57 deletions(-) diff --git a/src/Modules/Build.lua b/src/Modules/Build.lua index a3036c892e..76d6dffc04 100644 --- a/src/Modules/Build.lua +++ b/src/Modules/Build.lua @@ -1214,6 +1214,9 @@ function buildMode:AddDisplayStatList(statList, actor) end if statData.warnFunc and statVal and ((statData.condFunc and statData.condFunc(statVal, actor.output)) or not statData.condFunc) then local v = statData.warnFunc(statVal, actor.output) + if v and self.calcsTab.mainEnv.minion == actor then + v = "Minion "..v + end if v then InsertIfNew(self.controls.warnings.lines, v) end diff --git a/src/Modules/BuildDisplayStats.lua b/src/Modules/BuildDisplayStats.lua index 6488e47be1..d6a138a20f 100644 --- a/src/Modules/BuildDisplayStats.lua +++ b/src/Modules/BuildDisplayStats.lua @@ -12,17 +12,15 @@ local StatList = { { stat = "AverageHit", label = "Average Hit", fmt = ".1f", compPercent = true, displayStat = true }, { stat = "PvpAverageHit", label = "PvP Average Hit", fmt = ".1f", compPercent = true, flag = "isPvP", displayStat = true }, { stat = "AverageDamage", label = "Average Damage", fmt = ".1f", compPercent = true, flag = "attack", displayStat = true }, - { stat = "AverageDamage", label = "Average Damage", fmt = ".1f", compPercent = true, minionDisplayStat = true }, + { stat = "AverageDamage", label = " Average Damage", fmt = ".1f", compPercent = true, minionDisplayStat = true }, { stat = "AverageBurstDamage", label = "Average Burst Damage", fmt = ".1f", compPercent = true, condFunc = function(v,o) return o.AverageBurstHits and o.AverageBurstHits > 1 and v > 0 end, displayStat = true }, { stat = "PvpAverageDamage", label = "PvP Average Damage", fmt = ".1f", compPercent = true, flag = "attackPvP", displayStat = true }, { stat = "Speed", label = "Attack Rate", fmt = ".2f", compPercent = true, flag = "attack", condFunc = function(v,o) return v > 0 and (o.TriggerTime or 0) == 0 end, displayStat = true }, { stat = "Speed", label = "Cast Rate", fmt = ".2f", compPercent = true, flag = "spell", condFunc = function(v,o) return v > 0 and (o.TriggerTime or 0) == 0 end, displayStat = true }, { stat = "Speed", label = "Attack/Cast Rate", fmt = ".2f", compPercent = true, condFunc = function(v,o) return v > 0 and (o.TriggerTime or 0) == 0 end, minionDisplayStat = true }, { stat = "HitSpeed", label = "Hit Rate", fmt = ".2f", minionDisplayStat = true }, - { stat = "ServerTriggerRate", label = "Trigger Rate", fmt = ".2f", compPercent = true, condFunc = function(v,o) return (o.TriggerTime or 0) ~= 0 end, displayStat = true }, - { stat = "ServerTriggerRate", label = "Trigger Rate", fmt = ".2f", compPercent = true, condFunc = function(v,o) return (o.TriggerTime or 0) ~= 0 end, minionDisplayStat = true }, - { stat = "Speed", label = "Effective Trigger Rate", fmt = ".2f", compPercent = true, condFunc = function(v,o) return (o.TriggerTime or 0) ~= 0 and o.ServerTriggerRate ~= o.Speed end, displayStat = true }, - { stat = "Speed", label = "Effective Trigger Rate", fmt = ".2f", compPercent = true, condFunc = function(v,o) return (o.TriggerTime or 0) ~= 0 and o.ServerTriggerRate ~= o.Speed end, minionDisplayStat = true }, + { stat = "ServerTriggerRate", label = "Trigger Rate", fmt = ".2f", compPercent = true, condFunc = function(v,o) return (o.TriggerTime or 0) ~= 0 end, displayStat = true, minionDisplayStat = true }, + { stat = "Speed", label = "Effective Trigger Rate", fmt = ".2f", compPercent = true, condFunc = function(v,o) return (o.TriggerTime or 0) ~= 0 and o.ServerTriggerRate ~= o.Speed end, displayStat = true, minionDisplayStat = true }, { stat = "WarcryCastTime", label = "Cast Time", fmt = ".2fs", compPercent = true, lowerIsBetter = true, flag = "warcry", displayStat = true }, { stat = "HitSpeed", label = "Hit Rate", fmt = ".2f", compPercent = true, condFunc = function(v,o) return not o.TriggerTime end, displayStat = true }, { stat = "TrapThrowingTime", label = "Trap Throwing Time", fmt = ".2fs", compPercent = true, lowerIsBetter = true, displayStat = true }, @@ -37,48 +35,40 @@ local StatList = { { stat = "TotalDPS", label = "Hit DPS", fmt = ".1f", compPercent = true, flag = "notAverage", displayStat = true }, { stat = "PvpTotalDPS", label = "PvP Hit DPS", fmt = ".1f", compPercent = true, flag = "notAveragePvP", displayStat = true }, { stat = "TotalDPS", label = "Hit DPS", fmt = ".1f", compPercent = true, flag = "showAverage", condFunc = function(v,o) return (o.TriggerTime or 0) ~= 0 end, displayStat = true }, - { stat = "TotalDPS", label = "Hit DPS", fmt = ".1f", compPercent = true, minionDisplayStat = true }, - { stat = "TotalDot", label = "DoT DPS", fmt = ".1f", compPercent = true, displayStat = true }, - { stat = "TotalDot", label = "DoT DPS", fmt = ".1f", compPercent = true, minionDisplayStat = true }, + { stat = "TotalDPS", label = " Hit DPS", fmt = ".1f", compPercent = true, minionDisplayStat = true }, + { stat = "TotalDot", label = "DoT DPS", fmt = ".1f", compPercent = true, displayStat = true, minionDisplayStat = true }, { stat = "WithDotDPS", label = "Total DPS inc. DoT", fmt = ".1f", compPercent = true, flag = "notAverage", condFunc = function(v,o) return v ~= o.TotalDPS and (o.PoisonDPS or 0) == 0 and (o.IgniteDPS or 0) == 0 and (o.ImpaleDPS or 0) == 0 and (o.BleedDPS or 0) == 0 end, displayStat = true }, - { stat = "WithDotDPS", label = "Total DPS inc. DoT", fmt = ".1f", compPercent = true, condFunc = function(v,o) return v ~= o.TotalDPS and (o.PoisonDPS or 0) == 0 and (o.IgniteDPS or 0) == 0 and (o.ImpaleDPS or 0) == 0 and (o.BleedDPS or 0) == 0 end, minionDisplayStat = true }, - { stat = "BleedDPS", label = "Bleed DPS", fmt = ".1f", compPercent = true, warnFunc = function(v) return v >= data.misc.DotDpsCap and "Bleed DPS exceeds in game limit" end, displayStat = true }, - { stat = "BleedDPS", label = "Bleed DPS", fmt = ".1f", compPercent = true, warnFunc = function(v) return v >= data.misc.DotDpsCap and "Minion Bleed DPS exceeds in game limit" end, minionDisplayStat = true }, + { stat = "WithDotDPS", label = " Total DPS inc. DoT", fmt = ".1f", compPercent = true, condFunc = function(v,o) return v ~= o.TotalDPS and (o.PoisonDPS or 0) == 0 and (o.IgniteDPS or 0) == 0 and (o.ImpaleDPS or 0) == 0 and (o.BleedDPS or 0) == 0 end, minionDisplayStat = true }, + { stat = "BleedDPS", label = "Bleed DPS", fmt = ".1f", compPercent = true, warnFunc = function(v) return v >= data.misc.DotDpsCap and "Bleed DPS exceeds in game limit" end, displayStat = true, minionDisplayStat = true }, { stat = "BleedDamage", label = "Total Damage per Bleed", fmt = ".1f", compPercent = true, flag = "showAverage", displayStat = true }, { stat = "WithBleedDPS", label = "Total DPS inc. Bleed", fmt = ".1f", compPercent = true, flag = "notAverage", condFunc = function(v,o) return v ~= o.TotalDPS and (o.TotalDot or 0) == 0 and (o.PoisonDPS or 0) == 0 and (o.ImpaleDPS or 0) == 0 and (o.IgniteDPS or 0) == 0 end, displayStat = true }, { stat = "WithBleedDPS", label = "Total DPS inc. Bleed", fmt = ".1f", compPercent = true, condFunc = function(v,o) return v ~= o.TotalDPS and (o.TotalDot or 0) == 0 and (o.PoisonDPS or 0) == 0 and (o.ImpaleDPS or 0) == 0 and (o.IgniteDPS or 0) == 0 end, minionDisplayStat = true }, - { stat = "IgniteDPS", label = "Ignite DPS", fmt = ".1f", compPercent = true, warnFunc = function(v) return v >= data.misc.DotDpsCap and "Ignite DPS exceeds in game limit" end, displayStat = true }, - { stat = "IgniteDPS", label = "Ignite DPS", fmt = ".1f", compPercent = true, warnFunc = function(v) return v >= data.misc.DotDpsCap and "Minion Ignite DPS exceeds in game limit" end, minionDisplayStat = true }, + { stat = "IgniteDPS", label = "Ignite DPS", fmt = ".1f", compPercent = true, warnFunc = function(v) return v >= data.misc.DotDpsCap and "Ignite DPS exceeds in game limit" end, displayStat = true, minionDisplayStat = true }, { stat = "IgniteDamage", label = "Total Damage per Ignite", fmt = ".1f", compPercent = true, flag = "showAverage", displayStat = true }, { stat = "BurningGroundDPS", label = "Burning Ground DPS", fmt = ".1f", compPercent = true, warnFunc = function(v,o) return v >= data.misc.DotDpsCap and "Burning Ground DPS exceeds in game limit" end, displayStat = true }, { stat = "WithIgniteDPS", label = "Total DPS inc. Ignite", fmt = ".1f", compPercent = true, flag = "notAverage", condFunc = function(v,o) return v ~= o.TotalDPS and (o.TotalDot or 0) == 0 and (o.PoisonDPS or 0) == 0 and (o.ImpaleDPS or 0) == 0 and (o.BleedDPS or 0) == 0 end, displayStat = true }, - { stat = "WithIgniteDPS", label = "Total DPS inc. Ignite", fmt = ".1f", compPercent = true, condFunc = function(v,o) return v ~= o.TotalDPS and (o.TotalDot or 0) == 0 and (o.PoisonDPS or 0) == 0 and (o.ImpaleDPS or 0) == 0 and (o.BleedDPS or 0) == 0 end, minionDisplayStat = true }, + { stat = "WithIgniteDPS", label = " Total DPS inc. Ignite", fmt = ".1f", compPercent = true, condFunc = function(v,o) return v ~= o.TotalDPS and (o.TotalDot or 0) == 0 and (o.PoisonDPS or 0) == 0 and (o.ImpaleDPS or 0) == 0 and (o.BleedDPS or 0) == 0 end, minionDisplayStat = true }, { stat = "WithIgniteAverageDamage", label = "Average Dmg. inc. Ignite", fmt = ".1f", compPercent = true, displayStat = true }, - { stat = "PoisonDPS", label = "Poison DPS", fmt = ".1f", compPercent = true, warnFunc = function(v) return v >= data.misc.DotDpsCap and "Poison DPS exceeds in game limit" end, displayStat = true }, - { stat = "PoisonDPS", label = "Poison DPS", fmt = ".1f", compPercent = true, warnFunc = function(v) return v >= data.misc.DotDpsCap and "Minion Poison dps exceeds in game limit" end, minionDisplayStat = true }, + { stat = "PoisonDPS", label = "Poison DPS", fmt = ".1f", compPercent = true, warnFunc = function(v) return v >= data.misc.DotDpsCap and "Poison DPS exceeds in game limit" end, displayStat = true, minionDisplayStat = true }, { stat = "CausticGroundDPS", label = "Caustic Ground DPS", fmt = ".1f", compPercent = true, warnFunc = function(v,o) return v >= data.misc.DotDpsCap and "Caustic Ground DPS exceeds in game limit" end, displayStat = true }, - { stat = "PoisonDamage", label = "Total Damage per Poison", fmt = ".1f", compPercent = true, displayStat = true }, - { stat = "PoisonDamage", label = "Total Damage per Poison", fmt = ".1f", compPercent = true, minionDisplayStat = true }, + { stat = "PoisonDamage", label = "Total Damage per Poison", fmt = ".1f", compPercent = true, displayStat = true, minionDisplayStat = true }, { stat = "WithPoisonDPS", label = "Total DPS inc. Poison", fmt = ".1f", compPercent = true, flag = "poison", flag = "notAverage", condFunc = function(v,o) return v ~= o.TotalDPS and (o.TotalDot or 0) == 0 and (o.IgniteDPS or 0) == 0 and (o.ImpaleDPS or 0) == 0 and (o.BleedDPS or 0) == 0 end, displayStat = true }, - { stat = "WithPoisonDPS", label = "Total DPS inc. Poison", fmt = ".1f", compPercent = true, condFunc = function(v,o) return v ~= o.TotalDPS and (o.TotalDot or 0) == 0 and (o.IgniteDPS or 0) == 0 and (o.ImpaleDPS or 0) == 0 and (o.BleedDPS or 0) == 0 end, minionDisplayStat = true }, - { stat = "DecayDPS", label = "Decay DPS", fmt = ".1f", compPercent = true, displayStat = true }, - { stat = "DecayDPS", label = "Decay DPS", fmt = ".1f", compPercent = true, minionDisplayStat = true }, + { stat = "WithPoisonDPS", label = " Total DPS inc. Poison", fmt = ".1f", compPercent = true, condFunc = function(v,o) return v ~= o.TotalDPS and (o.TotalDot or 0) == 0 and (o.IgniteDPS or 0) == 0 and (o.ImpaleDPS or 0) == 0 and (o.BleedDPS or 0) == 0 end, minionDisplayStat = true }, + { stat = "DecayDPS", label = "Decay DPS", fmt = ".1f", compPercent = true, displayStat = true, minionDisplayStat = true }, { stat = "TotalDotDPS", label = "Total DoT DPS", fmt = ".1f", compPercent = true, condFunc = function(v,o) return o.showTotalDotDPS or ( v ~= o.TotalDot and v ~= o.TotalPoisonDPS and v ~= o.CausticGroundDPS and v ~= (o.TotalIgniteDPS or o.IgniteDPS) and v ~= o.BurningGroundDPS and v ~= o.BleedDPS ) end, warnFunc = function(v) return v >= data.misc.DotDpsCap and "DoT DPS exceeds in game limit" end, displayStat = true }, - { stat = "TotalDotDPS", label = "Total DoT DPS", fmt = ".1f", compPercent = true, condFunc = function(v,o) return v ~= o.TotalDot and v ~= o.ImpaleDPS and v ~= o.TotalPoisonDPS and v ~= (o.TotalIgniteDPS or o.IgniteDPS) and v ~= o.BleedDPS end, warnFunc = function(v) return v >= data.misc.DotDpsCap and "Minion DoT DPS exceeds in game limit" end, minionDisplayStat = true }, + { stat = "TotalDotDPS", label = " Total DoT DPS", fmt = ".1f", compPercent = true, condFunc = function(v,o) return v ~= o.TotalDot and v ~= o.ImpaleDPS and v ~= o.TotalPoisonDPS and v ~= (o.TotalIgniteDPS or o.IgniteDPS) and v ~= o.BleedDPS end, warnFunc = function(v) return v >= data.misc.DotDpsCap and "DoT DPS exceeds in game limit" end, minionDisplayStat = true }, { stat = "ImpaleDPS", label = "Impale Damage", fmt = ".1f", compPercent = true, flag = "impale", flag = "showAverage", displayStat = true }, - { stat = "ImpaleDPS", label = "Impale DPS", fmt = ".1f", compPercent = true, flag = "impale", minionDisplayStat = true }, { stat = "WithImpaleDPS", label = "Damage inc. Impale", fmt = ".1f", compPercent = true, flag = "impale", flag = "showAverage", condFunc = function(v,o) return v ~= o.TotalDPS and (o.TotalDot or 0) == 0 and (o.IgniteDPS or 0) == 0 and (o.PoisonDPS or 0) == 0 and (o.BleedDPS or 0) == 0 end , displayStat = true }, - { stat = "WithImpaleDPS", label = "Total DPS inc. Impale", fmt = ".1f", compPercent = true, flag = "impale", condFunc = function(v,o) return v ~= o.TotalDPS and (o.TotalDot or 0) == 0 and (o.IgniteDPS or 0) == 0 and (o.PoisonDPS or 0) == 0 and (o.BleedDPS or 0) == 0 end, minionDisplayStat = true }, { stat = "ImpaleDPS", label = "Impale DPS", fmt = ".1f", compPercent = true, flag = "impale", flag = "notAverage", displayStat = true }, + { stat = "ImpaleDPS", label = " Impale DPS", fmt = ".1f", compPercent = true, flag = "impale", minionDisplayStat = true }, { stat = "WithImpaleDPS", label = "Total DPS inc. Impale", fmt = ".1f", compPercent = true, flag = "impale", flag = "notAverage", condFunc = function(v,o) return v ~= o.TotalDPS and (o.TotalDot or 0) == 0 and (o.IgniteDPS or 0) == 0 and (o.PoisonDPS or 0) == 0 and (o.BleedDPS or 0) == 0 end, displayStat = true }, + { stat = "WithImpaleDPS", label = " Total DPS inc. Impale", fmt = ".1f", compPercent = true, flag = "impale", condFunc = function(v,o) return v ~= o.TotalDPS and (o.TotalDot or 0) == 0 and (o.IgniteDPS or 0) == 0 and (o.PoisonDPS or 0) == 0 and (o.BleedDPS or 0) == 0 end, minionDisplayStat = true }, { stat = "MirageDPS", label = "Total Mirage DPS", fmt = ".1f", compPercent = true, condFunc = function(v,o) return v > 0 end, displayStat = true }, - { stat = "CullingDPS", label = "Culling DPS", fmt = ".1f", compPercent = true, condFunc = function(v,o) return (o.CullingDPS or 0) > 0 end, displayStat = true }, - { stat = "CullingDPS", label = "Culling DPS", fmt = ".1f", compPercent = true, condFunc = function(v,o) return (o.CullingDPS or 0) > 0 end, minionDisplayStat = true }, + { stat = "CullingDPS", label = "Culling DPS", fmt = ".1f", compPercent = true, condFunc = function(v,o) return (o.CullingDPS or 0) > 0 end, displayStat = true, minionDisplayStat = true }, { stat = "CombinedDPS", label = "Combined DPS", fmt = ".1f", compPercent = true, flag = "notAverage", condFunc = function(v,o) return v ~= ((o.TotalDPS or 0) + (o.TotalDot or 0)) and v ~= o.WithImpaleDPS and ( o.showTotalDotDPS or ( v ~= o.WithPoisonDPS and v ~= o.WithIgniteDPS and v ~= o.WithBleedDPS ) ) end, displayStat = true }, { stat = "CombinedDPS", label = "Combined DPS", fmt = ".1f", compPercent = true, condFunc = function(v,o) return v ~= ((o.TotalDPS or 0) + (o.TotalDot or 0)) and v ~= o.WithImpaleDPS and v ~= o.WithPoisonDPS and v ~= o.WithIgniteDPS and v ~= o.WithBleedDPS end}, { stat = "CombinedAvg", label = "Combined Total Damage", fmt = ".1f", compPercent = true, flag = "showAverage", condFunc = function(v,o) return (v ~= o.AverageDamage and (o.TotalDot or 0) == 0) and (v ~= o.WithPoisonDPS or v ~= o.WithIgniteDPS or v ~= o.WithBleedDPS) end, displayStat = true }, - { stat = "Cooldown", label = "Skill Cooldown", fmt = ".3fs", lowerIsBetter = true, displayStat = true }, - { stat = "Cooldown", label = "Skill Cooldown", fmt = ".3fs", lowerIsBetter = true, minionDisplayStat = true }, + { stat = "Cooldown", label = "Skill Cooldown", fmt = ".3fs", lowerIsBetter = true, displayStat = true, minionDisplayStat = true }, { stat = "SealCooldown", label = "Seal Gain Frequency", fmt = ".2fs", lowerIsBetter = true, displayStat = true }, { stat = "SealMax", label = "Max Number of Seals", fmt = "d", displayStat = true }, { stat = "TimeMaxSeals", label = "Time to Gain Max Seals", fmt = ".2fs", lowerIsBetter = true, displayStat = true }, @@ -121,15 +111,13 @@ local StatList = { { stat = "ChaosMaximumHitTaken", label = "Chaos Max Hit", fmt = ".0f", color = colorCodes.CHAOS, compPercent = true, displayStat = true }, }, { { stat = "Life", label = "Total Life", fmt = "d", color = colorCodes.LIFE, compPercent = true, displayStat = true }, - { stat = "Life", label = "Total Life", fmt = ".1f", color = colorCodes.LIFE, compPercent = true, minionDisplayStat = true }, + { stat = "Life", label = " Total Life", fmt = ".1f", color = colorCodes.LIFE, compPercent = true, minionDisplayStat = true }, { stat = "Spec:LifeInc", label = "%Inc Life from Tree", fmt = "d%%", color = colorCodes.LIFE, condFunc = function(v,o) return v > 0 and o.Life > 1 end, displayStat = true }, { stat = "LifeUnreserved", label = "Unreserved Life", fmt = "d", color = colorCodes.LIFE, condFunc = function(v,o) return v < o.Life end, compPercent = true, warnFunc = function(v) return v <= 0 and "Your unreserved Life is below 1" end, displayStat = true }, { stat = "LifeRecoverable", label = "Life Recoverable", fmt = "d", color = colorCodes.LIFE, condFunc = function(v,o) return v < o.LifeUnreserved end, displayStat = true }, { stat = "LifeUnreservedPercent", label = "Unreserved Life", fmt = "d%%", color = colorCodes.LIFE, condFunc = function(v,o) return v < 100 end, displayStat = true }, - { stat = "LifeRegenRecovery", label = "Life Regen", fmt = ".1f", color = colorCodes.LIFE, displayStat = true }, - { stat = "LifeRegenRecovery", label = "Life Regen", fmt = ".1f", color = colorCodes.LIFE, minionDisplayStat = true }, - { stat = "LifeLeechGainRate", label = "Life Leech/On Hit Rate", fmt = ".1f", color = colorCodes.LIFE, compPercent = true, displayStat = true }, - { stat = "LifeLeechGainRate", label = "Life Leech/On Hit Rate", fmt = ".1f", color = colorCodes.LIFE, compPercent = true, minionDisplayStat = true }, + { stat = "LifeRegenRecovery", label = "Life Regen", fmt = ".1f", color = colorCodes.LIFE, displayStat = true, minionDisplayStat = true }, + { stat = "LifeLeechGainRate", label = "Life Leech/On Hit Rate", fmt = ".1f", color = colorCodes.LIFE, compPercent = true, displayStat = true, minionDisplayStat = true }, { stat = "LifeLeechGainPerHit", label = "Life Leech/Gain per Hit", fmt = ".1f", color = colorCodes.LIFE, compPercent = true, displayStat = true }, }, { { stat = "Mana", label = "Total Mana", fmt = "d", color = colorCodes.MANA, compPercent = true, displayStat = true }, @@ -140,14 +128,12 @@ local StatList = { { stat = "ManaLeechGainRate", label = "Mana Leech/On Hit Rate", fmt = ".1f", color = colorCodes.MANA, compPercent = true, displayStat = true }, { stat = "ManaLeechGainPerHit", label = "Mana Leech/Gain per Hit", fmt = ".1f", color = colorCodes.MANA, compPercent = true, displayStat = true }, }, { - { stat = "EnergyShield", label = "Energy Shield", fmt = "d", color = colorCodes.ES, compPercent = true, displayStat = true }, - { stat = "EnergyShield", label = "Energy Shield", fmt = "d", color = colorCodes.ES, compPercent = true, minionDisplayStat = true }, + { stat = "EnergyShield", label = "Energy Shield", fmt = "d", color = colorCodes.ES, compPercent = true, displayStat = true, minionDisplayStat = true }, + { stat = "EnergyShield", label = "Energy Shield", fmt = "d", color = colorCodes.ES, compPercent = true }, { stat = "EnergyShieldRecoveryCap", label = "Recoverable ES", color = colorCodes.ES, fmt = "d", condFunc = function(v,o) return o.CappingES end, displayStat = true }, { stat = "Spec:EnergyShieldInc", label = "%Inc ES from Tree", color = colorCodes.ES, fmt = "d%%", displayStat = true }, - { stat = "EnergyShieldRegenRecovery", label = "Energy Shield Regen", color = colorCodes.ES, fmt = ".1f", displayStat = true }, - { stat = "EnergyShieldRegenRecovery", label = "Energy Shield Regen", fmt = ".1f", color = colorCodes.ES, minionDisplayStat = true }, - { stat = "EnergyShieldLeechGainRate", label = "ES Leech/On Hit Rate", color = colorCodes.ES, fmt = ".1f", compPercent = true, displayStat = true }, - { stat = "EnergyShieldLeechGainRate", label = "ES Leech/On Hit Rate", fmt = ".1f", color = colorCodes.ES, compPercent = true, minionDisplayStat = true }, + { stat = "EnergyShieldRegenRecovery", label = "Energy Shield Regen", color = colorCodes.ES, fmt = ".1f", displayStat = true, minionDisplayStat = true }, + { stat = "EnergyShieldLeechGainRate", label = "ES Leech/On Hit Rate", color = colorCodes.ES, fmt = ".1f", compPercent = true, displayStat = true, minionDisplayStat = true }, { stat = "EnergyShieldLeechGainPerHit", label = "ES Leech/Gain per Hit", color = colorCodes.ES, fmt = ".1f", compPercent = true, displayStat = true }, }, { { stat = "Ward", label = "Ward", fmt = "d", color = colorCodes.WARD, compPercent = true, displayStat = true }, @@ -208,27 +194,66 @@ local displayStats = {} local minionDisplayStats = {} local extraSaveStats = {} --- This may be user-customisable in the future local statCount = 0 -for _, statGroup in ipairs(StatList) do - if statCount > 0 then - t_insert(displayStats, { }) - statCount = 0 - end - for _, stat in ipairs(statGroup) do - if stat.displayStat then - stat.displayStat = nil - t_insert(displayStats, stat) - statCount = statCount + 1 +local settingsStatList = main.displayStatList +if settingsStatList then + for _, statGroup in ipairs(settingsStatList) do + if statCount > 0 then + t_insert(displayStats, { }) + statCount = 0 + end + for _, stat in ipairs(statGroup) do + if stat.displayStat or stat.minionDisplayStat or stat.extraSaveStat then + for _, statGroup2 in ipairs(StatList) do + for _, stat2 in ipairs(statGroup2) do + if stat2.label == stat.label then + for k, v in pairs(stat) do + stat2[k] = v + end + stat2.displayStat = stat.displayStat + stat2.minionDisplayStat = stat.minionDisplayStat + stat2.extraSaveStat = stat.extraSaveStat + stat = stat2 + break + end + end + end + if stat.displayStat then + stat.displayStat = nil + t_insert(displayStats, stat) + statCount = statCount + 1 + end + if stat.minionDisplayStat then + stat.minionDisplayStat = nil + t_insert(minionDisplayStats, stat) + end + if stat.extraSaveStat then + stat.extraSaveStat = nil + t_insert(extraSaveStats, stat.stat) + end + end end - if stat.minionDisplayStat then - stat.minionDisplayStat = nil - t_insert(minionDisplayStats, stat) - ConPrintTable(stat) + end +else + for _, statGroup in ipairs(StatList) do + if statCount > 0 then + t_insert(displayStats, { }) + statCount = 0 end - if stat.extraSaveStat then - stat.extraSaveStat = nil - t_insert(extraSaveStats, stat.stat) + for _, stat in ipairs(statGroup) do + if stat.displayStat then + stat.displayStat = nil + t_insert(displayStats, stat) + statCount = statCount + 1 + end + if stat.minionDisplayStat then + stat.minionDisplayStat = nil + t_insert(minionDisplayStats, stat) + end + if stat.extraSaveStat then + stat.extraSaveStat = nil + t_insert(extraSaveStats, stat.stat) + end end end end diff --git a/src/Modules/Main.lua b/src/Modules/Main.lua index 39385efabc..3ce0576846 100644 --- a/src/Modules/Main.lua +++ b/src/Modules/Main.lua @@ -120,6 +120,8 @@ function main:Init() self.showWarnings = true self.slotOnlyTooltips = true self.POESESSID = "" + + self.displayStatList = nil self.tree = { } self:LoadTree(latestTreeVersion) @@ -532,6 +534,27 @@ function main:LoadSettings(ignoreBuild) } end end + elseif node.elem == "StatList" then + for _, child in ipairs(node) do + if child.elem == "statGroup" and tonumber(child.attrib.index) then + self.displayStatList = self.displayStatList or {} + local index = tonumber(child.attrib.index) + self.displayStatList[index] = {} + for _, child2 in ipairs(child) do + if child2.elem == "stat" then + local stat = {} + for k, v in pairs(child2.attrib) do + if (v == "true") then + stat[k] = true + else + stat[k] = v + end + end + t_insert(self.displayStatList[index], stat) + end + end + end + end elseif node.elem == "Misc" then if node.attrib.buildSortMode then self.buildSortMode = node.attrib.buildSortMode @@ -686,6 +709,21 @@ function main:SaveSettings() t_insert(sharedItemList, set) end t_insert(setXML, sharedItemList) + local displayStatList = { elem = "StatList" } + if self.displayStatList then + for i, statGroup in ipairs(self.displayStatList) do + local set = { elem = "statGroup", attrib = { index = tostring(i) } } + for _, stat in ipairs(statGroup) do + local subset = { elem = "stat", attrib = { } } + for k, v in pairs(stat) do + subset.attrib[k] = tostring(v) + end + t_insert(set, subset) + end + t_insert(displayStatList, set) + end + end + t_insert(setXML, displayStatList) t_insert(setXML, { elem = "Misc", attrib = { buildSortMode = self.buildSortMode, connectionProtocol = tostring(launch.connectionProtocol), From 27ac14e8b28e619e6570331e4b4c2c628c2c089d Mon Sep 17 00:00:00 2001 From: Regisle Date: Sun, 5 Mar 2023 00:31:40 +1030 Subject: [PATCH 03/25] break early if found stat in earlier group --- src/Modules/BuildDisplayStats.lua | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Modules/BuildDisplayStats.lua b/src/Modules/BuildDisplayStats.lua index d6a138a20f..725ea12a47 100644 --- a/src/Modules/BuildDisplayStats.lua +++ b/src/Modules/BuildDisplayStats.lua @@ -204,6 +204,7 @@ if settingsStatList then end for _, stat in ipairs(statGroup) do if stat.displayStat or stat.minionDisplayStat or stat.extraSaveStat then + local found = false for _, statGroup2 in ipairs(StatList) do for _, stat2 in ipairs(statGroup2) do if stat2.label == stat.label then @@ -214,9 +215,13 @@ if settingsStatList then stat2.minionDisplayStat = stat.minionDisplayStat stat2.extraSaveStat = stat.extraSaveStat stat = stat2 + found = true break end end + if found then + break + end end if stat.displayStat then stat.displayStat = nil From 7c9cac0bcf376223a527ad0b6fc5cbd278b1fb45 Mon Sep 17 00:00:00 2001 From: Regisle Date: Sun, 5 Mar 2023 01:12:12 +1030 Subject: [PATCH 04/25] add more stats to show for sidebar --- src/Modules/BuildDisplayStats.lua | 46 +++++++++++++++++++++++++------ 1 file changed, 38 insertions(+), 8 deletions(-) diff --git a/src/Modules/BuildDisplayStats.lua b/src/Modules/BuildDisplayStats.lua index 725ea12a47..9b6de7fbec 100644 --- a/src/Modules/BuildDisplayStats.lua +++ b/src/Modules/BuildDisplayStats.lua @@ -171,25 +171,55 @@ local StatList = { { stat = "LightningResistOverCap", label = "Lightning Res. Over Max", fmt = "d%%", hideStat = true, displayStat = true }, { stat = "ChaosResist", label = "Chaos Resistance", fmt = "d%%", color = colorCodes.CHAOS, condFunc = function(v,o) return not o.ChaosInoculation end, overCapStat = "ChaosResistOverCap", displayStat = true }, { stat = "ChaosResistOverCap", label = "Chaos Res. Over Max", fmt = "d%%", hideStat = true, displayStat = true }, - { label = "Chaos Resistance", val = "Immune", labelStat = "ChaosResist", color = colorCodes.CHAOS, condFunc = function(o) return o.ChaosInoculation end, displayStat = true }, + { label = " Chaos Resistance", val = "Immune", labelStat = "ChaosResist", color = colorCodes.CHAOS, condFunc = function(o) return o.ChaosInoculation end, displayStat = true }, }, { { stat = "EffectiveMovementSpeedMod", label = "Movement Speed Modifier", fmt = "+d%%", mod = true, condFunc = function() return true end, displayStat = true }, + { stat = "QuantityMultiplier", label = "Quantity Multiplier", fmt = "+d%%" }, + { stat = "StoredUses", label = "Stored Uses", fmt = "d" }, + { stat = "Duration", label = "Skill Duration", fmt = ".2f", flag = "duration" }, + { stat = "DurationSecondary", label = "Secondary Duration", fmt = ".2f", flag = "duration" }, + { stat = "AuraDuration", label = "Aura Duration", fmt = ".2f" }, + { stat = "ReserveDuration", label = "Reserve Duration", fmt = ".2f" }, + { stat = "SoulGainPreventionDuration", label = "Soul Gain Prevent.", fmt = ".2f" }, + { stat = "SustainableTrauma", label = "Sustainable Trauma", fmt = "d" }, + { stat = "ProjectileCount", label = "Projectile Count", fmt = "d", flag = "projectile" }, + { stat = "PierceCountString", label = "Pierce Count", fmt = "d" }, + { stat = "ForkCountString", label = "Fork Count", fmt = "d" }, + { stat = "ChainMaxString", label = "Max Chain Count", fmt = "d" }, + { stat = "ProjectileSpeedMod", label = "Proj. Speed Mod", fmt = ".2f", flag = "projectile" }, + { stat = "BounceCount", label = "Bounces Count", fmt = "d", flag = "bounce" }, + { stat = "AuraEffectMod", label = "Aura Effect Mod", fmt = ".2f" }, + { stat = "CurseEffectMod", label = "Curse Effect Mod", fmt = ".2f" }, }, { { stat = "FullDPS", label = "Full DPS", fmt = ".1f", color = colorCodes.CURRENCY, compPercent = true, displayStat = true }, { stat = "FullDotDPS", label = "Full Dot DPS", fmt = ".1f", color = colorCodes.CURRENCY, compPercent = true, condFunc = function (v) return v >= data.misc.DotDpsCap end, warnFunc = function (v) return "Full Dot DPS exceeds in game limit" end, displayStat = true }, }, { { stat = "SkillDPS", label = "Skill DPS", condFunc = function() return true end, displayStat = true }, }, { - { stat = "PowerCharges", extraSaveStat = true }, - { stat = "PowerChargesMax", extraSaveStat = true }, - { stat = "FrenzyCharges", extraSaveStat = true }, - { stat = "FrenzyChargesMax", extraSaveStat = true }, - { stat = "EnduranceCharges", extraSaveStat = true }, - { stat = "EnduranceChargesMax", extraSaveStat = true }, - { stat = "ActiveTotemLimit", extraSaveStat = true }, + { stat = "PowerCharges", label = "Power Charges", extraSaveStat = true }, + { stat = "PowerChargesMax", label = "Power Charges Max", extraSaveStat = true }, + { stat = "FrenzyCharges", label = "Frenzy Charges", extraSaveStat = true }, + { stat = "FrenzyChargesMax", label = "Frenzy Charges Max", extraSaveStat = true }, + { stat = "EnduranceCharges", label = "Endurance Charges", extraSaveStat = true }, + { stat = "EnduranceChargesMax", label = "Endurance Charges Max", extraSaveStat = true }, + { stat = "ActiveTotemLimit", label = "Active Totem Limit", extraSaveStat = true }, } } +--[[ +-- method for generating a copy for settings +main.displayStatList = copyTable(StatList) +for _, statGroup in ipairs(main.displayStatList) do + for _, stat in ipairs(statGroup) do + for k, v in pairs(stat) do + if not (k == "label" or k == "displayStat" or k == "minionDisplayStat" or k == "extraSaveStat") then + stat[k] = nil + end + end + end +end +--]] + local displayStats = {} local minionDisplayStats = {} local extraSaveStats = {} From bbd5bc1866aad97a030fc604a1c3aaa095cd4525 Mon Sep 17 00:00:00 2001 From: Regisle Date: Sun, 5 Mar 2023 01:25:26 +1030 Subject: [PATCH 05/25] fix duplicate labels --- src/Modules/BuildDisplayStats.lua | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/Modules/BuildDisplayStats.lua b/src/Modules/BuildDisplayStats.lua index 9b6de7fbec..1c98068b33 100644 --- a/src/Modules/BuildDisplayStats.lua +++ b/src/Modules/BuildDisplayStats.lua @@ -22,7 +22,7 @@ local StatList = { { stat = "ServerTriggerRate", label = "Trigger Rate", fmt = ".2f", compPercent = true, condFunc = function(v,o) return (o.TriggerTime or 0) ~= 0 end, displayStat = true, minionDisplayStat = true }, { stat = "Speed", label = "Effective Trigger Rate", fmt = ".2f", compPercent = true, condFunc = function(v,o) return (o.TriggerTime or 0) ~= 0 and o.ServerTriggerRate ~= o.Speed end, displayStat = true, minionDisplayStat = true }, { stat = "WarcryCastTime", label = "Cast Time", fmt = ".2fs", compPercent = true, lowerIsBetter = true, flag = "warcry", displayStat = true }, - { stat = "HitSpeed", label = "Hit Rate", fmt = ".2f", compPercent = true, condFunc = function(v,o) return not o.TriggerTime end, displayStat = true }, + { stat = "HitSpeed", label = " Hit Rate", fmt = ".2f", compPercent = true, condFunc = function(v,o) return not o.TriggerTime end, displayStat = true }, { stat = "TrapThrowingTime", label = "Trap Throwing Time", fmt = ".2fs", compPercent = true, lowerIsBetter = true, displayStat = true }, { stat = "TrapCooldown", label = "Trap Cooldown", fmt = ".3fs", lowerIsBetter = true, displayStat = true }, { stat = "MineLayingTime", label = "Mine Throwing Time", fmt = ".2fs", compPercent = true, lowerIsBetter = true, displayStat = true }, @@ -31,7 +31,7 @@ local StatList = { { stat = "CritChance", label = "Effective Crit Chance", fmt = ".2f%%", condFunc = function(v,o) return v ~= o.PreEffectiveCritChance end, displayStat = true }, { stat = "CritMultiplier", label = "Crit Multiplier", fmt = "d%%", pc = true, condFunc = function(v,o) return (o.CritChance or 0) > 0 end, displayStat = true }, { stat = "HitChance", label = "Hit Chance", fmt = ".0f%%", flag = "attack", displayStat = true }, - { stat = "HitChance", label = "Hit Chance", fmt = ".0f%%", condFunc = function(v,o) return o.enemyHasSpellBlock end, displayStat = true }, + { stat = "HitChance", label = " Hit Chance", fmt = ".0f%%", condFunc = function(v,o) return o.enemyHasSpellBlock end, displayStat = true }, { stat = "TotalDPS", label = "Hit DPS", fmt = ".1f", compPercent = true, flag = "notAverage", displayStat = true }, { stat = "PvpTotalDPS", label = "PvP Hit DPS", fmt = ".1f", compPercent = true, flag = "notAveragePvP", displayStat = true }, { stat = "TotalDPS", label = "Hit DPS", fmt = ".1f", compPercent = true, flag = "showAverage", condFunc = function(v,o) return (o.TriggerTime or 0) ~= 0 end, displayStat = true }, @@ -42,7 +42,7 @@ local StatList = { { stat = "BleedDPS", label = "Bleed DPS", fmt = ".1f", compPercent = true, warnFunc = function(v) return v >= data.misc.DotDpsCap and "Bleed DPS exceeds in game limit" end, displayStat = true, minionDisplayStat = true }, { stat = "BleedDamage", label = "Total Damage per Bleed", fmt = ".1f", compPercent = true, flag = "showAverage", displayStat = true }, { stat = "WithBleedDPS", label = "Total DPS inc. Bleed", fmt = ".1f", compPercent = true, flag = "notAverage", condFunc = function(v,o) return v ~= o.TotalDPS and (o.TotalDot or 0) == 0 and (o.PoisonDPS or 0) == 0 and (o.ImpaleDPS or 0) == 0 and (o.IgniteDPS or 0) == 0 end, displayStat = true }, - { stat = "WithBleedDPS", label = "Total DPS inc. Bleed", fmt = ".1f", compPercent = true, condFunc = function(v,o) return v ~= o.TotalDPS and (o.TotalDot or 0) == 0 and (o.PoisonDPS or 0) == 0 and (o.ImpaleDPS or 0) == 0 and (o.IgniteDPS or 0) == 0 end, minionDisplayStat = true }, + { stat = "WithBleedDPS", label = " Total DPS inc. Bleed", fmt = ".1f", compPercent = true, condFunc = function(v,o) return v ~= o.TotalDPS and (o.TotalDot or 0) == 0 and (o.PoisonDPS or 0) == 0 and (o.ImpaleDPS or 0) == 0 and (o.IgniteDPS or 0) == 0 end, minionDisplayStat = true }, { stat = "IgniteDPS", label = "Ignite DPS", fmt = ".1f", compPercent = true, warnFunc = function(v) return v >= data.misc.DotDpsCap and "Ignite DPS exceeds in game limit" end, displayStat = true, minionDisplayStat = true }, { stat = "IgniteDamage", label = "Total Damage per Ignite", fmt = ".1f", compPercent = true, flag = "showAverage", displayStat = true }, { stat = "BurningGroundDPS", label = "Burning Ground DPS", fmt = ".1f", compPercent = true, warnFunc = function(v,o) return v >= data.misc.DotDpsCap and "Burning Ground DPS exceeds in game limit" end, displayStat = true }, @@ -66,7 +66,7 @@ local StatList = { { stat = "MirageDPS", label = "Total Mirage DPS", fmt = ".1f", compPercent = true, condFunc = function(v,o) return v > 0 end, displayStat = true }, { stat = "CullingDPS", label = "Culling DPS", fmt = ".1f", compPercent = true, condFunc = function(v,o) return (o.CullingDPS or 0) > 0 end, displayStat = true, minionDisplayStat = true }, { stat = "CombinedDPS", label = "Combined DPS", fmt = ".1f", compPercent = true, flag = "notAverage", condFunc = function(v,o) return v ~= ((o.TotalDPS or 0) + (o.TotalDot or 0)) and v ~= o.WithImpaleDPS and ( o.showTotalDotDPS or ( v ~= o.WithPoisonDPS and v ~= o.WithIgniteDPS and v ~= o.WithBleedDPS ) ) end, displayStat = true }, - { stat = "CombinedDPS", label = "Combined DPS", fmt = ".1f", compPercent = true, condFunc = function(v,o) return v ~= ((o.TotalDPS or 0) + (o.TotalDot or 0)) and v ~= o.WithImpaleDPS and v ~= o.WithPoisonDPS and v ~= o.WithIgniteDPS and v ~= o.WithBleedDPS end}, + { stat = "CombinedDPS", label = " Combined DPS", fmt = ".1f", compPercent = true, condFunc = function(v,o) return v ~= ((o.TotalDPS or 0) + (o.TotalDot or 0)) and v ~= o.WithImpaleDPS and v ~= o.WithPoisonDPS and v ~= o.WithIgniteDPS and v ~= o.WithBleedDPS end, displayStat = true }, { stat = "CombinedAvg", label = "Combined Total Damage", fmt = ".1f", compPercent = true, flag = "showAverage", condFunc = function(v,o) return (v ~= o.AverageDamage and (o.TotalDot or 0) == 0) and (v ~= o.WithPoisonDPS or v ~= o.WithIgniteDPS or v ~= o.WithBleedDPS) end, displayStat = true }, { stat = "Cooldown", label = "Skill Cooldown", fmt = ".3fs", lowerIsBetter = true, displayStat = true, minionDisplayStat = true }, { stat = "SealCooldown", label = "Seal Gain Frequency", fmt = ".2fs", lowerIsBetter = true, displayStat = true }, @@ -76,16 +76,16 @@ local StatList = { { stat = "BrandAttachmentRange", label = "Attachment Range", fmt = "d", flag = "brand", displayStat = true }, { stat = "BrandTicks", label = "Activations per Brand", fmt = "d", flag = "brand", displayStat = true }, { stat = "ManaCost", label = "Mana Cost", fmt = "d", color = colorCodes.MANA, pool = "ManaUnreserved", compPercent = true, lowerIsBetter = true, condFunc = function(v,o) return o.ManaHasCost end, displayStat = true }, - { stat = "ManaPercentCost", label = "Mana Cost", fmt = "d%%", color = colorCodes.MANA, pool = "ManaUnreservedPercent", compPercent = true, lowerIsBetter = true, condFunc = function(v,o) return o.ManaPercentHasCost end, displayStat = true }, + { stat = "ManaPercentCost", label = " Mana Cost", fmt = "d%%", color = colorCodes.MANA, pool = "ManaUnreservedPercent", compPercent = true, lowerIsBetter = true, condFunc = function(v,o) return o.ManaPercentHasCost end, displayStat = true }, { stat = "ManaPerSecondCost", label = "Mana Cost per second", fmt = ".2f", color = colorCodes.MANA, pool = "ManaUnreserved", compPercent = true, lowerIsBetter = true, condFunc = function(v,o) return o.ManaPerSecondHasCost end, displayStat = true }, - { stat = "ManaPercentPerSecondCost", label = "Mana Cost per second", fmt = ".2f%%", color = colorCodes.MANA, pool = "ManaUnreservedPercent", compPercent = true, lowerIsBetter = true, condFunc = function(v,o) return o.ManaPercentPerSecondHasCost end, displayStat = true }, + { stat = "ManaPercentPerSecondCost", label = " Mana Cost per second", fmt = ".2f%%", color = colorCodes.MANA, pool = "ManaUnreservedPercent", compPercent = true, lowerIsBetter = true, condFunc = function(v,o) return o.ManaPercentPerSecondHasCost end, displayStat = true }, { stat = "LifeCost", label = "Life Cost", fmt = "d", color = colorCodes.LIFE, pool = "LifeUnreserved", compPercent = true, lowerIsBetter = true, condFunc = function(v,o) return o.LifeHasCost end, displayStat = true }, - { stat = "LifePercentCost", label = "Life Cost", fmt = "d%%", color = colorCodes.LIFE, pool = "LifeUnreservedPercent", compPercent = true, lowerIsBetter = true, condFunc = function(v,o) return o.LifePercentHasCost end, displayStat = true }, + { stat = "LifePercentCost", label = " Life Cost", fmt = "d%%", color = colorCodes.LIFE, pool = "LifeUnreservedPercent", compPercent = true, lowerIsBetter = true, condFunc = function(v,o) return o.LifePercentHasCost end, displayStat = true }, { stat = "LifePerSecondCost", label = "Life Cost per second", fmt = ".2f", color = colorCodes.LIFE, pool = "LifeUnreserved", compPercent = true, lowerIsBetter = true, condFunc = function(v,o) return o.LifePerSecondHasCost end, displayStat = true }, - { stat = "LifePercentPerSecondCost", label = "Life Cost per second", fmt = ".2f%%", color = colorCodes.LIFE, pool = "LifeUnreservedPercent", compPercent = true, lowerIsBetter = true, condFunc = function(v,o) return o.LifePercentPerSecondHasCost end, displayStat = true }, + { stat = "LifePercentPerSecondCost", label = " Life Cost per second", fmt = ".2f%%", color = colorCodes.LIFE, pool = "LifeUnreservedPercent", compPercent = true, lowerIsBetter = true, condFunc = function(v,o) return o.LifePercentPerSecondHasCost end, displayStat = true }, { stat = "ESCost", label = "Energy Shield Cost", fmt = "d", color = colorCodes.ES, pool = "EnergyShield", compPercent = true, lowerIsBetter = true, condFunc = function(v,o) return o.ESHasCost end, displayStat = true }, { stat = "ESPerSecondCost", label = "ES Cost per second", fmt = ".2f", color = colorCodes.ES, pool = "EnergyShield", compPercent = true, lowerIsBetter = true, condFunc = function(v,o) return o.ESPerSecondHasCost end, displayStat = true }, - { stat = "ESPercentPerSecondCost", label = "ES Cost per second", fmt = ".2f%%", color = colorCodes.ES, compPercent = true, lowerIsBetter = true, condFunc = function(v,o) return o.ESPercentPerSecondHasCost end, displayStat = true }, + { stat = "ESPercentPerSecondCost", label = " ES Cost per second", fmt = ".2f%%", color = colorCodes.ES, compPercent = true, lowerIsBetter = true, condFunc = function(v,o) return o.ESPercentPerSecondHasCost end, displayStat = true }, { stat = "RageCost", label = "Rage Cost", fmt = "d", color = colorCodes.RAGE, pool = "Rage", compPercent = true, lowerIsBetter = true, condFunc = function(v,o) return o.RageHasCost end, displayStat = true }, { stat = "RagePerSecondCost", label = "Rage Cost per second", fmt = ".2f", color = colorCodes.RAGE, pool = "Rage", compPercent = true, lowerIsBetter = true, condFunc = function(v,o) return o.RagePerSecondHasCost end, displayStat = true }, { stat = "SoulCost", label = "Soul Cost", fmt = "d", color = colorCodes.RAGE, pool = "Soul", compPercent = true, lowerIsBetter = true, condFunc = function(v,o) return o.SoulHasCost end, displayStat = true }, From e8c9eaf9d29c7781288e90e2ccf5d1a737b20635 Mon Sep 17 00:00:00 2001 From: Regisle Date: Sun, 5 Mar 2023 01:28:08 +1030 Subject: [PATCH 06/25] another duplicate label --- src/Modules/BuildDisplayStats.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Modules/BuildDisplayStats.lua b/src/Modules/BuildDisplayStats.lua index 1c98068b33..3de2887c18 100644 --- a/src/Modules/BuildDisplayStats.lua +++ b/src/Modules/BuildDisplayStats.lua @@ -34,8 +34,8 @@ local StatList = { { stat = "HitChance", label = " Hit Chance", fmt = ".0f%%", condFunc = function(v,o) return o.enemyHasSpellBlock end, displayStat = true }, { stat = "TotalDPS", label = "Hit DPS", fmt = ".1f", compPercent = true, flag = "notAverage", displayStat = true }, { stat = "PvpTotalDPS", label = "PvP Hit DPS", fmt = ".1f", compPercent = true, flag = "notAveragePvP", displayStat = true }, - { stat = "TotalDPS", label = "Hit DPS", fmt = ".1f", compPercent = true, flag = "showAverage", condFunc = function(v,o) return (o.TriggerTime or 0) ~= 0 end, displayStat = true }, - { stat = "TotalDPS", label = " Hit DPS", fmt = ".1f", compPercent = true, minionDisplayStat = true }, + { stat = "TotalDPS", label = " Hit DPS", fmt = ".1f", compPercent = true, flag = "showAverage", condFunc = function(v,o) return (o.TriggerTime or 0) ~= 0 end, displayStat = true }, + { stat = "TotalDPS", label = " Hit DPS", fmt = ".1f", compPercent = true, minionDisplayStat = true }, { stat = "TotalDot", label = "DoT DPS", fmt = ".1f", compPercent = true, displayStat = true, minionDisplayStat = true }, { stat = "WithDotDPS", label = "Total DPS inc. DoT", fmt = ".1f", compPercent = true, flag = "notAverage", condFunc = function(v,o) return v ~= o.TotalDPS and (o.PoisonDPS or 0) == 0 and (o.IgniteDPS or 0) == 0 and (o.ImpaleDPS or 0) == 0 and (o.BleedDPS or 0) == 0 end, displayStat = true }, { stat = "WithDotDPS", label = " Total DPS inc. DoT", fmt = ".1f", compPercent = true, condFunc = function(v,o) return v ~= o.TotalDPS and (o.PoisonDPS or 0) == 0 and (o.IgniteDPS or 0) == 0 and (o.ImpaleDPS or 0) == 0 and (o.BleedDPS or 0) == 0 end, minionDisplayStat = true }, From cf027924951edb5e3464e02cd6430364cec13b5c Mon Sep 17 00:00:00 2001 From: Regisle Date: Sun, 5 Mar 2023 09:12:28 +1030 Subject: [PATCH 07/25] save all stats currently saved --- src/Modules/BuildDisplayStats.lua | 38 +++++++++++++++++++++++++------ 1 file changed, 31 insertions(+), 7 deletions(-) diff --git a/src/Modules/BuildDisplayStats.lua b/src/Modules/BuildDisplayStats.lua index 3de2887c18..38c4efa6dc 100644 --- a/src/Modules/BuildDisplayStats.lua +++ b/src/Modules/BuildDisplayStats.lua @@ -123,13 +123,12 @@ local StatList = { { stat = "Mana", label = "Total Mana", fmt = "d", color = colorCodes.MANA, compPercent = true, displayStat = true }, { stat = "Spec:ManaInc", label = "%Inc Mana from Tree", color = colorCodes.MANA, fmt = "d%%", displayStat = true }, { stat = "ManaUnreserved", label = "Unreserved Mana", fmt = "d", color = colorCodes.MANA, condFunc = function(v,o) return v < o.Mana end, compPercent = true, warnFunc = function(v) return v < 0 and "Your unreserved Mana is negative" end, displayStat = true }, - { stat = "ManaUnreservedPercent", label = "Unreserved Mana", fmt = "d%%", color = colorCodes.MANA, condFunc = function(v,o) return v < 100 end, displayStat = true }, + { stat = "ManaUnreservedPercent", label = " Unreserved Mana", fmt = "d%%", color = colorCodes.MANA, condFunc = function(v,o) return v < 100 end, displayStat = true }, { stat = "ManaRegenRecovery", label = "Mana Regen", fmt = ".1f", color = colorCodes.MANA, displayStat = true }, { stat = "ManaLeechGainRate", label = "Mana Leech/On Hit Rate", fmt = ".1f", color = colorCodes.MANA, compPercent = true, displayStat = true }, { stat = "ManaLeechGainPerHit", label = "Mana Leech/Gain per Hit", fmt = ".1f", color = colorCodes.MANA, compPercent = true, displayStat = true }, }, { { stat = "EnergyShield", label = "Energy Shield", fmt = "d", color = colorCodes.ES, compPercent = true, displayStat = true, minionDisplayStat = true }, - { stat = "EnergyShield", label = "Energy Shield", fmt = "d", color = colorCodes.ES, compPercent = true }, { stat = "EnergyShieldRecoveryCap", label = "Recoverable ES", color = colorCodes.ES, fmt = "d", condFunc = function(v,o) return o.CappingES end, displayStat = true }, { stat = "Spec:EnergyShieldInc", label = "%Inc ES from Tree", color = colorCodes.ES, fmt = "d%%", displayStat = true }, { stat = "EnergyShieldRegenRecovery", label = "Energy Shield Regen", color = colorCodes.ES, fmt = ".1f", displayStat = true, minionDisplayStat = true }, @@ -227,6 +226,29 @@ local extraSaveStats = {} local statCount = 0 local settingsStatList = main.displayStatList if settingsStatList then + -- first add all the missing stats that should be saved to extraSaveStats + for _, statGroup in ipairs(StatList) do + for _, stat in ipairs(statGroup) do + if stat.displayStat or stat.minionDisplayStat or stat.extraSaveStat then + local found = false + for _, statGroup2 in ipairs(settingsStatList) do + for _, stat2 in ipairs(statGroup2) do + if stat2.label == stat.label then + found = true + break + end + end + if found then + break + end + end + if not found then + t_insert(extraSaveStats, stat.stat) + end + end + end + end + -- then add all the stats from settings for _, statGroup in ipairs(settingsStatList) do if statCount > 0 then t_insert(displayStats, { }) @@ -241,9 +263,9 @@ if settingsStatList then for k, v in pairs(stat) do stat2[k] = v end + stat2.extraSaveStat = stat2.extraSaveStat or stat2.displayStat or stat2.minionDisplayStat stat2.displayStat = stat.displayStat stat2.minionDisplayStat = stat.minionDisplayStat - stat2.extraSaveStat = stat.extraSaveStat stat = stat2 found = true break @@ -253,6 +275,12 @@ if settingsStatList then break end end + if stat.extraSaveStat then + stat.extraSaveStat = nil + if not (stat.displayStat or stat.minionDisplayStat) then + t_insert(extraSaveStats, stat.stat) + end + end if stat.displayStat then stat.displayStat = nil t_insert(displayStats, stat) @@ -262,10 +290,6 @@ if settingsStatList then stat.minionDisplayStat = nil t_insert(minionDisplayStats, stat) end - if stat.extraSaveStat then - stat.extraSaveStat = nil - t_insert(extraSaveStats, stat.stat) - end end end end From 3b29cdb95e8a3f6ff3be30bdccb048bf98bf4902 Mon Sep 17 00:00:00 2001 From: Regisle Date: Mon, 3 Apr 2023 09:31:46 +0930 Subject: [PATCH 08/25] add new display stat --- src/Modules/BuildDisplayStats.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Modules/BuildDisplayStats.lua b/src/Modules/BuildDisplayStats.lua index 38c4efa6dc..50429a7755 100644 --- a/src/Modules/BuildDisplayStats.lua +++ b/src/Modules/BuildDisplayStats.lua @@ -65,6 +65,7 @@ local StatList = { { stat = "WithImpaleDPS", label = " Total DPS inc. Impale", fmt = ".1f", compPercent = true, flag = "impale", condFunc = function(v,o) return v ~= o.TotalDPS and (o.TotalDot or 0) == 0 and (o.IgniteDPS or 0) == 0 and (o.PoisonDPS or 0) == 0 and (o.BleedDPS or 0) == 0 end, minionDisplayStat = true }, { stat = "MirageDPS", label = "Total Mirage DPS", fmt = ".1f", compPercent = true, condFunc = function(v,o) return v > 0 end, displayStat = true }, { stat = "CullingDPS", label = "Culling DPS", fmt = ".1f", compPercent = true, condFunc = function(v,o) return (o.CullingDPS or 0) > 0 end, displayStat = true, minionDisplayStat = true }, + { stat = "ReservationDPS", label = "Reservation DPS", fmt = ".1f", compPercent = true, condFunc = function(v,o) return (o.ReservationDPS or 0) > 0 end, displayStat = true, minionDisplayStat = true }, { stat = "CombinedDPS", label = "Combined DPS", fmt = ".1f", compPercent = true, flag = "notAverage", condFunc = function(v,o) return v ~= ((o.TotalDPS or 0) + (o.TotalDot or 0)) and v ~= o.WithImpaleDPS and ( o.showTotalDotDPS or ( v ~= o.WithPoisonDPS and v ~= o.WithIgniteDPS and v ~= o.WithBleedDPS ) ) end, displayStat = true }, { stat = "CombinedDPS", label = " Combined DPS", fmt = ".1f", compPercent = true, condFunc = function(v,o) return v ~= ((o.TotalDPS or 0) + (o.TotalDot or 0)) and v ~= o.WithImpaleDPS and v ~= o.WithPoisonDPS and v ~= o.WithIgniteDPS and v ~= o.WithBleedDPS end, displayStat = true }, { stat = "CombinedAvg", label = "Combined Total Damage", fmt = ".1f", compPercent = true, flag = "showAverage", condFunc = function(v,o) return (v ~= o.AverageDamage and (o.TotalDot or 0) == 0) and (v ~= o.WithPoisonDPS or v ~= o.WithIgniteDPS or v ~= o.WithBleedDPS) end, displayStat = true }, From 15f1bd90567db8ae9fdd07924e059d7bcf6bd9bb Mon Sep 17 00:00:00 2001 From: Regisle Date: Wed, 13 Sep 2023 15:18:55 +0930 Subject: [PATCH 09/25] add explosion stats --- src/Modules/BuildDisplayStats.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Modules/BuildDisplayStats.lua b/src/Modules/BuildDisplayStats.lua index 50429a7755..c707e6cbb0 100644 --- a/src/Modules/BuildDisplayStats.lua +++ b/src/Modules/BuildDisplayStats.lua @@ -12,6 +12,7 @@ local StatList = { { stat = "AverageHit", label = "Average Hit", fmt = ".1f", compPercent = true, displayStat = true }, { stat = "PvpAverageHit", label = "PvP Average Hit", fmt = ".1f", compPercent = true, flag = "isPvP", displayStat = true }, { stat = "AverageDamage", label = "Average Damage", fmt = ".1f", compPercent = true, flag = "attack", displayStat = true }, + { stat = "AverageDamage", label = "Average Damage", fmt = ".1f", compPercent = true, flag = "monsterExplode", condFunc = function(v,o) return o.HitChance ~= 100 end, displayStat = true }, { stat = "AverageDamage", label = " Average Damage", fmt = ".1f", compPercent = true, minionDisplayStat = true }, { stat = "AverageBurstDamage", label = "Average Burst Damage", fmt = ".1f", compPercent = true, condFunc = function(v,o) return o.AverageBurstHits and o.AverageBurstHits > 1 and v > 0 end, displayStat = true }, { stat = "PvpAverageDamage", label = "PvP Average Damage", fmt = ".1f", compPercent = true, flag = "attackPvP", displayStat = true }, @@ -69,6 +70,8 @@ local StatList = { { stat = "CombinedDPS", label = "Combined DPS", fmt = ".1f", compPercent = true, flag = "notAverage", condFunc = function(v,o) return v ~= ((o.TotalDPS or 0) + (o.TotalDot or 0)) and v ~= o.WithImpaleDPS and ( o.showTotalDotDPS or ( v ~= o.WithPoisonDPS and v ~= o.WithIgniteDPS and v ~= o.WithBleedDPS ) ) end, displayStat = true }, { stat = "CombinedDPS", label = " Combined DPS", fmt = ".1f", compPercent = true, condFunc = function(v,o) return v ~= ((o.TotalDPS or 0) + (o.TotalDot or 0)) and v ~= o.WithImpaleDPS and v ~= o.WithPoisonDPS and v ~= o.WithIgniteDPS and v ~= o.WithBleedDPS end, displayStat = true }, { stat = "CombinedAvg", label = "Combined Total Damage", fmt = ".1f", compPercent = true, flag = "showAverage", condFunc = function(v,o) return (v ~= o.AverageDamage and (o.TotalDot or 0) == 0) and (v ~= o.WithPoisonDPS or v ~= o.WithIgniteDPS or v ~= o.WithBleedDPS) end, displayStat = true }, + { stat = "ExplodeChance", label = "Total Explode Chance", fmt = ".0f%%", displayStat = true }, + { stat = "CombinedAvgToMonsterLife", label = "Enemy Life Equivalent", fmt = ".1f%%", displayStat = true }, { stat = "Cooldown", label = "Skill Cooldown", fmt = ".3fs", lowerIsBetter = true, displayStat = true, minionDisplayStat = true }, { stat = "SealCooldown", label = "Seal Gain Frequency", fmt = ".2fs", lowerIsBetter = true, displayStat = true }, { stat = "SealMax", label = "Max Number of Seals", fmt = "d", displayStat = true }, From 357526a0558eecdfa8ee10cd84a52e1ab19ef73e Mon Sep 17 00:00:00 2001 From: Regisle Date: Wed, 13 Sep 2023 15:24:49 +0930 Subject: [PATCH 10/25] update recovery stats --- src/Modules/BuildDisplayStats.lua | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/src/Modules/BuildDisplayStats.lua b/src/Modules/BuildDisplayStats.lua index c707e6cbb0..6e174f0471 100644 --- a/src/Modules/BuildDisplayStats.lua +++ b/src/Modules/BuildDisplayStats.lua @@ -120,7 +120,9 @@ local StatList = { { stat = "LifeUnreserved", label = "Unreserved Life", fmt = "d", color = colorCodes.LIFE, condFunc = function(v,o) return v < o.Life end, compPercent = true, warnFunc = function(v) return v <= 0 and "Your unreserved Life is below 1" end, displayStat = true }, { stat = "LifeRecoverable", label = "Life Recoverable", fmt = "d", color = colorCodes.LIFE, condFunc = function(v,o) return v < o.LifeUnreserved end, displayStat = true }, { stat = "LifeUnreservedPercent", label = "Unreserved Life", fmt = "d%%", color = colorCodes.LIFE, condFunc = function(v,o) return v < 100 end, displayStat = true }, - { stat = "LifeRegenRecovery", label = "Life Regen", fmt = ".1f", color = colorCodes.LIFE, displayStat = true, minionDisplayStat = true }, + { stat = "LifeRegenRecovery", label = "Life Regen", fmt = ".1f", color = colorCodes.LIFE, condFunc = function(v,o) return o.LifeRecovery <= 0 and o.LifeRegenRecovery ~= 0 end, displayStat = true }, + { stat = "LifeRegenRecovery", label = "Life Recovery", fmt = ".1f", color = colorCodes.LIFE, condFunc = function(v,o) return o.LifeRecovery > 0 and o.LifeRegenRecovery ~= 0 end, displayStat = true }, + { stat = "LifeRegenRecovery", label = " Life Recovery", fmt = ".1f", color = colorCodes.LIFE, minionDisplayStat = true }, { stat = "LifeLeechGainRate", label = "Life Leech/On Hit Rate", fmt = ".1f", color = colorCodes.LIFE, compPercent = true, displayStat = true, minionDisplayStat = true }, { stat = "LifeLeechGainPerHit", label = "Life Leech/Gain per Hit", fmt = ".1f", color = colorCodes.LIFE, compPercent = true, displayStat = true }, }, { @@ -128,14 +130,17 @@ local StatList = { { stat = "Spec:ManaInc", label = "%Inc Mana from Tree", color = colorCodes.MANA, fmt = "d%%", displayStat = true }, { stat = "ManaUnreserved", label = "Unreserved Mana", fmt = "d", color = colorCodes.MANA, condFunc = function(v,o) return v < o.Mana end, compPercent = true, warnFunc = function(v) return v < 0 and "Your unreserved Mana is negative" end, displayStat = true }, { stat = "ManaUnreservedPercent", label = " Unreserved Mana", fmt = "d%%", color = colorCodes.MANA, condFunc = function(v,o) return v < 100 end, displayStat = true }, - { stat = "ManaRegenRecovery", label = "Mana Regen", fmt = ".1f", color = colorCodes.MANA, displayStat = true }, + { stat = "ManaRegenRecovery", label = "Mana Regen", fmt = ".1f", color = colorCodes.MANA, condFunc = function(v,o) return o.ManaRecovery <= 0 and o.ManaRegenRecovery ~= 0 end, displayStat = true }, + { stat = "ManaRegenRecovery", label = "Mana Recovery", fmt = ".1f", color = colorCodes.MANA, condFunc = function(v,o) return o.ManaRecovery > 0 and o.ManaRegenRecovery ~= 0 end, displayStat = true }, { stat = "ManaLeechGainRate", label = "Mana Leech/On Hit Rate", fmt = ".1f", color = colorCodes.MANA, compPercent = true, displayStat = true }, { stat = "ManaLeechGainPerHit", label = "Mana Leech/Gain per Hit", fmt = ".1f", color = colorCodes.MANA, compPercent = true, displayStat = true }, }, { { stat = "EnergyShield", label = "Energy Shield", fmt = "d", color = colorCodes.ES, compPercent = true, displayStat = true, minionDisplayStat = true }, { stat = "EnergyShieldRecoveryCap", label = "Recoverable ES", color = colorCodes.ES, fmt = "d", condFunc = function(v,o) return o.CappingES end, displayStat = true }, { stat = "Spec:EnergyShieldInc", label = "%Inc ES from Tree", color = colorCodes.ES, fmt = "d%%", displayStat = true }, - { stat = "EnergyShieldRegenRecovery", label = "Energy Shield Regen", color = colorCodes.ES, fmt = ".1f", displayStat = true, minionDisplayStat = true }, + { stat = "EnergyShieldRegenRecovery", label = "ES Regen", color = colorCodes.ES, fmt = ".1f", condFunc = function(v,o) return o.EnergyShieldRecovery <= 0 and o.EnergyShieldRegenRecovery ~= 0 end, displayStat = true }, + { stat = "EnergyShieldRegenRecovery", label = "ES Recovery", color = colorCodes.ES, fmt = ".1f", condFunc = function(v,o) return o.EnergyShieldRecovery > 0 and o.EnergyShieldRegenRecovery ~= 0 end, displayStat = true }, + { stat = "EnergyShieldRegenRecovery", label = " ES Recovery", color = colorCodes.ES, fmt = ".1f", minionDisplayStat = true }, { stat = "EnergyShieldLeechGainRate", label = "ES Leech/On Hit Rate", color = colorCodes.ES, fmt = ".1f", compPercent = true, displayStat = true, minionDisplayStat = true }, { stat = "EnergyShieldLeechGainPerHit", label = "ES Leech/Gain per Hit", color = colorCodes.ES, fmt = ".1f", compPercent = true, displayStat = true }, }, { @@ -145,10 +150,10 @@ local StatList = { { stat = "RageRegenRecovery", label = "Rage Regen", fmt = ".1f", color = colorCodes.RAGE, compPercent = true, displayStat = true }, }, { { stat = "TotalDegen", label = "Total Degen", fmt = ".1f", lowerIsBetter = true, displayStat = true }, - { stat = "TotalNetRegen", label = "Total Net Regen", fmt = "+.1f", displayStat = true }, - { stat = "NetLifeRegen", label = "Net Life Regen", fmt = "+.1f", color = colorCodes.LIFE, displayStat = true }, - { stat = "NetManaRegen", label = "Net Mana Regen", fmt = "+.1f", color = colorCodes.MANA, displayStat = true }, - { stat = "NetEnergyShieldRegen", label = "Net Energy Shield Regen", fmt = "+.1f", color = colorCodes.ES, displayStat = true }, + { stat = "TotalNetRegen", label = "Total Net Recovery", fmt = "+.1f", displayStat = true }, + { stat = "NetLifeRegen", label = "Net Life Recovery", fmt = "+.1f", color = colorCodes.LIFE, displayStat = true }, + { stat = "NetManaRegen", label = "Net Mana Recovery", fmt = "+.1f", color = colorCodes.MANA, displayStat = true }, + { stat = "NetEnergyShieldRegen", label = "Net ES Recovery", fmt = "+.1f", color = colorCodes.ES, displayStat = true }, }, { { stat = "Evasion", label = "Evasion rating", fmt = "d", color = colorCodes.EVASION, compPercent = true, displayStat = true }, { stat = "Spec:EvasionInc", label = "%Inc Evasion from Tree", color = colorCodes.EVASION, fmt = "d%%", displayStat = true }, From 503544b83b1639c8976c7ed3ab694e52491691e3 Mon Sep 17 00:00:00 2001 From: Regisle Date: Wed, 13 Sep 2023 15:30:29 +0930 Subject: [PATCH 11/25] add channel time --- src/Modules/BuildDisplayStats.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Modules/BuildDisplayStats.lua b/src/Modules/BuildDisplayStats.lua index 6e174f0471..da2f894c52 100644 --- a/src/Modules/BuildDisplayStats.lua +++ b/src/Modules/BuildDisplayStats.lua @@ -24,6 +24,7 @@ local StatList = { { stat = "Speed", label = "Effective Trigger Rate", fmt = ".2f", compPercent = true, condFunc = function(v,o) return (o.TriggerTime or 0) ~= 0 and o.ServerTriggerRate ~= o.Speed end, displayStat = true, minionDisplayStat = true }, { stat = "WarcryCastTime", label = "Cast Time", fmt = ".2fs", compPercent = true, lowerIsBetter = true, flag = "warcry", displayStat = true }, { stat = "HitSpeed", label = " Hit Rate", fmt = ".2f", compPercent = true, condFunc = function(v,o) return not o.TriggerTime end, displayStat = true }, + { stat = "HitTime", label = "Channel Time", fmt = ".2fs", compPercent = true, condFunc = function(v,o) return not o.TriggerTime end, displayStat = true }, { stat = "TrapThrowingTime", label = "Trap Throwing Time", fmt = ".2fs", compPercent = true, lowerIsBetter = true, displayStat = true }, { stat = "TrapCooldown", label = "Trap Cooldown", fmt = ".3fs", lowerIsBetter = true, displayStat = true }, { stat = "MineLayingTime", label = "Mine Throwing Time", fmt = ".2fs", compPercent = true, lowerIsBetter = true, displayStat = true }, From 1d132a2552dce12712ce432d98b3b524676faa9a Mon Sep 17 00:00:00 2001 From: Regisle Date: Wed, 13 Sep 2023 15:32:24 +0930 Subject: [PATCH 12/25] add channel flag --- src/Modules/BuildDisplayStats.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Modules/BuildDisplayStats.lua b/src/Modules/BuildDisplayStats.lua index da2f894c52..db73541600 100644 --- a/src/Modules/BuildDisplayStats.lua +++ b/src/Modules/BuildDisplayStats.lua @@ -24,7 +24,7 @@ local StatList = { { stat = "Speed", label = "Effective Trigger Rate", fmt = ".2f", compPercent = true, condFunc = function(v,o) return (o.TriggerTime or 0) ~= 0 and o.ServerTriggerRate ~= o.Speed end, displayStat = true, minionDisplayStat = true }, { stat = "WarcryCastTime", label = "Cast Time", fmt = ".2fs", compPercent = true, lowerIsBetter = true, flag = "warcry", displayStat = true }, { stat = "HitSpeed", label = " Hit Rate", fmt = ".2f", compPercent = true, condFunc = function(v,o) return not o.TriggerTime end, displayStat = true }, - { stat = "HitTime", label = "Channel Time", fmt = ".2fs", compPercent = true, condFunc = function(v,o) return not o.TriggerTime end, displayStat = true }, + { stat = "HitTime", label = "Channel Time", fmt = ".2fs", compPercent = true, flag = "channelRelease", condFunc = function(v,o) return not o.TriggerTime end, displayStat = true }, { stat = "TrapThrowingTime", label = "Trap Throwing Time", fmt = ".2fs", compPercent = true, lowerIsBetter = true, displayStat = true }, { stat = "TrapCooldown", label = "Trap Cooldown", fmt = ".3fs", lowerIsBetter = true, displayStat = true }, { stat = "MineLayingTime", label = "Mine Throwing Time", fmt = ".2fs", compPercent = true, lowerIsBetter = true, displayStat = true }, From 3390eead3762ce9fcef79253fcc1637bab94ee8a Mon Sep 17 00:00:00 2001 From: Regisle Date: Wed, 13 Sep 2023 15:34:55 +0930 Subject: [PATCH 13/25] add lower is better to channel time --- src/Modules/BuildDisplayStats.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Modules/BuildDisplayStats.lua b/src/Modules/BuildDisplayStats.lua index db73541600..ccbe3aaef2 100644 --- a/src/Modules/BuildDisplayStats.lua +++ b/src/Modules/BuildDisplayStats.lua @@ -24,7 +24,7 @@ local StatList = { { stat = "Speed", label = "Effective Trigger Rate", fmt = ".2f", compPercent = true, condFunc = function(v,o) return (o.TriggerTime or 0) ~= 0 and o.ServerTriggerRate ~= o.Speed end, displayStat = true, minionDisplayStat = true }, { stat = "WarcryCastTime", label = "Cast Time", fmt = ".2fs", compPercent = true, lowerIsBetter = true, flag = "warcry", displayStat = true }, { stat = "HitSpeed", label = " Hit Rate", fmt = ".2f", compPercent = true, condFunc = function(v,o) return not o.TriggerTime end, displayStat = true }, - { stat = "HitTime", label = "Channel Time", fmt = ".2fs", compPercent = true, flag = "channelRelease", condFunc = function(v,o) return not o.TriggerTime end, displayStat = true }, + { stat = "HitTime", label = "Channel Time", fmt = ".2fs", compPercent = true, flag = "channelRelease", lowerIsBetter = true, condFunc = function(v,o) return not o.TriggerTime end, displayStat = true }, { stat = "TrapThrowingTime", label = "Trap Throwing Time", fmt = ".2fs", compPercent = true, lowerIsBetter = true, displayStat = true }, { stat = "TrapCooldown", label = "Trap Cooldown", fmt = ".3fs", lowerIsBetter = true, displayStat = true }, { stat = "MineLayingTime", label = "Mine Throwing Time", fmt = ".2fs", compPercent = true, lowerIsBetter = true, displayStat = true }, From 7dc808060a604d06f80737ff7bc0cd4d71623967 Mon Sep 17 00:00:00 2001 From: Regisle Date: Wed, 13 Sep 2023 15:38:43 +0930 Subject: [PATCH 14/25] add corrupting blood dps --- src/Modules/BuildDisplayStats.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Modules/BuildDisplayStats.lua b/src/Modules/BuildDisplayStats.lua index ccbe3aaef2..96fa7922ea 100644 --- a/src/Modules/BuildDisplayStats.lua +++ b/src/Modules/BuildDisplayStats.lua @@ -42,6 +42,7 @@ local StatList = { { stat = "WithDotDPS", label = "Total DPS inc. DoT", fmt = ".1f", compPercent = true, flag = "notAverage", condFunc = function(v,o) return v ~= o.TotalDPS and (o.PoisonDPS or 0) == 0 and (o.IgniteDPS or 0) == 0 and (o.ImpaleDPS or 0) == 0 and (o.BleedDPS or 0) == 0 end, displayStat = true }, { stat = "WithDotDPS", label = " Total DPS inc. DoT", fmt = ".1f", compPercent = true, condFunc = function(v,o) return v ~= o.TotalDPS and (o.PoisonDPS or 0) == 0 and (o.IgniteDPS or 0) == 0 and (o.ImpaleDPS or 0) == 0 and (o.BleedDPS or 0) == 0 end, minionDisplayStat = true }, { stat = "BleedDPS", label = "Bleed DPS", fmt = ".1f", compPercent = true, warnFunc = function(v) return v >= data.misc.DotDpsCap and "Bleed DPS exceeds in game limit" end, displayStat = true, minionDisplayStat = true }, + { stat = "CorruptingBloodDPS", label = "Corrupting Blood DPS", fmt = ".1f", compPercent = true, warnFunc = function(v,o) return v >= data.misc.DotDpsCap and "Corrupting Blood DPS exceeds in game limit" end, displayStat = true }, { stat = "BleedDamage", label = "Total Damage per Bleed", fmt = ".1f", compPercent = true, flag = "showAverage", displayStat = true }, { stat = "WithBleedDPS", label = "Total DPS inc. Bleed", fmt = ".1f", compPercent = true, flag = "notAverage", condFunc = function(v,o) return v ~= o.TotalDPS and (o.TotalDot or 0) == 0 and (o.PoisonDPS or 0) == 0 and (o.ImpaleDPS or 0) == 0 and (o.IgniteDPS or 0) == 0 end, displayStat = true }, { stat = "WithBleedDPS", label = " Total DPS inc. Bleed", fmt = ".1f", compPercent = true, condFunc = function(v,o) return v ~= o.TotalDPS and (o.TotalDot or 0) == 0 and (o.PoisonDPS or 0) == 0 and (o.ImpaleDPS or 0) == 0 and (o.IgniteDPS or 0) == 0 end, minionDisplayStat = true }, @@ -57,7 +58,7 @@ local StatList = { { stat = "WithPoisonDPS", label = "Total DPS inc. Poison", fmt = ".1f", compPercent = true, flag = "poison", flag = "notAverage", condFunc = function(v,o) return v ~= o.TotalDPS and (o.TotalDot or 0) == 0 and (o.IgniteDPS or 0) == 0 and (o.ImpaleDPS or 0) == 0 and (o.BleedDPS or 0) == 0 end, displayStat = true }, { stat = "WithPoisonDPS", label = " Total DPS inc. Poison", fmt = ".1f", compPercent = true, condFunc = function(v,o) return v ~= o.TotalDPS and (o.TotalDot or 0) == 0 and (o.IgniteDPS or 0) == 0 and (o.ImpaleDPS or 0) == 0 and (o.BleedDPS or 0) == 0 end, minionDisplayStat = true }, { stat = "DecayDPS", label = "Decay DPS", fmt = ".1f", compPercent = true, displayStat = true, minionDisplayStat = true }, - { stat = "TotalDotDPS", label = "Total DoT DPS", fmt = ".1f", compPercent = true, condFunc = function(v,o) return o.showTotalDotDPS or ( v ~= o.TotalDot and v ~= o.TotalPoisonDPS and v ~= o.CausticGroundDPS and v ~= (o.TotalIgniteDPS or o.IgniteDPS) and v ~= o.BurningGroundDPS and v ~= o.BleedDPS ) end, warnFunc = function(v) return v >= data.misc.DotDpsCap and "DoT DPS exceeds in game limit" end, displayStat = true }, + { stat = "TotalDotDPS", label = "Total DoT DPS", fmt = ".1f", compPercent = true, condFunc = function(v,o) return o.showTotalDotDPS or ( v ~= o.TotalDot and v ~= o.TotalPoisonDPS and v ~= o.CausticGroundDPS and v ~= (o.TotalIgniteDPS or o.IgniteDPS) and v ~= o.BurningGroundDPS and v ~= o.BleedDPS and v~= o.CorruptingBloodDPS ) end, warnFunc = function(v) return v >= data.misc.DotDpsCap and "DoT DPS exceeds in game limit" end, displayStat = true }, { stat = "TotalDotDPS", label = " Total DoT DPS", fmt = ".1f", compPercent = true, condFunc = function(v,o) return v ~= o.TotalDot and v ~= o.ImpaleDPS and v ~= o.TotalPoisonDPS and v ~= (o.TotalIgniteDPS or o.IgniteDPS) and v ~= o.BleedDPS end, warnFunc = function(v) return v >= data.misc.DotDpsCap and "DoT DPS exceeds in game limit" end, minionDisplayStat = true }, { stat = "ImpaleDPS", label = "Impale Damage", fmt = ".1f", compPercent = true, flag = "impale", flag = "showAverage", displayStat = true }, { stat = "WithImpaleDPS", label = "Damage inc. Impale", fmt = ".1f", compPercent = true, flag = "impale", flag = "showAverage", condFunc = function(v,o) return v ~= o.TotalDPS and (o.TotalDot or 0) == 0 and (o.IgniteDPS or 0) == 0 and (o.PoisonDPS or 0) == 0 and (o.BleedDPS or 0) == 0 end , displayStat = true }, From 41eb30c45c5ff1410c79b963a81452b30324c2b3 Mon Sep 17 00:00:00 2001 From: Regisle Date: Wed, 13 Sep 2023 15:46:42 +0930 Subject: [PATCH 15/25] update trigger display --- src/Modules/BuildDisplayStats.lua | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Modules/BuildDisplayStats.lua b/src/Modules/BuildDisplayStats.lua index 96fa7922ea..e663129985 100644 --- a/src/Modules/BuildDisplayStats.lua +++ b/src/Modules/BuildDisplayStats.lua @@ -20,8 +20,7 @@ local StatList = { { stat = "Speed", label = "Cast Rate", fmt = ".2f", compPercent = true, flag = "spell", condFunc = function(v,o) return v > 0 and (o.TriggerTime or 0) == 0 end, displayStat = true }, { stat = "Speed", label = "Attack/Cast Rate", fmt = ".2f", compPercent = true, condFunc = function(v,o) return v > 0 and (o.TriggerTime or 0) == 0 end, minionDisplayStat = true }, { stat = "HitSpeed", label = "Hit Rate", fmt = ".2f", minionDisplayStat = true }, - { stat = "ServerTriggerRate", label = "Trigger Rate", fmt = ".2f", compPercent = true, condFunc = function(v,o) return (o.TriggerTime or 0) ~= 0 end, displayStat = true, minionDisplayStat = true }, - { stat = "Speed", label = "Effective Trigger Rate", fmt = ".2f", compPercent = true, condFunc = function(v,o) return (o.TriggerTime or 0) ~= 0 and o.ServerTriggerRate ~= o.Speed end, displayStat = true, minionDisplayStat = true }, + { stat = "Speed", label = "Effective Trigger Rate", fmt = ".2f", compPercent = true, condFunc = function(v,o) return (o.TriggerTime or 0) ~= 0 end, displayStat = true, minionDisplayStat = true }, { stat = "WarcryCastTime", label = "Cast Time", fmt = ".2fs", compPercent = true, lowerIsBetter = true, flag = "warcry", displayStat = true }, { stat = "HitSpeed", label = " Hit Rate", fmt = ".2f", compPercent = true, condFunc = function(v,o) return not o.TriggerTime end, displayStat = true }, { stat = "HitTime", label = "Channel Time", fmt = ".2fs", compPercent = true, flag = "channelRelease", lowerIsBetter = true, condFunc = function(v,o) return not o.TriggerTime end, displayStat = true }, From 0ea51985db09be9bd1889d072799da6df11ce4b1 Mon Sep 17 00:00:00 2001 From: Regisle Date: Wed, 13 Sep 2023 15:48:28 +0930 Subject: [PATCH 16/25] add trigger channel time --- src/Modules/BuildDisplayStats.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Modules/BuildDisplayStats.lua b/src/Modules/BuildDisplayStats.lua index e663129985..a02b7d5f6d 100644 --- a/src/Modules/BuildDisplayStats.lua +++ b/src/Modules/BuildDisplayStats.lua @@ -24,6 +24,7 @@ local StatList = { { stat = "WarcryCastTime", label = "Cast Time", fmt = ".2fs", compPercent = true, lowerIsBetter = true, flag = "warcry", displayStat = true }, { stat = "HitSpeed", label = " Hit Rate", fmt = ".2f", compPercent = true, condFunc = function(v,o) return not o.TriggerTime end, displayStat = true }, { stat = "HitTime", label = "Channel Time", fmt = ".2fs", compPercent = true, flag = "channelRelease", lowerIsBetter = true, condFunc = function(v,o) return not o.TriggerTime end, displayStat = true }, + { stat = "ChannelTimeToTrigger", label = " Channel Time", fmt = ".2fs", compPercent = true, lowerIsBetter = true, displayStat = true }, { stat = "TrapThrowingTime", label = "Trap Throwing Time", fmt = ".2fs", compPercent = true, lowerIsBetter = true, displayStat = true }, { stat = "TrapCooldown", label = "Trap Cooldown", fmt = ".3fs", lowerIsBetter = true, displayStat = true }, { stat = "MineLayingTime", label = "Mine Throwing Time", fmt = ".2fs", compPercent = true, lowerIsBetter = true, displayStat = true }, From 1ce7dcf49e308c8bcd40eb1a8689633138a7c7cb Mon Sep 17 00:00:00 2001 From: Regisle Date: Wed, 13 Sep 2023 15:51:13 +0930 Subject: [PATCH 17/25] fix totem trigger --- src/Modules/BuildDisplayStats.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Modules/BuildDisplayStats.lua b/src/Modules/BuildDisplayStats.lua index a02b7d5f6d..3701632d91 100644 --- a/src/Modules/BuildDisplayStats.lua +++ b/src/Modules/BuildDisplayStats.lua @@ -28,7 +28,7 @@ local StatList = { { stat = "TrapThrowingTime", label = "Trap Throwing Time", fmt = ".2fs", compPercent = true, lowerIsBetter = true, displayStat = true }, { stat = "TrapCooldown", label = "Trap Cooldown", fmt = ".3fs", lowerIsBetter = true, displayStat = true }, { stat = "MineLayingTime", label = "Mine Throwing Time", fmt = ".2fs", compPercent = true, lowerIsBetter = true, displayStat = true }, - { stat = "TotemPlacementTime", label = "Totem Placement Time", fmt = ".2fs", compPercent = true, lowerIsBetter = true, displayStat = true }, + { stat = "TotemPlacementTime", label = "Totem Placement Time", fmt = ".2fs", compPercent = true, lowerIsBetter = true, condFunc = function(v,o) return not o.TriggerTime end, displayStat = true }, { stat = "PreEffectiveCritChance", label = "Crit Chance", fmt = ".2f%%", displayStat = true }, { stat = "CritChance", label = "Effective Crit Chance", fmt = ".2f%%", condFunc = function(v,o) return v ~= o.PreEffectiveCritChance end, displayStat = true }, { stat = "CritMultiplier", label = "Crit Multiplier", fmt = "d%%", pc = true, condFunc = function(v,o) return (o.CritChance or 0) > 0 end, displayStat = true }, From 795515ba23441b2354ee737c79f9dc3d2f78e222 Mon Sep 17 00:00:00 2001 From: Regisle Date: Wed, 13 Sep 2023 15:53:30 +0930 Subject: [PATCH 18/25] update aoe to meters --- src/Modules/BuildDisplayStats.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Modules/BuildDisplayStats.lua b/src/Modules/BuildDisplayStats.lua index 3701632d91..01cccfb684 100644 --- a/src/Modules/BuildDisplayStats.lua +++ b/src/Modules/BuildDisplayStats.lua @@ -78,8 +78,8 @@ local StatList = { { stat = "SealCooldown", label = "Seal Gain Frequency", fmt = ".2fs", lowerIsBetter = true, displayStat = true }, { stat = "SealMax", label = "Max Number of Seals", fmt = "d", displayStat = true }, { stat = "TimeMaxSeals", label = "Time to Gain Max Seals", fmt = ".2fs", lowerIsBetter = true, displayStat = true }, - { stat = "AreaOfEffectRadius", label = "AoE Radius", fmt = "d", displayStat = true }, - { stat = "BrandAttachmentRange", label = "Attachment Range", fmt = "d", flag = "brand", displayStat = true }, + { stat = "AreaOfEffectRadiusMetres", label = "AoE Radius", fmt = ".1fm", displayStat = true }, + { stat = "BrandAttachmentRangeMetres", label = "Attachment Range", fmt = ".1fm", flag = "brand", displayStat = true }, { stat = "BrandTicks", label = "Activations per Brand", fmt = "d", flag = "brand", displayStat = true }, { stat = "ManaCost", label = "Mana Cost", fmt = "d", color = colorCodes.MANA, pool = "ManaUnreserved", compPercent = true, lowerIsBetter = true, condFunc = function(v,o) return o.ManaHasCost end, displayStat = true }, { stat = "ManaPercentCost", label = " Mana Cost", fmt = "d%%", color = colorCodes.MANA, pool = "ManaUnreservedPercent", compPercent = true, lowerIsBetter = true, condFunc = function(v,o) return o.ManaPercentHasCost end, displayStat = true }, From c3418d569142622566092e6b1e04865922af12e5 Mon Sep 17 00:00:00 2001 From: Regisle Date: Wed, 13 Sep 2023 15:56:01 +0930 Subject: [PATCH 19/25] fix fire resistance --- src/Modules/BuildDisplayStats.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Modules/BuildDisplayStats.lua b/src/Modules/BuildDisplayStats.lua index 01cccfb684..08d43607e3 100644 --- a/src/Modules/BuildDisplayStats.lua +++ b/src/Modules/BuildDisplayStats.lua @@ -173,7 +173,7 @@ local StatList = { { stat = "SpellDodgeChance", label = "Spell Dodge Chance", fmt = "d%%", overCapStat = "SpellDodgeChanceOverCap", displayStat = true }, { stat = "SpellSuppressionChance", label = "Spell Suppression Chance", fmt = "d%%", overCapStat = "SpellSuppressionChanceOverCap", displayStat = true }, }, { - { stat = "FireResist", label = "Fire Resistance", fmt = "d%%", color = colorCodes.FIRE, condFunc = function() return true end, overCapStat = "FireResistOverCap"}, + { stat = "FireResist", label = "Fire Resistance", fmt = "d%%", color = colorCodes.FIRE, condFunc = function() return true end, overCapStat = "FireResistOverCap", displayStat = true}, { stat = "FireResistOverCap", label = "Fire Res. Over Max", fmt = "d%%", hideStat = true, displayStat = true }, { stat = "ColdResist", label = "Cold Resistance", fmt = "d%%", color = colorCodes.COLD, condFunc = function() return true end, overCapStat = "ColdResistOverCap", displayStat = true }, { stat = "ColdResistOverCap", label = "Cold Res. Over Max", fmt = "d%%", hideStat = true, displayStat = true }, From 72d76b8626584df31f9b60bf78faf9dec250dd0f Mon Sep 17 00:00:00 2001 From: Regisle Date: Wed, 13 Sep 2023 16:45:11 +0930 Subject: [PATCH 20/25] dont strip display stat on fully custom display stats --- src/Modules/BuildDisplayStats.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Modules/BuildDisplayStats.lua b/src/Modules/BuildDisplayStats.lua index 08d43607e3..16d37de19c 100644 --- a/src/Modules/BuildDisplayStats.lua +++ b/src/Modules/BuildDisplayStats.lua @@ -287,18 +287,18 @@ if settingsStatList then end end if stat.extraSaveStat then - stat.extraSaveStat = nil + stat.extraSaveStat = (not found) and stat.extraSaveStat or nil if not (stat.displayStat or stat.minionDisplayStat) then t_insert(extraSaveStats, stat.stat) end end if stat.displayStat then - stat.displayStat = nil + stat.displayStat = (not found) and stat.displayStat or nil t_insert(displayStats, stat) statCount = statCount + 1 end if stat.minionDisplayStat then - stat.minionDisplayStat = nil + stat.minionDisplayStat = (not found) and stat.minionDisplayStat or nil t_insert(minionDisplayStats, stat) end end From e8460782fbd662ccf45c3132d9400cb59d8a0c60 Mon Sep 17 00:00:00 2001 From: Regisle Date: Wed, 13 Sep 2023 16:48:50 +0930 Subject: [PATCH 21/25] fix explode mod label --- src/Modules/BuildDisplayStats.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Modules/BuildDisplayStats.lua b/src/Modules/BuildDisplayStats.lua index 16d37de19c..bd170232d2 100644 --- a/src/Modules/BuildDisplayStats.lua +++ b/src/Modules/BuildDisplayStats.lua @@ -12,8 +12,8 @@ local StatList = { { stat = "AverageHit", label = "Average Hit", fmt = ".1f", compPercent = true, displayStat = true }, { stat = "PvpAverageHit", label = "PvP Average Hit", fmt = ".1f", compPercent = true, flag = "isPvP", displayStat = true }, { stat = "AverageDamage", label = "Average Damage", fmt = ".1f", compPercent = true, flag = "attack", displayStat = true }, - { stat = "AverageDamage", label = "Average Damage", fmt = ".1f", compPercent = true, flag = "monsterExplode", condFunc = function(v,o) return o.HitChance ~= 100 end, displayStat = true }, - { stat = "AverageDamage", label = " Average Damage", fmt = ".1f", compPercent = true, minionDisplayStat = true }, + { stat = "AverageDamage", label = " Average Damage", fmt = ".1f", compPercent = true, flag = "monsterExplode", condFunc = function(v,o) return o.HitChance ~= 100 end, displayStat = true }, + { stat = "AverageDamage", label = " Average Damage", fmt = ".1f", compPercent = true, minionDisplayStat = true }, { stat = "AverageBurstDamage", label = "Average Burst Damage", fmt = ".1f", compPercent = true, condFunc = function(v,o) return o.AverageBurstHits and o.AverageBurstHits > 1 and v > 0 end, displayStat = true }, { stat = "PvpAverageDamage", label = "PvP Average Damage", fmt = ".1f", compPercent = true, flag = "attackPvP", displayStat = true }, { stat = "Speed", label = "Attack Rate", fmt = ".2f", compPercent = true, flag = "attack", condFunc = function(v,o) return v > 0 and (o.TriggerTime or 0) == 0 end, displayStat = true }, From eb52a0dcc6ce96679a014f092f580e90ac986421 Mon Sep 17 00:00:00 2001 From: Regisle Date: Wed, 13 Sep 2023 17:29:34 +0930 Subject: [PATCH 22/25] fix wrong display --- src/Modules/BuildDisplayStats.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Modules/BuildDisplayStats.lua b/src/Modules/BuildDisplayStats.lua index bd170232d2..8d9a96db34 100644 --- a/src/Modules/BuildDisplayStats.lua +++ b/src/Modules/BuildDisplayStats.lua @@ -70,7 +70,7 @@ local StatList = { { stat = "CullingDPS", label = "Culling DPS", fmt = ".1f", compPercent = true, condFunc = function(v,o) return (o.CullingDPS or 0) > 0 end, displayStat = true, minionDisplayStat = true }, { stat = "ReservationDPS", label = "Reservation DPS", fmt = ".1f", compPercent = true, condFunc = function(v,o) return (o.ReservationDPS or 0) > 0 end, displayStat = true, minionDisplayStat = true }, { stat = "CombinedDPS", label = "Combined DPS", fmt = ".1f", compPercent = true, flag = "notAverage", condFunc = function(v,o) return v ~= ((o.TotalDPS or 0) + (o.TotalDot or 0)) and v ~= o.WithImpaleDPS and ( o.showTotalDotDPS or ( v ~= o.WithPoisonDPS and v ~= o.WithIgniteDPS and v ~= o.WithBleedDPS ) ) end, displayStat = true }, - { stat = "CombinedDPS", label = " Combined DPS", fmt = ".1f", compPercent = true, condFunc = function(v,o) return v ~= ((o.TotalDPS or 0) + (o.TotalDot or 0)) and v ~= o.WithImpaleDPS and v ~= o.WithPoisonDPS and v ~= o.WithIgniteDPS and v ~= o.WithBleedDPS end, displayStat = true }, + { stat = "CombinedDPS", label = " Combined DPS", fmt = ".1f", compPercent = true, condFunc = function(v,o) return v ~= ((o.TotalDPS or 0) + (o.TotalDot or 0)) and v ~= o.WithImpaleDPS and v ~= o.WithPoisonDPS and v ~= o.WithIgniteDPS and v ~= o.WithBleedDPS end, minionDisplayStat = true }, { stat = "CombinedAvg", label = "Combined Total Damage", fmt = ".1f", compPercent = true, flag = "showAverage", condFunc = function(v,o) return (v ~= o.AverageDamage and (o.TotalDot or 0) == 0) and (v ~= o.WithPoisonDPS or v ~= o.WithIgniteDPS or v ~= o.WithBleedDPS) end, displayStat = true }, { stat = "ExplodeChance", label = "Total Explode Chance", fmt = ".0f%%", displayStat = true }, { stat = "CombinedAvgToMonsterLife", label = "Enemy Life Equivalent", fmt = ".1f%%", displayStat = true }, From 8d639f6bbbc5072273727e56f7ce462a6f121359 Mon Sep 17 00:00:00 2001 From: Regisle Date: Thu, 28 Mar 2024 12:38:22 +1030 Subject: [PATCH 23/25] fix merge conflict --- src/Modules/BuildDisplayStats.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Modules/BuildDisplayStats.lua b/src/Modules/BuildDisplayStats.lua index 8d9a96db34..a1fd2467a6 100644 --- a/src/Modules/BuildDisplayStats.lua +++ b/src/Modules/BuildDisplayStats.lua @@ -171,7 +171,7 @@ local StatList = { { stat = "SpellBlockChance", label = "Spell Block Chance", fmt = "d%%", overCapStat = "SpellBlockChanceOverCap", displayStat = true }, { stat = "AttackDodgeChance", label = "Attack Dodge Chance", fmt = "d%%", overCapStat = "AttackDodgeChanceOverCap", displayStat = true }, { stat = "SpellDodgeChance", label = "Spell Dodge Chance", fmt = "d%%", overCapStat = "SpellDodgeChanceOverCap", displayStat = true }, - { stat = "SpellSuppressionChance", label = "Spell Suppression Chance", fmt = "d%%", overCapStat = "SpellSuppressionChanceOverCap", displayStat = true }, + { stat = "EffectiveSpellSuppressionChance", label = "Spell Suppression Chance", fmt = "d%%", overCapStat = "SpellSuppressionChanceOverCap", displayStat = true }, }, { { stat = "FireResist", label = "Fire Resistance", fmt = "d%%", color = colorCodes.FIRE, condFunc = function() return true end, overCapStat = "FireResistOverCap", displayStat = true}, { stat = "FireResistOverCap", label = "Fire Res. Over Max", fmt = "d%%", hideStat = true, displayStat = true }, From 774d67aedf4160b234fe3f83e8f2a32dee8e54b7 Mon Sep 17 00:00:00 2001 From: Regisle Date: Thu, 28 Mar 2024 12:42:53 +1030 Subject: [PATCH 24/25] fix merge conflict --- src/Modules/BuildDisplayStats.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Modules/BuildDisplayStats.lua b/src/Modules/BuildDisplayStats.lua index a1fd2467a6..6ea6176d88 100644 --- a/src/Modules/BuildDisplayStats.lua +++ b/src/Modules/BuildDisplayStats.lua @@ -116,6 +116,8 @@ local StatList = { { stat = "LightningMaximumHitTaken", label = "Lightning Max Hit", fmt = ".0f", color = colorCodes.LIGHTNING, compPercent = true, condFunc = function(v,o) return o.LightningMaximumHitTaken ~= o.ColdMaximumHitTaken or o.LightningMaximumHitTaken ~= o.FireMaximumHitTaken end, displayStat = true }, { stat = "ChaosMaximumHitTaken", label = "Chaos Max Hit", fmt = ".0f", color = colorCodes.CHAOS, compPercent = true, displayStat = true }, }, { + { stat = "MainHand", childStat = "Accuracy", label = "MH Accuracy", fmt = "d", condFunc = function(v,o) return o.PreciseTechnique end, warnFunc = function(v,o) return v < o.Life and "You do not have enough Accuracy for Precise Technique" end, warnColor = true, displayStat = true }, + { stat = "OffHand", childStat = "Accuracy", label = "OH Accuracy", fmt = "d", condFunc = function(v,o) return o.PreciseTechnique end, warnFunc = function(v,o) return v < o.Life and "You do not have enough Accuracy for Precise Technique" end, warnColor = true, displayStat = true }, { stat = "Life", label = "Total Life", fmt = "d", color = colorCodes.LIFE, compPercent = true, displayStat = true }, { stat = "Life", label = " Total Life", fmt = ".1f", color = colorCodes.LIFE, compPercent = true, minionDisplayStat = true }, { stat = "Spec:LifeInc", label = "%Inc Life from Tree", fmt = "d%%", color = colorCodes.LIFE, condFunc = function(v,o) return v > 0 and o.Life > 1 end, displayStat = true }, From 7b74829a112eb673c8fb266277859c12a269c4ed Mon Sep 17 00:00:00 2001 From: Regisle Date: Thu, 28 Mar 2024 16:31:25 +1030 Subject: [PATCH 25/25] fix merge conflicts --- src/Modules/BuildDisplayStats.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Modules/BuildDisplayStats.lua b/src/Modules/BuildDisplayStats.lua index 6ea6176d88..f2096d9c30 100644 --- a/src/Modules/BuildDisplayStats.lua +++ b/src/Modules/BuildDisplayStats.lua @@ -49,16 +49,18 @@ local StatList = { { stat = "IgniteDPS", label = "Ignite DPS", fmt = ".1f", compPercent = true, warnFunc = function(v) return v >= data.misc.DotDpsCap and "Ignite DPS exceeds in game limit" end, displayStat = true, minionDisplayStat = true }, { stat = "IgniteDamage", label = "Total Damage per Ignite", fmt = ".1f", compPercent = true, flag = "showAverage", displayStat = true }, { stat = "BurningGroundDPS", label = "Burning Ground DPS", fmt = ".1f", compPercent = true, warnFunc = function(v,o) return v >= data.misc.DotDpsCap and "Burning Ground DPS exceeds in game limit" end, displayStat = true }, + { stat = "MirageBurningGroundDPS", label = "Mirage Burning Ground DPS", fmt = ".1f", compPercent = true, condFunc = function(v,o) return v ~= o.BurningGroundDPS end, warnFunc = function(v,o) return v >= data.misc.DotDpsCap and "Mirage Burning Ground DPS exceeds in game limit" end, displayStat = true }, { stat = "WithIgniteDPS", label = "Total DPS inc. Ignite", fmt = ".1f", compPercent = true, flag = "notAverage", condFunc = function(v,o) return v ~= o.TotalDPS and (o.TotalDot or 0) == 0 and (o.PoisonDPS or 0) == 0 and (o.ImpaleDPS or 0) == 0 and (o.BleedDPS or 0) == 0 end, displayStat = true }, { stat = "WithIgniteDPS", label = " Total DPS inc. Ignite", fmt = ".1f", compPercent = true, condFunc = function(v,o) return v ~= o.TotalDPS and (o.TotalDot or 0) == 0 and (o.PoisonDPS or 0) == 0 and (o.ImpaleDPS or 0) == 0 and (o.BleedDPS or 0) == 0 end, minionDisplayStat = true }, { stat = "WithIgniteAverageDamage", label = "Average Dmg. inc. Ignite", fmt = ".1f", compPercent = true, displayStat = true }, { stat = "PoisonDPS", label = "Poison DPS", fmt = ".1f", compPercent = true, warnFunc = function(v) return v >= data.misc.DotDpsCap and "Poison DPS exceeds in game limit" end, displayStat = true, minionDisplayStat = true }, { stat = "CausticGroundDPS", label = "Caustic Ground DPS", fmt = ".1f", compPercent = true, warnFunc = function(v,o) return v >= data.misc.DotDpsCap and "Caustic Ground DPS exceeds in game limit" end, displayStat = true }, + { stat = "MirageCausticGroundDPS", label = "Mirage Caustic Ground DPS", fmt = ".1f", compPercent = true, condFunc = function(v,o) return v ~= o.CausticGroundDPS end, warnFunc = function(v,o) return v >= data.misc.DotDpsCap and "Mirage Caustic Ground DPS exceeds in game limit" end, displayStat = true }, { stat = "PoisonDamage", label = "Total Damage per Poison", fmt = ".1f", compPercent = true, displayStat = true, minionDisplayStat = true }, { stat = "WithPoisonDPS", label = "Total DPS inc. Poison", fmt = ".1f", compPercent = true, flag = "poison", flag = "notAverage", condFunc = function(v,o) return v ~= o.TotalDPS and (o.TotalDot or 0) == 0 and (o.IgniteDPS or 0) == 0 and (o.ImpaleDPS or 0) == 0 and (o.BleedDPS or 0) == 0 end, displayStat = true }, { stat = "WithPoisonDPS", label = " Total DPS inc. Poison", fmt = ".1f", compPercent = true, condFunc = function(v,o) return v ~= o.TotalDPS and (o.TotalDot or 0) == 0 and (o.IgniteDPS or 0) == 0 and (o.ImpaleDPS or 0) == 0 and (o.BleedDPS or 0) == 0 end, minionDisplayStat = true }, { stat = "DecayDPS", label = "Decay DPS", fmt = ".1f", compPercent = true, displayStat = true, minionDisplayStat = true }, - { stat = "TotalDotDPS", label = "Total DoT DPS", fmt = ".1f", compPercent = true, condFunc = function(v,o) return o.showTotalDotDPS or ( v ~= o.TotalDot and v ~= o.TotalPoisonDPS and v ~= o.CausticGroundDPS and v ~= (o.TotalIgniteDPS or o.IgniteDPS) and v ~= o.BurningGroundDPS and v ~= o.BleedDPS and v~= o.CorruptingBloodDPS ) end, warnFunc = function(v) return v >= data.misc.DotDpsCap and "DoT DPS exceeds in game limit" end, displayStat = true }, + { stat = "TotalDotDPS", label = "Total DoT DPS", fmt = ".1f", compPercent = true, condFunc = function(v,o) return o.showTotalDotDPS or ( v ~= o.TotalDot and v ~= o.TotalPoisonDPS and v ~= o.CausticGroundDPS and v ~= (o.TotalIgniteDPS or o.IgniteDPS) and v ~= o.BurningGroundDPS and v ~= o.BleedDPS and v~= o.CorruptingBloodDPS and v ~= o.MirageCausticGroundDPS and v ~= o.MirageBurningGroundDPS) end, warnFunc = function(v) return v >= data.misc.DotDpsCap and "DoT DPS exceeds in game limit" end, displayStat = true }, { stat = "TotalDotDPS", label = " Total DoT DPS", fmt = ".1f", compPercent = true, condFunc = function(v,o) return v ~= o.TotalDot and v ~= o.ImpaleDPS and v ~= o.TotalPoisonDPS and v ~= (o.TotalIgniteDPS or o.IgniteDPS) and v ~= o.BleedDPS end, warnFunc = function(v) return v >= data.misc.DotDpsCap and "DoT DPS exceeds in game limit" end, minionDisplayStat = true }, { stat = "ImpaleDPS", label = "Impale Damage", fmt = ".1f", compPercent = true, flag = "impale", flag = "showAverage", displayStat = true }, { stat = "WithImpaleDPS", label = "Damage inc. Impale", fmt = ".1f", compPercent = true, flag = "impale", flag = "showAverage", condFunc = function(v,o) return v ~= o.TotalDPS and (o.TotalDot or 0) == 0 and (o.IgniteDPS or 0) == 0 and (o.PoisonDPS or 0) == 0 and (o.BleedDPS or 0) == 0 end , displayStat = true },