Exemple #1
0
 public static float BonusExpertisePercentage(Character character, Stats stats)
 {
     return(StatConversion.GetDodgeParryReducFromExpertise(stats.Expertise +
                                                           StatConversion.GetExpertiseFromRating(stats.ExpertiseRating), CharacterClass.Warrior));
     //return (((stats.ExpertiseRating * ProtWarr.ExpertiseRatingToExpertise) + stats.Expertise)
     //        * ProtWarr.ExpertiseToDodgeParryReduction) / 100.0f;
 }
Exemple #2
0
        private static float CalcDodgeChance(float weaponExpertise)
        {
            float mhDodgeChance = Math.Max(0f, StatConversion.WHITE_DODGE_CHANCE_CAP[83 /*_calcOpts.TargetLevel*/ - 80]
                                           - StatConversion.GetDodgeParryReducFromExpertise(weaponExpertise));

            return(mhDodgeChance);
        }
Exemple #3
0
        public Weapon(Item i, Stats stats, CalculationOptionsDPSDK calcOpts, DeathKnightTalents talents, float expertise)
        {
            if (stats == null || calcOpts == null)
            {
                return;
            }

            if (i == null)
            {
                i           = new Item();
                i.Speed     = 2.0f;
                i.MinDamage = 0;
                i.MaxDamage = 0;
            }

            effectiveExpertise = expertise;
            float fightDuration = calcOpts.FightLength * 60;

            if (i == null)
            {
                return;
            }

            baseSpeed  = i.Speed;
            baseDamage = (float)(i.MinDamage + i.MaxDamage) / 2f + stats.WeaponDamage;


            #region Attack Speed
            {
                hastedSpeed  = baseSpeed / ((1f + (StatConversion.GetHasteFromRating(stats.HasteRating, CharacterClass.DeathKnight))) * (1 + stats.PhysicalHaste));
                hastedSpeed /= 1f + 0.05f * (float)talents.ImprovedIcyTalons;
            }
            #endregion

            #region Dodge
            {
                chanceDodged  = StatConversion.WHITE_DODGE_CHANCE_CAP[calcOpts.TargetLevel - 80];
                chanceDodged -= StatConversion.GetDodgeParryReducFromExpertise(effectiveExpertise);
                if (chanceDodged < 0f)
                {
                    chanceDodged = 0f;
                }
            }
            #endregion

            #region White Damage
            {
                // White damage per hit.  Basic white hits are use elsewhere.
                damage = baseDamage + (stats.AttackPower / 14.0f) * baseSpeed;
                DPS    = damage / hastedSpeed;
            }
            #endregion
        }
        public override Dictionary <string, string> GetCharacterDisplayCalculationValues()
        {
            Dictionary <string, string> dictValues = new Dictionary <string, string>();

            dictValues.Add("Overall Points", OverallPoints.ToString());
            dictValues.Add("DPS Points", DPSPoints.ToString());
            dictValues.Add("Survivability Points", SurvivabilityPoints.ToString());

            float baseMiss        = StatConversion.WHITE_MISS_CHANCE_CAP_DW[TargetLevel - 80] - BasicStats.PhysicalHit;
            float baseYellowMiss  = StatConversion.YELLOW_MISS_CHANCE_CAP[TargetLevel - 80] - BasicStats.PhysicalHit;
            float basePoisonMiss  = StatConversion.GetSpellMiss(80 - TargetLevel, false) - BasicStats.SpellHit;
            float baseDodge       = StatConversion.WHITE_DODGE_CHANCE_CAP[TargetLevel - 80] - StatConversion.GetDodgeParryReducFromExpertise(BasicStats.Expertise);
            float baseParry       = 0f;// StatConversion.WHITE_PARRY_CHANCE_CAP[TargetLevel - 80] - StatConversion.GetDodgeParryReducFromExpertise(BasicStats.Expertise);
            float baseWhiteMHCrit = CritChanceMHTotal;
            float baseWhiteOHCrit = CritChanceOHTotal;
            float capMiss         = (float)Math.Ceiling(baseMiss * 100f * 32.78998947f);
            float capYellowMiss   = (float)Math.Ceiling(baseYellowMiss * 100f * 32.78998947f);
            float capPoisonMiss   = (float)Math.Ceiling(basePoisonMiss * 100f * 26.23f);
            float capDodge        = (float)Math.Ceiling(baseDodge * 100f * 32.78998947f);
            float capParry        = (float)Math.Ceiling(baseParry * 100f * 32.78998947f); // TODO: Check this value
            float capWhiteMHCrit  = 100 - StatConversion.WHITE_GLANCE_CHANCE_CAP[TargetLevel - 80] * 100 - MissedWhiteAttacks - DodgedMHAttacks;
            float capWhiteOHCrit  = 100 - StatConversion.WHITE_GLANCE_CHANCE_CAP[TargetLevel - 80] * 100 - MissedWhiteAttacks - DodgedOHAttacks;

            string tipMiss = "*White: ";

            if (BasicStats.HitRating > capMiss)
            {
                tipMiss += string.Format("Over the cap by {0} Hit Rating", BasicStats.HitRating - capMiss);
            }
            else if (BasicStats.HitRating < capMiss)
            {
                tipMiss += string.Format("Under the cap by {0} Hit Rating", capMiss - BasicStats.HitRating);
            }
            else
            {
                tipMiss += "Exactly at the cap";
            }

            tipMiss += "\r\nYellow: ";
            if (BasicStats.HitRating > capYellowMiss)
            {
                tipMiss += string.Format("Over the cap by {0} Hit Rating", BasicStats.HitRating - capYellowMiss);
            }
            else if (BasicStats.HitRating < capYellowMiss)
            {
                tipMiss += string.Format("Under the cap by {0} Hit Rating", capYellowMiss - BasicStats.HitRating);
            }
            else
            {
                tipMiss += "Exactly at the cap";
            }

            tipMiss += "\r\nPoison: ";
            if (BasicStats.HitRating > capPoisonMiss)
            {
                tipMiss += string.Format("Over the cap by {0} Hit Rating", BasicStats.HitRating - capPoisonMiss);
            }
            else if (BasicStats.HitRating < capPoisonMiss)
            {
                tipMiss += string.Format("Under the cap by {0} Hit Rating", capPoisonMiss - BasicStats.HitRating);
            }
            else
            {
                tipMiss += "Exactly at the cap";
            }

            string tipDodge = string.Empty;

            if (BasicStats.ExpertiseRating > capDodge)
            {
                tipDodge = string.Format("*Over the cap by {0} Expertise Rating", BasicStats.ExpertiseRating - capDodge);
            }
            else if (BasicStats.ExpertiseRating < capDodge)
            {
                tipDodge = string.Format("*Under the cap by {0} Expertise Rating", capDodge - BasicStats.ExpertiseRating);
            }
            else
            {
                tipDodge = "*Exactly at the cap";
            }

            string tipCrit = string.Format("Mainhand: {0}, ", CritChanceMH);

            if (CritChanceMHTotal > capWhiteMHCrit)
            {
                tipCrit += string.Format("over the Crit cap by {0}%", CritChanceMHTotal - capWhiteMHCrit);
            }
            else if (CritChanceMHTotal < capWhiteMHCrit)
            {
                tipCrit += string.Format("under the Crit cap by {0}%", capWhiteMHCrit - CritChanceMHTotal);
            }
            else
            {
                tipCrit += "exactly at the Crit cap";
            }

            tipCrit += string.Format("\nOffhand: {0}, ", CritChanceOH);
            if (CritChanceOHTotal > capWhiteOHCrit)
            {
                tipCrit += string.Format("over the Crit cap by {0}%", CritChanceOHTotal - capWhiteOHCrit);
            }
            else if (CritChanceOHTotal < capWhiteOHCrit)
            {
                tipCrit += string.Format("under the Crit cap by {0}%", capWhiteOHCrit - CritChanceOHTotal);
            }
            else
            {
                tipCrit += "exactly at the Crit cap";
            }

            dictValues.Add("Health", BasicStats.Health.ToString());
            dictValues.Add("Attack Power", BasicStats.AttackPower.ToString());
            dictValues.Add("Agility", BasicStats.Agility.ToString());
            dictValues.Add("Strength", BasicStats.Strength.ToString());
            dictValues.Add("Crit Rating", BasicStats.CritRating.ToString());
            dictValues.Add("Hit Rating", BasicStats.HitRating.ToString() + tipMiss);
            dictValues.Add("Expertise Rating", BasicStats.ExpertiseRating.ToString() + tipDodge);
            dictValues.Add("Haste Rating", BasicStats.HasteRating.ToString());
            dictValues.Add("Armor Penetration Rating", BasicStats.ArmorPenetrationRating.ToString());
            dictValues.Add("Weapon Damage", "+" + BasicStats.WeaponDamage.ToString());

            dictValues.Add("Avoided White Attacks", string.Format("{0}% / {1}%*Mainhand: {2}% Dodged, {3}% Missed\n   Offhand: {4}% Dodged, {3}% Missed", AvoidedWhiteMHAttacks, AvoidedWhiteOHAttacks, DodgedMHAttacks, MissedWhiteAttacks, DodgedOHAttacks));
            dictValues.Add("Avoided Yellow Attacks", string.Format("{0}%*{1}% Dodged, {2}% Missed", AvoidedAttacks, DodgedMHAttacks, MissedAttacks));
            dictValues.Add("Avoided Poison Attacks", string.Format("{0}%*{1}% Missed", AvoidedPoisonAttacks, MissedPoisonAttacks));
            dictValues.Add("Crit Chance", CritChanceYellow.ToString() + "%*" + tipCrit);
            dictValues.Add("MainHand Speed", MainHandSpeed.ToString() + "s");
            dictValues.Add("OffHand Speed", OffHandSpeed.ToString() + "s");
            dictValues.Add("Armor Mitigation MainHand", ArmorMitigationMH.ToString() + "%");
            dictValues.Add("Armor Mitigation OffHand", ArmorMitigationOH.ToString() + "%");

            dictValues.Add("Optimal Rotation", HighestDPSRotation.ToString());
            dictValues.Add("Optimal Rotation DPS", HighestDPSRotation.DPS.ToString());
            dictValues.Add("Custom Rotation DPS", CustomRotation.DPS.ToString());


            float chanceWhiteMHNonAvoided = 1f - (AvoidedWhiteMHAttacks / 100f);
            float chanceWhiteOHNonAvoided = 1f - (AvoidedWhiteOHAttacks / 100f);
            float chanceNonAvoided        = 1f - (AvoidedAttacks / 100f);
            float chancePoisonNonAvoided  = 1f - (AvoidedPoisonAttacks / 100f);

            dictValues.Add("MainHand", MainHandStats.GetStatsTexts(HighestDPSRotation.MainHandCount, 0, HighestDPSRotation.TotalDamage, chanceWhiteMHNonAvoided, Duration));
            dictValues.Add("OffHand", OffHandStats.GetStatsTexts(HighestDPSRotation.OffHandCount, 0, HighestDPSRotation.TotalDamage, chanceWhiteOHNonAvoided, Duration));
            dictValues.Add("Backstab", BackstabStats.GetStatsTexts(HighestDPSRotation.BackstabCount, 0, HighestDPSRotation.TotalDamage, chanceNonAvoided, Duration));
            dictValues.Add("Hemorrhage", HemoStats.GetStatsTexts(HighestDPSRotation.HemoCount, 0, HighestDPSRotation.TotalDamage, chanceNonAvoided, Duration));
            dictValues.Add("Sinister Strike", SStrikeStats.GetStatsTexts(HighestDPSRotation.SStrikeCount, 0, HighestDPSRotation.TotalDamage, chanceNonAvoided, Duration));
            dictValues.Add("Mutilate", MutiStats.GetStatsTexts(HighestDPSRotation.MutiCount, 0, HighestDPSRotation.TotalDamage, chanceNonAvoided, Duration));
            dictValues.Add("Rupture", RuptStats.GetStatsTexts(HighestDPSRotation.RuptCount, 0, HighestDPSRotation.TotalDamage, chanceNonAvoided, Duration));
            dictValues.Add("Slice and Dice", SnDStats.GetStatsTexts(HighestDPSRotation.SnDCount, HighestDPSRotation.SnDCP, HighestDPSRotation.TotalDamage, chanceNonAvoided, Duration));
            dictValues.Add("Eviscerate", EvisStats.GetStatsTexts(HighestDPSRotation.EvisCount, Math.Max(HighestDPSRotation.EvisCP, HighestDPSRotation.EnvenomCP), HighestDPSRotation.TotalDamage, chanceNonAvoided, Duration));
            dictValues.Add("Envenom", EnvenomStats.GetStatsTexts(HighestDPSRotation.EnvenomCount, Math.Max(HighestDPSRotation.EvisCP, HighestDPSRotation.EnvenomCP), HighestDPSRotation.TotalDamage, chanceNonAvoided, Duration));
            dictValues.Add("Instant Poison", IPStats.GetStatsTexts(HighestDPSRotation.IPCount, 0, HighestDPSRotation.TotalDamage, chancePoisonNonAvoided, Duration));
            dictValues.Add("Deadly Poison", DPStats.GetStatsTexts(HighestDPSRotation.DPCount, 0, HighestDPSRotation.TotalDamage, chancePoisonNonAvoided, Duration));
            dictValues.Add("Wound Poison", WPStats.GetStatsTexts(HighestDPSRotation.WPCount, 0, HighestDPSRotation.TotalDamage, chancePoisonNonAvoided, Duration));
            dictValues.Add("Anesthetic Poison", APStats.GetStatsTexts(HighestDPSRotation.APCount, 0, HighestDPSRotation.TotalDamage, chancePoisonNonAvoided, Duration));

            return(dictValues);
        }
