Пример #1
0
        public Composite CreateProtectionWarriorCombat()
        {
            NeedTankTargeting = true;
            return
                (new PrioritySelector(
                     CreateEnsureTarget(),
                     // Note: this will make sure we charge at any unit within proper range. (Like an actual tank would)
                     // We can cast Charge while in combat if we have the talent. [Notice that I am NOT checking for the talent!]
                     // chargeSpell.CanCast should return false if we can't cast it.
                     CreateSpellCast("Charge", ret => Me.CurrentTarget.Distance.Between(8f, TalentManager.HasGlyph("Long Charge") ? 30f : 25f)),
                     CreateSpellCast("Intercept", ret => Me.CurrentTarget.Distance.Between(8f, 25f)),
                     CreateMoveToAndFace(5f, ret => Me.CurrentTarget),
                     CreateAutoAttack(true),
                     CreateSpellCast("Heroic Strike", ret => Me.CurrentRage >= 60),
                     CreateSpellCast("Revenge"),

                     // If we have Blood and Thunder talented, then try and apply Rend via tclap. (This will apply rend to all targets!)
                     CreateSpellCast(
                         "Thunder Clap", ret => NearbyUnfriendlyUnits.Any(u => HasAuraStacks("Rend", 1, u)) && TalentManager.GetCount(3, 3) != 0),
                     CreateSpellBuff("Rend"),
                     // To be honest, we should be throwing this whenever its off CD. But we'll use it for the 20% hit speed debuff for now.
                     CreateSpellCast("Thunder Clap"),
                     new Decorator(
                         ret => NearbyUnfriendlyUnits.Count(u => u.Distance < 6) > 2,
                         new PrioritySelector(
                             CreateSpellCast("War Stomp"),
                             CreateSpellCast("Thunder Clap"),
                             CreateSpellCast("Shockwave"),
                             CreateSpellCast("Shield Block")
                             )),
                     CreateSpellCast("Victory Rush"),
                     CreateSpellCast("Arcane Torrent", ret => Me.CurrentTarget.IsCasting),
                     CreateSpellCast("Shield Bash", ret => Me.CurrentTarget.IsCasting),
                     CreateSpellCast("Shield Slam"),
                     CreateSpellBuff("Demoralizing Shout", ret => Me.CurrentRage > 30 && Me.CurrentTarget.HealthPercent > 30),
                     // Get sunders up, Devastate if we have it (extra damage) or just plain Sunder.
                     new Decorator(
                         ret => !Me.CurrentTarget.HasAura("Sunder Armor") || Me.CurrentTarget.Auras["Sunder Armor"].StackCount < 3,
                         new PrioritySelector(
                             CreateSpellCast("Devastate"),
                             CreateSpellCast("Sunder Armor")))
                     ));
        }
