Exemple #1
0
        /// <summary>
        /// Generates a string representation of a player's trap spell inventory.
        /// </summary>
        /// <returns>A list of trap spells possessed by the player.</returns>
        public override string ToString()
        {
            var sb = new StringBuilder();

            sb.AppendLine("Set Traps:");
            sb.AppendLine($" Dart => {Dart?.ToString() ?? "Empty"}");
            sb.AppendLine($" Flash => {Flash?.ToString() ?? "Empty"}");
            sb.AppendLine($" Repeating Dart => {RepeatingDart?.ToString() ?? "Empty"}");
            sb.AppendLine($" Snare => {Snare?.ToString() ?? "Empty"}");
            sb.AppendLine($" Spear => {Spear?.ToString() ?? "Empty"}");
            sb.AppendLine($" Poison Dart => {PoisonDart?.ToString() ?? "Empty"}");
            sb.AppendLine($" Death => {Death?.ToString() ?? "Empty"}");
            sb.AppendLine($" Sleep => {Sleep?.ToString() ?? "Empty"}");
            sb.AppendLine($" Bladestorm => {Bladestorm?.ToString() ?? "Empty"}");

            return(sb.ToString());
        }
Exemple #2
0
        public override Dictionary <string, string> GetCharacterDisplayCalculationValues()
        {
            float critRating = BasicStats.CritRating;
            float hitRating  = BasicStats.HitRating;

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

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

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

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

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

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

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

            PopulateSingleUseValues(dictValues, "BB", DKability.BloodBoil);
            PopulateSingleUseValues(dictValues, "BP", DKability.BloodPlague);
            PopulateSingleUseValues(dictValues, "BS", DKability.BloodStrike);
            PopulateSingleUseValues(dictValues, "DC", DKability.DeathCoil);
            PopulateSingleUseValues(dictValues, "DnD", DKability.DeathNDecay);
            PopulateSingleUseValues(dictValues, "DS", DKability.DeathStrike);
            PopulateSingleUseValues(dictValues, "Fest", DKability.FesteringStrike);
            PopulateSingleUseValues(dictValues, "FF", DKability.FrostFever);
            PopulateSingleUseValues(dictValues, "FS", DKability.FrostStrike);
            PopulateSingleUseValues(dictValues, "HS", DKability.HeartStrike);
            PopulateSingleUseValues(dictValues, "HB", DKability.HowlingBlast);
            PopulateSingleUseValues(dictValues, "IT", DKability.IcyTouch);
            PopulateSingleUseValues(dictValues, "NS", DKability.NecroticStrike);
            PopulateSingleUseValues(dictValues, "OB", DKability.Obliterate);
            PopulateSingleUseValues(dictValues, "PS", DKability.PlagueStrike);
            PopulateSingleUseValues(dictValues, "RS", DKability.RuneStrike);
            PopulateSingleUseValues(dictValues, "SS", DKability.ScourgeStrike);
            return(dictValues);
        }
Exemple #3
0
        public override void Select(MainForm frm)
        {
            frm.grpLeader.Text = this.ToString();
            frm.grpLeader.Show();

            frm.lblLeaderName.Text          = ToString();
            frm.lblLeaderType.Text          = LeaderType;
            frm.lblLeaderRace.Data          = Race;
            frm.lblLeaderLife.Text          = Birth == null ? "" : (Birth.ToString() + " – " + (Death == WorldTime.Present ? "" : Death.ToString()));
            frm.lblLeaderReignBegan.Text    = ReignBegan == null ? "" : ReignBegan.ToString();
            frm.lblLeaderInheritance.Text   = Inheritance;
            frm.lblLeaderInheritedFrom.Data = InheritedFrom;
            frm.lblLeaderCivilization.Data  = Civilization;
            frm.lblLeaderSite.Data          = Site;
            frm.lblLeaderGod.Data           = Worship;
            if (Worship != null)
            {
                frm.lblLeaderGod.Text = Worship.ToString() + " (" + WorshipPercent + "%)";
            }
            frm.lblLeaderHF.Data = HF;

            Program.MakeSelected(frm.tabLeader, frm.lstLeader, this);
        }
