Ejemplo n.º 1
0
        public static void solve(CharacterCalculationsShadowPriest calculatedStats, CalculationOptionsShadowPriest calcOpts, BossOptions bossOpts)
        {
            Stats         stats     = calculatedStats.BasicStats;
            Character     character = calculatedStats.LocalCharacter;
            PriestTalents talents   = character.PriestTalents;

            Solver   e;
            Rotation rot;

            float FightDuration = bossOpts.BerserkTimer;

            // WITHOUT PROCS
            e   = new Solver(stats, new Stats {
            }, talents, calcOpts);
            rot = e.getPriorityRotation();

            calculatedStats.DpsPoints      = rot.DPS;
            calculatedStats.SurvivalPoints = stats.Stamina / FightDuration; //TODO: meaningful surv points

            calculatedStats.CombatStats = stats.Clone();

            calculatedStats.DevouringPlauge = rot.DP;
            calculatedStats.MindBlast       = rot.MB;
            calculatedStats.MindFlay        = rot.MF;
            calculatedStats.MindSpike       = rot.Spike;
            //calculatedStats.PowerWordShield = rot.shield;
            calculatedStats.ShadowFiend     = rot.Fiend;
            calculatedStats.ShadowWordDeath = rot.SWD;
            calculatedStats.ShadowWordPain  = rot.SWP;
            calculatedStats.VampiricTouch   = rot.VT;

            calculatedStats.Rotation        = rot.ToString();
            calculatedStats.RotationDetails = rot.ToDetailedString();
        }
Ejemplo n.º 2
0
        public static void solve(CharacterCalculationsShadowPriest calculatedStats, CalculationOptionsShadowPriest calcOpts, BossOptions bossOpts)
        {
            Stats stats = calculatedStats.BasicStats;
            Character character = calculatedStats.LocalCharacter;
            PriestTalents talents = character.PriestTalents;

            Solver e;
            Rotation rot;

            float FightDuration = bossOpts.BerserkTimer;

            // WITHOUT PROCS
            e = new Solver(stats, new Stats{}, talents, calcOpts);
            rot = e.getPriorityRotation();

            calculatedStats.DpsPoints = rot.DPS;
            calculatedStats.SurvivalPoints = stats.Stamina / FightDuration; //TODO: meaningful surv points

            calculatedStats.CombatStats = stats.Clone();

            calculatedStats.DevouringPlauge = rot.DP;
            calculatedStats.MindBlast = rot.MB;
            calculatedStats.MindFlay = rot.MF;
            calculatedStats.MindSpike = rot.Spike;
            //calculatedStats.PowerWordShield = rot.shield;
            calculatedStats.ShadowFiend = rot.Fiend;
            calculatedStats.ShadowWordDeath = rot.SWD;
            calculatedStats.ShadowWordPain = rot.SWP;
            calculatedStats.VampiricTouch = rot.VT;

            calculatedStats.Rotation = rot.ToString();
            calculatedStats.RotationDetails = rot.ToDetailedString();

        }
Ejemplo n.º 3
0
        public override CharacterCalculationsBase GetCharacterCalculations(Character character, Item additionalItem, bool referenceCalculation, bool significantChange, bool needsDisplayCalculations)
        {
            // First things first, we need to ensure that we aren't using bad data
            CharacterCalculationsShadowPriest calc = new CharacterCalculationsShadowPriest();

            if (character == null)
            {
                return(calc);
            }

            var stats = GetCharacterStats(character, additionalItem);

            var results = new Dictionary <string, string>();

            BaseCharacterStatCalculations baseCalculations = new BaseCharacterStatCalculations(stats, _calculationOptions, character.BossOptions, character.PriestTalents);

            baseCalculations.Calculate(results);


            stats.SpellPower += _calculationOptions.InnerFire ? 532 : 0;

            BurstCalculations burstCalculations = new BurstCalculations(stats, _calculationOptions, character.BossOptions, character.PriestTalents);

            burstCalculations.Calculate(results);

            calc.BurstPoints = burstCalculations.Points;

            foreach (KeyValuePair <string, string> keyValuePair in results)
            {
                calc.AddResult(keyValuePair.Key, keyValuePair.Value);
            }

            CalculationOptionsShadowPriest calcOpts = character.CalculationOptions as CalculationOptionsShadowPriest;

            if (calcOpts == null)
            {
                return(calc);
            }

            BossOptions bossOpts = character.BossOptions;

            calc.BasicStats     = stats;
            calc.LocalCharacter = character;

            Solver.solve(calc, calcOpts, bossOpts);

            return(calc);
        }
