Ejemplo n.º 1
0
        public static Composite CreateFireMageNormalCombat()
        {
            return(new PrioritySelector(
                       Safers.EnsureTarget(),
                       Common.CreateStayAwayFromFrozenTargetsBehavior(),
                       Movement.CreateMoveToLosBehavior(),
                       Movement.CreateFaceTargetBehavior(),
                       Helpers.Common.CreateAutoAttack(true),
                       Spell.WaitForCast(true),

                       // Defensive stuff
                       new Decorator(
                           ret => StyxWoW.Me.ActiveAuras.ContainsKey("Ice Block"),
                           new ActionIdle()),
                       Spell.BuffSelf("Ice Block", ret => StyxWoW.Me.HealthPercent < 20 && !StyxWoW.Me.ActiveAuras.ContainsKey("Hypothermia")),

                       // Cooldowns
                       Spell.BuffSelf("Evocation",
                                      ret => StyxWoW.Me.ManaPercent < 30 || (TalentManager.HasGlyph("Evocation") && StyxWoW.Me.HealthPercent < 50)),
                       Spell.BuffSelf("Mage Ward", ret => StyxWoW.Me.HealthPercent <= 80),
                       Spell.BuffSelf("Mana Shield", ret => StyxWoW.Me.HealthPercent <= 60),

                       new Decorator(
                           ret => Unit.NearbyUnfriendlyUnits.Count(u => u.IsTargetingMeOrPet) >= 3,
                           new PrioritySelector(
                               Spell.BuffSelf("Mirror Image")
                               )),
                       Common.CreateUseManaGemBehavior(ret => StyxWoW.Me.ManaPercent < 80),

                       // Rotation
                       Spell.Cast("Dragon's Breath",
                                  ret => StyxWoW.Me.IsSafelyFacing(StyxWoW.Me.CurrentTarget, 90) &&
                                  StyxWoW.Me.CurrentTarget.DistanceSqr <= 8 * 8),

                       Spell.Cast("Fire Blast",
                                  ret => StyxWoW.Me.ActiveAuras.ContainsKey("Impact")),

                       new Decorator(
                           ret => !Unit.NearbyUnfriendlyUnits.Any(u => u.DistanceSqr < 10 * 10 && u.IsCrowdControlled()),
                           new PrioritySelector(
                               Spell.BuffSelf("Frost Nova",
                                              ret => Unit.NearbyUnfriendlyUnits.Any(u =>
                                                                                    u.DistanceSqr <= 8 * 8 && !u.HasAura("Freeze") &&
                                                                                    !u.HasAura("Frost Nova") && !u.Stunned))
                               )),

                       Common.CreateMagePolymorphOnAddBehavior(),
                       // Rotation
                       Spell.Cast("Combustion",
                                  ret => (StyxWoW.Me.CurrentTarget.HasMyAura("Living Bomb") || !SpellManager.HasSpell("Living Bomb")) &&
                                  (StyxWoW.Me.CurrentTarget.HasMyAura("Ignite") || TalentManager.GetCount(2, 4) == 0) &&
                                  StyxWoW.Me.CurrentTarget.HasMyAura("Pyroblast!")),
                       Spell.Cast("Scorch", ret => StyxWoW.Me.CurrentTarget.GetAuraTimeLeft("Critical Mass", true).TotalSeconds < 1 && TalentManager.GetCount(2, 20) != 0),
                       Spell.Cast("Pyroblast", ret => StyxWoW.Me.ActiveAuras.ContainsKey("Hot Streak")),
                       Spell.BuffSelf("Flame Orb"),
                       Spell.Buff("Living Bomb", true),
                       Spell.Cast("Fireball"),
                       Movement.CreateMoveToTargetBehavior(true, 35f)
                       ));
        }
Ejemplo n.º 2
0
        public static Composite CreateShadowInitialize()
        {
            if (SpellManager.HasSpell("Shadow Mend"))
            {
                Logger.Write(LogColor.Init, "Shadow Mend: if all enemies cc'd and health below {0}%", PriestSettings.ShadowHeal);
            }

            if (SpellManager.HasSpell("Psychic Scream"))
            {
                if (!PriestSettings.PsychicScreamAllow)
                {
                    Logger.Write(LogColor.Init, "Psychic Scream: disabled by user setting");
                }
                else
                {
                    Logger.Write(LogColor.Init, "Psychic Scream: cast when health falls below {0}%", PriestSettings.PsychicScreamHealth);
                    if (TalentManager.HasGlyph("Psychic Scream"))
                    {
                        Logger.Write(LogColor.Init, "Psychic Scream: cast when 2 or more mobs attacking (glyphed)");
                    }
                    else
                    {
                        Logger.Write(LogColor.Init, "Psychic Scream: cast when {0} or more mobs attacking", PriestSettings.PsychicScreamAddCount);
                    }
                }
            }

            return(null);
        }
Ejemplo n.º 3
0
 private static Composite AOE()
 {
     return(new PrioritySelector(
                new Decorator(ret => Unit.UnfriendlyUnits(10).Count() > 5 && TalentManager.HasGlyph("Thunderstorm"),
                              Spell.Cast("Thunderstorm")),
                Spell.Cast("Chain Lightning")));
 }
Ejemplo n.º 4
0
        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")));
        }
Ejemplo n.º 5
0
 public static Composite CreateDiscInitialize()
 {
     HasReflectiveShield = TalentManager.HasGlyph("Reflective Shield");
     if (HasReflectiveShield)
     {
         Logger.Write(LogColor.Init, "[Glyph of Reflective Shield] will prioritize Power Word: Shield on self if we are being attacked");
     }
     return(null);
 }
Ejemplo n.º 6
0
        public static Composite CreateRestoDruidInitialize()
        {
            glyphRegrowth     = TalentManager.HasGlyph("Regrowth");
            glyphRejuv        = TalentManager.HasGlyph("Rejuvenation");
            talentGermination = Common.HasTalent(DruidTalents.Germination);

            MaxRejuvStacks = talentGermination ? 2u : 1u;
            return(null);
        }
Ejemplo n.º 7
0
        public static Composite CreateWarriorInitialize()
        {
            // removed combatreach because of # of missed Charges
            DistanceChargeBehavior = 25f;

            string spellVictory = "Victory Rush";

            VictoryRushHealth = 90;
            if (SpellManager.HasSpell("Impending Victory"))
            {
                VictoryRushHealth = 80;
                spellVictory      = "Impending Victory";
                Logger.Write(LogColor.Init, "impending victory talent: [{0}] at {1}%", spellVictory, VictoryRushHealth);
            }
            else if (TalentManager.HasGlyph("Victory Rush"))
            {
                VictoryRushHealth = 85;
                Logger.Write(LogColor.Init, "glyph of victory rush: [{0}] at {1}%", spellVictory, VictoryRushHealth);
            }
            else
            {
                Logger.Write(LogColor.Init, "victory rush: [{0}] at {1}%", spellVictory, VictoryRushHealth);
            }


            if (WarriorSettings.VictoryRushOnCooldown)
            {
                Logger.Write(LogColor.Init, "victory rush on cooldown: [{0}] cast on cooldown", spellVictory);
                VictoryRushHealth = 100;
            }

            VictoryRushDistance = 5f;
            if (TalentManager.HasGlyph("Victorious Throw"))
            {
                VictoryRushDistance = 15f;
                Logger.Write(LogColor.Init, "glyph of victorious throw: [{0}] at {1:F1} yds", spellVictory, VictoryRushDistance);
            }

            HeroicLeapDistance = 40f;
            if (TalentManager.HasGlyph("Death From Above"))
            {
                HeroicLeapDistance = 25f;
                Logger.Write(LogColor.Init, "glyph of death from above: [Heroic Leap] at {0:F1} yds", HeroicLeapDistance);
            }

            _DistanceWindAndThunder = 0;
            if (TalentManager.HasGlyph("Wind and Thunder"))
            {
                _DistanceWindAndThunder = 4;
                Logger.Write(LogColor.Init, "glyph of wind and thunder: [Whirlwind] and [Thunder Clap] +4 yds");
            }

            DistanceChargeBehavior -= 0.2f;    // should not be needed, but is  -- based on log files and observations we need this adjustment

            return(null);
        }
Ejemplo n.º 8
0
 public static Composite CreateStayAwayFromFrozenTargetsBehavior()
 {
     return(Avoidance.CreateAvoidanceBehavior(
                "Blink",
                TalentManager.HasGlyph("Blink") ? 28 : 20,
                Disengage.Direction.Frontwards,
                crowdControl: CreateSlowMeleeBehavior(),
                needDisengage: nd => Me.GotTarget() && Me.CurrentTarget.IsCrowdControlled() && Me.CurrentTarget.SpellDistance() < SingularSettings.Instance.KiteAvoidDistance,
                needKiting: nk => Me.GotTarget() && (Me.CurrentTarget.IsCrowdControlled() || Me.CurrentTarget.IsSlowed(60)) && Me.CurrentTarget.SpellDistance() < SingularSettings.Instance.KiteAvoidDistance
                ));
 }
Ejemplo n.º 9
0
 public static Composite CreateMonkLossOfControlBehavior()
 {
     return(new Decorator(
                ret => !Spell.IsGlobalCooldown() && !Spell.IsCastingOrChannelling(),
                new PrioritySelector(
                    Spell.BuffSelf("Nimble Brew", ret => Me.Stunned || Me.Fleeing || Me.HasAuraWithMechanic(WoWSpellMechanic.Horrified)),
                    Spell.BuffSelf("Dampen Harm", ret => Me.Stunned && Unit.NearbyUnitsInCombatWithMeOrMyStuff.Any()),
                    Spell.BuffSelf("Tiger's Lust", ret => Me.Rooted && !Me.HasAuraWithEffect(WoWApplyAuraType.ModIncreaseSpeed)),
                    Spell.BuffSelf("Life Cocoon", req => Me.Stunned && TalentManager.HasGlyph("Life Cocoon") && Unit.NearbyUnitsInCombatWithMeOrMyStuff.Any())
                    )
                ));
 }
Ejemplo n.º 10
0
        /// <summary>
        /// creates a Mage specific avoidance behavior based upon settings.  will check for safe landing
        /// zones before using Blink or Rocket Jump.  will additionally do a running away or jump turn
        /// attack while moving away from attacking mob if behaviors provided
        /// </summary>
        /// <param name="nonfacingAttack">behavior while running away (back to target - instants only)</param>
        /// <param name="jumpturnAttack">behavior while facing target during jump turn (instants only)</param>
        /// <returns></returns>
        public static Composite CreateMageAvoidanceBehavior()
        {
            int distBlink = TalentManager.HasGlyph("Blink") ? 28 : 20;

            return(Avoidance.CreateAvoidanceBehavior(
                       "Blink",
                       distBlink,
                       Disengage.Direction.Frontwards,
                       crowdControl: CreateSlowMeleeBehavior(),
                       needDisengage: nd => false,
                       needKiting: nk => Me.GotTarget() && Me.CurrentTarget.IsFrozen() && Me.CurrentTarget.SpellDistance() < 8
                       ));
        }
