예제 #1
0
        static Composite CreateTauntBehavior()
        {
            // limit all taunt attempts to 1 per second max since Mocking Banner and Taunt have no GCD
            // .. it will keep us from casting both for the same mob we lost aggro on
            return(new Throttle(1, 1,
                                new PrioritySelector(
                                    Spell.CastOnGround("Mocking Banner",
                                                       ret => (TankManager.Instance.NeedToTaunt.FirstOrDefault() ?? Me).Location,
                                                       ret => TankManager.Instance.NeedToTaunt.Any() && Clusters.GetCluster(TankManager.Instance.NeedToTaunt.FirstOrDefault(), TankManager.Instance.NeedToTaunt, ClusterType.Radius, 15f).Count() >= 2),

                                    Spell.Cast("Taunt", ret => TankManager.Instance.NeedToTaunt.FirstOrDefault()),

                                    Spell.Cast("Storm Bolt", ctx => TankManager.Instance.NeedToTaunt.FirstOrDefault(i => i.Distance < 30 && Me.IsSafelyFacing(i))),

                                    Spell.Cast("Intervene",
                                               ctx => TankManager.Instance.NeedToTaunt.FirstOrDefault(
                                                   m => Group.Healers.Any(h => m.CurrentTargetGuid == h.Guid && h.Distance < 25)),
                                               ret => !SingularSettings.Instance.DisableAllMovement && Group.Healers.Count(h => h.IsAlive && h.Distance < 40) == 1
                                               )
                                    )
                                ));
        }
