Exemplo n.º 1
0
        public override Dictionary <string, string> GetCharacterDisplayCalculationValues()
        {
            Dictionary <string, string> dictValues = new Dictionary <string, string>();
            int   armorCap        = (int)Math.Ceiling((1402.5f * TargetLevel) - 66502.5f);
            float levelDifference = 0.2f * (TargetLevel - 70);

            dictValues.Add("Health", BasicStats.Health.ToString());
            dictValues.Add("Armor", BasicStats.Armor.ToString());
            dictValues.Add("Stamina", BasicStats.Stamina.ToString());
            dictValues.Add("Agility", BasicStats.Agility.ToString());
            dictValues.Add("Defense", Defense.ToString());
            dictValues.Add("Miss", Miss.ToString() + "%");
            dictValues.Add("Dodge", Dodge.ToString() + "%");
            dictValues.Add("Parry", Parry.ToString() + "%");
            dictValues.Add("Block", Block.ToString() + "%");
            dictValues.Add("Block Value", BlockValue.ToString() + "%");
            dictValues.Add("Avoidance", Avoidance.ToString() + "%");
            dictValues.Add("Mitigation", Mitigation.ToString());
            dictValues.Add("Spell Damage", _basicStats.SpellDamageRating.ToString());
            dictValues.Add("Total Mitigation", TotalMitigation.ToString() + "%");
            if (CritAvoidance == (5f + levelDifference))
            {
                dictValues.Add("Chance to be Crit", ((5f + levelDifference) - CritAvoidance).ToString()
                               + "%*Exactly enough defense rating/resilience to be uncrittable by bosses.");
            }
            else if (CritAvoidance < (5f + levelDifference))
            {
                dictValues.Add("Chance to be Crit", ((5f + levelDifference) - CritAvoidance).ToString()
                               + string.Format("%*CRITTABLE! Short by {0} defense rating or {1} resilience to be uncrittable by bosses.",
                                               Math.Ceiling(((5f + levelDifference) - CritAvoidance) * 60f), Math.Ceiling(((5f + levelDifference) - CritAvoidance) * 39.423f)));
            }
            else
            {
                dictValues.Add("Chance to be Crit", ((5f + levelDifference) - CritAvoidance).ToString()
                               + string.Format("%*Uncrittable by bosses. {0} defense rating or {1} resilience over the crit cap.",
                                               Math.Floor(((5f + levelDifference) - CritAvoidance) * -60f), Math.Floor(((5f + levelDifference) - CritAvoidance) * -39.423f)));
            }
            dictValues.Add("Overall Points", OverallPoints.ToString());
            dictValues.Add("Mitigation Points", MitigationPoints.ToString());
            dictValues.Add("Survival Points", SurvivalPoints.ToString());
            dictValues.Add("Overall", Math.Round(OverallTPS) + " tps");
            dictValues.Add("Holy Shield", Math.Round(HolyShieldTPS) + " tps");
            dictValues.Add("Seal of Right", Math.Round(SoRTPS) + " tps");
            dictValues.Add("Judgement of Right", Math.Round(JoRTPS) + " tps");
            dictValues.Add("Consecrate", Math.Round(ConsecrateTPS) + " tps");
            dictValues.Add("Misc", Math.Round(MiscTPS) + " tps");

            return(dictValues);
        }
