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


C# Stats.AddSpecialEffect方法代码示例

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


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

示例1: Bethtilac


//.........这里部分代码省略.........
                // 10-man Heroic - http://ptr.wowhead.com/spell=99990
                // 25-man Heroic - http://ptr.wowhead.com/spell=100838
                Attack VolatileBurst = new Attack
                {
                    Name = "Volatile Burst",
                    DamagePerHit = new float[] { 0f, 0f, (38918f + 45229f), (43243f + 50256f), 0f }[i] / 2f, // Heroic values are a guess.
                    AttackSpeed = 2f,
                    MaxNumTargets = new float[] { 0f, 0f, 1f, 3f, 0f }[i],
                    SpellID = new float[] { 0f, 0f, 99990f, 100838f, 0f }[i],
                    AttackType = ATTACK_TYPES.AT_AOE,
                    DamageType = ItemDamageType.Nature,
                    IsFromAnAdd = true,
                };
                VolatileBurst.AffectsRole[PLAYER_ROLES.RangedDPS] = true;
                VolatileBurst.AffectsRole[PLAYER_ROLES.OffAndTertTankHealer] = true;
                VolatileBurst.AffectsRole[PLAYER_ROLES.RaidHealer] = true;
                TheCinderweb.Attacks.Add(VolatileBurst);
                #endregion
                #endregion
                #endregion

                #region The Frenzy!
                /* After she has performed Smouldering Devastation three times, Beth'tilac becomes frenzied. She
                 * emerges from the safety of her Cinderweb canopy and no longer calls for aid from her brood.*/

                #region Frenzy
                /* Frenzy
                 * a stacking buff which increases Beth'tilac's damage done by 5% per stack. A stack is added 
                 * every 5 seconds. It acts as a soft enrage timer and this is the reason you want to have 
                 * the boss as low on health as possible when entering this phase. */
                // http://www.wowhead.com/spell=99497
                SpecialEffect FrenzySpecialEffect = new SpecialEffect(Trigger.Use, new Stats() { DamageTakenReductionMultiplier = -0.05f, }, 4.983f * 60f, 5f, 1f, 50);
                Stats FrenzyStats = new Stats();
                FrenzyStats.AddSpecialEffect(FrenzySpecialEffect);
                BuffState Frenzy = new BuffState
                {
                    Name = "Frenzy",
                    Breakable = false,
                    Frequency = BerserkTimer[i] - 1f,
                    Duration = BerserkTimer[i] * 1000f,
                    Stats = FrenzyStats,
                    Chance = 1f,
                };
                Frenzy.SetAffectsRoles_All();
                TheFrenzy.BuffStates.Add(Frenzy);
                #endregion

                #region The Widow's Kiss
                /* The Widow's Kiss
                 * Beth'tilac's deadly kiss boils the blood of her current target, reducing the amount that they
                 * can be healed by 10% every 2 seconds for 20 sec. If also causes the target to deal growing Fire
                 * damage to their surrounding allies within 10 yards.*/
                // Tanks should not be standing next to each other to be taking the fire damage
                // http://ptr.wowhead.com/spell=99506 (10%)
                SpecialEffect widowsKissSpecialEffect = new SpecialEffect(Trigger.Use, new Stats() { HealingReceivedMultiplier = -0.10f, }, 5f, 2f, 1f, 10);
                Stats widowsKissStats = new Stats();
                widowsKissStats.AddSpecialEffect(widowsKissSpecialEffect);
                widowsKissSpecialEffect = new SpecialEffect(Trigger.Use, widowsKissStats, 25f, 60f, 1f);
                widowsKissStats = new Stats();
                widowsKissStats.AddSpecialEffect(widowsKissSpecialEffect);
                BuffState WidowsKiss = new BuffState
                {
                    Name = "The Widow's Kiss",
                    Breakable = false,
                    Frequency = 30f * 2f,
                    Duration = 20f * 1000f,
开发者ID:LucasPeacecraft,项目名称:rawr,代码行数:67,代码来源:BossesT12.cs

示例2: 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

示例3: 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

示例4: ProcessEquipLine

        public static void ProcessEquipLine(string line, Stats stats, bool isArmory, int ilvl, int id) {
            Match match;
            #region Prep the line, if it needs it
            while (line.Contains("secs")) { line = line.Replace("secs", "sec"); }
            while (line.Contains("sec.")) { line = line.Replace("sec.", "sec"); }
            while (line.Contains("  ")) { line = line.Replace("  ", " "); }
            while (line.EndsWith(".")) { line = line.Substring(0, line.Length-1); }
            #endregion
            if (false) { /*Never run, this is just to make all the stuff below uniform with an 'else if' line start*/ }
            #region Class Specific
            #region Added by Druid: Moonkin
            else if ((match = new Regex(@"Your Moonfire spell grants (?<amount>\d+) spell power for 10 sec").Match(line)).Success)
            {
                stats.AddSpecialEffect(new SpecialEffect(Trigger.MoonfireCast,
                    new Stats() { SpellPower = (float)int.Parse(match.Groups["amount"].Value), }, 10f, 0f));
            }
            else if (line.StartsWith("Your Moonfire ability has a chance to grant "))
            {
                line = line.Substring("Your Moonfire ability has a chance to grant ".Length);
                string spellPowerLine = line.Substring(0, line.IndexOf(" spell power for"));
                string durationLine = line.Substring(line.IndexOf("for") + 3, line.IndexOf(" sec") - line.IndexOf("for") - 3);
                float spellPower = float.Parse(spellPowerLine, System.Globalization.CultureInfo.InvariantCulture);
                float duration = float.Parse(durationLine, System.Globalization.CultureInfo.InvariantCulture);
                stats.AddSpecialEffect(new SpecialEffect(Trigger.MoonfireCast, new Stats() { SpellPower = spellPower, }, duration, 0f, 0.5f));
            }
            #endregion
            #region Added by Shaman: Enhance/Elemental/Resto
            else if ((match = new Regex(@"Your Lava Lash ability also grants you (?<amount>\d+) attack power for (?<dur>\d+) sec").Match(line)).Success)
            {   // Gladiator's Totem of Indomitability
                stats.AddSpecialEffect(new SpecialEffect(Trigger.ShamanLavaLash,
                    new Stats() { AttackPower = (float)int.Parse(match.Groups["amount"].Value) },
                    (float)int.Parse(match.Groups["dur"].Value), 0f));
            }
            else if ((match = new Regex(@"Your Shock spells grant (?<amount>\d+) spellpower for (?<dur>\d+) sec").Match(line)).Success)
            {   // Gladiator's Totem of Survival
                stats.AddSpecialEffect(new SpecialEffect(Trigger.ShamanShock,
                    new Stats() { SpellPower = (float)int.Parse(match.Groups["amount"].Value) },
                    (float)int.Parse(match.Groups["dur"].Value), 0f));
            }
            else if ((match = new Regex(@"The periodic damage from your Flame Shock spell grants (?<amount>\d+) haste rating for (?<dur>\d+) sec Stacks up to (?<stacks>\d+) times").Match(line)).Success)
            {   // Bizuri's Totem of Shattered Ice
                stats.AddSpecialEffect(new SpecialEffect(Trigger.ShamanFlameShockDoTTick,
                    new Stats() { HasteRating = (float)int.Parse(match.Groups["amount"].Value) },
                    (float)int.Parse(match.Groups["dur"].Value), 0f, 1f, int.Parse(match.Groups["stacks"].Value)));
            }
            else if ((match = new Regex(@"Your Storm Strike ability also grants you (?<amount>\d+) haste rating for (?<dur>\d+) sec").Match(line)).Success)
            {   // Totem of Dueling
                stats.AddSpecialEffect(new SpecialEffect(Trigger.ShamanStormStrike,
                    new Stats() { HasteRating = (float)int.Parse(match.Groups["amount"].Value) },
                    (float)int.Parse(match.Groups["dur"].Value), 0f));
            }
            else if ((match = new Regex(@"Each time you cast Lightning Bolt, you have a chance to gain (?<amount>\d+) haste rating for (?<dur>\d+) sec").Match(line)).Success)
            {   // Totem of Electrifying Wind
                stats.AddSpecialEffect(new SpecialEffect(Trigger.ShamanLightningBolt,
                    new Stats() { HasteRating = (float)int.Parse(match.Groups["amount"].Value) },
                    (float)int.Parse(match.Groups["dur"].Value), 0f, 0.70f));
            }
            else if ((match = new Regex(@"Each time you use your Lava Lash ability, you have a chance to gain (?<amount>\d+) attack power for (?<dur>\d+) sec").Match(line)).Success)
            {   // Totem of Quaking Earth
                stats.AddSpecialEffect(new SpecialEffect(Trigger.ShamanLavaLash,
                    new Stats() { AttackPower = (float)int.Parse(match.Groups["amount"].Value) },
                    (float)int.Parse(match.Groups["dur"].Value), 9f, 0.80f));
            }
            else if ((match = new Regex(@"Your Stormstrike ability grants (?<amount>\d+) attack power for (?<dur>\d+) sec Stacks up to (?<stacks>\d+) times").Match(line)).Success)
            {   // Totem of the Avalanche
                stats.AddSpecialEffect(new SpecialEffect(Trigger.ShamanStormStrike,
                    new Stats() { AttackPower = (float)int.Parse(match.Groups["amount"].Value) },
                    (float)int.Parse(match.Groups["dur"].Value), 0f, 1f, int.Parse(match.Groups["stacks"].Value)));
            }
            else if ((match = new Regex(@"Your Lightning Bolt spell has a chance to grant (?<amount>\d+) haste rating for (?<dur>\d+) sec").Match(line)).Success)
            {   // Totem of the Elemental Plane
                //stats.LightningBoltHasteProc_15_45 += (float)int.Parse(match.Groups["amount"].Value);
                stats.AddSpecialEffect(new SpecialEffect(Trigger.ShamanLightningBolt,
                    new Stats() { HasteRating = int.Parse(match.Groups["amount"].Value) },
                    (float)int.Parse(match.Groups["dur"].Value), 45f, 0.15f));
            }
            /*else if ((match = new Regex(@"Your Riptide spell grants (?<amount>\d+) spell power for (?<dur>\d+) sec Stacks up to (?<stacks>\d+) times").Match(line)).Success)
            {   // Totem of the Surging Sea
                // This needs to be remodeled as a SpecialEffect
                stats.RestoShamRelicT10 = int.Parse(match.Groups["amount"].Value) * int.Parse(match.Groups["stacks"].Value);
            }*/
            // Other
            else if (line == "Your Shock spells have a chance to grant 110 attack power for 10 sec")
            {
                stats.AddSpecialEffect(new SpecialEffect(Trigger.ShamanShock, new Stats() { AttackPower = 110 }, 10f, 45f));
            }
            #endregion
            #region Added by Priest: HealPriest
            #endregion
            #region Added by Priest: Shadow
            #endregion
            #region Added by Warrior: ProtWarr
            #endregion
            #region Added by Warrior: DPSWarr
            #endregion
            #region Added by Paladin: Retadin
            else if ((match = new Regex(@"Increases the damage dealt by your Crusader Strike ability by (?<amount>\d+)%").Match(line)).Success)
            {   // Gladiator's Libram of Fortitude
                stats.BonusDamageMultiplierCrusaderStrike = int.Parse(match.Groups["amount"].Value) / 100;
            }    
//.........这里部分代码省略.........
开发者ID:LucasPeacecraft,项目名称:rawr,代码行数:101,代码来源:SpecialEffects.cs

示例5: GenPetStats

        public void GenPetStats()
        {
            // Initial Variables
            int levelDiff = BossOpts.Level - character.Level;
            StatsHunter petStatsBase = BasePetStats;
            #region From Hunter
            StatsHunter petStatsFromHunter = new StatsHunter() {
                AttackPower = (HunterStats.RangedAttackPower * 0.424f),
                SpellPower = HunterStats.RangedAttackPower * 0.211807381f,
                Stamina = HunterStats.Stamina,
                Agility = HunterStats.Agility,
                CritRating = HunterStats.CritRating,
                Strength = HunterStats.Strength,
                Spirit = HunterStats.PetSpirit,
                PhysicalHaste = HunterStats.PhysicalHaste,
                ArcaneResistance = HunterStats.ArcaneResistance * 0.4f,
                FireResistance   = HunterStats.FireResistance   * 0.4f,
                NatureResistance = HunterStats.NatureResistance * 0.4f,
                ShadowResistance = HunterStats.ShadowResistance * 0.4f,
                FrostResistance  = HunterStats.FrostResistance  * 0.4f,
                Armor = HunterStats.Armor * 0.7f,
                SpellPenetration = HunterStats.SpellPenetration,
                Resilience = HunterStats.Resilience,
                BonusDamageMultiplier = ((HunterStats.BonusDamageMultiplier /* / (1f + Talents.TheBeastWithin * 0.10f)*/))
                                      * ((character.Race == CharacterRace.Orc ? 0.05f : 0f)),
                BonusPetDamageMultiplier = HunterStats.BonusPetDamageMultiplier,
                BonusBleedDamageMultiplier = HunterStats.BonusBleedDamageMultiplier,
                BonusPetAttackPowerMultiplier = HunterStats.BonusPetAttackPowerMultiplier,
//                PetAttackPower = HunterStats.PetAttackPower,
            };
            #endregion
            #region From Talents (Pet or Hunter)
            Stats petStatsTalents = new Stats() {
                BonusStaminaMultiplier = PetTalents.GreatStamina * 0.04f,
                MovementSpeed = PetTalents.BoarsSpeed * 0.30f,
                PhysicalHaste = PetTalents.SerpentSwiftness * 0.05f,
                PhysicalCrit = PetTalents.SpidersBite * 0.03f
                             ,
                BaseArmorMultiplier = (1f + PetTalents.NaturalArmor * 0.05f)
                                    * (1f + PetTalents.PetBarding * 0.05f)
                                    * (1.05f) // Base 5% Armor Bonus
                                    - 1f,
                Dodge = PetTalents.PetBarding * 0.01f,
                CritChanceReduction = PetTalents.GraceOfTheMantis * 0.03f,
                ArcaneResistance = PetTalents.GreatResistance * 0.05f,
                FireResistance = PetTalents.GreatResistance * 0.05f,
                NatureResistance = PetTalents.GreatResistance * 0.05f,
                ShadowResistance = PetTalents.GreatResistance * 0.05f,
                FrostResistance = PetTalents.GreatResistance * 0.05f,
                FearDurReduc = PetTalents.Lionhearted * 0.15f,
                StunDurReduc = PetTalents.Lionhearted * 0.15f,
                BonusDamageMultiplier = (1 + (PetTalents.SharkAttack * 0.03f)) * (1.05f) - 1f, // Base 5% Damage
                //BonusAttackPowerMultiplier = calculatedStats.aspectBonusAPBeast,
                BonusHealthMultiplier = 0.05f, // Base 5% Health
            };
            float LongevityCdAdjust = 1f - Talents.Longevity * 0.10f;
            if (PetTalents.Rabid > 0) {
                float rabidCooldown = 45f * LongevityCdAdjust;
                SpecialEffect primary = new SpecialEffect(Trigger.Use, new Stats() { }, 20f, rabidCooldown);
                SpecialEffect secondary = new SpecialEffect(Trigger.MeleeHit,
                    new Stats() { BonusAttackPowerMultiplier = 0.05f }, 20f, 0f, 0.50f, 5);
                primary.Stats.AddSpecialEffect(secondary);
                petStatsTalents.AddSpecialEffect(primary);
            }
            if (Talents.Frenzy > 0) {
                if (frenzy == null) {
                    frenzy = new SpecialEffect(Trigger.MeleeCrit, new Stats() { PhysicalHaste = 0.30f, }, 8f, 1f, Talents.Frenzy * 0.20f);
                }
                petStatsTalents.AddSpecialEffect(frenzy);
            }
            if (PetTalents.LastStand > 0) {
                SpecialEffect laststand = new SpecialEffect(Trigger.Use, new Stats() { BonusHealthMultiplier = 0.30f, }, 20f, (1f * 60f) * LongevityCdAdjust);
                petStatsTalents.AddSpecialEffect(laststand);
            }
            #endregion
            #region From Options
            Stats petStatsOptionsPanel = new Stats() {
                PhysicalCrit = StatConversion.NPC_LEVEL_CRIT_MOD[levelDiff],
                //BonusStaminaMultiplier = 0.05f,
            };
            CalculateTimings();
            if(priorityRotation.getSkillFrequency(PetAttacks.SerenityDust) > 0){
                // TODO: Need to make sure this freq actually works
                float freq = priorityRotation.getSkillFrequency(PetAttacks.SerenityDust);
                SpecialEffect serenitydust = new SpecialEffect(Trigger.Use,
                    new Stats() { BonusAttackPowerMultiplier = 0.10f, },
                    15f, BossOpts.BerserkTimer / freq);
                petStatsOptionsPanel.AddSpecialEffect(serenitydust);
                petStatsOptionsPanel.HealthRestore += (BossOpts.BerserkTimer / freq) * 825f;
            }
            #endregion

            // Totals
//            Stats petStatsGearEnchantsBuffs = new Stats();
//            petStatsGearEnchantsBuffs.Accumulate(petStatsBuffs);
            StatsHunter petStatsTotal = new StatsHunter();
            petStatsTotal.Accumulate(petStatsBase);
            petStatsTotal.Accumulate(petStatsFromHunter);
//            petStatsTotal.Accumulate(petStatsBuffs);
            petStatsTotal.Accumulate(petStatsTalents);
//.........这里部分代码省略.........
开发者ID:LucasPeacecraft,项目名称:rawr,代码行数:101,代码来源:PetCalculations.cs

示例6: bwParseItem_DoWork


//.........这里部分代码省略.........
                    }
                    catch { }
                }
                foreach (XElement nodeGemProperties in xtooltip.SelectNodes("gemProperties"))
                {
                    List<string> gemBonuses = new List<string>();
                    string[] gemBonusStrings = nodeGemProperties.Value.Split(new string[] { " and ", " & ", ", " }, StringSplitOptions.None);
                    foreach (string gemBonusString in gemBonusStrings)
                    {
                        if (gemBonusString.IndexOf('+') != gemBonusString.LastIndexOf('+'))
                        {
                            gemBonuses.Add(gemBonusString.Substring(0, gemBonusString.IndexOf(" +")));
                            gemBonuses.Add(gemBonusString.Substring(gemBonusString.IndexOf(" +") + 1));
                        }
                        else
                            gemBonuses.Add(gemBonusString);
                    }
                    foreach (string gemBonus in gemBonuses)
                    {
                        if (gemBonus == "Spell Damage +6")
                        {
                            stats.SpellPower = 6.0f;
                        }
                        else if (gemBonus == "2% Increased Armor Value from Items")
                        {
                            stats.BaseArmorMultiplier = 0.02f;
                        }
                        else if (gemBonus == "Stamina +6")
                        {
                            stats.Stamina = 6.0f;
                        }
                        else if (gemBonus == "Chance to restore mana on spellcast")
                        {
                            stats.AddSpecialEffect(new SpecialEffect(Trigger.SpellCast, new Stats() { ManaRestore = 300 }, 0f, 15f, .05f));
                        }
                        else if (gemBonus == "Chance on spellcast - next spell cast in half time" || gemBonus == "Chance to Increase Spell Cast Speed")
                        {
                            stats.AddSpecialEffect(new SpecialEffect(Trigger.SpellCast, new Stats() { HasteRating = 320 }, 6, 45, 0.15f));
                        }
                        else if (gemBonus == "+10% Shield Block Value")
                        {
                            stats.BonusBlockValueMultiplier = 0.1f;
                        }
                        else if (gemBonus == "+2% Intellect")
                        {
                            stats.BonusIntellectMultiplier = 0.02f;
                        }
                        else if (gemBonus == "2% Reduced Threat")
                        {
                            stats.ThreatReductionMultiplier = 0.02f;
                        }
                        else if (gemBonus == "3% Increased Critical Healing Effect")
                        {
                            stats.BonusCritHealMultiplier = 0.03f;
                        }
                        else
                        {
                            try
                            {
                                int gemBonusValue = int.Parse(gemBonus.Substring(0, gemBonus.IndexOf(' ')).Trim('+').Trim('%'));
                                switch (gemBonus.Substring(gemBonus.IndexOf(' ') + 1).Trim())
                                {
                                    case "to All Stats":
                                    case "All Stats":
                                        stats.Agility = gemBonusValue;
                                        stats.Strength = gemBonusValue;
开发者ID:LucasPeacecraft,项目名称:rawr,代码行数:67,代码来源:ElitistArmoryService.cs

示例7: MyClassInitialize

        public static void MyClassInitialize(TestContext testContext)
        {
            int i = 0;
            Stats tempStat = new Stats();
            Stats elementStat = new Stats();

            // Furious Gladiator's Sigil of Strife
            m_TestLineArray[i] = "Your Plague Strike ability also grants you 144 attack power for 10 sec.";
            tempStat = new Stats();
            elementStat = new Stats();
            tempStat.AttackPower = 144;
            elementStat.AddSpecialEffect(new SpecialEffect(Trigger.PlagueStrikeHit, tempStat, 10f, 0));
            m_ExpectedArray[i] = elementStat;
            i++;

            // Sigil of Deflection
            m_TestLineArray[i] = "Your Rune Strike ability grants 136 dodge rating for 5 sec.";
            tempStat = new Stats();
            elementStat = new Stats();
            tempStat.DodgeRating = 136;
            elementStat.AddSpecialEffect(new SpecialEffect(Trigger.RuneStrikeHit, tempStat, 5f, 0));
            m_ExpectedArray[i] = elementStat;
            i++;

            // Deadly Gladiator's Sigil of Strife
            m_TestLineArray[i] = "Your Plague Strike ability also grants you 120 attack power for 10 sec.";
            tempStat = new Stats();
            elementStat = new Stats();
            tempStat.AttackPower = 120;
            elementStat.AddSpecialEffect(new SpecialEffect(Trigger.PlagueStrikeHit, tempStat, 10f, 0));
            m_ExpectedArray[i] = elementStat;
            i++;

            //Hateful Gladiator's Sigil of Strife
            m_TestLineArray[i] = "Your Plague Strike ability also grants you 106 attack power for 6 sec.";
            tempStat = new Stats();
            elementStat = new Stats();
            tempStat.AttackPower = 106;
            elementStat.AddSpecialEffect(new SpecialEffect(Trigger.PlagueStrikeHit, tempStat, 6f, 0));
            m_ExpectedArray[i] = elementStat;
            i++;

            //Sigil of Haunted Dreams
            m_TestLineArray[i] = "Your Blood Strike and Heart Strikes have a chance to grant 173 critical strike rating for 10 sec.";
            tempStat = new Stats();
            elementStat = new Stats();
            tempStat.CritRating = 173;
            elementStat.AddSpecialEffect(new SpecialEffect(Trigger.BloodStrikeHit, tempStat, 10f, 0f, 0.15f));
            elementStat.AddSpecialEffect(new SpecialEffect(Trigger.HeartStrikeHit, tempStat, 10f, 0f, 0.15f));
            m_ExpectedArray[i] = elementStat;
            i++;

            //Savage Gladiator's Sigil of Strife
            m_TestLineArray[i] = "Your Plague Strike ability also grants you 94 attack power for 6 sec.";
            tempStat = new Stats();
            elementStat = new Stats();
            tempStat.AttackPower = 94;
            elementStat.AddSpecialEffect(new SpecialEffect(Trigger.PlagueStrikeHit, tempStat, 6f, 0));
            m_ExpectedArray[i] = elementStat;
            i++;

        }
开发者ID:LucasPeacecraft,项目名称:rawr,代码行数:62,代码来源:SpecialEffectsTest.cs

示例8: GetCharacterStatsWithTemporaryEffects

        private Stats GetCharacterStatsWithTemporaryEffects(Character character, Item additionalItem, /*out WeightedStat[] armorPenetrationUptimes,*/ out WeightedStat[] critRatingUptimes)
        {
            RogueTalents talents = character.RogueTalents;
            #region Spec determination
            int spec;
            int assCounter = 0, combatCounter = 0, subtCounter = 0;
            for (int i = 0; i <= 18; i++) assCounter += int.Parse(talents.ToString()[i].ToString());
            for (int i = 19; i <= 37; i++) combatCounter += int.Parse(talents.ToString()[i].ToString());
            for (int i = 38; i <= 56; i++) subtCounter += int.Parse(talents.ToString()[i].ToString());
            if (assCounter > combatCounter && assCounter > subtCounter) spec = 0;
            else if (combatCounter > subtCounter) spec = 1;
            else spec = 2;
            #endregion

            CalculationOptionsRogue calcOpts = character.CalculationOptions as CalculationOptionsRogue;
            BossOptions bossOpts = character.BossOptions;
            int targetLevel = bossOpts.Level;
            bool targetPoisonable = calcOpts.TargetPoisonable;

            Stats statsRace = BaseStats.GetBaseStats(character.Level, character.Class, character.Race);

            Stats statsItems = GetItemStats(character, additionalItem);
            Stats statsBuffs = GetBuffsStats(character, calcOpts);

            SpecialEffect LegendarySpecialEffect = new SpecialEffect(Trigger.MeleeHit, new Stats() { Agility = 2f }, 20f, 0f, 1f, 50);
            Stats statsSetBonus = new Stats();
            int LegendaryPartA;
            character.SetBonusCount.TryGetValue("Jaws of Retribution", out LegendaryPartA);
            if (LegendaryPartA >= 2)
            {
                statsSetBonus.AddSpecialEffect(LegendarySpecialEffect);
            }

            LegendarySpecialEffect = new SpecialEffect(Trigger.MeleeHit, new Stats() { Agility = 5f }, 20f, 0f, 1f, 50);
            int LegendaryPartB;
            character.SetBonusCount.TryGetValue("Maw of Oblivion", out LegendaryPartB);
            if (LegendaryPartB >= 2)
            {
                statsSetBonus.AddSpecialEffect(LegendarySpecialEffect);
            }

            // Needs work....
            LegendarySpecialEffect = new SpecialEffect(Trigger.MeleeHit, new Stats() { Agility = 17f }, 20f, 0f, 1f, 50);
            Stats LegendaryStats = new Stats();
            LegendaryStats.AddSpecialEffect(LegendarySpecialEffect);
            // Assume it resets every 45 seconds
            LegendarySpecialEffect = new SpecialEffect(Trigger.MeleeHit, LegendaryStats, 45f, 45f);
            int LegendaryPartC;
            character.SetBonusCount.TryGetValue("Fangs of the Father", out LegendaryPartC);
            if (LegendaryPartC >= 2)
            {
                statsSetBonus.AddSpecialEffect(LegendarySpecialEffect);
                LegendarySpecialEffect = new SpecialEffect(Trigger.MeleeHit, new Stats() { FangsoftheFather = 1f }, 6f, 45f);
                statsSetBonus.AddSpecialEffect(LegendarySpecialEffect);
            }

            Stats statsTalents = new Stats()
            {
                BonusAgilityMultiplier = (1f + (spec == 2 ? RV.Mastery.SinisterCallingMult : 0f)) * (1f + RV.LeatherSpecialization) - 1f,
                BonusAttackPowerMultiplier = (1f + (spec == 1 ? RV.Mastery.VitalityAPMult : 0f)) * (1f + RV.Talents.SavageCombatMult * talents.SavageCombat) - 1f,
                BonusCritChance = character.ActiveBuffs.Contains(Buff.GetBuffByName("Rampage")) || character.ActiveBuffs.Contains(Buff.GetBuffByName("Leader of the Pack")) || character.ActiveBuffs.Contains(Buff.GetBuffByName("Honor Among Thieves")) || character.ActiveBuffs.Contains(Buff.GetBuffByName("Terrifying Roar")) || character.ActiveBuffs.Contains(Buff.GetBuffByName("Furious Howl")) || character.ActiveBuffs.Contains(Buff.GetBuffByName("Elemental Oath")) ? 0f : RV.Talents.HonorAmongThievesCritBonus * talents.HonorAmongThieves,
                BonusDamageMultiplier = RV.Vendetta.DmgMult * talents.Vendetta * (RV.Vendetta.Duration * (talents.GlyphOfVendetta ? 1f + RV.Glyph.VendettaDurationMult : 1f)) / RV.Vendetta.CD +
                    talents.SanguinaryVein * RV.Talents.SanguinaryVein +
                    RV.Mastery.MasterOfSubtletyDmgMult * RV.Mastery.MasterOfSubtletyDuration / (RV.Vanish.CD - RV.Talents.ElusivenessVanishCDReduc * talents.Elusiveness) +
                    (talents.Preparation > 0 ? RV.Mastery.MasterOfSubtletyDmgMult * RV.Mastery.MasterOfSubtletyDuration / (RV.Talents.PreparationCD * talents.Preparation) : 0f),
                BonusPhysicalDamageMultiplier = character.ActiveBuffs.Contains(Buff.GetBuffByName("Ravage")) || character.ActiveBuffs.Contains(Buff.GetBuffByName("Acid Spit")) || character.ActiveBuffs.Contains(Buff.GetBuffByName("Brittle Bones")) || character.ActiveBuffs.Contains(Buff.GetBuffByName("Blood Frenzy")) || character.ActiveBuffs.Contains(Buff.GetBuffByName("Savage Combat")) ? 0f : RV.Talents.SavageCombatMult * talents.SavageCombat,
                BonusBleedDamageMultiplier = character.ActiveBuffs.Contains(Buff.GetBuffByName("Mangle")) || character.ActiveBuffs.Contains(Buff.GetBuffByName("Hemorrhage")) || character.ActiveBuffs.Contains(Buff.GetBuffByName("Blood Frenzy")) || character.ActiveBuffs.Contains(Buff.GetBuffByName("Gore")) || character.ActiveBuffs.Contains(Buff.GetBuffByName("Stampede")) || character.ActiveBuffs.Contains(Buff.GetBuffByName("Tendon Rip")) ? 0f : RV.Hemo.BleedDmgMult * talents.Hemorrhage,
                PhysicalHit = RV.Talents.PrecisionMult * talents.Precision,
                SpellHit = RV.Talents.PrecisionMult * talents.Precision,
            };

            Stats statsGearEnchantsBuffs = statsItems + statsBuffs + statsSetBonus;
            Stats statsTotal = statsRace + statsItems;
            statsTotal.Accumulate(statsBuffs);
            statsTotal.Accumulate(statsTalents);

            statsTotal.Stamina = (float)Math.Floor(statsTotal.Stamina * (1f + statsTotal.BonusStaminaMultiplier));
            statsTotal.Strength = (float)Math.Floor(statsTotal.Strength * (1f + statsTotal.BonusStrengthMultiplier));
            statsTotal.Agility = (float)Math.Floor((statsTotal.Agility - statsRace.Agility) * (1f + statsTotal.BonusAgilityMultiplier)) + statsRace.Agility;
            statsTotal.AttackPower += (statsTotal.Strength - RV.BaseStatCalcReduc / 2) + RV.APperAgi * (statsTotal.Agility - RV.BaseStatCalcReduc) + RV.BaseStatCalcReduc;
            statsTotal.AttackPower = (float)Math.Floor(statsTotal.AttackPower * (1f + statsTotal.BonusAttackPowerMultiplier));
            statsTotal.Health += (float)Math.Floor((statsTotal.Stamina - RV.BaseStatCalcReduc) * RV.HPPerStam + RV.BaseStatCalcReduc);
            statsTotal.Armor = (float)Math.Floor(statsTotal.Armor * (1f + statsTotal.BonusArmorMultiplier));
            statsTotal.NatureResistance += statsTotal.NatureResistanceBuff;
            statsTotal.FireResistance += statsTotal.FireResistanceBuff;
            statsTotal.FrostResistance += statsTotal.FrostResistanceBuff;
            statsTotal.ShadowResistance += statsTotal.ShadowResistanceBuff;
            statsTotal.ArcaneResistance += statsTotal.ArcaneResistanceBuff;

            float hasteBonus = (1f + StatConversion.GetPhysicalHasteFromRating(statsTotal.HasteRating, CharacterClass.Rogue)) * (1f + statsTotal.PhysicalHaste) - 1f;
            float speedBonus = (1f + hasteBonus) * (1f + RV.SnD.SpeedBonus) * (1f + (spec == 2 ? RV.Mastery.Executioner + RV.Mastery.ExecutionerPerMast * StatConversion.GetMasteryFromRating(statsTotal.MasteryRating) : 0f)) - 1f;
            float mHSpeed = (character.MainHand == null ? 2 : character.MainHand.Speed);
            float oHSpeed = (character.OffHand == null ? 2 : character.OffHand.Speed);
            float meleeHitInterval = 1f / ((mHSpeed + oHSpeed) / speedBonus);

            //To calculate the Poison hit interval only white attacks are taken into account, IP is assumed on the slowest and DP on the fastest weapon
            float dPPS = bossOpts.BerserkTimer / (Math.Min(mHSpeed, oHSpeed) / speedBonus) * RV.DP.Chance + (spec == 0 ? RV.Mastery.ImprovedPoisonsDPBonus : 0);
            float poisonHitInterval = 1 / (Math.Max(mHSpeed, mHSpeed) * RV.IP.Chance * (1f + RV.Mastery.ImprovedPoisonsIPFreqMult) / RV.IP.NormWeapSpeed + dPPS);
            
            float hitBonus = StatConversion.GetPhysicalHitFromRating(statsTotal.HitRating) + statsTotal.PhysicalHit;
//.........这里部分代码省略.........
开发者ID:LucasPeacecraft,项目名称:rawr,代码行数:101,代码来源:CalculationsRogue.cs

示例9: GetRelevantStats

 public override Stats GetRelevantStats(Stats stats) {
     if (stats == null) { return new Stats(); }
     Stats relevantStats = new Stats() {
         #region Wanted Stats
         // Base Stats
         Strength = stats.Strength,
         Agility = stats.Agility,
         AttackPower = stats.AttackPower,
         // Ratings
         CritRating = stats.CritRating,
         HitRating = stats.HitRating,
         HasteRating = stats.HasteRating,
         ExpertiseRating = stats.ExpertiseRating,
         MasteryRating = stats.MasteryRating,
         // Bonuses
         WeaponDamage = stats.WeaponDamage,
         ArmorPenetration = stats.ArmorPenetration,
         TargetArmorReduction = stats.TargetArmorReduction,
         PhysicalCrit = stats.PhysicalCrit,
         PhysicalHaste = stats.PhysicalHaste,
         PhysicalHit = stats.PhysicalHit,
         SpellHit = stats.SpellHit,
         // Boss Handler
         MovementSpeed = stats.MovementSpeed,
         StunDurReduc = stats.StunDurReduc,
         SnareRootDurReduc = stats.SnareRootDurReduc,
         FearDurReduc = stats.FearDurReduc,
         DisarmDurReduc = stats.DisarmDurReduc,
         // Target Debuffs
         BossAttackSpeedReductionMultiplier = stats.BossAttackSpeedReductionMultiplier,
         // Procs
         DarkmoonCardDeathProc = stats.DarkmoonCardDeathProc,
         HighestStat = stats.HighestStat,
         HighestSecondaryStat = stats.HighestSecondaryStat,
         Paragon = stats.Paragon,
         ManaorEquivRestore = stats.ManaorEquivRestore,
         // Damage Procs
         ShadowDamage = stats.ShadowDamage,
         ArcaneDamage = stats.ArcaneDamage,
         HolyDamage = stats.HolyDamage,
         NatureDamage = stats.NatureDamage,
         FrostDamage = stats.FrostDamage,
         FireDamage = stats.FireDamage,
         BonusShadowDamageMultiplier = stats.BonusShadowDamageMultiplier,
         BonusArcaneDamageMultiplier = stats.BonusArcaneDamageMultiplier,
         BonusHolyDamageMultiplier = stats.BonusHolyDamageMultiplier,
         BonusNatureDamageMultiplier = stats.BonusNatureDamageMultiplier,
         BonusFrostDamageMultiplier = stats.BonusFrostDamageMultiplier,
         BonusFireDamageMultiplier = stats.BonusFireDamageMultiplier,
         // Multipliers
         BonusAgilityMultiplier = stats.BonusAgilityMultiplier,
         BonusStrengthMultiplier = stats.BonusStrengthMultiplier,
         BonusAttackPowerMultiplier = stats.BonusAttackPowerMultiplier,
         BonusBleedDamageMultiplier = stats.BonusBleedDamageMultiplier,
         BonusDamageMultiplier = stats.BonusDamageMultiplier,
         BonusWhiteDamageMultiplier = stats.BonusWhiteDamageMultiplier,
         BonusPhysicalDamageMultiplier = stats.BonusPhysicalDamageMultiplier,
         BonusCritDamageMultiplier = stats.BonusCritDamageMultiplier,
         BonusCritChance = stats.BonusCritChance,
         BonusPeriodicDamageMultiplier = stats.BonusPeriodicDamageMultiplier,
         // Set Bonuses
         // Special
         BonusRageGen = stats.BonusRageGen,
         #endregion
         #region Survivability Stats
         Stamina = stats.Stamina,
         Health = stats.Health,
         BonusStaminaMultiplier = stats.BonusStaminaMultiplier,
         BonusHealthMultiplier = stats.BonusHealthMultiplier,
         HealthRestore = stats.HealthRestore,
         HealthRestoreFromMaxHealth = stats.HealthRestoreFromMaxHealth,
         Armor = stats.Armor,
         BonusArmor = stats.BonusArmor,
         BaseArmorMultiplier = stats.BaseArmorMultiplier,
         BonusArmorMultiplier = stats.BonusArmorMultiplier,
         DamageTakenReductionMultiplier = stats.DamageTakenReductionMultiplier,
         BossPhysicalDamageDealtReductionMultiplier = stats.BossPhysicalDamageDealtReductionMultiplier,
         BonusHealingDoneMultiplier = stats.BonusHealingDoneMultiplier, // not really rel but want it if it's available on something else
         #endregion
     };
     foreach (SpecialEffect effect in stats.SpecialEffects()) {
         if (RelevantTriggers.Contains(effect.Trigger) && (HasRelevantStats(effect.Stats) || HasSurvivabilityStats(effect.Stats)))
         {
             relevantStats.AddSpecialEffect(effect);
         }
     }
     return relevantStats;
 }
开发者ID:LucasPeacecraft,项目名称:rawr,代码行数:88,代码来源:CalculationsDPSWarr.cs

示例10: LordRhyolith

        public LordRhyolith()
        {
            // If not listed here use values from defaults
            #region Info
            Name = "Lord Rhyolith";
            Instance = "Firelands";
            Content = new BossHandler.TierLevels[] { BossHandler.TierLevels.T12_10, BossHandler.TierLevels.T12_25, BossHandler.TierLevels.T12_10H, BossHandler.TierLevels.T12_25H, BossHandler.TierLevels.T12_LFR };
            #endregion
            #region Basics
            // Lord Rhyolith has three parts, Left Leg, Right Leg, Chest
            // Legs health are tied together
            // All three have low health, however they start out with an 80% damage
            // reduction applied to them.
            Health = new float[] { 13100001f, 40000000f, 20000000f, 60000004f, 0 };
            MobType = (int)MOB_TYPES.ELEMENTAL;
            // Assume people can withstand being in Superheaded for 1 minute
            // Superheated happens after 6 minutes on normal and 5 minutes on heroic
            BerserkTimer = new int[] { 480, 480, 400, 400, 0 };
            SpeedKillTimer = new int[] { 5 * 60, 5 * 60, 5 * 60, 5 * 60, 0 };
            InBackPerc_Melee = new double[] { 0.95f, 0.95f, 0.95f, 0.95f, 0 };
            InBackPerc_Ranged = new double[] { 0.00f, 0.00f, 0.00f, 0.00f, 0 };
            Max_Players = new int[] { 10, 25, 10, 25, 0 };
            Min_Tanks = new int[] { 1, 1, 2, 2, 0 }; // Most guilds will only use 1 tank for the adds on normal, 2 on heroic.
            Min_Healers = new int[] { 2, 5, 3, 5, 0 };
            #endregion
            #region Offensive
            #region Attacks
            for (int i = 0; i < 4; i++)
            {
                Phase ObsidianForm = new Phase() { Name = "Stage One: Nuisances, Nuisances!" };
                Phase LiquidForm = new Phase() { Name = "Stage Two: Now you will BURN!" };

                // He doesn't have a default melee attack during Obsidian Form (p1)

                #region Obsidian Form
                /* Lord Rhyolith ignores players while his armor is intact, but they can attack his feet to
                 * control his movement.*/

                #region Obsidian Armor
                /* Lord Rhyolish awakens encrusted in a thick coat of Obsidian Armor, which reduces all damage
                 * he takes by 80%. Lord Rhyolith's Obsidian Armor is reduced every time he steps on an active
                 * volcano.
                 * 
                 * *Warning* When damaged, Lord Rhyolith's armor comes to life. If not killed, it will restore
                 * 1% of his armor.*/
                // http://ptr.wowhead.com/spell=98632
                Stats ObsidianArmor = new Stats();
                ObsidianArmor.BonusDamageMultiplier = -0.80f;
                BuffState ObsidianArmorBuffState;
                float superheated = 0f;
                if (i < 2)
                {
                    superheated = 6f * 60f;
                    int StacksNormal = 80 / 16;
                    SpecialEffect ObsidianArmorSpecialEffectNormal = new SpecialEffect(Trigger.Use, new Stats() { BonusDamageMultiplier = 0.16f, }, superheated, superheated / StacksNormal, 1f, StacksNormal);
                    ObsidianArmor.AddSpecialEffect(ObsidianArmorSpecialEffectNormal);
                }
                else
                {
                    superheated = 5f * 60f;
                    int StacksHeroic = 80 / 10;
                    SpecialEffect ObsidianArmorSpecialEffectHeroic = new SpecialEffect(Trigger.Use, new Stats() { BonusDamageMultiplier = 0.10f, }, superheated, superheated / StacksHeroic, 1f, StacksHeroic);
                    ObsidianArmor.AddSpecialEffect(ObsidianArmorSpecialEffectHeroic);
                }
                ObsidianArmorBuffState = new BuffState
                {
                    Name = "Obsidian Armor",
                    Chance = 1f,
                    Duration = superheated * 1000f,
                    Frequency = BerserkTimer[i] - 1f,
                    Breakable = false,
                    Stats = ObsidianArmor,
                };
                ObsidianArmorBuffState.SetAffectsRoles_All();
                ObsidianForm.BuffStates.Add(ObsidianArmorBuffState);
                #endregion

                #region Liquid Obsidian
                /* The Liquid Obsidian attempts to move within 5 yards of Lord Rhyolith, then use the Fuse
                 * ability on him.*/
                // http://db.mmo-champion.com/c/52619/liquid-obsidian/ (Elemental)
                // Only happens on heroic
                if (i > 1)
                {
                    TargetGroup LiquidObsidian = new TargetGroup
                    {
                        Name = "Liquid Obsidian",
                        NumTargs = 5,
                        LevelOfTargets = 85,
                        Frequency = (5f * 60f) / 8f, // all 40 should be released by the 5 minute mark
                        Duration = 20f * 1000f,
                    };
                    LiquidObsidian.SetAffectsRoles_DPS();
                    ObsidianForm.Targets.Add(LiquidObsidian);

                    #region Fuse
                    /* Fuse
                     * The Liquid Obsidian fuses to Lord Rhyolith granting him an additional 1% of damage reduction.*/
                    // http://ptr.wowhead.com/spell=99875
                    // This should not happen
//.........这里部分代码省略.........
开发者ID:LucasPeacecraft,项目名称:rawr,代码行数:101,代码来源:BossesT12.cs

示例11: GetRelevantStats

        public override Stats GetRelevantStats(Stats stats)
        {
            Stats relevantStats = new Stats {
               Agility = stats.Agility,
               Strength = stats.Strength,
               AttackPower = stats.AttackPower,
               CritRating = stats.CritRating,
               HitRating = stats.HitRating,
               Stamina = stats.Stamina,
               HasteRating = stats.HasteRating,
               ExpertiseRating = stats.ExpertiseRating,
               MasteryRating = stats.MasteryRating,
               TargetArmorReduction = stats.TargetArmorReduction,
               WeaponDamage = stats.WeaponDamage,
               BonusAgilityMultiplier = stats.BonusAgilityMultiplier,
               BonusAttackPowerMultiplier = stats.BonusAttackPowerMultiplier,
               BonusCritDamageMultiplier = stats.BonusCritDamageMultiplier,
               BonusDamageMultiplier = stats.BonusDamageMultiplier,
               BonusStaminaMultiplier = stats.BonusStaminaMultiplier,
               BonusStrengthMultiplier = stats.BonusStrengthMultiplier,
               Health = stats.Health,
               ThreatReductionMultiplier = stats.ThreatReductionMultiplier,
               PhysicalHaste = stats.PhysicalHaste,
               PhysicalHit = stats.PhysicalHit,
               PhysicalCrit = stats.PhysicalCrit,
               HighestStat = stats.HighestStat,
               MoteOfAnger = stats.MoteOfAnger,

               BonusPhysicalDamageMultiplier = stats.BonusPhysicalDamageMultiplier,
               BonusBleedDamageMultiplier = stats.BonusBleedDamageMultiplier,
               SpellHit = stats.SpellHit,
               SpellCrit = stats.SpellCrit,
               SpellCritOnTarget = stats.SpellCritOnTarget,

                // Damage Procs
               ShadowDamage = stats.ShadowDamage,
               ArcaneDamage = stats.ArcaneDamage,
               HolyDamage = stats.HolyDamage,
               NatureDamage = stats.NatureDamage,
               FrostDamage = stats.FrostDamage,
               FireDamage = stats.FireDamage,
               BonusShadowDamageMultiplier = stats.BonusShadowDamageMultiplier,
               BonusArcaneDamageMultiplier = stats.BonusArcaneDamageMultiplier,
               BonusHolyDamageMultiplier = stats.BonusHolyDamageMultiplier,
               BonusNatureDamageMultiplier = stats.BonusNatureDamageMultiplier,
               BonusFrostDamageMultiplier = stats.BonusFrostDamageMultiplier,
               BonusFireDamageMultiplier = stats.BonusFireDamageMultiplier,
               FangsoftheFatherMultiplier = stats.FangsoftheFatherMultiplier,

               // BossHandler
               SnareRootDurReduc = stats.SnareRootDurReduc,
               FearDurReduc = stats.FearDurReduc,
               StunDurReduc = stats.StunDurReduc,
               MovementSpeed = stats.MovementSpeed,
            };

            foreach (SpecialEffect effect in stats.SpecialEffects())
            {
                if (effect.Trigger == Trigger.Use || effect.Trigger == Trigger.MeleeCrit || effect.Trigger == Trigger.MeleeHit
                    || effect.Trigger == Trigger.PhysicalCrit || effect.Trigger == Trigger.PhysicalHit || effect.Trigger == Trigger.DoTTick
                    || effect.Trigger == Trigger.DamageDone || effect.Trigger == Trigger.DamageOrHealingDone || effect.Trigger == Trigger.SpellHit
                    || effect.Trigger == Trigger.MeleeAttack || effect.Trigger == Trigger.PhysicalAttack || effect.Trigger == Trigger.EnergyOrFocusDropsBelow20PercentOfMax)
                {
                    if (HasRelevantStats(effect.Stats))
                    {
                        relevantStats.AddSpecialEffect(effect);
                    }
                }
            }

            return relevantStats;
        }
开发者ID:LucasPeacecraft,项目名称:rawr,代码行数:72,代码来源:CalculationsRogue.cs

示例12: Ragnaros


//.........这里部分代码省略.........
                // 10-man - http://ptr.wowhead.com/spell=99399
                // 25-man - http://ptr.wowhead.com/spell=101238
                // 10-man Heroic - http://ptr.wowhead.com/spell=101239
                // 25-man Heroic - http://ptr.wowhead.com/spell=101240
                // 5 second cooldown on application
                // Only allow 4 stacks to be applied
                float BurningWoundDamage = new float[] { (3656f + 3843f), (3656f + 3843f), (5386f + 5663f), (5386f + 5663f), 0f }[i] / 2f;
                Attack BurningWound = new Attack
                {
                    Name = "Burning Wound",
                    AttackSpeed = 40f,
                    AttackType = ATTACK_TYPES.AT_MELEE,
                    DamageType = ItemDamageType.Fire,
                    // Average damage after the stacking equates to ABOUT 1.3 times the base damage
                    DamagePerTick = BurningWoundDamage * 1.3f,
                    TickInterval = 2f,
                    Duration = 20f + 20f, // 20 seconds to stack the debuff, 20 seconds to let it drop
                    IsDoT = true,
                    SpellID = new float[] { 99399, 101238, 101239, 101240, 0 }[i],
                };
                BurningWound.SetAffectsRoles_Tanks();
                ByFirebePurged.Attacks.Add(BurningWound);

                #region Burning Blast
                /* Inflicts 1950 to 2050 Fire damage, each stack of Burning Wound increases the damage of
                 * Burning Blast.*/
                // 10-man - http://ptr.wowhead.com/spell=99400
                // 25-man - http://ptr.wowhead.com/spell=101241
                // 10-man Heroic - http://ptr.wowhead.com/spell=101242
                // 25-man Heroic - http://ptr.wowhead.com/spell=101243
                float BurningBlastDamaage = (1950f + 2050f) / 2f;
                Stats BurningBlastStat = new Stats();
                SpecialEffect BurningBlastSpecialEffect = new SpecialEffect(Trigger.PhysicalAttack, new Stats() { FireDamage = BurningBlastDamaage }, 20f, 5f, 1f, 4);
                BurningBlastStat.AddSpecialEffect(BurningBlastSpecialEffect);
                BurningBlastSpecialEffect = new SpecialEffect(Trigger.Use, BurningBlastStat, 40f, 40f, 1f);
                BurningBlastStat = new Stats();
                BurningBlastStat.AddSpecialEffect(BurningBlastSpecialEffect);
                BuffState BurningBlast = new BuffState
                {
                    Name = "Burning Blast",
                    Frequency = 40f,
                    Duration = 40f * 1000f,
                    Chance = 1f,
                    Breakable = false,
                    Stats = BurningBlastStat,
                };
                BurningBlast.SetAffectsRoles_Tanks();
                ByFirebePurged.BuffStates.Add(BurningBlast);
                #endregion
                #endregion
                #endregion

                #region Intermission: Minions of Fire!
                /* At 70% health, Ragnaros will cast Splitting Blow wedging Sulfuras into the platform and creating
                 * Sons of Flame across the platform. Ragnaros will stay submerged for 45 seconds or until all of the
                 * Sons of Flame are destroyed.*/

                #region Splitting Blow
                /* Ragnaros buries Sulfuras within the platform, creating Sons of Flame that attempt to reach the
                 * mighty hammer.*/
                /* 12 different ids all with the same descriptions:
                 * http://ptr.wowhead.com/spell=98951; http://ptr.wowhead.com/spell=98952; http://ptr.wowhead.com/spell=98953
                 * http://ptr.wowhead.com/spell=100877; http://ptr.wowhead.com/spell=100878; http://ptr.wowhead.com/spell=100879
                 * http://ptr.wowhead.com/spell=100880; http://ptr.wowhead.com/spell=100881; http://ptr.wowhead.com/spell=100882
                 * http://ptr.wowhead.com/spell=100883; http://ptr.wowhead.com/spell=100884; http://ptr.wowhead.com/spell=100885*/
                // initial Summon Sons trigger - http://ptr.wowhead.com/spell=99012
开发者ID:LucasPeacecraft,项目名称:rawr,代码行数:67,代码来源:BossesT12.cs

示例13: MajordomoStaghelm


//.........这里部分代码省略.........
                MTMeleeTemp = MTMelee0Stacks.Clone();
                MTMeleeTemp.Name = "Main Taink Melee - Eight Stacks";
                MTMeleeTemp.DamagePerHit *= 1.80f;
                ScorpionPhase5.Attacks.Add(MTMeleeTemp);

                MTMeleeTemp = MTMelee0Stacks.Clone();
                MTMeleeTemp.Name = "Main Taink Melee - Nine Stacks";
                MTMeleeTemp.DamagePerHit *= 1.90f;
                CatPhase5.Attacks.Add(MTMeleeTemp);

                MTMeleeTemp = MTMelee0Stacks.Clone();
                MTMeleeTemp.Name = "Main Taink Melee - Ten Stacks";
                MTMeleeTemp.DamagePerHit *= 2.00f;
                ScorpionPhase6.Attacks.Add(MTMeleeTemp);

                MTMeleeTemp = MTMelee0Stacks.Clone();
                MTMeleeTemp.Name = "Main Taink Melee - Eleven Stacks";
                MTMeleeTemp.DamagePerHit *= 2.10f;
                CatPhase6.Attacks.Add(MTMeleeTemp);
                #endregion

                #region Concentration [Heroic Only]
                /* Each player who engages Fandral on heroic difficulty is granted a Concentration power bar.
                 * This bar fills over time, increasing damage and healing done by 25% for every 25 Concentration
                 * up to 100. Players hit by a damaging attack or spell will lose all currently accumulated
                 * Concentration.*/
                // http://ptr.wowhead.com/spell=98229
                // Uncommon (25%) - http://ptr.wowhead.com/spell=98254
                // Rare (50%) - http://ptr.wowhead.com/spell=98254
                // Epic (75%) - http://ptr.wowhead.com/spell=98252
                // Legendary (100%) - http://ptr.wowhead.com/spell=98245
                Stats ConcentrationStat = new Stats();
                SpecialEffect ConcentrationSpecialEffect = new SpecialEffect ( Trigger.Use, new Stats() { BonusDamageMultiplier = 0.25f, BonusHealingDoneMultiplier = 0.25f }, BerserkTimer[i], 5f, 1, 4 );
                ConcentrationStat.AddSpecialEffect(ConcentrationSpecialEffect);
                if (i > 1)
                {
                    BuffState Concentration = new BuffState
                    {
                        Name = "Concentration",
                        Frequency = 1f,
                        Duration = BerserkTimer[i] * 1000f,
                        Chance = 1f,
                        Breakable = false,
                        Stats = ConcentrationStat,
                    };
                    // Do to the fact that this only triggers when NOT getting hit, the tank will not be able to gain any stacks
                    Concentration.SetAffectsRoles_DPS();
                    Concentration.SetAffectsRoles_Healers();
                    ShapeshiftingPhase1.BuffStates.Add(Concentration);
                    ShapeshiftingPhase2.BuffStates.Add(Concentration);
                    ShapeshiftingPhase3.BuffStates.Add(Concentration);
                    ShapeshiftingPhase4.BuffStates.Add(Concentration);
                    ShapeshiftingPhase5.BuffStates.Add(Concentration);
                    ShapeshiftingPhase6.BuffStates.Add(Concentration);
                }
                #endregion

                #region Behold the Rage of the Firelands!
                /* Fandral transforms into a Cat when his enemies are not clustered together or into a Scorpion when
                 * 7 or more of his enemies are clustered together.*/

                #region Cat Form
                // Fandral transforms into a Cat when his enemies are not clustered together.
                // http://db.mmo-champion.com/c/53145/

                #region Leaping Flames
开发者ID:LucasPeacecraft,项目名称:rawr,代码行数:67,代码来源:BossesT12.cs

示例14: Baleroc

        // The tank and healing check of the raid instance
        // ALMOST a Patchwork fight
        public Baleroc()
        {
            // If not listed here use values from defaults
            #region Info
            Name = "Baleroc, the Gatekeeper";
            Instance = "Firelands";
            Content = new BossHandler.TierLevels[] { BossHandler.TierLevels.T12_10, BossHandler.TierLevels.T12_25, BossHandler.TierLevels.T12_10H, BossHandler.TierLevels.T12_25H, BossHandler.TierLevels.T12_LFR };
            #endregion
            #region Basics
            Health = new float[] { 31565310f, 99978288f, 59428676f, 166239664f, 0 };
            MobType = (int)MOB_TYPES.ELEMENTAL;
            BerserkTimer = new int[] { 6 * 60, 6 * 60, 6 * 60, 6 * 60, 0 };
            SpeedKillTimer = new int[] { 5 * 60, 5 * 60, 5 * 60, 5 * 60, 0 };
            InBackPerc_Melee = new double[] { 0.95f, 0.95f, 0.95f, 0.95f, 0 };
            InBackPerc_Ranged = new double[] { 0.00f, 0.00f, 0.00f, 0.00f, 0 };
            Max_Players = new int[] { 10, 25, 10, 25, 0 };
            Min_Tanks = new int[] { 2, 2, 2, 2, 0 };
            Min_Healers = new int[] { 3, 5, 3, 5, 0 };
            #endregion
            #region Offensive
            #region Attacks
            for (int i = 0; i < 4; i++)
            {
                Phase Normal = new Phase() { Name = "Normal Phase" };
                Phase DecimationBlade = new Phase() { Name = "Decimation Blade" };
                Phase InfernoBlade = new Phase() { Name = "Inferno Blade" };
                Phase BothPhases = new Phase() { Name = "Both Phases" };

                Attack Melee = GenAStandardMelee(this[i].Content);
                Melee.IsDualWielding = true;
                Melee.AffectsRole[PLAYER_ROLES.MainTank] = true;
                Normal.Attacks.Add(Melee);

                #region Blaze of Glory
                /* Baleroc's assault periodically awakens a burning spark within his primary target, increasing the
                 * target's physical damage taken by 20%, but also raising their maximum health by 20%.
                 * 
                 * Every time Baleroc applies Blaze of Glory, he gains an application of Incendiary Soul, increasing Fire
                 * damage done by 20%.*/
                // http://ptr.wowhead.com/spell=99252
                // He averages out to applying this once every 12 seconds
                Stats BlazeofGloryStats = new Stats();
                SpecialEffect BlazeofGlorySpecialEffect = new SpecialEffect(Trigger.Use, new Stats() { BonusHealthMultiplier = 0.2f, DamageTakenReductionMultiplier = -0.20f }, BerserkTimer[i], 12f, 1f, 99);
                BlazeofGloryStats.AddSpecialEffect(BlazeofGlorySpecialEffect);
                BuffState BlazeofGlory = new BuffState
                {
                    Name = "Blaze of Glory",
                    Chance = 1,
                    Frequency = BerserkTimer[i],
                    Stats = BlazeofGloryStats,
                    Breakable = false,
                    Duration = BerserkTimer[i] * 1000f,
                };
                BlazeofGlory.SetAffectsRoles_Tanks();
                BothPhases.BuffStates.Add(BlazeofGlory);

                /* Incendiary Soul
                 * Every time Baleroc applies Blaze of Glory, he gains an application of Incendiary Soul, increasing Fire
                 * damage done by 20%.*/
                // http://ptr.wowhead.com/spell=99369
                Stats IncendiarySoulStat = new Stats();
                SpecialEffect IncendiarySoulSpecialEffect = new SpecialEffect(Trigger.Use, new Stats() { FireDamageTakenMultiplier = 0.20f }, BerserkTimer[i], 12f, 1f, 99);
                IncendiarySoulStat.AddSpecialEffect(IncendiarySoulSpecialEffect);
                BuffState IncendiarySoul = new BuffState
                {
                    Name = "Incendiary Soul",
                    Chance = 1,
                    Frequency = BerserkTimer[i],
                    Stats = IncendiarySoulStat,
                    Breakable = false,
                    Duration = BerserkTimer[i] * 1000f,
                };
                IncendiarySoul.SetAffectsRoles_Tanks();
                BothPhases.BuffStates.Add(IncendiarySoul);
                #endregion

                #region Shards of Torment
                /* Baleroc summons *warning* two chrystals *end warning* amonst his foes, which continually channel
                 * a shadowy beam on the player that is nearest to them.*/
                // Summon - http://ptr.wowhead.com/spell=99260
                // NPC - http://db.mmo-champion.com/c/53495/
                float ShardofTormentDebuff = new float[] { 40, 60, 40, 60 }[i];

                #region Torment
                // Deals 3500 Shadow damage per application to the nearest player, stacking once per second.
                // 10 man - http://ptr.wowhead.com/spell=99256
                // 25 man - http://ptr.wowhead.com/spell=100230
                // 10 man heroic - http://ptr.wowhead.com/spell=100231
                // 25 man heroic - http://ptr.wowhead.com/spell=100232
                // At most people should be taking 12 stacks of Torment
                float TormentDamageMultiplier = (1 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11) / 12f;
                float Affected = ((i == 0) || (i == 2 ) ? 1f : 2f );
                Attack Torment = new Attack
                {
                    Name = "Torment",
                    AttackSpeed = 34f,
                    DamagePerTick = new float[] { 3000, 3000, 4250, 4250, 0 }[i] * TormentDamageMultiplier,
                    IsDoT = true,
//.........这里部分代码省略.........
开发者ID:LucasPeacecraft,项目名称:rawr,代码行数:101,代码来源:BossesT12.cs

示例15: GetRelevantStats

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


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