Ejemplo n.º 11
0
        private static Composite CreateFeralBearInstanceCombat()
        {
            return(new PrioritySelector(
                       Spell.BuffSelf("Bear Form"),
                       Spell.Cast("Feral Charge (Bear)"),
                       // Defensive CDs are hard to 'roll' from this type of logic, so we'll simply use them more as 'oh shit' buttons, than anything.
                       // Barkskin should be kept on CD, regardless of what we're tanking
                       Spell.BuffSelf("Barkskin", ret => StyxWoW.Me.HealthPercent < Settings.FeralBarkskin),
                       // Since Enrage no longer makes us take additional damage, just keep it on CD. Its a rage boost, and coupled with King of the Jungle, a DPS boost for more threat.
                       Spell.BuffSelf("Enrage"),
                       // Only pop SI if we're taking a bunch of damage.
                       Spell.BuffSelf("Survival Instincts", ret => StyxWoW.Me.HealthPercent < Settings.SurvivalInstinctsHealth),
                       // We only want to pop FR < 30%. Users should not be able to change this value, as FR automatically pushes us to 30% hp.
                       Spell.BuffSelf("Frenzied Regeneration", ret => StyxWoW.Me.HealthPercent < Settings.FrenziedRegenerationHealth),
                       // Make sure we deal with interrupts...
                       //Spell.Cast(80964 /*"Skull Bash (Bear)"*/, ret => (WoWUnit)ret, ret => ((WoWUnit)ret).IsCasting),
                       Helpers.Common.CreateInterruptSpellCast(ret => StyxWoW.Me.CurrentTarget),

                       new Decorator(
                           ret => Unit.NearbyUnfriendlyUnits.Count(u => u.DistanceSqr < 8 * 8) >= 3,
                           new PrioritySelector(
                               Spell.Cast("Berserk"),
                               Spell.Cast("Demoralizing Roar",
                                          ret => Unit.NearbyUnfriendlyUnits.Any(u => u.DistanceSqr < 10 * 10 && !u.HasDemoralizing())),
                               Spell.Cast("Maul", ret => TalentManager.HasGlyph("Maul")),
                               Spell.Cast("Thrash"),
                               Spell.Cast("Swipe (Bear)"),
                               Spell.Cast("Mangle (Bear)"),
                               Movement.CreateMoveToMeleeBehavior(true)
                               )),
                       // If we have 3+ units not targeting us, and are within 10yds, then pop our AOE taunt. (These are ones we have 'no' threat on, or don't hold solid threat on)
                       Spell.Cast(
                           "Challenging Roar", ret => TankManager.Instance.NeedToTaunt.FirstOrDefault(),
                           ret => SingularSettings.Instance.EnableTaunting && TankManager.Instance.NeedToTaunt.Count(u => u.Distance <= 10) >= 3),
                       // If there's a unit that needs taunting, do it.
                       Spell.Cast(
                           "Growl", ret => TankManager.Instance.NeedToTaunt.FirstOrDefault(),
                           ret => SingularSettings.Instance.EnableTaunting),
                       Spell.Cast("Pulverize", ret => ((WoWUnit)ret).HasAura("Lacerate", 3) && !StyxWoW.Me.HasAura("Pulverize")),

                       Spell.Buff("Demoralizing Roar", ret => !StyxWoW.Me.CurrentTarget.HasDemoralizing()),

                       Spell.Cast("Faerie Fire (Feral)", ret => !((WoWUnit)ret).HasSunders()),
                       Spell.Cast("Mangle (Bear)"),
                       // Maul is our rage dump... don't pop it unless we have to, or we still have > 2 targets.
                       Spell.Cast("Maul", ret => StyxWoW.Me.RagePercent > 60),
                       Spell.Cast("Lacerate"),
                       Movement.CreateMoveToMeleeBehavior(true)
                       ));
        }
Ejemplo n.º 12
0
        private static Composite CreateFeralCatInstanceCombat()
        {
            return(new PrioritySelector(

                       new Decorator(
                           ret => Unit.NearbyUnfriendlyUnits.Count(u => u.DistanceSqr < 5 * 5) >= 3,
                           new PrioritySelector(
                               Spell.BuffSelf("Tiger's Fury"),
                               Spell.BuffSelf("Berserk"),
                               Spell.Cast("Swipe (Cat)"),
                               Movement.CreateMoveToMeleeBehavior(true)
                               )),

                       Movement.CreateMoveBehindTargetBehavior(),

                       Spell.Cast("Mangle (Cat)",
                                  ret => Has4PieceTier11Bonus && StyxWoW.Me.GetAuraTimeLeft("Strength of the Panther", false).TotalSeconds < 3),
                       Spell.Buff("Mangle (Cat)", "Mangle", "Trauma", "Stampede"),
                       Spell.Cast("Shred",
                                  ret => TalentManager.HasGlyph("Bloodletting") && StyxWoW.Me.CurrentTarget.HasMyAura("Rip") &&
                                  StyxWoW.Me.CurrentTarget.MeIsBehind &&
                                  StyxWoW.Me.CurrentTarget.GetAuraTimeLeft("Rip", true).TotalSeconds < 14),
                       Spell.Cast("Shred", ret => StyxWoW.Me.HasAura("Omen of Clarity") && StyxWoW.Me.CurrentTarget.MeIsBehind),
                       Spell.Cast("Mangle (Cat)", ret => StyxWoW.Me.HasAura("Omen of Clarity") && !StyxWoW.Me.CurrentTarget.MeIsBehind),
                       Spell.Cast("Mangle (Cat)", ret => Has4PieceTier11Bonus && !StyxWoW.Me.HasAura("Strength of the Panther", 3)),
                       new Decorator(
                           ret => StyxWoW.Me.CurrentTarget.MeIsBehind,
                           new PrioritySelector(
                               Spell.Cast("Shred", ret => StyxWoW.Me.HasAura("Tiger's Fury") && StyxWoW.Me.HasAura("Berserk")),
                               Spell.Cast("Shred",
                                          ret => SpellManager.HasSpell("Tiger's Fury") && !SpellManager.GlobalCooldown &&
                                          SpellManager.Spells["Tiger's Fury"].CooldownTimeLeft.TotalSeconds <= 3),
                               Spell.Cast("Shred", ret => StyxWoW.Me.ComboPoints == 4),
                               Spell.Cast("Shred", ret => StyxWoW.Me.EnergyPercent >= 85))),
                       new Decorator(
                           ret => !StyxWoW.Me.CurrentTarget.MeIsBehind,
                           new PrioritySelector(
                               Spell.Cast("Mangle (Cat)", ret => StyxWoW.Me.HasAura("Tiger's Fury") && StyxWoW.Me.HasAura("Berserk")),
                               Spell.Cast("Mangle (Cat)",
                                          ret => SpellManager.HasSpell("Tiger's Fury") && !SpellManager.GlobalCooldown &&
                                          SpellManager.Spells["Tiger's Fury"].CooldownTimeLeft.TotalSeconds <= 3),
                               Spell.Cast("Mangle (Cat)", ret => StyxWoW.Me.ComboPoints == 4),
                               Spell.Cast("Mangle (Cat)", ret => StyxWoW.Me.EnergyPercent >= 85))),
                       Movement.CreateMoveToMeleeBehavior(true)
                       ));
        }
Ejemplo n.º 13
0
        public static Composite CreateMageArcaneNormalCombat()
        {
            return(new PrioritySelector(
                       Safers.EnsureTarget(),
                       Common.CreateStayAwayFromFrozenTargetsBehavior(),
                       Movement.CreateMoveToLosBehavior(),
                       Movement.CreateFaceTargetBehavior(),

                       Spell.WaitForCast(true),

                       // Defensive stuff
                       new Decorator(
                           ret => StyxWoW.Me.ActiveAuras.ContainsKey("Ice Block"),
                           new ActionIdle()),
                       Spell.BuffSelf("Ice Block", ret => StyxWoW.Me.HealthPercent < 10 && !StyxWoW.Me.ActiveAuras.ContainsKey("Hypothermia")),
                       Spell.BuffSelf("Mana Shield", ret => StyxWoW.Me.HealthPercent <= 75 && StyxWoW.Me.ManaPercent < 30),
                       Spell.BuffSelf("Frost Nova", ret => Unit.NearbyUnfriendlyUnits.Any(u => u.Distance <= 11 && !u.HasAura("Frost Nova"))),
                       Common.CreateMagePolymorphOnAddBehavior(),
                       Spell.BuffSelf("Evocation",
                                      ret => StyxWoW.Me.ManaPercent < 30 || (TalentManager.HasGlyph("Evocation") && StyxWoW.Me.HealthPercent < 50)),
                       Spell.BuffSelf("Ice Barrier", ret => StyxWoW.Me.HealthPercent <= 99),

                       new Decorator(
                           ret => Unit.NearbyUnfriendlyUnits.Count(u => u.IsTargetingMeOrPet) >= 3,
                           new PrioritySelector(
                               Spell.BuffSelf("Mirror Image")
                               )),
                       Common.CreateUseManaGemBehavior(ret => StyxWoW.Me.ManaPercent < 80),
                       Spell.Cast("Incanter's Ward", ret => StyxWoW.Me.CurrentTarget.DistanceSqr <= 6 * 6),



                       Spell.BuffSelf("Arcane Power"),
                       Spell.Cast("Arcane Missiles", ret => StyxWoW.Me.HasAura("Arcane Missiles!")),
                       Spell.Cast("Arcane Barrage", ret => StyxWoW.Me.GetAuraByName("Arcane Charge") != null && StyxWoW.Me.GetAuraByName("Arcane Charge").StackCount >= 4),
                       Spell.Cast("Frostfire Bolt", ret => !SpellManager.HasSpell("Arcane Blast")),

                       Spell.Cast("Arcane Blast"),
                       Movement.CreateMoveToTargetBehavior(true, 39f)

                       ));
        }
