Ejemplo n.º 1
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()
                       ));
        }
Ejemplo n.º 2
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")))
                     ));
        }
Ejemplo n.º 3
0
        public Composite CreateAfflictionCombat()
        {
            WantedPet = "Succubus";

            return(new PrioritySelector(
                       CreateEnsureTarget(),
                       //CreateLosAndFace(ret => Me.CurrentTarget),
                       CreateMoveToAndFace(35f, ret => Me.CurrentTarget),
                       CreateWaitForCast(),
                       CreateAutoAttack(true),
                       // Emergencies
                       new Decorator(
                           ret => Me.HealthPercent < 20,
                           new PrioritySelector(
                               //CreateSpellBuff("Fear", ret => !Me.CurrentTarget.HasAura("Fear")),
                               CreateSpellCast("Howl of Terror", ret => Me.CurrentTarget.Distance < 10 && Me.CurrentTarget.IsPlayer),
                               CreateSpellCast("Death Coil", ret => !Me.CurrentTarget.HasAura("Howl of Terror") && !Me.CurrentTarget.HasAura("Fear")),
                               CreateSpellBuffOnSelf("Soulburn", ret => Me.CurrentSoulShards > 0),
                               CreateSpellCast("Drain Life")
                               )),
                       CreateSpellCast("Life Tap", ret => Me.ManaPercent < 10),
                       CreateSpellCast("Health Funnel", ret => Me.GotAlivePet && Me.Pet.HealthPercent < 30),
                       // Finishing sequence
                       CreateSpellCast(
                           "Soul Swap",
                           ret =>
                           !Me.HasAura("Soul Swap") && Me.CurrentTarget.HealthPercent < 10 && Me.CurrentTarget.HasAura("Unstable Affliction") &&
                           !CurrentTargetIsEliteOrBoss),
                       CreateSpellCast("Drain Soul", ret => Me.CurrentTarget.HealthPercent < 10),
                       // Elites
                       new Decorator(
                           ret => CurrentTargetIsEliteOrBoss,
                           new PrioritySelector(
                               CreateSpellBuffOnSelf("Demon Soul"),
                               CreateSpellBuff("Curse of Elements", ret => !Me.CurrentTarget.HasAura("Curse of Elements")),
                               new Decorator(
                                   ret => SpellManager.CanCast("Summon Infernal"),
                                   new Action(
                                       ret =>
            {
                SpellManager.Cast("Summon Infernal");
                LegacySpellManager.ClickRemoteLocation(Me.CurrentTarget.Location);
            }))
                               )),
                       // AoE
                       new Decorator(
                           ret => NearbyUnfriendlyUnits.Count(u => u.Distance < 15) >= 5,
                           new PrioritySelector(
                               CreateSpellBuffOnSelf("Demon Soul"),
                               CreateSpellBuffOnSelf(
                                   "Soulburn",
                                   ret => !Me.CurrentTarget.HasAura("Seed of Corruption") && Me.CurrentSoulShards > 0 && TalentManager.GetCount(1, 15) == 1),
                               CreateSpellBuff("Seed of Corruption", ret => !Me.CurrentTarget.HasAura("Seed of Corruption"))
                               )),
                       // Standard Nuking
                       CreateSpellCast("Shadow Bolt", ret => Me.HasAura("Shadow Trance")),
                       CreateSpellBuff("Haunt"),
                       CreateSpellCast("Soul Swap", ret => Me.HasAura("Soul Swap") && Me.CurrentTarget.HealthPercent > 10),
                       CreateSpellBuff("Bane of Doom", ret => CurrentTargetIsEliteOrBoss && !Me.CurrentTarget.HasAura("Bane of Doom")),
                       CreateSpellBuff("Bane of Agony", ret => !Me.CurrentTarget.HasAura("Bane of Agony") && !Me.CurrentTarget.HasAura("Bane of Doom")),
                       CreateSpellBuff("Corruption", ret => !Me.CurrentTarget.HasAura("Corruption") && !Me.CurrentTarget.HasAura("Seed of Corruption")),
                       CreateSpellBuff("Unstable Affliction", ret => !Me.CurrentTarget.HasAura("Unstable Affliction")),
                       CreateSpellCast("Drain Soul", ret => Me.CurrentTarget.HealthPercent < 25),
                       CreateSpellCast("Shadowflame", ret => Me.CurrentTarget.Distance < 5),
                       CreateSpellBuffOnSelf("Demon Soul"),
                       CreateSpellBuff("Curse of Weakness", ret => Me.CurrentTarget.IsPlayer && !Me.CurrentTarget.HasAura("Curse of Weakness")),
                       CreateSpellCast("Life Tap", ret => Me.ManaPercent < 50 && Me.HealthPercent > 70),
                       CreateSpellCast("Drain Life", ret => Me.HealthPercent < 70),
                       CreateSpellCast("Health Funnel", ret => Me.GotAlivePet && Me.Pet.HealthPercent < 70),
                       CreateSpellCast("Shadow Bolt")
                       ));
        }
Ejemplo n.º 4
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()
                       ));
        }