Exemplo n.º 1
0
        private void CalculateDamage()
        {
            float baseDamage     = 0.0f;
            float critMultiplier = 1.0f + Lookup.BonusCritMultiplier(Character, Stats, Ability);

            switch (Ability)
            {
            // White Damage
            case Ability.None:
                baseDamage = Lookup.WeaponDamage(Character, Stats, false);
                break;

            case Ability.Cleave:
                baseDamage = Lookup.WeaponDamage(Character, Stats, false) + (222.0f * (1.0f + Talents.ImprovedCleave * 0.4f));
                break;

            case Ability.ConcussionBlow:
                baseDamage = Stats.AttackPower * 0.38f;
                break;

            case Ability.DamageShield:
                baseDamage = Stats.BlockValue * (Talents.DamageShield * 0.1f);
                break;

            case Ability.DeepWounds:
                baseDamage        = Lookup.WeaponDamage(Character, Stats, false) * (Talents.DeepWounds * 0.16f);
                DamageMultiplier *= (1.0f + Stats.BonusBleedDamageMultiplier);
                ArmorReduction    = 0.0f;
                break;

            case Ability.Devastate:
                // Assumes 5 stacks of Sunder Armor debuff
                baseDamage        = (Lookup.WeaponDamage(Character, Stats, true) + (202.0f * 5.0f)) * 1.2f;
                DamageMultiplier *= (1.0f + Stats.BonusDevastateDamage);
                break;

            case Ability.HeroicStrike:
                baseDamage = Lookup.WeaponDamage(Character, Stats, false) + 495.0f;
                break;

            case Ability.HeroicThrow:
                baseDamage = 12.0f + (Stats.AttackPower * 0.5f);
                break;

            case Ability.MockingBlow:
                baseDamage = Lookup.WeaponDamage(Character, Stats, true);
                if (Talents.GlyphOfMockingBlow)
                {
                    DamageMultiplier *= 1.25f;
                }
                break;

            case Ability.Rend:
                baseDamage = 380.0f + Lookup.WeaponDamage(Character, Stats, false);
                if (Talents.GlyphOfRending)
                {
                    baseDamage *= 1.4f;
                }
                DamageMultiplier *= (1.0f + Talents.ImprovedRend * 0.2f) * (1.0f + Stats.BonusBleedDamageMultiplier);
                ArmorReduction    = 0.0f;
                break;

            case Ability.Revenge:
                baseDamage        = (1816.5f * (1.0f + Talents.ImprovedRevenge * 0.3f)) + (Stats.AttackPower * 0.31f);
                DamageMultiplier *= (1.0f + Talents.UnrelentingAssault * 0.1f);
                break;

            case Ability.ShieldSlam:
                float softCap = 24.5f * Character.Level;
                float hardCap = 39.5f * Character.Level;
                if (Stats.BlockValue < softCap)
                {
                    baseDamage = 1015.0f + Stats.BlockValue;
                }
                else
                {
                    baseDamage = 1015.0f + softCap
                                 + (0.98f * (Math.Min(Stats.BlockValue, hardCap) - softCap))
                                 - (0.00073885f * (float)Math.Pow((double)(Math.Min(Stats.BlockValue, hardCap) - softCap), 2.0d));
                }
                DamageMultiplier *= (1.0f + Stats.BonusShieldSlamDamage);
                break;

            case Ability.Shockwave:
                baseDamage        = Stats.AttackPower * 0.75f;
                DamageMultiplier *= (1.0f + Stats.BonusShockwaveDamage);
                break;

            case Ability.Slam:
                baseDamage = Lookup.WeaponDamage(Character, Stats, false) + 250.0f;
                break;

            case Ability.ThunderClap:
                baseDamage        = 300.0f + (Stats.AttackPower * 0.12f);
                DamageMultiplier *= (1.0f + Talents.ImprovedThunderClap * 0.1f);
                break;

            case Ability.Vigilance:
                baseDamage = 0.0f;
                break;
            }

            // All damage multipliers
            baseDamage *= DamageMultiplier;
            // Armor reduction
            baseDamage *= (1.0f - ArmorReduction);
            // Combat table adjustments
            baseDamage *=
                AttackTable.Hit +
                AttackTable.Critical * critMultiplier +
                AttackTable.Glance * Lookup.GlancingReduction(Character, Options.TargetLevel);

            Damage = baseDamage;
        }
