当前位置: 首页>>代码示例>>C#>>正文


C# Stats.SpecialEffects方法代码示例

本文整理汇总了C#中Stats.SpecialEffects方法的典型用法代码示例。如果您正苦于以下问题:C# Stats.SpecialEffects方法的具体用法?C# Stats.SpecialEffects怎么用?C# Stats.SpecialEffects使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Stats的用法示例。


在下文中一共展示了Stats.SpecialEffects方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: HasSurvivabilityStats

 private bool HasSurvivabilityStats(Stats stats)
 {
     // Health Base
     if (stats.Stamina != 0) { return true; }
     if (stats.Health != 0) { return true; }
     if (stats.BonusStaminaMultiplier != 0) { return true; }
     if (stats.BonusHealthMultiplier != 0) { return true; }
     // Health Regen
     if (stats.HealthRestore != 0) { return true; }
     if (stats.HealthRestoreFromMaxHealth != 0) { return true; }
     // Armor
     if (stats.Armor != 0) { return true; }
     if (stats.BonusArmor != 0) { return true; }
     if (stats.BaseArmorMultiplier != 0) { return true; }
     if (stats.BonusArmorMultiplier != 0) { return true; }
     // Multipliers
     if (stats.DamageTakenReductionMultiplier != 0) { return true; }
     // Target Debuffs
     if (stats.BossPhysicalDamageDealtReductionMultiplier != 0) { return true; }
     // Special Effects
     foreach (SpecialEffect effect in stats.SpecialEffects())
     {
         if (RelevantTriggers.Contains(effect.Trigger) && HasSurvivabilityStats(effect.Stats))
         {
             return true;
         }
     }
     return false;
 }
开发者ID:LucasPeacecraft,项目名称:rawr,代码行数:29,代码来源:CalculationsHunter.cs