Ejemplo n.º 14
0
        /// <summary>
        /// Spreads your Diseases depending on what Tier One Talent you have
        /// </summary>
        /// <param name="onUnit">the unit to begin spreading Diseases on</param>
        public static Composite SpreadDiseasesBehavior(CLU.UnitSelection onUnit)
        {
            var pestilenceRange = TalentManager.HasGlyph("Pestilence") ? 14.5 : 10;

            return(new PrioritySelector(
                       new Decorator(
                           ret => onUnit != null && onUnit(ret) != null && onUnit(ret).DistanceSqr < 40 * 40 &&
                           CLUSettings.Instance.DeathKnight.DeathKnightTierOneTalent != DeathKnightTierOneTalent.None,
                           new PrioritySelector(
                               new Sequence(
                                   new Switch <DeathKnightTierOneTalent>(ctx => CLUSettings.Instance.DeathKnight.DeathKnightTierOneTalent,
                                                                         new SwitchArgument <DeathKnightTierOneTalent>(DeathKnightTierOneTalent.PlagueLeech,
                                                                                                                       new PrioritySelector(
                                                                                                                           Spell.CastAreaSpell("Pestilence", pestilenceRange, false, CLUSettings.Instance.DeathKnight.BloodPestilenceCount, 0.0, 0.0, ret => Me.Specialization == WoWSpec.DeathKnightUnholy && Buff.TargetHasDebuff("Blood Plague") && Buff.TargetHasDebuff("Frost Fever") && (from enemy in Unit.EnemyMeleeUnits where !enemy.HasAura("Blood Plague") && !enemy.HasAura("Frost Fever") && enemy.Distance2DSqr < pestilenceRange * pestilenceRange select enemy).Any(), "Pestilence"))),
                                                                         new SwitchArgument <DeathKnightTierOneTalent>(DeathKnightTierOneTalent.UnholyBlight,
                                                                                                                       Spell.CastAreaSpell("Unholy Blight", 10, false, CLUSettings.Instance.DeathKnight.UnholyBlightCount, 0.0, 0.0, ret => (from enemy in Unit.EnemyMeleeUnits where !enemy.HasAura("Blood Plague") && !enemy.HasAura("Frost Fever") select enemy).Any(), "Unholy Blight")),
                                                                         new SwitchArgument <DeathKnightTierOneTalent>(DeathKnightTierOneTalent.RoilingBlood,
                                                                                                                       Spell.CastAreaSpell("Blood Boil", 10, false, CLUSettings.Instance.DeathKnight.RoilingBloodCount, 0.0, 0.0, ret => Me.Specialization == WoWSpec.DeathKnightUnholy || Me.Specialization == WoWSpec.DeathKnightBlood && (from enemy in Unit.EnemyMeleeUnits where !enemy.HasAura("Blood Plague") && !enemy.HasAura("Frost Fever") select enemy).Any(), "Blood Boil for Roiling Blood")))

                                   )))));
        }
Ejemplo n.º 15
0
        private static Composite HealthFunnel(int petMinHealth, int petMaxHealth = 99)
        {
            return(new Decorator(
                       ret => GetCurrentPet() != WarlockPet.None &&
                       Me.Pet.HealthPercent < petMinHealth &&
                       !Spell.IsSpellOnCooldown("Health Funnel") &&
                       Me.Pet.Distance < 45 &&
                       Me.Pet.InLineOfSpellSight &&
                       !TalentManager.IsSelected((int)WarlockTalents.SoulLink),
                       new Sequence(
                           new PrioritySelector(
                               // glyph of health funnel prevents Soulburn: Health Funnel from being used
                               new Decorator(ret => TalentManager.HasGlyph("Health Funnel"), new ActionAlwaysSucceed()),
                               CastSoulburn(ret =>
            {
                if (Me.Specialization == WoWSpec.WarlockAffliction)
                {
                    if (Me.CurrentSoulShards > 0 && Spell.CanCastHack("Soulburn", Me))
                    {
                        Logging.WriteDiagnostic("Soulburn should follow to make instant health funnel");
                        return true;
                    }
                    Logging.WriteDiagnostic("soulburn not available, shards={0}", Me.CurrentSoulShards);
                }
                return false;
            }),

                               // neither of instant funnels available, so stop moving
                               new Sequence(
                                   new Action(ctx => StopMoving.Now()),
                                   new Wait(1, until => !Me.IsMoving, new ActionAlwaysSucceed()))),
                           new Decorator(ret => Spell.CanCastHack("Health Funnel", Me.Pet), new ActionAlwaysSucceed()),
                           new Action(ret => Logging.WriteDiagnostic("Casting Health Funnel on Pet @ {0:F1}%", Me.Pet.HealthPercent)),
                           new PrioritySelector(
                               Spell.Cast(ret => "Health Funnel", mov => false, on => Me.Pet, req => Me.HasAura("Soulburn") || TalentManager.HasGlyph("Health Funnel")),
                               Spell.Cast(ret => "Health Funnel", mov => true, on => Me.Pet, req => true, cancel => !Me.GotAlivePet || Me.Pet.HealthPercent >= petMaxHealth)),
                           Common.CreateWaitForLagDuration())));
        }
Ejemplo n.º 16
0
        static Composite CreateChargeBehavior()
        {
            return(new Decorator(
                       ret => StyxWoW.Me.CurrentTarget != null && !IsGlobalCooldown() && AdvancedAI.Movement /*&& Prevent
                                                                                                              * Charge*/,

                       new PrioritySelector(
                           Spell.Cast("Charge",
                                      ret => StyxWoW.Me.CurrentTarget.Distance >= 10 && StyxWoW.Me.CurrentTarget.Distance < (TalentManager.HasGlyph("Long Charge") ? 30f : 25f)),

                           Spell.CastOnGround("Heroic Leap",
                                              ret => StyxWoW.Me.CurrentTarget.Location,
                                              ret => StyxWoW.Me.CurrentTarget.Distance > 13 && StyxWoW.Me.CurrentTarget.Distance < 40 && SpellManager.Spells["Charge"].Cooldown))
                       ));
        }
Ejemplo n.º 17
0
        public static Composite CreateBeastMasterHunterPvPPullAndCombat()
        {
            return(new PrioritySelector(
                       Common.CreateHunterCallPetBehavior(false),

                       Safers.EnsureTarget(),
                       Spell.BuffSelf("Disengage", ret => StyxWoW.Me.CurrentTarget.Distance < Spell.MeleeRange + 3f),
                       Common.CreateHunterBackPedal(),
                       Movement.CreateMoveToLosBehavior(),
                       Movement.CreateFaceTargetBehavior(),
                       Helpers.Common.CreateAutoAttack(true),
                       new Decorator(
                           ret => StyxWoW.Me.CurrentTarget.Distance < 35f,
                           Movement.CreateEnsureMovementStoppedBehavior()),

                       Spell.WaitForCast(true),
                       Helpers.Common.CreateInterruptSpellCast(ret => StyxWoW.Me.CurrentTarget),

                       Spell.Cast("Concussive Shot", ret => StyxWoW.Me.CurrentTarget.CurrentTargetGuid == StyxWoW.Me.Guid),
                       Spell.Buff("Hunter's Mark"),
                       Spell.BuffSelf("Aspect of the Hawk"),
                       // Defensive Stuff
                       Spell.Cast(
                           "Intimidation", ret => StyxWoW.Me.CurrentTarget.IsAlive && StyxWoW.Me.GotAlivePet &&
                           (StyxWoW.Me.CurrentTarget.CurrentTarget == null || StyxWoW.Me.CurrentTarget.CurrentTarget == StyxWoW.Me)),

                       Common.CreateHunterTrapOnAddBehavior("Freezing Trap"),

                       Spell.Cast("Mend Pet",
                                  ret => StyxWoW.Me.GotAlivePet && !StyxWoW.Me.Pet.HasAura("Mend Pet") &&
                                  (StyxWoW.Me.Pet.HealthPercent < SingularSettings.Instance.Hunter.MendPetPercent || (StyxWoW.Me.Pet.HappinessPercent < 90 && TalentManager.HasGlyph("Mend Pet")))),

                       // Cooldowns
                       Spell.BuffSelf("Rapid Fire",
                                      ret => (StyxWoW.Me.HasAura("Call of the Wild") ||
                                              !StyxWoW.Me.PetSpells.Any(s => s.Spell != null && s.Spell.Name == "Call of the Wild" && s.Spell.CooldownTimeLeft.TotalSeconds < 60)) &&
                                      !StyxWoW.Me.HasAnyAura("Bloodlust", "Heroism", "Time Warp", "The Beast Within")),

                       Spell.BuffSelf("Fervor",
                                      ret => StyxWoW.Me.FocusPercent <= 50 && (!StyxWoW.Me.GotAlivePet || StyxWoW.Me.Pet.FocusPercent <= 50)),

                       Spell.BuffSelf("Bestial Wrath",
                                      ret => StyxWoW.Me.GotAlivePet && (!SpellManager.HasSpell("Kill Command") ||
                                                                        SpellManager.Spells["Kill Command"].CooldownTimeLeft.TotalSeconds < 2)),

                       // Rotation
                       Spell.Buff("Wing Clip"),
                       Spell.Cast("Scatter Shot", ret => StyxWoW.Me.CurrentTarget.Distance < Spell.MeleeRange + 3f),
                       Spell.Cast("Raptor Strike"),
                       Spell.Buff("Serpent Sting", true),
                       Spell.Cast("Kill Command", ret => StyxWoW.Me.GotAlivePet && StyxWoW.Me.Pet.Location.Distance(StyxWoW.Me.CurrentTarget.Location) < Spell.MeleeRange),
                       Spell.Cast("Kill Shot"),
                       Spell.Cast("Focus Fire",
                                  ret => StyxWoW.Me.GotAlivePet && !StyxWoW.Me.HasAura("The Beast Within") && StyxWoW.Me.Pet.HasAura("Frenzy Effect", 5)),
                       Spell.Buff("Widow Venom"),
                       Spell.Cast("Arcane Shot", ret => StyxWoW.Me.FocusPercent > 40),
                       Spell.CastOnGround("Flare", ret => StyxWoW.Me.Location),
                       Common.CreateHunterTrapBehavior("Snake Trap", false),
                       Common.CreateHunterTrapBehavior("Immolation Trap", false),
                       Spell.Cast("Cobra Shot"),
                       Spell.Cast("Steady Shot", ret => !SpellManager.HasSpell("Cobra Shot")),
                       Movement.CreateMoveToTargetBehavior(true, 35f)
                       ));
        }
