private float GetHasteWithProcs(StatExtractor statExtractor) { Dictionary <int, float> periods = new Dictionary <int, float>(); Dictionary <int, float> chances = new Dictionary <int, float>(); periods.Add((int)Trigger.Use, 0f); chances.Add((int)Trigger.Use, 1f); WeightedStat[] hasteProcs = Mommy.GetUptimes( Stats, periods, chances, statExtractor, (a, b, c, d, e, f, g, h) => SpecialEffect .GetAverageCombinedUptimeCombinationsMultiplicative( a, b, c, d, e, f, g, h)); float avgProcHaste = 0f; foreach (WeightedStat proc in hasteProcs) { avgProcHaste += proc.Chance * proc.Value; } return((1f + statExtractor(Stats)) * (1f + avgProcHaste) - 1f); }
public float CalcMeleeHitChance() { // the warlock's miss rate, not including buff/debuff float miss = .17f - Mommy.CalcSpellHit() + Stats.SpellHit; // adjust to melee miss rate miss *= 8f / 13f; // add in physical hit buff/debuffs miss -= Stats.PhysicalHit; return(Math.Min(1f, 1f - miss)); }
public void CalcStats1() { // Stam & Int have to happen in this stage, so that Demonic // Knowledge is in effect when calculating the benefit of a // Demonic Pact proc. // Crit has to happen in this stage, so that Empowered Imp gives // the warlocks the right amount of crit. WarlockTalents talents = Mommy.Talents; float vitality = talents.FelVitality * .05f; float tacticsCrit = .02f * talents.DemonicTactics + .1f * talents.ImprovedDemonicTactics * (Mommy.CalcSpellCrit() - Mommy.Stats.SpellCritOnTarget); Stats = new Stats() { Stamina = BaseStamina + StaminaCoef * Mommy.CalcStamina(), Intellect = BaseIntellect + IntellectCoef * Mommy.CalcIntellect(), Strength = 297f, Agility = 90f, BonusStaminaMultiplier = vitality, BonusIntellectMultiplier = vitality, SpellCrit = BaseSpellCrit + tacticsCrit + Mommy.Stats.Warlock2T9, SpellPower = BaseSpellPower, AttackPower = BaseAttackPower, PhysicalCrit = .0329f + tacticsCrit + Mommy.Stats.Warlock2T9, }; Stats.Accumulate(Mommy.PetBuffs); Mommy.Add4pT10(TotalModifiers); FinalizeModifiers(); SpecialModifiers.Accumulate(TotalModifiers); MeleeModifiers.Accumulate(TotalModifiers); Stats.SpellHaste = GetHasteWithProcs(s => s.SpellHaste); Stats.PhysicalHaste = GetHasteWithProcs(s => s.PhysicalHaste); }
public float CalcMeleeCrit() { return(Mommy.CalcSpellCrit()); }
public float CalcAttackPower() { return(BaseAttackPower + Stats.Strength * 2f + Mommy.CalcSpellPower() * (Mommy.CalcOpts.PlayerLevel / 80)); }
public float CalcSpellPower() { return(Mommy.CalcSpellPower() * (Mommy.CalcOpts.PlayerLevel / 80) * 0.5f); }
//stats public float CalcMana() { // not clear how accurate this is; factor of 13 was reportedly 7.5 in wrath return(BaseMana + (Mommy.CalcIntellect() - Mommy.BaseIntellect) * (Mommy.CalcOpts.PlayerLevel / 80) * 13f); }
public float GetPactProcBenefit() { float pact = .02f * Mommy.Talents.DemonicPact; if (pact == 0) { return(0f); } float buff = StatUtils.GetBuffEffect( Mommy.Character.ActiveBuffs, Mommy.CalcSpellPower() * pact, "Spell Power", s => s.SpellPower); if (buff == 0) { return(0f); } SpecialEffect pactEffect = new SpecialEffect(0, null, 45f, 20f); float meleeRate; if (BaseMeleeDamage == 0) { meleeRate = 0f; } else { meleeRate = 1 / CalcMeleeSpeed(); } float spellRate; if (SpecialDamagePerSpellPower == 0) { spellRate = 0f; float specialSpeed = GetSpecialSpeed(); if (specialSpeed > 0) { meleeRate += 1 / GetSpecialSpeed(); } } else { spellRate = 1 / GetSpecialSpeed(); } float triggerRate = 1 / (meleeRate + spellRate); float uprate = pactEffect.GetAverageUptime( triggerRate, Utilities.GetWeightedSum( Mommy.HitChance * CalcSpellCrit(), spellRate, CalcMeleeCrit(), meleeRate), triggerRate, Mommy.Options.Duration); return(uprate * buff); }
public void CalcStats2() { Stats.SpellPower += SpellPowerCoef * Mommy.CalcSpellPower(); Stats.AttackPower += AttackPowerCoef * Mommy.CalcSpellPower(); }