Ejemplo n.º 1
0
        protected float CalcMeleeDamage(bool canGlance, float bonusDamage)
        {
            int level      = Mommy.Options.TargetLevel;
            int levelDelta = level - 80;

            float characterSheetDamage
                = BaseMeleeDamage
                  + DamagePerAttackPower * CalcAttackPower()
                  + bonusDamage;
            float combatTableModifier
                = CalcMeleeHitChance()
                  + CalcMeleeCrit()
                  - StatConversion.WHITE_DODGE_CHANCE_CAP[levelDelta];

            if (canGlance)
            {
                combatTableModifier
                    -= .3f * StatConversion.WHITE_GLANCE_CHANCE_CAP[levelDelta];
            }
            float armorModifier
                = 1
                  - StatConversion.GetArmorDamageReduction(
                      level,
                      StatConversion.NPC_ARMOR[levelDelta],
                      Stats.ArmorPenetration, // arpen debuffs
                      0f,                     // arpen buffs
                      0f);                    // arpen rating

            return(characterSheetDamage
                   * combatTableModifier
                   * armorModifier
                   * MeleeModifiers.GetFinalDirectMultiplier());
        }
Ejemplo n.º 2
0
        protected float CalcMeleeDamage(bool canGlance, float bonusDamage)
        {
            int level      = Mommy.CalcOpts.TargetLevel;
            int levelDelta = level - Mommy.CalcOpts.PlayerLevel;

            if (levelDelta > 3)
            {
                levelDelta = 3;
            }

            float characterSheetDamage = BaseMeleeDamage + DamagePerAttackPower * CalcAttackPower() + bonusDamage;
            float combatTableModifier  = CalcMeleeHitChance() + CalcMeleeCrit() - StatConversion.WHITE_DODGE_CHANCE_CAP[levelDelta];

            if (canGlance)
            {
                combatTableModifier -= .3f * StatConversion.WHITE_GLANCE_CHANCE_CAP[levelDelta];
            }
            float armorModifier = 1f - StatConversion.GetArmorDamageReduction(level, StatConversion.NPC_ARMOR[levelDelta], Stats.TargetArmorReduction, 0f);

            return(characterSheetDamage * combatTableModifier * armorModifier * MeleeModifiers.GetFinalDirectMultiplier());
        }