Ejemplo n.º 18
0
        public static Composite CreateBeastMasterHunterInstancePullAndCombat()
        {
            return(new PrioritySelector(
                       Common.CreateHunterCallPetBehavior(true),

                       Safers.EnsureTarget(),
                       Spell.BuffSelf("Disengage",
                                      ret => SingularSettings.Instance.Hunter.UseDisengage && StyxWoW.Me.CurrentTarget.Distance < Spell.MeleeRange + 3f),
                       Common.CreateHunterBackPedal(),
                       Movement.CreateMoveToLosBehavior(),
                       Movement.CreateFaceTargetBehavior(),
                       Helpers.Common.CreateAutoAttack(true),
                       new Decorator(
                           ret => StyxWoW.Me.CurrentTarget.Distance < 35f,
                           Movement.CreateEnsureMovementStoppedBehavior()),

                       Spell.WaitForCast(true),
                       Helpers.Common.CreateInterruptSpellCast(ret => StyxWoW.Me.CurrentTarget),

                       Spell.Buff("Hunter's Mark"),
                       Spell.BuffSelf("Aspect of the Hawk"),

                       Spell.Cast("Mend Pet",
                                  ret => StyxWoW.Me.GotAlivePet && !StyxWoW.Me.Pet.HasAura("Mend Pet") &&
                                  (StyxWoW.Me.Pet.HealthPercent < SingularSettings.Instance.Hunter.MendPetPercent || (StyxWoW.Me.Pet.HappinessPercent < 90 && TalentManager.HasGlyph("Mend Pet")))),

                       // Cooldowns
                       Spell.BuffSelf("Rapid Fire",
                                      ret => (StyxWoW.Me.HasAura("Call of the Wild") ||
                                              !StyxWoW.Me.PetSpells.Any(s => s.Spell != null && s.Spell.Name == "Call of the Wild" && s.Spell.CooldownTimeLeft.TotalSeconds < 60)) &&
                                      !StyxWoW.Me.HasAnyAura("Bloodlust", "Heroism", "Time Warp", "The Beast Within")),

                       Spell.BuffSelf("Fervor",
                                      ret => StyxWoW.Me.FocusPercent <= 50 && (!StyxWoW.Me.GotAlivePet || StyxWoW.Me.Pet.FocusPercent <= 50)),

                       Spell.BuffSelf("Bestial Wrath",
                                      ret => StyxWoW.Me.GotAlivePet && (!SpellManager.HasSpell("Kill Command") || SpellManager.Spells["Kill Command"].CooldownTimeLeft.TotalSeconds < 2)),

                       new Decorator(
                           ret => Unit.UnfriendlyUnitsNearTarget(10f).Count() >= 3,
                           new PrioritySelector(
                               Common.CreateHunterTrapBehavior("Explosive Trap"),
                               Spell.Cast("Multi Shot"),
                               Spell.Cast("Cobra Shot"),
                               Spell.Cast("Steady Shot"),
                               Movement.CreateMoveToTargetBehavior(true, 35f)
                               )
                           ),
                       // Rotation
                       Spell.Buff("Serpent Sting", true),
                       Spell.Cast("Kill Command", ret => StyxWoW.Me.GotAlivePet && StyxWoW.Me.Pet.Location.Distance(StyxWoW.Me.CurrentTarget.Location) < Spell.MeleeRange),
                       Spell.Cast("Kill Shot"),
                       Spell.Cast("Focus Fire",
                                  ret => StyxWoW.Me.GotAlivePet && !StyxWoW.Me.HasAura("The Beast Within") && StyxWoW.Me.Pet.HasAura("Frenzy Effect", 5)),
                       Spell.Cast("Arcane Shot", ret => StyxWoW.Me.FocusPercent > 40),
                       Spell.Cast("Cobra Shot"),
                       Spell.Cast("Steady Shot", ret => !SpellManager.HasSpell("Cobra Shot")),
                       Movement.CreateMoveToTargetBehavior(true, 35f)
                       ));
        }
Ejemplo n.º 19
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()));
        }
Ejemplo n.º 20
0
        public static Composite CreateMarksmanHunterNormalPullAndCombat()
        {
            return(new PrioritySelector(
                       Common.CreateHunterCallPetBehavior(true),

                       Safers.EnsureTarget(),
                       Spell.BuffSelf("Disengage",
                                      ret => SingularSettings.Instance.Hunter.UseDisengage && StyxWoW.Me.CurrentTarget.Distance < Spell.MeleeRange + 3f),
                       Common.CreateHunterBackPedal(),
                       Movement.CreateMoveToLosBehavior(),
                       Movement.CreateFaceTargetBehavior(),
                       Helpers.Common.CreateAutoAttack(true),
                       new Decorator(
                           ret => StyxWoW.Me.CurrentTarget.Distance < 35f,
                           Movement.CreateEnsureMovementStoppedBehavior()),

                       new Decorator(
                           ret => StyxWoW.Me.IsCasting && StyxWoW.Me.CastingSpell.Name == "Steady Shot",
                           new Action(ret => DoubleSteadyCast = true)),
                       Spell.WaitForCast(true),
                       Helpers.Common.CreateInterruptSpellCast(ret => StyxWoW.Me.CurrentTarget),

                       Spell.Cast("Concussive Shot", ret => StyxWoW.Me.CurrentTarget.CurrentTargetGuid == StyxWoW.Me.Guid),
                       Spell.Buff("Hunter's Mark"),
                       Spell.BuffSelf("Aspect of the Hawk"),
                       // Defensive Stuff
                       Spell.Cast(
                           "Intimidation", ret => StyxWoW.Me.CurrentTarget.IsAlive && StyxWoW.Me.GotAlivePet &&
                           (StyxWoW.Me.CurrentTarget.CurrentTarget == null || StyxWoW.Me.CurrentTarget.CurrentTarget == StyxWoW.Me)),
                       Common.CreateHunterTrapOnAddBehavior("Freezing Trap"),
                       Spell.Cast("Mend Pet",
                                  ret => StyxWoW.Me.GotAlivePet && !StyxWoW.Me.Pet.HasAura("Mend Pet") &&
                                  (StyxWoW.Me.Pet.HealthPercent < SingularSettings.Instance.Hunter.MendPetPercent || (StyxWoW.Me.Pet.HappinessPercent < 90 && TalentManager.HasGlyph("Mend Pet")))),

                       // Cooldowns only when there are multiple mobs on normal rotation
                       new Decorator(
                           ret => Unit.NearbyUnfriendlyUnits.Where(u => u.IsTargetingMeOrPet).Count() >= 2,
                           new PrioritySelector(
                               Spell.BuffSelf("Readiness",
                                              ret => !StyxWoW.Me.HasAura("Rapid Fire") && SpellManager.HasSpell("Rapid Fire") &&
                                              SpellManager.Spells["Rapid Fire"].CooldownTimeLeft.TotalSeconds > 5),
                               Spell.BuffSelf("Rapid Fire",
                                              ret => (StyxWoW.Me.HasAura("Call of the Wild") ||
                                                      !StyxWoW.Me.PetSpells.Any(s => s.Spell != null && s.Spell.Name == "Call of the Wild" && s.Spell.CooldownTimeLeft.TotalSeconds < 60)) &&
                                              !StyxWoW.Me.HasAnyAura("Bloodlust", "Heroism", "Time Warp", "The Beast Within")))),

                       // Rotation
                       Spell.Buff("Serpent Sting", true),
                       Spell.Cast("Chimera Shot"),
                       Spell.Cast("Steady Shot", ret => DoubleSteadyCast),
                       Spell.Cast("Kill Shot"),
                       Spell.Cast("Aimed Shot", ret => StyxWoW.Me.HasAura("Fire!")),
                       Spell.Cast("Arcane Shot", ret => StyxWoW.Me.FocusPercent > 40),
                       Spell.Cast("Steady Shot"),

                       Movement.CreateMoveToTargetBehavior(true, 35f)
                       ));
        }
Ejemplo n.º 21
0
        public static Composite CreateProtectionWarriorCombat()
        {
            _slows = new[] { "Hamstring", "Piercing Howl", "Crippling Poison", "Hand of Freedom", "Infected Wounds" };
            return(new PrioritySelector(
                       ctx => TankManager.Instance.FirstUnit ?? StyxWoW.Me.CurrentTarget,

                       Spell.BuffSelf("Defensive Stance"),

                       //Standard
                       Safers.EnsureTarget(),
                       Movement.CreateMoveToLosBehavior(),
                       Movement.CreateFaceTargetBehavior(),
                       Common.CreateAutoAttack(false),

                       //Free Heal
                       //Spell.Cast("Victory Rush", ret => StyxWoW.Me.CurrentTarget.Distance < 5),
                       new Decorator(ret => StyxWoW.Me.HealthPercent <= SingularSettings.Instance.Warrior.WarriorEnragedRegenerationHealth,
                                     new PrioritySelector(
                                         Spell.BuffSelf("Berserker Rage"),
                                         Spell.BuffSelf("Enraged Regeneration")
                                         )),

                       //Defensive Cooldowns
                       Spell.BuffSelf("Shield Block"),
                       Spell.BuffSelf("Battle Shout", ret => (SingularSettings.Instance.Warrior.UseWarriorShouts || SingularSettings.Instance.Warrior.UseWarriorT12) && !StyxWoW.Me.HasAnyAura("Horn of Winter", "Roar of Courage", "Strength of Earth Totem", "Battle Shout")),
                       Spell.BuffSelf("Shield Wall", ret => StyxWoW.Me.HealthPercent <= SingularSettings.Instance.Warrior.WarriorProtShieldWallHealth),
                       Spell.Buff("Demoralizing Shout", ret => SpellManager.CanCast("Demoralizing Shout") && !StyxWoW.Me.CurrentTarget.HasDemoralizing()),

                       //Close cap on target
                       Spell.Cast("Charge", ret => StyxWoW.Me.CurrentTarget.Distance.Between(8f, TalentManager.HasGlyph("Long Charge") ? 30f : 25f)),
                       Spell.Cast("Intercept", ret => StyxWoW.Me.CurrentTarget.Distance.Between(8f, 25f)),
                       Spell.CastOnGround(
                           "Heroic Leap", ret => StyxWoW.Me.CurrentTarget.Location,
                           ret => StyxWoW.Me.CurrentTarget.Distance > 10 && StyxWoW.Me.CurrentTarget.Distance <= 40),

                       //Interupt or reflect
                       Spell.Cast("Spell Reflection", ret => StyxWoW.Me.CurrentTarget.CurrentTarget == StyxWoW.Me && StyxWoW.Me.CurrentTarget.IsCasting),
                       Common.CreateInterruptSpellCast(ret => StyxWoW.Me.CurrentTarget),

                       //PVP
                       new Decorator(
                           ret => StyxWoW.Me.GotTarget && StyxWoW.Me.CurrentTarget.IsPlayer,
                           new PrioritySelector(
                               Spell.Cast("Victory Rush", ret => StyxWoW.Me.HealthPercent < 80),
                               Spell.Cast("Disarm", ctx => StyxWoW.Me.CurrentTarget.DistanceSqr < 36 &&
                                          (StyxWoW.Me.CurrentTarget.Class == WoWClass.Warrior || StyxWoW.Me.CurrentTarget.Class == WoWClass.Rogue ||
                                           StyxWoW.Me.CurrentTarget.Class == WoWClass.Paladin || StyxWoW.Me.CurrentTarget.Class == WoWClass.Hunter)),
                               Spell.Buff("Rend"),
                               Spell.Cast("Thunder Clap", ctx => StyxWoW.Me.CurrentTarget.DistanceSqr < 7 * 7 && StyxWoW.Me.CurrentTarget.Attackable),
                               Spell.Cast("Shockwave"),
                               Spell.Buff("Piercing Howl", ret => StyxWoW.Me.CurrentTarget.Distance < 10 && StyxWoW.Me.CurrentTarget.IsPlayer && !StyxWoW.Me.CurrentTarget.HasAnyAura(_slows)),
                               Spell.Cast("Cleave", ret => Clusters.GetClusterCount(StyxWoW.Me, Unit.NearbyUnfriendlyUnits, ClusterType.Cone, 10f) >= 2),
                               Spell.Cast("Concussion Blow"),
                               Spell.Cast("Shield Slam"),
                               Spell.Cast("Revenge"),
                               Spell.Cast("Devastate"),
                               Spell.Cast("Heroic Strike", ret => StyxWoW.Me.RagePercent >= 50)
                               )),

                       //Aoe tanking
                       new Decorator(
                           ret => Targeting.GetAggroOnMeWithin(StyxWoW.Me.Location, 15f) > 1,
                           new PrioritySelector(
                               Spell.Buff("Rend"),
                               Spell.Cast("Thunder Clap", ctx => StyxWoW.Me.GotTarget && StyxWoW.Me.CurrentTarget.DistanceSqr < 7 * 7 && StyxWoW.Me.CurrentTarget.Attackable),
                               Spell.Cast("Shockwave", ret => Clusters.GetClusterCount(StyxWoW.Me, Unit.NearbyUnfriendlyUnits, ClusterType.Cone, 10f) >= 2),
                               Spell.Cast("Cleave", ret => Clusters.GetClusterCount(StyxWoW.Me, Unit.NearbyUnfriendlyUnits, ClusterType.Cone, 10f) >= 2)
                               )),

                       //Taunts
                       //If more than 3 taunt, if needs to taunt
                       Spell.Cast(
                           "Challenging Shout", ret => TankManager.Instance.NeedToTaunt.First(),
                           ret => SingularSettings.Instance.EnableTaunting && TankManager.Instance.NeedToTaunt.Count(u => u.Distance <= 10) >= 3),
                       // If there's a unit that needs taunting, do it.
                       Spell.Cast("Taunt", ret => TankManager.Instance.NeedToTaunt.First(), ret => SingularSettings.Instance.EnableTaunting && TankManager.Instance.NeedToTaunt.FirstOrDefault() != null),

                       //Single Target
                       Spell.Cast("Victory Rush", ret => StyxWoW.Me.HealthPercent < 80),
                       Spell.Cast("Concussion Blow"),
                       Spell.Cast("Shield Slam"),
                       Spell.Cast("Revenge"),
                       Spell.Cast("Heroic Strike", ret => StyxWoW.Me.RagePercent >= 50),
                       Spell.Buff("Rend"),
                       // Tclap may not be a giant threat increase, but Blood and Thunder will refresh rend. Which all in all, is a good thing.
                       // Oh, and the attack speed debuff is win as well.
                       Spell.Cast("Thunder Clap", ctx => StyxWoW.Me.GotTarget && StyxWoW.Me.CurrentTarget.DistanceSqr < 7 * 7 && StyxWoW.Me.CurrentTarget.Attackable),
                       Spell.Cast("Shockwave"),
                       Spell.Cast("Devastate"),

                       Movement.CreateMoveToTargetBehavior(true, 4f)
                       ));
        }
