public void Add4pT10(SpellModifiers modifiers) { if (Stats.Warlock4T10 == 0) { return; } Spell trigger = null; if (CastSpells.ContainsKey("Immolate")) { trigger = CastSpells["Immolate"]; } else if (CastSpells.ContainsKey("Unstable Affliction")) { trigger = CastSpells["Unstable Affliction"]; } if (trigger != null) { float numTicks = HitChance * trigger.GetNumCasts() * trigger.NumTicks; float uprate = Spell.CalcUprate( .15f, 10f, Options.Duration / numTicks); modifiers.AddMultiplicativeMultiplier(.1f * uprate); } }
private float CalcAddedCritBuff() { // If the 5% crit debuff is not already being maintained by // somebody else (i.e. it's not selected in the buffs tab), we // may supply it via Improved Shadow Bolt. if (Talents.ShadowAndFlame == 0 || StatUtils.GetActiveBuff(Character.ActiveBuffs, "Spell Critical Strike Taken", s => s.SpellCritOnTarget) > 0) { return(0f); } float casts = 0f; if (CastSpells.ContainsKey("Shadow Bolt")) { casts += CastSpells["Shadow Bolt"].GetNumCasts(); } if (CastSpells.ContainsKey("Shadow Bolt (Instant)")) { casts += CastSpells["Shadow Bolt (Instant)"].GetNumCasts(); } if (casts == 0) { return(0f); } float uprate = Spell.CalcUprate( Talents.ShadowAndFlame * .33f, // proc rate 30f, // duration BossOpts.BerserkTimer / casts); // trigger period float benefit = .05f - Stats.SpellCritOnTarget; return(benefit * uprate); }
public override Stats GetCharacterStats(Character character, Item additionalItem) { WarlockTalents talents = character.WarlockTalents; CalculationOptionsWarlock calcOpts = character.CalculationOptions as CalculationOptionsWarlock; BossOptions bossOpts = character.BossOptions; Stats stats = BaseStats.GetBaseStats(character); AccumulateItemStats(stats, character, additionalItem); AccumulateBuffsStats(stats, character.ActiveBuffs); AccumulateSetBonusStats(stats, character.SetBonusCount); ApplyPetsRaidBuff(stats, calcOpts.Pet, talents, character.ActiveBuffs, calcOpts); float[] demonicEmbraceValues = { 0f, .04f, .07f, .1f }; Stats statsTalents = new Stats { BonusStaminaMultiplier = demonicEmbraceValues[talents.DemonicEmbrace] //Demonic Embrace }; if (talents.Eradication > 0) { float[] eradicationValues = { 0f, .06f, .12f, .20f }; statsTalents.AddSpecialEffect( new SpecialEffect( Trigger.CorruptionTick, new Stats() { SpellHaste = eradicationValues[talents.Eradication] }, 10f, //duration 0f, //cooldown .06f)); //chance } stats.Accumulate(statsTalents); stats.ManaRestoreFromMaxManaPerSecond = Math.Max( stats.ManaRestoreFromMaxManaPerSecond, .001f * Spell.CalcUprate(talents.SoulLeech > 0 ? 1f : 0f, 15f, bossOpts.BerserkTimer * 1.1f)); return(stats); }
/// <summary>Gets the total Stats of the Character</summary> /// <param name="character"> /// The Character to get the total Stats of /// </param> /// <param name="additionalItem"> /// An additional item to grant the Character the stats of (as if it /// were worn) /// </param> /// <returns>The total stats for the Character</returns> public override Stats GetCharacterStats( Character character, Item additionalItem) { WarlockTalents talents = character.WarlockTalents; CalculationOptionsWarlock options = character.CalculationOptions as CalculationOptionsWarlock; Stats stats = BaseStats.GetBaseStats(character); // Items AccumulateItemStats(stats, character, additionalItem); // Buffs AccumulateBuffsStats(stats, character.ActiveBuffs); if (options.Imbue.Equals("Grand Spellstone")) { stats.HasteRating += 60f * (1f + talents.MasterConjuror * 1.5f); } else { Debug.Assert(options.Imbue.Equals("Grand Firestone")); stats.CritRating += 49f * (1f + talents.MasterConjuror * 1.5f); } ApplyPetsRaidBuff( stats, options.Pet, talents, character.ActiveBuffs); float aegis = 1f + talents.DemonicAegis * 0.10f; stats.SpellPower += 180f * aegis; // fel armor stats.SpellDamageFromSpiritPercentage += .3f * aegis; // fel armor // Talents float[] talentValues = { 0f, .04f, .07f, .1f }; Stats statsTalents = new Stats { //Demonic Embrace: increases your stamina by 4/7/10% BonusStaminaMultiplier = talentValues[talents.DemonicEmbrace], //Fel Vitality: increases your maximum Health & Mana by 1/2/3% BonusHealthMultiplier = talents.FelVitality * 0.01f, BonusManaMultiplier = talents.FelVitality * 0.01f, //Suppression: increases your chance to hit with spells by //1/2/3% SpellHit = (talents.Suppression * 0.01f), //Demonic Tactics: increases your spell crit chance by //2/4/6/8/10% //Backlash: increases your spell crit chance by 1/2/3% BonusCritChance = talents.DemonicTactics * 0.02f + talents.Backlash * 0.01f }; if (talents.Eradication > 0) { talentValues = new float[] { 0f, .06f, .12f, .20f }; statsTalents.AddSpecialEffect( new SpecialEffect( Trigger.CorruptionTick, new Stats() { SpellHaste = talentValues[talents.Eradication] }, 6f, 0f, .06f)); } stats.Accumulate(statsTalents); stats.ManaRestoreFromMaxManaPerSecond = Math.Max( stats.ManaRestoreFromMaxManaPerSecond, .002f * Spell.CalcUprate( talents.ImprovedSoulLeech * .5f, 15f, options.Duration * 1.1f)); return(stats); }