Exemple #1
0
        public virtual void Initialize(ISpellArgs args)
        {
            float Speed = (1f + args.Stats.SpellHaste) * (1f + StatConversion.GetSpellHasteFromRating(args.Stats.HasteRating));

            gcd              = (float)Math.Round(gcd / Speed, 4);
            castTime         = (float)Math.Round(castTime / Speed, 4);
            latencyGcd       = args.LatencyGCD;
            latencyCast      = args.LatencyCast;
            critModifier    += .2f * args.Talents.ElementalFury;
            critModifier    *= (float)Math.Round(1.5f * (1f + args.Stats.BonusSpellCritMultiplier) - 1f, 6);
            dotCritModifier += .2f * args.Talents.ElementalFury;
            dotCritModifier *= (float)Math.Round(1.5f * (1f + args.Stats.BonusSpellCritMultiplier) - 1f, 6);
            //critModifier += 1f;
            spellPower += args.Stats.SpellPower;
            crit       += args.Stats.SpellCrit;
            missChance -= args.Stats.SpellHit;
            totalCoef  *= 1 + args.Stats.BonusDamageMultiplier; //ret + bm buff
            if (missChance < 0)
            {
                missChance = 0;
            }
            manaCost = (float)Math.Floor(manaCost);
            //base resistance by level
            totalCoef *= 1f - StatConversion.GetAverageResistance(80, 83, 0, 0);
        }
        private float CalcDamageProc(
            SpecialEffect effect,
            float damagePerProc,
            Dictionary <int, float> periods,
            Dictionary <int, float> chances,
            SpellModifiers modifiers)
        {
            damagePerProc *=
                modifiers.GetFinalDirectMultiplier()
                * (1
                   + (modifiers.GetFinalCritMultiplier() - 1)
                   * modifiers.CritChance)
                * (1
                   - StatConversion.GetAverageResistance(
                       80, Options.TargetLevel, 0f, 0f));
            float numProcs
                = Options.Duration
                  * effect.GetAverageProcsPerSecond(
                      periods[(int)effect.Trigger],
                      chances[(int)effect.Trigger],
                      CalculationsWarlock.AVG_UNHASTED_CAST_TIME,
                      Options.Duration);

            return(numProcs * damagePerProc);
        }
Exemple #3
0
        public virtual float GetSpecialDamage()
        {
            float resist     = StatConversion.GetAverageResistance(Mommy.CalcOpts.PlayerLevel, Mommy.CalcOpts.TargetLevel, 0f, 0f);
            float nonCrit    = (SpecialBaseDamage + SpecialDamagePerSpellPower * CalcSpellPower()) * SpecialModifiers.GetFinalDirectMultiplier() * (1 - resist);
            float crit       = nonCrit * SpecialModifiers.GetFinalCritMultiplier();
            float critChance = CalcSpellCrit();

            return(Mommy.HitChance * Utilities.GetWeightedSum(crit, critChance, nonCrit, 1 - critChance));
        }
Exemple #4
0
        public static float MagicReduction(Player player, DamageType school)
        {
            float totalResist = 0.0f;

            switch (school)
            {
            case DamageType.Arcane: totalResist = player.Stats.ArcaneResistance; break;

            case DamageType.Fire: totalResist = player.Stats.FireResistance; break;

            case DamageType.Frost: totalResist = player.Stats.FrostResistance; break;

            case DamageType.Nature: totalResist = player.Stats.NatureResistance; break;

            case DamageType.Shadow: totalResist = player.Stats.ShadowResistance; break;
            }

            float damageReduction   = Lookup.StanceDamageReduction(player, school);
            float averageResistance = StatConversion.GetAverageResistance(player.BossOpts.Level, player.Character.Level, totalResist, 0.0f);

            return(Math.Max(0.0f, (1.0f - averageResistance) * (1f - damageReduction)));
        }
Exemple #5
0
        public static float MagicReduction(Character character, Stats stats, DamageType school, int targetLevel)
        {
            float totalResist = 0.0f;

            switch (school)
            {
            case DamageType.Arcane: totalResist = stats.ArcaneResistance; break;

            case DamageType.Fire: totalResist = stats.FireResistance; break;

            case DamageType.Frost: totalResist = stats.FrostResistance; break;

            case DamageType.Nature: totalResist = stats.NatureResistance; break;

            case DamageType.Shadow: totalResist = stats.ShadowResistance; break;
            }

            float damageReduction   = Lookup.StanceDamageReduction(character, stats, school);
            float averageResistance = StatConversion.GetAverageResistance(targetLevel, character.Level, totalResist, 0.0f);

            return(Math.Max(0.0f, (1.0f - averageResistance) * damageReduction));
        }
