Esempio n. 1
0
        // 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>();

            // Status text
            dictValues["Status"] = string.Format("{0} dps", DPSPoints.ToString("N0"));

            // Basic stats
            dictValues["Health"]        = BasicStats.Health.ToString("N0");
            dictValues["Mana"]          = BasicStats.Mana.ToString("N0");
            dictValues["Strength"]      = BasicStats.Strength.ToString("N0");
            dictValues["Agility"]       = string.Format("{0:0}", BasicStats.Agility);
            dictValues["Attack Power"]  = BasicStats.AttackPower.ToString("N0");
            dictValues["Crit Chance"]   = string.Format("{0:P}*{1:0} crit rating", BasicStats.PhysicalCrit, BasicStats.CritRating);
            dictValues["Miss Chance"]   = string.Format("{0:P}*{1:P} hit ({2:0} rating)\n", ToMiss, BasicStats.PhysicalHit, BasicStats.HitRating);
            dictValues["Dodge Chance"]  = string.Format("{0:P}*{1:P} expertise ({2:0} rating)", ToBeDodged, BasicStats.Expertise * .0025f, BasicStats.ExpertiseRating);
            dictValues["Melee Haste"]   = string.Format("{0:P}*{1:0} haste rating", BasicStats.PhysicalHaste, BasicStats.HasteRating);
            dictValues["Weapon Damage"] = WeaponDamage.ToString("N2");
            dictValues["Attack Speed"]  = AttackSpeed.ToString("N2");

            // DPS Breakdown
            dictValues["Total DPS"]         = OverallPoints.ToString("N0");
            dictValues["White"]             = string.Format("{0}*{1}", WhiteDPS.ToString("N0"), WhiteSkill.ToString());
            dictValues["Seal"]              = string.Format("{0}*{1}", SealDPS.ToString("N0"), SealSkill.ToString());
            dictValues["Crusader Strike"]   = string.Format("{0}*{1}", CrusaderStrikeDPS.ToString("N0"), CrusaderStrikeSkill.ToString());
            dictValues["Judgement"]         = string.Format("{0}*{1}", JudgementDPS.ToString("N0"), JudgementSkill.ToString());
            dictValues["Consecration"]      = string.Format("{0}*{1}", ConsecrationDPS.ToString("N0"), ConsecrationSkill.ToString());
            dictValues["Exorcism"]          = string.Format("{0}*{1}", ExorcismDPS.ToString("N0"), ExorcismSkill.ToString());
            dictValues["Divine Storm"]      = string.Format("{0}*{1}", DivineStormDPS.ToString("N0"), DivineStormSkill.ToString());
            dictValues["Hammer of Wrath"]   = string.Format("{0}*{1}", HammerOfWrathDPS.ToString("N0"), HammerOfWrathSkill.ToString());
            dictValues["Hand of Reckoning"] = string.Format("{0}*{1}", HandOfReckoningDPS.ToString("N0"), HandOfReckoningSkill.ToString());
            dictValues["Other"]             = OtherDPS.ToString("N0");

            // Rotation Info:
            dictValues["Chosen Rotation"] = Rotation == null ?
                                            "n/a" :
                                            SimulatorParameters.ShortRotationString(Rotation); // TODO: Remove dependancy on SimulatorParameters.
            dictValues["Average SoV Stack"]  = AverageSoVStack.ToString("N2");
            dictValues["SoV Overtake"]       = string.Format("{0} sec", SoVOvertake.ToString("N2"));
            dictValues["Crusader Strike CD"] =
                Solution.GetAbilityEffectiveCooldown(Ability.CrusaderStrike).ToString("N2");
            dictValues["Judgement CD"] =
                Solution.GetAbilityEffectiveCooldown(Ability.Judgement).ToString("N2");
            dictValues["Consecration CD"] =
                Solution.GetAbilityEffectiveCooldown(Ability.Consecration).ToString("N2");
            dictValues["Exorcism CD"] =
                Solution.GetAbilityEffectiveCooldown(Ability.Exorcism).ToString("N2");
            dictValues["Divine Storm CD"] =
                Solution.GetAbilityEffectiveCooldown(Ability.DivineStorm).ToString("N2");
            dictValues["Hammer of Wrath CD"] =
                Solution.GetAbilityEffectiveCooldown(Ability.HammerOfWrath).ToString("N2");

            return(dictValues);
        }
        public override Dictionary <string, string> GetCharacterDisplayCalculationValues()
        {
            float critRating = BasicStats.CritRating;

            if (ActiveBuffs.Contains(Buff.GetBuffByName("Improved Judgement of the Crusade")))
            {
                critRating -= 3444f / 52f;
            }
            if (ActiveBuffs.Contains(Buff.GetBuffByName("Leader of the Pack")))
            {
                critRating -= 22.08f * 5;
            }

            float hitRating = BasicStats.HitRating;

            if (ActiveBuffs.Contains(Buff.GetBuffByName("Improved Faerie Fire")))
            {
                hitRating -= 47.3077f;
            }
            if (ActiveBuffs.Contains(Buff.GetBuffByName("Heroic Presence")))
            {
                hitRating -= 15.769f;
            }

            float armorPenetration = BasicStats.ArmorPenetration;

            if (ActiveBuffs.Contains(Buff.GetBuffByName("Faerie Fire")))
            {
                armorPenetration -= 610f;
            }
            if (ActiveBuffs.Contains(Buff.GetBuffByName("Sunder Armor (x5)")))
            {
                armorPenetration -= 2600f;
            }
            if (ActiveBuffs.Contains(Buff.GetBuffByName("Curse of Recklessness")))
            {
                armorPenetration -= 800f;
            }
            if (ActiveBuffs.Contains(Buff.GetBuffByName("Expose Armor (5cp)")))
            {
                armorPenetration -= 2050f;
            }
            if (ActiveBuffs.Contains(Buff.GetBuffByName("Improved Expose Armor (5cp)")))
            {
                armorPenetration -= 1025f;
            }

            float attackPower = BasicStats.AttackPower;

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

            float effectiveArmor = 10557.5f / ((1f / EnemyMitigation) - 1f);

            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, (BasicStats.Agility / 2500f)));
            dictValues.Add("Attack Power", attackPower.ToString("N0"));
            dictValues.Add("Crit Rating", string.Format("{0:0}*Provides {1:P} crit chance", critRating, (critRating / 2208)));
            dictValues.Add("Hit Rating", string.Format("{0:0}*Negates {1:P} miss chance", hitRating, (hitRating / 1576)));
            dictValues.Add("Expertise", string.Format("{0:0}*Negates {1:P} dodge chance", BasicStats.Expertise, (BasicStats.Expertise / 400)));
            dictValues.Add("Haste Rating", string.Format("{0:0}*Increases attack speed by {1:P}", BasicStats.HasteRating, (BasicStats.HasteRating / 1576)));
            dictValues.Add("Armor Penetration", armorPenetration.ToString("N0"));

            dictValues.Add("Weapon Damage", WeaponDamage.ToString("N2"));
            dictValues.Add("Attack Speed", AttackSpeed.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("White", WhiteDPS.ToString("N2"));
            dictValues.Add("Seal", SealDPS.ToString("N2"));
            dictValues.Add("Windfury", WindfuryDPS.ToString("N2"));
            dictValues.Add("Crusader Strike", CrusaderDPS.ToString("N2"));
            dictValues.Add("Judgement", JudgementDPS.ToString("N2"));
            dictValues.Add("Consecration", ConsecrationDPS.ToString("N2"));
            dictValues.Add("Exorcism", ExorcismDPS.ToString("N2"));
            dictValues.Add("Total DPS", DPSPoints.ToString("N2"));

            return(dictValues);
        }