Beispiel #1
0
        public static Composite CreateEnhancementShamanNormalPull()
        {
            return(new PrioritySelector(
                       Safers.EnsureTarget(),
                       Movement.CreateMoveToLosBehavior(),
                       Movement.CreateFaceTargetBehavior(),
                       Spell.WaitForCast(true),
                       Spell.Cast("Lightning Shield", ret => StyxWoW.Me, ret => !StyxWoW.Me.HasAura("Lightning Shield", 2)),

                       new Decorator(
                           ret => StyxWoW.Me.Level < 20,
                           new PrioritySelector(
                               new Decorator(
                                   ret => StyxWoW.Me.CurrentTarget.DistanceSqr < 40 * 40,
                                   Totems.CreateSetTotems()),
                               Spell.Cast("Lightning Bolt"),
                               Movement.CreateMoveToTargetBehavior(true, 35f)
                               )),

                       Common.CreateAutoAttack(true),
                       new Decorator(
                           ret => StyxWoW.Me.CurrentTarget.DistanceSqr < 20 * 20,
                           Totems.CreateSetTotems()),
                       Spell.Cast("Earth Shock"),
                       Movement.CreateMoveToMeleeBehavior(true)
                       ));
        }
Beispiel #2
0
        public static Composite CreateEnhancementShamanInstancePullAndCombat()
        {
            return(new PrioritySelector(
                       Safers.EnsureTarget(),
                       Movement.CreateMoveToLosBehavior(),
                       Movement.CreateFaceTargetBehavior(),
                       Spell.WaitForCast(true),
                       Totems.CreateSetTotems(),
                       Common.CreateAutoAttack(true),
                       Common.CreateInterruptSpellCast(ret => StyxWoW.Me.CurrentTarget),

                       Spell.BuffSelf("Lightning Shield"),
                       Spell.BuffSelf("Spiritwalker's Grace", ret => StyxWoW.Me.IsMoving && StyxWoW.Me.Combat),
                       Spell.BuffSelf("Feral Spirit"),
                       new Decorator(
                           ret => Unit.UnfriendlyUnitsNearTarget(10f).Count() >= 3,
                           new PrioritySelector(
                               Spell.Cast("Unleash Elements"),
                               Spell.BuffSelf("Magma Totem",
                                              ret => !StyxWoW.Me.Totems.Any(t => t.WoWTotem == WoWTotem.Magma)),
                               Spell.Buff("Flame Shock", true),
                               Spell.Cast("Lava Lash",
                                          ret => StyxWoW.Me.CurrentTarget.HasMyAura("Flame Shock") &&
                                          StyxWoW.Me.Inventory.Equipped.OffHand != null &&
                                          StyxWoW.Me.Inventory.Equipped.OffHand.ItemInfo.ItemClass == WoWItemClass.Weapon),
                               Spell.Cast("Fire Nova"),
                               Spell.Cast("Chain Lightning", ret => StyxWoW.Me.HasAura("Maelstrom Weapon", 5)),
                               Spell.Cast("Stormstrike"),
                               Movement.CreateMoveToMeleeBehavior(true)
                               )),

                       // Totem stuff
                       // Pop the ele on bosses
                       Spell.BuffSelf("Fire Elemental Totem",
                                      ret => StyxWoW.Me.CurrentTarget.IsBoss() && StyxWoW.Me.CurrentTarget.DistanceSqr < 20 * 20 &&
                                      !StyxWoW.Me.Totems.Any(t => t.WoWTotem == WoWTotem.FireElemental)),
                       Spell.BuffSelf("Searing Totem",
                                      ret => StyxWoW.Me.CurrentTarget.Distance < Totems.GetTotemRange(WoWTotem.Searing) - 2f &&
                                      !StyxWoW.Me.Totems.Any(
                                          t => t.Unit != null && t.WoWTotem == WoWTotem.Searing &&
                                          t.Unit.Location.Distance(StyxWoW.Me.CurrentTarget.Location) < Totems.GetTotemRange(WoWTotem.Searing)) &&
                                      !StyxWoW.Me.Totems.Any(t => t.WoWTotem == WoWTotem.FireElemental)),

                       Spell.Cast("Stormstrike"),
                       Spell.Cast("Primal Strike", ret => !SpellManager.HasSpell("Stormstrike")),
                       Spell.Cast("Lava Lash",
                                  ret => StyxWoW.Me.Inventory.Equipped.OffHand != null &&
                                  StyxWoW.Me.Inventory.Equipped.OffHand.ItemInfo.ItemClass == WoWItemClass.Weapon),
                       Spell.Cast("Lightning Bolt", ret => StyxWoW.Me.HasAura("Maelstrom Weapon", 5)),
                       Spell.Cast("Unleash Elements"),
                       Spell.Buff("Flame Shock", true, ret => StyxWoW.Me.HasAura("Unleash Wind") || !SpellManager.HasSpell("Unleash Elements")),
                       Spell.Cast("Earth Shock", ret => StyxWoW.Me.CurrentTarget.GetAuraTimeLeft("Flame Shock", true).TotalSeconds > 6),

                       Movement.CreateMoveToMeleeBehavior(true)
                       ));
        }