Exemple #6
0
        public void InitializeEffectDamage(Solver solver, MagicSchool magicSchool, float minDamage, float maxDamage)
        {
            Stats                  baseStats          = solver.BaseStats;
            MageTalents            mageTalents        = solver.MageTalents;
            CalculationOptionsMage calculationOptions = solver.CalculationOptions;

            //AreaEffect = areaEffect;
            //BaseCost = cost - (int)baseStats.SpellsManaReduction;
            MagicSchool   = magicSchool;
            BaseMinDamage = minDamage;
            BaseMaxDamage = maxDamage;
            //BasePeriodicDamage = periodicDamage;
            //SpellDamageCoefficient = spellDamageCoefficient;
            //Ticks = 1;
            //CastProcs = 0;
            //CastProcs2 = 0;
            //DotDamageCoefficient = dotDamageCoefficient;
            //DotDuration = dotDuration;

            BaseDirectDamageModifier = 1.0f;
            BaseDotDamageModifier    = 1.0f;
            BaseCostModifier         = 1.0f;

            //Range = range;

            /*float baseCostAmplifier = calculationOptions.EffectCostMultiplier;
             * baseCostAmplifier *= (1.0f - 0.01f * mageTalents.Precision);
             * if (mageTalents.FrostChanneling > 0) baseCostAmplifier *= (1.0f - 0.01f - 0.03f * mageTalents.FrostChanneling);
             * if (MagicSchool == MagicSchool.Arcane) baseCostAmplifier *= (1.0f - 0.01f * mageTalents.ArcaneFocus);
             * BaseCostAmplifier = baseCostAmplifier;*/

            /*float baseInterruptProtection = baseStats.InterruptProtection;
             * if (MagicSchool == MagicSchool.Fire || MagicSchool == MagicSchool.FrostFire)
             * {
             *  baseInterruptProtection += 0.35f * mageTalents.BurningSoul;
             *  AffectedByFlameCap = true;
             * }
             * BaseInterruptProtection = baseInterruptProtection;*/

            float realResistance;

            switch (MagicSchool)
            {
            case MagicSchool.Arcane:
                BaseSpellModifier         = solver.BaseArcaneSpellModifier;
                BaseAdditiveSpellModifier = solver.BaseArcaneAdditiveSpellModifier;
                BaseCritRate     = solver.BaseArcaneCritRate;
                CritBonus        = solver.BaseArcaneCritBonus;
                HitRate          = solver.BaseArcaneHitRate;
                ThreatMultiplier = solver.ArcaneThreatMultiplier;
                realResistance   = calculationOptions.ArcaneResist;
                break;

            case MagicSchool.Fire:
                BaseSpellModifier         = solver.BaseFireSpellModifier;
                BaseAdditiveSpellModifier = solver.BaseFireAdditiveSpellModifier;
                BaseCritRate     = solver.BaseFireCritRate;
                CritBonus        = solver.BaseFireCritBonus;
                HitRate          = solver.BaseFireHitRate;
                ThreatMultiplier = solver.FireThreatMultiplier;
                realResistance   = calculationOptions.FireResist;
                break;

            case MagicSchool.FrostFire:
                BaseSpellModifier         = solver.BaseFrostFireSpellModifier;
                BaseAdditiveSpellModifier = solver.BaseFrostFireAdditiveSpellModifier;
                BaseCritRate     = solver.BaseFrostFireCritRate;
                CritBonus        = solver.BaseFrostFireCritBonus;
                HitRate          = solver.BaseFrostFireHitRate;
                ThreatMultiplier = solver.FrostFireThreatMultiplier;
                if (calculationOptions.FireResist == -1)
                {
                    realResistance = calculationOptions.FrostResist;
                }
                else if (calculationOptions.FrostResist == -1)
                {
                    realResistance = calculationOptions.FireResist;
                }
                else
                {
                    realResistance = Math.Min(calculationOptions.FireResist, calculationOptions.FrostResist);
                }
                break;

            case MagicSchool.Frost:
                BaseSpellModifier         = solver.BaseFrostSpellModifier;
                BaseAdditiveSpellModifier = solver.BaseFrostAdditiveSpellModifier;
                BaseCritRate     = solver.BaseFrostCritRate;
                CritBonus        = solver.BaseFrostCritBonus;
                HitRate          = solver.BaseFrostHitRate;
                ThreatMultiplier = solver.FrostThreatMultiplier;
                realResistance   = calculationOptions.FrostResist;
                break;

            case MagicSchool.Nature:
                BaseSpellModifier         = solver.BaseNatureSpellModifier;
                BaseAdditiveSpellModifier = solver.BaseNatureAdditiveSpellModifier;
                BaseCritRate     = solver.BaseNatureCritRate;
                CritBonus        = solver.BaseNatureCritBonus;
                HitRate          = solver.BaseNatureHitRate;
                ThreatMultiplier = solver.NatureThreatMultiplier;
                realResistance   = calculationOptions.NatureResist;
                break;

            case MagicSchool.Shadow:
                BaseSpellModifier         = solver.BaseShadowSpellModifier;
                BaseAdditiveSpellModifier = solver.BaseShadowAdditiveSpellModifier;
                BaseCritRate     = solver.BaseShadowCritRate;
                CritBonus        = solver.BaseShadowCritBonus;
                HitRate          = solver.BaseShadowHitRate;
                ThreatMultiplier = solver.ShadowThreatMultiplier;
                realResistance   = calculationOptions.ShadowResist;
                break;

            case MagicSchool.Holy:
            default:
                BaseSpellModifier         = solver.BaseHolySpellModifier;
                BaseAdditiveSpellModifier = solver.BaseHolyAdditiveSpellModifier;
                BaseCritRate     = solver.BaseHolyCritRate;
                CritBonus        = solver.BaseHolyCritBonus;
                HitRate          = solver.BaseHolyHitRate;
                ThreatMultiplier = solver.HolyThreatMultiplier;
                realResistance   = calculationOptions.HolyResist;
                break;
            }

            int playerLevel = calculationOptions.PlayerLevel;
            int targetLevel = calculationOptions.TargetLevel;

            /*if (areaEffect)
             * {
             *  targetLevel = calculationOptions.AoeTargetLevel;
             *  float hitRate = ((targetLevel <= playerLevel + 2) ? (0.96f - (targetLevel - playerLevel) * 0.01f) : (0.94f - (targetLevel - playerLevel - 2) * 0.11f)) + calculations.BaseSpellHit;
             *  if (MagicSchool == MagicSchool.Arcane) hitRate += 0.01f * mageTalents.ArcaneFocus;
             *  if (hitRate > Spell.MaxHitRate) hitRate = Spell.MaxHitRate;
             *  HitRate = hitRate;
             * }
             * else
             * {
             *  targetLevel = calculationOptions.TargetLevel;
             * }*/

            RealResistance      = realResistance;
            PartialResistFactor = (realResistance == -1) ? 0 : (1 - StatConversion.GetAverageResistance(playerLevel, targetLevel, realResistance, baseStats.SpellPenetration));
        }