示例2: GetRelevantStats

        public override Stats GetRelevantStats(Stats stats)
        {
            Stats s = new Stats()
            {
                Armor = stats.Armor,
                BonusArmor = stats.BonusArmor,
                Stamina = stats.Stamina,
                Agility = stats.Agility,
                DodgeRating = stats.DodgeRating,
                MasteryRating = stats.MasteryRating,
                Resilience = stats.Resilience,
                BonusAgilityMultiplier = stats.BonusAgilityMultiplier,
                BaseArmorMultiplier = stats.BaseArmorMultiplier,
                BonusArmorMultiplier = stats.BonusArmorMultiplier,
                BonusStaminaMultiplier = stats.BonusStaminaMultiplier,
                BonusStrengthMultiplier = stats.BonusStrengthMultiplier,
                Health = stats.Health,
                BattlemasterHealthProc = stats.BattlemasterHealthProc,
                BonusHealthMultiplier = stats.BonusHealthMultiplier,
                Miss = stats.Miss,
                CritChanceReduction = stats.CritChanceReduction,
                ArcaneResistance = stats.ArcaneResistance,
                NatureResistance = stats.NatureResistance,
                FireResistance = stats.FireResistance,
                FrostResistance = stats.FrostResistance,
                ShadowResistance = stats.ShadowResistance,
                ArcaneResistanceBuff = stats.ArcaneResistanceBuff,
                NatureResistanceBuff = stats.NatureResistanceBuff,
                FireResistanceBuff = stats.FireResistanceBuff,
                FrostResistanceBuff = stats.FrostResistanceBuff,
                ShadowResistanceBuff = stats.ShadowResistanceBuff,
                HighestStat = stats.HighestStat,
                Paragon = stats.Paragon,
                Dodge = stats.Dodge,

                Strength = stats.Strength,
                AttackPower = stats.AttackPower,
                CritRating = stats.CritRating,
                PhysicalCrit = stats.PhysicalCrit,
                HitRating = stats.HitRating,
                PhysicalHit = stats.PhysicalHit,
                MoteOfAnger = stats.MoteOfAnger,
                HasteRating = stats.HasteRating,
                PhysicalHaste = stats.PhysicalHaste,
                ExpertiseRating = stats.ExpertiseRating,
                ArmorPenetration = stats.ArmorPenetration,
                TargetArmorReduction = stats.TargetArmorReduction,
                WeaponDamage = stats.WeaponDamage,
                BonusCritDamageMultiplier = stats.BonusCritDamageMultiplier,
                BonusDamageMultiplierLacerate = stats.BonusDamageMultiplierLacerate,
                BonusAttackPowerMultiplier = stats.BonusAttackPowerMultiplier,
                BonusDamageMultiplier = stats.BonusDamageMultiplier,
                BonusWhiteDamageMultiplier = stats.BonusWhiteDamageMultiplier,
                DamageTakenReductionMultiplier = stats.DamageTakenReductionMultiplier,
                BossPhysicalDamageDealtReductionMultiplier = stats.BossPhysicalDamageDealtReductionMultiplier,
                BossAttackSpeedReductionMultiplier = stats.BossAttackSpeedReductionMultiplier,
                SpellCrit = stats.SpellCrit,
                SpellCritOnTarget = stats.SpellCritOnTarget,
                //Intellect = stats.Intellect,
                ArcaneDamage = stats.ArcaneDamage,
                BonusArcaneDamageMultiplier = stats.BonusArcaneDamageMultiplier,
                FireDamage = stats.FireDamage,
                BonusFireDamageMultiplier = stats.BonusFireDamageMultiplier,
                FrostDamage = stats.FrostDamage,
                BonusFrostDamageMultiplier = stats.BonusFrostDamageMultiplier,
                NatureDamage = stats.NatureDamage,
                BonusNatureDamageMultiplier = stats.BonusNatureDamageMultiplier,
                ShadowDamage = stats.ShadowDamage,
                BonusShadowDamageMultiplier = stats.BonusShadowDamageMultiplier,
                PhysicalDamage = stats.PhysicalDamage,
                BonusPhysicalDamageMultiplier = stats.BonusPhysicalDamageMultiplier,
                SpellHit = stats.SpellHit,
                ThreatIncreaseMultiplier = stats.ThreatIncreaseMultiplier,
                DamageAbsorbed = stats.DamageAbsorbed,
                Healed = stats.Healed,
                HealthRestore = stats.HealthRestore,
                HealthRestoreFromMaxHealth = stats.HealthRestoreFromMaxHealth,
                BonusHealingReceived = stats.BonusHealingReceived,
                //
                MovementSpeed = stats.MovementSpeed,
                FearDurReduc = stats.FearDurReduc,
                StunDurReduc = stats.StunDurReduc,
                SnareRootDurReduc = stats.SnareRootDurReduc,
            };
            foreach (SpecialEffect effect in stats.SpecialEffects())
            {
                if (effect.Trigger == Trigger.Use || effect.Trigger == Trigger.MeleeCrit || effect.Trigger == Trigger.MeleeHit || effect.Trigger == Trigger.MeleeAttack
                || effect.Trigger == Trigger.PhysicalCrit || effect.Trigger == Trigger.PhysicalHit || effect.Trigger == Trigger.PhysicalAttack || effect.Trigger == Trigger.DoTTick
                || effect.Trigger == Trigger.DamageDone || effect.Trigger == Trigger.MangleBearHit || effect.Trigger == Trigger.LacerateTick
                || effect.Trigger == Trigger.SwipeBearOrLacerateHit || effect.Trigger == Trigger.DamageTaken || effect.Trigger == Trigger.DamageTakenPhysical
                || effect.Trigger == Trigger.MangleCatOrShredOrInfectedWoundsHit || effect.Trigger == Trigger.DamageOrHealingDone
                || effect.Trigger == Trigger.DamageTakenPutsMeBelow35PercHealth || effect.Trigger == Trigger.DamageTakenPutsMeBelow50PercHealth)
                {
                    if (HasRelevantStats(effect.Stats))
                    {
                        s.AddSpecialEffect(effect);
                    }
                }
            }
            return s;
//.........这里部分代码省略.........
开发者ID:LucasPeacecraft,项目名称:rawr,代码行数:101,代码来源:CalculationsBear.cs

示例3: GetRelevantStats


//.........这里部分代码省略.........
                ExpertiseRating = stats.ExpertiseRating,
                Expertise = stats.Expertise,
                HasteRating = stats.HasteRating,
                WeaponDamage = stats.WeaponDamage,
                PhysicalCrit = stats.PhysicalCrit,
                PhysicalHaste = stats.PhysicalHaste,
                PhysicalHit = stats.PhysicalHit,
                SpellHit = stats.SpellHit,

                Healed = stats.Healed,
                HealthRestore = stats.HealthRestore,
                HealthRestoreFromMaxHealth = stats.HealthRestoreFromMaxHealth,
                Hp5 = stats.Hp5,

                BonusHealthMultiplier = stats.BonusHealthMultiplier,
                BonusStrengthMultiplier = stats.BonusStrengthMultiplier,
                BonusStaminaMultiplier = stats.BonusStaminaMultiplier,
                BonusAgilityMultiplier = stats.BonusAgilityMultiplier,
                BonusAttackPowerMultiplier = stats.BonusAttackPowerMultiplier,
                BonusCritDamageMultiplier = stats.BonusCritDamageMultiplier,
                BonusSpellCritDamageMultiplier = stats.BonusSpellCritDamageMultiplier,
                BonusDamageMultiplier = stats.BonusDamageMultiplier,
                BonusPhysicalDamageMultiplier = stats.BonusPhysicalDamageMultiplier,
                BaseArmorMultiplier = stats.BaseArmorMultiplier,
                BonusArmorMultiplier = stats.BonusArmorMultiplier,
                DamageTakenReductionMultiplier = stats.DamageTakenReductionMultiplier,
                SpellDamageTakenReductionMultiplier = stats.SpellDamageTakenReductionMultiplier,
                PhysicalDamageTakenReductionMultiplier = stats.PhysicalDamageTakenReductionMultiplier,
                BossPhysicalDamageDealtReductionMultiplier = stats.BossPhysicalDamageDealtReductionMultiplier,
                BonusWhiteDamageMultiplier = stats.BonusWhiteDamageMultiplier,

                ThreatIncreaseMultiplier = stats.ThreatIncreaseMultiplier,
                ThreatReductionMultiplier = stats.ThreatReductionMultiplier,

                // General Damage Mods.
                BonusShadowDamageMultiplier = stats.BonusShadowDamageMultiplier,
                BonusFrostDamageMultiplier = stats.BonusFrostDamageMultiplier,
                BonusDiseaseDamageMultiplier = stats.BonusDiseaseDamageMultiplier,

                // Ability mods.
                BonusDamageBloodStrike = stats.BonusDamageBloodStrike,
                BonusDamageDeathCoil = stats.BonusDamageDeathCoil,
                BonusDamageDeathStrike = stats.BonusDamageDeathStrike,
                BonusDamageFrostStrike = stats.BonusDamageFrostStrike,
                BonusDamageHeartStrike = stats.BonusDamageHeartStrike,
                BonusDamageIcyTouch = stats.BonusDamageIcyTouch,
                BonusDamageObliterate = stats.BonusDamageObliterate,
                BonusDamageScourgeStrike = stats.BonusDamageScourgeStrike,
                BonusFrostWeaponDamage = stats.BonusFrostWeaponDamage,

                BonusCritChanceDeathCoil = stats.BonusCritChanceDeathCoil,
                BonusCritChanceFrostStrike = stats.BonusCritChanceFrostStrike,
                BonusCritChanceObliterate = stats.BonusCritChanceObliterate,

                AntiMagicShellDamageReduction = stats.AntiMagicShellDamageReduction,

                BonusHealingReceived = stats.BonusHealingReceived,
                RPp5 = stats.RPp5,

                // Resistances
                ArcaneResistance = stats.ArcaneResistance,
                FireResistance = stats.FireResistance,
                FrostResistance = stats.FrostResistance,
                NatureResistance = stats.NatureResistance,
                ShadowResistance = stats.ShadowResistance,
                ArcaneResistanceBuff = stats.ArcaneResistanceBuff,
                FireResistanceBuff = stats.FireResistanceBuff,
                FrostResistanceBuff = stats.FrostResistanceBuff,
                NatureResistanceBuff = stats.NatureResistanceBuff,
                ShadowResistanceBuff = stats.ShadowResistanceBuff,

                // Damage Procs
                ArcaneDamage = stats.ArcaneDamage,
                FireDamage = stats.FireDamage,
                FrostDamage = stats.FrostDamage,
                ShadowDamage = stats.ShadowDamage,
                HolyDamage = stats.HolyDamage,
                NatureDamage = stats.NatureDamage,

                SnareRootDurReduc = stats.SnareRootDurReduc,
                FearDurReduc = stats.FearDurReduc,
                StunDurReduc = stats.StunDurReduc,
                MovementSpeed = stats.MovementSpeed,
                TargetArmorReduction = stats.TargetArmorReduction,
                BossAttackSpeedReductionMultiplier = stats.BossAttackSpeedReductionMultiplier,
            };

            // Also bringing in the trigger events from DPSDK - 
            // Since I'm going to move the +Def bonus for the Sigil of the Unfaltering Knight
            // To a special effect.  Also there are alot of OnUse and OnEquip special effects
            // That probably aren't being taken into effect.
            foreach (SpecialEffect effect in stats.SpecialEffects())
            {
                if (HasRelevantStats(effect.Stats))
                {
                    s.AddSpecialEffect(effect);
                }
            }
            return s;
        }
