public static Composite RestorationPreCombatBuffs()
 {
     return(new PrioritySelector(
                //new Decorator(ret => AdvancedAI.PvPRot,
                //    RestorationShamanPvP.CreateRSPvPBuffs),
                Spell.Cast("Water Shield", on => Me, ret => !Me.CachedHasAura("Water Shield")),
                CreateShamanImbueMainHandBehavior(Imbue.Earthliving, Imbue.Flametongue)));
 }
Beispiel #2
0
 public static Composite ShadowPreCombatBuffs()
 {
     return(new PrioritySelector(
                //new Decorator(ret => AdvancedAI.PvPRot,
                //    ShadowPriestPvP.CreateSPPvPBuffs),
                PartyBuff.BuffGroup("Power Word: Fortitude"),
                Spell.Cast("Shadowform", ret => !Me.CachedHasAura("Shadowform")),
                Spell.Cast("Inner Fire", ret => !Me.HasAura("Inner Fire"))));
 }
Beispiel #3
0
        //private static int BloodRuneSlotsActive { get { return Me.GetRuneCount(0) + Me.GetRuneCount(1); } }
        //private static int FrostRuneSlotsActive { get { return Me.GetRuneCount(2) + Me.GetRuneCount(3); } }
        //private static int UnholyRuneSlotsActive { get { return Me.GetRuneCount(4) + Me.GetRuneCount(5); } }


        public static Composite BloodCombat()
        {
            return(new PrioritySelector(
                       Common.CreateInterruptBehavior(),
                       new Decorator(ret => Me.CurrentTarget != null && (Me.IsCasting || Me.IsChanneling),
                                     new ActionAlwaysSucceed()),
                       //Spell.WaitForCastOrChannel(),
                       CreateApplyDiseases(),
                       BloodCombatBuffs(),

                       new Decorator(ret => Settings.UseDarkCommand,
                                     Spell.Cast("Dark Command")),

                       new Decorator(ret => AdvancedAI.LFRMode,
                                     CreateAFK()),

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

                       new Decorator(ret => Unit.UnfriendlyUnits(12).Count() >= 2 && !Me.HasAura("Unholy Blight") && AdvancedAI.Aoe && ShouldSpreadDiseases,
                                     new Throttle(1, 2,
                                                  new PrioritySelector(
                                                      Spell.Cast("Blood Boil", ret => SpellManager.HasSpell("Roiling Blood")),
                                                      Spell.Cast("Pestilence", ret => !SpellManager.HasSpell("Roiling Blood"))))),

                       Spell.Cast("Death Strike", ret => Me.HealthPercent < 40 ||
                                  (Me.UnholyRuneCount + Me.FrostRuneCount + Me.DeathRuneCount >= 4) ||
                                  (Me.HealthPercent < 90 && (Me.GetAuraTimeLeft("Blood Shield").TotalSeconds < 2)) ||
                                  IsCurrentTank() && !Me.CachedHasAura("Blood Shield") ||
                                  Me.HasAura("Blood Charge", 10)),
                       DnD(),
                       Spell.Cast("Blood Boil", ret => Me.HasAura(81141) && AdvancedAI.Aoe && !SpellManager.CanCast("Death and Decay")),
                       Spell.Cast("Rune Tap", ret => Me.HealthPercent <= 80 && Me.BloodRuneCount >= 1, true),

                       new Decorator(ret => Me.CurrentRunicPower >= 30 && !Me.HasAura("Lichborne"),
                                     Spell.Cast("Rune Strike", ret => (Me.CurrentRunicPower >= 60 || Me.HealthPercent > 90) &&
                                                (Me.UnholyRuneCount == 0 || Me.FrostRuneCount == 0 || Me.BloodRuneCount == 0))),

                       Spell.Cast("Soul Reaper", ret => Me.BloodRuneCount > 0 && Me.CurrentTarget != null && Me.CurrentTarget.HealthPercent <= 35),
                       Spell.Cast("Blood Boil", ret => AdvancedAI.Aoe && !SpellManager.CanCast("Death and Decay") && Unit.UnfriendlyUnits(10).Count() >= 3 && Me.BloodRuneCount > 0),
                       Spell.Cast("Heart Strike", ret => Me.BloodRuneCount > 0),
                       Spell.Cast("Horn of Winter", ret => Me.CurrentRunicPower < 90)));
        }