Exemple #5
0
        public override Dictionary <string, string> GetCharacterDisplayCalculationValues()
        {
            Dictionary <string, string> dictValues = new Dictionary <string, string>();

            int   levelDifference = TargetLevel - CharacterLevel;
            float baseMiss        = StatConversion.WHITE_MISS_CHANCE_CAP[levelDifference] - BasicStats.PhysicalHit;
            float baseDodge       = StatConversion.WHITE_DODGE_CHANCE_CAP[levelDifference] - StatConversion.GetDodgeParryReducFromExpertise(BasicStats.Expertise);
            float baseParry       = StatConversion.WHITE_PARRY_CHANCE_CAP[levelDifference] - StatConversion.GetDodgeParryReducFromExpertise(BasicStats.Expertise);
            float capMiss         = (float)Math.Ceiling(baseMiss * StatConversion.RATING_PER_PHYSICALHIT);
            float capDodge        = (float)Math.Ceiling(baseDodge * 400f * StatConversion.RATING_PER_EXPERTISE);
            float capParry        = (float)Math.Ceiling(baseParry * 400f * StatConversion.RATING_PER_EXPERTISE);

            string tipMiss = string.Empty;

            if (BasicStats.HitRating > capMiss)
            {
                tipMiss = string.Format("*Over the cap by {0} Hit Rating", BasicStats.HitRating - capMiss);
            }
            else if (BasicStats.HitRating < capMiss)
            {
                tipMiss = string.Format("*Under the cap by {0} Hit Rating", capMiss - BasicStats.HitRating);
            }
            else
            {
                tipMiss = "*Exactly at the cap";
            }

            string tipDodgeParry = string.Empty;

            if (BasicStats.ExpertiseRating > capDodge)
            {
                tipDodgeParry = string.Format("*Over the dodge cap by {0} Expertise Rating\r\n", BasicStats.ExpertiseRating - capDodge);
            }
            else if (BasicStats.ExpertiseRating < capDodge)
            {
                tipDodgeParry = string.Format("*Under the dodge cap by {0} Expertise Rating\r\n", capDodge - BasicStats.ExpertiseRating);
            }
            else
            {
                tipDodgeParry = "*Exactly at the dodge cap";
            }

            if (BasicStats.ExpertiseRating > capParry)
            {
                tipDodgeParry += string.Format("Over the parry cap by {0} Expertise Rating", BasicStats.ExpertiseRating - capParry);
            }
            else if (BasicStats.ExpertiseRating < capParry)
            {
                tipDodgeParry += string.Format("Under the parry cap by {0} Expertise Rating", capParry - BasicStats.ExpertiseRating);
            }
            else
            {
                tipDodgeParry += "Exactly at the parry cap";
            }



            int   armorCap = (int)Math.Ceiling(6502.5f * TargetLevel - 474502.5f);
            float levelDifferenceAvoidance = 0.002f * levelDifference;
            float targetCritReduction      = StatConversion.NPC_LEVEL_CRIT_MOD[levelDifference];

            /*int defToCap = 0, resToCap = 0;
             * if (CritReduction < targetCritReduction)
             * {
             *  //while (((float)Math.Floor((BasicStats.DefenseRating + defToCap) / (123f / 52f)) * 0.04f)
             *  //+ BasicStats.Resilience / (2050f / 52f) + BasicStats.CritChanceReduction < targetCritReduction)
             *  //    defToCap++;
             *  //while (((float)Math.Floor(BasicStats.DefenseRating / (123f / 52f)) * 0.04f)
             *  //+ (BasicStats.Resilience + resToCap) / (2050f / 52f) + BasicStats.CritChanceReduction < targetCritReduction)
             *  //    resToCap++;
             *  while (((float)Math.Floor(StatConversion.GetDefenseFromRating(BasicStats.DefenseRating + defToCap)) * 0.0004f)
             + StatConversion.GetCritReductionFromResilience(BasicStats.Resilience)
             + BasicStats.CritChanceReduction < targetCritReduction)
             +      defToCap++;
             +  while (((float)Math.Floor(StatConversion.GetDefenseFromRating(BasicStats.DefenseRating)) * 0.0004f)
             + StatConversion.GetCritReductionFromResilience(BasicStats.Resilience + resToCap)
             + BasicStats.CritChanceReduction < targetCritReduction)
             +      resToCap++;
             + }
             + else if (CritReduction > targetCritReduction)
             + {
             +  //while (((float)Math.Floor((BasicStats.DefenseRating + defToCap) / (123f / 52f)) * 0.04f)
             +  //+ BasicStats.Resilience / (2050f / 52f) + BasicStats.CritChanceReduction > targetCritReduction)
             +  //    defToCap--;
             +  //while (((float)Math.Floor(BasicStats.DefenseRating / (123f / 52f)) * 0.04f)
             +  //+ (BasicStats.Resilience + resToCap) / (2050f / 52f) + BasicStats.CritChanceReduction > targetCritReduction)
             +  //    resToCap--;
             +
             +  while (((float)Math.Floor(StatConversion.GetDefenseFromRating(BasicStats.DefenseRating + defToCap)) * 0.0004f)
             + StatConversion.GetCritReductionFromResilience(BasicStats.Resilience) + BasicStats.CritChanceReduction > targetCritReduction)
             +      defToCap--;
             +  while (((float)Math.Floor(StatConversion.GetDefenseFromRating(BasicStats.DefenseRating)) * 0.0004f)
             + StatConversion.GetCritReductionFromResilience(BasicStats.Resilience + resToCap) + BasicStats.CritChanceReduction > targetCritReduction)
             +      resToCap--;
             +  defToCap++;
             +  resToCap++;
             + }*/

            // Changed to not just give a resist rating, but a breakdown of the resulting resist values in the tooltip
            string tipResist = string.Empty;

            tipResist = StatConversion.GetResistanceTableString(TargetLevel, CharacterLevel, BasicStats.NatureResistance, 0);
            dictValues.Add("Nature Resist", BasicStats.NatureResistance.ToString() + "*" + tipResist);
            tipResist = StatConversion.GetResistanceTableString(TargetLevel, CharacterLevel, BasicStats.ArcaneResistance, 0);
            dictValues.Add("Arcane Resist", BasicStats.ArcaneResistance.ToString() + "*" + tipResist);
            tipResist = StatConversion.GetResistanceTableString(TargetLevel, CharacterLevel, BasicStats.FrostResistance, 0);
            dictValues.Add("Frost Resist", BasicStats.FrostResistance.ToString() + "*" + tipResist);
            tipResist = StatConversion.GetResistanceTableString(TargetLevel, CharacterLevel, BasicStats.FireResistance, 0);
            dictValues.Add("Fire Resist", BasicStats.FireResistance.ToString() + "*" + tipResist);
            tipResist = StatConversion.GetResistanceTableString(TargetLevel, CharacterLevel, BasicStats.ShadowResistance, 0);
            dictValues.Add("Shadow Resist", BasicStats.ShadowResistance.ToString() + "*" + tipResist);

            dictValues.Add("Health", BasicStats.Health.ToString());
            dictValues.Add("Agility", BasicStats.Agility.ToString());
            dictValues.Add("Armor", BasicStats.Armor.ToString());
            dictValues.Add("Stamina", BasicStats.Stamina.ToString());
            dictValues.Add("Dodge Rating", BasicStats.DodgeRating.ToString());
            dictValues.Add("Mastery", string.Format("{0}*{1} Mastery Rating",
                                                    StatConversion.GetMasteryFromRating(BasicStats.MasteryRating) + 8f,
                                                    BasicStats.MasteryRating.ToString()));
            dictValues.Add("Resilience", BasicStats.Resilience.ToString());
            dictValues.Add("Dodge", Dodge.ToString("0.000%"));
            dictValues.Add("Miss", Miss.ToString("0.000%"));
            if (BasicStats.Armor == armorCap)
            {
                dictValues.Add("Armor Damage Reduction", DamageReductionFromArmor.ToString("0.000%")
                               + string.Format("*Exactly at the armor cap against level {0} mobs.", TargetLevel));
            }
            else if (BasicStats.Armor > armorCap)
            {
                dictValues.Add("Armor Damage Reduction", DamageReductionFromArmor.ToString("0.000%")
                               + string.Format("*Over the armor cap by {0} armor.", BasicStats.Armor - armorCap));
            }
            else
            {
                dictValues.Add("Armor Damage Reduction", DamageReductionFromArmor.ToString("0.000%")
                               + string.Format("*Short of the armor cap by {0} armor.", armorCap - BasicStats.Armor));
            }
            dictValues.Add("Total Damage Reduction", TotalConstantDamageReduction.ToString("0.000%"));
            dictValues.Add("Avoidance PreDR", AvoidancePreDR.ToString("0.000%"));
            dictValues.Add("Avoidance PostDR", AvoidancePostDR.ToString("0.000%"));
            dictValues.Add("Total Mitigation", TotalMitigation.ToString("0.000%"));
            dictValues.Add("Damage Taken", DamageTaken.ToString("0.000%"));
            dictValues.Add("Savage Defense", string.Format(
                               "{0} ~ {1}*{0} chance to absorb incoming hit\r\n{1} absorbed per hit\r\n{2} of incoming damage absorbed",
                               SavageDefenseChance.ToString("0.000%"), SavageDefenseValue, SavageDefensePercent.ToString("0.000%")));
            dictValues.Add("Chance to be Crit", ((0.05f + levelDifferenceAvoidance) - CritReduction).ToString("0.000%"));
            dictValues.Add("Overall Points", OverallPoints.ToString());
            dictValues.Add("Mitigation Points", MitigationPoints.ToString());
            dictValues.Add("Survival Points", string.Format("{0}*{1} Before Soft Cap", SurvivabilityPoints.ToString(), SurvivalPointsRaw.ToString()));
            dictValues.Add("Threat Points", ThreatPoints.ToString());

            dictValues["Nature Survival"] = NatureSurvivalPoints.ToString();
            dictValues["Frost Survival"]  = FrostSurvivalPoints.ToString();
            dictValues["Fire Survival"]   = FireSurvivalPoints.ToString();
            dictValues["Shadow Survival"] = ShadowSurvivalPoints.ToString();
            dictValues["Arcane Survival"] = ArcaneSurvivalPoints.ToString();


            dictValues["Strength"]             = BasicStats.Strength.ToString();
            dictValues["Attack Power"]         = string.Format("{0}*{1} with Vengeance", (BasicStats.AttackPower - AverageVengeanceAP), BasicStats.AttackPower);
            dictValues["Average Vengeance AP"] = AverageVengeanceAP.ToString("N1");
            dictValues["Crit Rating"]          = BasicStats.CritRating.ToString();
            dictValues["Hit Rating"]           = BasicStats.HitRating.ToString() + tipMiss;
            dictValues["Expertise Rating"]     = BasicStats.ExpertiseRating.ToString() + tipDodgeParry;
            dictValues["Haste Rating"]         = string.Format("{0}*{1}sec Attack Speed", BasicStats.HasteRating, AttackSpeed.ToString("0.000"));
            //dictValues["Armor Penetration Rating"] = BasicStats.ArmorPenetrationRating.ToString();

            dictValues["Avoided Attacks"] = String.Format("{0}*{1} Missed\r\n{2} Dodged\r\n{3} Parried",
                                                          AvoidedAttacks.ToString("0.000%"), MissedAttacks.ToString("0.000%"),
                                                          DodgedAttacks.ToString("0.000%"), ParriedAttacks.ToString("0.000%"));

            dictValues["Highest DPS Rotation"] = HighestDPSRotation.Name;
            dictValues["Highest TPS Rotation"] = HighestTPSRotation.Name;
            dictValues["Swipe Rotation"]       = "";
            dictValues["Custom Rotation"]      = "";
            //string rotationFormat = "{0} DPS, {1} TPS*{2}";
            //dictValues["Highest DPS Rotation"] = String.Format(rotationFormat, Math.Round(HighestDPSRotation.DPS), Math.Round(HighestDPSRotation.TPS), GetRotationTooltip(HighestDPSRotation.Name));
            //dictValues["Highest TPS Rotation"] = String.Format(rotationFormat, Math.Round(HighestTPSRotation.DPS), Math.Round(HighestTPSRotation.TPS), GetRotationTooltip(HighestTPSRotation.Name));
            //dictValues["Swipe Rotation"] = String.Format(rotationFormat, Math.Round(SwipeRotation.DPS), Math.Round(SwipeRotation.TPS), GetRotationTooltip(SwipeRotation.Name));
            //dictValues["Custom Rotation"] = String.Format(rotationFormat, Math.Round(CustomRotation.DPS), Math.Round(CustomRotation.TPS), GetRotationTooltip(CustomRotation.Name));

            dictValues["Melee"]       = Abilities.MeleeStats.ToString();
            dictValues["Maul"]        = Abilities.MaulStats.ToString();
            dictValues["Mangle"]      = Abilities.MangleStats.ToString();
            dictValues["Lacerate"]    = Abilities.LacerateStats.ToString();
            dictValues["Pulverize"]   = Abilities.PulverizeStats.ToString();
            dictValues["Swipe"]       = Abilities.SwipeStats.ToString();
            dictValues["Thrash"]      = Abilities.ThrashStats.ToString();
            dictValues["Faerie Fire"] = Abilities.FaerieFireStats.ToString();
            dictValues["Thorns"]      = Abilities.ThornsStats.ToString();
            //string attackFormat = "{0} Dmg, {1} Threat*Per Hit: {0} Damage, {1} Threat\r\nPer Average Swing: {2} Damage, {3} Threat";
            //string attackFormatWithRage = attackFormat + "\r\nThreat Per Rage: {4}\r\nDamage Per Rage: {5}";
            //dictValues["Melee"] = String.Format(attackFormat, MeleeDamageRaw, MeleeThreatRaw, MeleeDamageAverage, MeleeThreatAverage);
            //dictValues["Maul"] = String.Format(attackFormatWithRage, MaulDamageRaw, MaulThreatRaw, MaulDamageAverage, MaulThreatAverage, MaulTPR, MaulDPR);
            //dictValues["Mangle"] = String.Format(attackFormatWithRage, MangleDamageRaw, MangleThreatRaw, MangleDamageAverage, MangleThreatAverage, MangleTPR, MangleDPR);
            //dictValues["Swipe"] = String.Format(attackFormatWithRage, SwipeDamageRaw, SwipeThreatRaw, SwipeDamageAverage, SwipeThreatAverage, SwipeTPR, SwipeDPR);
            //dictValues["Faerie Fire"] = String.Format(attackFormat, FaerieFireDamageRaw, FaerieFireThreatRaw, FaerieFireDamageAverage, FaerieFireThreatAverage);
            //dictValues["Lacerate"] = String.Format(attackFormatWithRage, LacerateDamageRaw, LacerateThreatRaw, LacerateDamageAverage, LacerateThreatAverage, LacerateTPR, LacerateDPR);
            //dictValues["Lacerate DoT Tick"] = String.Format(attackFormat, LacerateDotDamageRaw, LacerateDotThreatRaw, LacerateDotDamageAverage, LacerateDotThreatAverage).Replace("Swing", "Tick");

            return(dictValues);
        }
Exemple #6
0
 private float GetDPRfromExp(float Expertise)
 {
     return(StatConversion.GetDodgeParryReducFromExpertise(Expertise, CharacterClass.Shaman));
 }
Exemple #7
0
 public static float BonusExpertisePercentage(Character character, Stats stats)
 {
     return(StatConversion.GetDodgeParryReducFromExpertise(StatConversion.GetExpertiseFromRating(stats.ExpertiseRating, CharacterClass.Paladin) + stats.Expertise, CharacterClass.Paladin));
 }
