public static PriestSolver GetModel(CharacterCalculationsHealPriest calc, CalculationOptionsHealPriest calcOpts, bool verbose) { string modelName = calcOpts.Model; PriestSolver model = null; if (modelName == modelDiscTank) model = new PriestSolverDisciplineTank(calc, calcOpts, verbose); else if (modelName == modelDiscTank2) model = new PriestSolverDisciplineTank2(calc, calcOpts, verbose); else if (modelName == modelDiscTank3) model = new PriestSolverDisciplineTank3(calc, calcOpts, verbose); else if (modelName == modelDiscRaid) model = new PriestSolverDisciplineRaid(calc, calcOpts, verbose); else if (modelName == modelHolyTank) model = new PriestSolverHolyTank(calc, calcOpts, verbose); else if (modelName == modelHolyRaid) model = new PriestSolverHolyRaid(calc, calcOpts, verbose); /*if (verbose) { List<string> msg = model.MeetsRequirements(); if (msg.Count > 0) { MessageBox.Show(String.Format("Currently selected model might not work optimally due to:{0}", String.Join("\n", msg))); } }*/ if (model == null) throw new Exception("No model selection for Healing Priest. Not a good situation."); return model; }
public override CharacterCalculationsBase GetCharacterCalculations(Character character, Item additionalItem, bool referenceCalculation, bool significantChange, bool needsDisplayCalculations) { // First things first, we need to ensure that we aren't using bad data CharacterCalculationsHealPriest calc = new CharacterCalculationsHealPriest(); if (character == null) { return(calc); } CalculationOptionsHealPriest calcOpts = character.CalculationOptions as CalculationOptionsHealPriest; if (calcOpts == null) { return(calc); } calc.BasicStats = GetCharacterStats(character, additionalItem) as StatsPriest; calc.Character = character; PriestSolver solver = PriestModels.GetModel(calc, calcOpts, needsDisplayCalculations); solver.Solve(); return(calc); }
public override ICalculationOptionBase DeserializeDataObject(string xml) { System.Xml.Serialization.XmlSerializer serializer = new System.Xml.Serialization.XmlSerializer(typeof(CalculationOptionsHealPriest)); System.IO.StringReader reader = new System.IO.StringReader(xml.Replace("CalculationOptionsPriest", "CalculationOptionsHealPriest").Replace("CalculationOptionsHolyPriest", "CalculationOptionsHealPriest")); CalculationOptionsHealPriest calcOpts = serializer.Deserialize(reader) as CalculationOptionsHealPriest; return(calcOpts); }
public Stats GetBuffsStats(Character character, CalculationOptionsHealPriest calcOpts) { List <Buff> removedBuffs = new List <Buff>(); List <Buff> addedBuffs = new List <Buff>(); //float hasRelevantBuff; #region Passive Ability Auto-Fixing // Removes the Trueshot Aura Buff and it's equivalents Unleashed Rage and Abomination's Might if you are // maintaining it yourself. We are now calculating this internally for better accuracy and to provide // value to relevant talents /*{ * hasRelevantBuff = character.HunterTalents.TrueshotAura; * Buff a = Buff.GetBuffByName("Trueshot Aura"); * Buff b = Buff.GetBuffByName("Unleashed Rage"); * Buff c = Buff.GetBuffByName("Abomination's Might"); * if (hasRelevantBuff > 0) * { * if (character.ActiveBuffs.Contains(a)) { character.ActiveBuffs.Remove(a); removedBuffs.Add(a); } * if (character.ActiveBuffs.Contains(b)) { character.ActiveBuffs.Remove(b); removedBuffs.Add(b); } * if (character.ActiveBuffs.Contains(c)) { character.ActiveBuffs.Remove(c); removedBuffs.Add(c); } * } * } * // Removes the Hunter's Mark Buff and it's Children 'Glyphed', 'Improved' and 'Both' if you are * // maintaining it yourself. We are now calculating this internally for better accuracy and to provide * // value to relevant talents * { * hasRelevantBuff = character.HunterTalents.ImprovedHuntersMark + (character.HunterTalents.GlyphOfHuntersMark ? 1 : 0); + Buff a = Buff.GetBuffByName("Hunter's Mark"); + Buff b = Buff.GetBuffByName("Glyphed Hunter's Mark"); + Buff c = Buff.GetBuffByName("Improved Hunter's Mark"); + Buff d = Buff.GetBuffByName("Improved and Glyphed Hunter's Mark"); + // Since we are doing base Hunter's mark ourselves, we still don't want to double-dip + if (character.ActiveBuffs.Contains(a)) { character.ActiveBuffs.Remove(a); /*removedBuffs.Add(a);*//* } + // If we have an enhanced Hunter's Mark, kill the Buff + if (hasRelevantBuff > 0) { + if (character.ActiveBuffs.Contains(b)) { character.ActiveBuffs.Remove(b); /*removedBuffs.Add(b);*//* } + if (character.ActiveBuffs.Contains(c)) { character.ActiveBuffs.Remove(c); /*removedBuffs.Add(c);*//* } + if (character.ActiveBuffs.Contains(d)) { character.ActiveBuffs.Remove(d); /*removedBuffs.Add(c);*//* } + } + }*/ #endregion Stats statsBuffs = GetBuffsStats(character.ActiveBuffs, character.SetBonusCount); foreach (Buff b in removedBuffs) { character.ActiveBuffsAdd(b); } foreach (Buff b in addedBuffs) { character.ActiveBuffs.Remove(b); } return(statsBuffs); }
public BaseSolver(Stats _stats, Character _char) { stats = _stats; character = _char; calculationOptions = character.CalculationOptions as CalculationOptionsHealPriest; Role = string.Empty; ActionList = "Cast List:"; }
private void cbUseTrinkets_CheckedChanged(object sender, EventArgs e) { if (!loading) { CalculationOptionsHealPriest calcOpts = Character.CalculationOptions as CalculationOptionsHealPriest; calcOpts.ModelProcs = cbModelProcs.Checked; Character.OnCalculationsInvalidated(); } }
private void numFightLength_ValueChanged(object sender, EventArgs e) { if (!loading) { CalculationOptionsHealPriest calcOpts = Character.CalculationOptions as CalculationOptionsHealPriest; calcOpts.FightLengthSeconds = (int)numFightLength.Value; Character.OnCalculationsInvalidated(); } }
private void numProMTicks_ValueChanged(object sender, EventArgs e) { if (!loading) { CalculationOptionsHealPriest calcOpts = Character.CalculationOptions as CalculationOptionsHealPriest; calcOpts.ProMTicks = (int)numProMTicks.Value; Character.OnCalculationsInvalidated(); } }
private void numDivineHymnCast_ValueChanged(object sender, EventArgs e) { if (!loading) { CalculationOptionsHealPriest calcOpts = Character.CalculationOptions as CalculationOptionsHealPriest; calcOpts.DivineHymnCast = (int)numDivineHymnCast.Value; Character.OnCalculationsInvalidated(); } }
private void cmbManaAmt_SelectedIndexChanged(object sender, EventArgs e) { if (!loading) { CalculationOptionsHealPriest calcOpts = Character.CalculationOptions as CalculationOptionsHealPriest; calcOpts.ManaPot = cmbManaAmt.SelectedIndex; Character.OnCalculationsInvalidated(); } }
public override Stats GetCharacterStats(Character character, Item additionalItem) { CalculationOptionsHealPriest calcOpts = character.CalculationOptions as CalculationOptionsHealPriest; StatsPriest statsTotal = new StatsPriest() { SpellHaste = PriestInformation.GetDarkness(character.PriestTalents.Darkness), InnerFire = true, BonusIntellectMultiplier = 0.05f, // Cloth bonus. PriestSpec = PriestSpec.GetPriestSpec(character.PriestTalents), }; if (statsTotal.PriestSpec == ePriestSpec.Spec_Disc) { statsTotal.SpellCombatManaRegeneration = 0.5f; statsTotal.BonusIntellectMultiplier = 0.15f; } else if (statsTotal.PriestSpec == ePriestSpec.Spec_Holy) { statsTotal.SpellCombatManaRegeneration = 0.5f + PriestInformation.GetHolyConcentration(character.PriestTalents.HolyConcentration); statsTotal.BonusHealingDoneMultiplier = 0.15f; } else if (statsTotal.PriestSpec == ePriestSpec.Spec_ERROR) { throw new Exception("Unpossible Talent Spec!"); } statsTotal.Accumulate(BaseStats.GetBaseStats(character)); statsTotal.Accumulate(GetItemStats(character, additionalItem)); statsTotal.Accumulate(GetBuffsStats(character, calcOpts)); statsTotal.Stamina = (float)Math.Floor((statsTotal.Stamina) * (1 + statsTotal.BonusStaminaMultiplier)); statsTotal.Intellect = (float)Math.Floor((statsTotal.Intellect) * (1 + statsTotal.BonusIntellectMultiplier)); statsTotal.Spirit = (float)Math.Floor((statsTotal.Spirit) * (1 + statsTotal.BonusSpiritMultiplier)); statsTotal.SpellPower += (statsTotal.InnerFire ? PriestInformation.GetInnerFireSpellPowerBonus(character) : 0) + (statsTotal.Intellect - 10); statsTotal.SpellPower *= (1f + statsTotal.BonusSpellPowerMultiplier); statsTotal.Mana += StatConversion.GetManaFromIntellect(statsTotal.Intellect); statsTotal.Mana *= (1f + statsTotal.BonusManaMultiplier); statsTotal.Health += StatConversion.GetHealthFromStamina(statsTotal.Stamina); statsTotal.Health = (float)Math.Floor(statsTotal.Health * (1f + statsTotal.BonusHealthMultiplier)); statsTotal.SpellCrit += StatConversion.GetSpellCritFromIntellect(statsTotal.Intellect) + StatConversion.GetSpellCritFromRating(statsTotal.CritRating); statsTotal.SpellHaste = (1f + statsTotal.SpellHaste) * (1f + StatConversion.GetSpellHasteFromRating(statsTotal.HasteRating)) - 1f; statsTotal.Armor *= (1 + (statsTotal.InnerFire ? PriestInformation.GetInnerFireArmorBonus(character) : 0)); if (statsTotal.PriestSpec == ePriestSpec.Spec_Disc) { statsTotal.ShieldDiscipline = (PriestInformation.DisciplineMasteryBase + StatConversion.GetMasteryFromRating(statsTotal.MasteryRating)) * PriestInformation.DisciplineMasteryEffect; } else if (statsTotal.PriestSpec == ePriestSpec.Spec_Holy) { statsTotal.EchoofLight = (PriestInformation.HolyMasteryBase + StatConversion.GetMasteryFromRating(statsTotal.MasteryRating)) * PriestInformation.HolyMasteryEffect; } return(statsTotal); }
private void cbRotation_SelectedIndexChanged(object sender, EventArgs e) { if (!loading) { CalculationOptionsHealPriest calcOpts = Character.CalculationOptions as CalculationOptionsHealPriest; calcOpts.Role = (eRole)cbRotation.SelectedIndex; Character.OnCalculationsInvalidated(); panelCustom.Visible = calcOpts.Role == eRole.CUSTOM; } }
private void trkActivity_Scroll(object sender, EventArgs e) { if (!loading) { CalculationOptionsHealPriest calcOpts = Character.CalculationOptions as CalculationOptionsHealPriest; lblActivity.Text = trkActivity.Value + "% of fight spent in FSR."; calcOpts.FSRRatio = trkActivity.Value; Character.OnCalculationsInvalidated(); } }
private void trkReplenishment_Scroll(object sender, EventArgs e) { if (!loading) { CalculationOptionsHealPriest calcOpts = Character.CalculationOptions as CalculationOptionsHealPriest; lblReplenishment.Text = trkReplenishment.Value + "% time with Replenishment buff."; calcOpts.Replenishment = trkReplenishment.Value; Character.OnCalculationsInvalidated(); } }
private void trkSurvivability_Scroll(object sender, EventArgs e) { if (!loading) { CalculationOptionsHealPriest calcOpts = Character.CalculationOptions as CalculationOptionsHealPriest; lblSurvivability.Text = trkSurvivability.Value + "% weight on Survivability."; calcOpts.Survivability = trkSurvivability.Value; Character.OnCalculationsInvalidated(); } }
private void trkRapture_Scroll(object sender, EventArgs e) { if (!loading) { CalculationOptionsHealPriest calcOpts = Character.CalculationOptions as CalculationOptionsHealPriest; lblRapture.Text = trkRapture.Value + "% of max Rapture returns."; calcOpts.Rapture = trkRapture.Value; Character.OnCalculationsInvalidated(); } }
private void trkTestOfFaith_Scroll(object sender, EventArgs e) { if (!loading) { CalculationOptionsHealPriest calcOpts = Character.CalculationOptions as CalculationOptionsHealPriest; lblTestOfFaith.Text = trkTestOfFaith.Value + "% of heals use Test of Faith or Improved Flash Heal."; calcOpts.TestOfFaith = trkTestOfFaith.Value; Character.OnCalculationsInvalidated(); } }
private void trkSerendipity_Scroll(object sender, EventArgs e) { if (!loading) { CalculationOptionsHealPriest calcOpts = Character.CalculationOptions as CalculationOptionsHealPriest; lblSerendipity.Text = trkSerendipity.Value + "% T5 2 Set Bonus."; calcOpts.Serendipity = trkSerendipity.Value; Character.OnCalculationsInvalidated(); } }
private void trkShadowfiend_Scroll(object sender, EventArgs e) { if (!loading) { CalculationOptionsHealPriest calcOpts = Character.CalculationOptions as CalculationOptionsHealPriest; lblShadowfiend.Text = trkShadowfiend.Value + "% effectiveness of Shadowfiend."; calcOpts.Shadowfiend = trkShadowfiend.Value; Character.OnCalculationsInvalidated(); } }
public PriestSolver(CharacterCalculationsHealPriest calc, CalculationOptionsHealPriest calcOpts, bool verbose) { Name = "Priest Solver base"; this.character = calc.Character; this.stats = calc.BasicStats; this.calc = calc; this.calcOpts = calcOpts; this.bossOptions = character.BossOptions; this.verbose = verbose; }
public void LoadCalculationOptions() { _loadingCalculationOptions = true; if (Character.CalculationOptions == null) Character.CalculationOptions = new CalculationOptionsHealPriest(); calcOpts = Character.CalculationOptions as CalculationOptionsHealPriest; // Model Specific Code // cbRotation.ItemsSource = PriestModels.Models; cbRotation.SelectedItem = calcOpts.Model; _loadingCalculationOptions = false; CalculationOptionsPanelHealPriest_PropertyChanged(null, new PropertyChangedEventArgs("Model")); }
public void LoadCalculationOptions() { _loadingCalculationOptions = true; if (Character.CalculationOptions == null) { Character.CalculationOptions = new CalculationOptionsHealPriest(); } calcOpts = Character.CalculationOptions as CalculationOptionsHealPriest; // Model Specific Code // _loadingCalculationOptions = false; CalculationOptionsPanelHealPriest_PropertyChanged(null, new PropertyChangedEventArgs("Role")); }
public void LoadCalculationOptions() { _loadingCalculationOptions = true; if (Character.CalculationOptions == null) { Character.CalculationOptions = new CalculationOptionsHealPriest(); } calcOpts = Character.CalculationOptions as CalculationOptionsHealPriest; // Model Specific Code // cbRotation.ItemsSource = PriestModels.Models; cbRotation.SelectedItem = calcOpts.Model; _loadingCalculationOptions = false; CalculationOptionsPanelHealPriest_PropertyChanged(null, new PropertyChangedEventArgs("Model")); }
public static PriestSolver GetModel(CharacterCalculationsHealPriest calc, CalculationOptionsHealPriest calcOpts, bool verbose) { string modelName = calcOpts.Model; PriestSolver model = null; if (modelName == modelDiscTank) { model = new PriestSolverDisciplineTank(calc, calcOpts, verbose); } else if (modelName == modelDiscTank2) { model = new PriestSolverDisciplineTank2(calc, calcOpts, verbose); } else if (modelName == modelDiscTank3) { model = new PriestSolverDisciplineTank3(calc, calcOpts, verbose); } else if (modelName == modelDiscRaid) { model = new PriestSolverDisciplineRaid(calc, calcOpts, verbose); } else if (modelName == modelHolyTank) { model = new PriestSolverHolyTank(calc, calcOpts, verbose); } else if (modelName == modelHolyRaid) { model = new PriestSolverHolyRaid(calc, calcOpts, verbose); } /*if (verbose) * { * List<string> msg = model.MeetsRequirements(); * if (msg.Count > 0) * { * MessageBox.Show(String.Format("Currently selected model might not work optimally due to:{0}", String.Join("\n", msg))); * } * }*/ if (model == null) { throw new Exception("No model selection for Healing Priest. Not a good situation."); } return(model); }
public PriestSolverDisciplineTank3(CharacterCalculationsHealPriest calc, CalculationOptionsHealPriest calcOpts, bool verbose) : base(calc, calcOpts, verbose) { Name = PriestModels.modelDiscTank3; }
public PriestSolverDisciplineTank3(CharacterCalculationsHealPriest calc, CalculationOptionsHealPriest calcOpts, bool verbose) : base(calc, calcOpts, verbose) { Name = PriestModels.modelDiscTank3; }
public PriestSolverHolyRaid(CharacterCalculationsHealPriest calc, CalculationOptionsHealPriest calcOpts, bool verbose) : base(calc, calcOpts, verbose) { Name = PriestModels.modelHolyRaid; }
protected override void LoadCalculationOptions() { if (Character == null) { return; } loading = true; if (Character.CalculationOptions == null) { Character.CalculationOptions = new CalculationOptionsHealPriest(); } CalculationOptionsHealPriest calcOpts = Character.CalculationOptions as CalculationOptionsHealPriest; if (calcOpts.Rotation > 0) { // Fix for Legacy calcOpts.Role = (eRole)calcOpts.Rotation; calcOpts.Rotation = 0; } cbRotation.SelectedIndex = (int)calcOpts.Role; panelCustom.Visible = calcOpts.Role == eRole.CUSTOM; cmbManaAmt.SelectedIndex = calcOpts.ManaPot; trkActivity.Value = (int)calcOpts.FSRRatio; lblActivity.Text = trkActivity.Value + "% of fight spent in FSR."; numFightLength.Value = (int)calcOpts.FightLengthSeconds; trkSerendipity.Value = (int)calcOpts.Serendipity; lblSerendipity.Text = trkSerendipity.Value + "% T5 2 Set Bonus."; trkRapture.Value = (int)calcOpts.Rapture; lblRapture.Text = trkRapture.Value + "% of max Rapture returns."; trkReplenishment.Value = (int)calcOpts.Replenishment; lblReplenishment.Text = trkReplenishment.Value + "% time with Replenishment buff."; trkShadowfiend.Value = (int)calcOpts.Shadowfiend; lblShadowfiend.Text = trkShadowfiend.Value + "% effectiveness of Shadowfiend."; trkTestOfFaith.Value = (int)calcOpts.TestOfFaith; lblTestOfFaith.Text = trkTestOfFaith.Value + "% of heals use Test of Faith or Improved Flash Heal."; trkSurvivability.Value = (int)calcOpts.Survivability; lblSurvivability.Text = trkSurvivability.Value + "% weight on Survivability."; cbModelProcs.Checked = calcOpts.ModelProcs; numFlashHealCast.Value = calcOpts.FlashHealCast; numBindingHealCast.Value = calcOpts.BindingHealCast; numGreaterHealCast.Value = calcOpts.GreaterHealCast; numPenanceCast.Value = calcOpts.PenanceCast; numRenewCast.Value = calcOpts.RenewCast; numRenewTicks.Value = calcOpts.RenewTicks; numProMCast.Value = calcOpts.ProMCast; numProMTicks.Value = calcOpts.ProMTicks; numPoHCast.Value = calcOpts.PoHCast; numPWSCast.Value = calcOpts.PWSCast; numCoHCast.Value = calcOpts.CoHCast; numHolyNovaCast.Value = calcOpts.HolyNovaCast; numDivineHymnCast.Value = calcOpts.DivineHymnCast; numDispelCast.Value = calcOpts.DispelCast; numMDCast.Value = calcOpts.MDCast; loading = false; }
public override ComparisonCalculationBase[] GetCustomChartData(Character character, string chartName) { List <ComparisonCalculationBase> comparisonList = new List <ComparisonCalculationBase>(); ComparisonCalculationBase comparison; CalculationOptionsHealPriest calcOpts = character.CalculationOptions as CalculationOptionsHealPriest; if (calcOpts == null) { return(null); } CharacterCalculationsHealPriest calcs = GetCharacterCalculations(character) as CharacterCalculationsHealPriest; if (calcs == null) { return(null); } _currentChartTotal = 0; _currentChartName = chartName; switch (chartName) { case _customChartManaSources: PriestSolver solver = PriestModels.GetModel(calcs, calcOpts, true); solver.Solve(); foreach (ManaSource manaSource in solver.ManaSources) { comparison = CreateNewComparisonCalculation(); comparison.Name = manaSource.Name; comparison.Description = manaSource.Description; comparison.SubPoints[2] = manaSource.Value * 5f; // Convert to Mp5 _currentChartTotal += comparison.SubPoints[2]; comparison.OverallPoints = comparison.SubPoints[2]; comparison.Equipped = false; comparisonList.Add(comparison); } return(comparisonList.ToArray()); //case _customChartStatsGraph: // return new ComparisonCalculationBase[0]; #region old old old /*case "Spell AoE HpS": * _currentChartName = chartName; * p = GetCharacterCalculations(character) as CharacterCalculationsHealPriest; * spellList = new List<Spell>(); * spellList.Add(new Renew(p.BasicStats, character)); * spellList.Add(new FlashHeal(p.BasicStats, character)); * spellList.Add(new Heal(p.BasicStats, character)); * spellList.Add(new PrayerOfHealing(p.BasicStats, character, 5)); * spellList.Add(new BindingHeal(p.BasicStats, character)); * spellList.Add(new PrayerOfMending(p.BasicStats, character, 5)); * spellList.Add(new CircleOfHealing(p.BasicStats, character, 5)); * spellList.Add(new HolyNova(p.BasicStats, character, 5)); * spellList.Add(new Penance(p.BasicStats, character)); * spellList.Add(new PowerWordShield(p.BasicStats, character)); * * foreach (Spell spell in spellList) * { * if(spell.AvgHeal == 0) * continue; * * comparison = CreateNewComparisonCalculation(); * comparison.Name = spell.Name; * comparison.Equipped = false; * comparison.SubPoints[0] = spell.HpS; * comparison.OverallPoints = comparison.SubPoints[0]; * comparisonList.Add(comparison); * } * * return comparisonList.ToArray(); * case "Spell AoE HpM": * _currentChartName = chartName; * p = GetCharacterCalculations(character) as CharacterCalculationsHealPriest; * spellList = new List<Spell>(); * spellList.Add(new Renew(p.BasicStats, character)); * spellList.Add(new FlashHeal(p.BasicStats, character)); * spellList.Add(new Heal(p.BasicStats, character)); * spellList.Add(new PrayerOfHealing(p.BasicStats, character, 5)); * spellList.Add(new BindingHeal(p.BasicStats, character)); * spellList.Add(new PrayerOfMending(p.BasicStats, character, 5)); * spellList.Add(new CircleOfHealing(p.BasicStats, character, 5)); * spellList.Add(new HolyNova(p.BasicStats, character, 5)); * spellList.Add(new Penance(p.BasicStats, character)); * spellList.Add(new PowerWordShield(p.BasicStats, character)); * * foreach (Spell spell in spellList) * { * if (spell.AvgHeal == 0) * continue; * * comparison = CreateNewComparisonCalculation(); * comparison.Name = spell.Name; * comparison.Equipped = false; * comparison.SubPoints[0] = spell.HpM; * comparison.OverallPoints = comparison.SubPoints[0]; * comparisonList.Add(comparison); * } * * return comparisonList.ToArray(); * case "Spell HpS": * _currentChartName = chartName; * p = GetCharacterCalculations(character) as CharacterCalculationsHealPriest; * spellList = new List<Spell>(); * spellList.Add(new Renew(p.BasicStats, character)); * spellList.Add(new FlashHeal(p.BasicStats, character)); * spellList.Add(new Heal(p.BasicStats, character)); * spellList.Add(new PrayerOfHealing(p.BasicStats, character, 1)); * spellList.Add(new BindingHeal(p.BasicStats, character)); * spellList.Add(new PrayerOfMending(p.BasicStats, character, 1)); * spellList.Add(new CircleOfHealing(p.BasicStats, character, 1)); * spellList.Add(new HolyNova(p.BasicStats, character, 1)); * spellList.Add(new Penance(p.BasicStats, character)); * spellList.Add(new PowerWordShield(p.BasicStats, character)); * * foreach (Spell spell in spellList) * { * if (spell.AvgHeal == 0) * continue; * * comparison = CreateNewComparisonCalculation(); * comparison.Name = spell.Name; * comparison.Equipped = false; * comparison.SubPoints[0] = spell.HpS; * comparison.OverallPoints = comparison.SubPoints[0]; * comparisonList.Add(comparison); * } * * return comparisonList.ToArray(); * case "Spell HpM": * _currentChartName = chartName; * p = GetCharacterCalculations(character) as CharacterCalculationsHealPriest; * spellList = new List<Spell>(); * spellList.Add(new Renew(p.BasicStats, character)); * spellList.Add(new FlashHeal(p.BasicStats, character)); * spellList.Add(new Heal(p.BasicStats, character)); * spellList.Add(new PrayerOfHealing(p.BasicStats, character, 1)); * spellList.Add(new BindingHeal(p.BasicStats, character)); * spellList.Add(new PrayerOfMending(p.BasicStats, character, 1)); * spellList.Add(new CircleOfHealing(p.BasicStats, character, 1)); * spellList.Add(new HolyNova(p.BasicStats, character, 1)); * spellList.Add(new Penance(p.BasicStats, character)); * spellList.Add(new PowerWordShield(p.BasicStats, character)); * * foreach (Spell spell in spellList) * { * if (spell.AvgHeal == 0) * continue; * * comparison = CreateNewComparisonCalculation(); * comparison.Name = spell.Name; * comparison.Equipped = false; * comparison.SubPoints[0] = spell.HpM; * comparison.OverallPoints = comparison.SubPoints[0]; * comparisonList.Add(comparison); * } * * return comparisonList.ToArray(); */ #endregion default: return(new ComparisonCalculationBase[0]); } }
public PriestSolver(CharacterCalculationsHealPriest calc, CalculationOptionsHealPriest calcOpts, bool verbose) { Name = "Priest Solver base"; this.character = calc.Character; this.stats = calc.BasicStats; this.calc = calc; this.calcOpts = calcOpts; this.bossOptions = character.BossOptions; this.verbose = verbose; }
public Stats GetBuffsStats(Character character, CalculationOptionsHealPriest calcOpts) { List<Buff> removedBuffs = new List<Buff>(); List<Buff> addedBuffs = new List<Buff>(); //float hasRelevantBuff; #region Passive Ability Auto-Fixing // Removes the Trueshot Aura Buff and it's equivalents Unleashed Rage and Abomination's Might if you are // maintaining it yourself. We are now calculating this internally for better accuracy and to provide // value to relevant talents /*{ hasRelevantBuff = character.HunterTalents.TrueshotAura; Buff a = Buff.GetBuffByName("Trueshot Aura"); Buff b = Buff.GetBuffByName("Unleashed Rage"); Buff c = Buff.GetBuffByName("Abomination's Might"); if (hasRelevantBuff > 0) { if (character.ActiveBuffs.Contains(a)) { character.ActiveBuffs.Remove(a); removedBuffs.Add(a); } if (character.ActiveBuffs.Contains(b)) { character.ActiveBuffs.Remove(b); removedBuffs.Add(b); } if (character.ActiveBuffs.Contains(c)) { character.ActiveBuffs.Remove(c); removedBuffs.Add(c); } } } // Removes the Hunter's Mark Buff and it's Children 'Glyphed', 'Improved' and 'Both' if you are // maintaining it yourself. We are now calculating this internally for better accuracy and to provide // value to relevant talents { hasRelevantBuff = character.HunterTalents.ImprovedHuntersMark + (character.HunterTalents.GlyphOfHuntersMark ? 1 : 0); Buff a = Buff.GetBuffByName("Hunter's Mark"); Buff b = Buff.GetBuffByName("Glyphed Hunter's Mark"); Buff c = Buff.GetBuffByName("Improved Hunter's Mark"); Buff d = Buff.GetBuffByName("Improved and Glyphed Hunter's Mark"); // Since we are doing base Hunter's mark ourselves, we still don't want to double-dip if (character.ActiveBuffs.Contains(a)) { character.ActiveBuffs.Remove(a); /*removedBuffs.Add(a);*//* } // If we have an enhanced Hunter's Mark, kill the Buff if (hasRelevantBuff > 0) { if (character.ActiveBuffs.Contains(b)) { character.ActiveBuffs.Remove(b); /*removedBuffs.Add(b);*//* } if (character.ActiveBuffs.Contains(c)) { character.ActiveBuffs.Remove(c); /*removedBuffs.Add(c);*//* } if (character.ActiveBuffs.Contains(d)) { character.ActiveBuffs.Remove(d); /*removedBuffs.Add(c);*//* } } }*/ #endregion Stats statsBuffs = GetBuffsStats(character.ActiveBuffs, character.SetBonusCount); foreach (Buff b in removedBuffs) { character.ActiveBuffsAdd(b); } foreach (Buff b in addedBuffs) { character.ActiveBuffs.Remove(b); } return statsBuffs; }
public PriestSolverHolyRaid(CharacterCalculationsHealPriest calc, CalculationOptionsHealPriest calcOpts, bool verbose) : base(calc, calcOpts, verbose) { Name = PriestModels.modelHolyRaid; }
public override Dictionary <string, string> GetCharacterDisplayCalculationValues() { Dictionary <string, string> dictValues = new Dictionary <string, string>(); Buff activeBuff; string s; Stats baseStats = BaseStats.GetBaseStats(Character); #region General dictValues["Health"] = BasicStats.Health.ToString("0"); dictValues["Mana"] = BasicStats.Mana.ToString("0"); dictValues["Item Level"] = String.Format("{0}*Lowest: {1}\nHighest: {2}", Character.AvgWornItemLevel.ToString("0"), Character.MinWornItemLevel.ToString("0"), Character.MaxWornItemLevel.ToString("0")); dictValues["Speed"] = String.Format("{0}%*{0}% Run speed", ((1f + BasicStats.MovementSpeed) * 100f).ToString("0")); #endregion #region Attributes dictValues["Strength"] = BasicStats.Strength.ToString(); dictValues["Agility"] = BasicStats.Agility.ToString(); dictValues["Stamina"] = BasicStats.Stamina.ToString(); dictValues["Intellect"] = BasicStats.Intellect.ToString(); dictValues["Spirit"] = BasicStats.Spirit.ToString(); #endregion #region Spell #region Spell Power s = String.Empty; float intPower = BasicStats.Intellect - 10; if (BasicStats.InnerFire) { s += String.Format("\n{0} from Inner Fire", PriestInformation.GetInnerFireSpellPowerBonus(Character)); } activeBuff = GetActiveBuffsByGroup("Spell Power"); if (activeBuff != null) { s += makeActiveBuffTextPercent(activeBuff, activeBuff.Stats.BonusSpellPowerMultiplier); } dictValues["Spell Power"] = String.Format("{0}*{1} from {2} Intellect{3}", BasicStats.SpellPower.ToString("0"), intPower.ToString("0"), BasicStats.Intellect.ToString("0"), s ); #endregion #region Haste s = String.Empty; if (Character.PriestTalents.Darkness > 0) { s += String.Format("\n{0}% from {1} points in Darkness", Character.PriestTalents.Darkness, Character.PriestTalents.Darkness); } activeBuff = GetActiveBuffsByGroup("Spell Haste"); if (activeBuff != null) { s += makeActiveBuffTextPercent(activeBuff, activeBuff.Stats.SpellHaste); } activeBuff = GetActiveBuffsByGroup("Dark Intent"); if (activeBuff != null) { s += makeActiveBuffTextPercent(activeBuff, activeBuff.Stats.SpellHaste); } dictValues["Haste"] = String.Format("{0}%*{1}% from {2} Haste Rating{3}", (BasicStats.SpellHaste * 100f).ToString("0.00"), (StatConversion.GetSpellHasteFromRating(BasicStats.HasteRating) * 100f).ToString("0.00"), BasicStats.HasteRating.ToString("0"), s ); #endregion dictValues["Hit"] = (BasicStats.SpellHit * 100f).ToString("0.00"); dictValues["Penetration"] = BasicStats.SpellPenetration.ToString("0"); #region Mana Regen float manaRegen = StatConversion.GetSpiritRegenSec(BasicStats.Spirit, BasicStats.Intellect) * 5f; s = String.Format("\n{0} Mana per 5 sec from Base Mana Regeneration", (baseStats.Mana * 0.05f).ToString("0")); activeBuff = GetActiveBuffsByGroup("Mana Regeneration"); if (activeBuff != null) { s += makeActiveBuffText(activeBuff, activeBuff.Stats.Mp5); } dictValues["Mana Regen"] = String.Format("{0}*{1} from Spirit based regen{2}", (manaRegen + BasicStats.Mp5).ToString("0"), manaRegen.ToString("0"), s ); dictValues["Combat Regen"] = String.Format("{0}*{1} from Spirit based regen{2}", (manaRegen * BasicStats.SpellCombatManaRegeneration + BasicStats.Mp5).ToString("0"), (manaRegen * BasicStats.SpellCombatManaRegeneration).ToString("0"), s ); #endregion #region Crit s = String.Empty; activeBuff = GetActiveBuffsByGroup("Critical Strike Chance"); if (activeBuff != null) { s += makeActiveBuffTextPercent(activeBuff, activeBuff.Stats.SpellCrit); } activeBuff = GetActiveBuffsByGroup("Focus Magic, Spell Critical Strike Chance"); if (activeBuff != null) { s += makeActiveBuffTextPercent(activeBuff, activeBuff.Stats.SpellCrit); } dictValues["Crit Chance"] = String.Format("{0}%*{1}% from {2} Crit Rating\n{3}% from {4} Intellect\n{5}% from Priest base{6}", (BasicStats.SpellCrit * 100f).ToString("0.00"), (StatConversion.GetSpellCritFromRating(BasicStats.CritRating) * 100f).ToString("0.00"), BasicStats.CritRating.ToString("0"), (StatConversion.GetSpellCritFromIntellect(BasicStats.Intellect) * 100f).ToString("0.00"), BasicStats.Intellect.ToString("0"), (baseStats.SpellCrit * 100f).ToString("0.00"), s ); #endregion #region Mastery s = string.Empty; float masteryBase = 0, masteryBonus = 0; if (BasicStats.PriestSpec == ePriestSpec.Spec_Disc) { masteryBase = PriestInformation.DisciplineMasteryBase; masteryBonus = PriestInformation.DisciplineMasteryEffect * 100f; s += String.Format("\n\nEach point of mastery increases the potency of Absorbs by an additional {0}%.", masteryBonus.ToString("0.00")); } else if (BasicStats.PriestSpec == ePriestSpec.Spec_Holy) { masteryBase = PriestInformation.HolyMasteryBase; masteryBonus = PriestInformation.HolyMasteryEffect * 100f; s += String.Format("\n\nEach point of mastery provides an additional {0}% healing over 6 sec.", masteryBonus.ToString("0.00")); } dictValues["Mastery"] = String.Format("{0}%*{1}% from {2} Mastery Rating\n{3}% from {4} Base Mastery{5}", ((StatConversion.GetMasteryFromRating(BasicStats.MasteryRating) + masteryBase) * masteryBonus).ToString("0.00"), (StatConversion.GetMasteryFromRating(BasicStats.MasteryRating) * masteryBonus).ToString("0.00"), BasicStats.MasteryRating.ToString("0"), (masteryBase * masteryBonus).ToString("0.00"), masteryBase.ToString("0"), s ); #endregion #endregion #region Defense dictValues["Armor"] = String.Format("{0}*{1}% physical damage reduction from same level target", BasicStats.Armor.ToString("0"), (StatConversion.GetDamageReductionFromArmor(Character.Level, BasicStats.Armor) * 100f).ToString("0.00")); dictValues["Dodge"] = String.Format("{0}%", (BasicStats.Dodge * 100f).ToString("0.00")); dictValues["Resilience"] = String.Format("{0}*{1}% damage reduction on attacks from other players\n{2}% damage reduction from spells", BasicStats.Resilience.ToString("0"), (StatConversion.GetDamageReductionFromResilience(BasicStats.Resilience) * 100f).ToString("0.00"), (Character.PriestTalents.InnerSanctum * 2f).ToString("0")); #endregion #region Resistance string resistTxt = "{0}*PvP\n{1}\n\nBoss\n{2}"; string[] resistList = { "Arcane", "Fire", "Frost", "Nature", "Shadow" }; float[] resistances = { BasicStats.ArcaneResistance + BasicStats.ArcaneResistanceBuff, BasicStats.FireResistance + BasicStats.FireResistanceBuff, BasicStats.FrostResistance + BasicStats.FrostResistanceBuff, BasicStats.NatureResistance + BasicStats.NatureResistanceBuff, BasicStats.ShadowResistance + BasicStats.ShadowResistanceBuff }; for (int x = 0; x < resistList.Length; x++) { dictValues[resistList[x]] = String.Format(resistTxt, resistances[x].ToString("0"), StatConversion.GetResistanceTableString(Character.Level, Character.Level, resistances[x], 0f), StatConversion.GetResistanceTableString(Character.Level + 3, Character.Level, resistances[x], 0f) ); } #endregion #region Model CalculationOptionsHealPriest calcOpts = Character.CalculationOptions as CalculationOptionsHealPriest; if (calcOpts != null) { PriestSolver solver = PriestModels.GetModel(this, calcOpts, true); solver.Solve(); List <string> reqs = solver.MeetsRequirements(); string disp; if (reqs.Count > 0) { disp = String.Format("{0}\n\n{1}", solver.Name, String.Join("\n", reqs)); } else { disp = solver.Name; } dictValues["Role"] = disp; dictValues["Burst Goal"] = this.BurstGoal.ToString("0"); dictValues["Sust. Goal"] = this.SustainGoal.ToString("0"); dictValues["Mana Goal"] = this.ManaGoal.ToString("0"); dictValues["Burst"] = this.BurstPoints.ToString("0"); dictValues["Sustained"] = this.SustainPoints.ToString("0"); dictValues["Mana "] = this.ManaPoints.ToString("0"); } #endregion #region Holy Spells SpellHeal spellHeal = new SpellHeal(Character, BasicStats); dictValues["Heal"] = String.Format("{0}*{1}", spellHeal.HPS().ToString("0"), spellHeal.ToString()); SpellGreaterHeal spellGreaterHeal = new SpellGreaterHeal(Character, BasicStats); dictValues["Greater Heal"] = String.Format("{0}*{1}", spellGreaterHeal.HPS().ToString("0"), spellGreaterHeal.ToString()); SpellFlashHeal spellFlashHeal = new SpellFlashHeal(Character, BasicStats); dictValues["Flash Heal"] = String.Format("{0}*{1}", spellFlashHeal.HPS().ToString("0"), spellFlashHeal.ToString()); SpellBindingHeal spellBindingHeal = new SpellBindingHeal(Character, BasicStats); dictValues["Binding Heal"] = String.Format("{0}*{1}", spellBindingHeal.HPS().ToString("0"), spellBindingHeal.ToString()); SpellRenew spellRenew = new SpellRenew(Character, BasicStats); dictValues["Renew"] = String.Format("{0}*{1}", spellRenew.HPS().ToString("0"), spellRenew.ToString()); if (Character.PriestTalents.Lightwell > 0) { SpellLightwell spellLW = new SpellLightwell(Character, BasicStats); dictValues["Lightwell"] = String.Format("{0}*{1}", spellLW.HPS().ToString("0"), spellLW.ToString()); } else { dictValues["Lightwell"] = "N/A*You do not have the talent required."; } SpellPrayerOfHealing spellProH = new SpellPrayerOfHealing(Character, BasicStats); dictValues["ProH"] = String.Format("{0}*{1}", spellProH.HPS().ToString("0"), spellProH.ToString()); SpellHolyNova spellHolyNova = new SpellHolyNova(Character, BasicStats); dictValues["Holy Nova"] = String.Format("NYI*{1}", spellHolyNova.HPS().ToString("0"), spellHolyNova.ToString()); if (Character.PriestTalents.CircleOfHealing > 0) { SpellCircleOfHealing spellCoH = new SpellCircleOfHealing(Character, BasicStats); dictValues["CoH"] = String.Format("{0}*{1}", spellCoH.HPS().ToString("0"), spellCoH.ToString()); } else { dictValues["CoH"] = "N/A*You do not have the talent required."; } if (BasicStats.PriestSpec == ePriestSpec.Spec_Disc) { SpellPenance spellPenance = new SpellPenance(Character, BasicStats); dictValues["Penance"] = String.Format("{0}*{1}", spellPenance.HPS().ToString("0"), spellPenance.ToString()); } else { dictValues["Penance"] = "N/A*You do not have the correct Talent specialization."; } if (Character.PriestTalents.Revelations > 0) { SpellSerenity spellSerenity = new SpellSerenity(Character, BasicStats); dictValues["HW Serenity"] = String.Format("{0}*{1}", spellSerenity.HPS().ToString("0"), spellSerenity.ToString()); SpellSanctuary spellSanctuary = new SpellSanctuary(Character, BasicStats); dictValues["HW Sanctuary"] = String.Format("{0}*{1}", spellSanctuary.HPS().ToString("0"), spellSanctuary.ToString()); } else { dictValues["HW Serenity"] = "N/A*You do not have the talent required."; dictValues["HW Sanctuary"] = "N/A*You do not have the talent required."; } SpellPrayerOfMending spellProM = new SpellPrayerOfMending(Character, BasicStats, 1); dictValues["ProM"] = String.Format("{0}*{1}", spellProM.HPS().ToString("0"), spellProM.ToString()); spellProM = new SpellPrayerOfMending(Character, BasicStats); dictValues["ProM 5 Hits"] = String.Format("{0}*{1}", spellProM.HPS().ToString("0"), spellProM.ToString()); SpellPowerWordShield spellPWS = new SpellPowerWordShield(Character, BasicStats); dictValues["PWS"] = String.Format("{0}*{1}", spellPWS.HPS().ToString("0"), spellPWS.ToString()); SpellDivineHymn spellDivineHymn = new SpellDivineHymn(Character, BasicStats); dictValues["Divine Hymn"] = String.Format("{0}*{1}", spellDivineHymn.HPS().ToString("0"), spellDivineHymn.ToString()); if (Character.Race == CharacterRace.Draenei) { SpellGiftOfTheNaaru spellGoat = new SpellGiftOfTheNaaru(Character, BasicStats); dictValues["Gift of the Naaru"] = String.Format("{0}*{1}", spellGoat.HPS().ToString("0"), spellGoat.ToString()); } else { dictValues["Gift of the Naaru"] = "N/A*You are not a spacegoat!"; } SpellResurrection spellResurrection = new SpellResurrection(Character, BasicStats); dictValues["Resurrection"] = String.Format("{0}*{1}", spellResurrection.CastTime.ToString("0.00"), spellResurrection.ToString()); #endregion #region Shadow Spells #endregion return(dictValues); }