예제 #2
0
        public static Composite ArmsPvPCombat()
        {
            return(new PrioritySelector(
                       new Decorator(ret => !Me.Combat && Me.IsCasting,
                                     new ActionAlwaysSucceed()),
                       CreateChargeBehavior(),
                       Spell.Cast("Rallying Cry", ret => Me.HealthPercent <= 30),
                       new Throttle(1, 1,
                                    new Sequence(
                                        CreateInterruptSpellCast(on => BestInterrupt))),
                       Item.UsePotionAndHealthstone(40),
                       Spell.Cast("Victory Rush", ret => Me.HealthPercent <= 90 && Me.CachedHasAura("Victorious")),
                       ShatterBubbles(),
                       new Decorator(ret => /*Me.CurrentTarget.IsPlayer &&*/ !Me.CurrentTarget.IsStunned() && !Me.CurrentTarget.IsCrowdControlled() && (!Me.CurrentTarget.HasAuraWithEffectsing(WoWApplyAuraType.ModDecreaseSpeed) /*w|| !Me.CurrentTarget.CachedHasAura("Hamstring")*/),
                                     new PrioritySelector(
                                         Spell.Cast("Piercing Howl"),
                                         Spell.Cast("Hamstring"))),
                       DemoBanner(),
                       HeroicLeap(),
                       MockingBanner(),
                       new Decorator(ret => AdvancedAI.Movement,
                                     new PrioritySelector(
                                         DemoBannerAuto(),
                                         MockingBannerAuto())),
                       Spell.Cast("Intervene", on => BestBanner),
                       //Spell.CastOnGround("Demoralizing Banner", on => Me.Location, ret => Me.HealthPercent < 40),
                       Spell.Cast("Disarm", ret => Me.CurrentTarget.HasAnyAura(Disarm) && !Me.CurrentTarget.HasAnyAura(DontDisarm)),
                       Spell.Cast("Die by the Sword", ret => Me.HealthPercent <= 20 /*&& Me.CurrentTarget.IsMelee()*/),
                       new Decorator(ret => AdvancedAI.Burst && Me.CurrentTarget.IsWithinMeleeRange,
                                     new PrioritySelector(
                                         Spell.Cast("Recklessness"),
                                         Spell.Cast("Bloodbath"),
                                         Spell.Cast("Avatar", ret => Me.CachedHasAura("Recklessness")),
                                         Spell.Cast("Skull Banner", ret => Me.CachedHasAura("Recklessness")))),
                       new Action(ret => { Item.UseHands(); return RunStatus.Failure; }),
                       Spell.Cast("Intervene", on => BestInterveneTarget),
                       Spell.Cast("Charge", on => ChargeInt),
                       Spell.Cast("Heroic Strike", ret => (Me.CurrentTarget.CachedHasAura("Colossus Smash") && Me.CurrentRage >= 70) || Me.CurrentRage >= 95),
                       Spell.Cast("Sweeping Strikes", ret => Unit.UnfriendlyUnits(8).Count() >= 2 && AdvancedAI.Aoe),
                       Spell.Cast("Bladestorm", ret => Me.HasAura("Bloodbath") && Me.CurrentTarget.Distance <= 8),
                       //new Decorator(ret => Me.CurrentTarget != null && SpellManager.GlobalCooldown,
                       //    new ActionAlwaysSucceed()),

                       Spell.Cast("Mortal Strike"),
                       Spell.Cast("Dragon Roar", ret => !Me.CurrentTarget.CachedHasAura("Colossus Smash") && Me.CachedHasAura("Bloodbath") && Me.CurrentTarget.Distance <= 8),
                       Spell.Cast("Colossus Smash", ret => Me.HasAuraExpired("Colossus Smash", 1)),
                       Spell.Cast("Execute", ret => Me.CurrentTarget.CachedHasAura("Colossus Smash") || Me.CachedHasAura("Recklessness") || Me.CurrentRage >= 30),
                       Spell.Cast("Dragon Roar", ret => Me.CurrentTarget.Distance <= 8 && (!Me.CurrentTarget.CachedHasAura("Colossus Smash") && Me.CurrentTarget.HealthPercent < 20) || Me.CachedHasAura("Bloodbath")),
                       Spell.Cast("Thunder Clap", ret => Clusters.GetClusterCount(Me, Unit.NearbyUnfriendlyUnits, ClusterType.Radius, 8f) >= 2 && Clusters.GetCluster(Me, Unit.NearbyUnfriendlyUnits, ClusterType.Radius, 8).Any(u => !u.HasMyAura("Deep Wounds"))),
                       Spell.Cast("Slam", ret => (Me.CurrentTarget.CachedHasAura("Colossus Smash") || Me.CachedHasAura("Recklessness")) && Me.CurrentTarget.HealthPercent >= 20),
                       Spell.Cast("Overpower", ret => Me.CurrentTarget.HealthPercent >= 20 || Me.CachedHasAura("Sudden Execute")),
                       Spell.Cast("Execute", ret => !Me.CachedHasAura("Sudden Execute")),
                       Spell.Cast("Slam", ret => Me.CurrentRage >= 40 && Me.CurrentTarget.HealthPercent >= 20),
                       Spell.Cast("Battle Shout"),
                       Spell.Cast("Heroic Throw"),
                       Spell.Cast("Impending Victory", ret => Me.CurrentTarget.HealthPercent > 20 || Me.HealthPercent < 50),
                       new Decorator(ret => AdvancedAI.Movement,
                                     Movement.CreateMoveToMeleeBehavior(true)),
                       new ActionAlwaysSucceed()));
        }