Exemple #8
0
        protected override void Calculate()
        {
            float tableSize = 0f;

            // Miss
            if (useSpellHit)
            {
                Miss = Math.Min(1f - tableSize, Math.Max(0f, StatConversion.GetSpellMiss(-LevelDelta, false) - StatS.SpellHit - StatConversion.GetSpellHitFromRating(StatS.HitRating)));
            }
            else
            {
                Miss = Math.Min(1f - tableSize, Math.Max(0f, StatConversion.YELLOW_MISS_CHANCE_CAP[LevelDelta] - StatS.PhysicalHit - StatConversion.GetSpellHitFromRating(StatS.HitRating)));
            }
            tableSize += Miss;
            // Dodge
            if (!useSpellHit)
            {
                Dodge = Math.Min(1f - tableSize, Math.Max(0f, StatConversion.YELLOW_DODGE_CHANCE_CAP[LevelDelta]
                                                          - StatConversion.GetDodgeParryReducFromExpertise(
                                                              StatConversion.GetExpertiseFromRating(StatS.ExpertiseRating, Char.Class), Char.Class))
                                 );
                tableSize += Dodge;
            }
            else
            {
                Dodge = 0f;
            }
            // Parry
            if (!useSpellHit)
            {
                Parry = Math.Min(1f - tableSize, Math.Max(0f, StatConversion.YELLOW_PARRY_CHANCE_CAP[LevelDelta]
                                                          - StatConversion.GetDodgeParryReducFromExpertise(
                                                              StatConversion.GetExpertiseFromRating(StatS.ExpertiseRating, Char.Class), Char.Class))
                                 );
                tableSize += Parry;
            }
            else
            {
                Parry = 0f;
            }
            // Block
            //if (isWhite || Abil.CanBeBlocked) {
            //Block = Math.Min(1f - tableSize, isMH ?  combatFactors._c_mhblock : combatFactors._c_ohblock);
            //tableSize += Block;
            //} else { Block = 0f; }
            // Glancing Blow
            //if (isWhite) {
            //Glance = Math.Min(1f - tableSize, combatFactors._c_glance);
            //tableSize += Glance;
            //} else { Glance = 0f; }
            // Critical Hit
            Crit = 0;

            /*if (isWhite) {
             *  float critValueToUse = (isMH ? combatFactors._c_mhwcrit : combatFactors._c_ohwcrit);
             *  foreach (WeightedStat ws in combatFactors.critProcs)
             *  {
             *      float modCritChance = Math.Min(1f - tableSize, critValueToUse + StatConversion.GetCritFromRating(ws.Value, Char.Class))
             + StatConversion.NPC_LEVEL_CRIT_MOD[calcOpts.TargetLevel - Char.Level];
             +      Crit += ws.Chance * modCritChance;
             +  }
             +  tableSize += Crit;
             + } else if (Abil.CanCrit) {*/
            float critValueToUse = StatConversion.NPC_LEVEL_CRIT_MOD[LevelDelta]
                                   + (useSpellHit ? StatS.SpellCrit : StatS.PhysicalCrit);

            foreach (WeightedStat ws in critProcs)
            {
                float modCritChance = Math.Min(1f - tableSize, (critValueToUse + StatConversion.GetCritFromRating(ws.Value, Char.Class)) * (1f - Dodge - Miss));
                Crit += ws.Chance * modCritChance;
            }
            if (Crit < 0)
            {
                Crit = 0f;
            }
            tableSize += Crit;
            //}
            // Normal Hit
            Hit = Math.Max(0f, 1f - tableSize);
            base.Calculate();
        }
        public override Dictionary <string, string> GetCharacterDisplayCalculationValues()
        {
            float critRating = BasicStats.CritRating;

            float hitRating = BasicStats.HitRating;

            float armorPenetrationRating = BasicStats.ArmorPenetrationRating;

            float attackPower = BasicStats.AttackPower;

            if (ActiveBuffs.Contains(Buff.GetBuffByName("Improved Hunter's Mark")))
            {
                attackPower -= 110f * (1f + BasicStats.BonusAttackPowerMultiplier);
            }

            Dictionary <string, string> dictValues = new Dictionary <string, string>();

            dictValues.Add("Health", BasicStats.Health.ToString("N0"));
            dictValues.Add("Strength", BasicStats.Strength.ToString("N0"));
            dictValues.Add("Agility", string.Format("{0:0}*Provides {1:P} crit chance", BasicStats.Agility, StatConversion.GetCritFromAgility(BasicStats.Agility, CharacterClass.DeathKnight)));
            dictValues.Add("Attack Power", attackPower.ToString("N0"));
            dictValues.Add("Crit Rating", string.Format("{0:0}*Provides {1:P} crit chance", critRating, StatConversion.GetCritFromRating(critRating, CharacterClass.DeathKnight)));
            dictValues.Add("Hit Rating", string.Format("{0:0}*Negates {1:P} melee miss / {2:P} spell miss", hitRating, StatConversion.GetPhysicalHitFromRating(hitRating, CharacterClass.DeathKnight), StatConversion.GetSpellHitFromRating(hitRating, CharacterClass.DeathKnight)));
            dictValues.Add("Expertise", string.Format("{0:0.00} / {1:0.00}*Negates {2:P} / {3:P} dodge chance", MHExpertise, OHExpertise, StatConversion.GetDodgeParryReducFromExpertise(MHExpertise), StatConversion.GetDodgeParryReducFromExpertise(OHExpertise)));
            dictValues.Add("Haste Rating", string.Format("{0:0}*Increases attack speed by {1:P}", BasicStats.HasteRating, StatConversion.GetHasteFromRating(BasicStats.HasteRating, CharacterClass.DeathKnight)));
            dictValues.Add("Armor Penetration Rating", armorPenetrationRating.ToString("N0"));
            dictValues.Add("Armor", BasicStats.Armor.ToString("N0"));
            dictValues.Add("Resilience", BasicStats.Resilience.ToString("F0"));

            dictValues.Add("Weapon Damage", MHWeaponDamage.ToString("N2") + " / " + OHWeaponDamage.ToString("N2"));
            dictValues.Add("Attack Speed", MHAttackSpeed.ToString("N2") + " / " + OHAttackSpeed.ToString("N2"));
            dictValues.Add("Crit Chance", string.Format("{0:P}", CritChance));
            dictValues.Add("Avoided Attacks", string.Format("{0:P}*{1:P} Dodged, {2:P} Missed", AvoidedAttacks, DodgedAttacks, MissedAttacks));
            dictValues.Add("Enemy Mitigation", string.Format("{0:P}*{1:0} effective enemy armor", EnemyMitigation, EffectiveArmor));

            dictValues.Add("BCB", string.Format("{0:N2}*{1:P}", BCBDPS, (float)BCBDPS / DPSPoints));
            dictValues.Add("Blood Plague", string.Format("{0:N2}*{1:P}", BloodPlagueDPS, (float)BloodPlagueDPS / DPSPoints));
            dictValues.Add("Blood Strike", string.Format("{0:N2}*{1:P}", BloodStrikeDPS, (float)BloodStrikeDPS / DPSPoints));
            dictValues.Add("Death Coil", string.Format("{0:N2}*{1:P}", DeathCoilDPS, (float)DeathCoilDPS / DPSPoints));
            dictValues.Add("DRW", string.Format("{0:N2}*{1:P}, wait for " + DRWStats + " proc", DRWDPS, (float)DRWDPS / DPSPoints));
            dictValues.Add("Frost Fever", string.Format("{0:N2}*{1:P}", FrostFeverDPS, (float)FrostFeverDPS / DPSPoints));
            dictValues.Add("Frost Strike", string.Format("{0:N2}*{1:P}", FrostStrikeDPS, (float)FrostStrikeDPS / DPSPoints));
            dictValues.Add("Gargoyle", string.Format("{0:N2}*{1:P}", GargoyleDPS, (float)GargoyleDPS / DPSPoints));
            dictValues.Add("Heart Strike", string.Format("{0:N2}*{1:P}", HeartStrikeDPS, (float)HeartStrikeDPS / DPSPoints));
            dictValues.Add("Howling Blast", string.Format("{0:N2}*{1:P}", HowlingBlastDPS, (float)HowlingBlastDPS / DPSPoints));
            dictValues.Add("Icy Touch", string.Format("{0:N2}*{1:P}", IcyTouchDPS, (float)IcyTouchDPS / DPSPoints));
            dictValues.Add("Necrosis", string.Format("{0:N2}*{1:P}", NecrosisDPS, (float)NecrosisDPS / DPSPoints));
            dictValues.Add("Obliterate", string.Format("{0:N2}*{1:P}", ObliterateDPS, (float)ObliterateDPS / DPSPoints));
            dictValues.Add("Death Strike", string.Format("{0:N2}*{1:P}", DeathStrikeDPS, (float)DeathStrikeDPS / DPSPoints));
            dictValues.Add("Plague Strike", string.Format("{0:N2}*{1:P}", PlagueStrikeDPS, (float)PlagueStrikeDPS / DPSPoints));
            dictValues.Add("Scourge Strike", string.Format("{0:N2}*{1:P}", ScourgeStrikeDPS, (float)ScourgeStrikeDPS / DPSPoints));
            dictValues.Add("Unholy Blight", string.Format("{0:N2}*{1:P}", UnholyBlightDPS, (float)UnholyBlightDPS / DPSPoints));
            dictValues.Add("Wandering Plague", string.Format("{0:N2}*{1:P}", WanderingPlagueDPS, (float)WanderingPlagueDPS / DPSPoints));
            dictValues.Add("White", string.Format("{0:N2}*{1:P}", WhiteDPS, (float)WhiteDPS / DPSPoints));
            dictValues.Add("Ghoul", string.Format("{0:N2}*{1:P}", GhoulDPS, (float)GhoulDPS / DPSPoints));
            dictValues.Add("Bloodworms", string.Format("{0:N2}*{1:P}", BloodwormsDPS, (float)BloodwormsDPS / DPSPoints));
            dictValues.Add("Other", string.Format("{0:N2}*{1:P}", OtherDPS, (float)OtherDPS / DPSPoints));
            dictValues.Add("Total DPS", DPSPoints.ToString("N2"));


            return(dictValues);
        }
        public override Dictionary <string, string> GetCharacterDisplayCalculationValues()
        {
            Dictionary <string, string> dictValues = new Dictionary <string, string>();
            string format   = "";
            int    LevelDif = combatFactors.levelDif;

            // Base Stats
            dictValues.Add("Health and Stamina", string.Format("{0:##,##0} : {1:##,##0}*" +
                                                               "{2:00,000} : Base Health" +
                                                               "\r\n{3:00,000} : Stam Bonus",
                                                               AverageStats.Health, AverageStats.Stamina,
                                                               BaseHealth,
                                                               StatConversion.GetHealthFromStamina(AverageStats.Stamina)));
            dictValues.Add("Armor", string.Format("{0}*Increases Attack Power by {1}", Armor, TeethBonus));
            #region Strength
            {
                int    formIter  = 1;
                string theFormat = "";

                float[] passiveContrsVals = new float[] {
                    combatFactors.Char.WarriorTalents.StrengthOfArms * 0.02f,
                    (combatFactors.FuryStance ? combatFactors.Char.WarriorTalents.ImprovedBerserkerStance * 0.04f : 0f),
                    BuffsStats.Strength,
                    BuffsStats.BonusStrengthMultiplier,
                };

                string[] passiveContrs = new string[] {
                    "Strength of Arms",
                    "Improved Berserker Stance",
                    "Buffs : Simple",
                    "Buffs : Multi",
                };

                theFormat += "{0:0.#}*"; // Averaged % and Averaged Rating
                theFormat += "The Pane shows Averaged Values";
                theFormat += "\r\n";
                theFormat += "\r\n= Your Passive Contributions =";
                theFormat += "\r\n{" + formIter.ToString() + ":00.#%} : " + passiveContrs[0]; formIter++;
                theFormat += "\r\n{" + formIter.ToString() + ":00.#%} : " + passiveContrs[1]; formIter++;
                theFormat += "\r\n{" + formIter.ToString() + ":0.#} : " + passiveContrs[2]; formIter++;
                theFormat += "\r\n{" + formIter.ToString() + ":00.#%} : " + passiveContrs[3]; formIter++;
                theFormat += "\r\n";
                theFormat += "\r\n= UnProc'd =";
                theFormat += "\r\nValue: {" + formIter.ToString() + ":0.#}"; formIter++;
                theFormat += "\r\nIncreases Attack Power by {" + formIter.ToString() + ":0.#}"; formIter++;
                theFormat += "\r\n";
                theFormat += "\r\n= Proc'd =";
                theFormat += "\r\nValue: {" + formIter.ToString() + ":0.#}"; formIter++;
                theFormat += "\r\nIncreases Attack Power by {" + formIter.ToString() + ":0.#}"; formIter++;

                dictValues.Add("Strength", string.Format(theFormat,
                                                         // Averaged Stats
                                                         AverageStats.Strength,
                                                         // Passive Contributions
                                                         passiveContrsVals[0], passiveContrsVals[1], passiveContrsVals[2], passiveContrsVals[3],
                                                         // UnProc'd Stats
                                                         BuffedStats.Strength,
                                                         BuffedStats.Strength * 2f,
                                                         // Proc'd Stats
                                                         MaximumStats.Strength,
                                                         MaximumStats.Strength * 2f
                                                         ));
            }
            #endregion
            dictValues.Add("Attack Power", string.Format("{0}*" +
                                                         "Increases White DPS by {1:0.0}\r\n" +
                                                         "\r\n" +
                                                         "Buffed: {2:0}\r\n" +
                                                         "Proc'd: {3:0}\r\n", (int)AverageStats.AttackPower, AverageStats.AttackPower / 14f,
                                                         BuffedStats.AttackPower, MaximumStats.AttackPower));
            #region Agility
            {
                int    formIter  = 1;
                string theFormat = "";

                float[] passiveContrsVals = new float[] {
                    BuffsStats.Agility,
                    BuffsStats.BonusAgilityMultiplier,
                };

                string[] passiveContrs = new string[] { "Buffs : Simple", "Buffs : Multi" };

                theFormat += "{0:0.#}*"; // Averaged % and Averaged Rating
                theFormat += "The Pane shows Averaged Values";
                theFormat += "\r\n";
                theFormat += "\r\n= Your Passive Contributions =";
                theFormat += "\r\n{" + formIter.ToString() + ":0.#} : " + passiveContrs[0]; formIter++;
                theFormat += "\r\n{" + formIter.ToString() + ":00.#%} : " + passiveContrs[1]; formIter++;
                theFormat += "\r\n";
                theFormat += "\r\n= UnProc'd =";
                theFormat += "\r\nIncreases Crit by {" + formIter.ToString() + ":0.#%}"; formIter++;
                theFormat += "\r\nIncreases Armor by {" + formIter.ToString() + ":0.#}"; formIter++;
                theFormat += "\r\n";
                theFormat += "\r\n= Proc'd =";
                theFormat += "\r\nIncreases Crit by {" + formIter.ToString() + ":0.#%}"; formIter++;
                theFormat += "\r\nIncreases Armor by {" + formIter.ToString() + ":0.#}"; formIter++;

                dictValues.Add("Agility", string.Format(theFormat,
                                                        // Averaged Stats
                                                        AverageStats.Agility,
                                                        // Passive Contributions
                                                        passiveContrsVals[0], passiveContrsVals[1],
                                                        // UnProc'd Stats
                                                        StatConversion.GetCritFromAgility(BuffedStats.Agility, CharacterClass.Warrior),
                                                        StatConversion.GetArmorFromAgility(BuffedStats.Agility),
                                                        // Proc'd Stats
                                                        StatConversion.GetCritFromAgility(MaximumStats.Agility, CharacterClass.Warrior),
                                                        StatConversion.GetArmorFromAgility(MaximumStats.Agility)
                                                        ));
            }
            #endregion
            #region Crit
            {
                // sub to add neg number as pos, for overcapping to compensate
                // for boss level on yellows (or whites, I dont remember which)
                // Whites clip crit cap with glances, dodges, parries, misses
                float WhCritCap = 1f;// +StatConversion.NPC_LEVEL_CRIT_MOD[LevelDif];
                //float YwCritCap = 1f + StatConversion.NPC_LEVEL_CRIT_MOD[LevelDif];
                if (combatFactors.useOH)
                {
                    WhCritCap -= (Whites.OHAtkTable.Glance + Whites.OHAtkTable.AnyNotLand);
                    //    YwCritCap -= (new AttackTable(combatFactors.Char, BuffedStats, combatFactors, combatFactors.CalcOpts, FW, false, false, false)).AnyNotLand;
                }
                else
                {
                    WhCritCap -= (Whites.MHAtkTable.Glance + Whites.MHAtkTable.AnyNotLand);
                    // Yellows clip crit cap with dodges, parries, misses
                    //    YwCritCap -= (new AttackTable(combatFactors.Char, BuffedStats, combatFactors, combatFactors.CalcOpts, FW, true, false, false)).AnyNotLand;
                }
                float useRamp = 0f;
                if (combatFactors.Char.WarriorTalents.Rampage > 0f)
                {
                    useRamp = 0.05f;
                }
                float[] passiveContrsVals = new float[] {
                    0.03192f,
                    AgilityCritBonus,
                    StatConversion.GetCritFromRating(BuffedStats.CritRating + BuffedStats.DeathbringerProc),
                    combatFactors.Char.WarriorTalents.Cruelty * 0.01f,
                    (combatFactors.FuryStance ? 0.03f : 0f),
                    (combatFactors.FuryStance ? AverageStats.BonusWarrior_T9_2P_Crit : 0f),
                    BonusCritPercPoleAxeSpec,
                    BuffsStats.PhysicalCrit + useRamp,
                };
                float passiveContrsTtlVal = passiveContrsVals[0] + passiveContrsVals[1] + passiveContrsVals[2]
                                            + passiveContrsVals[3] + passiveContrsVals[4] + passiveContrsVals[5]
                                            + passiveContrsVals[6] + passiveContrsVals[7];
                string[] passiveContrs = new string[] { "Base Crit", "From Agility", "From Crit Rating", "Cruelty",
                                                        "Berserker Stance", "T9 2P Set Bonus", "Poleaxe Specialization",
                                                        "Buffs" };

                //float WhUnProcdCrit = StatConversion.GetCritFromRating(BuffedStats.CritRating + BuffedStats.DeathbringerProc);
                float WhProcdCrit            = StatConversion.GetCritFromRating(MaximumStats.CritRating + MaximumStats.DeathbringerProc - BuffedStats.CritRating - BuffedStats.DeathbringerProc);
                bool  isWhUnProcdOverCap     = passiveContrsTtlVal > WhCritCap;
                bool  isWhProcdOverCap       = passiveContrsTtlVal + WhProcdCrit > WhCritCap;
                float amountWhUnProcdOverCap = Math.Abs(StatConversion.GetRatingFromCrit(WhCritCap - passiveContrsTtlVal));
                float amountWhProcdOverCap   = Math.Abs(StatConversion.GetRatingFromCrit(WhCritCap - (passiveContrsTtlVal + WhProcdCrit)));

                float YwUnProcdCrit = StatConversion.GetCritFromRating(BuffedStats.CritRating + BuffedStats.DeathbringerProc);
                float YwProcdCrit   = StatConversion.GetCritFromRating(MaximumStats.CritRating + MaximumStats.DeathbringerProc);
                //bool isYwUnProcdOverCap = passiveContrsTtlVal + YwUnProcdCrit > YwCritCap;
                //bool isYwProcdOverCap = passiveContrsTtlVal + YwProcdCrit > YwCritCap;
                //float amountYwUnProcdOverCap = Math.Abs(StatConversion.GetRatingFromCrit(YwCritCap - (passiveContrsTtlVal + YwUnProcdCrit)));
                //float amountYwProcdOverCap = Math.Abs(StatConversion.GetRatingFromCrit(YwCritCap - (passiveContrsTtlVal + YwProcdCrit)));

                string theFormat = GenFormattedString(passiveContrs, true,
                                                      isWhUnProcdOverCap, isWhProcdOverCap
                                                      //isYwUnProcdOverCap, isYwProcdOverCap
                                                      );

                dictValues.Add("Crit", string.Format(theFormat,
                                                     // Averaged Stats
                                                     CritPercent, AverageStats.CritRating,
                                                     // Passive Contributions
                                                     passiveContrsVals[0], passiveContrsVals[1], passiveContrsVals[2],
                                                     passiveContrsVals[3], passiveContrsVals[4], passiveContrsVals[5],
                                                     passiveContrsVals[6], passiveContrsVals[7],
                                                     // UnProc'd Stats
                                                     BuffedStats.CritRating + BuffedStats.DeathbringerProc,
                                                     Math.Min(WhCritCap, passiveContrsTtlVal), amountWhUnProcdOverCap,
                                                     //Math.Min(YwCritCap, passiveContrsTtlVal + YwUnProcdCrit), amountYwUnProcdOverCap,
                                                     // Proc'd Stats
                                                     MaximumStats.CritRating + MaximumStats.DeathbringerProc,
                                                     Math.Min(WhCritCap, passiveContrsTtlVal + WhProcdCrit), amountWhProcdOverCap
                                                     //Math.Min(YwCritCap, passiveContrsTtlVal + YwProcdCrit), amountYwProcdOverCap
                                                     ));
            }
            #endregion
            #region Armor Penetration
            {
                float   ArPCap            = 1.00f;
                float[] passiveContrsVals = new float[] {
                    (!combatFactors.FuryStance ? 0.10f : 0f),
                    (!combatFactors.FuryStance ? AverageStats.BonusWarrior_T9_2P_ArP : 0f),
                    ArmorPenetrationMaceSpec
                };
                float    passiveContrsTtlVal  = passiveContrsVals[0] + passiveContrsVals[1] + passiveContrsVals[2];
                string[] passiveContrs        = new string[] { "Battle Stance", "T9 2P Set Bonus", "Mace Specialization" };
                float    UnProcdArP           = StatConversion.GetArmorPenetrationFromRating(BuffedStats.ArmorPenetrationRating);
                float    ProcdArP             = StatConversion.GetArmorPenetrationFromRating(MaximumStats.ArmorPenetrationRating);
                bool     isUnProcdOverCap     = passiveContrsTtlVal + UnProcdArP > ArPCap;
                bool     isProcdOverCap       = passiveContrsTtlVal + ProcdArP > ArPCap;
                float    amountUnProcdOverCap = Math.Abs(StatConversion.GetRatingFromArmorPenetration(ArPCap - (passiveContrsTtlVal + UnProcdArP)));
                float    amountProcdOverCap   = Math.Abs(StatConversion.GetRatingFromArmorPenetration(ArPCap - (passiveContrsTtlVal + ProcdArP)));
                string   theFormat            = GenFormattedString(passiveContrs, true, isUnProcdOverCap, isProcdOverCap);
                dictValues.Add("Armor Penetration", string.Format(theFormat,
                                                                  // Averaged Stats
                                                                  ArmorPenetration, AverageStats.ArmorPenetrationRating,
                                                                  // Passive Contributions
                                                                  passiveContrsVals[0], passiveContrsVals[1], passiveContrsVals[2],
                                                                  // UnProc'd Stats
                                                                  BuffedStats.ArmorPenetrationRating,
                                                                  Math.Min(ArPCap, passiveContrsTtlVal + UnProcdArP),
                                                                  amountUnProcdOverCap,
                                                                  // Proc'd Stats
                                                                  MaximumStats.ArmorPenetrationRating,
                                                                  Math.Min(ArPCap, passiveContrsTtlVal + ProcdArP),
                                                                  amountProcdOverCap
                                                                  ));
            }
            #endregion
            #region Haste
            {
                // Haste has no cap? Shouldn't there be a 100% cap or something?
                // We should also state the before/after effects of haste on white swings
                // Maybe a good point to show how much swing time is lost to Slams too?
                float heroism = 0f;
                if (BuffsStats._rawSpecialEffectData != null)
                {
                    foreach (SpecialEffect effect in BuffsStats._rawSpecialEffectData)
                    {
                        if (effect != null && effect.Stats.PhysicalHaste > 0)
                        {
                            heroism = effect.GetAverageStats().PhysicalHaste;
                        }
                    }
                }
                float[] passiveContrsVals = new float[] {
                    combatFactors.Char.WarriorTalents.BloodFrenzy * 0.05f,
                        BuffsStats.PhysicalHaste,
                        heroism,
                };
                float passiveContrsTtlVal = (1f + passiveContrsVals[0])
                                            * (1f + passiveContrsVals[1])
                                            * (1f + passiveContrsVals[2])
                                            - 1f;
                string[] passiveContrs = new string[] { "Blood Frenzy", "Buffs", "Heroism (Averaged)" };
                float    UnProcdHaste  = StatConversion.GetHasteFromRating(BuffedStats.HasteRating, CharacterClass.Warrior);
                float    ProcdHaste    = StatConversion.GetHasteFromRating(MaximumStats.HasteRating, CharacterClass.Warrior);
                string   theFormat     = GenFormattedString(passiveContrs);

                dictValues.Add("Haste", string.Format(theFormat,
                                                      // Averaged Stats
                                                      HastePercent, AverageStats.HasteRating,
                                                      // Passive Contributions
                                                      passiveContrsVals[0], passiveContrsVals[1], passiveContrsVals[2],
                                                      // UnProc'd Stats
                                                      BuffedStats.HasteRating,
                                                      (1f + passiveContrsTtlVal) * (1f + UnProcdHaste) - 1f,
                                                      // Proc'd Stats
                                                      MaximumStats.HasteRating,
                                                      (1f + passiveContrsTtlVal) * (1f + ProcdHaste) - 1f
                                                      ));
            }
            #endregion
            #region Hit
            {
                // old
                float HitPercent   = StatConversion.GetHitFromRating(HitRating);
                float HitPercBonus = AverageStats.PhysicalHit;
                // Hit Soft Cap ratings check, how far from it
                float capA1         = StatConversion.WHITE_MISS_CHANCE_CAP[LevelDif];
                float convcapA1     = (float)Math.Ceiling(StatConversion.GetRatingFromHit(capA1));
                float sec2lastNumA1 = (convcapA1 - StatConversion.GetRatingFromHit(HitPercent) - StatConversion.GetRatingFromHit(HitPercBonus)) * -1;
                //float lastNumA1    = StatConversion.GetRatingFromExpertise((convcapA1 - Math.Min(MhExpertise, (OhExpertise != 0 ? OhExpertise : MhExpertise))) * -1);
                // Hit Hard Cap ratings check, how far from it
                float capA2         = StatConversion.WHITE_MISS_CHANCE_CAP_DW[LevelDif];
                float convcapA2     = (float)Math.Ceiling(StatConversion.GetRatingFromHit(capA2));
                float sec2lastNumA2 = (convcapA2 - StatConversion.GetRatingFromHit(HitPercent) - StatConversion.GetRatingFromHit(HitPercBonus)) * -1;
                //float lastNumA2   = StatConversion.GetRatingFromExpertise((sec2lastNumA2 - Math.Min(MhExpertise, (OhExpertise != 0 ? OhExpertise : MhExpertise))) * -1);
                dictValues.Add("Hit",
                               string.Format("{0:00.00%} : {1}*" + "{2:0.00%} : From Other Bonuses" +
                                             "\r\n{3:0.00%} : Total Hit % Bonus" +
                                             "\r\n\r\nWhite Two-Hander Cap: " +
                                             (sec2lastNumA1 > 0 ? "You can free {4:0} Rating"
                                                       : "You need {4:0} more Rating") +
                                             "\r\nWhite Dual Wield Cap: " +
                                             (sec2lastNumA2 > 0 ? "You can free {5:0} Rating"
                                                       : "You need {5:0} more Rating"),
                                             StatConversion.GetHitFromRating(AverageStats.HitRating),
                                             AverageStats.HitRating,
                                             HitPercBonus,
                                             HitPercent + HitPercBonus,
                                             (sec2lastNumA1 > 0 ? sec2lastNumA1 : sec2lastNumA1 * -1),
                                             (sec2lastNumA2 > 0 ? sec2lastNumA2 : sec2lastNumA2 * -1)
                                             ));
            }
            #endregion
            #region Expertise
            {
                // Dodge Cap ratings check, how far from it, uses lesser of MH and OH
                // Also factors in Weapon Mastery
                float capB1         = StatConversion.YELLOW_DODGE_CHANCE_CAP[LevelDif] - WeapMastPerc;
                float convcapB1     = (float)Math.Ceiling(StatConversion.GetExpertiseFromDodgeParryReduc(capB1));
                float sec2lastNumB1 = (convcapB1 - Math.Min(MhExpertise, (OhExpertise != 0 ? OhExpertise : MhExpertise))) * -1;
                float lastNumB1     = StatConversion.GetRatingFromExpertise((convcapB1 - WeapMastPerc - Math.Min(MhExpertise, (OhExpertise != 0 ? OhExpertise : MhExpertise))) * -1);
                // Parry Cap ratings check, how far from it, uses lesser of MH and OH
                float capB2         = StatConversion.YELLOW_PARRY_CHANCE_CAP[LevelDif];
                float convcapB2     = (float)Math.Ceiling(StatConversion.GetExpertiseFromDodgeParryReduc(capB2));
                float sec2lastNumB2 = (convcapB2 - Math.Min(MhExpertise, (OhExpertise != 0 ? OhExpertise : MhExpertise))) * -1;
                float lastNumB2     = StatConversion.GetRatingFromExpertise((convcapB2 - Math.Min(MhExpertise, (OhExpertise != 0 ? OhExpertise : MhExpertise))) * -1);
                dictValues.Add("Expertise",
                               string.Format("{0:00.00%} : {1:00.00} : {2}*" +
                                             "Following includes Racial bonus and Strength of Arms" +
                                             "\r\n{3:00.00%} Weapon Mastery (Dodge Only)" +
                                             "\r\n{4:00.00%} : {5:00.00} : MH" +
                                             "\r\n{6:00.00%} : {7:00.00} : OH" +
                                             "\r\n\r\n" + "Dodge Cap: " +
                                             (lastNumB1 > 0 ? "You can free {8:0} Expertise ({9:0} Rating)"
                                 : "You need {8:0} more Expertise ({9:0} Rating)") +
                                             "\r\n" + "Parry Cap: " +
                                             (lastNumB2 > 0 ? "You can free {10:0} Expertise ({11:0} Rating)"
                                 : "You need {10:0} more Expertise ({11:0} Rating)"),
                                             StatConversion.GetDodgeParryReducFromExpertise(Expertise),
                                             Expertise,
                                             AverageStats.ExpertiseRating,
                                             WeapMastPerc,
                                             StatConversion.GetDodgeParryReducFromExpertise(MhExpertise), MhExpertise,
                                             StatConversion.GetDodgeParryReducFromExpertise(OhExpertise), OhExpertise,
                                             (sec2lastNumB1 > 0 ? sec2lastNumB1 : sec2lastNumB1 * -1), (lastNumB1 > 0 ? lastNumB1 : lastNumB1 * -1),
                                             (sec2lastNumB2 > 0 ? sec2lastNumB2 : sec2lastNumB2 * -1), (lastNumB2 > 0 ? lastNumB2 : lastNumB2 * -1)
                                             ));
            }
            #endregion

            dictValues.Add("Description", string.Format("DPS : PerHit : #ActsD"));
            // DPS Abilities
            format = "{0:0000} : {1:00000} : {2:000.00}";
            if (TotalDPS < 0f)
            {
                TotalDPS = 0f;
            }
            foreach (Rawr.DPSWarr.Rotation.AbilWrapper aw in Rot.GetAbilityList())
            {
                if (!aw.ability.Name.Equals("Invalid"))
                {
                    dictValues.Add(aw.ability.Name, string.Format(format, aw.allDPS, aw.ability.DamageOnUse, aw.allNumActivates)
                                   + aw.ability.GenTooltip(aw.allNumActivates, aw.allDPS / TotalDPS));
                }
            }
            // DPS General
            dictValues.Add("White DPS", string.Format("{0:0000} : {1:00000}", WhiteDPS, WhiteDmg) + Whites.GenTooltip(WhiteDPSMH, WhiteDPSOH, TotalDPS));
            dictValues.Add("Deep Wounds", string.Format("{0:0000}*{1:00.0%} of DPS", Rot.DW.TickSize, Rot.DW.TickSize / TotalDPS));
            dictValues.Add("Special DMG Procs", string.Format("{0:0000}*{1:00.0%} of DPS", SpecProcDPS, SpecProcDPS / TotalDPS));
            dictValues.Add("Total DPS", string.Format("{0:#,##0} : {1:#,###,##0}*" + Rot.GCDUsage, TotalDPS, TotalDPS * Duration));
            // Rage
            format = "{0:0000}";
            dictValues.Add("Total Generated Rage", string.Format("{0:00} = {1:0} + {2:0}", WhiteRage + OtherRage, WhiteRage, OtherRage));
            dictValues.Add("Needed Rage for Abilities", string.Format(format, NeedyRage));
            dictValues.Add("Available Free Rage", string.Format(format, FreeRage));
#if (!RAWR3 && DEBUG)
            dictValues.Add("Calculation Time", string.Format("{0}", calculationTime));
#endif
            return(dictValues);
        }