开发者ID:LucasPeacecraft,项目名称:rawr,代码行数:101,代码来源:CalculationsTankDK.cs

示例4: GetRelevantStats

        public override Stats GetRelevantStats(Stats stats)
        {
            Stats s = new Stats {
                SpellPower = stats.SpellPower,
                Intellect = stats.Intellect,
                HitRating = stats.HitRating,
                SpellHit = stats.SpellHit,
                HasteRating = stats.HasteRating,
                SpellHaste = stats.SpellHaste,
                CritRating = stats.CritRating,
                SpellCrit = stats.SpellCrit,
                SpellCritOnTarget = stats.SpellCritOnTarget,
                MasteryRating = stats.MasteryRating,

                ShadowDamage = stats.ShadowDamage,
                SpellShadowDamageRating = stats.SpellShadowDamageRating,
                FireDamage = stats.FireDamage,
                SpellFireDamageRating = stats.SpellFireDamageRating,

                BonusIntellectMultiplier = stats.BonusIntellectMultiplier,
                BonusSpellCritMultiplier = stats.BonusSpellCritMultiplier,
                BonusDamageMultiplier = stats.BonusDamageMultiplier,
                BonusShadowDamageMultiplier = stats.BonusShadowDamageMultiplier,
                BonusFireDamageMultiplier = stats.BonusFireDamageMultiplier,

                BonusHealthMultiplier = stats.BonusHealthMultiplier,
                BonusSpellPowerMultiplier = stats.BonusSpellPowerMultiplier,
                BonusManaMultiplier = stats.BonusManaMultiplier,

                CritBonusDamage = stats.CritBonusDamage,

                Warlock2T7 = stats.Warlock2T7,
                Warlock4T7 = stats.Warlock4T7,
                Warlock2T8 = stats.Warlock2T8,
                Warlock4T8 = stats.Warlock4T8,
                Warlock2T9 = stats.Warlock2T9,
                Warlock4T9 = stats.Warlock4T9,
                Warlock2T10 = stats.Warlock2T10,
                Warlock4T10 = stats.Warlock4T10,
                Warlock2T11 = stats.Warlock2T11,
                Warlock4T11 = stats.Warlock4T11,

                Stamina = stats.Stamina,
                Health = stats.Health,
                Mana = stats.Mana,
                Mp5 = stats.Mp5,

                HighestStat = stats.HighestStat,                                    //trinket - darkmoon card: greatness
                ManaRestoreFromBaseManaPPM = stats.ManaRestoreFromBaseManaPPM,      //paladin buff: judgement of wisdom
                ManaRestoreFromMaxManaPerSecond = stats.ManaRestoreFromMaxManaPerSecond,    //replenishment
                BonusManaPotion = stats.BonusManaPotion,                            //triggered when a mana pot is consumed
                ThreatReductionMultiplier = stats.ThreatReductionMultiplier,        //Bracing Eathsiege Diamond (metagem) effect
                ManaRestore = stats.ManaRestore,                                    //quite a few items that restore mana on spell cast or crit. Also used to model replenishment.
                SpellsManaReduction = stats.SpellsManaReduction,                    //spark of hope -> http://www.wowhead.com/?item=45703
            };

            foreach (SpecialEffect effect in stats.SpecialEffects())
            {
                if (IsSupportedEffect(effect))
                {
                    s.AddSpecialEffect(effect);
                }
            }
            return s;
        }
