public TreeStats(Character character, Stats stats, KeyValuePair <double, SpecialEffect>[] hasteProcs, double treeOfLifeUptime)
        {
            CalculationOptionsTree opts = character.CalculationOptions as CalculationOptionsTree;

            bool Restoration = (opts != null) ? opts.Restoration : true;

            Haste = new HasteStats(stats, hasteProcs);

            SpellCrit = StatConversion.GetSpellCritFromIntellect(stats.Intellect) + StatConversion.GetSpellCritFromRating(stats.CritRating) + stats.SpellCrit;

            SpellPower = (float)(stats.SpellPower + Math.Max(0f, stats.Intellect - 10));
            // TODO: does nurturing instinct actually work like this?
            SpellPower += character.DruidTalents.NurturingInstinct * 0.5 * stats.Agility;
            SpellPower *= (1 + stats.BonusSpellPowerMultiplier);

            TreeOfLifeUptime = treeOfLifeUptime;
            double mastery = 8.0f + StatConversion.GetMasteryFromRating(stats.MasteryRating);

            if (Restoration)
            {
                Harmony = mastery * 0.0125f;
            }

            SpellsManaCostReduction = stats.SpellsManaCostReduction + stats.NatureSpellsManaCostReduction;
            BonusCritHealMultiplier = stats.BonusCritHealMultiplier;

            PassiveDirectHealBonus   = (Restoration ? 1.25f : 1.0f) + Harmony;
            PassivePeriodicHealBonus = (Restoration ? 1.25f : 1.0f) + opts.HarmonyPeriodicRate * Harmony + 0.02f * character.DruidTalents.Genesis;
            DirectHealMultiplier     = (1 + stats.BonusHealingDoneMultiplier) * (1.0f + character.DruidTalents.MasterShapeshifter * 0.04f) * (1 + TreeOfLifeUptime * 0.15f);
            PeriodicHealMultiplier   = DirectHealMultiplier * (1 + stats.BonusPeriodicHealingMultiplier);
            SpellsManaCostMultiplier = 1 - stats.ManaCostReductionMultiplier;

            Healed = stats.Healed + stats.HealedPerSP * SpellPower;
        }
Exemple #2
0
        public override Stats GetCharacterStats(Character character, Item additionalItem)
        {
            CalculationOptionsHealPriest calcOpts = character.CalculationOptions as CalculationOptionsHealPriest;

            StatsPriest statsTotal = new StatsPriest()
            {
                SpellHaste = PriestInformation.GetDarkness(character.PriestTalents.Darkness),
                InnerFire  = true,
                BonusIntellectMultiplier = 0.05f,   // Cloth bonus.
                PriestSpec = PriestSpec.GetPriestSpec(character.PriestTalents),
            };

            if (statsTotal.PriestSpec == ePriestSpec.Spec_Disc)
            {
                statsTotal.SpellCombatManaRegeneration = 0.5f;
                statsTotal.BonusIntellectMultiplier    = 0.15f;
            }
            else if (statsTotal.PriestSpec == ePriestSpec.Spec_Holy)
            {
                statsTotal.SpellCombatManaRegeneration = 0.5f + PriestInformation.GetHolyConcentration(character.PriestTalents.HolyConcentration);
                statsTotal.BonusHealingDoneMultiplier  = 0.15f;
            }
            else if (statsTotal.PriestSpec == ePriestSpec.Spec_ERROR)
            {
                throw new Exception("Unpossible Talent Spec!");
            }

            statsTotal.Accumulate(BaseStats.GetBaseStats(character));
            statsTotal.Accumulate(GetItemStats(character, additionalItem));
            statsTotal.Accumulate(GetBuffsStats(character, calcOpts));


            statsTotal.Stamina     = (float)Math.Floor((statsTotal.Stamina) * (1 + statsTotal.BonusStaminaMultiplier));
            statsTotal.Intellect   = (float)Math.Floor((statsTotal.Intellect) * (1 + statsTotal.BonusIntellectMultiplier));
            statsTotal.Spirit      = (float)Math.Floor((statsTotal.Spirit) * (1 + statsTotal.BonusSpiritMultiplier));
            statsTotal.SpellPower += (statsTotal.InnerFire ? PriestInformation.GetInnerFireSpellPowerBonus(character) : 0) + (statsTotal.Intellect - 10);
            statsTotal.SpellPower *= (1f + statsTotal.BonusSpellPowerMultiplier);
            statsTotal.Mana       += StatConversion.GetManaFromIntellect(statsTotal.Intellect);
            statsTotal.Mana       *= (1f + statsTotal.BonusManaMultiplier);
            statsTotal.Health     += StatConversion.GetHealthFromStamina(statsTotal.Stamina);
            statsTotal.Health      = (float)Math.Floor(statsTotal.Health * (1f + statsTotal.BonusHealthMultiplier));
            statsTotal.SpellCrit  += StatConversion.GetSpellCritFromIntellect(statsTotal.Intellect)
                                     + StatConversion.GetSpellCritFromRating(statsTotal.CritRating);
            statsTotal.SpellHaste = (1f + statsTotal.SpellHaste) * (1f + StatConversion.GetSpellHasteFromRating(statsTotal.HasteRating)) - 1f;
            statsTotal.Armor     *= (1 + (statsTotal.InnerFire ? PriestInformation.GetInnerFireArmorBonus(character) : 0));

            if (statsTotal.PriestSpec == ePriestSpec.Spec_Disc)
            {
                statsTotal.ShieldDiscipline = (PriestInformation.DisciplineMasteryBase + StatConversion.GetMasteryFromRating(statsTotal.MasteryRating)) * PriestInformation.DisciplineMasteryEffect;
            }
            else if (statsTotal.PriestSpec == ePriestSpec.Spec_Holy)
            {
                statsTotal.EchoofLight = (PriestInformation.HolyMasteryBase + StatConversion.GetMasteryFromRating(statsTotal.MasteryRating)) * PriestInformation.HolyMasteryEffect;
            }

            return(statsTotal);
        }
Exemple #3
0
 public HandofLight(Character character, StatsRetri stats, float amountBefore) : base("Hand of Light", character, stats, AbilityType.Spell, DamageType.Holy, false)
 {
     AmountBefore = amountBefore;
     CT           = new BaseSpellCombatTable(Character.BossOptions, _stats, Attacktype.Spell);
     CT.CanMiss   = false;
     CT.CanCrit   = false;
     AbilityDamageMulitplier.Clear(); //Only benefit from Magical
     AbilityDamageMulitplier[Multiplier.Magical] = (1f + _stats.BonusHolyDamageMultiplier) * (1f + InqUptime * PaladinConstants.INQ_COEFF);
     AbilityDamage = AmountBefore * (8f + StatConversion.GetMasteryFromRating(_stats.MasteryRating, CharacterClass.Paladin)) * PaladinConstants.HOL_COEFF;
 }
Exemple #4
0
 public static float CalcMastery(Stats stats, int playerLevel)
 {
     if (playerLevel == 85)
     {
         return(StatConversion.GetMasteryFromRating(stats.MasteryRating) + 8f);
     }
     else
     {
         return(GetMasteryFromRating(stats.MasteryRating, playerLevel) + 8f);
     }
 }