예제 #3
0
        public static Composite BrewmasterCombat()
        {
            return(new PrioritySelector(
                       new Throttle(1,
                                    new Action(context => ResetVariables())),

                       /*Things to fix
                        * using glyph of expel harm to heal ppl dont want to have to page heal manger if i dont have to to keep it faster i guess
                        */
                       new Decorator(ret => !Me.Combat,
                                     new ActionAlwaysSucceed()),
                       Spell.Cast("Spear Hand Strike", ret => StyxWoW.Me.CurrentTarget.IsCasting && StyxWoW.Me.CurrentTarget.CanInterruptCurrentSpellCast),
                       Spell.WaitForCastOrChannel(),
                       Item.UsePotionAndHealthstone(40),
                       //new Action(ret => { Item.UseWaist(); return RunStatus.Failure; }),
                       new Action(ret => { Item.UseHands(); return RunStatus.Failure; }),

                       // Execute if we can
                       Spell.Cast("Touch of Death", ret => Me.CurrentChi >= 3 && Me.CachedHasAura("Death Note")),
                       //stance stuff need to work on it more
                       Spell.Cast("Stance of the Sturdy Ox", ret => IsCurrentTank() && !Me.HasAura("Stance of the Sturdy Ox")),

                       new Decorator(ret => Me.HasAura("Stance of the Fierce Tiger"),
                                     new PrioritySelector(
                                         HealingSphereTank(),
                                         Spell.Cast("Tiger Palm", ret => !Me.CachedHasAura("Tiger Power")),
                                         Spell.Cast("Chi Wave"),
                                         Spell.Cast("Blackout Kick"),
                                         Spell.Cast("Rushing Jade Wind", ret => Unit.UnfriendlyUnits(8).Count() >= 3),
                                         Spell.Cast("Spinning Crane Kick", ret => Unit.UnfriendlyUnits(8).Count() >= 3),
                                         Spell.Cast("Expel Harm", ret => Me.HealthPercent <= 35),
                                         Spell.Cast("Jab", ret => Me.CurrentChi <= 4),
                                         Spell.Cast("Tiger Palm"),
                                         new ActionAlwaysSucceed()
                                         )),

                       //// apply the Weakened Blows debuff. Keg Smash also generates allot of threat
                       Spell.Cast(KegSmash, ret => Me.CurrentChi <= 3 && Clusters.GetCluster(Me, Unit.NearbyUnfriendlyUnits, ClusterType.Radius, 8).Any(u => !u.CachedHasAura("Weakened Blows"))),

                       OxStatue(),
                       //Spell.CastOnGround("Summon Black Ox Statue", on => Me.Location, ret => !Me.HasAura("Sanctuary of the Ox") && AdvancedAI.UsefulStuff),

                       //PB, EB, and Guard are off the GCD
                       //!!!!!!!Purifying Brew !!!!!!!
                       Spell.Cast("Purifying Brew", ret => Me.CachedHasAura("Purifier") && (Me.CachedGetAuraTimeLeft("Purifier") <= 1) || Me.CachedHasAura("Moderate Stagger") || Me.CachedHasAura("Heavy Stagger")),
                       new Decorator(ret => Me.CurrentChi > 0,
                                     new PrioritySelector(
                                         Spell.Cast("Purifying Brew", ret => Me.CachedHasAura("Heavy Stagger")),
                                         new Decorator(ret => (Me.CachedGetAuraTimeLeft("Shuffle") >= 6 || Me.CurrentChi > 2),
                                                       new PrioritySelector(
                                                           Spell.Cast("Purifying Brew", ret => Me.CachedHasAura("Moderate Stagger") && Me.HealthPercent <= 70),
                                                           Spell.Cast("Purifying Brew", ret => Me.CachedHasAura("Light Stagger") && Me.HealthPercent < 40))))),

                       Item.UsePotionAndHealthstone(40),

                       //Elusive Brew will made auto at lower stacks when I can keep up 80 to 90% up time this is just to keep from capping
                       Spell.Cast("Elusive Brew", ret => Me.CachedHasAura("Elusive Brew", 12) && !Me.CachedHasAura(ElusiveBrew)),

                       //Guard
                       Spell.Cast("Guard", ret => Me.CurrentChi >= 2 && Me.CachedHasAura("Power Guard")),
                       //Blackout Kick might have to add guard back but i think its better to open with BK and get shuffle to build AP for Guard
                       Spell.Cast("Blackout Kick", ret => Me.CurrentChi >= 2 && !Me.CachedHasAura("Shuffle") || Me.CachedHasAura("Shuffle") && Me.CachedGetAuraTimeLeft("Shuffle") < 6),
                       Spell.Cast("Tiger Palm", ret => Me.CurrentChi >= 2 && !Me.CachedHasAura("Power Guard") || !Me.CachedHasAura("Tiger Power")),
                       Spell.Cast("Expel Harm", ret => Me.HealthPercent <= 35),
                       Spell.Cast("Breath of Fire", ret => Me.CurrentChi >= 3 && Me.CachedHasAura("Shuffle") && Me.CachedGetAuraTimeLeft("Shuffle") > 6.5 && Me.CurrentTarget.CachedHasAura("Dizzying Haze")),

                       //Detox
                       CreateDispelBehavior(),
                       Spell.Cast("Blackout Kick", ret => Me.CurrentChi >= 3),
                       Spell.Cast(KegSmash),

                       //Chi Talents
                       //need to do math here and make it use 2 if im going to use it
                       Spell.Cast("Chi Wave"),
                       //Spell.Cast("Chi Wave", on => Me, ret => Me.HealthPercent <= 85),
                       Spell.Cast("Zen Sphere", on => Tanking),

                       Spell.Cast("Expel Harm", on => EHtar, ret => Me.HealthPercent > 70 && TalentManager.HasGlyph("Targeted Expulsion")),
                       Spell.Cast("Expel Harm", ret => Me.HealthPercent <= 70 && TalentManager.HasGlyph("Targeted Expulsion") || Me.HealthPercent < 85 && !TalentManager.HasGlyph("Targeted Expulsion")),

                       //Healing Spheres need to work on not happy with this atm
                       //HealingSphere(),
                       //HealingSphereTank(),
                       //Spell.CastOnGround("Healing Sphere", on => Me.Location, ret => Me.HealthPercent <= 50 && Me.CurrentEnergy >= 60),

                       new Decorator(ret => AdvancedAI.Aoe && Spell.GetSpellCooldown("Keg Smash").TotalSeconds >= 2,
                                     new PrioritySelector(
                                         Spell.Cast("Rushing Jade Wind", ret => Unit.UnfriendlyUnits(8).Count() >= 3),
                                         Spell.Cast("Spinning Crane Kick", ret => Unit.UnfriendlyUnits(8).Count() >= 5))),

                       Spell.Cast("Jab", ret => ((Me.CurrentEnergy - 40) + (Spell.GetSpellCooldown("Keg Smash").TotalSeconds *EnergyRegen)) > 40),

                       //Spell.Cast("Jab", ret => Spell.GetSpellCooldown("Keg Smash").TotalSeconds >= (((40 - 0) * (1.0 / EnergyRegen)) / 1.6)),
                       //Spell.Cast("Jab", ret => Me.CurrentEnergy >= 80 || Spell.GetSpellCooldown("Keg Smash").TotalSeconds >= 3),

                       //dont like using this in auto to many probs with it
                       //Spell.Cast("Invoke Xuen, the White Tiger", ret => Me.CurrentTarget.IsBoss && IsCurrentTank()),
                       Spell.Cast("Tiger Palm", ret => Spell.GetSpellCooldown("Keg Smash").TotalSeconds >= 1 && Me.CurrentChi < 3 && Me.CurrentEnergy < 80),
                       new ActionAlwaysSucceed()));
        }
