示例#1
0
        public Composite CreateCombatRogueCombat()
        {
            return(new PrioritySelector
                   (
                       CreateEnsureTarget(),
                       // Make sure we're in range, and facing the damned target. (LOS check as well)
                       CreateAutoAttack(false),
                       CreateMoveToAndFace(5f, ret => Me.CurrentTarget),
                       // Kick/Defensive cooldowns/Recuperation
                       CreateCombatRogueDefense(),
                       // Redirect if we have CP left
                       CreateSpellCast(
                           "Redirect", ret => Me.RawComboPoints > 0 &&
                           Me.ComboPoints < 1),

                       // CP generators, put em at start, since they're strictly conditional
                       // and will help burning energy on Adrenaline Rush
                       new Decorator(
                           ret => (NearbyUnfriendlyUnits.Count(u => u.DistanceSqr < 6 * 6) <= 1 ||
                                   NearbyUnfriendlyUnits.Any(u => u.DistanceSqr < 6 * 6 && u.HasAura("Blind"))) && Me.HasAura("Blade Flurry"),
                           new Sequence(
                               new Action(ret => Lua.DoString("RunMacroText(\"/cancelaura Blade Flurry\")")),
                               new Action(ret => StyxWoW.SleepForLagDuration()))),
                       CreateRogueBlindOnAddBehavior(),
                       CreateSpellCast("Blade Flurry", ret => !NearbyUnfriendlyUnits.Any(u => u.HasAura("Blind")) && NearbyUnfriendlyUnits.Count(u => u.DistanceSqr < 6 * 6) > 1),
                       CreateSpellCast("Eviscerate", ret => !CurrentTargetIsElite && Me.CurrentTarget.HealthPercent <= 40 && Me.ComboPoints > 2),
                       // Always keep Slice and Dice up
                       CreateSpellBuffOnSelf("Slice and Dice", ret => Me.RawComboPoints > 0),
                       // Sinister Strike till 4 CP
                       CreateSpellCast("Sinister Strike", ret => Me.ComboPoints < 4),
                       // Revealing Strike if we're at 4 CP and target does not have it already
                       CreateSpellBuff("Revealing Strike", ret => Me.ComboPoints > 3 && Me.ComboPoints < 5),
                       //
                       // Cooldowns:

                       CreateSpellBuffOnSelf("Adrenaline Rush", ret => Me.CurrentEnergy < 20),
                       // Killing Spree if we are at highest level of Bandit's Guise ( Shallow Insight / Moderate Insight / Deep Insight )
                       CreateSpellCast("Killing Spree", ret => Me.CurrentEnergy < 30 && Me.HasAura("Deep Insight")),
                       // Finishers:
                       new Decorator(
                           ret => Me.ComboPoints > 4,
                           new PrioritySelector(
                               // wait out low SnD duration to cast it at it's finish
                               // through not casting other finishers meanwhile and launching SnD below 1 sec duration
                               new Decorator(
                                   ret => Me.Auras["Slice and Dice"].TimeLeft.TotalSeconds > 5 ||
                                   Me.CurrentEnergy > 85,
                                   new PrioritySelector(
                                       // Check for >our own< Rupture debuff on target since there may be more rogues in party/raid!
                                       CreateSpellCast(
                                           "Rupture", ret => !Me.CurrentTarget.GetAllAuras().Any(a => a.Name == "Rupture" && a.CreatorGuid == Me.Guid)),
                                       CreateSpellCast("Eviscerate"))),
                               CreateSpellCast("Slice and Dice", ret => Me.Auras["Slice and Dice"].TimeLeft.TotalSeconds < 0.9)))));
        }
示例#2
0
 public Composite CreateLowbiePriestCombat()
 {
     return(new PrioritySelector(
                CreateDiscHealOnlyBehavior(),
                CreateEnsureTarget(),
                CreateMoveToAndFace(28f, ret => Me.CurrentTarget),
                CreateWaitForCast(),
                CreateSpellBuffOnSelf("Arcane Torrent", ret => NearbyUnfriendlyUnits.Any(u => u.IsCasting && u.DistanceSqr < 8 * 8)),
                CreateSpellBuff("Shadow Word: Pain"),
                CreateSpellCast("Mind Blast"),
                CreateSpellCast("Smite"),
                CreateFireRangedWeapon()
                ));
 }