开发者ID:ArPharazon,项目名称:Rawr.WarlockSim,代码行数:65,代码来源:CalculationsWarlock-updated.cs

示例5: GetRelevantStats

        public override Stats GetRelevantStats(Stats stats) {
            Stats s = new Stats() {
                Armor = stats.Armor,
                BonusArmor = stats.BonusArmor,
                Stamina = stats.Stamina,
                Agility = stats.Agility,
                DodgeRating = stats.DodgeRating,
                ParryRating = stats.ParryRating,
                BlockRating = stats.BlockRating,
                MasteryRating = stats.MasteryRating,
                Resilience = stats.Resilience,
                BonusAgilityMultiplier = stats.BonusAgilityMultiplier,
                BonusStrengthMultiplier = stats.BonusStrengthMultiplier,
                BonusAttackPowerMultiplier = stats.BonusAttackPowerMultiplier,
                BaseArmorMultiplier = stats.BaseArmorMultiplier,
                BonusArmorMultiplier = stats.BonusArmorMultiplier,
                BonusStaminaMultiplier = stats.BonusStaminaMultiplier,
                Health = stats.Health,
                BattlemasterHealthProc = stats.BattlemasterHealthProc,
                BonusHealthMultiplier = stats.BonusHealthMultiplier,
                DamageTakenReductionMultiplier = stats.DamageTakenReductionMultiplier,
                Miss = stats.Miss,
                ArcaneResistance = stats.ArcaneResistance,
                NatureResistance = stats.NatureResistance,
                FireResistance = stats.FireResistance,
                FrostResistance = stats.FrostResistance,
                ShadowResistance = stats.ShadowResistance,
                ArcaneResistanceBuff = stats.ArcaneResistanceBuff,
                NatureResistanceBuff = stats.NatureResistanceBuff,
                FireResistanceBuff = stats.FireResistanceBuff,
                FrostResistanceBuff = stats.FrostResistanceBuff,
                ShadowResistanceBuff = stats.ShadowResistanceBuff,
                HighestStat = stats.HighestStat,
                HighestSecondaryStat = stats.HighestSecondaryStat,
                Paragon = stats.Paragon,

                Strength = stats.Strength,
                AttackPower = stats.AttackPower,
                SpellPower = stats.SpellPower,
                CritRating = stats.CritRating,
                PhysicalCrit = stats.PhysicalCrit,
                SpellCrit = stats.SpellCrit,
                SpellCritOnTarget = stats.SpellCritOnTarget,
                HitRating = stats.HitRating,
                PhysicalHit = stats.PhysicalHit,
                SpellHit = stats.SpellHit,
                HasteRating = stats.HasteRating,
                PhysicalHaste = stats.PhysicalHaste,
                ExpertiseRating = stats.ExpertiseRating,
                ArmorPenetration = stats.ArmorPenetration,
                WeaponDamage = stats.WeaponDamage,
                BonusCritDamageMultiplier = stats.BonusCritDamageMultiplier,
                ThreatIncreaseMultiplier = stats.ThreatIncreaseMultiplier,
                BonusDamageMultiplier = stats.BonusDamageMultiplier,
                BonusWhiteDamageMultiplier = stats.BonusWhiteDamageMultiplier,
                BonusBlockValueMultiplier = stats.BonusBlockValueMultiplier,
                BossPhysicalDamageDealtReductionMultiplier = stats.BossPhysicalDamageDealtReductionMultiplier,
                BossAttackSpeedReductionMultiplier = stats.BossAttackSpeedReductionMultiplier,
                BonusPhysicalDamageMultiplier = stats.BonusPhysicalDamageMultiplier,

                SnareRootDurReduc = stats.SnareRootDurReduc,
                FearDurReduc = stats.FearDurReduc,
                StunDurReduc = stats.StunDurReduc,
                MovementSpeed = stats.MovementSpeed,
            };
            foreach (SpecialEffect effect in stats.SpecialEffects()) {
                if (IsTriggerRelevant(effect.Trigger) && HasRelevantStats(effect.Stats)) {
                    s.AddSpecialEffect(effect);
                }
            }
            return s;
        }
开发者ID:LucasPeacecraft,项目名称:rawr,代码行数:72,代码来源:CalculationsProtPaladin.cs