예제 #4
0
        public static Composite BaseRotation()
        {
            return(new Decorator(ret => !Me.IsChanneling && !Me.Mounted,
                                 new PrioritySelector(
                                     Helpers.Common.CreateInterruptSpellCast(ret => Me.CurrentTarget),
                                     //cd, cc & buff
                                     Spell.BuffSelf("Stance of the Sturdy Ox"),
                                     Spell.CastOnGround("Summon Black Ox Statue", ret => Me.CurrentTarget.Location, ret => !Me.HasAura("Sanctuary of the Ox")),
                                     Spell.BuffSelf("Fortifying Brew", ctx => Me.HealthPercent <= 40),
                                     Spell.BuffSelf("Guard", ctx => Me.HasAura("Power Guard")),
                                     Spell.Cast("Elusive Brew", ctx => Me.HasAura("Elusive Brew") && Me.Auras["Elusive Brew"].StackCount >= 9),
                                     Spell.Cast("Invoke Xuen, the White Tiger", ret => Unit.IsBoss(Me.CurrentTarget)),
                                     Spell.Cast("Paralysis", ret => Unit.NearbyUnfriendlyUnits.FirstOrDefault(u => u.Distance.Between(15, 20) && Me.IsFacing(u) && u.IsCasting && u != Me.CurrentTarget)),

                                     //rotation
                                     Spell.Cast("Keg Smash", ctx => Me.MaxChi - Me.CurrentChi >= 2),   // &&                    Clusters.GetCluster(Me, Unit.NearbyUnfriendlyUnits, ClusterType.Radius, 8).Any(u => !u.HasAura("Weakened Blows"))),
                                     Spell.CastOnGround("Dizzying Haze", ctx => TankManager.Instance.NeedToTaunt.FirstOrDefault().Location, ctx => TankManager.Instance.NeedToTaunt.Any() /* && SingularSettings.Instance.Monk.DizzyTaunt*/, false),
                                     Spell.Cast("Rushing Jade Wind", ret => Me.CurrentChi >= 2 && Me.IsSafelyFacing(Me.CurrentTarget)),

                                     // AOE
                                     new Decorator(ctx => Unit.NearbyUnfriendlyUnits.Count(u => u.DistanceSqr <= 8 * 8) >= 3,
                                                   new PrioritySelector(
                                                       Spell.Cast("Breath of Fire", ctx => Clusters.GetCluster(Me, Unit.NearbyUnfriendlyUnits, ClusterType.Cone, 8).Count(u => u.HasAura("Dizzying Haze") && !u.HasAura("Breath of Fire")) >= 3),
                                                       Spell.Cast("Leg Sweep", ctx => TalentManager.IsSelected((int)Common.Talents.LegSweep) && SingularSettings.Instance.Monk.AOEStun)
                                                       )),

                                     Spell.Cast("Blackout Kick", ctx => Me.CurrentChi >= 2),
                                     Spell.Cast("Tiger Palm", ret => !Me.HasAura("Tiger Power")),
                                     Spell.BuffSelf("Purifying Brew", ctx => Me.CurrentChi >= 1 && Me.HasAura("Moderate Stagger") || Me.HasAura("Heavy Stagger")),

                                     Spell.Cast("Keg Smash", ctx => Me.CurrentChi <= 3 && Me.CurrentEnergy >= 40),
                                     Spell.Cast("Chi Wave"),

                                     Spell.Cast("Expel Harm", ctx => Me.HealthPercent < 90 && Me.MaxChi - Me.CurrentChi >= 1 && Unit.NearbyUnfriendlyUnits.Any(u => u.DistanceSqr <= 10 * 10)),
                                     Spell.Cast("Jab", ctx => Me.MaxChi - Me.CurrentChi >= 1),

                                     // filler
                                     Spell.Cast("Tiger Palm", ret => !SpellManager.HasSpell("Blackout Kick") || SpellManager.HasSpell("Brewmaster Training")),
                                     Item.UseEquippedTrinket(TrinketUsage.OnCooldownInCombat)
                                     )
                                 ));
        }