示例#3
0
        public Composite CreateFireMageCombat()
        {
            return(new PrioritySelector(
                       CreateEnsureTarget(),
                       //Move away from frozen targets
                       new Decorator(
                           ret => Me.CurrentTarget.HasAura("Frost Nova") && Me.CurrentTarget.DistanceSqr < 5 * 5,
                           new Action(
                               ret =>
            {
                Logger.Write("Getting away from frozen target");
                WoWPoint moveTo = WoWMathHelper.CalculatePointFrom(Me.Location, Me.CurrentTarget.Location, 10f);

                if (Navigator.CanNavigateFully(Me.Location, moveTo))
                {
                    Navigator.MoveTo(moveTo);
                }
            })),
                       // Make sure we're in range, and facing the damned target. (LOS check as well)
                       CreateMoveToAndFace(39f, ret => Me.CurrentTarget),
                       CreateSpellBuffOnSelf("Ice Block", ret => Me.HealthPercent < 10 && !Me.ActiveAuras.ContainsKey("Hypothermia")),
                       new Decorator(ret => Me.ActiveAuras.ContainsKey("Ice Block"),
                                     new ActionIdle()),
                       CreateSpellBuff("Frost Nova", ret => NearbyUnfriendlyUnits.Any(u => u.DistanceSqr <= 8 * 8)),
                       CreateSpellCast("Evocation", ret => Me.ManaPercent < 20),
                       new Decorator(ret => HaveManaGem() && Me.ManaPercent <= 30,
                                     new Action(ctx => UseManaGem())),
                       CreateSpellBuffOnSelf("Mana Shield", ret => !Me.Auras.ContainsKey("Mana Shield") && Me.HealthPercent <= 75),
                       CreateMagePolymorphOnAddBehavior(),
                       CreateSpellCast("Counterspell", ret => Me.CurrentTarget.IsCasting),
                       CreateSpellCast("Mirror Image", ret => Me.CurrentTarget.HealthPercent > 20),
                       CreateSpellCast("Time Warp", ret => Me.CurrentTarget.HealthPercent > 20),
                       new Decorator(
                           ret => Me.CurrentTarget.HealthPercent > 50,
                           new Sequence(
                               new Action(ctx => Me.CurrentTarget.Face()),
                               new Action(ctx => StyxWoW.SleepForLagDuration()),
                               new PrioritySelector(CreateSpellCast("Flame Orb"))
                               )),
                       CreateSpellCast("Scorch", ret => (!Me.CurrentTarget.HasAura("Critical Mass") || Me.CurrentTarget.Auras["Critical Mass"].TimeLeft.TotalSeconds < 3) && TalentManager.GetCount(2, 20) != 0 && LastSpellCast != "Scorch"),
                       CreateSpellCast("Pyroblast", ret => Me.ActiveAuras.ContainsKey("Hot Streak") && Me.ActiveAuras["Hot Streak"].TimeLeft.TotalSeconds > 1),
                       CreateSpellCast("Fire Blast", ret => Me.ActiveAuras.ContainsKey("Impact")),
                       CreateSpellBuff("Living Bomb", ret => !Me.CurrentTarget.HasAura("Living Bomb")),
                       CreateSpellCast("Combustion", ret => Me.CurrentTarget.ActiveAuras.ContainsKey("Living Bomb") && Me.CurrentTarget.ActiveAuras.ContainsKey("Ignite") && Me.CurrentTarget.ActiveAuras.ContainsKey("Pyroblast!")),
                       CreateSpellCast("Fireball"),
                       CreateFireRangedWeapon()
                       ));
        }