Пример #2
0
 public Composite CreateBeastMasterCombat()
 {
     WantedPet = "1";
     return(new PrioritySelector(
                new Decorator(
                    ret => !Me.GotAlivePet,
                    new Action(ret => PetManager.CallPet(WantedPet))),
                CreateEnsureTarget(),
                CreateHunterBackPedal(),
                // Make sure we're in range, and facing the damned target. (LOS check as well)
                CreateMoveToAndFace(35f, ret => Me.CurrentTarget),
                //Intimidation
                CreateSpellCast(
                    "Intimidation", ret => Me.CurrentTarget.IsAlive && Me.GotAlivePet &&
                    (Me.CurrentTarget.CurrentTarget == null || Me.CurrentTarget.CurrentTarget == Me)),
                // Always keep it up on our target!
                CreateSpellBuff("Hunter's Mark"),
                CreateHunterTrapOnAddBehavior(),
                new Decorator(
                    ret => Me.CurrentTarget.DistanceSqr < 5 * 5,
                    new PrioritySelector(
                        CreateSpellBuffOnSelf("Disengage"),
                        CreateSpellCast("Raptor Strike")
                        )),
                // Heal pet when below 70
                CreateSpellCast(
                    "Mend Pet",
                    ret =>
                    (Me.Pet.HealthPercent < 70 || (Me.Pet.HappinessPercent < 90 && TalentManager.HasGlyph("Mend Pet"))) && !Me.Pet.HasAura("Mend Pet")),
                CreateSpellCast(
                    "Concussive Shot",
                    ret => Me.CurrentTarget.CurrentTarget == null || Me.CurrentTarget.CurrentTarget == Me),
                //Rapid fire on elite
                CreateSpellBuffOnSelf("Rapid Fire", ret => CurrentTargetIsElite),
                CreateSpellBuff("Serpent Sting"),
                // Ignore these two when our pet is raging
                CreateSpellCast("Focus Fire", ret => !Me.Pet.HasAura("Bestial Wrath")),
                CreateSpellCast("Kill Shot", ret => !Me.Pet.HasAura("Bestial Wrath")),
                // Basically, cast it whenever its up.
                CreateSpellCast("Kill Command"),
                // Only really cast this when we need a sting refresh.
                CreateSpellCast(
                    "Cobra Shot",
                    ret => Me.CurrentTarget.HasAura("Serpent Sting") && Me.CurrentTarget.Auras["Serpent Sting"].TimeLeft.TotalSeconds < 3),
                // Focus dump on arcane shot, unless our pet has bestial wrath, then we use it for better DPS
                CreateSpellCast("Arcane Shot"),
                // For when we have no Focus
                CreateSpellCast("Steady Shot"),
                CreateAutoAttack(true)
                ));
 }
Пример #3
0
        private Composite CreateRestoDruidHealOnlyBehavior(bool selfOnly)
        {
            NeedHealTargeting = true;
            const uint MAPLE_SEED_ID = 17034;

            return(new
                   Decorator(
                       ret => HealTargeting.Instance.FirstUnit != null,
                       new PrioritySelector(
                           ctx => selfOnly ? Me : HealTargeting.Instance.FirstUnit,
                           CreateWaitForCast(),
                           // Ensure we're in range of the unit to heal, and it's in LOS.
                           //CreateMoveToAndFace(35f, ret => (WoWUnit)ret),
                           //Cast Lifebloom on tank if
                           //1- Tank doesn't have lifebloom
                           //2- Tank has less then 3 stacks of lifebloom
                           //3- Tank has 3 stacks of lifebloom but it will expire in 3 seconds
                           CreateSpellCast(
                               "Lifebloom",
                               ret =>
                               Me.Combat &&
                               // Keep 3 stacks up on the tank/leader at all times.
                               // If we're in ToL form, we can do rolling LBs for everyone. So ignore the fact that its the leader or not.
                               // LB is cheap, and VERY powerful in ToL form since you can spam it on the entire raid, for a cheap HoT and quite good 'bloom'
                               ((RaFHelper.Leader != null && (WoWUnit)ret == RaFHelper.Leader) || Me.Shapeshift == ShapeshiftForm.TreeOfLife) &&
                               ((WoWUnit)ret).HealthPercent > 60 &&
                               (!((WoWUnit)ret).HasAura("Lifebloom") || ((WoWUnit)ret).Auras["Lifebloom"].StackCount < 3 ||
                                ((WoWUnit)ret).Auras["Lifebloom"].TimeLeft <= TimeSpan.FromSeconds(3)),
                               ret => (WoWUnit)ret),
                           //Cast rebirth if the tank is dead. Check for Unburdened Rebirth glyph or Maple seed reagent
                           CreateSpellCast(
                               "Rebirth",
                               ret => Me.Combat && RaFHelper.Leader != null && (WoWUnit)ret == RaFHelper.Leader &&
                               ((WoWUnit)ret).Dead && (TalentManager.HasGlyph("Unburdened Rebirth") || Me.BagItems.Any(i => i.Entry == MAPLE_SEED_ID)),
                               ret => (WoWUnit)ret),
                           CreateSpellCast(
                               "Tranquility",
                               ret => Me.Combat && Me.IsInParty && NearbyFriendlyPlayers.Count(
                                   p =>
                                   p.IsAlive && p.HealthPercent <= SingularSettings.Instance.Druid.TranquilityHealth && p.Distance <= 30) >=
                               SingularSettings.Instance.Druid.TranquilityCount),
                           //Use Innervate on party members if we have Glyph of Innervate
                           CreateSpellBuff(
                               "Innervate",
                               ret =>
                               TalentManager.HasGlyph("Innervate") && Me.Combat && (WoWUnit)ret != Me &&
                               Me.ManaPercent <= SingularSettings.Instance.Druid.InnervateMana &&
                               ((WoWUnit)ret).PowerType == WoWPowerType.Mana && ((WoWUnit)ret).ManaPercent <= SingularSettings.Instance.Druid.InnervateMana,
                               ret => (WoWUnit)ret),
                           CreateSpellCast(
                               "Swiftmend",
                               ret => Me.Combat && ((WoWUnit)ret).HealthPercent <= SingularSettings.Instance.Druid.Swiftmend &&
                               (((WoWUnit)ret).HasAura("Rejuvenation") || ((WoWUnit)ret).HasAura("Regrowth")),
                               ret => (WoWUnit)ret),
                           CreateSpellCast(
                               "Wild Growth",
                               ret => Me.IsInParty && NearbyFriendlyPlayers.Count(
                                   p => p.IsAlive && p.HealthPercent <= SingularSettings.Instance.Druid.WildGrowthHealth &&
                                   p.Location.Distance(((WoWUnit)ret).Location) <= 30) >= SingularSettings.Instance.Druid.WildGrowthCount,
                               ret => (WoWUnit)ret),
                           CreateSpellBuff(
                               "Regrowth",
                               ret => ((WoWUnit)ret).HealthPercent <= SingularSettings.Instance.Druid.Regrowth,
                               ret => (WoWUnit)ret),
                           CreateSpellCast(
                               "Healing Touch",
                               ret => ((WoWUnit)ret).HealthPercent <= SingularSettings.Instance.Druid.HealingTouch,
                               ret => (WoWUnit)ret),
                           CreateSpellCast(
                               "Nourish",
                               ret => ((WoWUnit)ret).HealthPercent <= SingularSettings.Instance.Druid.Nourish &&
                               (((WoWUnit)ret).HasAura("Rejuvenation") || ((WoWUnit)ret).HasAura("Regrowth") ||
                                ((WoWUnit)ret).HasAura("Lifebloom") || ((WoWUnit)ret).HasAura("Wild Growth")),
                               ret => (WoWUnit)ret),
                           CreateSpellBuff(
                               "Rejuvenation",
                               ret => ((WoWUnit)ret).HealthPercent <= SingularSettings.Instance.Druid.Rejuvenation,
                               ret => (WoWUnit)ret)
                           )));
        }
