private AttackResult CastAttack(double addedTime = 0, double addedDamage = 0)
        {
            AttackResult res = new AttackResult();

            results.NumActions++;
            CurrentSimulatedTime += addedTime;
            double damage = TotalDPS * AttackSpeed + addedDamage;

            if (FuriousHowlActive)
            {
                damage           += 51;
                FuriousHowlActive = false;
            }

            damage *= DamageMult;
            if (addedDamage == 120)
            {
                damage *= MultiShotDamage;
            }

            if (IsHit())
            {
                if (IsCritical())
                {
                    damage *= CriticalStrikeMultiplier;
                    res.WasCriticalStrike = true;
                    results.NumCrits++;
                }
                res.Damage           = damage;
                results.TotalDamage += damage;
                MobHealth           -= damage;
            }
            else
            {
                results.NumMisses++;
            }
            return(res);
        }
        private AttackResult DecideAndPerform()
        {
            AttackResult res = new AttackResult();

            if (ImpHawk && !HawkActive)
            {
                Random rand = new Random();
                if (rand.NextDouble() <= 0.05)
                {
                    DecreasedAttackSpeed -= 0.3;
                    HawkActive            = true;

                    PreviousHawk = CurrentSimulatedTime;
                }
            }

            if (ImpHawk && HawkActive)
            {
                if (CurrentSimulatedTime - PreviousHawk >= 12)
                {
                    DecreasedAttackSpeed += 0.3;
                    HawkActive            = false;
                }
            }

            if ((CurrentSimulatedTime - PreviousFuriousHowl) >= 10)
            {
                FuriousHowlActive   = true;
                PreviousFuriousHowl = CurrentSimulatedTime;
            }

            if (UseCDs)
            {
                if ((CurrentSimulatedTime - PreviousRapidFire) >= 300)
                {
                    CastRapidFire();
                }

                if (((CurrentSimulatedTime - PreviousBerserk) >= 180) && PlayerData.IsTroll)
                {
                    CastBerserk();
                }
            }

            if (((CurrentSimulatedTime - PreviousRapidFire) >= 15) && RapidFireActive)
            {
                DecreasedAttackSpeed += 0.4;
                RapidFireActive       = false;
            }

            if (((CurrentSimulatedTime - PreviousBerserk) >= 10) && BerserkActive)
            {
                DecreasedAttackSpeed += 0.1;
                BerserkActive         = false;
            }

            if ((CurrentSimulatedTime - PreviousAimedShot) >= 6)
            {
                res = CastAttack(3, 600);
            }
            else if ((CurrentSimulatedTime - PreviousMultiShot) >= 10)
            {
                res = CastAttack(AttackSpeed, 120);
            }
            else
            {
                res = CastAttack(AttackSpeed);
            }

            results.TimeTaken = CurrentSimulatedTime;

            return(res);
        }