public Solver(Stats playerStats, TalentTree playerTalentTree, CalculationOptionsShadowPriest calculationOptions) { PlayerStats = playerStats; PlayerTalentTree = playerTalentTree; CalculationOptions = calculationOptions; SpellPriority = new List <Spell>(CalculationOptions.SpellPriority.Count); foreach (string spellname in calculationOptions.SpellPriority) { SpellPriority.Add(SpellFactory.CreateSpell(spellname, playerStats, playerTalentTree)); } HitChance = PlayerStats.SpellHitRating / 12.6f; ShadowHitChance = 83.0f + (PlayerStats.SpellHitRating + playerTalentTree.GetTalent("Shadow Focus").PointsInvested * 12.6f * 2.0f) / 12.6f; if (ShadowHitChance > 99.0f) { ShadowHitChance = 99.0f; } Trinkets = new List <Trinket>(); ShadowCritChance = PlayerStats.SpellCrit + playerTalentTree.GetTalent("Shadow Power").PointsInvested * 3; Sequence = new Dictionary <float, Spell>(); if (playerStats.SpellDamageFor15SecOnUse2Min > 0.0f) { Trinkets.Add(new Trinket() { Cooldown = 120.0f, DamageBonus = playerStats.SpellDamageFor15SecOnUse2Min, UpTime = 15.0f }); } if (playerStats.SpellDamageFor15SecOnUse90Sec > 0.0f) { Trinkets.Add(new Trinket() { Cooldown = 90.0f, DamageBonus = playerStats.SpellDamageFor15SecOnUse90Sec, UpTime = 15.0f }); } if (playerStats.SpellDamageFor20SecOnUse2Min > 0.0f) { Trinkets.Add(new Trinket() { Cooldown = 120.0f, DamageBonus = playerStats.SpellDamageFor20SecOnUse2Min, UpTime = 20.0f }); } if (playerStats.SpellHasteFor20SecOnUse2Min > 0.0f) { Trinkets.Add(new Trinket() { Cooldown = 120.0f, HasteBonus = playerStats.SpellHasteFor20SecOnUse2Min, UpTime = 20.0f }); } if (playerStats.SpellHasteFor20SecOnUse5Min > 0.0f) { Trinkets.Add(new Trinket() { Cooldown = 300.0f, HasteBonus = playerStats.SpellHasteFor20SecOnUse5Min, UpTime = 20.0f }); } }
protected void Calculate(Stats stats, TalentTree talents) { MinDamage = MaxDamage = (MinDamage + (stats.SpellDamageRating + stats.SpellShadowDamageRating) * DamageCoef) * (1 + talents.GetTalent("Improved Power Word: Shield").PointsInvested * 0.05f); ManaCost = (int)Math.Round(ManaCost * (1 - talents.GetTalent("Mental Agility").PointsInvested * 0.02f)); CastTime = CastTime * (1 - stats.SpellHasteRating / 15.7f / 100f); }
protected void Calculate(Stats stats, TalentTree talents) { MinDamage = MaxDamage = (MinDamage + (stats.SpellDamageRating + stats.SpellShadowDamageRating) * DamageCoef) * (1 + talents.GetTalent("Darkness").PointsInvested * 0.02f) * (1 + talents.GetTalent("Shadow Form").PointsInvested * 0.15f); ManaCost = (int)Math.Round(ManaCost * (1 - talents.GetTalent("Mental Agility").PointsInvested * 0.02f)); Range = (int)Math.Round(Range * (1 + talents.GetTalent("Shadow Reach").PointsInvested * 0.1f)); }
protected void Calculate(Stats stats, TalentTree talents, int rank) { Rank = rank; MinHeal = (baseSpellTable[Rank - 1].MinHeal + stats.Healing * HealingCoef * (1 - baseSpellTable[Rank - 1].RankCoef)) * (1 + talents.GetTalent("Improved Power Word: Shield").PointsInvested * 0.05f); MaxHeal = MinHeal; ManaCost = (int)Math.Round(baseSpellTable[Rank - 1].ManaCost * (1 - talents.GetTalent("Mental Agility").PointsInvested * 0.02f)); }
protected void Calculate(Stats stats, TalentTree talents) { if (talents.GetTalent("Vampiric Embrace").PointsInvested == 0) { HealthConvertionCoef = 0; return; } HealthConvertionCoef += talents.GetTalent("Improved Vampiric Embrace").PointsInvested * 0.05f; ManaCost = (int)Math.Round(ManaCost * (1 - talents.GetTalent("Mental Agility").PointsInvested * 0.02f)); }
protected void Calculate(Stats stats, TalentTree talents, int rank) { if (talents.GetTalent("Lightwell").PointsInvested == 0) { MinHeal = MaxHeal = 0; return; } Rank = rank; MinHeal = (baseSpellTable[Rank - 1].MinHeal + stats.Healing * HealingCoef * (1 - baseSpellTable[Rank - 1].RankCoef)) * (1 + talents.GetTalent("Spiritual Healing").PointsInvested * 0.02f); MaxHeal = MinHeal; }
protected void Calculate(Stats stats, TalentTree talents, int rank) { Rank = rank; MinHeal = (baseSpellTable[Rank - 1].MinHeal + stats.Healing * (1 - baseSpellTable[Rank - 1].RankCoef) * (talents.GetTalent("Empowered Healing").PointsInvested * 0.02f + HealingCoef)) * (1 + talents.GetTalent("Spiritual Healing").PointsInvested * 0.02f); MaxHeal = (baseSpellTable[Rank - 1].MaxHeal + stats.Healing * (1 - baseSpellTable[Rank - 1].RankCoef) * (talents.GetTalent("Empowered Healing").PointsInvested * 0.02f + HealingCoef)) * (1 + talents.GetTalent("Spiritual Healing").PointsInvested * 0.02f); CastTime = baseSpellTable[Rank - 1].CastTime * (1 - stats.SpellHasteRating / 15.7f / 100f); }
protected void Calculate(Stats stats, TalentTree talents, int rank) { Rank = rank; MinHeal = (baseSpellTable[Rank - 1].MinHeal + stats.Healing * HealingCoef * (1 - baseSpellTable[Rank - 1].RankCoef)) * (1 + talents.GetTalent("Spiritual Healing").PointsInvested * 0.02f); MaxHeal = (baseSpellTable[Rank - 1].MaxHeal + stats.Healing * HealingCoef * (1 - baseSpellTable[Rank - 1].RankCoef)) * (1 + talents.GetTalent("Spiritual Healing").PointsInvested * 0.02f); ManaCost = (int)Math.Round(baseSpellTable[Rank - 1].ManaCost * (1 - talents.GetTalent("Improved Healing").PointsInvested * 0.05f)); CastTime = (baseSpellTable[Rank - 1].CastTime - talents.GetTalent("Divine Fury").PointsInvested * 0.1f) * (1 - stats.SpellHasteRating / 15.7f / 100f); }
protected void Calculate(Stats stats, TalentTree talents, int rank) { Rank = rank; MinHeal = MaxHeal = (baseSpellTable[Rank - 1].MinHeal + stats.Healing * HealingCoef) * (1 + talents.GetTalent("Spiritual Healing").PointsInvested * 0.02f); }
protected void Calculate(Stats stats, TalentTree talents) { MinDamage = MaxDamage = (MinDamage + (stats.SpellDamageRating + stats.SpellArcaneDamageRating) * DamageCoef); ManaCost = (int)Math.Round(ManaCost * (1 - talents.GetTalent("Mental Agility").PointsInvested * 0.02f)); }
protected void Calculate(Stats stats, TalentTree talents, int rank) { Range = 15; Rank = rank; MinHeal = (baseSpellTable[Rank - 1].MinHeal + stats.Healing * HealingCoef * (1 - baseSpellTable[Rank - 1].RankCoef)) * (1 + talents.GetTalent("Spiritual Healing").PointsInvested * 0.02f); MaxHeal = (baseSpellTable[Rank - 1].MaxHeal + stats.Healing * HealingCoef * (1 - baseSpellTable[Rank - 1].RankCoef)) * (1 + talents.GetTalent("Spiritual Healing").PointsInvested * 0.02f); ManaCost = (int)Math.Round(baseSpellTable[Rank - 1].ManaCost * (1 - talents.GetTalent("Healing Prayers").PointsInvested * 0.1f) * (1 - talents.GetTalent("Mental Agility").PointsInvested * 0.02f)); Range = (int)Math.Round(Range * (1 + talents.GetTalent("Holy Reach").PointsInvested * 0.1f)); }
protected void Calculate(Stats stats, TalentTree talents, int rank) { Rank = rank; Range = 30; MinHeal = (baseSpellTable[rank - 1].MinHeal + stats.Healing * HealingCoef * (1 - baseSpellTable[rank - 1].RankCoef)) * (1 + talents.GetTalent("Spiritual Healing").PointsInvested * 0.02f); MaxHeal = (baseSpellTable[rank - 1].MaxHeal + stats.Healing * HealingCoef * (1 - baseSpellTable[rank - 1].RankCoef)) * (1 + talents.GetTalent("Spiritual Healing").PointsInvested * 0.02f); ManaCost = (int)Math.Round(baseSpellTable[rank - 1].ManaCost * (1 - talents.GetTalent("Healing Prayers").PointsInvested * 0.1f) * (1 - stats.BonusPoHManaCostReductionMultiplier)); Range = (int)Math.Round(Range * (1 + talents.GetTalent("Holy Reach").PointsInvested * 0.1f)); }
protected void Calculate(Stats stats, TalentTree talents) { MinDamage = (MinDamage + (stats.SpellDamageRating + stats.SpellShadowDamageRating) * DamageCoef) * (1 + talents.GetTalent("Darkness").PointsInvested * 0.02f) * (1 + talents.GetTalent("Shadow Form").PointsInvested * 0.15f); MaxDamage = (MinDamage + (stats.SpellDamageRating + stats.SpellShadowDamageRating) * DamageCoef) * (1 + talents.GetTalent("Darkness").PointsInvested * 0.02f) * (1 + talents.GetTalent("Shadow Form").PointsInvested * 0.15f); CastTime = CastTime * (1 - stats.SpellHasteRating / 15.7f / 100f); Cooldown -= talents.GetTalent("Improved Mind Blast").PointsInvested * 0.5f; Range = (int)Math.Round(Range * (1 + talents.GetTalent("Shadow Reach").PointsInvested * 0.1f)); }
protected void Calculate(Stats stats, TalentTree talents) { if (talents.GetTalent("Mind Flay").PointsInvested == 0) { MinDamage = MaxDamage = 0; return; } MinDamage = (MinDamage + (stats.SpellDamageRating + stats.SpellShadowDamageRating) * DamageCoef) * (1 + talents.GetTalent("Darkness").PointsInvested * 0.02f) * (1 + talents.GetTalent("Shadow Form").PointsInvested * 0.15f); MaxDamage = (MinDamage + (stats.SpellDamageRating + stats.SpellShadowDamageRating) * DamageCoef) * (1 + talents.GetTalent("Darkness").PointsInvested * 0.02f) * (1 + talents.GetTalent("Shadow Form").PointsInvested * 0.15f); ManaCost = (int)Math.Round(ManaCost * (1 - talents.GetTalent("Mental Agility").PointsInvested * 0.02f) * (1 - talents.GetTalent("Focused Mind").PointsInvested * 0.05f)); CastTime = CastTime * (1 - stats.SpellHasteRating / 15.7f / 100f); Range = (int)Math.Round(Range * (1 + talents.GetTalent("Shadow Reach").PointsInvested * 0.1f)); }
protected void Calculate(Stats stats, TalentTree talents) { if (talents.GetTalent("Vampiric Touch").PointsInvested == 0) { MinDamage = MaxDamage = 0; return; } MinDamage = (MinDamage + (stats.SpellDamageRating + stats.SpellShadowDamageRating) * DamageCoef) * (1 + talents.GetTalent("Darkness").PointsInvested * 0.02f) * (1 + talents.GetTalent("Shadow Form").PointsInvested * 0.15f); MaxDamage = (MaxDamage + (stats.SpellDamageRating + stats.SpellShadowDamageRating) * DamageCoef) * (1 + talents.GetTalent("Darkness").PointsInvested * 0.02f) * (1 + talents.GetTalent("Shadow Form").PointsInvested * 0.15f); Range = (int)Math.Round(Range * (1 + talents.GetTalent("Shadow Reach").PointsInvested * 0.1f)); }
public override Dictionary <string, string> GetCharacterDisplayCalculationValues() { Dictionary <string, string> dictValues = new Dictionary <string, string>(); dictValues.Add("Health", BasicStats.Health.ToString()); dictValues.Add("Stamina", BasicStats.Stamina.ToString()); dictValues.Add("Mana", BasicStats.Mana.ToString()); dictValues.Add("Intellect", BasicStats.Intellect.ToString()); dictValues.Add("Spirit", Math.Floor(BasicStats.Spirit).ToString("0")); dictValues.Add("Shadow Damage", String.Format("{0}*Shadow: {1}\r\nSpell: {2}", Math.Floor(BasicStats.SpellDamageRating + BasicStats.SpellShadowDamageRating), Math.Floor(BasicStats.SpellShadowDamageRating), Math.Floor(BasicStats.SpellDamageRating))); dictValues.Add("Regen", String.Format("{0}*InFSR: {0}\r\nOutFSR: {1}", RegenInFSR.ToString("0"), RegenOutFSR.ToString("0"))); dictValues.Add("Spell Crit", string.Format("{0}%*{1} Spell Crit rating ({3}%)\r\n{2} ({4}%) points in Shadow Power", BasicStats.SpellCrit + talents.GetTalent("Shadow Power").PointsInvested * 3, BasicStats.SpellCritRating.ToString(), talents.GetTalent("Shadow Power").PointsInvested, BasicStats.SpellCrit, talents.GetTalent("Shadow Power").PointsInvested * 3)); int i = (int)Math.Round(CalculationsShadowPriest.GetSpellHitCap(talents) - BasicStats.SpellHitRating); dictValues.Add("Spell Hit", string.Format("{0}*{1}", BasicStats.SpellHitRating, (i > 0)? i + " requires to reach hit cap": i == 0? "Exactly hit cap": (-i) + " over hit cap")); dictValues.Add("Spell Haste", string.Format("{0}%*{1} Spell Haste rating\n", Math.Round(BasicStats.SpellHasteRating / 15.7, 2), BasicStats.SpellHasteRating.ToString())); dictValues.Add("Global Cooldown", Spell.GetGlobalCooldown(BasicStats).ToString("0.00")); dictValues.Add("Shadow Word Pain", new ShadowWordPain(BasicStats, talents).ToString()); dictValues.Add("Shadow Word Death", new ShadowWordDeath(BasicStats, talents).ToString()); dictValues.Add("Mind Blast", new MindBlast(BasicStats, talents).ToString()); dictValues.Add("Power Word Shield", new PowerWordShield(BasicStats, talents).ToString()); if (talents.GetTalent("Vampiric Embrace").PointsInvested > 0) { dictValues.Add("Vampiric Embrace", new VampiricEmbrace(BasicStats, talents).ToString()); } else { dictValues.Add("Vampiric Embrace", "- *No required talents"); } if (talents.GetTalent("Vampiric Touch").PointsInvested > 0) { dictValues.Add("Vampiric Touch", new VampiricTouch(BasicStats, talents).ToString()); } else { dictValues.Add("Vampiric Touch", "- *No required talents"); } if (talents.GetTalent("Mind Flay").PointsInvested > 0) { dictValues.Add("Mind Flay", new MindFlay(BasicStats, talents).ToString()); } else { dictValues.Add("Mind Flay", "- *No required talents"); } Solver solver = new Solver(BasicStats, talents, CalculationOptions); solver.Calculate(); dictValues.Add("Damage done", solver.OverallDamage.ToString()); dictValues.Add("Dps", solver.OverallDps.ToString()); return(dictValues); }
public static int GetSpellHitCap(TalentTree talents) { return((int)Math.Round(202 - talents.GetTalent("Shadow Focus").PointsInvested * 12.6f * 2)); }
public override Dictionary <string, string> GetCharacterDisplayCalculationValues() { Dictionary <string, string> dictValues = new Dictionary <string, string>(); dictValues.Add("Health", BasicStats.Health.ToString()); dictValues.Add("Stamina", BasicStats.Stamina.ToString()); dictValues.Add("Mana", BasicStats.Mana.ToString()); dictValues.Add("Intellect", BasicStats.Intellect.ToString()); dictValues.Add("Spirit", Math.Floor(BasicStats.Spirit).ToString("0")); dictValues.Add("Healing", Math.Floor(BasicStats.Healing).ToString("0")); dictValues.Add("Mp5", Math.Floor(BasicStats.Mp5).ToString("0")); dictValues.Add("Regen InFSR", RegenInFSR.ToString("0")); dictValues.Add("Regen OutFSR", RegenOutFSR.ToString("0")); dictValues.Add("Holy Spell Crit", string.Format("{0}%*{1} Spell Crit rating\n{2} ({2}%) points in Holy Specialization", BasicStats.SpellCrit, BasicStats.SpellCritRating.ToString(), talents.GetTalent("Holy Specialization").PointsInvested)); dictValues.Add("Spell Haste", string.Format("{0}%*{1} Spell Haste rating\n", Math.Round(BasicStats.SpellHasteRating / 15.7, 2), BasicStats.SpellHasteRating.ToString())); dictValues.Add("Global Cooldown", Spell.GetGlobalCooldown(BasicStats).ToString("0.00")); dictValues.Add("Renew", new Renew(BasicStats, talents).ToString()); dictValues.Add("Flash Heal", new FlashHeal(BasicStats, talents).ToString()); dictValues.Add("Greater Heal", new GreaterHeal(BasicStats, talents).ToString()); dictValues.Add("Heal", new Heal(BasicStats, talents).ToString()); dictValues.Add("PoH", new PrayerOfHealing(BasicStats, talents).ToString()); dictValues.Add("Binding Heal", new BindingHeal(BasicStats, talents).ToString()); dictValues.Add("Prayer of Mending", new PrayerOfMending(BasicStats, talents).ToString()); dictValues.Add("Power Word Shield", new PowerWordShield(BasicStats, talents).ToString()); if (talents.GetTalent("Circle of Healing").PointsInvested > 0) { dictValues.Add("CoH", new CircleOfHealing(BasicStats, talents).ToString()); } else { dictValues.Add("CoH", "- *No required talents"); } if (talents.GetTalent("Holy Nova").PointsInvested > 0) { dictValues.Add("Holy Nova", new HolyNova(BasicStats, talents).ToString()); } else { dictValues.Add("Holy Nova", "- *No required talents"); } if (talents.GetTalent("Lightwell").PointsInvested > 0) { dictValues.Add("Lightwell", new Lightwell(BasicStats, talents).ToString()); } else { dictValues.Add("Lightwell", "- *No required talents"); } if (Race == Character.CharacterRace.Draenei) { dictValues.Add("Gift of the Naaru", new GiftOfTheNaaru(BasicStats, talents).ToString()); } else { dictValues.Add("Gift of the Naaru", "-"); } return(dictValues); }