Beispiel #4
0
 private static Composite BloodCombatBuffs()
 {
     return(new PrioritySelector(
                Spell.Cast("Dancing Rune Weapon", ret => IsCurrentTank(), true),
                Spell.Cast("Blood Tap", ret => Me.HasAura("Blood Charge", 5) && Me.HealthPercent < 90 && !SpellManager.CanCast("Death Strike") && (BloodRuneSlotsActive == 0 || FrostRuneSlotsActive == 0 || UnholyRuneSlotsActive == 0)),
                Spell.Cast("Bone Shield", ret => !Me.HasAura("Bone Shield"), true),
                Spell.Cast("Conversion", ret => Me.HealthPercent < 60 && Me.RunicPowerPercent > 20 && !Me.CachedHasAura("Conversion")),
                Spell.Cast("Conversion", ret => Me.HealthPercent > 90 && Me.CachedHasAura("Conversion")),
                Spell.Cast("Vampiric Blood", ret => Me.HealthPercent < 60 &&
                           (!Me.HasAnyAura("Bone Shield", "Vampiric Blood", "Dancing Rune Weapon", "Lichborne", "Icebound Fortitude")), true),
                Spell.Cast("Icebound Fortitude", ret => Me.HealthPercent < 30 &&
                           (!Me.HasAnyAura("Bone Shield", "Vampiric Blood", "Dancing Rune Weapon", "Lichborne", "Icebound Fortitude"))),
                Spell.Cast("Might of Ursoc", ret => Me.HealthPercent < 60),
                Spell.Cast("Raise Dead", ret => Me.HealthPercent < 45 && !GhoulMinionIsActive),
                Spell.Cast("Death Pact", ret => Me.HealthPercent < 45),
                //Spell.Cast("Army of the Dead", ret => Me.HealthPercent < 40),
                Spell.Cast("Empower Rune Weapon", ret => Me.HealthPercent < 45 && !SpellManager.CanCast("Death Strike")),
                Spell.Cast("Blood Tap", ret => Me.HasAura("Blood Charge", 10) && (BloodRuneSlotsActive == 0 || FrostRuneSlotsActive == 0 || UnholyRuneSlotsActive == 0)),
                Spell.Cast("Plague Leech", ret => CanCastPlagueLeech)));
 }