예제 #5
0
 private static Composite CreateAoe()
 {
     return(new PrioritySelector(
                new Decorator(ret => AdvancedAI.Burst && Me.CurrentTarget.CachedHasAura("Colossus Smash"),
                              new PrioritySelector(
                                  Spell.Cast("Recklessness"),
                                  Spell.Cast("Avatar"),
                                  Spell.Cast("Skull Banner"))),
                Spell.Cast("Bloodbath"),
                new Action(ret => { Item.UseHands(); return RunStatus.Failure; }),
                Spell.Cast("Berserker Rage", ret => !Me.CachedHasAura(Enrage)),
                Spell.Cast("Sweeping Strikes"),
                Spell.Cast("Bladestorm"),
                Spell.Cast("Whirlwind", ret => (Me.CurrentTarget.CachedHasAura("Colossus Smash") && Me.CurrentRage >= 80 && Me.CurrentTarget.HealthPercent >= 20) || Me.CurrentRage >= 105),
                Spell.Cast("Mortal Strike"),
                Spell.Cast("Dragon Roar", ret => !Me.CurrentTarget.CachedHasAura("Colossus Smash") && Me.CachedHasAura("Bloodbath") && Me.CurrentTarget.Distance <= 8),
                Spell.Cast("Colossus Smash", ret => Me.CachedHasAuraDown("Colossus Smash", 1, true, 1)),
                Spell.Cast("Execute", ret => Me.CurrentTarget.CachedHasAura("Colossus Smash") || Me.CachedHasAura("Recklessness") || Me.CurrentRage >= 95),
                Spell.Cast("Dragon Roar", ret => (!Me.CurrentTarget.HasMyAura("Colossus Smash") && Me.CurrentTarget.HealthPercent < 20) || (Me.HasAura("Bloodbath") && Me.CurrentTarget.HealthPercent >= 20) && Me.CurrentTarget.Distance <= 8),
                Spell.Cast("Thunder Clap", ret => Unit.UnfriendlyUnits(8).Count() >= 3 && Clusters.GetCluster(Me, Unit.UnfriendlyUnits(8), ClusterType.Radius, 8).Any(u => !u.CachedHasAura("Deep Wounds", 1, true))),
                Spell.Cast("Slam", ret => (Me.CurrentTarget.CachedHasAura("Colossus Smash") && Me.CachedHasAura("Recklessness")) && Me.CurrentTarget.HealthPercent >= 20),
                Spell.Cast("Overpower", ret => Me.CachedHasAura("Taste for Blood", 3) && Me.CurrentTarget.HealthPercent >= 20),
                Spell.Cast("Execute", ret => !Me.CachedHasAura("Sudden Execute")),
                Spell.Cast("Overpower", ret => Me.CurrentTarget.HealthPercent >= 20 || Me.CachedHasAura("Sudden Execute")),
                Spell.Cast("Whirlwind", ret => Me.CurrentRage >= 40 && Me.CurrentTarget.HealthPercent >= 20),
                Spell.Cast("Battle Shout"),
                Spell.Cast("Heroic Throw"),
                Spell.Cast("Impending Victory", ret => Me.HealthPercent < 50)));
 }