Exemplo n.º 2
0
        private void CalculateDamage()
        {
            float baseDamage     = 0.0f;
            float critMultiplier = 1.0f + Lookup.BonusCritMultiplier(Player, Ability);

            switch (Ability)
            {
            // White Damage
            case Ability.None:
                baseDamage        = Lookup.WeaponDamage(Player, false);
                DamageMultiplier *= (1f + Player.Stats.BonusWhiteDamageMultiplier);
                break;

            case Ability.Cleave:
                baseDamage        = 6.0f + (Player.Stats.AttackPower * 0.562f);
                DamageMultiplier *= (1.0f + Player.Talents.Thunderstruck * 0.03f);
                break;

            case Ability.ConcussionBlow:
                baseDamage = Player.Stats.AttackPower * 0.75f;
                break;

            case Ability.DeepWounds:
                baseDamage        = Lookup.WeaponDamage(Player, false) * (Player.Talents.DeepWounds * 0.16f);
                DamageMultiplier *= (1.0f + Player.Stats.BonusBleedDamageMultiplier);
                ArmorReduction    = 0.0f;
                break;

            case Ability.Devastate:
                // Assumes 3 stacks of Sunder Armor debuff
                baseDamage = (Lookup.WeaponDamage(Player, true) * 1.5f) + (854.0f * 3.0f);
                if (Player.Talents.GlyphOfDevastate)
                {
                    DamageMultiplier *= 1.05f;
                }
                DamageMultiplier *= (1.0f + Player.Stats.BonusDevastateDamageMultiplier) * (1.0f + 0.05f * Player.Talents.WarAcademy);
                break;

            case Ability.HeroicStrike:
                baseDamage = 8.0f + (Player.Stats.AttackPower * 0.6f);
                break;

            case Ability.HeroicThrow:
                baseDamage = 12.0f + (Player.Stats.AttackPower * 0.5f);
                break;

            case Ability.Rend:
                baseDamage        = 525.0f + (Lookup.WeaponDamage(Player, false) * 1.5f);
                DamageMultiplier *= (1.0f + Player.Stats.BonusBleedDamageMultiplier) * (1.0f + Player.Talents.Thunderstruck * 0.03f);
                ArmorReduction    = 0.0f;
                break;

            case Ability.Revenge:
                baseDamage = 1798.0f + (Player.Stats.AttackPower * 0.3105f);
                if (Player.Talents.GlyphOfRevenge)
                {
                    DamageMultiplier *= 1.1f;
                }
                DamageMultiplier *= (1.0f + Player.Talents.ImprovedRevenge * 0.3f);
                break;

            case Ability.ShieldSlam:
                baseDamage = 2779.0f + (Player.Stats.AttackPower * 0.6f);
                if (Player.Talents.GlyphOfShieldSlam)
                {
                    DamageMultiplier *= 1.1f;
                }
                if (Player.CalcOpts.UseShieldBlock)
                {
                    DamageMultiplier *= (1.0f + (0.5f * Player.Talents.HeavyRepercussions * (10.0f / Player.CalcOpts.ShieldBlockInterval)));
                }
                DamageMultiplier *= (1.0f + Player.Stats.BonusShieldSlamDamageMultiplier);
                break;

            case Ability.Shockwave:
                baseDamage        = Player.Stats.AttackPower * 0.75f;
                DamageMultiplier *= (1.0f + Player.Stats.BonusShockwaveDamageMultiplier);
                break;

            case Ability.Slam:
                baseDamage = 538.75f + (Lookup.WeaponDamage(Player, false) * 1.25f);
                break;

            case Ability.ThunderClap:
                baseDamage        = 302.0f + (Player.Stats.AttackPower * 0.12f);
                DamageMultiplier *= (1.0f + Player.Talents.Thunderstruck * 0.03f);
                break;

            case Ability.VictoryRush:
                baseDamage        = Player.Stats.AttackPower * 0.56f;
                DamageMultiplier *= (1.0f + Player.Talents.WarAcademy * 0.05f);
                break;
            }

            // All damage multipliers
            baseDamage *= DamageMultiplier;
            // Armor reduction
            baseDamage *= (1.0f - ArmorReduction);
            // Combat table adjustments
            baseDamage *=
                AttackTable.Hit +
                AttackTable.Critical * critMultiplier +
                AttackTable.Glance * Lookup.GlancingReduction(Player);

            Damage = baseDamage;
        }