Exemple #11
0
        public override Dictionary <string, string> GetCharacterDisplayCalculationValues()
        {
            Dictionary <string, string> dictValues = new Dictionary <string, string>();

            try
            {
                dictValues.Add("Overall Points", OverallPoints.ToString());
                dictValues.Add("DPS Points", DPSPoints.ToString());
                dictValues.Add("Survivability Points", SurvivabilityPoints.ToString());

                float baseMiss  = StatConversion.WHITE_MISS_CHANCE_CAP[TargetLevel - 85] - BasicStats.PhysicalHit;
                float baseDodge = StatConversion.WHITE_DODGE_CHANCE_CAP[TargetLevel - 85] - StatConversion.GetDodgeParryReducFromExpertise(BasicStats.Expertise);
                float capMiss   = (float)Math.Ceiling(baseMiss * StatConversion.RATING_PER_PHYSICALHIT);
                float capDodge  = (float)Math.Ceiling(baseDodge * 400f * StatConversion.RATING_PER_EXPERTISE);

                string tipMiss = string.Empty;
                if (BasicStats.HitRating > capMiss)
                {
                    tipMiss = string.Format("*Hit Rating %: {0}%\nOver the cap by {1} Hit Rating", StatConversion.GetPhysicalHitFromRating(BasicStats.HitRating) * 100, BasicStats.HitRating - capMiss);
                }
                else if (BasicStats.HitRating < capMiss)
                {
                    tipMiss = string.Format("*Hit Rating %: {0}%\nUnder the cap by {1} Hit Rating", StatConversion.GetPhysicalHitFromRating(BasicStats.HitRating) * 100, capMiss - BasicStats.HitRating);
                }
                else
                {
                    tipMiss = string.Format("*Hit Rating %: {0}%\nExactly at the cap", StatConversion.GetPhysicalHitFromRating(BasicStats.HitRating) * 100);
                }

                string tipDodge = string.Empty;
                if (BasicStats.ExpertiseRating > capDodge)
                {
                    tipDodge = string.Format("*Expertise Rating %: {0}%\nOver the cap by {1} Expertise Rating", StatConversion.GetExpertiseFromRating(BasicStats.ExpertiseRating) * 0.25f, BasicStats.ExpertiseRating - capDodge);
                }
                else if (BasicStats.ExpertiseRating < capDodge)
                {
                    tipDodge = string.Format("*Expertise Rating %: {0}%\nUnder the cap by {1} Expertise Rating", StatConversion.GetExpertiseFromRating(BasicStats.ExpertiseRating) * 0.25f, capDodge - BasicStats.ExpertiseRating);
                }
                else
                {
                    tipDodge = string.Format("*Expertise Rating %: {0}%\nExactly at the cap", StatConversion.GetExpertiseFromRating(BasicStats.ExpertiseRating) * 0.25f);
                }

                string tipHaste = string.Format("*Haste Rating %: {0}%", StatConversion.GetPhysicalHasteFromRating(BasicStats.HasteRating, CharacterClass.Druid) * 100f);

                string tipMastery = string.Format("*Increases the damage done by your bleed abilities by {0}%", ((StatConversion.GetMasteryFromRating(BasicStats.MasteryRating, CharacterClass.Druid) + 8f) * 0.031f) * 100f);

                dictValues.Add("Health", BasicStats.Health.ToString());
                dictValues.Add("Attack Power", BasicStats.AttackPower.ToString());
                dictValues.Add("Agility", BasicStats.Agility.ToString());
                dictValues.Add("Strength", BasicStats.Strength.ToString());
                dictValues.Add("Crit Rating", BasicStats.CritRating.ToString());
                dictValues.Add("Hit Rating", BasicStats.HitRating.ToString() + tipMiss);
                dictValues.Add("Expertise Rating", BasicStats.ExpertiseRating.ToString() + tipDodge);
                dictValues.Add("Mastery Rating", BasicStats.MasteryRating.ToString() + tipMastery);
                dictValues.Add("Haste Rating", BasicStats.HasteRating.ToString() + tipHaste);

                dictValues.Add("Avoided Attacks", string.Format("{0}%*{1}% Dodged, {2}% Missed", AvoidedAttacks, DodgedAttacks, MissedAttacks));
                dictValues.Add("Crit Chance", CritChance.ToString() + "%");
                dictValues.Add("Attack Speed", AttackSpeed.ToString() + "s");
                dictValues.Add("Armor Mitigation", ArmorMitigation.ToString() + "%");

                dictValues.Add("Optimal Rotation", HighestDPSRotation.ToString());
                //dictValues.Add("Optimal Rotation DPS", HighestDPSRotation.DPS.ToString());
                //dictValues.Add("Custom Rotation DPS", CustomRotation.DPS.ToString());


                float chanceNonAvoided = 1f - (AvoidedAttacks / 100f);
                dictValues.Add("Melee", Abilities.MeleeStats.ToString());
                dictValues.Add("Mangle", Abilities.MangleStats.ToString());
                dictValues.Add("Shred", Abilities.ShredStats.ToString());
                dictValues.Add("Ravage", Abilities.RavageStats.ToString());
                dictValues.Add("Rake", Abilities.RakeStats.ToString());
                dictValues.Add("Rip", Abilities.RipStats.ToString());
                dictValues.Add("Bite", Abilities.BiteStats.ToString());


                //string[] abilityStats = MeleeStats.GetStatsTexts(HighestDPSRotation.MeleeCount, 0, HighestDPSRotation.TotalDamage, chanceNonAvoided, Duration);
                //dictValues.Add("Melee Usage", abilityStats[0]);
                //dictValues.Add("Melee Stats", abilityStats[1]);
                //abilityStats = MangleStats.GetStatsTexts(HighestDPSRotation.MangleCount, 0, HighestDPSRotation.TotalDamage, chanceNonAvoided, Duration);
                //dictValues.Add("Mangle Usage", abilityStats[0]);
                //dictValues.Add("Mangle Stats", abilityStats[1]);
                //abilityStats = ShredStats.GetStatsTexts(HighestDPSRotation.ShredCount, 0, HighestDPSRotation.TotalDamage, chanceNonAvoided, Duration);
                //dictValues.Add("Shred Usage", abilityStats[0]);
                //dictValues.Add("Shred Stats", abilityStats[1]);
                //abilityStats = RakeStats.GetStatsTexts(HighestDPSRotation.RakeCount, 0, HighestDPSRotation.TotalDamage, chanceNonAvoided, Duration);
                //dictValues.Add("Rake Usage", abilityStats[0]);
                //dictValues.Add("Rake Stats", abilityStats[1]);
                //abilityStats = RipStats.GetStatsTexts(HighestDPSRotation.RipCount, 0, HighestDPSRotation.TotalDamage, chanceNonAvoided, Duration);
                //dictValues.Add("Rip Usage", abilityStats[0]);
                //dictValues.Add("Rip Stats", abilityStats[1]);
                //abilityStats = RoarStats.GetStatsTexts(HighestDPSRotation.RoarCount, HighestDPSRotation.RoarCP, HighestDPSRotation.TotalDamage, chanceNonAvoided, Duration);
                //dictValues.Add("Roar Usage", abilityStats[0]);
                //dictValues.Add("Roar Stats", abilityStats[1]);
                //abilityStats = BiteStats.GetStatsTexts(HighestDPSRotation.BiteCount, HighestDPSRotation.BiteCP, HighestDPSRotation.TotalDamage, chanceNonAvoided, Duration);
                //dictValues.Add("Bite Usage", abilityStats[0]);
                //dictValues.Add("Bite Stats", abilityStats[1]);

                //string attackFormat = "{0}%*Damage Per Hit: {1}, Damage Per Swing: {2}\r\n{0}% of Total Damage, {3} Damage Done";
                //dictValues.Add("Melee Damage", string.Empty);//.Format(attackFormat, 100f * HighestDPSRotation.MeleeDamageTotal / HighestDPSRotation.DamageTotal, MeleeDamagePerHit, MeleeDamagePerSwing, HighestDPSRotation.MeleeDamageTotal));
                //dictValues.Add("Mangle Damage", string.Empty);//.Format(attackFormat, 100f * HighestDPSRotation.MangleDamageTotal / HighestDPSRotation.DamageTotal, MangleDamagePerHit, MangleDamagePerSwing, HighestDPSRotation.MangleDamageTotal));
                //dictValues.Add("Shred Damage", string.Empty);//.Format(attackFormat, 100f * HighestDPSRotation.ShredDamageTotal / HighestDPSRotation.DamageTotal, ShredDamagePerHit, ShredDamagePerSwing, HighestDPSRotation.ShredDamageTotal));
                //dictValues.Add("Rake Damage", string.Empty);//.Format(attackFormat, 100f * HighestDPSRotation.RakeDamageTotal / HighestDPSRotation.DamageTotal, RakeDamagePerHit, RakeDamagePerSwing, HighestDPSRotation.RakeDamageTotal));
                //dictValues.Add("Rip Damage", string.Empty);//.Format(attackFormat, 100f * HighestDPSRotation.RipDamageTotal / HighestDPSRotation.DamageTotal, RipDamagePerHit, RipDamagePerSwing, HighestDPSRotation.RipDamageTotal));
                //dictValues.Add("Bite Damage", string.Empty);//.Format(attackFormat, 100f * HighestDPSRotation.BiteDamageTotal / HighestDPSRotation.DamageTotal, BiteDamagePerHit, BiteDamagePerSwing, HighestDPSRotation.BiteDamageTotal));

                //string rotationDescription = string.Empty;
                //try
                //{
                //    rotationDescription = string.Format("{0}*Keep {1}cp Savage Roar up.\r\n{2}{3}{4}{5}Use {6} for combo points.",
                //        HighestDPSRotation.Name.Replace(" + ", "+"), HighestDPSRotation.RoarCP,
                //        HighestDPSRotation.Name.Contains("Rake") ? "Keep Rake up.\r\n" : "",
                //        HighestDPSRotation.Name.Contains("Rip") ? "Keep 5cp Rip up.\r\n" : "",
                //        HighestDPSRotation.Name.Contains("Mangle") ? "Keep Mangle up.\r\n" : "",
                //        HighestDPSRotation.Name.Contains("Bite") ? string.Format("Use {0}cp Ferocious Bites to spend extra combo points.\r\n", HighestDPSRotation.BiteCP) : "",
                //        HighestDPSRotation.Name.Contains("Shred") ? "Shred" : "Mangle");
                //}
                //catch (Exception ex)
                //{
                //    ex.ToString();
                //}
            }
            catch (Exception ex)
            {
                new Base.ErrorBox()
                {
                    Title        = "Error Getting Cat Dictionary Values",
                    Function     = "GetCharacterDisplayCalculationValues()",
                    TheException = ex,
                }.Show();
            }
            return(dictValues);
        }
        public override Dictionary <string, string> GetCharacterDisplayCalculationValues()
        {
            Dictionary <string, string> dictValues = new Dictionary <string, string>();

            try {
                string format   = "";
                int    LevelDif = CombatFactors.LevelDif;

                // Base Stats
                #region Health & Stamina
                dictValues.Add("Health and Stamina", string.Format("{0:##,##0} : {1:##,##0}*" +
                                                                   "{2:00,000} : Base Health" +
                                                                   "\r\n{3:00,000} : Stam Bonus",
                                                                   AverageStats.Health, AverageStats.Stamina,
                                                                   BaseHealth,
                                                                   StatConversion.GetHealthFromStamina(AverageStats.Stamina)));
                #endregion
                dictValues.Add("Armor", string.Format("{0}", Armor));
                #region Strength
                {
                    int    formIter  = 1;
                    string theFormat = "";

                    float[] passiveContrsVals = new float[] {
                        BuffsStats.Strength,
                        BuffsStats.BonusStrengthMultiplier,
                        PlateSpecValid ? 0.05f : 0.00f,
                    };

                    string[] passiveContrs = new string[] {
                        "Buffs : Simple",
                        "Buffs : Multi",
                        "Plate Specialization",
                    };

                    theFormat += "{0:0.#}*"; // Averaged % and Averaged Rating
                    theFormat += "The Pane shows Averaged Values*";
                    //theFormat += "\r\n";
                    theFormat += "\r\n= Your Passive Contributions =";
                    theFormat += "\r\n{" + string.Format("{0}", formIter) + ":0.#} : " + passiveContrs[0]; formIter++;
                    theFormat += "\r\n{" + string.Format("{0}", formIter) + ":00.#%} : " + passiveContrs[1]; formIter++;
                    theFormat += "\r\n{" + string.Format("{0}", formIter) + ":00.#%} : " + passiveContrs[2]; formIter++;
                    theFormat += "\r\n";
                    theFormat += "\r\n= UnProc'd =";
                    theFormat += "\r\nValue: {" + string.Format("{0}", formIter) + ":0.#}"; formIter++;
                    theFormat += "\r\nIncreases Attack Power by {" + string.Format("{0}", formIter) + ":0.#}"; formIter++;
                    theFormat += "\r\n";
                    theFormat += "\r\n= Proc'd =";
                    theFormat += "\r\nValue: {" + string.Format("{0}", formIter) + ":0.#}"; formIter++;
                    theFormat += "\r\nIncreases Attack Power by {" + string.Format("{0}", formIter) + ":0.#}"; formIter++;

                    dictValues.Add("Strength", string.Format(theFormat,
                                                             // Averaged Stats
                                                             AverageStats.Strength,
                                                             // Passive Contributions
                                                             passiveContrsVals[0], passiveContrsVals[1], passiveContrsVals[2],
                                                             // UnProc'd Stats
                                                             BuffedStats.Strength,
                                                             BuffedStats.Strength * 2f,
                                                             // Proc'd Stats
                                                             MaximumStats.Strength,
                                                             MaximumStats.Strength * 2f
                                                             ));
                }
                #endregion
                #region Attack Power
                dictValues.Add("Attack Power", string.Format("{0}*" +
                                                             "Increases White DPS by {1:0.0}\r\n" +
                                                             "\r\n" +
                                                             "Buffed: {2:0}\r\n" +
                                                             "Proc'd: {3:0}", (int)AverageStats.AttackPower, AverageStats.AttackPower / 14f,
                                                             BuffedStats.AttackPower, MaximumStats.AttackPower));
                #endregion
                #region Agility
                {
                    int    formIter  = 1;
                    string theFormat = "";

                    float[] passiveContrsVals = new float[] {
                        BuffsStats.Agility,
                        BuffsStats.BonusAgilityMultiplier,
                    };

                    string[] passiveContrs = new string[] { "Buffs : Simple", "Buffs : Multi" };

                    theFormat += "{0:0.#}*"; // Averaged % and Averaged Rating
                    theFormat += "The Pane shows Averaged Values*";
                    //theFormat += "\r\n";
                    theFormat += "\r\n= Your Passive Contributions =";
                    theFormat += "\r\n{" + string.Format("{0}", formIter) + ":0.#} : " + passiveContrs[0]; formIter++;
                    theFormat += "\r\n{" + string.Format("{0}", formIter) + ":00.#%} : " + passiveContrs[1]; formIter++;
                    theFormat += "\r\n";
                    theFormat += "\r\n= UnProc'd =";
                    theFormat += "\r\nIncreases Crit by {" + string.Format("{0}", formIter) + ":0.#%}"; formIter++;
                    //theFormat += "\r\nIncreases Armor by {" + string.Format("{0}", formIter) + ":0.#}"; formIter++;
                    theFormat += "\r\n";
                    theFormat += "\r\n= Proc'd =";
                    theFormat += "\r\nIncreases Crit by {" + string.Format("{0}", formIter) + ":0.#%}"; formIter++;
                    //theFormat += "\r\nIncreases Armor by {" + string.Format("{0}", formIter) + ":0.#}"; formIter++;

                    dictValues.Add("Agility", string.Format(theFormat,
                                                                                                                                            // Averaged Stats
                                                            AverageStats.Agility,
                                                                                                                                            // Passive Contributions
                                                            passiveContrsVals[0], passiveContrsVals[1],
                                                                                                                                            // UnProc'd Stats
                                                            StatConversion.GetCritFromAgility(BuffedStats.Agility, CharacterClass.Warrior),
                                                                                                                                            //StatConversion.GetArmorFromAgility(BuffedStats.Agility),
                                                                                                                                            // Proc'd Stats
                                                            StatConversion.GetCritFromAgility(MaximumStats.Agility, CharacterClass.Warrior) //,
                                                                                                                                            //StatConversion.GetArmorFromAgility(MaximumStats.Agility)
                                                            ));
                }
                #endregion
                #region Crit
                {
                    // sub to add neg number as pos, for overcapping to compensate
                    // for boss level on yellows (or whites, I dont remember which)
                    // Whites clip crit cap with glances, dodges, parries, misses
                    float WhCritCap = 1f;// +StatConversion.NPC_LEVEL_CRIT_MOD[LevelDif];
                    //float YwCritCap = 1f + StatConversion.NPC_LEVEL_CRIT_MOD[LevelDif];
                    if (CombatFactors.useOH)
                    {
                        WhCritCap -= (Whites.OHAtkTable.Glance + Whites.OHAtkTable.AnyNotLand);
                        //    YwCritCap -= (new AttackTable(combatFactors.Char, BuffedStats, combatFactors, combatFactors.CalcOpts, FW, false, false, false)).AnyNotLand;
                    }
                    else
                    {
                        WhCritCap -= (Whites.MHAtkTable.Glance + Whites.MHAtkTable.AnyNotLand);
                        // Yellows clip crit cap with dodges, parries, misses
                        //    YwCritCap -= (new AttackTable(combatFactors.Char, BuffedStats, combatFactors, combatFactors.CalcOpts, FW, true, false, false)).AnyNotLand;
                    }
                    float useRamp = 0f;
                    if (CombatFactors.Char.WarriorTalents.Rampage > 0f)
                    {
                        useRamp = 0.05f + 0.02f;
                    }
                    float[] passiveContrsVals = new float[] {
                        0.03192f,
                        AgilityCritBonus,
                        StatConversion.GetCritFromRating(BuffedStats.CritRating),
                        BuffsStats.PhysicalCrit + useRamp,
                    };
                    float passiveContrsTtlVal = passiveContrsVals[0] + passiveContrsVals[1]
                                                + passiveContrsVals[2] + passiveContrsVals[3];
                    string[] passiveContrs = new string[] { "Base Crit", "From Agility", "From Crit Rating", "Buffs" };

                    //float WhUnProcdCrit = StatConversion.GetCritFromRating(BuffedStats.CritRating + BuffedStats.DeathbringerProc);
                    float WhProcdCrit            = StatConversion.GetCritFromRating(MaximumStats.CritRating - BuffedStats.CritRating);
                    bool  isWhUnProcdOverCap     = passiveContrsTtlVal > WhCritCap;
                    bool  isWhProcdOverCap       = passiveContrsTtlVal + WhProcdCrit > WhCritCap;
                    float amountWhUnProcdOverCap = Math.Abs(StatConversion.GetRatingFromCrit(WhCritCap - passiveContrsTtlVal));
                    float amountWhProcdOverCap   = Math.Abs(StatConversion.GetRatingFromCrit(WhCritCap - (passiveContrsTtlVal + WhProcdCrit)));

                    //float YwUnProcdCrit = StatConversion.GetCritFromRating(BuffedStats.CritRating + BuffedStats.DeathbringerProc);
                    //float YwProcdCrit = StatConversion.GetCritFromRating(MaximumStats.CritRating + MaximumStats.DeathbringerProc);
                    //bool isYwUnProcdOverCap = passiveContrsTtlVal + YwUnProcdCrit > YwCritCap;
                    //bool isYwProcdOverCap = passiveContrsTtlVal + YwProcdCrit > YwCritCap;
                    //float amountYwUnProcdOverCap = Math.Abs(StatConversion.GetRatingFromCrit(YwCritCap - (passiveContrsTtlVal + YwUnProcdCrit)));
                    //float amountYwProcdOverCap = Math.Abs(StatConversion.GetRatingFromCrit(YwCritCap - (passiveContrsTtlVal + YwProcdCrit)));

                    string theFormat = GenFormattedString(passiveContrs, true,
                                                          isWhUnProcdOverCap, isWhProcdOverCap
                                                          //isYwUnProcdOverCap, isYwProcdOverCap
                                                          );

                    dictValues.Add("Crit", string.Format(theFormat,
                                                         // Averaged Stats
                                                         CritPercent, AverageStats.CritRating,
                                                         // Passive Contributions
                                                         passiveContrsVals[0], passiveContrsVals[1],
                                                         passiveContrsVals[2], passiveContrsVals[3],
                                                         // UnProc'd Stats
                                                         BuffedStats.CritRating,
                                                         Math.Min(WhCritCap, passiveContrsTtlVal), amountWhUnProcdOverCap,
                                                         //Math.Min(YwCritCap, passiveContrsTtlVal + YwUnProcdCrit), amountYwUnProcdOverCap,
                                                         // Proc'd Stats
                                                         MaximumStats.CritRating,
                                                         Math.Min(WhCritCap, passiveContrsTtlVal + WhProcdCrit), amountWhProcdOverCap
                                                         //Math.Min(YwCritCap, passiveContrsTtlVal + YwProcdCrit), amountYwProcdOverCap
                                                         ));
                }
                #endregion
                #region Armor Penetration
                {
                    //float ArPCap = 1.00f;
                    //float[] passiveContrsVals = new float[] { 1.00f };
                    //float passiveContrsTtlVal = passiveContrsVals[0];
                    //string[] passiveContrs = new string[] { "Colossus Smash (6 sec/20 sec). Sudden Death resets cooldown sooner." };
                    //float UnProcdArP = StatConversion.GetArmorPenetrationFromRating(BuffedStats.ArmorPenetrationRating);
                    //float ProcdArP = StatConversion.GetArmorPenetrationFromRating(MaximumStats.ArmorPenetrationRating);
                    //bool isUnProcdOverCap = passiveContrsTtlVal + UnProcdArP > ArPCap;
                    //bool isProcdOverCap = passiveContrsTtlVal + ProcdArP > ArPCap;
                    //float amountUnProcdOverCap = Math.Abs(StatConversion.GetRatingFromArmorPenetration(ArPCap - (passiveContrsTtlVal + UnProcdArP)));
                    //float amountProcdOverCap = Math.Abs(StatConversion.GetRatingFromArmorPenetration(ArPCap - (passiveContrsTtlVal + ProcdArP)));
                    //string theFormat = GenFormattedString(passiveContrs, true, isUnProcdOverCap, isProcdOverCap);
                    dictValues.Add("Armor Penetration", string.Format("{0:0%}",                                        //theFormat,
                                                                                                                       // Averaged Stats
                                                                      ArmorPenetration + AverageStats.ArmorPenetration //, AverageStats.ArmorPenetrationRating,
                                                                                                                       // Passive Contributions
                                                                                                                       //passiveContrsVals[0],
                                                                                                                       // UnProc'd Stats
                                                                                                                       //BuffedStats.ArmorPenetrationRating,
                                                                                                                       //Math.Min(ArPCap, passiveContrsTtlVal + UnProcdArP),
                                                                                                                       //amountUnProcdOverCap,
                                                                                                                       // Proc'd Stats
                                                                                                                       //MaximumStats.ArmorPenetrationRating,
                                                                                                                       //Math.Min(ArPCap, passiveContrsTtlVal + ProcdArP),
                                                                                                                       //amountProcdOverCap
                                                                      ));
                }
                #endregion
                #region Haste
                {
                    // Haste has no cap? Shouldn't there be a 100% cap or something?
                    // We should also state the before/after effects of haste on white swings
                    // Maybe a good point to show how much swing time is lost to Slams too?
                    float heroism = 0f;
                    if (BuffsStats._rawSpecialEffectData != null)
                    {
                        foreach (SpecialEffect effect in BuffsStats._rawSpecialEffectData)
                        {
                            if (effect != null && effect.Stats.PhysicalHaste > 0)
                            {
                                heroism = effect.GetAverageStats().PhysicalHaste;
                            }
                        }
                    }
                    float[] passiveContrsVals = new float[] {
                        CombatFactors.Char.WarriorTalents.BloodFrenzy * 0.025f,
                            BuffsStats.PhysicalHaste,
                            heroism,
                    };
                    float passiveContrsTtlVal = (1f + passiveContrsVals[0])
                                                * (1f + passiveContrsVals[1])
                                                * (1f + passiveContrsVals[2])
                                                - 1f;
                    string[] passiveContrs = new string[] { "Blood Frenzy", "Buffs", "Heroism (Averaged)" };
                    float    UnProcdHaste  = StatConversion.GetHasteFromRating(BuffedStats.HasteRating, CharacterClass.Warrior);
                    float    ProcdHaste    = StatConversion.GetHasteFromRating(MaximumStats.HasteRating, CharacterClass.Warrior);
                    string   theFormat     = GenFormattedString(passiveContrs);

                    dictValues.Add("Haste", string.Format(theFormat,
                                                          // Averaged Stats
                                                          HastePercent, AverageStats.HasteRating,
                                                          // Passive Contributions
                                                          passiveContrsVals[0], passiveContrsVals[1], passiveContrsVals[2],
                                                          // UnProc'd Stats
                                                          BuffedStats.HasteRating,
                                                          (1f + passiveContrsTtlVal) * (1f + UnProcdHaste) - 1f,
                                                          // Proc'd Stats
                                                          MaximumStats.HasteRating,
                                                          (1f + passiveContrsTtlVal) * (1f + ProcdHaste) - 1f
                                                          ));
                }
                #endregion
                #region Hit
                {
                    // old
                    float HitPercent   = StatConversion.GetHitFromRating(HitRating);
                    float HitPercBonus = AverageStats.PhysicalHit;
                    // Hit Soft Cap ratings check, how far from it
                    float capA1         = StatConversion.WHITE_MISS_CHANCE_CAP[LevelDif];
                    float convcapA1     = (float)Math.Ceiling(StatConversion.GetRatingFromHit(capA1));
                    float sec2lastNumA1 = (convcapA1 - StatConversion.GetRatingFromHit(HitPercent) - StatConversion.GetRatingFromHit(HitPercBonus)) * -1;
                    //float lastNumA1    = StatConversion.GetRatingFromExpertise((convcapA1 - Math.Min(MhExpertise, (OhExpertise != 0 ? OhExpertise : MhExpertise))) * -1);
                    // Hit Hard Cap ratings check, how far from it
                    float capA2         = StatConversion.WHITE_MISS_CHANCE_CAP_DW[LevelDif];
                    float convcapA2     = (float)Math.Ceiling(StatConversion.GetRatingFromHit(capA2));
                    float sec2lastNumA2 = (convcapA2 - StatConversion.GetRatingFromHit(HitPercent) - StatConversion.GetRatingFromHit(HitPercBonus)) * -1;
                    //float lastNumA2   = StatConversion.GetRatingFromExpertise((sec2lastNumA2 - Math.Min(MhExpertise, (OhExpertise != 0 ? OhExpertise : MhExpertise))) * -1);
                    dictValues.Add("Hit",
                                   string.Format("{0:000.00%} : {1}*" + "{2:0.00%} : From Other Bonuses" +
                                                 "\r\n{3:0.00%} : Total Hit % Bonus" +
                                                 "\r\n\r\nWhite Two-Hander Cap: " +
                                                 (sec2lastNumA1 > 0 ? "You can free {4:0} Rating"
                                                           : "You need {4:0} more Rating") +
                                                 "\r\nWhite Dual Wield Cap: " +
                                                 (sec2lastNumA2 > 0 ? "You can free {5:0} Rating"
                                                           : "You need {5:0} more Rating"),
                                                 StatConversion.GetHitFromRating(AverageStats.HitRating),
                                                 AverageStats.HitRating,
                                                 HitPercBonus,
                                                 HitPercent + HitPercBonus,
                                                 (sec2lastNumA1 > 0 ? sec2lastNumA1 : sec2lastNumA1 * -1),
                                                 (sec2lastNumA2 > 0 ? sec2lastNumA2 : sec2lastNumA2 * -1)
                                                 ));
                }
                #endregion
                #region Expertise
                {
                    // Dodge Cap ratings check, how far from it, uses lesser of MH and OH
                    // Also factors in Weapon Mastery
                    float capB1         = StatConversion.YELLOW_DODGE_CHANCE_CAP[LevelDif];
                    float convcapB1     = (float)Math.Ceiling(StatConversion.GetExpertiseFromDodgeParryReduc(capB1));
                    float sec2lastNumB1 = (convcapB1 - Math.Min(MHExpertise, (OHExpertise != 0 ? OHExpertise : MHExpertise))) * -1;
                    float lastNumB1     = StatConversion.GetRatingFromExpertise((convcapB1 - Math.Min(MHExpertise, (OHExpertise != 0 ? OHExpertise : MHExpertise))) * -1);
                    // Parry Cap ratings check, how far from it, uses lesser of MH and OH
                    float capB2         = StatConversion.YELLOW_PARRY_CHANCE_CAP[LevelDif];
                    float convcapB2     = (float)Math.Ceiling(StatConversion.GetExpertiseFromDodgeParryReduc(capB2));
                    float sec2lastNumB2 = (convcapB2 - Math.Min(MHExpertise, (OHExpertise != 0 ? OHExpertise : MHExpertise))) * -1;
                    float lastNumB2     = StatConversion.GetRatingFromExpertise((convcapB2 - Math.Min(MHExpertise, (OHExpertise != 0 ? OHExpertise : MHExpertise))) * -1);
                    dictValues.Add("Expertise",
                                   string.Format("{0:000.00%} : {1:00.00} : {2}*" +
                                                 "Following includes Racial bonus" +
                                                 "\r\n{3:00.00%} : {4:00.00} : MH" +
                                                 "\r\n{5:00.00%} : {6:00.00} : OH" +
                                                 "\r\n\r\n" + "Dodge Cap: " +
                                                 (lastNumB1 > 0 ? "You can free {7:0} Expertise ({8:0} Rating)"
                                     : "You need {7:0} more Expertise ({8:0} Rating)") +
                                                 "\r\n" + "Parry Cap: " +
                                                 (lastNumB2 > 0 ? "You can free {9:0} Expertise ({10:0} Rating)"
                                     : "You need {9:0} more Expertise ({10:0} Rating)"),
                                                 StatConversion.GetDodgeParryReducFromExpertise(Expertise),
                                                 Expertise,
                                                 AverageStats.ExpertiseRating,
                                                 StatConversion.GetDodgeParryReducFromExpertise(MHExpertise), MHExpertise,
                                                 StatConversion.GetDodgeParryReducFromExpertise(OHExpertise), OHExpertise,
                                                 (sec2lastNumB1 > 0 ? sec2lastNumB1 : sec2lastNumB1 * -1), (lastNumB1 > 0 ? lastNumB1 : lastNumB1 * -1),
                                                 (sec2lastNumB2 > 0 ? sec2lastNumB2 : sec2lastNumB2 * -1), (lastNumB2 > 0 ? lastNumB2 : lastNumB2 * -1)
                                                 ));
                }
                #endregion
                #region Mastery
                {
                    dictValues.Add("Mastery",
                                   string.Format("{0:000.00} : {1:00.00}*" + "The Pane shows Averaged Values*", MasteryVal, AverageStats.MasteryRating)
                                   + (CombatFactors.FuryStance ?
                                      string.Format(
                                          @"As a Fury Warrior, you are being granted the Unshackled Fury ability.
Increases the benefit of abilities that cause or require you to be enraged by (44.8%+{0:0.0%}={1:0.0%}).
Each point of Mastery increases enrage effects by an additional 5.60%.

Also, it is changing the following:
Increases the Weapon Damage of Raging Blow
Increases the damage bonus of Death Wish and Enrage
Increases the healing of Enraged Regeneration
Increases the Rage generated by Berserker Rage through Glyph of Berserker Rage
(Might increase rage generation through damage taken with Berserker Rage active,
I'm not sure, and it's a bit hard for me to test, any input on this would be appreciated.)",
                                          MasteryVal * 0.056f, 8f * 0.056f + MasteryVal * 0.056f)
                         :
                                      string.Format(
                                          @"As an Arms Warrior, you are being granted the Strikes of Opportunity ability.
Grants a (16%+{0:0.0%}={1:0.0%}) chance for your melee attacks to instantly
trigger an additional melee attack for {2:0%} normal damage. Each point of
Mastery increases this chance by 2%.",
                                          MasteryVal * Skills.StrikesOfOpportunity.BonusChance,
                                          Skills.StrikesOfOpportunity.BaseChance + MasteryVal * Skills.StrikesOfOpportunity.BonusChance,
                                          Skills.StrikesOfOpportunity.DamageModifier)
                                      )

                                   /*// Averaged Stats
                                    * AverageStats.Mastery,
                                    * // Passive Contributions
                                    * passiveContrsVals[0], passiveContrsVals[1], passiveContrsVals[2],
                                    * // UnProc'd Stats
                                    * BuffedStats.Mastery,
                                    * BuffedStats.Mastery * 2f,
                                    * // Proc'd Stats
                                    * MaximumStats.Mastery,
                                    * StatConversion.GetMasteryFromRating MaximumStats.Mastery * 2f*/
                                   );
                }
                #endregion

                dictValues.Add("Description 1", string.Format("DPS  : PerHit  : #ActsD"));
                dictValues.Add("Description 2", string.Format("DPS  : PerHit  : #ActsD"));
                dictValues.Add("Description 3", string.Format("DPS  : PerHit  : #ActsD"));
                // DPS Abilities
                format = "{0:0000} : {1:00000} : {2:000.00}";
                if (TotalDPS < 0f)
                {
                    TotalDPS = 0f;
                }
                foreach (AbilityWrapper aw in Rot.TheAbilityList)
                {
                    if (aw.Ability is Skills.Rend)
                    {
                        AbilityWrapper TH     = Rot.GetWrapper <Skills.ThunderClap>();
                        Skills.Rend    rend   = (aw.Ability as Skills.Rend);
                        float          DPSO20 = rend.GetDPS(aw.NumActivatesO20, TH.NumActivatesO20, rend.TimeOver20Perc);
                        float          DPSU20 = rend.GetDPS(aw.NumActivatesU20, TH.NumActivatesU20, rend.TimeUndr20Perc);
                        float          allDPS = DPSU20 > 0 ? DPSO20 * rend.TimeOver20Perc + DPSU20 * rend.TimeUndr20Perc : DPSO20; // Average above and below
                        dictValues.Add(aw.Ability.Name, string.Format(format, allDPS, rend.TickSize * rend.NumTicks, aw.AllNumActivates)
                                       + rend.GenTooltip(aw.AllNumActivates, DPSO20, DPSU20, allDPS / TotalDPS));
                    }
                    else
                    {
                        dictValues.Add(aw.Ability.Name, string.Format(format, aw.AllDPS, aw.Ability.DamageOnUse, aw.AllNumActivates)
                                       + aw.Ability.GenTooltip(aw.AllNumActivates, aw.DPS_O20, aw.DPS_U20, aw.AllDPS / TotalDPS));
                    }
                }
                // DPS General
                dictValues.Add("Deep Wounds", string.Format("{0:0000}*{1:00.0%} of DPS", Rot.DW.TickSize, Rot.DW.TickSize <= 0f || TotalDPS <= 0f ? 0f : Rot.DW.TickSize / TotalDPS));
                dictValues.Add("Special DMG Procs", string.Format("{0:0000} : {1:00000} : {2:000.00}*{3:00.0%} of DPS",
                                                                  SpecProcDPS, SpecProcDmgPerHit, SpecProcActs,
                                                                  SpecProcDPS <= 0f || TotalDPS <= 0f ? 0f : SpecProcDPS / TotalDPS));
                dictValues.Add("White DPS", string.Format("{0:0000} : {1:00000} : {2:000.00}", WhiteDPS, WhiteDmg, Whites.MHActivatesAll + Whites.OHActivatesAll)
                               + Whites.GenTooltip(WhiteDPSMH, WhiteDPSOH, TotalDPS, WhiteDPSMH_U20, WhiteDPSOH_U20));
                dictValues.Add("Total DPS", string.Format("{0:#,##0} : {1:#,###,##0}*" + ((!string.IsNullOrEmpty(Rot.GCDUsage) ? Rot.GCDUsage : "No GCD Usage*") + (CombatFactors.FuryStance ? "Fury isn't Cata Ready" : "")), TotalDPS, TotalDPS * Duration));
                // Rage
                format = "{0:0000}";
                dictValues.Add("Description 4", string.Format("Gen'd: Need : Avail"));
                dictValues.Add("Rage Above 20%", string.Format("{0:0000} : {1:0000} : {2:0000}", WhiteRageO20 + OtherRageO20, NeedyRageO20, FreeRageO20));
                dictValues.Add("Rage Below 20%", string.Format("{0:0000} : {1:0000} : {2:0000}", WhiteRageU20 + OtherRageU20, NeedyRageU20, FreeRageU20));
            } catch (Exception ex) {
                new Base.ErrorBox()
                {
                    Title        = "Error in creating Stat Pane Dictionaries",
                    Function     = "GetCharacterDisplayCalculationValues()",
                    TheException = ex,
                }.Show();
            }
            return(dictValues);
        }
        public override Dictionary <string, string> GetCharacterDisplayCalculationValues()
        {
            Dictionary <string, string> dictValues = new Dictionary <string, string>();

            dictValues.Add("Overall Points", OverallPoints.ToString());
            dictValues.Add("DPS Points", DPSPoints.ToString());
            dictValues.Add("Survivability Points", SurvivabilityPoints.ToString());

            float baseMiss  = StatConversion.WHITE_MISS_CHANCE_CAP[TargetLevel - 80] - BasicStats.PhysicalHit;
            float baseDodge = StatConversion.WHITE_DODGE_CHANCE_CAP[TargetLevel - 80] - StatConversion.GetDodgeParryReducFromExpertise(BasicStats.Expertise);
            float baseParry = 0f;            // StatConversion.WHITE_PARRY_CHANCE_CAP[TargetLevel - 80] - StatConversion.GetDodgeParryReducFromExpertise(BasicStats.Expertise);
            float capMiss   = (float)Math.Ceiling(baseMiss * 100f * 32.78998947f);
            float capDodge  = (float)Math.Ceiling(baseDodge * 100f * 32.78998947f);
            float capParry  = (float)Math.Ceiling(baseParry * 100f * 32.78998947f);            // TODO: Check this value

            string tipMiss = string.Empty;

            if (BasicStats.HitRating > capMiss)
            {
                tipMiss = string.Format("*Over the cap by {0} Hit Rating", BasicStats.HitRating - capMiss);
            }
            else if (BasicStats.HitRating < capMiss)
            {
                tipMiss = string.Format("*Under the cap by {0} Hit Rating", capMiss - BasicStats.HitRating);
            }
            else
            {
                tipMiss = "*Exactly at the cap";
            }

            string tipDodge = string.Empty;

            if (BasicStats.ExpertiseRating > capDodge)
            {
                tipDodge = string.Format("*Over the cap by {0} Expertise Rating", BasicStats.ExpertiseRating - capDodge);
            }
            else if (BasicStats.ExpertiseRating < capDodge)
            {
                tipDodge = string.Format("*Under the cap by {0} Expertise Rating", capDodge - BasicStats.ExpertiseRating);
            }
            else
            {
                tipDodge = "*Exactly at the cap";
            }


            dictValues.Add("Health", BasicStats.Health.ToString());
            dictValues.Add("Attack Power", BasicStats.AttackPower.ToString());
            dictValues.Add("Agility", BasicStats.Agility.ToString());
            dictValues.Add("Strength", BasicStats.Strength.ToString());
            dictValues.Add("Crit Rating", BasicStats.CritRating.ToString());
            dictValues.Add("Hit Rating", BasicStats.HitRating.ToString() + tipMiss);
            dictValues.Add("Expertise Rating", BasicStats.ExpertiseRating.ToString() + tipDodge);
            dictValues.Add("Haste Rating", BasicStats.HasteRating.ToString());
            dictValues.Add("Armor Penetration Rating", BasicStats.ArmorPenetrationRating.ToString());
            dictValues.Add("Weapon Damage", "+" + BasicStats.WeaponDamage.ToString());

            dictValues.Add("Avoided Attacks", string.Format("{0}%*{1}% Dodged, {2}% Missed", AvoidedAttacks, DodgedAttacks, MissedAttacks));
            dictValues.Add("Crit Chance", CritChance.ToString() + "%");
            dictValues.Add("Attack Speed", AttackSpeed.ToString() + "s");
            dictValues.Add("Armor Mitigation", ArmorMitigation.ToString() + "%");

            dictValues.Add("Optimal Rotation", HighestDPSRotation.ToString());
            dictValues.Add("Optimal Rotation DPS", HighestDPSRotation.DPS.ToString());
            dictValues.Add("Custom Rotation DPS", CustomRotation.DPS.ToString());


            float chanceNonAvoided = 1f - (AvoidedAttacks / 100f);

            dictValues.Add("Melee", MeleeStats.GetStatsTexts(HighestDPSRotation.MeleeCount, 0, HighestDPSRotation.TotalDamage, chanceNonAvoided, Duration));
            dictValues.Add("Mangle", MangleStats.GetStatsTexts(HighestDPSRotation.MangleCount, 0, HighestDPSRotation.TotalDamage, chanceNonAvoided, Duration));
            dictValues.Add("Shred", ShredStats.GetStatsTexts(HighestDPSRotation.ShredCount, 0, HighestDPSRotation.TotalDamage, chanceNonAvoided, Duration));
            dictValues.Add("Rake", RakeStats.GetStatsTexts(HighestDPSRotation.RakeCount, 0, HighestDPSRotation.TotalDamage, chanceNonAvoided, Duration));
            dictValues.Add("Rip", RipStats.GetStatsTexts(HighestDPSRotation.RipCount, 0, HighestDPSRotation.TotalDamage, chanceNonAvoided, Duration));
            dictValues.Add("Roar", RoarStats.GetStatsTexts(HighestDPSRotation.RoarCount, HighestDPSRotation.RoarCP, HighestDPSRotation.TotalDamage, chanceNonAvoided, Duration));
            dictValues.Add("Bite", BiteStats.GetStatsTexts(HighestDPSRotation.BiteCount, HighestDPSRotation.BiteCP, HighestDPSRotation.TotalDamage, chanceNonAvoided, Duration));


            //string[] abilityStats = MeleeStats.GetStatsTexts(HighestDPSRotation.MeleeCount, 0, HighestDPSRotation.TotalDamage, chanceNonAvoided, Duration);
            //dictValues.Add("Melee Usage", abilityStats[0]);
            //dictValues.Add("Melee Stats", abilityStats[1]);
            //abilityStats = MangleStats.GetStatsTexts(HighestDPSRotation.MangleCount, 0, HighestDPSRotation.TotalDamage, chanceNonAvoided, Duration);
            //dictValues.Add("Mangle Usage", abilityStats[0]);
            //dictValues.Add("Mangle Stats", abilityStats[1]);
            //abilityStats = ShredStats.GetStatsTexts(HighestDPSRotation.ShredCount, 0, HighestDPSRotation.TotalDamage, chanceNonAvoided, Duration);
            //dictValues.Add("Shred Usage", abilityStats[0]);
            //dictValues.Add("Shred Stats", abilityStats[1]);
            //abilityStats = RakeStats.GetStatsTexts(HighestDPSRotation.RakeCount, 0, HighestDPSRotation.TotalDamage, chanceNonAvoided, Duration);
            //dictValues.Add("Rake Usage", abilityStats[0]);
            //dictValues.Add("Rake Stats", abilityStats[1]);
            //abilityStats = RipStats.GetStatsTexts(HighestDPSRotation.RipCount, 0, HighestDPSRotation.TotalDamage, chanceNonAvoided, Duration);
            //dictValues.Add("Rip Usage", abilityStats[0]);
            //dictValues.Add("Rip Stats", abilityStats[1]);
            //abilityStats = RoarStats.GetStatsTexts(HighestDPSRotation.RoarCount, HighestDPSRotation.RoarCP, HighestDPSRotation.TotalDamage, chanceNonAvoided, Duration);
            //dictValues.Add("Roar Usage", abilityStats[0]);
            //dictValues.Add("Roar Stats", abilityStats[1]);
            //abilityStats = BiteStats.GetStatsTexts(HighestDPSRotation.BiteCount, HighestDPSRotation.BiteCP, HighestDPSRotation.TotalDamage, chanceNonAvoided, Duration);
            //dictValues.Add("Bite Usage", abilityStats[0]);
            //dictValues.Add("Bite Stats", abilityStats[1]);

            //string attackFormat = "{0}%*Damage Per Hit: {1}, Damage Per Swing: {2}\r\n{0}% of Total Damage, {3} Damage Done";
            //dictValues.Add("Melee Damage", string.Empty);//.Format(attackFormat, 100f * HighestDPSRotation.MeleeDamageTotal / HighestDPSRotation.DamageTotal, MeleeDamagePerHit, MeleeDamagePerSwing, HighestDPSRotation.MeleeDamageTotal));
            //dictValues.Add("Mangle Damage", string.Empty);//.Format(attackFormat, 100f * HighestDPSRotation.MangleDamageTotal / HighestDPSRotation.DamageTotal, MangleDamagePerHit, MangleDamagePerSwing, HighestDPSRotation.MangleDamageTotal));
            //dictValues.Add("Shred Damage", string.Empty);//.Format(attackFormat, 100f * HighestDPSRotation.ShredDamageTotal / HighestDPSRotation.DamageTotal, ShredDamagePerHit, ShredDamagePerSwing, HighestDPSRotation.ShredDamageTotal));
            //dictValues.Add("Rake Damage", string.Empty);//.Format(attackFormat, 100f * HighestDPSRotation.RakeDamageTotal / HighestDPSRotation.DamageTotal, RakeDamagePerHit, RakeDamagePerSwing, HighestDPSRotation.RakeDamageTotal));
            //dictValues.Add("Rip Damage", string.Empty);//.Format(attackFormat, 100f * HighestDPSRotation.RipDamageTotal / HighestDPSRotation.DamageTotal, RipDamagePerHit, RipDamagePerSwing, HighestDPSRotation.RipDamageTotal));
            //dictValues.Add("Bite Damage", string.Empty);//.Format(attackFormat, 100f * HighestDPSRotation.BiteDamageTotal / HighestDPSRotation.DamageTotal, BiteDamagePerHit, BiteDamagePerSwing, HighestDPSRotation.BiteDamageTotal));

            //string rotationDescription = string.Empty;
            //try
            //{
            //    rotationDescription = string.Format("{0}*Keep {1}cp Savage Roar up.\r\n{2}{3}{4}{5}Use {6} for combo points.",
            //        HighestDPSRotation.Name.Replace(" + ", "+"), HighestDPSRotation.RoarCP,
            //        HighestDPSRotation.Name.Contains("Rake") ? "Keep Rake up.\r\n" : "",
            //        HighestDPSRotation.Name.Contains("Rip") ? "Keep 5cp Rip up.\r\n" : "",
            //        HighestDPSRotation.Name.Contains("Mangle") ? "Keep Mangle up.\r\n" : "",
            //        HighestDPSRotation.Name.Contains("Bite") ? string.Format("Use {0}cp Ferocious Bites to spend extra combo points.\r\n", HighestDPSRotation.BiteCP) : "",
            //        HighestDPSRotation.Name.Contains("Shred") ? "Shred" : "Mangle");
            //}
            //catch (Exception ex)
            //{
            //    ex.ToString();
            //}


            return(dictValues);
        }