Ejemplo n.º 22
0
        public static Composite CreateBeastMasterHunterNormalPullAndCombat()
        {
            return(new PrioritySelector(
                       Common.CreateHunterCallPetBehavior(true),

                       Safers.EnsureTarget(),
                       Spell.BuffSelf("Disengage",
                                      ret =>
                                      SingularSettings.Instance.IsCombatRoutineMovementAllowed() &&
                                      SingularSettings.Instance.Hunter.UseDisengage &&
                                      StyxWoW.Me.CurrentTarget.Distance < Spell.MeleeRange + 3f),
                       //Common.CreateHunterBackPedal(),
                       Movement.CreateMoveToLosBehavior(),
                       Movement.CreateFaceTargetBehavior(),
                       new Decorator(
                           ret => StyxWoW.Me.CurrentTarget.Distance < 35f,
                           Movement.CreateEnsureMovementStoppedBehavior()),

                       Spell.WaitForCast(true),
                       Helpers.Common.CreateInterruptSpellCast(ret => StyxWoW.Me.CurrentTarget),

                       Spell.BuffSelf("Aspect of the Fox", ret => StyxWoW.Me.IsMoving),
                       Spell.BuffSelf("Aspect of the Hawk",
                                      ret => !StyxWoW.Me.IsMoving &&
                                      !StyxWoW.Me.HasAura("Aspect of the Iron Hawk") &&
                                      !StyxWoW.Me.HasAura("Aspect of the Hawk")),

                       Helpers.Common.CreateAutoAttack(true),

                       Common.CreateHunterTrapOnAddBehavior("Explosive Trap"),

                       Spell.Cast("Tranquilizing Shot", ctx => StyxWoW.Me.CurrentTarget.HasAura("Enraged")),
                       Spell.Buff("Concussive Shot",
                                  ret =>
                                  StyxWoW.Me.CurrentTarget.CurrentTargetGuid == StyxWoW.Me.Guid &&
                                  StyxWoW.Me.CurrentTarget.Distance > Spell.MeleeRange),
                       Spell.Buff("Hunter's Mark", ctx => !StyxWoW.Me.CurrentTarget.HasAura("Hunter's Mark")),

                       // Defensive Stuff

                       Spell.Cast(
                           "Intimidation", ret => StyxWoW.Me.CurrentTarget.IsAlive && StyxWoW.Me.GotAlivePet &&
                           (StyxWoW.Me.CurrentTarget.CurrentTarget == null ||
                            StyxWoW.Me.CurrentTarget.CurrentTarget == StyxWoW.Me)),

                       Spell.Cast("Mend Pet",
                                  ret => StyxWoW.Me.GotAlivePet && !StyxWoW.Me.Pet.HasAura("Mend Pet") &&
                                  (StyxWoW.Me.Pet.HealthPercent < SingularSettings.Instance.Hunter.MendPetPercent ||
                                   (StyxWoW.Me.Pet.HappinessPercent < 90 && TalentManager.HasGlyph("Mend Pet")))),

                       Common.CreateHunterTrapOnAddBehavior("Freezing Trap"),

                       // Rotation

                       Spell.BuffSelf("Focus Fire", ctx => StyxWoW.Me.HasAura("Frenzy")),

                       Spell.Buff("Serpent Sting", ctx => !StyxWoW.Me.CurrentTarget.HasAura("Serpent Sting")),
                       Spell.Cast("Fervor", ctx => StyxWoW.Me.FocusPercent <= 65 && StyxWoW.Me.HasAura("Frenzy") && StyxWoW.Me.Auras["Frenzy"].StackCount >= 5),
                       Spell.BuffSelf("Bestial Wrath", ctx => StyxWoW.Me.FocusPercent > 60 && !StyxWoW.Me.HasAura("The Beast Within")),
                       Spell.Cast("Multi-Shot", ctx => Unit.NearbyUnfriendlyUnits.Count(u => u.IsTargetingMeOrPet) > 2),
                       Spell.Cast("Steady Shot", ctx => Unit.NearbyUnfriendlyUnits.Count(u => u.IsTargetingMeOrPet) > 2),
                       Spell.Cast("Stampede"),
                       Spell.Cast("Rapid Fire", ctx => Unit.NearbyUnfriendlyUnits.Count(u => u.IsTargetingMeOrPet) >= 2),
                       Spell.Cast("Kill Shot", ctx => StyxWoW.Me.CurrentTarget.HealthPercent < 20),
                       Spell.Cast("Kill Command", ctx => StyxWoW.Me.GotAlivePet && StyxWoW.Me.Pet.Location.Distance(StyxWoW.Me.CurrentTarget.Location) < Spell.MeleeRange),
                       Spell.Buff("A Murder of Crows"),
                       Spell.Cast("Glaive Toss"),
                       Spell.Buff("Lynx Rush", ctx => StyxWoW.Me.GotAlivePet && StyxWoW.Me.Pet.Location.Distance(StyxWoW.Me.CurrentTarget.Location) < 10),
                       Spell.Cast("Dire Beast", ctx => StyxWoW.Me.FocusPercent <= 90),
                       Spell.Cast("Barrage"),
                       Spell.Cast("Powershot"),
                       Spell.Cast("Blink Strike", ctx => StyxWoW.Me.GotAlivePet),
                       Spell.Cast("Readiness", ctx => StyxWoW.Me.HasAura("Rapid Fire")),
                       Spell.Cast("Arcane Shot", ctx => StyxWoW.Me.HasAura("Thrill of the Hunt")),
                       Spell.Cast("Arcane Shot", ret => StyxWoW.Me.FocusPercent > 60 || StyxWoW.Me.HasAura("The Beast Within")),
                       Spell.Cast("Steady Shot"),


                       Movement.CreateMoveToTargetBehavior(true, 35f)
                       ));
        }
Ejemplo n.º 23
0
        public static Composite CreatePsychicScreamBehavior(int health = -1)
        {
            if (health < 0)
            {
                health = PriestSettings.PsychicScreamHealth;
            }

            PrioritySelector pri = new PrioritySelector();

            if (PriestSettings.CrowdControlHealth > 0 && SpellManager.HasSpell("Psychic Horror"))
            {
                pri.AddChild(
                    Spell.Cast(
                        "Psychic Horror",
                        ret =>
                {
                    if (Me.HealthPercent <= PriestSettings.CrowdControlHealth)
                    {
                        int count = Unit.UnitsInCombatWithUsOrOurStuff(30).Count(u => !u.IsCrowdControlled() && !u.IsTrivial());
                        if (count == 0)
                        {
                            return(false);
                        }

                        if (count == 1 || !PriestSettings.PsychicScreamAllow || Spell.GetSpellCooldown("Psychic Scream").TotalSeconds > 3)
                        {
                            return(true);
                        }
                    }

                    return(false);
                })
                    );
            }

            if (PriestSettings.PsychicScreamAllow && SpellManager.HasSpell("Psychic Scream"))
            {
                pri.AddChild(
                    Spell.Cast(
                        "Psychic Scream",
                        ret =>
                {
                    if (!PriestSettings.PsychicScreamAllow)
                    {
                        return(false);
                    }

                    int count = Unit.UnitsInCombatWithUsOrOurStuff(8).Count(u => !u.IsCrowdControlled() && !u.IsTrivial());
                    if (count == 0)
                    {
                        return(false);
                    }

                    if (count >= PriestSettings.PsychicScreamAddCount)
                    {
                        return(true);
                    }

                    if (count > 1 && TalentManager.HasGlyph("Psychic Scream"))
                    {
                        return(true);
                    }

                    if (Me.HealthPercent <= health)
                    {
                        return(true);
                    }

                    return(false);
                })
                    );
            }

            return(pri);
        }