예제 #6
0
 public static Composite ArmsCombat()
 {
     return(new PrioritySelector(
                new Decorator(ret => AdvancedAI.PvPRot,
                              ArmsWarriorPvP.ArmsPvPCombat()
                              ),
                //new Decorator(ret => Me.CurrentTarget != null && (!Me.CurrentTarget.IsWithinMeleeRange || Me.IsCasting || SpellManager.GlobalCooldown),
                //    new ActionAlwaysSucceed()),
                //new Decorator(ret => Me.CachedHasAura("Dire Fixation"),
                //    new PrioritySelector(
                //        BossMechs.HorridonHeroic())),
                new Throttle(1, 1,
                             Common.CreateInterruptBehavior()),
                Spell.Cast("Victory Rush", ret => Me.HealthPercent <= 90 && Me.CachedHasAura("Victorious")),
                Spell.Cast("Die by the Sword", ret => Me.HealthPercent <= 20),
                Item.UsePotionAndHealthstone(50),
                DemoBanner(),
                HeroicLeap(),
                //MockingBanner(),
                new Decorator(ret => Unit.UnfriendlyUnits(8).Count() >= 4,
                              CreateAoe()),
                new Decorator(ret => AdvancedAI.Burst && Me.CurrentTarget.HasMyAura("Colossus Smash"),
                              new PrioritySelector(
                                  Spell.Cast("Recklessness"),
                                  Spell.Cast("Avatar"),
                                  Spell.Cast("Skull Banner"))),
                Spell.Cast("Bloodbath"),
                new Action(ret => { Item.UseHands(); return RunStatus.Failure; }),
                Spell.Cast("Berserker Rage", ret => !Me.CachedHasAura(Enrage)),
                Spell.Cast("Sweeping Strikes", ret => Unit.UnfriendlyUnits(8).Count() >= 2),
                Spell.Cast("Heroic Strike", ret => (Me.CurrentTarget.CachedHasAura("Colossus Smash") && Me.CurrentRage >= 80 && Me.CurrentTarget.HealthPercent >= 20) || Me.CurrentRage >= 105, true),
                Spell.Cast("Mortal Strike"),
                Spell.Cast("Dragon Roar", ret => !Me.CurrentTarget.CachedHasAura("Colossus Smash") && Me.CachedHasAura("Bloodbath") && Me.CurrentTarget.Distance <= 8),
                Spell.Cast("Colossus Smash", ret => Me.CurrentTarget.CachedHasAuraDown("Colossus Smash", 1, true, 1) || !Me.CurrentTarget.HasMyAura("Colossus Smash")),
                Spell.Cast("Execute", ret => Me.CurrentTarget.HasMyAura("Colossus Smash") || Me.CachedHasAura("Recklessness") || Me.CurrentRage >= 95),
                Spell.Cast("Dragon Roar", ret => (!Me.CurrentTarget.HasMyAura("Colossus Smash") && Me.CurrentTarget.HealthPercent < 20) || (Me.HasAura("Bloodbath") && Me.CurrentTarget.HealthPercent >= 20) && Me.CurrentTarget.Distance <= 8),
                Spell.Cast("Thunder Clap", ret => Unit.UnfriendlyUnits(8).Count() >= 3 && Clusters.GetCluster(Me, Unit.UnfriendlyUnits(8), ClusterType.Radius, 8).Any(u => !u.CachedHasAura("Deep Wounds", 1, true))),
                Spell.Cast("Slam", ret => (Me.CurrentTarget.HasMyAura("Colossus Smash") && Me.CachedHasAura("Recklessness")) && Me.CurrentTarget.HealthPercent >= 20),
                Spell.Cast("Overpower", ret => Me.CachedHasAura("Taste for Blood", 3) && Me.CurrentTarget.HealthPercent >= 20 || Me.CachedHasAura("Sudden Execute")),
                Spell.Cast("Execute", ret => !Me.CachedHasAura("Sudden Execute")),
                Spell.Cast("Slam", ret => Me.CurrentRage >= 40 && Me.CurrentTarget.HealthPercent >= 20),
                Spell.Cast("Overpower", ret => Me.CurrentTarget.HealthPercent >= 20),
                Spell.Cast("Battle Shout"),
                Spell.Cast("Heroic Throw"),
                Spell.Cast("Impending Victory", ret => Me.HealthPercent < 50)));
 }