Exemple #14
0
 public float GetToBeDodgedChance()
 {
     return((float)Math.Max(StatConversion.WHITE_DODGE_CHANCE_CAP[_calcOpts.TargetLevel - 80] - StatConversion.GetDodgeParryReducFromExpertise(_stats.Expertise, CharacterClass.Paladin), 0f));
 }
Exemple #15
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="i">The item that represents the weapon in use</param>
        /// <param name="stats">Character stats</param>
        /// <param name="calcOpts">The calculation Options.</param>
        /// <param name="expertise">Expertise by racial weapon specialization</param>
        public Weapon(Item i, Stats stats, CalculationOptionsTankDK calcOpts, float expertise)
        {
            if (stats == null || calcOpts == null || calcOpts.talents == null)
            {
                // Missing necessary pieces.
                return;
            }

            if (i == null)
            {
                i           = new Item();
                i.Speed     = 2f;
                i.MinDamage = 0;
                i.MaxDamage = 0;
            }

            // Ensure that the weapon that does damage has some sort of speed associated.
            if ((i.MinDamage > 0 || i.MaxDamage > 0) && i.Speed == 0)
            {
                i.Speed = 2f;
#if DEBUG
                throw new Exception("No Speed on Item.");
#endif
            }

            effectiveExpertise = stats.Expertise;
            float fightDuration = calcOpts.FightLength * 60f;

            if (i == null)
            {
                return;
            }

            baseSpeed  = i.Speed;
            baseDamage = (float)(i.MinDamage + i.MaxDamage) / 2f + stats.WeaponDamage;


            #region Attack Speed
            {
                // TODO: make sure we're not double counting haste.
                hastedSpeed  = baseSpeed / (1f + (StatConversion.GetHasteFromRating(stats.HasteRating, CharacterClass.DeathKnight)) + stats.PhysicalHaste);
                hastedSpeed /= 1f + 0.05f * (float)calcOpts.talents.ImprovedIcyTalons;

                if (calcOpts.Bloodlust)
                {
                    // TODO: Update this bloodlust value to be a special effect
                    //float bloodlustUptime = (calcOpts.Bloodlust * 40f);

                    //if (bloodlustUptime > fightDuration) bloodlustUptime = 1f;
                    //else bloodlustUptime /= fightDuration;

                    float numLust     = fightDuration % 300f; // bloodlust changed in 3.0, can only have one every 5 minutes.
                    float fullLustDur = (numLust - 1) * 300f + 40f;
                    if (fightDuration < fullLustDur)          // if the last lust doesn't go its full duration
                    {
                        float lastLustFraction = (fullLustDur - fightDuration) / 40f;
                        numLust -= 1f;
                        numLust += lastLustFraction;
                    }

                    float bloodlustUptime = (numLust * 40f) / fightDuration;

                    hastedSpeed /= 1f + (0.3f * bloodlustUptime);
                }
            }
            #endregion

            #region Dodge
            {
                chanceDodged = StatConversion.WHITE_DODGE_CHANCE_CAP[calcOpts.TargetLevel - 80];
                // Changing this to use the statconversion formula like Target Dodge%;
                chanceDodged -= StatConversion.GetDodgeParryReducFromExpertise(stats.Expertise);
                if (chanceDodged < 0f)
                {
                    chanceDodged = 0f;
                }
            }
            #endregion

            #region White Damage
            {
                // To do, this operation needs to be moved out into it's own space.
                // There's no reason it should sit in the constructor only.
                // White damage per hit.  Basic white hits are use elsewhere.
                damage = baseDamage + (stats.AttackPower / 14f) * baseSpeed;
                DPS    = 0f;
                if (hastedSpeed > 0)
                {
                    DPS = damage / hastedSpeed;
                }
            }
            #endregion
        }