示例#4
0
        public Composite CreateArcaneMageCombat()
        {
            return(new PrioritySelector(
                       CreateEnsureTarget(),
                       //Move away from frozen targets
                       new Decorator(
                           ret => Me.CurrentTarget.HasAura("Frost Nova") && Me.CurrentTarget.DistanceSqr < 5 * 5,
                           new Action(
                               ret =>
            {
                Logger.Write("Getting away from frozen target");
                WoWPoint moveTo = WoWMathHelper.CalculatePointFrom(Me.Location, Me.CurrentTarget.Location, 10f);

                if (Navigator.CanNavigateFully(Me.Location, moveTo))
                {
                    Navigator.MoveTo(moveTo);
                }
            })),

                       CreateMoveToAndFace(34f, ret => Me.CurrentTarget),
                       CreateSpellBuffOnSelf("Ice Block", ret => Me.HealthPercent < 10 && !Me.ActiveAuras.ContainsKey("Hypothermia")),
                       new Decorator(ret => Me.ActiveAuras.ContainsKey("Ice Block"),
                                     new ActionIdle()),
                       CreateSpellBuff("Frost Nova", ret => NearbyUnfriendlyUnits.Any(u => u.DistanceSqr <= 8 * 8)),
                       CreateWaitForCast(true),
                       CreateSpellCast("Evocation", ret => Me.ManaPercent < 20),
                       new Decorator(ret => HaveManaGem() && Me.ManaPercent <= 30,
                                     new Action(ctx => UseManaGem())),
                       CreateMagePolymorphOnAddBehavior(),
                       CreateSpellCast("Counterspell", ret => Me.CurrentTarget.IsCasting),
                       CreateSpellCast("Mirror Image", ret => Me.CurrentTarget.HealthPercent > 20),
                       CreateSpellCast("Time Warp", ret => Me.CurrentTarget.HealthPercent > 20),
                       new Decorator(
                           ret => Me.CurrentTarget.HealthPercent > 50,
                           new Sequence(
                               new Action(ctx => Me.CurrentTarget.Face()),
                               new Action(ctx => StyxWoW.SleepForLagDuration()),
                               new PrioritySelector(CreateSpellCast("Flame Orb"))
                               )),
                       CreateSpellBuffOnSelf("Mana Shield", ret => !Me.Auras.ContainsKey("Mana Shield") && Me.HealthPercent <= 75),
                       CreateSpellCast("Slow", ret => TalentManager.GetCount(1, 18) < 2 && !Me.CurrentTarget.ActiveAuras.ContainsKey("Slow") && Me.CurrentTarget.Distance > 5),
                       CreateSpellCast("Arcane Missiles", ret => Me.ActiveAuras.ContainsKey("Arcane Missiles!") && Me.ActiveAuras.ContainsKey("Arcane Blast") && Me.ActiveAuras["Arcane Blast"].StackCount >= 2),
                       CreateSpellCast("Arcane Barrage", ret => Me.ActiveAuras.ContainsKey("Arcane Blast") && Me.ActiveAuras["Arcane Blast"].StackCount >= 3),
                       CreateSpellBuffOnSelf("Presence of Mind"),
                       CreateSpellCast("Arcane Blast"),
                       CreateFireRangedWeapon()
                       ));
        }
示例#5
0
        public Composite CreateProtectionWarriorCombat()
        {
            NeedTankTargeting = true;
            return
                (new PrioritySelector(
                     CreateEnsureTarget(),
                     // Note: this will make sure we charge at any unit within proper range. (Like an actual tank would)
                     // We can cast Charge while in combat if we have the talent. [Notice that I am NOT checking for the talent!]
                     // chargeSpell.CanCast should return false if we can't cast it.
                     CreateSpellCast("Charge", ret => Me.CurrentTarget.Distance.Between(8f, TalentManager.HasGlyph("Long Charge") ? 30f : 25f)),
                     CreateSpellCast("Intercept", ret => Me.CurrentTarget.Distance.Between(8f, 25f)),
                     CreateMoveToAndFace(5f, ret => Me.CurrentTarget),
                     CreateAutoAttack(true),
                     CreateSpellCast("Heroic Strike", ret => Me.CurrentRage >= 60),
                     CreateSpellCast("Revenge"),

                     // If we have Blood and Thunder talented, then try and apply Rend via tclap. (This will apply rend to all targets!)
                     CreateSpellCast(
                         "Thunder Clap", ret => NearbyUnfriendlyUnits.Any(u => HasAuraStacks("Rend", 1, u)) && TalentManager.GetCount(3, 3) != 0),
                     CreateSpellBuff("Rend"),
                     // To be honest, we should be throwing this whenever its off CD. But we'll use it for the 20% hit speed debuff for now.
                     CreateSpellCast("Thunder Clap"),
                     new Decorator(
                         ret => NearbyUnfriendlyUnits.Count(u => u.Distance < 6) > 2,
                         new PrioritySelector(
                             CreateSpellCast("War Stomp"),
                             CreateSpellCast("Thunder Clap"),
                             CreateSpellCast("Shockwave"),
                             CreateSpellCast("Shield Block")
                             )),
                     CreateSpellCast("Victory Rush"),
                     CreateSpellCast("Arcane Torrent", ret => Me.CurrentTarget.IsCasting),
                     CreateSpellCast("Shield Bash", ret => Me.CurrentTarget.IsCasting),
                     CreateSpellCast("Shield Slam"),
                     CreateSpellBuff("Demoralizing Shout", ret => Me.CurrentRage > 30 && Me.CurrentTarget.HealthPercent > 30),
                     // Get sunders up, Devastate if we have it (extra damage) or just plain Sunder.
                     new Decorator(
                         ret => !Me.CurrentTarget.HasAura("Sunder Armor") || Me.CurrentTarget.Auras["Sunder Armor"].StackCount < 3,
                         new PrioritySelector(
                             CreateSpellCast("Devastate"),
                             CreateSpellCast("Sunder Armor")))
                     ));
        }