Пример #4
0
 public Composite CreateHunterBuffs()
 {
     WantedPet = "1";
     return(new PrioritySelector(
                new Decorator(
                    ctx => Me.CastingSpell != null && Me.CastingSpell.Name == "Revive " + WantedPet && Me.GotAlivePet,
                    new Action(ctx => SpellManager.StopCasting())),
                CreateWaitForCast(),
                CreateSpellBuffOnSelf("Aspect of the Hawk"),
                CreateSpellBuffOnSelf("Track Hidden"),
                //new ActionLogMessage(false, "Checking for pet"),
                new Decorator(
                    ret => !Me.GotAlivePet,
                    new Sequence(
                        new Action(ret => PetManager.CallPet(WantedPet)),
                        new Action(ret => Thread.Sleep(1000)),
                        new DecoratorContinue(
                            ret => !Me.GotAlivePet && SpellManager.CanCast("Revive Pet"),
                            new Sequence(
                                new Action(ret => SpellManager.Cast("Revive Pet")),
                                new Action(ret => StyxWoW.SleepForLagDuration()),
                                new WaitContinue(
                                    11,
                                    ret => !Me.IsCasting,
                                    new ActionAlwaysSucceed()))))),
                CreateSpellCast(
                    "Mend Pet",
                    ret =>
                    (Me.Pet.HealthPercent < 70 || (Me.Pet.HappinessPercent < 90 && TalentManager.HasGlyph("Mend Pet"))) && !Me.Pet.HasAura("Mend Pet"))
                ));
 }