Exemple #5
0
        public static float AvoidanceChance(Character character, Stats stats, HitResult avoidanceType, int targetLevel)
        {
            float avoidanceChance = StatConversion.GetDRAvoidanceChance(character, stats, avoidanceType, targetLevel);

            if (avoidanceType == HitResult.Block)
            {
                avoidanceChance += (8f + StatConversion.GetMasteryFromRating(stats.MasteryRating, CharacterClass.Paladin)) * 0.0225f;
            }

            return(avoidanceChance);
        }
        // Add calculated values to the values dictionary.
        // These values are then available for display via the CharacterDisplayCalculationLabels
        // member defined in CalculationsRetribution.cs
        // While possible, there's little reason to add values to the dictionary that are not being
        // used by the CharacterDisplayCalculationLabels.
        public override Dictionary <string, string> GetCharacterDisplayCalculationValues()
        {
            Dictionary <string, string> dictValues = new Dictionary <string, string>();

            // Basic stats
            dictValues["Health"]          = string.Format("{0:N0}*Base Health: {1:N0}", CombatStats.Health, BasicStats.Health);
            dictValues["Mana"]            = string.Format("{0:N0}*Base Mana: {1:N0}", CombatStats.Mana, BasicStats.Mana);
            dictValues["Strength"]        = string.Format("{0:N0}*Base Strength: {1:N0}", CombatStats.Strength, BasicStats.Strength);
            dictValues["Agility"]         = string.Format("{0:N0}*Base Agility: {1:N0}", CombatStats.Agility, BasicStats.Agility);
            dictValues["Attack Power"]    = string.Format("{0:N0}*Base Attack Power: {1:N0}", CombatStats.AttackPower, BasicStats.AttackPower);
            dictValues["Melee Crit"]      = string.Format("{0:P}*{1:0} Crit Rating ({2:P})", CombatStats.PhysicalCrit, BasicStats.CritRating, StatConversion.GetCritFromRating(BasicStats.CritRating, CharacterClass.Paladin));
            dictValues["Melee Haste"]     = string.Format("{0:P}*{1:0} Haste Rating ({2:P})", CombatStats.PhysicalHaste, BasicStats.HasteRating, StatConversion.GetHasteFromRating(BasicStats.HasteRating, CharacterClass.Paladin));
            dictValues["Chance to Dodge"] = string.Format("{0:P}*{1:0} Expertise Rating ({2:F1})", ((BasePhysicalWhiteCombatTable)WhiteSkill.CT).ChanceToDodge, BasicStats.ExpertiseRating, BasicStats.Expertise);
            dictValues["Mastery"]         = string.Format("{0:F2}*{1:0} Mastery Rating ({2:F1})\n{3:P} Hand of Light", (8f + StatConversion.GetMasteryFromRating(CombatStats.MasteryRating, CharacterClass.Paladin)),
                                                          BasicStats.MasteryRating, StatConversion.GetMasteryFromRating(BasicStats.MasteryRating, CharacterClass.Paladin),
                                                          (8f + StatConversion.GetMasteryFromRating(BasicStats.MasteryRating, CharacterClass.Paladin)) * PaladinConstants.HOL_COEFF);
            dictValues["Miss Chance"]        = string.Format("{0:P}*{1:0} Hit Rating ({2:P})", WhiteSkill.CT.ChanceToMiss, BasicStats.HitRating, StatConversion.GetHitFromRating(BasicStats.HitRating, CharacterClass.Paladin));
            dictValues["Spell Power"]        = string.Format("{0:N0}*Base Spell Power: {1:N0}", CombatStats.SpellPower, BasicStats.SpellPower);
            dictValues["Spell Crit"]         = string.Format("{0:P}*{1:0} Crit Rating ({2:P})", CombatStats.SpellCrit, BasicStats.CritRating, StatConversion.GetCritFromRating(BasicStats.CritRating, CharacterClass.Paladin));
            dictValues["Spell Haste"]        = string.Format("{0:P}*{1:0} Haste Rating ({2:P})", CombatStats.SpellHaste, BasicStats.HasteRating, StatConversion.GetHasteFromRating(BasicStats.HasteRating, CharacterClass.Paladin));
            dictValues["Weapon Damage"]      = string.Format("{0:F}*Base Weapon Damage: {1:F}", AbilityHelper.WeaponDamage(Character, CombatStats.AttackPower), AbilityHelper.WeaponDamage(Character, BasicStats.AttackPower));
            dictValues["Weapon Damage @3.3"] = string.Format("{0:F}*Base Weapon Damage: {1:F}", AbilityHelper.WeaponDamage(Character, CombatStats.AttackPower, true), AbilityHelper.WeaponDamage(Character, BasicStats.AttackPower, true));
            dictValues["Attack Speed"]       = string.Format("{0:F2}*Base Attack Speed: {1:F2}", AbilityHelper.WeaponSpeed(Character, CombatStats.PhysicalHaste), AbilityHelper.WeaponSpeed(Character, BasicStats.PhysicalHaste));

            // DPS Breakdown
            dictValues["Total DPS"]        = OverallPoints.ToString("N0");
            dictValues["White"]            = string.Format("{0:N0}*" + WhiteSkill, WhiteSkill.GetDPS());
            dictValues["Seal"]             = string.Format("{0:N0}*" + SealSkill, SealSkill.GetDPS());
            dictValues["Seal (Dot)"]       = string.Format("{0:N0}*" + SealDotSkill, SealDotSkill.GetDPS());
            dictValues["Seal of Command"]  = string.Format("{0:N0}*" + CommandSkill, CommandSkill.GetDPS());
            dictValues["Crusader Strike"]  = string.Format("{0:N0}*" + CrusaderStrikeSkill, CrusaderStrikeSkill.GetDPS());
            dictValues["Templars Verdict"] = string.Format("{0:N0}*" + TemplarsVerdictSkill, TemplarsVerdictSkill.GetDPS());
            dictValues["Judgement"]        = string.Format("{0:N0}*" + JudgementSkill, JudgementSkill.GetDPS());
            dictValues["Consecration"]     = string.Format("{0:N0}*" + ConsecrationSkill, ConsecrationSkill.GetDPS());
            dictValues["Exorcism"]         = string.Format("{0:N0}*" + ExorcismSkill, ExorcismSkill.GetDPS());
            dictValues["Holy Wrath"]       = string.Format("{0:N0}*" + HolyWrathSkill, HolyWrathSkill.GetDPS());
            dictValues["Hammer of Wrath"]  = string.Format("{0:N0}*" + HammerOfWrathSkill, HammerOfWrathSkill.GetDPS());
            dictValues["GoaK"]             = string.Format("{0:N0}*" + GoakSkill, GoakSkill.GetDPS());
            dictValues["Other"]            = OtherDPS.ToString("N0");

            // Rotation Info:
            dictValues["Inqusition Uptime"]       = CrusaderStrikeSkill.InqUptime.ToString("P2");
            dictValues["Crusader Strike Usage"]   = (CrusaderStrikeSkill.UsagePerSec * Character.BossOptions.BerserkTimer).ToString("F2");
            dictValues["Templar's Verdict Usage"] = (TemplarsVerdictSkill.UsagePerSec * Character.BossOptions.BerserkTimer).ToString("F2");
            dictValues["Exorcism Usage"]          = (ExorcismSkill.UsagePerSec * Character.BossOptions.BerserkTimer).ToString("F2");
            dictValues["Hammer of Wrath Usage"]   = (HammerOfWrathSkill.UsagePerSec * Character.BossOptions.BerserkTimer).ToString("F2");
            dictValues["Judgement Usage"]         = (JudgementSkill.UsagePerSec * Character.BossOptions.BerserkTimer).ToString("F2");
            dictValues["Holy Wrath Usage"]        = (HolyWrathSkill.UsagePerSec * Character.BossOptions.BerserkTimer).ToString("F2");
            dictValues["Consecration Usage"]      = (ConsecrationSkill.UsagePerSec * Character.BossOptions.BerserkTimer).ToString("F2");
            dictValues["GoaK Usage"] = (GoakSkill.UsagePerSec * Character.BossOptions.BerserkTimer).ToString("F2");

            return(dictValues);
        }
Exemple #7
0
 public static float GetMasteryFromRating(float points, int playerLevel)
 {
     if (playerLevel == 85)
     {
         return(StatConversion.GetMasteryFromRating(points));
     }
     else
     {
         float[] scaling = { 45.905986785888672f, 60.278423309326172f, 79.155647277832031f, 103.985641479492188f, 136.538131713867188f };
         return(points / scaling[playerLevel - 80]);
     }
 }