Exemple #16
0
        public Weapon(Item i, Stats stats, CalculationOptionsDPSDK calcOpts, BossOptions bossOpts, DeathKnightTalents talents, float expertise, CharacterSlot hand)
        {
            if (stats == null || calcOpts == null || !(hand == CharacterSlot.MainHand || hand == CharacterSlot.OffHand))
            {
                return;
            }

            if (i == null)
            {
                i           = new Item();
                i.Speed     = 2.0f;
                i.MinDamage = 0;
                i.MaxDamage = 0;
            }
            else
            {
                twohander = (i.Slot == ItemSlot.TwoHand);
            }

            effectiveExpertise = expertise;

            if (i == null)
            {
                return;
            }

            baseSpeed  = i.Speed;
            baseDamage = (float)(i.MinDamage + i.MaxDamage) / 2f + stats.WeaponDamage;

            #region Attack Speed
            {
                hastedSpeed = baseSpeed / (1 + stats.PhysicalHaste);
            }
            #endregion

            #region Dodge
            {
                float baseDodged = StatConversion.WHITE_DODGE_CHANCE_CAP[bossOpts.Level - 85];
                chanceDodged = baseDodged - StatConversion.GetDodgeParryReducFromExpertise(effectiveExpertise);
                chanceDodged = Math.Min(Math.Max(chanceDodged, 0f), baseDodged);
            }
            #endregion

            #region Parry
            {
                float baseParried = StatConversion.WHITE_PARRY_CHANCE_CAP[bossOpts.Level - 85];
                chanceParried = baseParried - StatConversion.GetDodgeParryReducFromExpertise(effectiveExpertise);
                chanceParried = Math.Min(Math.Max(chanceParried, 0f), baseParried);
            }
            #endregion

            #region Miss
            {
                float baseMissed = StatConversion.WHITE_MISS_CHANCE_CAP[bossOpts.Level - 85];
                if (!twohander)
                {
                    baseMissed = StatConversion.WHITE_MISS_CHANCE_CAP_DW[bossOpts.Level - 85];
                }
                chanceMissed = baseMissed - stats.PhysicalHit;
                chanceMissed = Math.Min(Math.Max(chanceMissed, 0f), baseMissed);
            }
            #endregion

#if DEBUG
            if (chanceDodged < 0 ||
                chanceParried < 0 ||
                chanceMissed < 0)
            {
                throw new Exception("Chance to hit out of range.");
            }
#endif
            #region White Damage
            {
                // White damage per hit.  Basic white hits are use elsewhere.
                float baseDPS = baseDamage / baseSpeed;
                damage = (baseDPS + (stats.AttackPower / 14.0f)) * baseSpeed;
                DPS    = damage / hastedSpeed;
                if (hand == CharacterSlot.OffHand)
                {
                    damage /= 2;
                    DPS    /= 2;
                    if (talents.NervesOfColdSteel > 0)
                    {
                        damage *= 1f + (.25f * (talents.NervesOfColdSteel / 3f));
                        DPS    *= 1f + (.25f * (talents.NervesOfColdSteel / 3f));;
                    }
                }
            }
            #endregion
        }
