Beispiel #1
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()));
        }
        public static Composite ElementalCombat()
        {
            return(new PrioritySelector(
                       Common.CreateInterruptBehavior(),
                       new Decorator(ret => AdvancedAI.Burst && Me.CurrentTarget.IsBoss(),
                                     new PrioritySelector(
                                         Spell.Cast("Elemental Mastery"),
                                         Spell.Cast("Ascendance", ret => Me.CurrentTarget.CachedGetAuraTimeLeft("Flame Shock") > 18 && Me.CachedHasAura("Elemental Mastery")),
                                         Spell.Cast("Fire Elemental Totem", ret => Me.CurrentTarget.TimeToDeath() > (TalentManager.HasGlyph("Fire Elemental Totem") ? 30 : 60)),
                                         Spell.Cast("Earth Elemental Totem", ret => Me.CurrentTarget.TimeToDeath() > 60 && Spell.GetSpellCooldown("Fire Elemental Totem").TotalSeconds > 61),
                                         Spell.Cast("Stormlash Totem", ret => PartyBuff.WeHaveBloodlust))),

                       Spell.WaitForCast(),
                       Spell.Cast("Thunderstorm", ret => Me.ManaPercent < 60 && TalentManager.HasGlyph("Thunderstorm")),

                       new Decorator(ret => Unit.UnfriendlyUnitsNearTargetFacing(10).Count() >= 4,
                                     AOE()),

                       Spell.Cast("Spiritwalker's Grace", ret => Me.IsMoving && !SpellManager.Spells["Lava Burst"].Cooldown),
                       Spell.Cast("Flame Shock", on => FlameShockTar, ret => FlameShockTar.CachedHasAuraDown("Flame Shock", 1, true, 3)),
                       Spell.Cast("Lava Burst"),
                       Spell.Cast("Elemental Blast"),
                       Spell.Cast("Earth Shock", ret => Me.CachedHasAura("Lightning Shield", Unit.UnfriendlyUnitsNearTargetFacing(10).Count() > 2 ? 7 : 6)),
                       Spell.Cast("Searing Totem", ret => !Totems.ExistInRange(Me.CurrentTarget.Location, WoWTotem.Searing)),
                       Spell.Cast(Unit.UnfriendlyUnitsNearTargetFacing(10).Count() > 1 ? "Chain Lightning" : "Lightning Bolt")));
        }
        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()));
        }
        public static Composite WindwalkerCombat()
        {
            return(new PrioritySelector(
                       //new Decorator(ret => AdvancedAI.PvPRot,
                       //    BrewmasterMonkPvP.CreateBMPvPCombat),

                       /*Things to fix
                        * energy capping
                        * need to check healing spheres
                        * chi capping? need to do more checking
                        */
                       new Decorator(ret => !Me.Combat,
                                     new ActionAlwaysSucceed()),
                       Spell.Cast("Spear Hand Strike", ret => StyxWoW.Me.CurrentTarget.IsCasting && StyxWoW.Me.CurrentTarget.CanInterruptCurrentSpellCast),

                       Spell.WaitForCastOrChannel(),

                       //Detox
                       CreateDispelBehavior(),
                       //Healing Spheres need to work on
                       //Spell.CastOnGround("Healing Sphere", on => Me.Location, ret => Me.HealthPercent <= 50),

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

                       //Tigerseye
                       Spell.Cast("Tigereye Brew", ret => Me.CachedHasAura("Tigereye Brew", 19)),

                       Spell.Cast("Energizing Brew", ret => Me.CurrentEnergy < 25),

                       // Execute if we can
                       Spell.Cast("Touch of Death", ret => Me.CurrentChi >= 3 && Me.CachedHasAura("Death Note")),

                       Spell.Cast("Tiger Palm", ret => Me.CurrentChi > 0 &&
                                  (!Me.CachedHasAura("Tiger Power") || Me.CachedHasAura("Tiger Power") && Me.CachedGetAuraTimeLeft("Tiger Power") <= 3)),

                       //Need to do some Thinking on Adding Detox to My Self might use this pre fight not for sure yet
                       //Spell.Cast("Detox", on => Me, ret =>

                       Spell.Cast("Invoke Xuen, the White Tiger", ret => AdvancedAI.Burst),

                       Spell.Cast("Rising Sun Kick"),

                       //Spell ID 116740 = Tigerseye Brew the dmg buff part not the brewing
                       Spell.Cast("Fists of Fury", ret => Unit.NearbyUnfriendlyUnits.Count(u => u.IsWithinMeleeRange && Me.IsSafelyFacing(u)) >= 1 &&
                                  !Me.HasAura("Energizing Brew") && Me.HasAura(116740) && Me.GetAuraTimeLeft(116740).TotalSeconds >= 4 &&
                                  Me.EnergyPercent <= 65 && !PartyBuff.WeHaveBloodlust && !Me.IsMoving),

                       //Chi Talents
                       Spell.Cast("Chi Wave", ret => Me.EnergyPercent < 40),
                       //need to do math here and make it use 2 if im going to use it
                       //Spell.Cast("Zen Sphere", ret => !Me.HasAura("Zen Sphere")),

                       // free Tiger Palm or Blackout Kick... do before Jab
                       Spell.Cast("Blackout Kick", ret => Me.CachedHasAura("Combo Breaker: Blackout Kick")),

                       Spell.Cast("Tiger Palm", ret => Me.CachedHasAura("Combo Breaker: Tiger Palm")),

                       Spell.Cast("Spinning Crane Kick", ret => Unit.UnfriendlyUnits(8).Count() >= 4 && AdvancedAI.Aoe),
                       Spell.Cast("Rushing Jade Wind", ret => Unit.UnfriendlyUnits(8).Count() >= 3 && AdvancedAI.Aoe),

                       Spell.Cast("Expel Harm", ret => Me.CurrentChi <= 2 && Me.HealthPercent < 80),

                       Spell.Cast("Jab", ret => Me.CurrentChi <= 2),

                       // chi dump
                       Spell.Cast("Blackout Kick", ret => Me.CurrentChi >= 2 && SpellManager.Spells["Rising Sun Kick"].CooldownTimeLeft.TotalSeconds > 1),



                       new ActionAlwaysSucceed()));
        }