Exemple #8
0
        //private static Dictionary<float, SpecialEffect> _SE_StrikesOfOpportunity = new Dictionary<float,SpecialEffect>();

        public float GetActivates(float meleeAttemptsOverDur, float perc)
        {
            // This attack doesn't consume GCDs and doesn't affect the swing timer
            //float effectActs = _SE_StrikesOfOpportunity[DPSWarrChar.StatS.MasteryRating].GetAverageProcsPerSecond(
            var se = new SpecialEffect(Trigger.MeleeAttack, null, 0f, 0.5f,
                                       (float)Math.Min(Skills.StrikesOfOpportunity.BaseChance
                                                       + (float)Math.Max(0f, Skills.StrikesOfOpportunity.BonusChance
                                                                         * StatConversion.GetMasteryFromRating(DPSWarrChar.StatS.MasteryRating, CharacterClass.Warrior)), 1f)
                                       )
            {
                BypassCache = true
            };
            float effectActs = se.GetAverageProcsPerSecond((FightDuration * perc) / meleeAttemptsOverDur, 1f, DPSWarrChar.CombatFactors.CMHItemSpeed, FightDuration * perc);

            effectActs *= FightDuration * perc;
            return(effectActs);
        }
Exemple #9
0
 /// <summary>
 /// A mighty blow that deals 120% weapon damage from both melee weapons. Can only be used while Enraged.
 /// <para>DPSWarrChar.Talents: none</para>
 /// <para>Glyphs: RagingBlow [+5% Crit Chance]</para>
 /// <para>Sets: none</para>
 /// </summary>
 public RagingBlow(DPSWarrCharacter dpswarrchar)
 {
     DPSWarrChar = dpswarrchar; //Char = c; StatS = s; CombatFactors = cf; Whiteattacks = wa; CalcOpts = co; BossOpts = bo;
     //
     ReqTalent        = true;
     Talent2ChksValue = DPSWarrChar.Talents.RagingBlow;
     AbilIterater     = (int)Maintenance.RagingBlow;
     ReqMeleeWeap     = ReqMeleeRange = true;
     CD              = 6f; // In Seconds
     RageCost        = 20f;
     StanceOkFury    = true;
     SwingsOffHand   = true;
     BonusCritChance = DPSWarrChar.Talents.GlyphOfRagingBlow ? 0.05f : 0f;
     DamageBonus     = 1f + DPSWarrChar.StatS.BonusRagingBlowDamageMultiplier;
     DamageBonus    *= 1f + (2f * 0.056f + 0.0560f * StatConversion.GetMasteryFromRating(DPSWarrChar.StatS.MasteryRating, CharacterClass.Warrior));
     //
     Initialize();
 }
Exemple #10
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 #11
0
 public static float BonusMasteryBlockPercentage(Player player)
 {
     return(0.015f * (8.0f + StatConversion.GetMasteryFromRating(player.Stats.MasteryRating, CharacterClass.Warrior)));
 }