Ejemplo n.º 4
0
        public override CharacterCalculationsBase GetCharacterCalculations(Character character, Item additionalItem)
        {
            Stats stats     = GetCharacterStats(character, additionalItem);
            Stats statsRace = GetRaceStats(character);
            CharacterCalculationsShadowPriest calculatedStats    = new CharacterCalculationsShadowPriest();
            CalculationOptionsShadowPriest    calculationOptions = character.CalculationOptions as CalculationOptionsShadowPriest;

            calculatedStats.BasicStats         = stats;
            calculatedStats.Talents            = character.Talents;
            calculatedStats.CalculationOptions = calculationOptions;

            calculatedStats.BasicStats.Spirit = statsRace.Spirit + (calculatedStats.BasicStats.Spirit - statsRace.Spirit) * (1 + character.Talents.GetTalent("Spirit of Redemption").PointsInvested * 0.05f);

            calculatedStats.SpiritRegen = (float)Math.Floor(5 * 0.0093271 * calculatedStats.BasicStats.Spirit * Math.Sqrt(calculatedStats.BasicStats.Intellect));
            calculatedStats.RegenInFSR  = (float)Math.Floor((calculatedStats.BasicStats.Mp5 + character.Talents.GetTalent("Meditation").PointsInvested * 0.1f * calculatedStats.SpiritRegen * (1 + calculatedStats.BasicStats.SpellCombatManaRegeneration)));
            calculatedStats.RegenOutFSR = calculatedStats.BasicStats.Mp5 + calculatedStats.SpiritRegen;

            calculatedStats.BasicStats.SpellCrit = (float)Math.Round((calculatedStats.BasicStats.Intellect / 80) +
                                                                     (calculatedStats.BasicStats.SpellCritRating / 22.08) + 1.85, 2);

            calculatedStats.BasicStats.SpellDamageRating += calculatedStats.BasicStats.Spirit * character.Talents.GetTalent("Spiritual Guidance").PointsInvested * 0.05f;

            Solver solver = new Solver(stats, character.Talents, calculationOptions);

            solver.Calculate();

            calculatedStats.DpsPoints = solver.OverallDps;
            //int hitcap = GetSpellHitCap(character.Talents);
            //calculatedStats.DpsPoints = calculatedStats.BasicStats.SpellDamageRating + calculatedStats.BasicStats.SpellShadowDamageRating
            //    + (calculatedStats.BasicStats.SpellHasteRating)
            //    + (calculatedStats.BasicStats.SpellCritRating / 5.57f)
            //    + (calculatedStats.BasicStats.Spirit * 0.11f)
            //    + (calculatedStats.BasicStats.Intellect * 0.055f)
            //    - (calculatedStats.BasicStats.SpellHitRating < hitcap ? (hitcap - calculatedStats.BasicStats.SpellHitRating) * 1.364f: 0);

            calculatedStats.SurvivalPoints = calculatedStats.BasicStats.Stamina / 10;
            calculatedStats.OverallPoints  = calculatedStats.DpsPoints + calculatedStats.SurvivalPoints;

            return(calculatedStats);
        }
        public override CharacterCalculationsBase GetCharacterCalculations(Character character, Item additionalItem, bool referenceCalculation, bool significantChange, bool needsDisplayCalculations)
        {
            // First things first, we need to ensure that we aren't using bad data
            CharacterCalculationsShadowPriest calc = new CharacterCalculationsShadowPriest();
            if (character == null)
            {
                return calc;
            }

            var stats = GetCharacterStats(character, additionalItem);

            var results = new Dictionary<string, string>();

            BaseCharacterStatCalculations baseCalculations = new BaseCharacterStatCalculations(stats, _calculationOptions, character.BossOptions, character.PriestTalents);
            baseCalculations.Calculate(results);


            stats.SpellPower += _calculationOptions.InnerFire ? 532 : 0;

            BurstCalculations burstCalculations = new BurstCalculations(stats, _calculationOptions, character.BossOptions, character.PriestTalents);
            burstCalculations.Calculate(results);
            
            calc.BurstPoints = burstCalculations.Points;

            foreach (KeyValuePair<string, string> keyValuePair in results)
            {
                calc.AddResult(keyValuePair.Key, keyValuePair.Value);
            }

            CalculationOptionsShadowPriest calcOpts = character.CalculationOptions as CalculationOptionsShadowPriest;
            if (calcOpts == null)
            {
                return calc;
            }
            
            BossOptions bossOpts = character.BossOptions;

            calc.BasicStats = stats;
            calc.LocalCharacter = character;

            Solver.solve(calc, calcOpts, bossOpts);

            return calc;
        }