Exemplo n.º 3
0
        private void CalculateDamage()
        {
            float baseDamage     = 0.0f;
            float critMultiplier = 1.0f + Lookup.BonusCritMultiplier(Character, Stats, Ability);

            switch (Ability)
            {
            // White Damage
            case Ability.None:
                baseDamage = Lookup.WeaponDamage(Character, Stats, false);
                break;

            case Ability.Cleave:
                baseDamage = Lookup.WeaponDamage(Character, Stats, false) + (222.0f * (1.0f + Talents.ImprovedCleave * 0.4f));
                break;

            case Ability.ConcussionBlow:
                baseDamage = Stats.AttackPower * 0.75f;
                break;

            case Ability.DamageShield:
                baseDamage = Stats.BlockValue * (Talents.DamageShield * 0.1f);
                break;

            case Ability.DeepWounds:
                baseDamage        = Lookup.WeaponDamage(Character, Stats, false) * (Talents.DeepWounds * 0.16f);
                DamageMultiplier *= (1.0f + Stats.BonusBleedDamageMultiplier);
                ArmorReduction    = 0.0f;
                break;

            case Ability.Devastate:
                // Assumes 5 stacks of Sunder Armor debuff
                baseDamage = Lookup.WeaponDamage(Character, Stats, true) + (202.0f * 5.0f);
                break;

            case Ability.HeroicStrike:
                baseDamage = Lookup.WeaponDamage(Character, Stats, false) + 495.0f;
                break;

            case Ability.HeroicThrow:
                baseDamage = 12.0f + (Stats.AttackPower * 0.5f);
                break;

            case Ability.Rend:
                baseDamage        = 380.0f + Lookup.WeaponDamage(Character, Stats, false);
                DamageMultiplier *= (1.0f + Talents.ImprovedRend * 0.2f) * (1.0f + Stats.BonusBleedDamageMultiplier);
                ArmorReduction    = 0.0f;
                break;

            case Ability.Revenge:
                baseDamage        = 1615.0f + (Stats.AttackPower * 0.207f);
                DamageMultiplier *= (1.0f + Talents.ImprovedRevenge * 0.1f) * (1.0f + Talents.UnrelentingAssault * 0.1f);
                break;

            case Ability.ShieldSlam:
                if (Stats.BlockValue < 2400.0f)
                {
                    baseDamage = 1015.0f + Stats.BlockValue;
                }
                else if (Stats.BlockValue < 3160.0f)
                {
                    baseDamage = 1015.0f + 2400.0f + (0.95f * (Stats.BlockValue - 2400.0f)) - (0.000625f * (float)Math.Pow((double)(Stats.BlockValue - 2400.0f), 2.0d));
                }
                else
                {
                    baseDamage = 1015.0f + 2400.0f + 361.0f;
                }
                DamageMultiplier *= (1.0f + Stats.BonusShieldSlamDamage);
                break;

            case Ability.Shockwave:
                baseDamage = Stats.AttackPower * 0.75f;
                break;

            case Ability.Slam:
                baseDamage = Lookup.WeaponDamage(Character, Stats, false) + 250.0f;
                break;

            case Ability.ThunderClap:
                baseDamage        = 300.0f + (Stats.AttackPower * 0.12f);
                DamageMultiplier *= (1.0f + Talents.ImprovedThunderClap * 0.1f);
                break;

            case Ability.Vigilance:
                baseDamage = 0.0f;
                break;
            }

            // All damage multipliers
            baseDamage *= DamageMultiplier;
            // Average critical strike bonuses
            baseDamage = (baseDamage * (1.0f - AttackTable.Critical)) + (baseDamage * critMultiplier * AttackTable.Critical);
            // Average glancing blow reduction
            baseDamage *= (1.0f - (Lookup.GlancingReduction(Character) * AttackTable.Glance));
            // Armor reduction
            baseDamage *= (1.0f - ArmorReduction);
            // Missed attacks
            baseDamage *= (1.0f - AttackTable.AnyMiss);

            Damage = baseDamage;
        }