예제 #7
0
        public static Composite ProtCombat()
        {
            return(new PrioritySelector(
                       new Decorator(ret => Me.CurrentTarget != null && !Me.CurrentTarget.IsAlive && Me.IsCasting,
                                     new ActionAlwaysSucceed()),
                       //new Decorator(ret => Me.HasAura("Dire Fixation"),
                       //    new PrioritySelector(
                       //        BossMechs.HorridonHeroic())),
                       new Throttle(TimeSpan.FromMilliseconds(1500),
                                    new PrioritySelector(
                                        Common.CreateInterruptBehavior())),
                       new Decorator(ret => AdvancedAI.Burst && Me.CurrentTarget.IsWithinMeleeRange,
                                     new PrioritySelector(
                                         Spell.Cast("Recklessness"),
                                         Spell.Cast("Bloodbath"),
                                         new Decorator(ret => Me.HasAura("Recklessness"),
                                                       new PrioritySelector(
                                                           Spell.Cast("Avatar"),
                                                           Spell.Cast("Skull Banner"))))),

                       Item.UsePotionAndHealthstone(40),
                       new Action(ret => { Item.UseHands(); return RunStatus.Failure; }),

                       DemoBanner(),
                       HeroicLeap(),
                       MockingBanner(),

                       //CD's all bout living
                       Spell.Cast("Victory Rush", ret => Me.HealthPercent <= 90 && Me.CachedHasAura("Victorious")),
                       //Spell.Cast("Impending Victory", ret => Me.HealthPercent <= 85),
                       Spell.Cast("Berserker Rage", ret => NeedZerker()),
                       //!Me.HasAura(Enrage)),
                       Spell.Cast("Enraged Regeneration", ret => (Me.HealthPercent <= 80 && Me.CachedHasAura(Enrage) ||
                                                                  Me.HealthPercent <= 50 && Spell.GetSpellCooldown("Berserker Rage").TotalSeconds > 10) &&
                                  SpellManager.HasSpell("Enraged Regeneration")),
                       Spell.Cast("Last Stand", ret => Me.HealthPercent <= 15 && !Me.CachedHasAura("Shield Wall")),
                       Spell.Cast("Shield Wall", ret => Me.HealthPercent <= 30 && !Me.CachedHasAura("Last Stand")),

                       //Might need some testing
                       //new Throttle(1, 1,
                       //    new PrioritySelector(
                       //Spell.Cast("Rallying Cry", ret => HealerManager.GetCountWithHealth(55) > 4),
                       //Spell.Cast("Demoralizing Shout", ret => Unit.UnfriendlyUnits(10).Any() && IsCurrentTank()))),
                       Spell.Cast("Demoralizing Shout", ret => Me.CurrentTarget.Distance <= 10 && IsCurrentTank()),

                       Spell.Cast("Shield Block", ret => !Me.CachedHasAura("Shield Block") && IsCurrentTank() && AdvancedAI.Weave),
                       Spell.Cast("Shield Barrier", ret => Me.CurrentRage > 60 && !Me.CachedHasAura("Shield Barrier") && IsCurrentTank() && !AdvancedAI.Weave),
                       Spell.Cast("Shield Barrier", ret => Me.CurrentRage > 30 && Me.CachedHasAura("Shield Block") && Me.HealthPercent <= 70),

                       //new Decorator(ret => SpellManager.GlobalCooldown,
                       //new ActionAlwaysSucceed()),

                       Spell.Cast("Shattering Throw", ret => Me.CurrentTarget.IsBoss && PartyBuff.WeHaveBloodlust && !Me.IsMoving),

                       Spell.Cast("Shield Slam"),
                       Spell.Cast("Revenge", ret => Me.CurrentRage < 90),
                       Spell.Cast("Storm Bolt"),
                       Spell.Cast("Dragon Roar", ret => Me.CurrentTarget.Distance <= 8),
                       Spell.Cast("Execute"),
                       Spell.Cast("Thunder Clap", ret => Clusters.GetCluster(Me, Unit.NearbyUnfriendlyUnits, ClusterType.Radius, 8).Any(u => !u.CachedHasAura("Weakened Blows"))),

                       new Decorator(ret => Unit.UnfriendlyUnits(8).Count() >= 2 && AdvancedAI.Aoe,
                                     CreateAoe()),

                       Spell.Cast("Commanding Shout", ret => Me.HasPartyBuff(PartyBuffType.AttackPower)),
                       Spell.Cast("Battle Shout"),
                       Spell.Cast("Heroic Strike", ret => Me.CurrentRage > 85 || Me.CachedHasAura(122510) || Me.CachedHasAura(122016) || (!IsCurrentTank() && Me.CurrentRage > 60 && Me.CurrentTarget.IsBoss)),
                       Spell.Cast("Heroic Throw", ret => Me.CurrentTarget.Distance >= 10),
                       Spell.Cast("Devastate")));
        }