Beispiel #3
0
        public static Composite CreateElementalShamanInstancePullAndCombat()
        {
            return(new PrioritySelector(
                       Safers.EnsureTarget(),
                       Movement.CreateMoveToLosBehavior(),
                       Movement.CreateFaceTargetBehavior(),
                       Spell.WaitForCast(true),
                       Totems.CreateSetTotems(),
                       Common.CreateInterruptSpellCast(ret => StyxWoW.Me.CurrentTarget),

                       Spell.BuffSelf("Lightning Shield"),
                       Spell.BuffSelf("Spiritwalker's Grace", ret => StyxWoW.Me.IsMoving && StyxWoW.Me.Combat),
                       Spell.BuffSelf("Elemental Mastery",
                                      ret => StyxWoW.Me.HasAnyAura("Bloodlust", "Heroism", "Time Warp", "Ancient Hysteria")),
                       Spell.BuffSelf("Elemental Mastery",
                                      ret => StyxWoW.Me.IsMoving && StyxWoW.Me.Combat &&
                                      (!SpellManager.HasSpell("Spiritwalker's Grace") ||
                                       SpellManager.Spells["Spiritwalker's Grace"].Cooldown && !StyxWoW.Me.HasAura("Spiritwalker's Grace"))),

                       new Decorator(
                           ret => Unit.UnfriendlyUnitsNearTarget(10f).Count() >= 3,
                           new PrioritySelector(
                               Spell.CastOnGround("Earthquake", ret => StyxWoW.Me.CurrentTarget.Location),
                               Spell.Cast("Chain Lightning", ret => Clusters.GetBestUnitForCluster(Unit.UnfriendlyUnitsNearTarget(15f), ClusterType.Chained, 12))
                               )),

                       // Totem stuff
                       // Pop the ele on bosses
                       Spell.BuffSelf("Fire Elemental Totem", ret => StyxWoW.Me.CurrentTarget.IsBoss() && !StyxWoW.Me.Totems.Any(t => t.WoWTotem == WoWTotem.FireElemental)),
                       Spell.BuffSelf("Searing Totem",
                                      ret => StyxWoW.Me.CurrentTarget.Distance < Totems.GetTotemRange(WoWTotem.Searing) - 2f &&
                                      !StyxWoW.Me.Totems.Any(
                                          t => t.Unit != null && t.WoWTotem == WoWTotem.Searing &&
                                          t.Unit.Location.Distance(StyxWoW.Me.CurrentTarget.Location) < Totems.GetTotemRange(WoWTotem.Searing)) &&
                                      !StyxWoW.Me.Totems.Any(t => t.WoWTotem == WoWTotem.FireElemental)),

                       Spell.Buff("Flame Shock", true),
                       Spell.Cast("Lava Burst"),
                       Spell.Cast("Earth Shock",
                                  ret => (StyxWoW.Me.HasAura("Lightning Shield", 7) || TalentManager.GetCount(1, 13) == 0) &&
                                  StyxWoW.Me.CurrentTarget.GetAuraTimeLeft("Flame Shock", true).TotalSeconds > 6),
                       Spell.Cast("Unleash Elements",
                                  ret => Item.HasWeaponImbue(WoWInventorySlot.MainHand, "Flametongue") && StyxWoW.Me.IsMoving && !StyxWoW.Me.HasAura("Spiritwalker's Grace")),
                       Spell.Cast("Chain Lightning", ret => Unit.UnfriendlyUnitsNearTarget(10f).Count() >= 2),
                       Spell.Cast("Lightning Bolt"),
                       Movement.CreateMoveToTargetBehavior(true, 35f)
                       ));
        }