示例6: HasRelevantStats

 public override bool HasRelevantStats(Stats stats)
 {
     #region Basic stats
     if (stats.Mana != 0) return true;
     if (stats.Spirit != 0) return true;
     if (stats.SpellCrit != 0) return true;
     if (stats.SpellCritOnTarget != 0) return true;
     if (stats.SpellHit != 0) return true;
     if (stats.SpellHaste != 0) return true;
     if (stats.SpellPower != 0) return true;
     if (stats.CritRating != 0) return true;
     if (stats.HasteRating != 0) return true;
     if (stats.HitRating != 0) return true;
     if (stats.SpellFireDamageRating != 0) return true;
     if (stats.SpellNatureDamageRating != 0) return true;
     if (stats.SpellFrostDamageRating != 0) return true;
     if (stats.Mp5 != 0) return true;
     if (stats.ManaRestoreFromMaxManaPerSecond != 0) return true;
     if (stats.ManaRestore != 0) return true;
     if (stats.NatureSpellsManaCostReduction != 0) return true;
     if (stats.MovementSpeed != 0) return true;
     if (stats.SnareRootDurReduc != 0) return true;
     if (stats.FearDurReduc != 0) return true;
     if (stats.StunDurReduc != 0) return true;
     #endregion
     #region Multipliers
     if (stats.BonusIntellectMultiplier != 0) return true;
     if (stats.BonusSpiritMultiplier != 0) return true;
     if (stats.BonusSpellCritDamageMultiplier != 0) return true;
     if (stats.BonusSpellPowerMultiplier != 0) return true;
     if (stats.BonusFireDamageMultiplier != 0) return true;
     if (stats.BonusFrostDamageMultiplier != 0) return true;
     if (stats.BonusFrostDamageMultiplier != 0) return true;
     if (stats.BonusDamageMultiplier != 0) return true;
     #endregion
     #region Sets
     if (stats.BonusDamageMultiplierLavaBurst != 0) return true;
     #endregion
     #region Misc Damage
     if (stats.NatureDamage != 0) return true;
     if (stats.ArcaneDamage != 0) return true;
     if (stats.FireDamage != 0) return true;
     if (stats.ShadowDamage != 0) return true;
     #endregion
     #region Trinkets
     foreach (SpecialEffect effect in stats.SpecialEffects())
     {
         if (RelevantTriggers.Contains(effect.Trigger))
         {
             if (HasRelevantStats(effect.Stats)) return true;
         }
     }
     #endregion
     return false;
 }
开发者ID:LucasPeacecraft,项目名称:rawr,代码行数:55,代码来源:CalculationsElemental.cs

示例7: GetRelevantStats

        public override Stats GetRelevantStats(Stats stats)
        {
            Stats s = new Stats()
            {
                #region These aren't really relevant stats, but they should still appear in the tooltip

                Stamina = stats.Stamina,
                Health = stats.Health,
                Spirit = stats.Spirit,
                HitRating = stats.HitRating,

                #endregion

                Intellect = stats.Intellect,
                Mp5 = stats.Mp5,
                SpellPower = stats.SpellPower,
                CritRating = stats.CritRating,
                HasteRating = stats.HasteRating,
                MasteryRating = stats.MasteryRating,
                Mana = stats.Mana,
                ManaRestore = stats.ManaRestore,
                BonusIntellectMultiplier = stats.BonusIntellectMultiplier,
                BonusManaPotionEffectMultiplier = stats.BonusManaPotionEffectMultiplier,
                SpellCrit = stats.SpellCrit,
                SpellHaste = stats.SpellHaste,
                HealingReceivedMultiplier = stats.HealingReceivedMultiplier,
                BonusHealingDoneMultiplier = stats.BonusHealingDoneMultiplier,
                MovementSpeed = stats.MovementSpeed,
                SnareRootDurReduc = stats.SnareRootDurReduc,
                FearDurReduc = stats.FearDurReduc,
                StunDurReduc = stats.StunDurReduc,
                ShieldFromHealedProc = stats.ShieldFromHealedProc,

                // Gear Procs
                ManaRestoreFromMaxManaPerSecond = stats.ManaRestoreFromMaxManaPerSecond,
                BonusManaMultiplier = stats.BonusManaMultiplier,
                BonusCritHealMultiplier = stats.BonusCritHealMultiplier,
                SpellsManaCostReduction = stats.SpellsManaCostReduction,
                HolySpellsManaCostReduction = stats.HolySpellsManaCostReduction,

                // Healing Trinket Procs
                Healed = stats.Healed,
                HealedPerSP = stats.HealedPerSP,
            };
            foreach (SpecialEffect effect in stats.SpecialEffects())
            {
                if (IsTriggerRelevant(effect.Trigger) && HasRelevantStats(effect.Stats))
                {
                    s.AddSpecialEffect(effect);
                }
            }
            return s;
        }
开发者ID:LucasPeacecraft,项目名称:rawr,代码行数:53,代码来源:CalculationsHealadin.cs

