Пример #1
0
        public override void Calcluate(Stats stats, Character character)
        {
            base.Calcluate(stats, character);

            // Improved Chain Heal talent:

            float impCH  = 1.0f;
            int   points = CalculationsRestoSham.GetTalentPoints("Improved Chain Heal", "Restoration", character.Talents);

            impCH = 1f + .1f * points;

            // Skyshatter 4-piece bonus:

            impCH += stats.CHHealIncrease;

            // Now compute the chain heal numbers:

            _targetHeals[0] = this.AverageHealed * impCH;
            _targetHeals[1] = _targetHeals[0] / 2;
            _targetHeals[2] = _targetHeals[1] / 2;

            CalculationOptionsRestoSham options = character.CalculationOptions as CalculationOptionsRestoSham;

            this.AverageHealed = _targetHeals[0];
            if (options.NumCHTargets > 1)
            {
                this.AverageHealed += _targetHeals[1];
            }
            if (options.NumCHTargets == 3)
            {
                this.AverageHealed += _targetHeals[2];
            }
        }
Пример #2
0
        public override void Calcluate(Stats stats, Character character)
        {
            base.Calcluate(stats, character);

            // Healing Way bonus (assumes full stack) if spec'd for Healing Way:

            int points = CalculationsRestoSham.GetTalentPoints("Healing Way", "Restoration", character.Talents);

            HealingWay = (points > 0 ? AverageHealed * .18f : 0f);

            // Adjust cast time based on Improved Healing Wave talent:

            points = CalculationsRestoSham.GetTalentPoints("Improved Healing Wave", "Restoration", character.Talents);
            float baseTime = SpellRanks[Rank].CastTime - (.1f * points);

            CastTime = baseTime / (1 + (stats.SpellHasteRating / 1570));
        }
Пример #3
0
        public static ICollection <ComparisonCalculationBase> CalculateSequencesChart(Character character, CalculationsRestoSham baseCalculations)
        {
            List <ComparisonCalculationBase> list            = new List <ComparisonCalculationBase>();
            CalculationOptionsRestoSham      originalOptions = character.CalculationOptions as CalculationOptionsRestoSham;

            if (originalOptions == null)
            {
                originalOptions = new CalculationOptionsRestoSham();
            }

            CalculationOptionsRestoSham opts = originalOptions;

            string[] styles = new string[] { "CH Spam", "HW Spam", "LHW Spam", "RT+HW", "RT+CH", "RT+LHW" };
            string[] descs  = new string[] {
                "All chain heal, all the time.  \nMana available for use per minute added to sustained.",
                "All healing wave, all the time  \nMana available for use per minute added to sustained.",
                "All lesser healing wave, all the time  \nMana available for use per minute added to sustained.",
                "Riptide + Healing Wave.  \nMana available for use per minute added to sustained.",
                "Riptide + Chain Heal.  \nMana available for use per minute added to sustained.",
                "Riptide + Lesser Healing Wave.\nMana available for use per minute added to sustained."
            };
            for (int i = 0; i < styles.Length; i++)
            {
                opts.SustStyle  = styles[i];
                opts.BurstStyle = styles[i];
                character.CalculationOptions = opts;
                CharacterCalculationsRestoSham statCalc = (CharacterCalculationsRestoSham)baseCalculations.GetCharacterCalculations(character);

                // normalize the mana a bit to make a better chart
                float mana = statCalc.ManaUsed / (opts.FightLength);

                ComparisonCalculationRestoSham hsComp = new ComparisonCalculationRestoSham(styles[i]);
                hsComp.OverallPoints = statCalc.BurstHPS + statCalc.SustainedHPS + mana;
                hsComp.SubPoints     = new float[] { statCalc.BurstHPS, statCalc.SustainedHPS + mana, 0f };
                hsComp.Description   = descs[i];
                list.Add(hsComp);
            }

            return(list);
        }