Beispiel #5
0
        private static Composite AfflictionCombatBuffs()
        {
            return(new PrioritySelector(

                       // Symbiosis
                       Spell.Cast("Rejuvenation", on => Me, ret => Me.HasAuraExpired("Rejuvenation", 1) && Me.HealthPercent < 95),

                       // won't live long with no Pet, so try to summon
                       //new Decorator(ret => GetCurrentPet() == WarlockPet.None && GetBestPet() != WarlockPet.None,
                       //    SummonPet()),

                       new Decorator(req => !Me.CurrentTarget.IsTrivial(),
                                     new PrioritySelector(
                                         Spell.Cast("Twilight Ward", ret => NeedTwilightWard && !Me.CachedHasAura("Twilight Ward")),
                                         // need combat healing?  check here since mix of buffs and abilities
                                         // heal / shield self as needed
                                         Spell.Cast("Dark Regeneration", ret => Me.HealthPercent < 45),
                                         new Decorator(
                                             ret => StyxWoW.Me.HealthPercent < 60 || Me.CachedHasAura("Dark Regeneration"),
                                             new PrioritySelector(
                                                 ctx => Item.FindFirstUsableItemBySpell("Healthstone", "Life Spirit"),
                                                 new Decorator(
                                                     ret => ret != null,
                                                     new Sequence(
                                                         new Action(ret => Logging.Write("Using {0}", ((WoWItem)ret).Name)),
                                                         new Action(ret => ((WoWItem)ret).UseContainerItem()),
                                                         Common.CreateWaitForLagDuration())))),


                                         new PrioritySelector(
                                             // find an add within 8 yds (not our current target)
                                             ctx => Unit.UnfriendlyUnits(8).FirstOrDefault(u => (u.Combat || Battlegrounds.IsInsideBattleground) && !u.IsStunned() && u.CurrentTargetGuid == Me.Guid && Me.CurrentTargetGuid != u.Guid),

                                             Spell.CastOnGround("Shadowfury", on => ((WoWUnit)on).Location, ret => ret != null),

                                             // treat as a heal, but we cast on what would be our fear target -- allow even when fear use disabled
                                             Spell.Cast("Mortal Coil", on => (WoWUnit)on, ret => !((WoWUnit)ret).IsUndead && Me.HealthPercent < 50),

                                             new Decorator(ret => (Me.GotTarget && AdvancedAI.Burst && (!Me.HasAura(113860) && SpellManager.CanCast(113860)) && (Me.CurrentTarget.IsPlayer || Me.CurrentTarget.IsBoss() || Me.CurrentTarget.TimeToDeath() > 20)) || Unit.NearbyUnfriendlyUnits.Count(u => u.IsTargetingMeOrPet) >= 3,
                                                           new PrioritySelector(
                                                               Spell.Cast("Dark Soul: Misery"))),

                                             Spell.Cast("Summon Doomguard", ret => AdvancedAI.Burst && Me.CurrentTarget.IsBoss() && (PartyBuff.WeHaveBloodlust || Me.CurrentTarget.HealthPercent <= 20)),

                                             // lower threat if tanks nearby to pickup
                                             Spell.Cast("Soulshatter",
                                                        ret => AdvancedAI.CurrentWoWContext == WoWContext.Instances &&
                                                        Group.AnyTankNearby &&
                                                        Unit.UnfriendlyUnits(30).Any(u => u.CurrentTargetGuid == Me.Guid)),

                                             // lower threat if voidwalker nearby to pickup
                                             Spell.Cast("Soulshatter",
                                                        ret => AdvancedAI.CurrentWoWContext != WoWContext.Battlegrounds &&
                                                        !Group.AnyTankNearby &&
                                                        GetCurrentPet() == WarlockPet.Voidwalker &&
                                                        Unit.UnfriendlyUnits(30).Any(u => u.CurrentTargetGuid == Me.Guid)),

                                             Spell.Cast("Dark Bargain", ret => Me.HealthPercent < 45),
                                             Spell.Cast("Sacrificial Pact", ret => Me.HealthPercent < 60 && GetCurrentPet() != WarlockPet.None && GetCurrentPet() != WarlockPet.Other && Me.Pet.HealthPercent > 50),

                                             new Decorator(ret => Me.HealthPercent < 40 && !Group.AnyHealerNearby,
                                                           new Sequence(
                                                               new PrioritySelector(
                                                                   CastSoulburn(ret => Spell.CanCastHack("Drain Life", Me.CurrentTarget)),
                                                                   new ActionAlwaysSucceed()),
                                                               Spell.Cast("Drain Life"))),

                                             new Decorator(ret => Unit.NearbyUnfriendlyUnits.Count(u => u.IsTargetingMeOrPet) >= 3 || Unit.NearbyUnfriendlyUnits.Any(u => u.IsPlayer && u.IsTargetingMeOrPet),
                                                           new PrioritySelector(
                                                               Spell.Cast("Dark Soul: Misery"),
                                                               Spell.Cast("Unending Resolve"),
                                                               new Decorator(ret => TalentManager.IsSelected((int)WarlockTalents.GrimoireOfService),
                                                                             new PrioritySelector(
                                                                                 Spell.Cast("Grimoire: Felhunter", ret => AdvancedAI.CurrentWoWContext == WoWContext.Battlegrounds),
                                                                                 //Spell.Cast("Grimoire: Voidwalker", ret => GetCurrentPet() != WarlockPet.Voidwalker),
                                                                                 Spell.Cast("Grimoire: Felhunter", ret => GetCurrentPet() != WarlockPet.Felhunter))))),
                                             new Decorator(ret => !Me.IsInGroup(),
                                                           HealthFunnel(40, 95)),
                                             Spell.Cast("Life Tap", ret => Me.ManaPercent < 30 && Me.HealthPercent > 85),
                                             PartyBuff.BuffGroup("Dark Intent"),

                                             new Decorator(ret => Me.GotTarget && Unit.ValidUnit(Me.CurrentTarget) && (Me.CurrentTarget.IsPlayer || Me.CurrentTarget.TimeToDeath() > 45),
                                                           new Throttle(2,
                                                                        new PrioritySelector(
                                                                            Spell.Cast("Curse of the Elements",
                                                                                       ret => !Me.CurrentTarget.CachedHasAura("Curse of the Elements") &&
                                                                                       !Me.CurrentTarget.HasMyAura("Curse of Enfeeblement") &&
                                                                                       !Me.CurrentTarget.HasAuraWithEffect(WoWApplyAuraType.ModDamageTaken)),
                                                                            Spell.Cast("Curse of Enfeeblement",
                                                                                       ret => !Me.CurrentTarget.CachedHasAura("Curse of Enfeeblement") &&
                                                                                       !Me.CurrentTarget.HasMyAura("Curse of the Elements") &&
                                                                                       !Me.CurrentTarget.HasDemoralizing())))),

                                             // mana restoration - match against survival cooldowns
                                             new Decorator(ret => Me.ManaPercent < 60,
                                                           new PrioritySelector(
                                                               Spell.BuffSelf("Life Tap", ret => Me.HealthPercent > 50 && Me.HasAnyAura("Unending Resolve")),
                                                               Spell.BuffSelf("Life Tap", ret => Me.HasAnyAura("Sacrificial Pact")),
                                                               Spell.BuffSelf("Life Tap", ret => Me.HasAnyAura("Dark Bargain"))))
                                             )))));
        }