示例8: HasSecondaryStats

 /// <summary>
 /// HasSecondaryStats() should return true if the Stats object has any stats that are relevant for the 
 /// model but only to a smaller degree, so small that you wouldn't typically consider the item.
 /// Stats that are usefull to both melee and casters (HitRating, CritRating & Haste) fit in here also.
 /// An item/enchant/buff having these stats would be considered only if it doesn't have any of the 
 /// unwanted stats.  Group/Party buffs are slighly different, they would be considered regardless if 
 /// they have unwanted stats.
 /// Note that a stat may be listed here since it impacts the model, but may also be listed as an unwanted stat.
 /// </summary>
 public bool HasSecondaryStats(Stats stats)
 {
     bool SecondaryStats = // Generic DPS stats, useful for casters and melee.
                           stats.HitRating != 0 ||
                           stats.CritRating != 0 ||
                           stats.HasteRating != 0 ||
                           stats.HighestStat != 0 ||
                           stats.HighestSecondaryStat != 0 ||
                           stats.MasteryRating != 0 ||
                           // Melee stats
                           stats.Agility != 0 ||
                           stats.BonusAgilityMultiplier != 0 ||
                           // Caster stats
                           stats.Intellect != 0 ||                // Intellect increases spellcrit, so it contributes to DPS.
                           stats.SpellCrit != 0 ||                // Exorcism can crit
                           stats.SpellCritOnTarget != 0 ||        // Exorcism
                           stats.SpellHit != 0 ||                 // Exorcism & Consecration (1st tick)
                           stats.SpellPower != 0 ||               // All holy damage effects benefit from spellpower
                           stats.SpellHaste != 0 ||               // GCD
                           stats.BonusIntellectMultiplier != 0 || // See intellect
                           stats.BonusSpellCritDamageMultiplier != 0 || // See spellcrit
                           stats.BonusSpellPowerMultiplier != 0 || // see spellcrit
                           // Damage procs
                           stats.FireDamage != 0 ||
                           stats.FrostDamage != 0 ||
                           stats.ArcaneDamage != 0 ||
                           stats.ShadowDamage != 0 ||
                           stats.NatureDamage != 0 ||
                           stats.HolyDamage != 0 ||
                           // Special (unmodelled)
                           stats.MovementSpeed != 0 ||
                           stats.SnareRootDurReduc != 0 ||
                           stats.FearDurReduc != 0 ||
                           stats.StunDurReduc != 0;
     if (!SecondaryStats)
     {
         foreach (SpecialEffect effect in stats.SpecialEffects())
         {
             if (RelevantTriggers.Contains(effect.Trigger) && HasSecondaryStats(effect.Stats))
             {
                 SecondaryStats = true;
                 break;
             }
         }
     }
     return SecondaryStats;
 }
开发者ID:LucasPeacecraft,项目名称:rawr,代码行数:56,代码来源:CalculationsRetribution.cs

示例9: HasExtraStats

 /// <summary>
 /// Return true if the Stats object has any stats that don't influence the model but that you do want 
 /// to display in tooltips and in calculated summary values.
 /// </summary>
 public bool HasExtraStats(Stats stats)
 {
     bool ExtraStats =   stats.Health != 0 ||
                         stats.Mana != 0 ||
                         stats.Stamina != 0 ||
                         stats.BonusStaminaMultiplier != 0 ||
                         stats.BonusManaMultiplier != 0 ||
                         stats.BattlemasterHealthProc != 0;
     if (!ExtraStats)
     {
         foreach (SpecialEffect effect in stats.SpecialEffects())
         {
             if (RelevantTriggers.Contains(effect.Trigger) && HasExtraStats(effect.Stats))
             {
                 ExtraStats = true;
                 break;
             }
         }
     }
     return ExtraStats;
 }
开发者ID:LucasPeacecraft,项目名称:rawr,代码行数:25,代码来源:CalculationsRetribution.cs

示例10: GetRelevantStats

 public override Stats GetRelevantStats(Stats stats)
 {
     Stats s = new Stats()
     {
         Health = stats.Health,
         Mana = stats.Mana,
         Strength = stats.Strength,
         HighestStat = stats.HighestStat,
         Agility = stats.Agility,
         Intellect = stats.Intellect,
         Stamina = stats.Stamina,
         AttackPower = stats.AttackPower,
         HitRating = stats.HitRating,
         CritRating = stats.CritRating,
         ArmorPenetration = stats.ArmorPenetration,
         TargetArmorReduction = stats.TargetArmorReduction,
         HasteRating = stats.HasteRating,
         SpellCrit = stats.SpellCrit,
         SpellCritOnTarget = stats.SpellCritOnTarget,
         PhysicalCrit = stats.PhysicalCrit,
         PhysicalHaste = stats.PhysicalHaste,
         PhysicalHit = stats.PhysicalHit,
         SpellHit = stats.SpellHit,
         SpellHaste = stats.SpellHaste, 
         Expertise = stats.Expertise,
         ExpertiseRating = stats.ExpertiseRating,
         MasteryRating = stats.MasteryRating,
         HighestSecondaryStat = stats.HighestSecondaryStat,
         SpellPower = stats.SpellPower,
         CritBonusDamage = stats.CritBonusDamage,
         BonusStrengthMultiplier = stats.BonusStrengthMultiplier,
         BonusStaminaMultiplier = stats.BonusStaminaMultiplier,
         BonusAgilityMultiplier = stats.BonusAgilityMultiplier,
         BonusIntellectMultiplier = stats.BonusIntellectMultiplier,
         BonusAttackPowerMultiplier = stats.BonusAttackPowerMultiplier,
         BonusCritDamageMultiplier = stats.BonusCritDamageMultiplier,
         BonusSpellCritDamageMultiplier = stats.BonusSpellCritDamageMultiplier,
         BonusPhysicalDamageMultiplier = stats.BonusPhysicalDamageMultiplier,
         BonusHolyDamageMultiplier = stats.BonusHolyDamageMultiplier,
         BonusDamageMultiplier = stats.BonusDamageMultiplier,
         BonusWhiteDamageMultiplier = stats.BonusWhiteDamageMultiplier,
         BonusSpellPowerMultiplier = stats.BonusSpellPowerMultiplier,
         JudgementCDReduction = stats.JudgementCDReduction,
         FireDamage = stats.FireDamage,
         FrostDamage = stats.FrostDamage,
         ArcaneDamage = stats.ArcaneDamage,
         ShadowDamage = stats.ShadowDamage,
         NatureDamage = stats.NatureDamage,
         HolyDamage = stats.HolyDamage,
         MovementSpeed = stats.MovementSpeed,
         SnareRootDurReduc = stats.SnareRootDurReduc,
         FearDurReduc = stats.FearDurReduc,
         StunDurReduc = stats.StunDurReduc,
     };
     foreach (SpecialEffect effect in stats.SpecialEffects())
     {
         if (RelevantTriggers.Contains(effect.Trigger) && HasRelevantStats(effect.Stats))
             s.AddSpecialEffect(effect);
     }
     return s;
 }