Exemple #17
0
 public static float BonusExpertisePercentage(Player player)
 {
     return(StatConversion.GetDodgeParryReducFromExpertise(player.Stats.Expertise +
                                                           StatConversion.GetExpertiseFromRating(player.Stats.ExpertiseRating), CharacterClass.Warrior));
 }
Exemple #18
0
        public override Dictionary <string, string> GetCharacterDisplayCalculationValues()
        {
            float critRating = BasicStats.CritRating;
            float hitRating  = BasicStats.HitRating;

            Dictionary <string, string> dictValues = new Dictionary <string, string>();

            dictValues.Add("Health", BasicStats.Health.ToString("N0"));
            dictValues.Add("Strength", BasicStats.Strength.ToString("N0"));
            dictValues.Add("Agility", string.Format("{0:0}*Provides {1:P} crit chance", BasicStats.Agility, StatConversion.GetCritFromAgility(BasicStats.Agility, CharacterClass.DeathKnight)));
            dictValues.Add("Attack Power", BasicStats.AttackPower.ToString("N0"));
            dictValues.Add("Crit Rating", string.Format("{0:0}*Provides {1:P} crit chance", critRating, StatConversion.GetCritFromRating(critRating, CharacterClass.DeathKnight)));
            dictValues.Add("Hit Rating", string.Format("{0:0}*Negates {1:P} melee miss / {2:P} spell miss", hitRating, StatConversion.GetPhysicalHitFromRating(hitRating, CharacterClass.DeathKnight), StatConversion.GetSpellHitFromRating(hitRating, CharacterClass.DeathKnight)));
            dictValues.Add("Expertise", string.Format("{0:0.00} / {1:0.00}*Negates {2:P} / {3:P} dodge chance", MHExpertise, OHExpertise, StatConversion.GetDodgeParryReducFromExpertise(MHExpertise), StatConversion.GetDodgeParryReducFromExpertise(OHExpertise)));
            dictValues.Add("Haste Rating", string.Format("{0:0}*Increases attack speed by {1:P}", BasicStats.HasteRating, StatConversion.GetHasteFromRating(BasicStats.HasteRating, CharacterClass.DeathKnight)));

            dictValues.Add("Armor", BasicStats.Armor.ToString("N0"));
            dictValues.Add("Resilience", BasicStats.Resilience.ToString("F0"));
            dictValues.Add("Mastery", string.Format("{0:N0}*Rating: {1:N0}", BasicStats.Mastery, BasicStats.MasteryRating));

            dictValues.Add("Weapon Damage", MHWeaponDamage.ToString("N2") + " / " + OHWeaponDamage.ToString("N2"));
            dictValues.Add("Attack Speed", MHAttackSpeed.ToString("N2") + " / " + OHAttackSpeed.ToString("N2"));
            dictValues.Add("Crit Chance", string.Format("{0:P}", BasicStats.PhysicalCrit));
            dictValues.Add("Avoided Attacks", string.Format("{0:P}*{1:P} Dodged, {2:P} Missed", AvoidedAttacks, DodgedAttacks, MissedAttacks));
            dictValues.Add("Enemy Mitigation", string.Format("{0:P}*{1:0} effective enemy armor", EnemyMitigation, EffectiveArmor));

            dictValues.Add("White HitChance", string.Format("{0:P}*Include Glance & Crit Chance", WhiteHitChance));
            dictValues.Add("Yellow HitChance", string.Format("{0:P}", YellowHitChance));

            foreach (int i in EnumHelper.GetValues(typeof(DKability)))
            {
                dictValues.Add(Enum.GetName(typeof(DKability), i), string.Format("{0:N2}*{1:P}", dpsSub[i], (dpsSub[i] / DPSPoints)));
            }
            dictValues.Add("Total DPS", DPSPoints.ToString("N2"));

            dictValues.Add("Rotation Duration", RotationTime.ToString() + " secs");
            dictValues.Add("Blood", Blood.ToString());
            dictValues.Add("Frost", Frost.ToString());
            dictValues.Add("Unholy", Unholy.ToString());
            dictValues.Add("Death", Death.ToString());
            dictValues.Add("Runic Power", Death.ToString());
            dictValues.Add("RE Runes", FreeRERunes.ToString("N2"));
            dictValues.Add("Rune Cooldown", m_RuneCD.ToString("N2"));

            PopulateSingleUseValues(dictValues, "BB", DKability.BloodBoil);
            PopulateSingleUseValues(dictValues, "BP", DKability.BloodPlague);
            PopulateSingleUseValues(dictValues, "BS", DKability.BloodStrike);
            PopulateSingleUseValues(dictValues, "DC", DKability.DeathCoil);
            PopulateSingleUseValues(dictValues, "DnD", DKability.DeathNDecay);
            PopulateSingleUseValues(dictValues, "DS", DKability.DeathStrike);
            PopulateSingleUseValues(dictValues, "Fest", DKability.FesteringStrike);
            PopulateSingleUseValues(dictValues, "FF", DKability.FrostFever);
            PopulateSingleUseValues(dictValues, "FS", DKability.FrostStrike);
            PopulateSingleUseValues(dictValues, "HS", DKability.HeartStrike);
            PopulateSingleUseValues(dictValues, "HB", DKability.HowlingBlast);
            PopulateSingleUseValues(dictValues, "IT", DKability.IcyTouch);
            PopulateSingleUseValues(dictValues, "NS", DKability.NecroticStrike);
            PopulateSingleUseValues(dictValues, "OB", DKability.Obliterate);
            PopulateSingleUseValues(dictValues, "PS", DKability.PlagueStrike);
            PopulateSingleUseValues(dictValues, "RS", DKability.RuneStrike);
            PopulateSingleUseValues(dictValues, "SS", DKability.ScourgeStrike);
            return(dictValues);
        }
