Esempio n. 1
0
        public void Calculate()
        {
            float attackSpeed         = ParryModel.BossAttackSpeed;   // Options.BossAttackSpeed;
            float armorReduction      = (1.0f - Lookup.ArmorReduction(Character, Stats));
            float baseDamagePerSecond = Options.BossAttackValue / Options.BossAttackSpeed;
            float guaranteedReduction = (Lookup.StanceDamageReduction(Character, Stats) * armorReduction);

            DamagePerHit   = Options.BossAttackValue * guaranteedReduction;
            DamagePerCrit  = 2.0f * DamagePerHit;
            DamagePerBlock =
                (Math.Max(0.0f, DamagePerHit - Stats.BlockValue) * (1.0f - Character.WarriorTalents.CriticalBlock * 0.1f)) +
                (Math.Max(0.0f, DamagePerHit - (Stats.BlockValue * 2.0f)) * (Character.WarriorTalents.CriticalBlock * 0.1f));

            AverageDamagePerHit =
                DamagePerHit * (DefendTable.Hit / DefendTable.AnyHit) +
                DamagePerCrit * (DefendTable.Critical / DefendTable.AnyHit) +
                DamagePerBlock * (DefendTable.Block / DefendTable.AnyHit);
            AverageDamagePerAttack =
                DamagePerHit * DefendTable.Hit +
                DamagePerCrit * DefendTable.Critical +
                DamagePerBlock * DefendTable.Block;

            DamagePerSecond     = AverageDamagePerAttack / attackSpeed;
            Mitigation          = (1.0f - (DamagePerSecond / baseDamagePerSecond));
            TankPoints          = (Stats.Health / (1.0f - Mitigation));
            EffectiveHealth     = (Stats.Health / guaranteedReduction);
            GuaranteedReduction = (1.0f - guaranteedReduction);

            double a = Convert.ToDouble(DefendTable.AnyMiss);
            double h = Convert.ToDouble(Stats.Health);
            double H = Convert.ToDouble(AverageDamagePerHit);
            double s = Convert.ToDouble(ParryModel.BossAttackSpeed / Options.BossAttackSpeed);

            BurstTime = Convert.ToSingle((1.0d / a) * ((1.0d / Math.Pow(1.0d - a, h / H)) - 1.0d) * s);
        }
Esempio n. 2
0
        public void Calculate()
        {
            float armorReduction      = (1.0f - Lookup.ArmorReduction(Player));
            float guaranteedReduction = (1.0f - Lookup.StanceDamageReduction(Player)) * armorReduction;
            float baseDamagePerSecond = Player.BossOpts.DefaultMeleeAttack.DamagePerHit / Player.BossOpts.DefaultMeleeAttack.AttackSpeed;
            float baseAttack          = Player.BossOpts.DefaultMeleeAttack.DamagePerHit * guaranteedReduction;

            DamagePerHit       = baseAttack * (1.0f - Player.Stats.PhysicalDamageTakenReductionMultiplier) * (1.0f - Player.Stats.BossPhysicalDamageDealtReductionMultiplier);
            DamagePerCrit      = DamagePerHit * 2.0f;
            DamagePerBlock     = DamagePerHit * (1.0f - (0.3f + Player.Stats.BonusBlockValueMultiplier));
            DamagePerCritBlock = DamagePerHit * (1.0f - ((0.3f + Player.Stats.BonusBlockValueMultiplier) * 2.0f));

            AverageDamagePerHit =
                DamagePerHit * (DefendTable.Hit / DefendTable.AnyHit) +
                DamagePerCrit * (DefendTable.Critical / DefendTable.AnyHit) +
                DamagePerBlock * (DefendTable.Block / DefendTable.AnyHit) +
                DamagePerCritBlock * (DefendTable.CriticalBlock / DefendTable.AnyHit);
            AverageDamagePerAttack =
                DamagePerHit * DefendTable.Hit +
                DamagePerCrit * DefendTable.Critical +
                DamagePerBlock * DefendTable.Block +
                DamagePerCritBlock * DefendTable.CriticalBlock;

            DamagePerSecond     = AverageDamagePerAttack / AttackSpeed;
            Mitigation          = (1.0f - (DamagePerSecond / baseDamagePerSecond));
            EffectiveHealth     = (Player.Stats.Health / guaranteedReduction);
            GuaranteedReduction = (1.0f - guaranteedReduction);

            double a = Convert.ToDouble(DefendTable.AnyMiss);
            double h = Convert.ToDouble(Player.Stats.Health);
            double H = Convert.ToDouble(AverageDamagePerHit);
            double s = Convert.ToDouble(AttackSpeed);

            BurstTime = Convert.ToSingle((1.0d / a) * ((1.0d / Math.Pow(1.0d - a, h / H)) - 1.0d) * s);
        }