Exemple #4
0
        public override void Select(MainForm frm)
        {
            frm.grpLeader.Text = ToString();
            frm.grpLeader.Show();

            frm.lblLeaderName.Text          = ToString();
            frm.lblLeaderType.Text          = CultureInfo.CurrentCulture.TextInfo.ToTitleCase(LeaderTypes[LeaderType]);
            frm.lblLeaderRace.Data          = Race;
            frm.lblLeaderLife.Text          = Birth == null ? "" : (Birth + " – " + (Death == WorldTime.Present ? "" : Death.ToString()));
            frm.lblLeaderReignBegan.Text    = ReignBegan == null ? "" : ReignBegan.ToString();
            frm.lblLeaderInheritance.Text   = InheritanceTypes[Inheritance];
            frm.lblLeaderInheritedFrom.Data = InheritedFrom;
            if (InheritedFromSource == InheritanceSource.Other)
            {
                frm.lblLeaderInheritedFrom.Text = string.Format("{0} ({1})", InheritedFrom != null ? InheritedFrom.ToString() : "", "Relative");
            }
            else if (InheritedFromSource != InheritanceSource.None)
            {
                frm.lblLeaderInheritedFrom.Text = string.Format("{0} ({1})", InheritedFrom != null ? InheritedFrom.ToString() : "", InheritedFromSource);
            }
            frm.lblLeaderCivilization.Data = Civilization;
            frm.lblLeaderSite.Data         = Site;
            frm.lblLeaderGod.Data          = Worship;
            if (Worship != null)
            {
                frm.lblLeaderGod.Text = string.Format("{0} ({1}%)", Worship, WorshipPercent);
            }
            frm.lblLeaderMarried.Data = Spouse;
            frm.lblLeaderHF.Data      = HF;

            Program.MakeSelected(frm.tabLeader, frm.lstLeader, this);
        }
Exemple #5
0
        public override void Select(MainForm frm)
        {
            if (frm.grpLeader.Text == ToString() && frm.MainTab.SelectedTab == frm.tabLeader)
            {
                return;
            }
            Program.MakeSelected(frm.tabLeader, frm.lstLeader, this);

            frm.grpLeader.Text = ToString();
            frm.grpLeader.Show();

            frm.lblLeaderName.Text = ToString();
            frm.lblLeaderType.Text = LeaderTypes[LeaderType].ToTitleCase();
            if (Race != null || (Hf?.Race != null))
            {
                frm.lblLeaderRace.Data = Race ?? Hf.Race;
            }
            else
            {
                frm.lblLeaderRace.Text = "";
            }
            frm.lblLeaderLife.Text          = Birth == null ? "" : (Birth + " – " + (Death == WorldTime.Present ? "" : Death.ToString()));
            frm.lblLeaderReignBegan.Text    = ReignBegan?.ToString() ?? "";
            frm.lblLeaderInheritance.Text   = InheritanceTypes[Inheritance];
            frm.lblLeaderInheritedFrom.Data = InheritedFrom;
            if (InheritedFromSource == InheritanceSource.Other)
            {
                frm.lblLeaderInheritedFrom.Text =
                    $"{InheritedFrom?.ToString() ?? ""} ({"Relative"})";
            }
            else if (InheritedFromSource != InheritanceSource.None)
            {
                frm.lblLeaderInheritedFrom.Text =
                    $"{InheritedFrom?.ToString() ?? ""} ({InheritedFromSource})";
            }
            frm.lblLeaderCivilization.Data = Civilization;
            frm.lblLeaderSite.Data         = Site;
            frm.lblLeaderGod.Data          = Worship;
            if (Worship != null)
            {
                frm.lblLeaderGod.Text = $"{Worship} ({WorshipPercent}%)";
            }
            frm.lblLeaderMarried.Data = Spouse;
            frm.lblLeaderHF.Data      = Hf;
        }
        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);
        }