Ejemplo n.º 24
0
        private static Composite CreateFeralCatInstanceCombat()
        {
            return(new PrioritySelector(
                       Spell.BuffSelf("Cat Form"),
                       Spell.Cast("Feral Charge (Cat)"),

                       Spell.Cast("Dash",
                                  ret => StyxWoW.Me.CurrentTarget.Distance > Spell.MeleeRange + 2f &&
                                  !StyxWoW.Me.HasAura("Stampeding Roar")),
                       Spell.BuffSelf("Stampeding Roar (Cat)",
                                      ret => StyxWoW.Me.CurrentTarget.Distance > Spell.MeleeRange + 2f &&
                                      !StyxWoW.Me.HasAura("Dash")),

                       Spell.BuffSelf("Barkskin", ret => StyxWoW.Me.HealthPercent < Settings.FeralBarkskin),
                       Spell.BuffSelf("Survival Instincts", ret => StyxWoW.Me.HealthPercent < Settings.SurvivalInstinctsHealth),

                       new Decorator(
                           ret => Unit.NearbyUnfriendlyUnits.Count(u => u.DistanceSqr < 5 * 5) >= 3,
                           new PrioritySelector(
                               Spell.BuffSelf("Tiger's Fury"),
                               Spell.BuffSelf("Berserk"),
                               Spell.Cast("Swipe (Cat)"),
                               Movement.CreateMoveToMeleeBehavior(true)
                               )),

                       Movement.CreateMoveBehindTargetBehavior(),

                       Spell.BuffSelf("Tiger's Fury", ret => StyxWoW.Me.EnergyPercent < 35 && !StyxWoW.Me.HasAura("Stampede")),
                       Spell.BuffSelf("Berserk", ret => StyxWoW.Me.HasAura("Tiger's Fury")),
                       Spell.Cast("Mangle (Cat)",
                                  ret => Has4PieceTier11Bonus && StyxWoW.Me.GetAuraTimeLeft("Strength of the Panther", false).TotalSeconds < 3),
                       Spell.Buff("Faerie Fire (Feral)", ret => !StyxWoW.Me.CurrentTarget.HasSunders()),
                       Spell.Buff("Mangle (Cat)", "Mangle", "Trauma", "Stampede"),
                       Spell.Cast("Ravage!", ret => StyxWoW.Me.GetAuraTimeLeft("Stampede", true).TotalSeconds < 3),
                       Spell.Cast("Ferocious Bite",
                                  ret => TalentManager.GetCount(2, 19) == 2 && StyxWoW.Me.CurrentTarget.HealthPercent < (Has2PieceTier13Bonus ? 60 : 25) &&
                                  (StyxWoW.Me.ComboPoints == 5 ||
                                   StyxWoW.Me.CurrentTarget.HasMyAura("Rip") && StyxWoW.Me.CurrentTarget.GetAuraTimeLeft("Rip", true).TotalSeconds < 3)),
                       Spell.Cast("Shred",
                                  ret => TalentManager.HasGlyph("Bloodletting") && StyxWoW.Me.CurrentTarget.HasMyAura("Rip") &&
                                  StyxWoW.Me.CurrentTarget.MeIsBehind &&
                                  StyxWoW.Me.CurrentTarget.GetAuraTimeLeft("Rip", true).TotalSeconds < 14),
                       Spell.Cast("Rip",
                                  ret => StyxWoW.Me.ComboPoints == 5 && StyxWoW.Me.CurrentTarget.GetAuraTimeLeft("Rip", true).TotalSeconds < 2),
                       Spell.Cast("Ferocious Bite",
                                  ret => StyxWoW.Me.HasAura("Berserk") && StyxWoW.Me.ComboPoints == 5 &&
                                  StyxWoW.Me.CurrentTarget.HasMyAura("Rip") && StyxWoW.Me.CurrentTarget.HasMyAura("Savage Roar") &&
                                  StyxWoW.Me.CurrentTarget.GetAuraTimeLeft("Rip", true).TotalSeconds >= 5 &&
                                  StyxWoW.Me.CurrentTarget.GetAuraTimeLeft("Savage Roar", true).TotalSeconds >= 3),
                       Spell.Cast("Rake",
                                  ret => StyxWoW.Me.HasAura("Tiger's Fury") && StyxWoW.Me.CurrentTarget.HasMyAura("Rake") &&
                                  StyxWoW.Me.CurrentTarget.GetAuraTimeLeft("Rake", true).TotalSeconds < 9),
                       Spell.Cast("Rake", ret => StyxWoW.Me.CurrentTarget.GetAuraTimeLeft("Rake", true).TotalSeconds < 3),
                       Spell.Cast("Shred", ret => StyxWoW.Me.HasAura("Omen of Clarity") && StyxWoW.Me.CurrentTarget.MeIsBehind),
                       Spell.Cast("Mangle (Cat)", ret => StyxWoW.Me.HasAura("Omen of Clarity") && !StyxWoW.Me.CurrentTarget.MeIsBehind),
                       Spell.Cast("Savage Roar", ret => StyxWoW.Me.GetAuraTimeLeft("Savage Roar", true).TotalSeconds < 2),
                       Spell.Cast("Ferocious Bite",
                                  ret => StyxWoW.Me.ComboPoints == 5 && StyxWoW.Me.CurrentTarget.HasMyAura("Rip") &&
                                  StyxWoW.Me.CurrentTarget.GetAuraTimeLeft("Rip", true).TotalSeconds >= 14 &&
                                  (TalentManager.GetCount(2, 17) < 2 ||
                                   StyxWoW.Me.CurrentTarget.HasMyAura("Savage Roar") &&
                                   StyxWoW.Me.CurrentTarget.GetAuraTimeLeft("Savage Roar", true).TotalSeconds >= 10)),
                       Spell.Cast("Ravage!",
                                  ret => StyxWoW.Me.HasAura("Stampede") && !StyxWoW.Me.HasAura("Omen of Clarity") &&
                                  (StyxWoW.Me.HasAura("Tiger's Fury") ||
                                   SpellManager.HasSpell("Tiger's Fury") && !SpellManager.GlobalCooldown &&
                                   SpellManager.Spells["Tiger's Fury"].CooldownTimeLeft.TotalSeconds <= 3)),
                       Spell.Cast("Mangle (Cat)", ret => Has4PieceTier11Bonus && !StyxWoW.Me.HasAura("Strength of the Panther", 3)),
                       new Decorator(
                           ret => StyxWoW.Me.CurrentTarget.MeIsBehind,
                           new PrioritySelector(
                               Spell.Cast("Shred", ret => StyxWoW.Me.HasAura("Tiger's Fury") && StyxWoW.Me.HasAura("Berserk")),
                               Spell.Cast("Shred",
                                          ret => SpellManager.HasSpell("Tiger's Fury") && !SpellManager.GlobalCooldown &&
                                          SpellManager.Spells["Tiger's Fury"].CooldownTimeLeft.TotalSeconds <= 3),
                               Spell.Cast("Shred", ret => StyxWoW.Me.ComboPoints == 4),
                               Spell.Cast("Shred", ret => StyxWoW.Me.EnergyPercent >= 85))),
                       new Decorator(
                           ret => !StyxWoW.Me.CurrentTarget.MeIsBehind,
                           new PrioritySelector(
                               Spell.Cast("Mangle (Cat)", ret => StyxWoW.Me.HasAura("Tiger's Fury") && StyxWoW.Me.HasAura("Berserk")),
                               Spell.Cast("Mangle (Cat)",
                                          ret => SpellManager.HasSpell("Tiger's Fury") && !SpellManager.GlobalCooldown &&
                                          SpellManager.Spells["Tiger's Fury"].CooldownTimeLeft.TotalSeconds <= 3),
                               Spell.Cast("Mangle (Cat)", ret => StyxWoW.Me.ComboPoints == 4),
                               Spell.Cast("Mangle (Cat)", ret => StyxWoW.Me.EnergyPercent >= 85))),
                       Movement.CreateMoveToMeleeBehavior(true)
                       ));
        }
Ejemplo n.º 25
0
        public static Composite CreateHunterSurvivalPvPPullAndCombat()
        {
            return(new PrioritySelector(
                       Common.CreateHunterCallPetBehavior(false),

                       Safers.EnsureTarget(),
                       Spell.BuffSelf("Disengage", ret => SingularSettings.Instance.IsCombatRoutineMovementAllowed() && StyxWoW.Me.CurrentTarget.Distance < Spell.MeleeRange + 3f),
                       Common.CreateHunterBackPedal(),
                       Movement.CreateMoveToLosBehavior(),
                       Movement.CreateFaceTargetBehavior(),
                       Helpers.Common.CreateAutoAttack(true),
                       new Decorator(
                           ret => StyxWoW.Me.CurrentTarget.Distance < 35f,
                           Movement.CreateEnsureMovementStoppedBehavior()),

                       Spell.WaitForCast(true),
                       Helpers.Common.CreateInterruptSpellCast(ret => StyxWoW.Me.CurrentTarget),

                       Spell.Cast("Tranquilizing Shot", ctx => StyxWoW.Me.CurrentTarget.HasAura("Enraged")),

                       Spell.Cast("Concussive Shot", ret => StyxWoW.Me.CurrentTarget.CurrentTargetGuid == StyxWoW.Me.Guid),
                       Spell.Buff("Hunter's Mark"),
                       Spell.BuffSelf("Aspect of the Hawk", ret => !StyxWoW.Me.HasAura("Aspect of the Iron Hawk") && !StyxWoW.Me.HasAura("Aspect of the Hawk")),
                       // Defensive Stuff
                       Spell.Cast(
                           "Intimidation", ret => StyxWoW.Me.CurrentTarget.IsAlive && StyxWoW.Me.GotAlivePet &&
                           (StyxWoW.Me.CurrentTarget.CurrentTarget == null || StyxWoW.Me.CurrentTarget.CurrentTarget == StyxWoW.Me)),

                       Common.CreateHunterTrapOnAddBehavior("Freezing Trap"),

                       Spell.Cast("Mend Pet",
                                  ret => StyxWoW.Me.GotAlivePet && !StyxWoW.Me.Pet.HasAura("Mend Pet") &&
                                  (StyxWoW.Me.Pet.HealthPercent < SingularSettings.Instance.Hunter.MendPetPercent || (StyxWoW.Me.Pet.HappinessPercent < 90 && TalentManager.HasGlyph("Mend Pet")))),

                       // Cooldowns
                       Spell.BuffSelf("Rapid Fire",
                                      ret => (StyxWoW.Me.HasAura("Call of the Wild") ||
                                              !StyxWoW.Me.PetSpells.Any(s => s.Spell != null && s.Spell.Name == "Call of the Wild" && s.Spell.CooldownTimeLeft.TotalSeconds < 60)) &&
                                      !StyxWoW.Me.HasAnyAura("Bloodlust", "Heroism", "Time Warp", "The Beast Within")),

                       // Rotation
                       Spell.Buff("A Murder of Crows"),
                       Spell.Cast("Blink Strike", ctx => StyxWoW.Me.GotAlivePet),
                       Spell.Buff("Lynx Rush", ctx => StyxWoW.Me.GotAlivePet && StyxWoW.Me.Pet.Location.Distance(StyxWoW.Me.CurrentTarget.Location) < 10),
                       Spell.Cast("Blink Strike", ctx => StyxWoW.Me.HasAura("Locked and Load")),
                       Spell.Cast("Glaive Toss"),
                       Spell.Cast("Powershot"),
                       Spell.Cast("Barrage"),
                       Spell.Cast("Multi-Shot", ctx => Unit.NearbyUnfriendlyUnits.Count(u => u.IsTargetingMeOrPet) > 2),
                       Spell.Cast("Steady Shot", ctx => Unit.NearbyUnfriendlyUnits.Count(u => u.IsTargetingMeOrPet) > 2),
                       Spell.Buff("Serpent Sting", ctx => !StyxWoW.Me.CurrentTarget.HasAura("Serpent Sting")),
                       Spell.Cast("Explosive Shot"),
                       Spell.Cast("Kill Shot", ctx => StyxWoW.Me.CurrentTarget.HealthPercent < 20),
                       Spell.Buff("Black Arrow", ctx => !StyxWoW.Me.CurrentTarget.HasAura("Black Arrow")),
                       Spell.Cast("Multi-Shot", ctx => StyxWoW.Me.HasAura("Thrill of the Hunt")),
                       Spell.Cast("Dire Beast"),
                       Spell.Cast("Rapid Fire", ctx => Unit.NearbyUnfriendlyUnits.Count(u => u.IsTargetingMeOrPet) >= 2),
                       Spell.Cast("Stampede"),
                       Spell.Cast("Readiness", ctx => StyxWoW.Me.HasAura("Rapid Fire")),
                       Spell.Cast("Fervor", ctx => StyxWoW.Me.FocusPercent <= 50 && StyxWoW.Me.HasAura("Frenzy") && StyxWoW.Me.Auras["Frenzy"].StackCount >= 5),
                       Spell.Cast("Arcane Shot", ret => StyxWoW.Me.FocusPercent > 67),
                       Spell.CastOnGround("Flare", ret => StyxWoW.Me.Location),
                       Common.CreateHunterTrapBehavior("Snake Trap", false),
                       Common.CreateHunterTrapBehavior("Immolation Trap", false),
                       Spell.Cast("Steady Shot"),

                       Movement.CreateMoveToTargetBehavior(true, 35f)
                       ));
        }
