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); }
/** * TODO * Equipment * Powers * Hindrances * * Later: * Injuries **/ public override string ToString() { StringBuilder retval = new StringBuilder(""); retval.AppendLine("Name:" + Name); retval.AppendLine("Charisma:" + Charisma.ToString()); retval.AppendLine("Pace:" + Pace.ToString()); retval.AppendLine("Parry:" + Parry.ToString()); retval.AppendLine("Toughness:" + Toughness.ToString()); retval.AppendLine("Agility:" + Agility.ToString()); retval.AppendLine("Smarts:" + Smarts.ToString()); retval.AppendLine("Strength:" + Strength.ToString()); retval.AppendLine("Spirit:" + Spirit.ToString()); retval.AppendLine("Vigor:" + Vigor.ToString()); return(retval.ToString()); }
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); }
public override Dictionary <string, string> GetCharacterDisplayCalculationValues() { Dictionary <string, string> dict = new Dictionary <string, string>(); dict["Miss"] = Miss.ToString("P2") + "*" + SEStats.Miss.ToString("P2") + " after special effects"; dict["Dodge"] = Dodge.ToString("P2") + " : " + BasicStats.DodgeRating.ToString("F0") + "*" + SEStats.DodgeRating.ToString("F0") + " Rating - " + SEStats.Dodge.ToString("P2") + " after special effects"; dict["Parry"] = Parry.ToString("P2") + " : " + BasicStats.ParryRating.ToString("F0") + "*" + SEStats.ParryRating.ToString("F0") + " Rating - " + SEStats.Parry.ToString("P2") + " after special effects"; dict["Armor Damage Reduction"] = ArmorDamageReduction.ToString("P2"); dict["Magic Damage Reduction"] = MagicDamageReduction.ToString("P2") + string.Format("*Arcane: {0:0}\r\n", BasicStats.ArcaneResistance) + string.Format("Fire: {0:0}\r\n", BasicStats.FireResistance) + string.Format("Frost: {0:0}\r\n", BasicStats.FrostResistance) + string.Format("Nature: {0:0}\r\n", BasicStats.NatureResistance) + string.Format("Shadow: {0:0}", BasicStats.ShadowResistance); dict["Total Avoidance"] = (Miss + Parry + Dodge).ToString("P2"); // Another duplicate math location. dict["Health"] = BasicStats.Health.ToString("F0") + "*" + SEStats.Health.ToString("F0") + " after special effects"; dict["Armor"] = BasicStats.Armor.ToString("F0") + "*" + SEStats.Armor.ToString("F0") + " after special effects"; dict["Strength"] = BasicStats.Strength.ToString("F0") + "*" + SEStats.Strength.ToString("F0") + " after special effects"; dict["Agility"] = BasicStats.Agility.ToString("F0") + "*" + SEStats.Agility.ToString("F0") + " after special effects"; dict["Stamina"] = BasicStats.Stamina.ToString("F0") + "*" + SEStats.Stamina.ToString("F0") + " after special effects"; dict["Hit Rating"] = BasicStats.HitRating.ToString("F0") + "*" + SEStats.HitRating.ToString("F0") + " after special effects"; dict["Haste Rating"] = BasicStats.HasteRating.ToString("F0") + "*" + SEStats.HasteRating.ToString("F0") + " after special effects"; dict["Crit Rating"] = BasicStats.CritRating.ToString("F0") + "*" + SEStats.CritRating.ToString("F0") + " after special effects"; dict["Physical Crit"] = BasicStats.PhysicalCrit.ToString("P2") + "*" + SEStats.PhysicalCrit.ToString("F0") + " after special effects"; dict["Expertise"] = Expertise.ToString("F0") + "*" + SEStats.Expertise.ToString("F0") + " after special effects"; dict["Attack Power"] = BasicStats.AttackPower.ToString("F0") + "*" + SEStats.AttackPower.ToString("F0") + " after special effects including Vengeance"; dict["Mastery"] = BasicStats.Mastery.ToString("F2") + String.Format(" ({0:0.00} %)*", (BasicStats.Mastery * 6.25f)) + BasicStats.MasteryRating.ToString("F0") + " Rating - " + SEStats.MasteryRating.ToString("F0") + " after special effects"; dict["DPS"] = DPS.ToString("F0") + "* At Max Vengeance"; dict["Rotation Time"] = String.Format("{0:0.00} sec", RotationTime); dict["Total Threat"] = TotalThreat.ToString("F0"); #region Ability Costs dict["Blood"] = Blood.ToString("F0"); dict["Frost"] = Frost.ToString("F0"); dict["Unholy"] = Unholy.ToString("F0"); dict["Death"] = Death.ToString("F0"); dict["Runic Power"] = RP.ToString("F0"); dict["RE Runes"] = FreeRERunes.ToString("F0"); #endregion dict["Overall Points"] = OverallPoints.ToString("F1"); dict["Mitigation Points"] = String.Format("{0:0.0}*" + "{1:000000.0} Crit Mitigation" + "\r\n{2:000000.0} Avoidance Mitigation" + "\r\n{3:000000.0} Armor Mitigation" + "\r\n{4:000000.0} Damage Taken Mitigation" + "\r\n{5:000000.0} Impedence Mitigation" + "\r\n{6:000000.0} Health Restoration Mitigation", Mitigation, CritMitigation, AvoidanceMitigation, ArmorMitigation, DamageTakenMitigation, ImpedenceMitigation, HealsMitigation); dict["Survival Points"] = String.Format("{0:0.0}*" + "{1:000000.0} Physical Survival" + "\r\n{2:000000.0} Bleed Survival" + "\r\n{3:000000.0} Magic Survival", Survivability, PhysicalSurvival, BleedSurvival, MagicSurvival); dict["Burst Points"] = String.Format("{0:0.0}", Burst * BurstWeight); // Modified Burst dict["Recovery Points"] = String.Format("{0:0.0}", Recovery * RecoveryWeight); // Modified Burst dict["Threat Points"] = String.Format("{0:0.0}", Threat * ThreatWeight); // Modified Threat dict["Target Miss"] = (TargetMiss).ToString("P1"); dict["Target Dodge"] = (TargetDodge).ToString("P1"); dict["Target Parry"] = (TargetParry).ToString("P1"); dict["DTPS"] = DTPS.ToString("F2"); dict["HPS"] = HPS.ToString("F2"); dict["DPS Avoided"] = AvoidanceMitigation.ToString("F0"); dict["DPS Reduced By Armor"] = ArmorMitigation.ToString("F0"); dict["Death Strike"] = TotalDShealed.ToString("F0") + "*" + DSCount.ToString("F0") + " Death Strikes Healing for " + DSHeal.ToString("F0") + " avg " + DSOverHeal.ToString("F0") + " avg Overheal"; dict["Blood Shield"] = TotalBShield.ToString("F0") + "*" + BShield.ToString("F0") + " average shield size"; return(dict); }
public override Dictionary <string, string> GetCharacterDisplayCalculationValues() { Dictionary <string, string> dict = new Dictionary <string, string>(); dict["Miss"] = Miss.ToString("F2") + "%"; dict["Dodge"] = Dodge.ToString("F2") + "%"; dict["Parry"] = Parry.ToString("F2") + "%"; dict["Armor Damage Reduction"] = (ArmorDamageReduction * 100.0f).ToString("F2") + "%"; dict["Magic Damage Reduction"] = (MagicDamageReduction * 100.0f).ToString("F2") + "%" + string.Format("*Arcane: {0:0}\n", BasicStats.ArcaneResistance) + string.Format("Fire: {0:0}\n", BasicStats.FireResistance) + string.Format("Frost: {0:0}\n", BasicStats.FrostResistance) + string.Format("Nature: {0:0}\n", BasicStats.NatureResistance) + string.Format("Shadow: {0:0}", BasicStats.ShadowResistance); dict["Total Avoidance"] = (Miss + Parry + Dodge).ToString("F2") + "%"; // Another duplicate math location. dict["Burst Time"] = String.Format("{0:0.0} sec", BurstTime); dict["Reaction Time"] = String.Format("{0:0.0} sec", ReactionTime); dict["Health"] = BasicStats.Health.ToString("F0"); dict["Armor"] = BasicStats.Armor.ToString("F0"); dict["Strength"] = BasicStats.Strength.ToString("F0"); dict["Agility"] = BasicStats.Agility.ToString("F0"); dict["Stamina"] = BasicStats.Stamina.ToString("F0"); dict["Hit Rating"] = BasicStats.HitRating.ToString("F0"); dict["Haste Rating"] = BasicStats.HasteRating.ToString("F0"); dict["Crit Rating"] = BasicStats.CritRating.ToString("F0"); dict["Physical Crit"] = (BasicStats.PhysicalCrit * 100f).ToString("F2"); dict["Expertise"] = Expertise.ToString("F0"); dict["Attack Power"] = BasicStats.AttackPower.ToString("F0"); dict["Armor Penetration"] = (BasicStats.ArmorPenetration * 100f).ToString("F2") + "%"; dict["Armor Penetration Rating"] = BasicStats.ArmorPenetrationRating.ToString("F0"); dict["DPS"] = DPS.ToString("F0"); dict["Rotation Time"] = String.Format("{0:0.00} sec", (RotationTime / 1000)); dict["Total Threat"] = TotalThreat.ToString("F0"); #region Rune Strike Limit dict["RS Limited"] = ""; if (RSLimit == (int)RSState.Good) { dict["RS Limited"] = "none"; } else { if (1 == (RSLimit & (int)RSState.TimeStarved)) { dict["RS Limited"] += "Swing Starved "; } if (1 == (RSLimit & (int)RSState.RPStarved)) { dict["RS Limited"] += "RP Starved "; } } #endregion #region Ability Costs dict["Blood"] = Blood.ToString("F0"); dict["Frost"] = Frost.ToString("F0"); dict["Unholy"] = Unholy.ToString("F0"); dict["Death"] = Death.ToString("F0"); dict["Runic Power"] = RP.ToString("F0"); #endregion dict["Overall Points"] = OverallPoints.ToString("F1"); dict["Mitigation Points"] = String.Format("{0:0.0}", (Mitigation * MitigationWeight)); // Modified Mitigation. dict["Survival Points"] = String.Format("{0:0.0}", (Survival * SurvivalWeight)) + string.Format("*Physical:{0:0.0}\n", (PhysicalSurvival * SurvivalWeight)) + string.Format("Bleed:{0:0.0}\n", (BleedSurvival * SurvivalWeight)) + string.Format("Magic:{0:0.0}", (MagicSurvival * SurvivalWeight)); // Modified Survival dict["Threat Points"] = String.Format("{0:0.0}", (Threat * ThreatWeight)); // Modified Threat dict["Crit"] = Crit.ToString("F2"); dict["Defense"] = Defense.ToString("F0"); dict["Resilience"] = Resilience.ToString("F0"); dict["Defense Rating"] = DefenseRating.ToString("F0"); dict["Defense Rating needed"] = DefenseRatingNeeded.ToString("F0"); dict["Target Miss"] = (TargetMiss * 100.0f).ToString("F1") + "%"; dict["Target Dodge"] = (TargetDodge * 100.0f).ToString("F1") + "%"; dict["Target Parry"] = (TargetParry * 100.0f).ToString("F1") + "%"; return(dict); }