开发者ID:LucasPeacecraft,项目名称:rawr,代码行数:61,代码来源:CalculationsRetribution.cs

示例11: HasPrimaryStats

 /// <summary>
 /// HasPrimaryStats() should return true if the Stats object has any stats that define the item
 /// as being 'for your class/spec'. For melee classes this is typical melee stats like Strength, 
 /// Agility, AP, Expertise... For casters it would be spellpower, intellect, ...
 /// As soon as an item/enchant/buff has any of the stats listed here, it will be assumed to be 
 /// relevant unless explicitely filtered out.
 /// Stats that could be usefull for both casters and melee such as HitRating, CritRating and Haste
 /// don't belong here, but are SecondaryStats. Specific melee versions of these do belong here 
 /// for melee, spell versions would fit here for casters.
 /// </summary>
 public bool HasPrimaryStats(Stats stats)
 {
     bool PrimaryStats = // Base stats
                         stats.Strength != 0 ||
                         stats.AttackPower != 0 ||
                         stats.Expertise != 0 ||
                         // Combat ratings
                         stats.ExpertiseRating != 0 ||
                         stats.PhysicalHit != 0 ||
                         stats.PhysicalCrit != 0 ||
                         stats.PhysicalHaste != 0 ||
                         // Stat and damage multipliers
                         stats.BonusStrengthMultiplier != 0 ||
                         stats.BonusAttackPowerMultiplier != 0 ||
                         stats.BonusPhysicalDamageMultiplier != 0 ||
                         stats.BonusWhiteDamageMultiplier != 0 ||
                         stats.BonusHolyDamageMultiplier != 0 ||
                         stats.BonusDamageMultiplier != 0 || 
                         stats.BonusCritChance != 0 ||
                         stats.BonusCritDamageMultiplier != 0 ||
                         // Probably unused
                         stats.JudgementCDReduction != 0 ||
                         stats.ArmorPenetration != 0 ||
                         stats.TargetArmorReduction != 0;
     // Item proc effects
     if (!PrimaryStats)
     {
         foreach (SpecialEffect effect in stats.SpecialEffects())
         {
             if (RelevantTriggers.Contains(effect.Trigger) && HasPrimaryStats(effect.Stats))
             {
                 PrimaryStats = true;
                 break;
             }
         }
     }
     return PrimaryStats;
 }
开发者ID:LucasPeacecraft,项目名称:rawr,代码行数:48,代码来源:CalculationsRetribution.cs

示例12: getTrinketStats

 private static Stats getTrinketStats(Character character, Stats stats, float FightDuration, Rotation rot)
 {
     Stats statsAverage = new Stats();
     foreach (SpecialEffect effect in stats.SpecialEffects())
     {
         float trigger = 0f; // 1 / frequency in Hz
         float procChance = 1f;
         if (effect.Trigger == Trigger.DamageDone)
         {
             trigger = 1f / ( rot.getCastsPerSecond() + 1f/rot.FS.PeriodicTickTime );
             procChance = rot.getWeightedHitchance(); //flameshock ticks are not taken into account. the chance would be slightly higher.
         }
         else if (effect.Trigger == Trigger.DamageOrHealingDone)
         {
             // Need to Add Self-Heals
             trigger = 1f / (rot.getCastsPerSecond() + 1f / rot.FS.PeriodicTickTime);
             procChance = rot.getWeightedHitchance(); //flameshock ticks are not taken into account. the chance would be slightly higher.
         }
         else if (effect.Trigger == Trigger.SpellMiss)
         {
             trigger = 1f / rot.getCastsPerSecond();
             procChance = 1f - rot.getWeightedHitchance();
         }
         else if (effect.Trigger == Trigger.SpellHit || effect.Trigger == Trigger.DamageSpellHit)
         {
             trigger = 1f / rot.getCastsPerSecond();
             procChance = rot.getWeightedHitchance();
         }
         else if (effect.Trigger == Trigger.DoTTick)
         {
             trigger = 1f / rot.FS.PeriodicTickTime;
         }
         else if (effect.Trigger == Trigger.SpellCast || effect.Trigger == Trigger.DamageSpellCast)
         {
             trigger = 1f / rot.getCastsPerSecond();
         }
         else if (effect.Trigger == Trigger.SpellCrit || effect.Trigger == Trigger.DamageSpellCrit)
         {
             trigger = 1f / rot.getCastsPerSecond();
             procChance = rot.getWeightedCritchance();
         }
         else if (effect.Trigger == Trigger.ShamanLightningBolt)
         {
             trigger = 1f / rot.getCastsPerSecond(typeof(LightningBolt));
         }
         else if (effect.Trigger == Trigger.ShamanShock)
         {
             trigger = 1f / rot.getCastsPerSecond(typeof(Shock));
         }
         else if (effect.Trigger == Trigger.ShamanFlameShockDoTTick)
         {
             trigger = 1f / rot.getTicksPerSecond(typeof(FlameShock));
         }
         else if (effect.Trigger == Trigger.Use)
         {
             trigger = 1f;
         }
         else
             continue;
         
         effect.AccumulateAverageStats(statsAverage, trigger, procChance, 3f, FightDuration);
     }
     return statsAverage;
 }