Beispiel #4
0
        public static Composite CreateRestoShamanHealingOnlyBehavior(bool selfOnly, bool moveInRange)
        {
            HealerManager.NeedHealTargeting = true;
            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(),
                               new Decorator(
                                   ret => moveInRange,
                                   Movement.CreateMoveToLosBehavior(ret => (WoWUnit)ret)),
                               Totems.CreateSetTotems(),
                               // Mana tide...
                               Spell.Cast("Mana Tide Totem", ret => StyxWoW.Me.ManaPercent < 80),
                               // Grounding...
                               Spell.Cast("Grounding Totem", ret => Unit.NearbyUnfriendlyUnits.Any(u => u.Distance < 40 && u.IsTargetingMeOrPet && u.IsCasting)),

                               // Just pop RT on CD. Plain and simple. Calling GetBestRiptideTarget will see if we can spread RTs (T12 2pc)
                               Spell.Heal("Riptide", ret => GetBestRiptideTarget((WoWPlayer)ret)),
                               // And deal with some edge PVP cases.

                               Spell.Heal("Earth Shield",
                                          ret => (WoWUnit)ret,
                                          ret => ret is WoWPlayer && Group.Tanks.Contains((WoWPlayer)ret) && Group.Tanks.All(t => !t.HasMyAura("Earth Shield"))),

                               // Pop NS if someone is in some trouble.
                               Spell.BuffSelf("Nature's Swiftness", ret => ((WoWUnit)ret).HealthPercent < 15),
                               Spell.Heal("Unleash Elements", ret => (WoWUnit)ret, ret => ((WoWUnit)ret).HealthPercent < 40),
                               // GHW is highest priority. It should be fairly low health %. (High-end healers will have this set to 70ish
                               Spell.Heal("Greater Healing Wave", ret => (WoWUnit)ret, ret => ((WoWUnit)ret).HealthPercent < 50),
                               // Most (if not all) will leave this at 90. Its lower prio, high HPM, low HPS
                               Spell.Heal("Healing Wave", ret => (WoWUnit)ret, ret => ((WoWUnit)ret).HealthPercent < 60),


                               // CH/HR only in parties/raids
                               new Decorator(
                                   ret => StyxWoW.Me.IsInParty || StyxWoW.Me.IsInRaid,
                                   new PrioritySelector(
                                       // This seems a bit tricky, but its really not. This is just how we cache a somewhat expensive lookup.
                                       // Set the context to the "best unit" for the cluster, so we don't have to do that check twice.
                                       // Then just use the context when passing the unit to throw the heal on, and the target of the heal from the cluster count.
                                       // Also ensure it will jump at least 3 times. (CH is pointless to cast if it won't jump 3 times!)
                                       new PrioritySelector(
                                           context => Clusters.GetBestUnitForCluster(ChainHealPlayers, ClusterType.Chained, 12f),
                                           Spell.Heal(
                                               "Chain Heal", ret => (WoWPlayer)ret,
                                               ret => Clusters.GetClusterCount((WoWPlayer)ret, ChainHealPlayers, ClusterType.Chained, 12f) > 2)),

                                       // Now we're going to do the same thing as above, but this time we're going to do it with healing rain.
                                       new PrioritySelector(
                                           context => Clusters.GetBestUnitForCluster(Unit.NearbyFriendlyPlayers.Cast <WoWUnit>(), ClusterType.Radius, 10f),
                                           Spell.CastOnGround(
                                               "Healing Rain", ret => ((WoWPlayer)ret).Location,
                                               ret =>
                                               Clusters.GetClusterCount((WoWPlayer)ret, Unit.NearbyFriendlyPlayers.Cast <WoWUnit>(), ClusterType.Radius, 10f) >
                                               // If we're in a raid, check for 4 players. If we're just in a party, check for 3.
                                               (StyxWoW.Me.IsInRaid ? 3 : 2))))),

                               new Decorator(
                                   ret => moveInRange,
                                   Movement.CreateMoveToTargetBehavior(true, 38f, ret => (WoWUnit)ret))

                               ))));
        }