Exemple #19
0
        public override Dictionary <string, string> GetCharacterDisplayCalculationValues()
        {
            Dictionary <string, string> dictValues = new Dictionary <string, string>();

            dictValues.Add("Overall Points", OverallPoints.ToString());
            dictValues.Add("DPS Points", DPSPoints.ToString());
            dictValues.Add("Survivability Points", SurvivabilityPoints.ToString());

            float baseMiss        = StatConversion.WHITE_MISS_CHANCE_CAP_DW[TargetLevel - 85] - BasicStats.PhysicalHit;
            float baseYellowMiss  = StatConversion.WHITE_MISS_CHANCE_CAP[TargetLevel - 85] - BasicStats.PhysicalHit;
            float basePoisonMiss  = StatConversion.GetSpellMiss(85 - TargetLevel, false) - BasicStats.SpellHit;
            float baseDodge       = StatConversion.WHITE_DODGE_CHANCE_CAP[TargetLevel - 85] - StatConversion.GetDodgeParryReducFromExpertise(BasicStats.Expertise);
            float baseParry       = 0f;// StatConversion.WHITE_PARRY_CHANCE_CAP[TargetLevel - 85] - StatConversion.GetDodgeParryReducFromExpertise(BasicStats.Expertise);
            float baseWhiteMHCrit = CritChanceMHTotal;
            float baseWhiteOHCrit = CritChanceOHTotal;
            float capMiss         = (float)Math.Ceiling(baseMiss * StatConversion.RATING_PER_PHYSICALHIT);
            float capYellowMiss   = (float)Math.Ceiling(baseYellowMiss * StatConversion.RATING_PER_PHYSICALHIT);
            float capPoisonMiss   = (float)Math.Ceiling(basePoisonMiss * StatConversion.RATING_PER_SPELLHIT);
            float capDodge        = (float)Math.Ceiling(baseDodge * 100f * StatConversion.RATING_PER_EXPERTISE / (StatConversion.RATING_PER_DODGEPARRYREDUC * 100f));
            float capParry        = (float)Math.Ceiling(baseParry * 100f * 32.78998947f); // TODO: Check this value
            float capWhiteMHCrit  = 100 - StatConversion.WHITE_GLANCE_CHANCE_CAP[TargetLevel - 85] * 100 - MissedWhiteAttacks - DodgedMHAttacks;
            float capWhiteOHCrit  = 100 - StatConversion.WHITE_GLANCE_CHANCE_CAP[TargetLevel - 85] * 100 - MissedWhiteAttacks - DodgedOHAttacks;

            string tipMiss = "*White: ";

            if (BasicStats.HitRating > capMiss)
            {
                tipMiss += string.Format("Over the cap ({1}) by {0} Hit Rating", BasicStats.HitRating - capMiss, capMiss);
            }
            else if (BasicStats.HitRating < capMiss)
            {
                tipMiss += string.Format("Under the cap ({1}) by {0} Hit Rating", capMiss - BasicStats.HitRating, capMiss);
            }
            else
            {
                tipMiss += string.Format("Exactly at the cap ({0})", capMiss);
            }

            tipMiss += "\r\nYellow: ";
            if (BasicStats.HitRating > capYellowMiss)
            {
                tipMiss += string.Format("Over the cap ({1}) by {0} Hit Rating", BasicStats.HitRating - capYellowMiss, capYellowMiss);
            }
            else if (BasicStats.HitRating < capYellowMiss)
            {
                tipMiss += string.Format("Under the cap ({1}) by {0} Hit Rating", capYellowMiss - BasicStats.HitRating, capYellowMiss);
            }
            else
            {
                tipMiss += string.Format("Exactly at the cap ({0})", capYellowMiss);
            }

            tipMiss += "\r\nPoison: ";
            if (BasicStats.HitRating > capPoisonMiss)
            {
                tipMiss += string.Format("Over the cap ({1}) by {0} Hit Rating", BasicStats.HitRating - capPoisonMiss, capPoisonMiss);
            }
            else if (BasicStats.HitRating < capPoisonMiss)
            {
                tipMiss += string.Format("Under the cap ({1}) by {0} Hit Rating", capPoisonMiss - BasicStats.HitRating, capPoisonMiss);
            }
            else
            {
                tipMiss += string.Format("Exactly at the cap ({0})", capPoisonMiss);
            }

            string tipDodge = string.Empty;

            if (BasicStats.ExpertiseRating > capDodge)
            {
                tipDodge = string.Format("*Over the cap ({1}) by {0} Expertise Rating", BasicStats.ExpertiseRating - capDodge, capDodge);
            }
            else if (BasicStats.ExpertiseRating < capDodge)
            {
                tipDodge = string.Format("*Under the cap ({1}) by {0} Expertise Rating", capDodge - BasicStats.ExpertiseRating, capDodge);
            }
            else
            {
                tipDodge = string.Format("*Exactly at the cap ({0})", capDodge);
            }

            string tipCrit = string.Format("Mainhand: {0}, ", CritChanceMH);

            if (CritChanceMHTotal > capWhiteMHCrit)
            {
                tipCrit += string.Format("over the Crit cap ({1}) by {0}%", CritChanceMHTotal - capWhiteMHCrit, capWhiteMHCrit);
            }
            else if (CritChanceMHTotal < capWhiteMHCrit)
            {
                tipCrit += string.Format("under the Crit cap ({1}) by {0}%", capWhiteMHCrit - CritChanceMHTotal, capWhiteMHCrit);
            }
            else
            {
                tipCrit += string.Format("exactly at the Crit cap ({0})", capWhiteMHCrit);
            }

            tipCrit += string.Format("\nOffhand: {0}, ", CritChanceOH);
            if (CritChanceOHTotal > capWhiteOHCrit)
            {
                tipCrit += string.Format("over the Crit cap ({1}) by {0}%", CritChanceOHTotal - capWhiteOHCrit, capWhiteOHCrit);
            }
            else if (CritChanceOHTotal < capWhiteOHCrit)
            {
                tipCrit += string.Format("under the Crit cap ({1}) by {0}%", capWhiteOHCrit - CritChanceOHTotal, capWhiteOHCrit);
            }
            else
            {
                tipCrit += string.Format("exactly at the Crit cap ({0})", capWhiteOHCrit);
            }

            string tipMastery = "*";

            if (Spec == 0)
            {
                tipMastery += String.Format("{0}% increased Poison damage", BasicStats.MasteryRating * RV.Mastery.PotentPoisonsDmgMultPerMast);
            }
            else if (Spec == 1)
            {
                tipMastery += String.Format("{0}% chance on an extra mainhand attack", BasicStats.MasteryRating * RV.Mastery.MainGauchePerMast);
            }
            else
            {
                tipMastery += String.Format("{0}% increased finishing move damage and Slice and Dice effectiveness", BasicStats.MasteryRating * RV.Mastery.ExecutionerPerMast);
            }

            dictValues.Add("Health", BasicStats.Health.ToString());
            dictValues.Add("Attack Power", BasicStats.AttackPower.ToString());
            dictValues.Add("Agility", BasicStats.Agility.ToString());
            dictValues.Add("Strength", BasicStats.Strength.ToString());
            dictValues.Add("Crit Rating", BasicStats.CritRating.ToString());
            dictValues.Add("Hit Rating", BasicStats.HitRating.ToString() + tipMiss);
            dictValues.Add("Expertise Rating", BasicStats.ExpertiseRating.ToString() + tipDodge);
            dictValues.Add("Haste Rating", BasicStats.HasteRating.ToString());
            dictValues.Add("Mastery Rating", BasicStats.MasteryRating.ToString() + tipMastery);
            dictValues.Add("Armor Penetration", BasicStats.ArmorPenetration.ToString());
            dictValues.Add("Weapon Damage", "+" + BasicStats.WeaponDamage.ToString());

            dictValues.Add("Avoided White Attacks", string.Format("{0}% / {1}%*Mainhand: {2}% Dodged, {3}% Missed\n   Offhand: {4}% Dodged, {3}% Missed", AvoidedWhiteMHAttacks, AvoidedWhiteOHAttacks, DodgedMHAttacks, MissedWhiteAttacks, DodgedOHAttacks));
            dictValues.Add("Avoided Yellow Attacks", string.Format("{0}%*{1}% Dodged, {2}% Missed", AvoidedAttacks, DodgedMHAttacks, MissedAttacks));
            dictValues.Add("Avoided Poison Attacks", string.Format("{0}%*{1}% Missed", AvoidedPoisonAttacks, MissedPoisonAttacks));
            dictValues.Add("Crit Chance", CritChanceYellow.ToString() + "%*" + tipCrit);
            dictValues.Add("MainHand Speed", MainHandSpeed.ToString() + "s");
            dictValues.Add("OffHand Speed", OffHandSpeed.ToString() + "s");
            dictValues.Add("Armor Mitigation", ArmorMitigation.ToString() + "%");

            dictValues.Add("Optimal Rotation", HighestDPSRotation.ToString());
            dictValues.Add("Optimal Rotation DPS", HighestDPSRotation.DPS.ToString());
            dictValues.Add("Custom Rotation DPS", CustomRotation.DPS.ToString());

            float chanceWhiteMHNonAvoided = 1f - (AvoidedWhiteMHAttacks / 100f);
            float chanceWhiteOHNonAvoided = 1f - (AvoidedWhiteOHAttacks / 100f);
            float chanceNonAvoided        = 1f - (AvoidedAttacks / 100f);
            float chancePoisonNonAvoided  = 1f - (AvoidedPoisonAttacks / 100f);

            dictValues.Add("MainHand", MainHandStats.GetStatsTexts(HighestDPSRotation.MainHandCount, 0, HighestDPSRotation.TotalDamage, chanceWhiteMHNonAvoided, Duration));
            dictValues.Add("OffHand", OffHandStats.GetStatsTexts(HighestDPSRotation.OffHandCount, 0, HighestDPSRotation.TotalDamage, chanceWhiteOHNonAvoided, Duration));
            dictValues.Add("Backstab", BackstabStats.GetStatsTexts(HighestDPSRotation.BackstabCount, 0, HighestDPSRotation.TotalDamage, chanceNonAvoided, Duration));
            dictValues.Add("Hemorrhage", HemoStats.GetStatsTexts(HighestDPSRotation.HemoCount, 0, HighestDPSRotation.TotalDamage, chanceNonAvoided, Duration));
            dictValues.Add("Sinister Strike", SStrikeStats.GetStatsTexts(HighestDPSRotation.SStrikeCount, 0, HighestDPSRotation.TotalDamage, chanceNonAvoided, Duration));
            dictValues.Add("Mutilate", MutiStats.GetStatsTexts(HighestDPSRotation.MutiCount, 0, HighestDPSRotation.TotalDamage, chanceNonAvoided, Duration));
            dictValues.Add("Revealing Strike", RStrikeStats.GetStatsTexts(HighestDPSRotation.RStrikeCount, 0, HighestDPSRotation.TotalDamage, chanceNonAvoided, Duration));
            dictValues.Add("Rupture", RuptStats.GetStatsTexts(HighestDPSRotation.RuptCount, HighestDPSRotation.RuptCP, HighestDPSRotation.TotalDamage, chanceNonAvoided, Duration));
            dictValues.Add("Slice and Dice", SnDStats.GetStatsTexts(HighestDPSRotation.SnDCount, HighestDPSRotation.SnDCP, HighestDPSRotation.TotalDamage, chanceNonAvoided, Duration));
            dictValues.Add("Eviscerate", EvisStats.GetStatsTexts(HighestDPSRotation.EvisCount, Math.Max(HighestDPSRotation.EvisCP, HighestDPSRotation.EnvenomCP), HighestDPSRotation.TotalDamage, chanceNonAvoided, Duration));
            dictValues.Add("Envenom", EnvenomStats.GetStatsTexts(HighestDPSRotation.EnvenomCount, Math.Max(HighestDPSRotation.EvisCP, HighestDPSRotation.EnvenomCP), HighestDPSRotation.TotalDamage, chanceNonAvoided, Duration));
            dictValues.Add("Instant Poison", IPStats.GetStatsTexts(HighestDPSRotation.IPCount, 0, HighestDPSRotation.TotalDamage, chancePoisonNonAvoided, Duration));
            dictValues.Add("Deadly Poison", DPStats.GetStatsTexts(HighestDPSRotation.DPCount, 0, HighestDPSRotation.TotalDamage, chancePoisonNonAvoided, Duration));
            dictValues.Add("Wound Poison", WPStats.GetStatsTexts(HighestDPSRotation.WPCount, 0, HighestDPSRotation.TotalDamage, chancePoisonNonAvoided, Duration));
            dictValues.Add("Venomous Wounds", VenomousWoundsStats.GetStatsTexts(HighestDPSRotation.VenomousWoundsCount, 0, HighestDPSRotation.TotalDamage, 1f, Duration));
            dictValues.Add("Main Gauche", MainGaucheStats.GetStatsTexts(HighestDPSRotation.MGCount, 0, HighestDPSRotation.TotalDamage, chanceNonAvoided, Duration));

            return(dictValues);
        }