Пример #4
0
        public static ICollection <ComparisonCalculationBase> CalculateMAPSChart(Character character, CalculationsRestoSham baseCalculations)
        {
            List <ComparisonCalculationBase> list = new List <ComparisonCalculationBase>();
            CharacterCalculationsRestoSham   calc = baseCalculations.GetCharacterCalculations(character) as CharacterCalculationsRestoSham;

            if (calc == null)
            {
                calc = new CharacterCalculationsRestoSham();
            }

            StatRelativeWeight[] stats = new StatRelativeWeight[] {
                new StatRelativeWeight("Intellect", new Stats()
                {
                    Intellect = 10f
                }),
                new StatRelativeWeight("Haste Rating", new Stats()
                {
                    HasteRating = 10f
                }),
                new StatRelativeWeight("Spellpower", new Stats()
                {
                    SpellPower = 10f
                }),
                new StatRelativeWeight("MP5", new Stats()
                {
                    Mp5 = 10f
                }),
                new StatRelativeWeight("Crit Rating", new Stats()
                {
                    CritRating = 10f
                })
            };

            // Get the percentage total healing is changed by a change in a single stat:
            foreach (StatRelativeWeight weight in stats)
            {
                CharacterCalculationsRestoSham statCalc = (CharacterCalculationsRestoSham)baseCalculations.GetCharacterCalculations(character, null, weight.Stat);
                weight.Change = (statCalc.MAPS - calc.MAPS);
            }

            // Create the chart data points:
            foreach (StatRelativeWeight weight in stats)
            {
                ComparisonCalculationRestoSham comp = new ComparisonCalculationRestoSham(weight.Name);
                comp.OverallPoints = weight.Change;
                comp.SubPoints     = new float[] { 0f, weight.Change, 0f };
                comp.Description   = string.Format("If you added 10 more {0}.", weight.Name);
                list.Add(comp);
            }

            return(list);
        }
Пример #5
0
 internal ReferenceCharacter(CalculationsRestoSham calculationsObject)
 {
     _Calculations = calculationsObject;
 }
Пример #6
0
        /// <summary>
        /// Given some character statistics, and some fight criteria, compute various performance aspects
        ///  of this spell.
        /// </summary>
        public virtual void Calcluate(Stats stats, Character character)
        {
            CalculationOptionsRestoSham options = character.CalculationOptions as CalculationOptionsRestoSham;

            // Base heal amount:

            float baseHeal = (SpellRanks[Rank].MaxHeal + SpellRanks[Rank].MinHeal) / 2;

            if (options.Totems[HealType].ID != 0 && options.Totems[HealType].Effect == TotemEffect.BaseHeal)
            {
                baseHeal += options.Totems[HealType].Amount;
            }

            // Bonus amount:

            float bonus = stats.Healing;

            if (options.Totems[HealType].ID != 0 && options.Totems[HealType].Effect == TotemEffect.BonusHeal)
            {
                bonus += options.Totems[HealType].Amount;
            }
            bonus *= SpellCoefficient;
            if (Rank < 70)
            {
                bonus *= DownrankCoefficient;
            }

            // Crit rate:

            float crit = .022f + ((stats.Intellect / 80f) / 100) + ((stats.SpellCritRating / 22.08f) / 100) +
                         stats.SpellCrit;
            float critRate = 1 + 0.5f * crit;

            // Purification talent:

            float purificationBonus = 1.0f;
            int   points            = CalculationsRestoSham.GetTalentPoints("Purification", "Restoration", character.Talents);

            purificationBonus = 1f + .02f * points;

            // Now get total average heal:

            AverageHealed = (baseHeal + bonus) * critRate * purificationBonus;

            // Compute spell cast time:

            CastTime = SpellRanks[Rank].CastTime / (1 + (stats.SpellHasteRating / 1570));

            // Compute mana cost:

            points = CalculationsRestoSham.GetTalentPoints("Tidal Focus", "Restoration", character.Talents);
            float f = 0.0f;

            if (options.Totems[HealType].ID != 0 && options.Totems[HealType].Effect == TotemEffect.ReduceMana)
            {
                f = options.Totems[HealType].Amount;
            }

            if (HealType == HealSpells.ChainHeal)
            {
                f += stats.CHManaReduction * SpellRanks[Rank].Mana;
            }
            if (HealType == HealSpells.LesserHealingWave)
            {
                f += stats.LHWManaReduction * SpellRanks[Rank].Mana;
            }

            ManaCost = (SpellRanks[Rank].Mana - f) * (1 - .01f * points);
        }