Ejemplo n.º 26
0
        public static Composite CreateMarksmanHunterInstancePullAndCombat()
        {
            return(new PrioritySelector(
                       Common.CreateHunterCallPetBehavior(true),

                       Safers.EnsureTarget(),
                       Spell.BuffSelf("Disengage",
                                      ret => SingularSettings.Instance.Hunter.UseDisengage && StyxWoW.Me.CurrentTarget.Distance < Spell.MeleeRange + 3f),
                       Common.CreateHunterBackPedal(),
                       Movement.CreateMoveToLosBehavior(),
                       Movement.CreateFaceTargetBehavior(),
                       Helpers.Common.CreateAutoAttack(true),
                       new Decorator(
                           ret => StyxWoW.Me.CurrentTarget.Distance < 35f,
                           Movement.CreateEnsureMovementStoppedBehavior()),

                       new Decorator(
                           ret => StyxWoW.Me.IsCasting && StyxWoW.Me.CastingSpell.Name == "Steady Shot",
                           new Action(ret => DoubleSteadyCast = true)),

                       Spell.WaitForCast(true),
                       Helpers.Common.CreateInterruptSpellCast(ret => StyxWoW.Me.CurrentTarget),

                       Spell.Buff("Hunter's Mark"),
                       Spell.BuffSelf("Aspect of the Hawk"),

                       Spell.Cast("Mend Pet",
                                  ret => StyxWoW.Me.GotAlivePet && !StyxWoW.Me.Pet.HasAura("Mend Pet") &&
                                  (StyxWoW.Me.Pet.HealthPercent < SingularSettings.Instance.Hunter.MendPetPercent || (StyxWoW.Me.Pet.HappinessPercent < 90 && TalentManager.HasGlyph("Mend Pet")))),

                       // Cooldowns
                       Spell.BuffSelf("Readiness",
                                      ret => !StyxWoW.Me.HasAura("Rapid Fire") && SpellManager.HasSpell("Rapid Fire") &&
                                      SpellManager.Spells["Rapid Fire"].Cooldown),
                       Spell.BuffSelf("Rapid Fire",
                                      ret => (StyxWoW.Me.HasAura("Call of the Wild") ||
                                              !StyxWoW.Me.PetSpells.Any(s => s.Spell != null && s.Spell.Name == "Call of the Wild" && s.Spell.CooldownTimeLeft.TotalSeconds < 60)) &&
                                      !StyxWoW.Me.HasAnyAura("Bloodlust", "Heroism", "Time Warp", "The Beast Within")),

                       new Decorator(
                           ret => Unit.UnfriendlyUnitsNearTarget(10f).Count() >= 3,
                           new PrioritySelector(
                               Common.CreateHunterTrapBehavior("Explosive Trap"),
                               Spell.Cast("Multi Shot"),
                               Spell.Cast("Steady Shot"),
                               Movement.CreateMoveToTargetBehavior(true, 35f)
                               )
                           ),

                       // Above 90% Careful Aim rotation
                       new Decorator(
                           ret => TalentManager.GetCount(2, 6) > 0 && StyxWoW.Me.CurrentTarget.HealthPercent > 90,
                           new PrioritySelector(
                               new Decorator(
                                   ret => StyxWoW.Me.IsMoving,
                                   new PrioritySelector(
                                       Spell.Cast("Aimed Shot", ret => StyxWoW.Me.HasAura("Fire!")),
                                       Spell.Buff("Serpent Sting", true),
                                       Spell.Cast("Chimera Shot")
                                       )),
                               Spell.Cast("Aimed Shot"),
                               Spell.Cast("Steady Shot"),
                               Movement.CreateMoveToTargetBehavior(true, 35f)
                               )),

                       // Rotation
                       Spell.Buff("Serpent Sting", true),
                       Spell.Cast("Chimera Shot"),
                       Spell.Cast("Steady Shot", ret => DoubleSteadyCast),
                       Spell.Cast("Kill Shot"),
                       Spell.Cast("Aimed Shot", ret => StyxWoW.Me.HasAura("Fire!")),
                       Spell.Cast("Arcane Shot", ret => StyxWoW.Me.FocusPercent > 40),
                       Spell.Cast("Steady Shot"),
                       Movement.CreateMoveToTargetBehavior(true, 35f)
                       ));
        }
Ejemplo n.º 27
0
        public static Composite CreateFrostMageNormalCombat()
        {
            return(new PrioritySelector(
                       Safers.EnsureTarget(),
                       Common.CreateStayAwayFromFrozenTargetsBehavior(),
                       Movement.CreateMoveToLosBehavior(),
                       Movement.CreateFaceTargetBehavior(),
                       Helpers.Common.CreateAutoAttack(true),
                       Spell.WaitForCast(true),

                       // We want our pet alive !
                       new Decorator(
                           ret => !StyxWoW.Me.GotAlivePet && PetManager.PetTimer.IsFinished && SpellManager.CanCast("Summon Water Elemental"),
                           new Action(ret => PetManager.CallPet("Summon Water Elemental"))),

                       // Defensive stuff
                       new Decorator(
                           ret => StyxWoW.Me.ActiveAuras.ContainsKey("Ice Block"),
                           new ActionIdle()),
                       Spell.BuffSelf("Ice Block", ret => StyxWoW.Me.HealthPercent < 20 && !StyxWoW.Me.ActiveAuras.ContainsKey("Hypothermia")),

                       // Cooldowns
                       Spell.BuffSelf("Evocation",
                                      ret => StyxWoW.Me.ManaPercent < 30 || (TalentManager.HasGlyph("Evocation") && StyxWoW.Me.HealthPercent < 50)),
                       Spell.BuffSelf("Mage Ward", ret => StyxWoW.Me.HealthPercent <= 80),
                       Spell.BuffSelf("Mana Shield", ret => StyxWoW.Me.HealthPercent <= 60),

                       new Decorator(
                           ret => Unit.NearbyUnfriendlyUnits.Count(u => u.IsTargetingMeOrPet) >= 3,
                           new PrioritySelector(
                               Spell.BuffSelf("Mirror Image"),
                               Spell.BuffSelf("Icy Veins")
                               )),
                       Common.CreateUseManaGemBehavior(ret => StyxWoW.Me.ManaPercent < 80),

                       new Decorator(
                           ret => !Unit.NearbyUnfriendlyUnits.Any(u => u.DistanceSqr < 10 * 10 && u.IsCrowdControlled()),
                           new PrioritySelector(
                               Pet.CreateCastPetActionOnLocation("Freeze", ret => !StyxWoW.Me.CurrentTarget.HasAura("Frost Nova")),
                               Spell.BuffSelf("Frost Nova",
                                              ret => Unit.NearbyUnfriendlyUnits.Any(u =>
                                                                                    u.DistanceSqr <= 8 * 8 && !u.HasAura("Freeze") &&
                                                                                    !u.HasAura("Frost Nova") && !u.Stunned))
                               )),

                       Common.CreateMagePolymorphOnAddBehavior(),
                       // Rotation
                       Spell.Cast("Deep Freeze",
                                  ret => StyxWoW.Me.ActiveAuras.ContainsKey("Fingers of Frost") ||
                                  StyxWoW.Me.CurrentTarget.HasAura("Freeze") ||
                                  StyxWoW.Me.CurrentTarget.HasAura("Frost Nova")),
                       Spell.BuffSelf("Flame Orb"),
                       Spell.Cast("Arcane Missiles", ret => StyxWoW.Me.ActiveAuras.ContainsKey("Arcane Missiles!")),
                       new Decorator(
                           ret => StyxWoW.Me.ActiveAuras.ContainsKey("Brain Freeze"),
                           new PrioritySelector(
                               Spell.Cast("Frostfire Bolt"),
                               Spell.Cast("Fireball")
                               )),
                       Spell.Cast("Ice Lance",
                                  ret => StyxWoW.Me.ActiveAuras.ContainsKey("Fingers of Frost") ||
                                  StyxWoW.Me.CurrentTarget.HasAura("Freeze") ||
                                  StyxWoW.Me.CurrentTarget.HasAura("Frost Nova") ||
                                  StyxWoW.Me.IsMoving),
                       Spell.Cast("Frostbolt"),
                       Movement.CreateMoveToTargetBehavior(true, 35f)
                       ));
        }
Ejemplo n.º 28
0
        public static Composite CreateShamanElementalNormalPull()
        {
            return(new PrioritySelector(
                       Safers.EnsureTarget(),
                       Movement.CreateMoveToLosBehavior(),
                       Movement.CreateFaceTargetBehavior(),
                       Spell.WaitForCast(true),

                       Spell.BuffSelf("Lightning Shield"),

                       new Decorator(
                           ret => StyxWoW.Me.CurrentTarget.DistanceSqr < 40 * 40,
                           Totems.CreateTotemsNormalBehavior()),

                       // grinding or questing, if target meets these cast Flame Shock if possible
                       // 1. mob is less than 12 yds, so no benefit from delay in Lightning Bolt missile arrival
                       // 2. area has another player competing for mobs (we want to tag the mob quickly)
                       new Decorator(
                           ret => StyxWoW.Me.CurrentTarget.Distance < 12 ||
                           ObjectManager.GetObjectsOfType <WoWPlayer>(true, false).Any(p => p.Location.DistanceSqr(StyxWoW.Me.CurrentTarget.Location) <= 40 * 40),
                           new PrioritySelector(
                               Spell.Buff("Flame Shock", true),
                               Spell.Cast("Unleash Weapon", ret => Common.IsImbuedForDPS(StyxWoW.Me.Inventory.Equipped.MainHand)),
                               Spell.Cast("Earth Shock", ret => !SpellManager.HasSpell("Flame Shock"))
                               )
                           ),

                       // have a big attack loaded up, so don't waste it
                       Spell.Cast("Earth Shock",
                                  ret => StyxWoW.Me.HasAura("Lightning Shield", 5)),

                       // otherwise, start with Lightning Bolt so we can follow with an instant
                       // to maximize damage at initial aggro
                       Spell.Cast("Lightning Bolt", ret => !StyxWoW.Me.IsMoving || StyxWoW.Me.HasAura("Spiritwalker's Grace") || TalentManager.HasGlyph("Unleashed Lightning")),

                       // we are moving so throw an instant of some type
                       Spell.Cast("Flame Shock"),
                       Spell.Cast("Unleash Weapon", ret => Common.IsImbuedForDPS(StyxWoW.Me.Inventory.Equipped.MainHand)),

                       Movement.CreateMoveToTargetBehavior(true, 35f)
                       ));
        }