Exemple #12
0
        public override Dictionary <string, string> GetCharacterDisplayCalculationValues()
        {
            Dictionary <string, string> dictValues = new Dictionary <string, string>();
            Buff   activeBuff;
            string s;
            Stats  baseStats = BaseStats.GetBaseStats(Character);

            #region General
            dictValues["Health"]     = BasicStats.Health.ToString("0");
            dictValues["Mana"]       = BasicStats.Mana.ToString("0");
            dictValues["Item Level"] = String.Format("{0}*Lowest: {1}\nHighest: {2}", Character.AvgWornItemLevel.ToString("0"), Character.MinWornItemLevel.ToString("0"), Character.MaxWornItemLevel.ToString("0"));
            dictValues["Speed"]      = String.Format("{0}%*{0}% Run speed",
                                                     ((1f + BasicStats.MovementSpeed) * 100f).ToString("0"));
            #endregion
            #region Attributes
            dictValues["Strength"]  = BasicStats.Strength.ToString();
            dictValues["Agility"]   = BasicStats.Agility.ToString();
            dictValues["Stamina"]   = BasicStats.Stamina.ToString();
            dictValues["Intellect"] = BasicStats.Intellect.ToString();
            dictValues["Spirit"]    = BasicStats.Spirit.ToString();
            #endregion
            #region Spell
            #region Spell Power
            s = String.Empty;
            float intPower = BasicStats.Intellect - 10;
            if (BasicStats.InnerFire)
            {
                s += String.Format("\n{0} from Inner Fire", PriestInformation.GetInnerFireSpellPowerBonus(Character));
            }
            activeBuff = GetActiveBuffsByGroup("Spell Power");
            if (activeBuff != null)
            {
                s += makeActiveBuffTextPercent(activeBuff, activeBuff.Stats.BonusSpellPowerMultiplier);
            }
            dictValues["Spell Power"] = String.Format("{0}*{1} from {2} Intellect{3}",
                                                      BasicStats.SpellPower.ToString("0"),
                                                      intPower.ToString("0"),
                                                      BasicStats.Intellect.ToString("0"),
                                                      s
                                                      );
            #endregion
            #region Haste
            s = String.Empty;
            if (Character.PriestTalents.Darkness > 0)
            {
                s += String.Format("\n{0}% from {1} points in Darkness", Character.PriestTalents.Darkness, Character.PriestTalents.Darkness);
            }
            activeBuff = GetActiveBuffsByGroup("Spell Haste");
            if (activeBuff != null)
            {
                s += makeActiveBuffTextPercent(activeBuff, activeBuff.Stats.SpellHaste);
            }
            activeBuff = GetActiveBuffsByGroup("Dark Intent");
            if (activeBuff != null)
            {
                s += makeActiveBuffTextPercent(activeBuff, activeBuff.Stats.SpellHaste);
            }
            dictValues["Haste"] = String.Format("{0}%*{1}% from {2} Haste Rating{3}",
                                                (BasicStats.SpellHaste * 100f).ToString("0.00"),
                                                (StatConversion.GetSpellHasteFromRating(BasicStats.HasteRating) * 100f).ToString("0.00"), BasicStats.HasteRating.ToString("0"),
                                                s
                                                );
            #endregion
            dictValues["Hit"]         = (BasicStats.SpellHit * 100f).ToString("0.00");
            dictValues["Penetration"] = BasicStats.SpellPenetration.ToString("0");
            #region Mana Regen
            float manaRegen = StatConversion.GetSpiritRegenSec(BasicStats.Spirit, BasicStats.Intellect) * 5f;
            s          = String.Format("\n{0} Mana per 5 sec from Base Mana Regeneration", (baseStats.Mana * 0.05f).ToString("0"));
            activeBuff = GetActiveBuffsByGroup("Mana Regeneration");
            if (activeBuff != null)
            {
                s += makeActiveBuffText(activeBuff, activeBuff.Stats.Mp5);
            }
            dictValues["Mana Regen"] = String.Format("{0}*{1} from Spirit based regen{2}",
                                                     (manaRegen + BasicStats.Mp5).ToString("0"),
                                                     manaRegen.ToString("0"),
                                                     s
                                                     );
            dictValues["Combat Regen"] = String.Format("{0}*{1} from Spirit based regen{2}",
                                                       (manaRegen * BasicStats.SpellCombatManaRegeneration + BasicStats.Mp5).ToString("0"),
                                                       (manaRegen * BasicStats.SpellCombatManaRegeneration).ToString("0"),
                                                       s
                                                       );
            #endregion
            #region Crit
            s          = String.Empty;
            activeBuff = GetActiveBuffsByGroup("Critical Strike Chance");
            if (activeBuff != null)
            {
                s += makeActiveBuffTextPercent(activeBuff, activeBuff.Stats.SpellCrit);
            }
            activeBuff = GetActiveBuffsByGroup("Focus Magic, Spell Critical Strike Chance");
            if (activeBuff != null)
            {
                s += makeActiveBuffTextPercent(activeBuff, activeBuff.Stats.SpellCrit);
            }
            dictValues["Crit Chance"] = String.Format("{0}%*{1}% from {2} Crit Rating\n{3}% from {4} Intellect\n{5}% from Priest base{6}",
                                                      (BasicStats.SpellCrit * 100f).ToString("0.00"),
                                                      (StatConversion.GetSpellCritFromRating(BasicStats.CritRating) * 100f).ToString("0.00"), BasicStats.CritRating.ToString("0"),
                                                      (StatConversion.GetSpellCritFromIntellect(BasicStats.Intellect) * 100f).ToString("0.00"), BasicStats.Intellect.ToString("0"),
                                                      (baseStats.SpellCrit * 100f).ToString("0.00"),
                                                      s
                                                      );
            #endregion
            #region Mastery
            s = string.Empty;
            float masteryBase = 0, masteryBonus = 0;
            if (BasicStats.PriestSpec == ePriestSpec.Spec_Disc)
            {
                masteryBase  = PriestInformation.DisciplineMasteryBase;
                masteryBonus = PriestInformation.DisciplineMasteryEffect * 100f;
                s           += String.Format("\n\nEach point of mastery increases the potency of Absorbs by an additional {0}%.", masteryBonus.ToString("0.00"));
            }
            else if (BasicStats.PriestSpec == ePriestSpec.Spec_Holy)
            {
                masteryBase  = PriestInformation.HolyMasteryBase;
                masteryBonus = PriestInformation.HolyMasteryEffect * 100f;
                s           += String.Format("\n\nEach point of mastery provides an additional {0}% healing over 6 sec.", masteryBonus.ToString("0.00"));
            }
            dictValues["Mastery"] = String.Format("{0}%*{1}% from {2} Mastery Rating\n{3}% from {4} Base Mastery{5}",
                                                  ((StatConversion.GetMasteryFromRating(BasicStats.MasteryRating) + masteryBase) * masteryBonus).ToString("0.00"),
                                                  (StatConversion.GetMasteryFromRating(BasicStats.MasteryRating) * masteryBonus).ToString("0.00"), BasicStats.MasteryRating.ToString("0"),
                                                  (masteryBase * masteryBonus).ToString("0.00"), masteryBase.ToString("0"),
                                                  s
                                                  );
            #endregion
            #endregion
            #region Defense
            dictValues["Armor"] = String.Format("{0}*{1}% physical damage reduction from same level target",
                                                BasicStats.Armor.ToString("0"),
                                                (StatConversion.GetDamageReductionFromArmor(Character.Level, BasicStats.Armor) * 100f).ToString("0.00"));
            dictValues["Dodge"]      = String.Format("{0}%", (BasicStats.Dodge * 100f).ToString("0.00"));
            dictValues["Resilience"] = String.Format("{0}*{1}% damage reduction on attacks from other players\n{2}% damage reduction from spells",
                                                     BasicStats.Resilience.ToString("0"),
                                                     (StatConversion.GetDamageReductionFromResilience(BasicStats.Resilience) * 100f).ToString("0.00"),
                                                     (Character.PriestTalents.InnerSanctum * 2f).ToString("0"));
            #endregion
            #region Resistance
            string   resistTxt   = "{0}*PvP\n{1}\n\nBoss\n{2}";
            string[] resistList  = { "Arcane", "Fire", "Frost", "Nature", "Shadow" };
            float[]  resistances = { BasicStats.ArcaneResistance + BasicStats.ArcaneResistanceBuff,
                                     BasicStats.FireResistance + BasicStats.FireResistanceBuff,
                                     BasicStats.FrostResistance + BasicStats.FrostResistanceBuff,
                                     BasicStats.NatureResistance + BasicStats.NatureResistanceBuff,
                                     BasicStats.ShadowResistance + BasicStats.ShadowResistanceBuff };

            for (int x = 0; x < resistList.Length; x++)
            {
                dictValues[resistList[x]] = String.Format(resistTxt,
                                                          resistances[x].ToString("0"),
                                                          StatConversion.GetResistanceTableString(Character.Level, Character.Level, resistances[x], 0f),
                                                          StatConversion.GetResistanceTableString(Character.Level + 3, Character.Level, resistances[x], 0f)
                                                          );
            }
            #endregion
            #region Model
            CalculationOptionsHealPriest calcOpts = Character.CalculationOptions as CalculationOptionsHealPriest;
            if (calcOpts != null)
            {
                PriestSolver solver = PriestModels.GetModel(this, calcOpts, true);
                solver.Solve();
                List <string> reqs = solver.MeetsRequirements();
                string        disp;
                if (reqs.Count > 0)
                {
                    disp = String.Format("{0}\n\n{1}", solver.Name, String.Join("\n", reqs));
                }
                else
                {
                    disp = solver.Name;
                }
                dictValues["Role"]       = disp;
                dictValues["Burst Goal"] = this.BurstGoal.ToString("0");
                dictValues["Sust. Goal"] = this.SustainGoal.ToString("0");
                dictValues["Mana Goal"]  = this.ManaGoal.ToString("0");
                dictValues["Burst"]      = this.BurstPoints.ToString("0");
                dictValues["Sustained"]  = this.SustainPoints.ToString("0");
                dictValues["Mana "]      = this.ManaPoints.ToString("0");
            }
            #endregion
            #region Holy Spells
            SpellHeal spellHeal = new SpellHeal(Character, BasicStats);
            dictValues["Heal"] = String.Format("{0}*{1}", spellHeal.HPS().ToString("0"), spellHeal.ToString());
            SpellGreaterHeal spellGreaterHeal = new SpellGreaterHeal(Character, BasicStats);
            dictValues["Greater Heal"] = String.Format("{0}*{1}", spellGreaterHeal.HPS().ToString("0"), spellGreaterHeal.ToString());
            SpellFlashHeal spellFlashHeal = new SpellFlashHeal(Character, BasicStats);
            dictValues["Flash Heal"] = String.Format("{0}*{1}", spellFlashHeal.HPS().ToString("0"), spellFlashHeal.ToString());
            SpellBindingHeal spellBindingHeal = new SpellBindingHeal(Character, BasicStats);
            dictValues["Binding Heal"] = String.Format("{0}*{1}", spellBindingHeal.HPS().ToString("0"), spellBindingHeal.ToString());
            SpellRenew spellRenew = new SpellRenew(Character, BasicStats);
            dictValues["Renew"] = String.Format("{0}*{1}", spellRenew.HPS().ToString("0"), spellRenew.ToString());
            if (Character.PriestTalents.Lightwell > 0)
            {
                SpellLightwell spellLW = new SpellLightwell(Character, BasicStats);
                dictValues["Lightwell"] = String.Format("{0}*{1}", spellLW.HPS().ToString("0"), spellLW.ToString());
            }
            else
            {
                dictValues["Lightwell"] = "N/A*You do not have the talent required.";
            }
            SpellPrayerOfHealing spellProH = new SpellPrayerOfHealing(Character, BasicStats);
            dictValues["ProH"] = String.Format("{0}*{1}", spellProH.HPS().ToString("0"), spellProH.ToString());
            SpellHolyNova spellHolyNova = new SpellHolyNova(Character, BasicStats);
            dictValues["Holy Nova"] = String.Format("NYI*{1}", spellHolyNova.HPS().ToString("0"), spellHolyNova.ToString());
            if (Character.PriestTalents.CircleOfHealing > 0)
            {
                SpellCircleOfHealing spellCoH = new SpellCircleOfHealing(Character, BasicStats);
                dictValues["CoH"] = String.Format("{0}*{1}", spellCoH.HPS().ToString("0"), spellCoH.ToString());
            }
            else
            {
                dictValues["CoH"] = "N/A*You do not have the talent required.";
            }
            if (BasicStats.PriestSpec == ePriestSpec.Spec_Disc)
            {
                SpellPenance spellPenance = new SpellPenance(Character, BasicStats);
                dictValues["Penance"] = String.Format("{0}*{1}", spellPenance.HPS().ToString("0"), spellPenance.ToString());
            }
            else
            {
                dictValues["Penance"] = "N/A*You do not have the correct Talent specialization.";
            }
            if (Character.PriestTalents.Revelations > 0)
            {
                SpellSerenity spellSerenity = new SpellSerenity(Character, BasicStats);
                dictValues["HW Serenity"] = String.Format("{0}*{1}", spellSerenity.HPS().ToString("0"), spellSerenity.ToString());
                SpellSanctuary spellSanctuary = new SpellSanctuary(Character, BasicStats);
                dictValues["HW Sanctuary"] = String.Format("{0}*{1}", spellSanctuary.HPS().ToString("0"), spellSanctuary.ToString());
            }
            else
            {
                dictValues["HW Serenity"]  = "N/A*You do not have the talent required.";
                dictValues["HW Sanctuary"] = "N/A*You do not have the talent required.";
            }
            SpellPrayerOfMending spellProM = new SpellPrayerOfMending(Character, BasicStats, 1);
            dictValues["ProM"]        = String.Format("{0}*{1}", spellProM.HPS().ToString("0"), spellProM.ToString());
            spellProM                 = new SpellPrayerOfMending(Character, BasicStats);
            dictValues["ProM 5 Hits"] = String.Format("{0}*{1}", spellProM.HPS().ToString("0"), spellProM.ToString());
            SpellPowerWordShield spellPWS = new SpellPowerWordShield(Character, BasicStats);
            dictValues["PWS"] = String.Format("{0}*{1}", spellPWS.HPS().ToString("0"), spellPWS.ToString());
            SpellDivineHymn spellDivineHymn = new SpellDivineHymn(Character, BasicStats);
            dictValues["Divine Hymn"] = String.Format("{0}*{1}", spellDivineHymn.HPS().ToString("0"), spellDivineHymn.ToString());
            if (Character.Race == CharacterRace.Draenei)
            {
                SpellGiftOfTheNaaru spellGoat = new SpellGiftOfTheNaaru(Character, BasicStats);
                dictValues["Gift of the Naaru"] = String.Format("{0}*{1}", spellGoat.HPS().ToString("0"), spellGoat.ToString());
            }
            else
            {
                dictValues["Gift of the Naaru"] = "N/A*You are not a spacegoat!";
            }
            SpellResurrection spellResurrection = new SpellResurrection(Character, BasicStats);
            dictValues["Resurrection"] = String.Format("{0}*{1}", spellResurrection.CastTime.ToString("0.00"), spellResurrection.ToString());
            #endregion
            #region Shadow Spells
            #endregion
            return(dictValues);
        }
        public override Dictionary <string, string> GetCharacterDisplayCalculationValues()
        {
            Dictionary <string, string> retVal = new Dictionary <string, string>();

            //
            if (BasicStats == null)
            {
                BasicStats = new Stats();
            }

            retVal.Add("Health", BasicStats.Health.ToString());
            retVal.Add("Mana", BasicStats.Mana.ToString());
            retVal.Add("Armor", BasicStats.Armor.ToString());
            retVal.Add("Agility", Math.Floor(BasicStats.Agility).ToString());
            retVal.Add("Stamina", Math.Floor(BasicStats.Stamina).ToString());
            retVal.Add("Intellect", Math.Floor(BasicStats.Intellect).ToString());
            retVal.Add("Spirit", Math.Floor(BasicStats.Spirit).ToString());

            retVal.Add("Fight Length", String.Format("{0:F0}s", FightLength));
            retVal.Add("Divisions", Division.Fractions.Length.ToString() + "*" + Division.GetDivisionDetailTooltip(i => String.Format("{0:F0}s ({1:F2}%)", Division.Fractions[i] * FightLength, 100 * Division.Fractions[i])));

            retVal.Add("Innervates", String.Format("{0:F2}", Innervates) + ((Innervates != Math.Floor(Innervates)) ? "*Fractional values denote the reduced value of innervates near the fight beginning or end" : ""));
            retVal.Add("Innervate Effect Delay", String.Format("{0:F2}", InnervateEffectDelay) + ((InnervateEffect != null) ? "*Innervate when this effect is up, and it wouldn't cap mana:\n" + InnervateEffect.ToString() : ""));
            retVal.Add("Mean Mana", String.Format("{0:F0}", MeanMana));
            retVal.Add("Innervate Mana", String.Format("{0:F0}", InnervateMana));
            retVal.Add("Innervate Size", String.Format("{0:F0}", InnervateSize));

            addSpellStatValues(retVal, "Spell Power", "{0:F0}", x => x.SpellPower, String.Format("{0:F0} Base Spell Power", Math.Floor(BaseSpellPower)));
            addSpellStatValues(retVal, "Spell Crit", "{0:F2}%", x => x.SpellCrit * 100, String.Format("{0} Crit Rating from Gear, {1:F}% Crit from Gear, {2:F}% Crit from Gear Intellect",
                                                                                                      BasicStats.CritRating,
                                                                                                      100 * StatConversion.GetSpellCritFromRating(BasicStats.CritRating),
                                                                                                      100 * StatConversion.GetSpellCritFromIntellect(BasicStats.Intellect)));
            addSpellStatValues(retVal, "Spell Haste", "{0:F2}%", x => 100 * (1 / x.Haste.HastedSecond - 1), String.Format("{0} Haste Rating from Gear, {1:F}% Haste from Gear, {2:F}% Haste from Gear and Buffs",
                                                                                                                          (float)BasicStats.HasteRating,
                                                                                                                          100 * StatConversion.GetSpellHasteFromRating((float)BasicStats.HasteRating),
                                                                                                                          100 * ((1 + StatConversion.GetSpellHasteFromRating((float)BasicStats.HasteRating)) * (1.0f + BasicStats.SpellHaste) - 1)
                                                                                                                          ));
            addSpellStatValues(retVal, "Spell Mana Cost Reduction", "{0:F0}", x => x.SpellsManaCostReduction);
            addSpellStatValues(retVal, "Spell Crit Extra Bonus", "{0:F0}%", x => 100 * x.BonusCritHealMultiplier);
            string masteryInfo = String.Format("{0:F0} Mastery Rating from Gear, {1:F2} Mastery from Gear",
                                               BasicStats.MasteryRating, 8 + StatConversion.GetMasteryFromRating(BasicStats.MasteryRating));

            addSpellStatValues(retVal, "Harmony", "{0:F}%", x => 100 * x.Harmony, masteryInfo);

            retVal.Add("Mana Regen", String.Format("{0:F0}", ManaRegen));
            retVal.Add("Base Mana Regen", String.Format("{0:F0}", BaseRegen));
            retVal.Add("Initial Mana Pool Regen", String.Format("{0:F0}", ManaPoolRegen));
            retVal.Add("Spirit Mana Regen", String.Format("{0:F0}", SpiritRegen));
            retVal.Add("Innervate Mana Regen", String.Format("{0:F0}", InnervateRegen));
            retVal.Add("Replenishment Mana Regen", String.Format("{0:F0}", ReplenishmentRegen));
            retVal.Add("Revitalize Mana Regen", String.Format("{0:F0}", RevitalizeRegen));
            retVal.Add("Potion Mana Regen", String.Format("{0:F0}", PotionRegen));

            retVal.Add("Total Score", String.Format("{0:F2}", OverallPoints));
            string[] longNames = { "Raid Sustained", "Raid Burst", "Tank Sustained", "Tank Burst" };
            for (int i = 0; i < longNames.Length; ++i)
            {
                retVal.Add(longNames[i] + " HPS", String.Format("{0:F2}", Solutions[i].Distribution.TotalEPS()));
                retVal.Add(longNames[i] + " Directs/s", String.Format("{0:F2}", Solutions[i].Distribution.TotalCPS()));
                retVal.Add(longNames[i] + " Ticks/s", String.Format("{0:F2}", Solutions[i].Distribution.TotalTPS()));
            }

            retVal.Add("Proc trigger interval", String.Format("{0:F2}", ProcTriggerInterval));
            retVal.Add("Proc periodic trigger interval", String.Format("{0:F2}", ProcPeriodicTriggerInterval));

            ContinuousAction[] actions = ContinuousAction.AverageActionSets(Actions, Division.Fractions);

            for (int i = 0; i < actions.Length; ++i)
            {
                retVal.Add(CalculationsTree.ActionNames[i] + " HPCT", actions[i].EPSText + "*" + Division.GetDivisionDetailTooltip(div => Actions[div][i].EPSText));
                retVal.Add(CalculationsTree.ActionNames[i] + " MPCT", actions[i].MPSText + "*" + Division.GetDivisionDetailTooltip(div => Actions[div][i].MPSText));
                retVal.Add(CalculationsTree.ActionNames[i] + " HPM", actions[i].EPMText + "*" + Division.GetDivisionDetailTooltip(div => Actions[div][i].EPMText));
            }

            string[] names = { "Raid S.", "Raid B.", "Tank S.", "Tank B." };
            for (int i = 0; i < names.Length; ++i)
            {
                Solutions[i].GetProperties(retVal, names[i] + ' ', CalculationsTree.ActionNames, CalculationsTree.PassiveNames);
            }

            addSpellCalculationValues(retVal, "Time", s => s.Action.Time);
            addSpellCalculationValues(retVal, "Duration", s => s.Duration);
            addSpellCalculationValues(retVal, "Mana", s => s.Action.Mana);
            addSpellCalculationValues(retVal, "Direct", s => s.Action.Direct);
            addSpellCalculationValues(retVal, "Tick", s => s.Tick);
            addSpellCalculationValues(retVal, "Ticks", s => s.Ticks);
            addSpellCalculationValues(retVal, "Periodic", s => s.Action.Periodic);
            addSpellCalculationValues(retVal, "Raid Direct", s => s.RaidAction.Direct);
            addSpellCalculationValues(retVal, "Raid Periodic", s => s.RaidAction.Periodic);
            addSpellCalculationValues(retVal, "Tank Direct", s => s.TankAction.Direct);
            addSpellCalculationValues(retVal, "Tank Periodic", s => s.TankAction.Periodic);
            return(retVal);
        }