开发者ID:LucasPeacecraft,项目名称:rawr,代码行数:64,代码来源:Estimation.cs

示例13: DoSpecialEffects

        protected static Stats DoSpecialEffects(Character character, Stats stats, Rotation rot, float FightDuration)
        {
            #region Initialize Triggers
            Dictionary<Trigger, float> triggerIntervals = new Dictionary<Trigger, float>(); ;
            Dictionary<Trigger, float> triggerChances = new Dictionary<Trigger, float>(); ;
            CalculateTriggers(rot, triggerIntervals, triggerChances);
            #endregion

            Stats procStats = new Stats();

            List<SpecialEffect> effects = new List<SpecialEffect>();
            foreach (SpecialEffect effect in stats.SpecialEffects())
            {
                effect.Stats.GenerateSparseData();

                #region Filter out unhandled effects
                if (!triggerIntervals.ContainsKey(effect.Trigger)) continue;
                #endregion

                effects.Add(effect);
            }

            AccumulateSpecialEffects(character, ref procStats, FightDuration, triggerIntervals, triggerChances, effects, 1f);
            return procStats;
        }
开发者ID:LucasPeacecraft,项目名称:rawr,代码行数:25,代码来源:Estimation.cs

示例14: HasIgnoreStats

        private bool HasIgnoreStats(Stats stats)
        {
            if (!HidingBadStuff) { return false; }

            // Remove Spellcasting Stuff
            if (HidingBadStuff_Spl)
            {
                if (stats.Mp5 != 0) { return true; }
                if (stats.SpellPower != 0) { return true; }
                if (stats.Mana != 0) { return true; }
                if (stats.ManaRestore != 0) { return true; }
                if (stats.Spirit != 0) { return true; }
                if (stats.Intellect != 0) { return true; }
                if (stats.BonusSpiritMultiplier != 0) { return true; }
                if (stats.BonusIntellectMultiplier != 0) { return true; }
                if (stats.SpellPenetration != 0) { return true; }
                if (stats.BonusManaMultiplier != 0) { return true; }
            }
            // Remove Defensive Stuff
            if (HidingBadStuff_Def)
            {
                if (stats.Dodge != 0) { return true; }
                if (stats.Parry != 0) { return true; }
                if (stats.DodgeRating != 0) { return true; }
                if (stats.ParryRating != 0) { return true; }
                if (stats.BlockRating != 0) { return true; }
                if (stats.Block != 0) { return true; }
                if (stats.SpellReflectChance != 0) { return true; }
            }
            // Remove PvP Items
            if (HidingBadStuff_PvP)
            {
                if (stats.Resilience != 0) { return true; }
            }
            // Special Effects
            foreach (SpecialEffect effect in stats.SpecialEffects())
            {
                // The effect doesn't have a relevant trigger
                if (!RelevantTriggers.Contains(effect.Trigger)) { return true; }
                // The Effect has Ignore Stats
                if (HasIgnoreStats(effect.Stats)) { return true; }
            }
            return false;
        }
开发者ID:LucasPeacecraft,项目名称:rawr,代码行数:44,代码来源:CalculationsHunter.cs

示例15: GetUptimes

        public WeightedStat[] GetUptimes(Stats stats, Dictionary<int, float> periods, Dictionary<int, float> chances, StatExtractor statExtractor, UptimeCombiner uptimeCombiner)
        {
            List<SpecialEffect> hasteEffects = new List<SpecialEffect>();
            List<float> hasteIntervals = new List<float>();
            List<float> hasteChances = new List<float>();
            List<float> hasteOffsets = new List<float>();
            List<float> hasteScales = new List<float>();
            List<float> hasteValues = new List<float>();
            foreach (SpecialEffect effect in stats.SpecialEffects())
            {
                if (!periods.ContainsKey((int)effect.Trigger))
                {
                    continue;
                }

                float value = statExtractor(effect.Stats);
                if (value > 0)
                {
                    hasteEffects.Add(effect);
                    hasteIntervals.Add(periods[(int)effect.Trigger]);
                    hasteChances.Add(chances[(int)effect.Trigger]);
                    hasteOffsets.Add(0f);
                    hasteScales.Add(1f);
                    hasteValues.Add(value);
                }
            }
            return uptimeCombiner(
                    hasteEffects.ToArray(),
                    hasteIntervals.ToArray(),
                    hasteChances.ToArray(),
                    hasteOffsets.ToArray(),
                    hasteScales.ToArray(),
                    CalculationsWarlock.AVG_UNHASTED_CAST_TIME,
                    BossOpts.BerserkTimer,
                    hasteValues.ToArray());
        }
开发者ID:LucasPeacecraft,项目名称:rawr,代码行数:36,代码来源:CharacterCalculationsWarlock.cs


注:本文中的Stats.SpecialEffects方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。