Exemple #7
0
        public void InitializeDamage(Solver solver, bool areaEffect, int range, MagicSchool magicSchool, SpellData spellData, float hitProcs, float castProcs, float dotDuration)
        {
            Stats                  baseStats          = solver.BaseStats;
            MageTalents            mageTalents        = solver.MageTalents;
            CalculationOptionsMage calculationOptions = solver.CalculationOptions;

            AreaEffect             = areaEffect;
            BaseCost               = spellData.Cost - (int)baseStats.SpellsManaReduction;
            MagicSchool            = magicSchool;
            Ticks                  = hitProcs;
            CastProcs              = castProcs;
            CastProcs2             = castProcs;
            BaseMinDamage          = spellData.MinDamage;
            BaseMaxDamage          = spellData.MaxDamage;
            SpellDamageCoefficient = spellData.SpellDamageCoefficient;
            BasePeriodicDamage     = spellData.PeriodicDamage;
            DotDamageCoefficient   = spellData.DotDamageCoefficient;
            DotDuration            = dotDuration;

            BaseDirectDamageModifier = 1.0f;
            BaseDotDamageModifier    = 1.0f;
            BaseCostModifier         = 1.0f;

            float baseCostAmplifier = calculationOptions.EffectCostMultiplier;

            baseCostAmplifier *= (1.0f - 0.01f * mageTalents.Precision);
            if (mageTalents.FrostChanneling > 0)
            {
                baseCostAmplifier *= (1.0f - 0.01f - 0.03f * mageTalents.FrostChanneling);
            }
            if (MagicSchool == MagicSchool.Arcane)
            {
                baseCostAmplifier *= (1.0f - 0.01f * mageTalents.ArcaneFocus);
            }
            BaseCostAmplifier = baseCostAmplifier;

            float baseInterruptProtection = baseStats.InterruptProtection;

            if (MagicSchool == MagicSchool.Fire || MagicSchool == MagicSchool.FrostFire)
            {
                baseInterruptProtection += 0.35f * mageTalents.BurningSoul;
            }
            BaseInterruptProtection = baseInterruptProtection;

            float realResistance;

            switch (MagicSchool)
            {
            case MagicSchool.Arcane:
                BaseSpellModifier         = solver.BaseArcaneSpellModifier;
                BaseAdditiveSpellModifier = solver.BaseArcaneAdditiveSpellModifier;
                BaseCritRate     = solver.BaseArcaneCritRate;
                CritBonus        = solver.BaseArcaneCritBonus;
                HitRate          = solver.BaseArcaneHitRate;
                ThreatMultiplier = solver.ArcaneThreatMultiplier;
                realResistance   = calculationOptions.ArcaneResist;
                if (range != 0)
                {
                    Range = range + mageTalents.MagicAttunement * 3;
                }
                break;

            case MagicSchool.Fire:
                BaseSpellModifier         = solver.BaseFireSpellModifier;
                BaseAdditiveSpellModifier = solver.BaseFireAdditiveSpellModifier;
                BaseCritRate     = solver.BaseFireCritRate;
                CritBonus        = solver.BaseFireCritBonus;
                HitRate          = solver.BaseFireHitRate;
                ThreatMultiplier = solver.FireThreatMultiplier;
                realResistance   = calculationOptions.FireResist;
                if (range != 0)
                {
                    Range = range + mageTalents.FlameThrowing * 3;
                }
                break;

            case MagicSchool.FrostFire:
                BaseSpellModifier         = solver.BaseFrostFireSpellModifier;
                BaseAdditiveSpellModifier = solver.BaseFrostFireAdditiveSpellModifier;
                BaseCritRate     = solver.BaseFrostFireCritRate;
                CritBonus        = solver.BaseFrostFireCritBonus;
                HitRate          = solver.BaseFrostFireHitRate;
                ThreatMultiplier = solver.FrostFireThreatMultiplier;
                if (calculationOptions.FireResist == -1)
                {
                    realResistance = calculationOptions.FrostResist;
                }
                else if (calculationOptions.FrostResist == -1)
                {
                    realResistance = calculationOptions.FireResist;
                }
                else
                {
                    realResistance = Math.Min(calculationOptions.FireResist, calculationOptions.FrostResist);
                }
                Range = range;
                break;

            case MagicSchool.Frost:
                BaseSpellModifier         = solver.BaseFrostSpellModifier;
                BaseAdditiveSpellModifier = solver.BaseFrostAdditiveSpellModifier;
                BaseCritRate     = solver.BaseFrostCritRate;
                CritBonus        = solver.BaseFrostCritBonus;
                HitRate          = solver.BaseFrostHitRate;
                ThreatMultiplier = solver.FrostThreatMultiplier;
                realResistance   = calculationOptions.FrostResist;
                Range            = range * (1 + mageTalents.ArcticReach * 0.1f);
                break;

            case MagicSchool.Nature:
                BaseSpellModifier         = solver.BaseNatureSpellModifier;
                BaseAdditiveSpellModifier = solver.BaseNatureAdditiveSpellModifier;
                BaseCritRate     = solver.BaseNatureCritRate;
                CritBonus        = solver.BaseNatureCritBonus;
                HitRate          = solver.BaseNatureHitRate;
                ThreatMultiplier = solver.NatureThreatMultiplier;
                realResistance   = calculationOptions.NatureResist;
                Range            = range;
                break;

            case MagicSchool.Shadow:
                BaseSpellModifier         = solver.BaseShadowSpellModifier;
                BaseAdditiveSpellModifier = solver.BaseShadowAdditiveSpellModifier;
                BaseCritRate     = solver.BaseShadowCritRate;
                CritBonus        = solver.BaseShadowCritBonus;
                HitRate          = solver.BaseShadowHitRate;
                ThreatMultiplier = solver.ShadowThreatMultiplier;
                realResistance   = calculationOptions.ShadowResist;
                Range            = range;
                break;

            case MagicSchool.Holy:
            default:
                BaseSpellModifier         = solver.BaseHolySpellModifier;
                BaseAdditiveSpellModifier = solver.BaseHolyAdditiveSpellModifier;
                BaseCritRate     = solver.BaseHolyCritRate;
                CritBonus        = solver.BaseHolyCritBonus;
                HitRate          = solver.BaseHolyHitRate;
                ThreatMultiplier = solver.HolyThreatMultiplier;
                realResistance   = calculationOptions.HolyResist;
                Range            = range;
                break;
            }

            int playerLevel = calculationOptions.PlayerLevel;
            int targetLevel;

            if (areaEffect)
            {
                targetLevel = calculationOptions.AoeTargetLevel;
                float hitRate = ((targetLevel <= playerLevel + 2) ? (0.96f - (targetLevel - playerLevel) * 0.01f) : (0.94f - (targetLevel - playerLevel - 2) * 0.11f)) + solver.BaseSpellHit;
                if (MagicSchool == MagicSchool.Arcane)
                {
                    hitRate += 0.01f * mageTalents.ArcaneFocus;
                }
                if (hitRate > Spell.MaxHitRate)
                {
                    hitRate = Spell.MaxHitRate;
                }
                HitRate = hitRate;
            }
            else
            {
                targetLevel = calculationOptions.TargetLevel;
            }

            RealResistance      = realResistance;
            PartialResistFactor = (realResistance == -1) ? 0 : (1 - StatConversion.GetAverageResistance(playerLevel, targetLevel, realResistance, baseStats.SpellPenetration));
        }