Exemple #14
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 RogueRotationCalculatorCombat(Character character, Stats stats, BossOptions bossOpts, CalculationOptionsRogue calcOpts, float hasteBonus, float mainHandSpeed, float offHandSpeed, float mainHandSpeedNorm,
                                             float offHandSpeedNorm, float avoidedWhiteMHAttacks, float avoidedWhiteOHAttacks, float avoidedMHAttacks, float avoidedOHAttacks, float avoidedFinisherAttacks,
                                             float avoidedPoisonAttacks, float chanceExtraCPPerHit, RogueAbilityStats mainHandStats, RogueAbilityStats offHandStats, RogueAbilityStats mainGaucheStats,
                                             RogueAbilityStats sStrikeStats, RogueAbilityStats rStrikeStats, RogueAbilityStats ruptStats, RogueAbilityStats evisStats, RogueAbilityStats snDStats, RogueAbilityStats exposeStats,
                                             RogueAbilityStats iPStats, RogueAbilityStats dPStats, RogueAbilityStats wPStats) : base(character, stats, bossOpts, calcOpts, hasteBonus, mainHandSpeed, offHandSpeed, mainHandSpeedNorm,
                                                                                                                                     offHandSpeedNorm, avoidedWhiteMHAttacks, avoidedWhiteOHAttacks, avoidedMHAttacks, avoidedOHAttacks, avoidedFinisherAttacks, avoidedPoisonAttacks, chanceExtraCPPerHit, mainHandStats,
                                                                                                                                     offHandStats, ruptStats, snDStats, exposeStats, iPStats, dPStats, wPStats)
        {
            SStrikeStats    = sStrikeStats;
            RStrikeStats    = rStrikeStats;
            EvisStats       = evisStats;
            MainGaucheStats = mainGaucheStats;

            ChanceOnMGAttackOnMHAttack = RV.Mastery.MainGauche + RV.Mastery.MainGauchePerMast * StatConversion.GetMasteryFromRating(stats.MasteryRating);
            EnergyRegenMultiplier      = (1f + RV.Mastery.VitalityRegenMult) * (1f + (RV.AR.Duration + (Talents.GlyphOfAdrenalineRush ? RV.Glyph.ARDurationBonus : 0f)) / RV.AR.CD * Talents.AdrenalineRush) * (1f + HasteBonus) - 1f;

            #region Probability tables
            float c = ChanceExtraCPPerHit, h = (1f - c), f = CPOnFinisher, nf = (1f - f);
            _averageNormalCP[1] = 1 * (f + nf * h) + 2 * (nf * c);
            _averageNormalCP[2] = 2 * (f * h + nf * c + nf * h * h) + 3 * (f * c);
            _averageNormalCP[3] = 3 * (f * c + f * h * h + 2 * nf * c * h + nf * h * h * h) + 4 * (f * h * c + nf * c * c + nf * h * h * c);
            _averageNormalCP[4] = 4 * (2 * f * c * h + f * h * h * h + nf * c * c + 3 * nf * c * h * h + nf * h * h * h * h) + 5 * (f * c * c + f * h * h * c + 2 * nf * c * h * c + nf * h * h * h * c);
            _averageNormalCP[5] = 5 * (f * c * c + 3 * f * c * h * h + f * h * h * h * h + 3 * nf * c * c * h + 4 * nf * c * h * h * h + nf * h * h * h * h * h) + 6 * (2 * f * c * h * c + f * h * h * h * c + nf * c * c * c + 3 * nf * c * h * h * c + nf * h * h * h * h * c);

            c = ChanceExtraCPPerHit + ChanceOnCPOnSSCrit * SStrikeStats.CritChance; h = (1f - c);
            _averageSStrikeCP[1] = 1 * (f + nf * h) + 2 * (nf * c);
            _averageSStrikeCP[2] = 2 * (f * h + nf * c + nf * h * h) + 3 * (f * c + nf * h * c);
            _averageSStrikeCP[3] = 3 * (f * c + f * h * h + 2 * nf * c * h + nf * h * h * h) + 4 * (f * h * c + nf * c * c + nf * h * h * c);
            _averageSStrikeCP[4] = 4 * (2 * f * c * h + f * h * h * h + nf * c * c + 3 * nf * c * h * h + nf * h * h * h * h) + 5 * (f * c * c + f * h * h * c + 2 * nf * c * h * c + nf * h * h * h * c);
            _averageSStrikeCP[5] = 5 * (f * c * c + 3 * f * c * h * h + f * h * h * h * h + 3 * nf * c * c * h + 4 * nf * c * h * h * h + nf * h * h * h * h * h) + 6 * (2 * f * c * h * c + f * h * h * h * c + nf * c * c * c + 3 * nf * c * h * h * c + nf * h * h * h * h * c);
            #endregion
        }
        public override Dictionary <string, string> GetCharacterDisplayCalculationValues()
        {
            Dictionary <string, string> dictValues = new Dictionary <string, string>();

            dictValues.Add("DPS Points", DPS.ToString("F2", CultureInfo.InvariantCulture));
            dictValues.Add("Survivability Points", Survivability.ToString("F2", CultureInfo.InvariantCulture));
            dictValues.Add("Overall Points", OverallPoints.ToString("F2", CultureInfo.InvariantCulture));

            dictValues.Add("Health", BasicStats.Health.ToString("F0", CultureInfo.InvariantCulture));
            dictValues.Add("Mana", BasicStats.Mana.ToString("F0", CultureInfo.InvariantCulture));
            dictValues.Add("Strength", String.Format("{0}*Increases Attack Power by {1}",
                                                     BasicStats.Strength.ToString("F0", CultureInfo.InvariantCulture),
                                                     (BasicStats.Strength - 10f).ToString("F0", CultureInfo.InvariantCulture)));
            dictValues.Add("Agility", String.Format("{0}*Increases Attack Power by {1}\r\nIncreases Critical Hit chance by {2}%",
                                                    BasicStats.Agility.ToString("F0", CultureInfo.InvariantCulture),
                                                    ((BasicStats.Agility * 2f) - 20f).ToString("F0", CultureInfo.InvariantCulture),
                                                    (StatConversion.GetCritFromAgility(BasicStats.Agility, CharacterClass.Shaman) * 100f).ToString("F2", CultureInfo.InvariantCulture)));
            dictValues.Add("Stamina", String.Format("{0}*Increase Health by {1}",
                                                    BasicStats.Stamina.ToString("F0", CultureInfo.InvariantCulture),
                                                    (StatConversion.GetHealthFromStamina(BasicStats.Stamina)).ToString("F0", CultureInfo.InvariantCulture)));
            dictValues.Add("Intellect", String.Format("{0}*Increases Mana by {1}\r\nIncreases Spell Power by {2}\r\nIncreases Spell Critical Hit chance by {3}%",
                                                      BasicStats.Intellect.ToString("F0", CultureInfo.InvariantCulture),
                                                      (StatConversion.GetManaFromIntellect(BasicStats.Intellect)).ToString("F0", CultureInfo.InvariantCulture),
                                                      (BasicStats.Intellect - 10f).ToString("F0", CultureInfo.InvariantCulture),
                                                      (StatConversion.GetSpellCritFromIntellect(BasicStats.Intellect, CharacterClass.Shaman) * 100f).ToString("F2", CultureInfo.InvariantCulture)));
            dictValues.Add("Spirit", String.Format("{0}*Increases mana regeneration by {1} every 5 seconds while not casting",
                                                   BasicStats.Spirit.ToString("F0", CultureInfo.InvariantCulture),
                                                   (StatConversion.GetSpiritRegenSec(BasicStats.Spirit, BasicStats.Intellect) * 5f).ToString("F0", CultureInfo.InvariantCulture)));
            dictValues.Add("Mastery", String.Format("{0}*Mastery rating of {1} adds {2} Mastery\r\nIncreases all Fire, Frost, and Nature Damage by {3}%.",
                                                    (8f + StatConversion.GetMasteryFromRating(BasicStats.MasteryRating)).ToString("F2", CultureInfo.InvariantCulture),
                                                    BasicStats.MasteryRating.ToString("F0", CultureInfo.InvariantCulture),
                                                    (StatConversion.GetMasteryFromRating(BasicStats.MasteryRating)).ToString("F2", CultureInfo.InvariantCulture),
                                                    ((8f + StatConversion.GetMasteryFromRating(BasicStats.MasteryRating)) * 2.5f).ToString("F2", CultureInfo.InvariantCulture)));

            //dictValues.Add("Damage"
            //dictValues.Add("DPS"
            dictValues.Add("Attack Power", BasicStats.AttackPower.ToString("F0", CultureInfo.InvariantCulture));
            //dictValues.Add("Speed"
            dictValues.Add("Melee Haste", String.Format("{0}%*Haste Rating of {1} adds {2}% Haste",
                                                        (StatConversion.GetHasteFromRating(BasicStats.HasteRating, CharacterClass.Shaman) * 100f).ToString("F2", CultureInfo.InvariantCulture),
                                                        BasicStats.HasteRating.ToString("F0", CultureInfo.InvariantCulture),
                                                        (StatConversion.GetHasteFromRating(BasicStats.HasteRating, CharacterClass.Shaman) * 100f).ToString("F2", CultureInfo.InvariantCulture)));
            dictValues.Add("Melee Hit", String.Format("{0}%*Hit Rating of {1} adds {2}% Hit chance\r\n{3}% Draenei Hit Bonus",
                                                      (StatConversion.GetHitFromRating(BasicStats.HitRating) * 100f + DraeneiHitBonus * 100f).ToString("F2", CultureInfo.InvariantCulture),
                                                      BasicStats.HitRating.ToString("F0", CultureInfo.InvariantCulture),
                                                      (StatConversion.GetHitFromRating(BasicStats.HitRating) * 100f).ToString("F2", CultureInfo.InvariantCulture),
                                                      DraeneiHitBonus * 100f));
            dictValues.Add("Melee Crit", String.Format("{0}%*Crit Rating of {1} adds {2}% Crit chance",
                                                       ((StatConversion.GetCritFromRating(BasicStats.CritRating, CharacterClass.Shaman) * 100f) + (StatConversion.GetCritFromAgility(BasicStats.Agility, CharacterClass.Shaman) * 100f)).ToString("F2", CultureInfo.InvariantCulture),
                                                       BasicStats.CritRating.ToString("F0", CultureInfo.InvariantCulture),
                                                       (StatConversion.GetCritFromRating(BasicStats.CritRating, CharacterClass.Shaman) * 100f).ToString("F2", CultureInfo.InvariantCulture)));
            dictValues.Add("Expertise", getExpertiseString());// String.Format("{0} / {1}*Reduces chance to be dodged or parried by {2}% / {3}%\r\nExpertise Rating of {4} adds {5} Expertise",

            dictValues.Add("Spell Power", BasicStats.SpellPower.ToString("F0", CultureInfo.InvariantCulture));
            dictValues.Add("Spell Haste", String.Format("{0}%*Haste Rating of {1} adds {2}% Haste",
                                                        (StatConversion.GetSpellHasteFromRating(BasicStats.HasteRating, CharacterClass.Shaman) * 100f).ToString("F2", CultureInfo.InvariantCulture),
                                                        BasicStats.HasteRating.ToString("F0", CultureInfo.InvariantCulture),
                                                        (StatConversion.GetSpellHasteFromRating(BasicStats.HasteRating, CharacterClass.Shaman) * 100f).ToString("F2", CultureInfo.InvariantCulture)));
            dictValues.Add("Spell Hit", String.Format("{0}%*Hit Rating of {1} adds {2}% Hit chance\r\n{3}% Draenei Hit Bonus",
                                                      (StatConversion.GetSpellHitFromRating(BasicStats.HitRating + ElemPrecMod) * 100f + DraeneiHitBonus * 100f).ToString("F2", CultureInfo.InvariantCulture),
                                                      (BasicStats.HitRating + ElemPrecMod).ToString("F0", CultureInfo.InvariantCulture),
                                                      (StatConversion.GetSpellHitFromRating(BasicStats.HitRating + ElemPrecMod) * 100f).ToString("F2", CultureInfo.InvariantCulture),
                                                      DraeneiHitBonus * 100f));
            dictValues.Add("Spell Crit", String.Format("{0}%*Crit Rating of {1} adds {2}% Crit chance",
                                                       ((StatConversion.GetSpellCritFromRating(BasicStats.CritRating, CharacterClass.Shaman) * 100f) + (StatConversion.GetSpellCritFromIntellect(BasicStats.Intellect, CharacterClass.Shaman) * 100f)).ToString("F2", CultureInfo.InvariantCulture),
                                                       BasicStats.CritRating.ToString("F0", CultureInfo.InvariantCulture),
                                                       (StatConversion.GetSpellCritFromRating(BasicStats.CritRating, CharacterClass.Shaman) * 100f).ToString("F2", CultureInfo.InvariantCulture)));
            dictValues.Add("Combat Regen", String.Format("{0}*{0} mana regenerated every 5 seconds while in combat",
                                                         BaseRegen.ToString("F0", CultureInfo.InvariantCulture)));

            //dictValues.Add("Avg Agility", _attackPower.ToString("F0", CultureInfo.InvariantCulture));
            //dictValues.Add("Avg Intellect"
            //dictValues.Add("Avg Mastery"
            //dictValues.Add("Avg Attack Power"
            dictValues.Add("Avg Speed", String.Format("{0} / {1}", AvMHSpeed.ToString("F2", CultureInfo.InvariantCulture), AvOHSpeed.ToString("F2", CultureInfo.InvariantCulture)));
            //dictValues.Add("Avg Melee Haste"
            //dictValues.Add("Avg Melee Hit"
            //dictValues.Add("Avg Melee Crit"
            //dictValues.Add("Avg Expertise"
            //dictValues.Add("Avg Spell Power"
            //dictValues.Add("Avg Spell Haste"
            //dictValues.Add("Avg Spell Hit"
            //dictValues.Add("Avg Spell Crit"
            dictValues.Add("Avg Combat Regen", ManaRegen.ToString("F0", CultureInfo.InvariantCulture));

            /*dictValues.Add("White Hit", WhiteHit.ToString("F2", CultureInfo.InvariantCulture) + "%");
             * if (YellowHit < 100f && TotalExpertiseMH < 26)
             * {
             *  float ratingRequired = (float)Math.Ceiling(4f * StatConversion.GetRatingFromExpertise(100f - YellowHit));
             *  dictValues.Add("Yellow Hit", String.Format("{0}% (Under Cap)*You need {1} more expertise to cap specials (WF,SS)",
             *      YellowHit.ToString("F2", CultureInfo.InvariantCulture),
             *      ratingRequired.ToString("F0", CultureInfo.InvariantCulture)));
             * }
             * else
             * {
             *  if (ParriedAttacks > 0)
             *  {
             *      float ratingRequired = (float)Math.Ceiling(4f * StatConversion.GetRatingFromExpertise(100f - YellowHit));
             *      dictValues.Add("Yellow Hit", String.Format("{0}%*Being in front of boss allows your attacks to be parried\r\nYou would need {1} more expertise to cap specials (WF,SS)",
             *         YellowHit.ToString("F2", CultureInfo.InvariantCulture),
             *         ratingRequired.ToString("F0", CultureInfo.InvariantCulture)));
             *  }
             *  else
             *      dictValues.Add("Yellow Hit", YellowHit.ToString("F2", CultureInfo.InvariantCulture) + "%");
             * }
             * if (OverSpellHitCap > 0.38f) // only warn if more than .38% over cap (equivalent to 10 hit rating)
             *  dictValues.Add("Spell Hit", String.Format("{0}% (Over Cap)*Over Spell Hit Cap by {1}%",
             *      SpellHit.ToString("F2", CultureInfo.InvariantCulture),
             *      OverSpellHitCap.ToString("F2", CultureInfo.InvariantCulture)));
             * else
             * {
             *  if (SpellHit < 100f)
             *  {
             *      float ratingRequired = (float)Math.Ceiling(StatConversion.GetRatingFromSpellHit(1f - SpellHit/100f));
             *      dictValues.Add("Spell Hit", String.Format("{0}% (Under Cap)*You need {1} more hit rating to cap spells (ES, LB etc)",
             *          SpellHit.ToString("F2", CultureInfo.InvariantCulture),
             *          ratingRequired.ToString("F0", CultureInfo.InvariantCulture)));
             *  }
             *  else
             *      dictValues.Add("Spell Hit", SpellHit.ToString("F2", CultureInfo.InvariantCulture) + "%");
             * }*/
            /*if (OverMeleeCritCap > 0.21f) // only warn if more than .21% over cap (equivalent to 10 crit rating)
             *  dictValues.Add("Melee Crit", String.Format("{0} (Over Cap)*Crit Rating {1} (+{2}% crit chance)\r\nOver Soft Cap by {3}%",
             *      MeleeCrit.ToString("F2", CultureInfo.InvariantCulture) + "%",
             *      BasicStats.CritRating.ToString("F0", CultureInfo.InvariantCulture),
             *      (StatConversion.GetCritFromRating(BasicStats.CritRating) * 100f).ToString("F2", CultureInfo.InvariantCulture),
             *      OverMeleeCritCap.ToString("F2", CultureInfo.InvariantCulture)));
             * else
             *  dictValues.Add("Melee Crit", String.Format("{0}*Crit Rating {1} (+{2}% crit chance)",
             *      MeleeCrit.ToString("F2", CultureInfo.InvariantCulture) + "%",
             *      BasicStats.CritRating.ToString("F0", CultureInfo.InvariantCulture),
             *      (StatConversion.GetCritFromRating(BasicStats.CritRating) * 100f).ToString("F2", CultureInfo.InvariantCulture)));
             *
             * dictValues.Add("Spell Crit", String.Format("{0}*Crit Rating {1} (+{2}% crit chance)",
             *  SpellCrit.ToString("F2", CultureInfo.InvariantCulture) + "%",
             *  BasicStats.CritRating.ToString("F0", CultureInfo.InvariantCulture),
             *  (StatConversion.GetSpellCritFromRating(BasicStats.CritRating) * 100f).ToString("F2", CultureInfo.InvariantCulture)));*/

            float spellMiss = 100 - SpellHit;

            dictValues.Add("Avoided Attacks", String.Format("{0}%*{1}% Boss Dodged\r\n{2}% Boss Parried\r\n{3}% Spell Misses\r\n{4}% White Misses",
                                                            AvoidedAttacks.ToString("F2", CultureInfo.InvariantCulture),
                                                            DodgedAttacks.ToString("F2", CultureInfo.InvariantCulture),
                                                            ParriedAttacks.ToString("F2", CultureInfo.InvariantCulture),
                                                            spellMiss.ToString("F2", CultureInfo.InvariantCulture),
                                                            MissedAttacks.ToString("F2", CultureInfo.InvariantCulture)));
            dictValues.Add("Armor Mitigation", ArmorMitigation.ToString("F2", CultureInfo.InvariantCulture) + "%*Amount of physical damage lost due to boss armor");

            dictValues.Add("ED Uptime", String.Format("{0}%*{1}% ED Bonus Crit",
                                                      EDUptime.ToString("F2", CultureInfo.InvariantCulture),
                                                      EDBonusCrit.ToString("F2", CultureInfo.InvariantCulture)));
            dictValues.Add("Flurry Uptime", FlurryUptime.ToString("F2", CultureInfo.InvariantCulture) + "%");
            dictValues.Add("Avg Time to 5 Stack", String.Format("{0} sec*{1} PPM",
                                                                SecondsTo5Stack.ToString("F2", CultureInfo.InvariantCulture),
                                                                _MWPPM.ToString("F2", CultureInfo.InvariantCulture)));
            dictValues.Add("MH Enchant Uptime", MHEnchantUptime.ToString("F2", CultureInfo.InvariantCulture) + "%");
            dictValues.Add("OH Enchant Uptime", OHEnchantUptime.ToString("F2", CultureInfo.InvariantCulture) + "%");
            dictValues.Add("Trinket 1 Uptime", Trinket1Uptime.ToString("F2", CultureInfo.InvariantCulture) + "%");
            dictValues.Add("Trinket 2 Uptime", Trinket2Uptime.ToString("F2", CultureInfo.InvariantCulture) + "%");
            dictValues.Add("Fire Totem Uptime", FireTotemUptime.ToString("F2", CultureInfo.InvariantCulture) + "%");

            dictValues.Add("White Damage", dpsOutputFormat(SwingDamage, DPS, true));
            dictValues.Add("Windfury Attack", dpsOutputFormat(WindfuryAttack, DPS, true));
            dictValues.Add("Flametongue Attack", dpsOutputFormat(FlameTongueAttack, DPS, true));
            dictValues.Add("Stormstrike", dpsOutputFormat(Stormstrike, DPS, true));
            dictValues.Add("Lava Lash", dpsOutputFormat(LavaLash, DPS, true));
            dictValues.Add("Searing/Magma Totem", dpsOutputFormat(SearingMagma, DPS, false));
            dictValues.Add("Earth Shock", dpsOutputFormat(EarthShock, DPS, false));
            dictValues.Add("Flame Shock", dpsOutputFormat(FlameShock, DPS, false));
            dictValues.Add("Lightning Bolt", dpsOutputFormat(LightningBolt, DPS, false));
            dictValues.Add("Unleash Wind", dpsOutputFormat(UnleashWind, DPS, true));
            dictValues.Add("Unleash Flame", dpsOutputFormat(UnleashFlame, DPS, false));
            dictValues.Add("Lightning Shield", dpsOutputFormat(LightningShield, DPS, false));
            dictValues.Add("Chain Lightning", dpsOutputFormat(ChainLightning, DPS, false));
            dictValues.Add("Fire Nova", dpsOutputFormat(FireNova, DPS, false));
            dictValues.Add("Fire Elemental", FireElemental.getDPSOutput());
            dictValues.Add("Spirit Wolf", dpsOutputFormat(SpiritWolf, DPS, true));
            dictValues.Add("Other", dpsOutputFormat(Other, DPS, false));
            dictValues.Add("Total DPS", DPS.ToString("F2", CultureInfo.InvariantCulture));

            /*dictValues.Add("Status", String.Format("Enhance Model : DPS Points {0}, Survivability Points {1}, Overall Points {2}",
             *  DPS.ToString("F2", CultureInfo.InvariantCulture),
             *  Survivability.ToString("F2", CultureInfo.InvariantCulture),
             *  OverallPoints.ToString("F2", CultureInfo.InvariantCulture)));*/

            return(dictValues);
        }
Exemple #17
0
 // Illuminated Healing
 public float AverageShielded()
 {
     return(AverageHealed() * (1f + StatConversion.GetMasteryFromRating(Stats.MasteryRating) * 0.1f));
 }