Ejemplo n.º 29
0
        public static Composite CreateRestoDruidHealOnlyBehavior(bool selfOnly, bool moveInRange)
        {
            HealerManager.NeedHealTargeting = true;
            const uint mapleSeedId = 17034;

            return(new
                   PrioritySelector(
                       ctx => selfOnly ? StyxWoW.Me : HealerManager.Instance.FirstUnit,
                       new Decorator(
                           ret => ret != null && (moveInRange || ((WoWUnit)ret).InLineOfSpellSight && ((WoWUnit)ret).DistanceSqr < 40 * 40),
                           new PrioritySelector(
                               Spell.WaitForCast(false),
                               new Decorator(
                                   ret => moveInRange,
                                   Movement.CreateMoveToLosBehavior(ret => (WoWUnit)ret)),
                               // 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
                               Spell.Heal(
                                   "Lifebloom",
                                   ret => (WoWUnit)ret,
                                   ret =>
                                   StyxWoW.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) || StyxWoW.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))),
                               //Cast rebirth if the tank is dead. Check for Unburdened Rebirth glyph or Maple seed reagent
                               Spell.Heal(
                                   "Rebirth",
                                   ret => (WoWUnit)ret,
                                   ret => StyxWoW.Me.Combat && RaFHelper.Leader != null && (WoWUnit)ret == RaFHelper.Leader &&
                                   ((WoWUnit)ret).Dead && (TalentManager.HasGlyph("Unburdened Rebirth") || StyxWoW.Me.BagItems.Any(i => i.Entry == mapleSeedId))),
                               Spell.Heal(
                                   "Tranquility",
                                   ret => StyxWoW.Me.Combat && StyxWoW.Me.IsInParty && Unit.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
                               Spell.Buff(
                                   "Innervate",
                                   ret => (WoWUnit)ret,
                                   ret =>
                                   TalentManager.HasGlyph("Innervate") && StyxWoW.Me.Combat && (WoWUnit)ret != StyxWoW.Me &&
                                   StyxWoW.Me.ManaPercent <= SingularSettings.Instance.Druid.InnervateMana &&
                                   ((WoWUnit)ret).PowerType == WoWPowerType.Mana && ((WoWUnit)ret).ManaPercent <= SingularSettings.Instance.Druid.InnervateMana),
                               Spell.Heal(
                                   "Swiftmend",
                                   ret => (WoWUnit)ret,
                                   ret => StyxWoW.Me.Combat && ((WoWUnit)ret).HealthPercent <= SingularSettings.Instance.Druid.Swiftmend &&
                                   (((WoWUnit)ret).HasAura("Rejuvenation") || ((WoWUnit)ret).HasAura("Regrowth"))),
                               Spell.Heal(
                                   "Wild Growth",
                                   ret => (WoWUnit)ret,
                                   ret => StyxWoW.Me.IsInParty && Unit.NearbyFriendlyPlayers.Count(
                                       p => p.IsAlive && p.HealthPercent <= SingularSettings.Instance.Druid.WildGrowthHealth &&
                                       p.Location.DistanceSqr(((WoWUnit)ret).Location) <= 30 * 30) >= SingularSettings.Instance.Druid.WildGrowthCount),
                               Spell.Heal(
                                   "Regrowth",
                                   ret => (WoWUnit)ret,
                                   ret => !((WoWUnit)ret).HasMyAura("Regrowth") && ((WoWUnit)ret).HealthPercent <= SingularSettings.Instance.Druid.Regrowth),
                               Spell.Heal(
                                   "Healing Touch",
                                   ret => (WoWUnit)ret,
                                   ret => ((WoWUnit)ret).HealthPercent <= SingularSettings.Instance.Druid.HealingTouch),
                               Spell.Heal(
                                   "Nourish",
                                   ret => (WoWUnit)ret,
                                   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")))),
                               Spell.Heal(
                                   "Rejuvenation",
                                   ret => (WoWUnit)ret,
                                   ret => !((WoWUnit)ret).HasMyAura("Rejuvenation") &&
                                   ((WoWUnit)ret).HealthPercent <= SingularSettings.Instance.Druid.Rejuvenation),
                               new Decorator(
                                   ret => StyxWoW.Me.Combat && StyxWoW.Me.GotTarget && Unit.NearbyFriendlyPlayers.Count(u => u.IsInMyPartyOrRaid) == 0,
                                   new PrioritySelector(
                                       Movement.CreateMoveToLosBehavior(),
                                       Movement.CreateFaceTargetBehavior(),
                                       Helpers.Common.CreateInterruptSpellCast(ret => StyxWoW.Me.CurrentTarget),
                                       Spell.Buff("Moonfire"),
                                       Spell.Cast("Starfire", ret => StyxWoW.Me.HasAura("Fury of Stormrage")),
                                       Spell.Cast("Wrath"),
                                       Movement.CreateMoveToTargetBehavior(true, 35f)
                                       )),
                               new Decorator(
                                   ret => moveInRange,
                                   Movement.CreateMoveToTargetBehavior(true, 35f, ret => (WoWUnit)ret))
                               ))));
        }
Ejemplo n.º 30
0
        public static Composite CreateRestoShamanCombatBehaviorInstances()
        {
#if OLD_APPROACH
            return(new PrioritySelector(

                       ctx => HealerManager.Instance.TargetList.Any(t => !t.IsMe && t.IsAlive),

                       Safers.EnsureTarget(),
                       Movement.CreateFaceTargetBehavior(),

                       Spell.WaitForCastOrChannel(),

                       new Decorator(
                           ret => !Spell.IsGlobalCooldown(),
                           new PrioritySelector(

                               CreateRestoDiagnosticOutputBehavior(on => Me.CurrentTarget),

                               new Decorator(
                                   ret => (bool)ret,
                                   new PrioritySelector(
                                       HealerManager.CreateStayNearTankBehavior(),
                                       CreateRestoShamanHealingOnlyBehavior(selfOnly: false),
                                       Helpers.Common.CreateInterruptBehavior(),
                                       Dispelling.CreatePurgeEnemyBehavior("Purge"),
                                       Totems.CreateTotemsBehavior(),
                                       Spell.Cast("Lightning Bolt", ret => TalentManager.HasGlyph("Telluric Currents"))
                                       )
                                   ),

                               new Decorator(
                                   ret => !((bool)ret),
                                   new PrioritySelector(
                                       CreateRestoDiagnosticOutputBehavior(on => HealerManager.Instance.FirstUnit),
                                       Spell.Cast("Elemental Blast"),
                                       Spell.Buff("Flame Shock", true, on => Me.CurrentTarget, req => true, 3),
                                       Spell.Cast("Lava Burst"),
                                       Spell.Cast("Frost Shock"),
                                       Spell.Cast("Chain Lightning", ret => Spell.UseAOE && Unit.UnfriendlyUnitsNearTarget(10f).Count() >= 2 && !Unit.UnfriendlyUnitsNearTarget(12f).Any(u => u.IsCrowdControlled())),
                                       Spell.Cast("Lightning Bolt")
                                       )
                                   )

                               )
                           )
                       ));
#else
            return(new PrioritySelector(

                       Spell.WaitForCastOrChannel(),
                       CreateRestoDiagnosticOutputBehavior(on => HealerManager.FindLowestHealthTarget()),

                       HealerManager.CreateStayNearTankBehavior(),

                       new Decorator(
                           ret => Me.Combat && HealerManager.AllowHealerDPS(),
                           new PrioritySelector(

                               Helpers.Common.EnsureReadyToAttackFromMediumRange(),
                               Movement.CreateFaceTargetBehavior(),
                               Spell.WaitForCastOrChannel(),

                               new Decorator(
                                   ret => !Spell.IsGlobalCooldown(),
                                   new PrioritySelector(
                                       Helpers.Common.CreateInterruptBehavior(),

                                       Totems.CreateTotemsBehavior(),

                                       Movement.WaitForFacing(),
                                       Movement.WaitForLineOfSpellSight(),

                                       Common.CastElementalBlast(cancel: c => HealerManager.CancelHealerDPS()),
                                       Spell.Buff("Flame Shock", 3, on => Me.CurrentTarget, req => true),
                                       Spell.Cast("Lava Burst", on => Me.CurrentTarget, req => true, cancel => HealerManager.CancelHealerDPS()),
                                       Spell.Cast("Frost Shock"),
                                       Spell.Cast("Chain Lightning", on => Me.CurrentTarget, req => Spell.UseAOE && Unit.UnfriendlyUnitsNearTarget(10f).Count() >= 2 && !Unit.UnfriendlyUnitsNearTarget(12f).Any(u => u.IsCrowdControlled()), cancel => HealerManager.CancelHealerDPS()),
                                       Spell.Cast("Lightning Bolt", on => Me.CurrentTarget, req => true, cancel => HealerManager.CancelHealerDPS())
                                       )
                                   )
                               )
                           ),

                       new Decorator(
                           ret => Unit.NearbyGroupMembers.Any(m => m.IsAlive && !m.IsMe),
                           new PrioritySelector(
                               CreateRestoShamanHealingOnlyBehavior(selfOnly: false),
                               Helpers.Common.CreateInterruptBehavior(),
                               Dispelling.CreatePurgeEnemyBehavior("Purge"),
                               Totems.CreateTotemsBehavior(),
                               new Decorator(
                                   req => TalentManager.HasGlyph("Telluric Currents"),
                                   new PrioritySelector(
                                       Safers.EnsureTarget(),
                                       Movement.CreateFaceTargetBehavior(),
                                       Spell.Cast("Lightning Bolt",
                                                  mov => true,
                                                  on => Unit.NearbyUnitsInCombatWithUsOrOurStuff
                                                  .Where(u => u.IsAlive && u.SpellDistance() < 40 && Me.IsSafelyFacing(u))
                                                  .OrderByDescending(u => u.HealthPercent)
                                                  .FirstOrDefault(),
                                                  req => !HealerManager.Instance.TargetList.Any(h => h.IsAlive && h.SpellDistance() < 40 && h.HealthPercent < ShamanSettings.RestoHealSettings.TelluricHealthCast),
                                                  cancel => HealerManager.Instance.TargetList.Any(h => h.IsAlive && h.SpellDistance() < 40 && h.HealthPercent < ShamanSettings.RestoHealSettings.TelluricHealthCancel)
                                                  )
                                       )
                                   )
                               )
                           )
                       ));
#endif
        }