Beispiel #6
0
        private static Composite DnD()
        {
            return(new Decorator(ret => SpellManager.CanCast("Death and Decay") && AdvancedAI.Aoe && (Unit.UnfriendlyUnits(12).Count() >= 3 || Me.CachedHasAura(81141)),
                                 new Action(ret =>
            {
                var tpos = StyxWoW.Me.CurrentTarget.Location;

                SpellManager.Cast("Death and Decay");
                SpellManager.ClickRemoteLocation(tpos);
            })));
        }
Beispiel #7
0
        /*Had some issues here and had to use spell ids... so heres the id and the spell
         * 132158 = Nature's Swiftness
         * 5185 = Healing Touch
         * 108381 = Dream of Cenarius (Damage part)
         */

        public static Composite FeralCombat()
        {
            return(new PrioritySelector(
                       // Interrupt please.
                       Spell.Cast("Skull Bash", ret => Me.CurrentTarget.IsCasting && StyxWoW.Me.CurrentTarget.CanInterruptCurrentSpellCast),
                       Spell.WaitForCastOrChannel(),
                       new Decorator(ret => Me.CurrentTarget != null && (!Me.CurrentTarget.IsWithinMeleeRange || Me.IsCasting),
                                     new ActionAlwaysSucceed()),

                       new Throttle(1,
                                    new Action(context => ResetVariables())),

                       new Decorator(ret => Me.CachedHasAura("Tiger's Fury"),
                                     new PrioritySelector(
                                         new Action(ret => { Item.UseHands(); return RunStatus.Failure; }),
                                         new Action(ret => { Item.UseTrinkets(); return RunStatus.Failure; }),
                                         Spell.Cast("Feral Spirit", ret => AdvancedAI.Burst))),
//~	3.18	ferocious_bite,if=dot.rip.ticking&dot.rip.remains<=3&target.health.pct<=25
                       Spell.Cast("Ferocious Bite", ret => Me.CurrentTarget.CachedGetAuraTimeLeft("Rip") <= 3 && Me.CurrentTarget.HealthPercent <= 25),
//!	0.00	faerie_fire,if=debuff.weakened_armor.stack<3
                       Spell.Cast("Faerie Fire", ret => !Me.CurrentTarget.CachedHasAura("Weakened Armor", 3)),
//"	33.73	healing_touch,if=talent.dream_of_cenarius.enabled&buff.predatory_swiftness.up&buff.dream_of_cenarius.down&(buff.predatory_swiftness.remains<1.5|combo_points>=4)
                       new Throttle(2,
                                    Spell.Cast(HealingTouch, /*on => healtarget, */
                                               ret => Me.CachedHasAura("Predatory Swiftness") && !Me.CachedHasAura(DreamofCenarius) &&
                                               (Me.CachedGetAuraTimeLeft("Predatory Swiftness") <= 1.5 || Me.ComboPoints >= 4))),
//#	16.25	savage_roar,if=buff.savage_roar.remains<3
                       Spell.Cast("Savage Roar", ret => Me.CachedGetAuraTimeLeft("Savage Roar") < 3 || !Me.CachedHasAura("Savage Roar")),
//%	14.85	tigers_fury,if=energy<=35&!buff.omen_of_clarity.react
                       Spell.Cast("Tiger's Fury", ret => Me.EnergyPercent <= 35 && !Me.ActiveAuras.ContainsKey("Clearcasting")),
//&	2.92	berserk,if=buff.tigers_fury.up
                       Spell.Cast("Berserk", ret => Me.CachedHasAura("Tiger's Fury") && AdvancedAI.Burst),
//*	1.00	rip,if=combo_points>=5&target.health.pct<=25&action.rip.tick_damage%dot.rip.tick_dmg>=1.15

//+	4.05	ferocious_bite,if=combo_points>=5&target.health.pct<=25&dot.rip.ticking
                       Spell.Cast("Ferocious Bite", ret => Me.ComboPoints >= 5 && Me.CurrentTarget.HealthPercent <= 25 && Me.CurrentTarget.CachedHasAura("Rip")),
//,	14.16	rip,if=combo_points>=5&dot.rip.remains<2
                       Spell.Cast("Rip", ret => Me.ComboPoints == 5 && (Me.CurrentTarget.CachedGetAuraTimeLeft("Rip") <= 2 || !Me.CurrentTarget.CachedHasAura("Rip"))),
//-	3.18	thrash_cat,if=buff.omen_of_clarity.react&dot.thrash_cat.remains<3
                       Spell.Cast("Thrash", ret => Me.ActiveAuras.ContainsKey("Clearcasting") && (Me.CurrentTarget.CachedGetAuraTimeLeft("Thrash") < 3 || !Me.CurrentTarget.CachedHasAura("Thrash"))),
//:	56.31	rake,if=dot.rake.remains<3|action.rake.tick_damage>dot.rake.tick_dmg
                       Spell.Cast("Rake", ret => Me.CurrentTarget.GetAuraTimeLeft("Rake").TotalSeconds <= 3 || !Me.CurrentTarget.CachedHasAura("Rake")),
//;	77.39	pool_resource,for_next=1

//<	22.45	thrash_cat,if=dot.thrash_cat.remains<3&(dot.rip.remains>=8&buff.savage_roar.remains>=12|buff.berserk.up|combo_points>=5)
                       Spell.Cast("Thrash", ret => Me.CurrentTarget.CachedGetAuraTimeLeft("Thrash") < 3 && (Me.CurrentTarget.CachedGetAuraTimeLeft("Rip") >= 8 &&
                                                                                                            (Me.CachedGetAuraTimeLeft("Savage Roar") >= 12 || Me.CachedHasAura("Berserk") || Me.ComboPoints == 5))),
//=	129.32	pool_resource,if=combo_points>=5&!(energy.time_to_max<=1|(buff.berserk.up&energy>=25))&dot.rip.ticking

//>	6.49	ferocious_bite,if=combo_points>=5&dot.rip.ticking
                       Spell.Cast("Ferocious Bite", ret => Me.ComboPoints >= 5 && Me.CurrentTarget.HasMyAura("Rip") && Me.CurrentTarget.CachedGetAuraTimeLeft("Rip") > 7 && Me.CachedGetAuraTimeLeft("Savage Roar") > 6),
//    6.78	rake,if=target.time_to_die-dot.rake.remains>3&action.rake.tick_damage*(dot.rake.ticks_remain+1)-dot.rake.tick_dmg*dot.rake.ticks_remain>action.mangle_cat.hit_damage

//actions.aoe+=/swipe_cat,if=buff.savage_roar.remains<=5.
//actions.aoe+=/swipe_cat,if=buff.tigers_fury.up|buff.berserk.up.
//actions.aoe+=/swipe_cat,if=cooldown.tigers_fury.remains<3
//actions.aoe+=/swipe_cat,if=buff.omen_of_clarity.react.
//actions.aoe+=/swipe_cat,if=energy.time_to_max<=1
                       Spell.Cast("Swipe", ret => Unit.UnfriendlyUnits(8).Count() >= 2 &&
                                  (Me.CachedGetAuraTimeLeft("Savage Roar") <= 5 || Me.ActiveAuras.ContainsKey("Clearcasting") ||
                                   Me.CachedHasAura("Berserk") || Me.CachedHasAura("Tiger's Fury") || Spell.GetSpellCooldown("Tiger's Fury").TotalSeconds <= 3)),

//.	22.37	shred,if=(buff.omen_of_clarity.react|buff.berserk.up|energy.regen>=15)&buff.king_of_the_jungle.down
                       Spell.Cast("Shred", ret => Me.CurrentTarget.MeIsSafelyBehind || Me.ActiveAuras.ContainsKey("Clearcasting") || Me.CachedHasAura("Berserk") || EnergyRegen >= 15),
//.	64.76	mangle_cat,if=buff.king_of_the_jungle.down
                       Spell.Cast("Mangle")));

            #region Old dps
//                new Throttle(Spell.Cast("Nature's Vigil", ret => Me.CachedHasAura("Berserk"))),
//                Spell.Cast("Incarnation", ret => Me.CachedHasAura("Berserk")),
//                Spell.CastOnGround("Force of Nature",
//                                    u => (Me.CurrentTarget ?? Me).Location,
//                                    ret => StyxWoW.Me.CurrentTarget != null
//                                    && StyxWoW.Me.CurrentTarget.Distance < 40),
//                new Throttle(1,1,
//                Spell.Cast(HealingTouch, ret => (Me.CachedHasAura("Predatory Swiftness") && Me.GetAuraTimeLeft("Predatory Swiftness").TotalSeconds <= 1.5 && !Me.CachedHasAura(DreamofCenarius)) ||
//                                                (Me.CachedHasAura("Predatory Swiftness") && Me.ComboPoints >= 4 && (Me.CachedHasAura(DreamofCenarius) && Me.CachedStackCount(DreamofCenarius) <= 1 || !Me.CachedHasAura(DreamofCenarius))))),

//                Spell.Cast("Savage Roar", ret => !Me.CachedHasAura("Savage Roar")),
//                Spell.Cast("Faerie Fire", ret => !Me.CurrentTarget.CachedHasAura("Weakened Armor", 3)),
//                //healing_touch,if=buff.predatory_swiftness.up&(combo_points>=4|(set_bonus.tier15_2pc_melee&combo_points>=3))&buff.dream_of_cenarius_damage.stack<2
//                Spell.Cast(HealingTouch, ret => Me.CachedHasAura("Predatory Swiftness") && Me.ComboPoints >= 4 && (Me.CachedHasAura(DreamofCenarius) && Me.CachedStackCount(DreamofCenarius) <= 1 || !Me.CachedHasAura(DreamofCenarius))),
//                //Spell.Cast(HealingTouch, ret => Me.CachedHasAura("Nature's Swiftness")),
//                //use_item,name=eternal_blossom_grips,sync=tigers_fury
//                new Decorator(ret => Me.CachedHasAura("Tiger's Fury"),
//                    new PrioritySelector(
//                        new Action(ret => { Item.UseHands(); return RunStatus.Failure; }),
//                        new Action(ret => { Item.UseTrinkets(); return RunStatus.Failure; }))),
//                Spell.Cast("Tiger's Fury", ret => Me.EnergyPercent <= 35 && !Me.ActiveAuras.ContainsKey("Clearcasting") && !Me.CachedHasAura("Berserk")),
//                Spell.Cast("Berserk", ret => Me.CachedHasAura("Tiger's Fury") && AdvancedAI.Burst),
//                Spell.Cast("Ferocious Bite", ret => Me.ComboPoints >= 1 && Me.CurrentTarget.CachedHasAura("Rip") && (Me.CurrentTarget.GetAuraTimeLeft("Rip").TotalSeconds <= 3 && Me.CurrentTarget.HealthPercent <= 25)),
//                Spell.Cast("Thrash", ret => Me.CurrentTarget.TimeToDeath() >= 6 && Me.ActiveAuras.ContainsKey("Clearcasting") && Me.CurrentTarget.GetAuraTimeLeft("Thrash").TotalSeconds <= 3),
//                Spell.Cast("Ferocious Bite", ret => Me.ComboPoints >= 5 && Me.CurrentTarget.TimeToDeath() <= 4 || Me.CurrentTarget.TimeToDeath() <= 1 && Me.ComboPoints >= 3),
//                Spell.Cast("Savage Roar", ret => Me.HasAuraExpired("Savage Roar", 3) && Me.ComboPoints == 0 && Me.CurrentTarget.HealthPercent <= 25),
//                //Spell.Cast(NaturesSwiftness, ret => !Me.CachedHasAura(DreamofCenarius) && !Me.CachedHasAura("Predatory Swiftness") && Me.ComboPoints >= 4 && Me.CurrentTarget.HealthPercent <= 25),
//                Spell.Cast("Rip", ret => Me.ComboPoints == 5 && Me.CachedHasAura(DreamofCenarius) && Me.CurrentTarget.HealthPercent <= 25 && Me.CurrentTarget.TimeToDeath() >= 30),
//                //pool_resource,wait=0.25,if=combo_points>=5&dot.rip.ticking&target.health.pct<=25&((energy<50&buff.berserk.down)|(energy<25&buff.berserk.remains>1))
//                //PoolinResources(),
//                // Spell.Cast("Rip", ret => Me.ComboPoints == 5 && !Me.CurrentTarget.HasMyAura("Rip")),
//                Spell.Cast("Ferocius Bite", ret => Me.ComboPoints >= 5 && Me.CurrentTarget.HasMyAura("Rip") && Me.CurrentTarget.HealthPercent <= 25 && (Me.ComboPoints >= 5 && Me.CurrentTarget.HasMyAura("Rip") && Me.CurrentTarget.HealthPercent <= 25 && ((Me.CurrentEnergy < 50 && !Me.CachedHasAura("Berserk")) || (Me.CurrentEnergy < 25 && Me.GetAuraTimeLeft("Berserk").TotalSeconds > 1)))),
//                Spell.Cast("Rip", ret => Me.ComboPoints == 5 && (Me.CurrentTarget.HasMyAura("Rip") && Me.CurrentTarget.GetAuraTimeLeft("Rip").TotalSeconds <= 3 || !Me.CurrentTarget.HasMyAura("Rip")) && Me.CachedHasAura(DreamofCenarius)),
//                //Spell.Cast(NaturesSwiftness, ret => !Me.CachedHasAura(DreamofCenarius) && !Me.CachedHasAura("Predatory Swiftness") && Me.ComboPoints >= 4 && Me.CurrentTarget.GetAuraTimeLeft("Rip").TotalSeconds <= 3),
//                Spell.Cast("Rip", ret => Me.ComboPoints == 5 && Me.CurrentTarget.TimeToDeath() >= 6 && Me.CurrentTarget.HasAuraExpired("Rip", 2) && (Me.CachedHasAura("Berserk") || Me.CurrentTarget.GetAuraTimeLeft("Rip").TotalSeconds + 1.9 <= SpellManager.Spells["Tiger's Fury"].CooldownTimeLeft.TotalSeconds)),
//                Spell.Cast("Savage Roar", ret => Me.HasAuraExpired("Savage Roar", 3) && Me.ComboPoints == 0 && Me.GetAuraTimeLeft("Savage Roar").TotalSeconds + 2 <= Me.CurrentTarget.GetAuraTimeLeft("Rip").TotalSeconds),
//                Spell.Cast("Savage Roar", ret => Me.HasAuraExpired("Savage Roar", 6) && Me.ComboPoints >= 5 && Me.GetAuraTimeLeft("Savage Roar").TotalSeconds + 2 <= Me.CurrentTarget.GetAuraTimeLeft("Rip").TotalSeconds),
//                //pool_resource,wait=0.25,if=combo_points>=5&((energy<50&buff.berserk.down)|(energy<25&buff.berserk.remains>1))&dot.rip.remains>=6.5
//                //PoolResources(),
//                Spell.Cast("Ferocious Bite", ret => Me.ComboPoints >= 5 && Me.CurrentTarget.GetAuraTimeLeft("Rip").TotalSeconds >= 6 && (Me.ComboPoints >= 5 && ((Me.CurrentEnergy < 50 && !Me.CachedHasAura("Berserk")) || (Me.CurrentEnergy < 25 && Me.GetAuraTimeLeft("Berserk").TotalSeconds > 1)) && Me.CurrentTarget.GetAuraTimeLeft("Rip", true).TotalSeconds >= 6.5)),
//                Spell.Cast("Rake", ret => Me.CurrentTarget.GetAuraTimeLeft("Rake").TotalSeconds <= 9 && Me.CachedHasAura(DreamofCenarius)),
//                Spell.Cast("Rake", ret => Me.CurrentTarget.GetAuraTimeLeft("Rake").TotalSeconds <= 3),
//                //pool_resource,wait=0.25,for_next=1
//                Spell.Cast("Thrash", ret => Me.CurrentTarget.GetAuraTimeLeft("Rake").TotalSeconds <= 3 && Me.CurrentTarget.TimeToDeath() >= 6 && (Me.CurrentTarget.GetAuraTimeLeft("Rake").TotalSeconds >= 4 || Me.CachedHasAura("Berserk"))),
//                Spell.Cast("Thrash", ret => Me.CurrentTarget.GetAuraTimeLeft("Rake").TotalSeconds <= 3 && Me.CurrentTarget.TimeToDeath() >= 6 && Me.ComboPoints == 5),
//                Spell.Cast("Shred", ret => Me.ActiveAuras.ContainsKey("Clearcasting") && Me.CurrentTarget.MeIsSafelyBehind || Me.ActiveAuras.ContainsKey("Clearcasting") && Me.HasAnyAura("Tiger's Fury", "Berserk")),
//                Spell.Cast("Shred", ret => Me.CachedHasAura("Berserk")),
//                Spell.Cast("Mangle", ret => Me.ComboPoints <= 5 && Me.CurrentTarget.GetAuraTimeLeft("Rip").TotalSeconds <= 3 || Me.ComboPoints == 0 && Me.HasAuraExpired("Savage Roar", 2)),
//                Spell.Cast("Shred", ret => (Me.CurrentTarget.MeIsSafelyBehind || (TalentManager.HasGlyph("Shred") && (Me.HasAnyAura("Tiger's Fury", "Berserk"))))),
//                Spell.Cast("Mangle", ret => !Me.CurrentTarget.MeIsBehind));
            #endregion
        }
        public static Composite RestorationCombat()
        {
            HealerManager.NeedHealTargeting = true;
            //var cancelHeal = Math.Max(95, Math.Max(AvehealingWave(), Math.Max(AvegreaterhealingWave(), AvehealingSurge())));//95,93,55,25
            var cancelHeal = Math.Max(95, Math.Max(93, Math.Max(55, 25)));//95,93,55,25

            return(new PrioritySelector(
                       Spell.WaitForCastOrChannel(),
                       //new Decorator(ret => AdvancedAI.PvPRot,
                       //    RestorationShamanPvP.CreateRSPvPCombat),
                       new Decorator(ret => (Me.Combat || healtarget.Combat /*|| healtarget.GetPredictedHealthPercent() <= 99*/) && !Me.Mounted,
                                     new PrioritySelector(
                                         //Totems.CreateTotemsBehavior(),
                                         RollRiptide(),
                                         TidalWaves(),
                                         new Decorator(ret => AdvancedAI.Dispell,
                                                       Dispelling.CreateDispelBehavior()),
                                         Item.UsePotionAndHealthstone(40),
                                         new Throttle(1, 1,
                                                      new PrioritySelector(
                                                          Spell.Cast("Earth Shield",
                                                                     on => GetBestEarthShieldTargetInstance(),
                                                                     ret => !GetBestEarthShieldTargetInstance().CachedHasAura("Earth Shield")))),
                                         Spell.Cast("Spirit Link Totem",
                                                    on => healtarget,
                                                    ret => HealerManager.Instance.TargetList.Count(p => p.GetPredictedHealthPercent() < 40 && p.Distance <= Totems.GetTotemRange(WoWTotem.SpiritLink)) >= 3 && AdvancedAI.Burst),
                                         new Decorator(ret => healtarget.HealthPercent < 25,
                                                       new Sequence(
                                                           Spell.Cast("Ancestral Swiftness"),
                                                           Spell.Cast("Greater Healing Wave",
                                                                      on => healtarget))),
                                         Spell.Cast("Healing Tide Totem",
                                                    ret => Me.Combat && HealerManager.Instance.TargetList.Count(p => p.GetPredictedHealthPercent() < 60 && p.Distance <= Totems.GetTotemRange(WoWTotem.HealingTide)) >= (Me.GroupInfo.IsInRaid ? 3 : 2) && AdvancedAI.Burst),
                                         Spell.Cast("Healing Stream Totem",
                                                    ret => Me.Combat && !Totems.Exist(WoWTotemType.Water) && HealerManager.Instance.TargetList.Any(p => p.GetPredictedHealthPercent() < 95 && p.Distance <= Totems.GetTotemRange(WoWTotem.HealingTide))),
                                         Spell.Cast("Mana Tide Totem",
                                                    ret => !Totems.Exist(WoWTotemType.Water) && Me.ManaPercent < 80),
                                         HealingRain(),
                                         ChainHeal(),
                                         Spell.Cast("Elemental Blast",
                                                    on => BoltTar()),
                                         //ret => SpellManager.HasSpell("Elemental Blast"),
                                         //cancel => healtarget.HealthPercent < 40),
                                         Spell.Cast("Greater Healing Wave",
                                                    on => healtarget,
                                                    //ret => AvegreaterhealingWave() < Deficit(),//55
                                                    ret => healtarget.HealthPercent <55,
                                                                                     cancel => healtarget.HealthPercent> cancelHeal),
                                         Spell.Cast("Healing Wave",
                                                    on => healtarget,
                                                    //ret => AvehealingWave() < Deficit(),//93
                                                    ret => healtarget.HealthPercent <93,
                                                                                     cancel => healtarget.HealthPercent> cancelHeal),
                                         Spell.Cast("Healing Surge",
                                                    on => healtarget,
                                                    //ret => AvehealingSurge() < Deficit(),//25
                                                    ret => healtarget.HealthPercent <25,
                                                                                     cancel => healtarget.HealthPercent> cancelHeal),
                                         Spell.Cast("Ascendance",
                                                    ret => HealerManager.Instance.TargetList.Count(p => p.GetPredictedHealthPercent() < 50) >= 4 && !Me.CachedHasAura("Ascendance") && AdvancedAI.Burst),
                                         Riptide(),
                                         new Decorator(ret => AdvancedAI.InterruptsEnabled,
                                                       Common.CreateInterruptBehavior()),
                                         //Totems.CreateTotemsBehavior(),
                                         Spell.Cast("Lightning Bolt",
                                                    on => BoltTar(),
                                                    ret => TalentManager.HasGlyph("Telluric Currents"),
                                                    cancel => healtarget.HealthPercent < 70)))));
        }