Exemplo n.º 2
0
        public override Dictionary <string, string> GetCharacterDisplayCalculationValues()
        {
            Dictionary <string, string> dictValues = new Dictionary <string, string>();
            int   armorCap             = (int)Math.Ceiling((1402.5f * TargetLevel) - 66502.5f);
            float levelDifference      = 0.2f * (TargetLevel - 70);
            float targetCritReduction  = 5f + levelDifference;
            float currentCritReduction = ((float)Math.Floor(
                                              (BasicStats.DefenseRating * WarriorConversions.DefenseRatingToDefense + BasicStats.Defense)) *
                                          WarriorConversions.DefenseToCritReduction) +
                                         (BasicStats.Resilience * WarriorConversions.ResilienceRatingToCritReduction);
            int defToCap = 0, resToCap = 0;

            if (currentCritReduction < targetCritReduction)
            {
                while ((((float)Math.Floor(
                             ((BasicStats.DefenseRating + defToCap) * WarriorConversions.DefenseRatingToDefense + BasicStats.Defense)) *
                         WarriorConversions.DefenseToCritReduction) +
                        (BasicStats.Resilience * WarriorConversions.ResilienceRatingToCritReduction)) < targetCritReduction)
                {
                    defToCap++;
                }
                while ((((float)Math.Floor(
                             (BasicStats.DefenseRating * WarriorConversions.DefenseRatingToDefense + BasicStats.Defense)) *
                         WarriorConversions.DefenseToCritReduction) +
                        ((BasicStats.Resilience + resToCap) * WarriorConversions.ResilienceRatingToCritReduction)) < targetCritReduction)
                {
                    resToCap++;
                }
            }
            else if (currentCritReduction > targetCritReduction)
            {
                while ((((float)Math.Floor(
                             ((BasicStats.DefenseRating + defToCap) * WarriorConversions.DefenseRatingToDefense + BasicStats.Defense)) *
                         WarriorConversions.DefenseToCritReduction) +
                        (BasicStats.Resilience * WarriorConversions.ResilienceRatingToCritReduction)) > targetCritReduction)
                {
                    defToCap--;
                }
                while ((((float)Math.Floor(
                             (BasicStats.DefenseRating * WarriorConversions.DefenseRatingToDefense + BasicStats.Defense)) *
                         WarriorConversions.DefenseToCritReduction) +
                        ((BasicStats.Resilience + resToCap) * WarriorConversions.ResilienceRatingToCritReduction)) > targetCritReduction)
                {
                    resToCap--;
                }
                defToCap++;
                resToCap++;
            }

            dictValues.Add("Health", BasicStats.Health.ToString());
            dictValues.Add("Strength", BasicStats.Strength.ToString());
            dictValues.Add("Agility", BasicStats.Agility.ToString());
            dictValues.Add("Stamina", BasicStats.Stamina.ToString());
            dictValues.Add("Armor", BasicStats.Armor.ToString());
            dictValues.Add("Defense", Defense.ToString() +
                           string.Format("*Defense Rating {0}", BasicStats.DefenseRating));
            dictValues.Add("Dodge", Dodge.ToString() +
                           string.Format("%*Dodge Rating {0}", BasicStats.DodgeRating));
            dictValues.Add("Parry", Parry.ToString() +
                           string.Format("%*Parry Rating {0}", BasicStats.ParryRating));
            if (BlockOverCap > 0f)
            {
                dictValues.Add("Block", (Block + BlockOverCap).ToString()
                               + string.Format("%*Block Rating {0}. Over the crush cap by {1}% block", BasicStats.BlockRating, BlockOverCap));
            }
            else
            {
                dictValues.Add("Block", Block.ToString()
                               + string.Format("%*Block Rating {0}", BasicStats.BlockRating));
            }
            dictValues.Add("Miss", Miss.ToString() + "%");
            dictValues.Add("Resilience", BasicStats.Resilience.ToString() +
                           string.Format(@"*Reduces periodic damage and chance to be critically hit by {0}%.
Reduces the effect of mana-drains and the damage of critical strikes by {1}%.",
                                         BasicStats.Resilience * WarriorConversions.ResilienceRatingToCritReduction,
                                         BasicStats.Resilience * WarriorConversions.ResilienceRatingToCritReduction * 2));
            dictValues.Add("Block Value", BlockValue.ToString());

            #region Offensive Stats
            dictValues["Attack Power"] = BasicStats.AttackPower.ToString();
            dictValues["Hit"]          = (BasicStats.HitRating * WarriorConversions.HitRatingToHit +
                                          BasicStats.Hit).ToString() +
                                         string.Format("%*Hit Rating {0}", BasicStats.HitRating);
            dictValues["Expertise"] = (Math.Round(BasicStats.ExpertiseRating * WarriorConversions.ExpertiseRatingToExpertise +
                                                  BasicStats.Expertise)).ToString() +
                                      string.Format(@"*Expertise Rating {0}
Reduces chance to be dodged or parried by {1}%.", BasicStats.ExpertiseRating,
                                                    Math.Round((BasicStats.ExpertiseRating * WarriorConversions.ExpertiseRatingToExpertise +
                                                                BasicStats.Expertise) * WarriorConversions.ExpertiseToDodgeParryReduction));
            dictValues["Haste"] = (BasicStats.HasteRating * WarriorConversions.HasteRatingToHaste).ToString() +
                                  string.Format("%*Haste Rating {0}", BasicStats.HasteRating);
            dictValues["Armor Penetration"] = BasicStats.ArmorPenetration.ToString();
            dictValues["Crit"] = Crit.ToString() +
                                 string.Format("%*Crit Rating {0}", BasicStats.CritRating);
            dictValues["Weapon Damage"] = BasicStats.WeaponDamage.ToString();
            dictValues.Add("Missed Attacks", AvoidedAttacks.ToString() +
                           string.Format(@"%*Out of 100 attacks:
Attacks Missed: {0}%
Attacks Dodged: {1}%
Attacks Parried: {2}%", MissedAttacks, DodgedAttacks, ParriedAttacks));
            dictValues.Add("Limited Threat", (LimitedThreat / ThreatScale).ToString() +
                           string.Format(@"*White TPS: {0}
Shield Slam TPS: {1}
Revenge TPS: {2}
Devastate TPS: {3}
Windfury TPS: {4}", WhiteThreat, ShieldSlamThreat, RevengeThreat, DevastateThreat, WindfuryThreat));
            dictValues.Add("Unlimited Threat", (UnlimitedThreat / ThreatScale).ToString() +
                           string.Format(@"*Heroic Strike TPS: {0}
Shield Slam TPS: {1}
Revenge TPS: {2}
Devastate TPS: {3}
Windfury TPS: {4}", HeroicStrikeThreat, ShieldSlamThreat, RevengeThreat, DevastateThreat, WindfuryThreat));
            #endregion

            dictValues["Nature Resist"] = (BasicStats.NatureResistance + BasicStats.AllResist).ToString();
            dictValues["Arcane Resist"] = (BasicStats.ArcaneResistance + BasicStats.AllResist).ToString();
            dictValues["Frost Resist"]  = (BasicStats.FrostResistance + BasicStats.AllResist).ToString();
            dictValues["Fire Resist"]   = (BasicStats.FireResistance + BasicStats.AllResist).ToString();
            dictValues["Shadow Resist"] = (BasicStats.ShadowResistance + BasicStats.AllResist).ToString();
            if (BasicStats.Armor == armorCap)
            {
                dictValues.Add("Mitigation", Mitigation.ToString()
                               + string.Format("%*Exactly at the armor cap against level {0} mobs.", TargetLevel));
            }
            else if (BasicStats.Armor > armorCap)
            {
                dictValues.Add("Mitigation", Mitigation.ToString()
                               + string.Format("%*Over the armor cap by {0} armor.", BasicStats.Armor - armorCap));
            }
            else
            {
                dictValues.Add("Mitigation", Mitigation.ToString()
                               + string.Format("%*Short of the armor cap by {0} armor.", armorCap - BasicStats.Armor));
            }
            dictValues.Add("Avoidance", DodgePlusMissPlusParry.ToString() + "%");
            dictValues.Add("Avoidance + Block", DodgePlusMissPlusParryPlusBlock.ToString() + "%");
            dictValues.Add("Total Mitigation", TotalMitigation.ToString() + "%");
            dictValues.Add("Damage Taken", DamageTaken.ToString() + "%");
            if (defToCap == 0 && resToCap == 0)
            {
                dictValues.Add("Chance to be Crit", ((5f + levelDifference) - CritReduction).ToString()
                               + "%*Exactly enough defense rating/resilience to be uncrittable by bosses.");
            }
            else if (defToCap + resToCap > 0)
            {
                dictValues.Add("Chance to be Crit", ((5f + levelDifference) - CritReduction).ToString()
                               + string.Format("%*CRITTABLE! Short by {0} defense rating ({1} defense) or {2} resilience to be uncrittable by bosses.",
                                               defToCap, defToCap * WarriorConversions.DefenseRatingToDefense, resToCap));
            }
            else
            {
                dictValues.Add("Chance to be Crit", ((5f + levelDifference) - CritReduction).ToString()
                               + string.Format("%*Uncrittable by bosses. {0} defense rating ({1} defense) or {2} resilience over the crit cap.",
                                               -defToCap, -defToCap * WarriorConversions.DefenseRatingToDefense, -resToCap));
            }

            dictValues.Add("Chance Crushed", CrushChance.ToString() + "%");
            dictValues.Add("Overall Points", OverallPoints.ToString());
            dictValues.Add("Mitigation Points", MitigationPoints.ToString());
            dictValues.Add("Survival Points", SurvivalPoints.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();

            return(dictValues);
        }