示例#6
0
        public Composite CreateFrostMageCombat()
        {
            WantedPet = "Water Elemental";
            return(new PrioritySelector(
                       CreateEnsureTarget(),
                       //Move away from frozen targets
                       new Decorator(
                           ret => (Me.CurrentTarget.HasAura("Frost Nova") || Me.CurrentTarget.HasAura("Freeze")) && Me.CurrentTarget.DistanceSqr < 5 * 5,
                           new Action(
                               ret =>
            {
                Logger.Write("Getting away from frozen target");
                WoWPoint moveTo = WoWMathHelper.CalculatePointFrom(Me.Location, Me.CurrentTarget.Location, 10f);

                if (Navigator.CanNavigateFully(Me.Location, moveTo))
                {
                    Navigator.MoveTo(moveTo);
                }
            })),
                       CreateMoveToAndFace(34f, ret => Me.CurrentTarget),
                       CreateWaitForCast(true),
                       CreateCastPetActionOnLocation("Freeze", ret => !Me.CurrentTarget.HasAura("Frost Nova")),
                       CreateSpellBuff("Frost Nova", ret => NearbyUnfriendlyUnits.Any(u => u.DistanceSqr <= 8 * 8)),
                       CreateMagePolymorphOnAddBehavior(),
                       new Decorator(
                           ret => !Me.GotAlivePet,
                           new Action(ret => PetManager.CallPet(WantedPet))),
                       CreateSpellCast("Evocation", ret => Me.ManaPercent < 20),
                       CreateSpellCast("Counterspell", ret => Me.CurrentTarget.IsCasting),
                       CreateSpellCast("Mirror Image"),
                       CreateSpellCast("Time Warp"),
                       new Decorator(
                           ret => Me.CurrentTarget.HealthPercent > 50,
                           new Sequence(
                               new Action(ctx => Me.CurrentTarget.Face()),
                               new Action(ctx => StyxWoW.SleepForLagDuration()),
                               new PrioritySelector(CreateSpellCast("Flame Orb"))
                               )),
                       CreateSpellBuffOnSelf("Ice Barrier", ret => !Me.Auras.ContainsKey("Mana Shield")),
                       CreateSpellBuffOnSelf("Mana Shield", ret => !Me.Auras.ContainsKey("Ice Barrier") && Me.HealthPercent <= 50),
                       CreateSpellCast(
                           "Deep Freeze",
                           ret =>
                           (Me.ActiveAuras.ContainsKey("Fingers of Frost") || Me.CurrentTarget.HasAura("Frost Nova") || Me.CurrentTarget.HasAura("Freeze"))),
                       CreateSpellCast(
                           "Ice Lance",
                           ret =>
                           (Me.ActiveAuras.ContainsKey("Fingers of Frost") || Me.CurrentTarget.ActiveAuras.ContainsKey("Frost Nova") ||
                            Me.CurrentTarget.ActiveAuras.ContainsKey("Freeze"))),
                       //CreateSpellCast("Fireball", Me.ActiveAuras.ContainsKey("Brain Freeze")),
                       CreateSpellCast("Arcane Missiles", ret => Me.ActiveAuras.ContainsKey("Arcane Missiles!")),
                       new Decorator(
                           ret => Me.ActiveAuras.ContainsKey("Brain Freeze"),
                           new PrioritySelector(
                               CreateSpellCast("Frostfire Bolt"),
                               CreateSpellCast("Fireball")
                               )),
                       CreateSpellBuff("Fire Blast", ret => Me.CurrentTarget.HealthPercent < 10),
                       CreateSpellCast("Frostbolt")
                       ));
        }