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()));
        }