Exemple #8
0
        public void InitializeDamage(Solver solver, bool areaEffect, int range, MagicSchool magicSchool, int cost, float minDamage, float maxDamage, float spellDamageCoefficient, float periodicDamage, float dotDamageCoefficient, float hitProcs, float castProcs, float dotDuration)
        {
            Stats                  baseStats          = solver.BaseStats;
            MageTalents            mageTalents        = solver.MageTalents;
            CalculationOptionsMage calculationOptions = solver.CalculationOptions;

            AreaEffect        = areaEffect;
            AreaEffectDot     = areaEffect;
            MaximumAOETargets = 10;
            int manaReduction = (int)baseStats.SpellsManaCostReduction;

            if (manaReduction == 405)
            {
                // Shard of Woe hax
                manaReduction = 205;
            }
            BaseCost               = Math.Max(cost - manaReduction, 0);
            MagicSchool            = magicSchool;
            Ticks                  = hitProcs;
            CastProcs              = castProcs;
            CastProcs2             = castProcs;
            BaseMinDamage          = minDamage;
            BaseMaxDamage          = maxDamage;
            SpellDamageCoefficient = spellDamageCoefficient;
            BasePeriodicDamage     = periodicDamage;
            DotDamageCoefficient   = dotDamageCoefficient;
            DotDuration            = dotDuration;

            BaseDirectDamageModifier = 1.0f;
            BaseDotDamageModifier    = 1.0f;
            BaseCostModifier         = 1.0f;

            float baseCostAmplifier = calculationOptions.EffectCostMultiplier;

            if (mageTalents.EnduringWinter > 0)
            {
                BaseCostModifier -= 0.03f * mageTalents.EnduringWinter + (mageTalents.EnduringWinter == 3 ? 0.01f : 0.00f);
            }
            BaseCostAmplifier = baseCostAmplifier;

            float baseInterruptProtection = baseStats.InterruptProtection;

            baseInterruptProtection += 0.23f * mageTalents.BurningSoul + (mageTalents.BurningSoul == 3 ? 0.01f : 0.0f);
            BaseInterruptProtection  = baseInterruptProtection;

            float realResistance;

            switch (MagicSchool)
            {
            case MagicSchool.Arcane:
                BaseSpellModifier         = solver.BaseArcaneSpellModifier;
                BaseAdditiveSpellModifier = solver.BaseArcaneAdditiveSpellModifier;
                BaseCritRate     = solver.BaseArcaneCritRate;
                CritBonus        = solver.BaseArcaneCritBonus;
                HitRate          = solver.BaseArcaneHitRate;
                ThreatMultiplier = solver.ArcaneThreatMultiplier;
                realResistance   = calculationOptions.ArcaneResist;
                IgniteFactor     = 0;
                break;

            case MagicSchool.Fire:
                BaseSpellModifier         = solver.BaseFireSpellModifier;
                BaseAdditiveSpellModifier = solver.BaseFireAdditiveSpellModifier;
                BaseCritRate     = solver.BaseFireCritRate;
                CritBonus        = solver.BaseFireCritBonus;
                HitRate          = solver.BaseFireHitRate;
                ThreatMultiplier = solver.FireThreatMultiplier;
                realResistance   = calculationOptions.FireResist;
                IgniteFactor     = solver.IgniteFactor;
                break;

            case MagicSchool.FrostFire:
                BaseSpellModifier         = solver.BaseFrostFireSpellModifier;
                BaseAdditiveSpellModifier = solver.BaseFrostFireAdditiveSpellModifier;
                BaseCritRate     = solver.BaseFrostFireCritRate;
                CritBonus        = solver.BaseFrostFireCritBonus;
                HitRate          = solver.BaseFrostFireHitRate;
                ThreatMultiplier = solver.FrostFireThreatMultiplier;
                if (calculationOptions.FireResist == -1)
                {
                    realResistance = calculationOptions.FrostResist;
                }
                else if (calculationOptions.FrostResist == -1)
                {
                    realResistance = calculationOptions.FireResist;
                }
                else
                {
                    realResistance = Math.Min(calculationOptions.FireResist, calculationOptions.FrostResist);
                }
                Range        = range;
                IgniteFactor = solver.IgniteFactor;
                break;

            case MagicSchool.Frost:
                BaseSpellModifier         = solver.BaseFrostSpellModifier;
                BaseAdditiveSpellModifier = solver.BaseFrostAdditiveSpellModifier;
                BaseCritRate     = solver.BaseFrostCritRate;
                CritBonus        = solver.BaseFrostCritBonus;
                HitRate          = solver.BaseFrostHitRate;
                ThreatMultiplier = solver.FrostThreatMultiplier;
                realResistance   = calculationOptions.FrostResist;
                IgniteFactor     = 0;
                break;

            case MagicSchool.Nature:
                BaseSpellModifier         = solver.BaseNatureSpellModifier;
                BaseAdditiveSpellModifier = solver.BaseNatureAdditiveSpellModifier;
                BaseCritRate     = solver.BaseNatureCritRate;
                CritBonus        = solver.BaseNatureCritBonus;
                HitRate          = solver.BaseNatureHitRate;
                ThreatMultiplier = solver.NatureThreatMultiplier;
                realResistance   = calculationOptions.NatureResist;
                Range            = range;
                IgniteFactor     = 0;
                break;

            case MagicSchool.Shadow:
                BaseSpellModifier         = solver.BaseShadowSpellModifier;
                BaseAdditiveSpellModifier = solver.BaseShadowAdditiveSpellModifier;
                BaseCritRate     = solver.BaseShadowCritRate;
                CritBonus        = solver.BaseShadowCritBonus;
                HitRate          = solver.BaseShadowHitRate;
                ThreatMultiplier = solver.ShadowThreatMultiplier;
                realResistance   = calculationOptions.ShadowResist;
                Range            = range;
                IgniteFactor     = 0;
                break;

            case MagicSchool.Holy:
            default:
                BaseSpellModifier         = solver.BaseHolySpellModifier;
                BaseAdditiveSpellModifier = solver.BaseHolyAdditiveSpellModifier;
                BaseCritRate     = solver.BaseHolyCritRate;
                CritBonus        = solver.BaseHolyCritBonus;
                HitRate          = solver.BaseHolyHitRate;
                ThreatMultiplier = solver.HolyThreatMultiplier;
                realResistance   = calculationOptions.HolyResist;
                Range            = range;
                IgniteFactor     = 0;
                break;
            }

            NonHSCritRate = baseStats.SpellCritOnTarget;

            int playerLevel = calculationOptions.PlayerLevel;
            int targetLevel;

            if (areaEffect)
            {
                targetLevel = calculationOptions.AoeTargetLevel;
                float hitRate = ((targetLevel <= playerLevel + 2) ? (0.96f - (targetLevel - playerLevel) * 0.01f) : (0.94f - (targetLevel - playerLevel - 2) * 0.11f)) + solver.BaseSpellHit;
                if (hitRate > Spell.MaxHitRate)
                {
                    hitRate = Spell.MaxHitRate;
                }
                HitRate = hitRate;
            }
            else
            {
                targetLevel = calculationOptions.TargetLevel;
            }

            RealResistance      = realResistance;
            PartialResistFactor = (realResistance == -1) ? 0 : (1 - StatConversion.GetAverageResistance(playerLevel, targetLevel, realResistance, baseStats.SpellPenetration));
        }