public static Composite CreateMageFrostPvPPullAndCombat() { 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 Sequence( new Action(ret => PetManager.CallPet("Summon Water Elemental")), Helpers.Common.CreateWaitForLagDuration())), // 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("Blink", ret => SingularSettings.Instance.IsCombatRoutineMovementAllowed() && (StyxWoW.Me.IsStunned() || StyxWoW.Me.IsRooted())), Spell.BuffSelf("Mana Shield", ret => StyxWoW.Me.HealthPercent <= 75), Pet.CreateCastPetActionOnLocation("Freeze", ret => !StyxWoW.Me.Mounted && !StyxWoW.Me.CurrentTarget.HasAura("Frost Nova") && StyxWoW.Me.GotAlivePet && StyxWoW.Me.Pet.ManaPercent >= 12), Spell.BuffSelf("Frost Nova", ret => Unit.NearbyUnfriendlyUnits.Any(u => u.DistanceSqr <= 8 * 8 && !u.HasAura("Freeze") && !u.HasAura("Frost Nova") && !u.Stunned)), Common.CreateUseManaGemBehavior(ret => StyxWoW.Me.ManaPercent < 80), // Cooldowns Spell.BuffSelf("Evocation", ret => StyxWoW.Me.ManaPercent < 30), Spell.BuffSelf("Mirror Image"), Spell.BuffSelf("Mage Ward", ret => StyxWoW.Me.HealthPercent <= 75), Spell.BuffSelf("Icy Veins"), // Rotation Spell.Cast("Frost Bomb", ret => Unit.UnfriendlyUnitsNearTarget(10f).Count() >= 3), Spell.Cast("Deep Freeze", ret => StyxWoW.Me.ActiveAuras.ContainsKey("Fingers of Frost") || StyxWoW.Me.CurrentTarget.HasAura("Freeze") || StyxWoW.Me.CurrentTarget.HasAura("Frost Nova")), 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, 39f) )); }
public static Composite CreateSummonPet(string petName) { return(new Decorator( ret => !StyxWoW.Me.GotAlivePet && PetManager.PetTimer.IsFinished, new Sequence( new Action(ret => PetManager.CallPet(petName)), new Wait( 5, ret => StyxWoW.Me.GotAlivePet || !StyxWoW.Me.IsCasting, new PrioritySelector( new Decorator( ret => StyxWoW.Me.IsCasting, new Action(ret => SpellManager.StopCasting())), new ActionAlwaysSucceed()))))); }
public static Composite CreateSummonPet(string petName) { return(new Decorator( ret => !SingularSettings.Instance.DisablePetUsage && !StyxWoW.Me.GotAlivePet && PetManager.PetTimer.IsFinished, new Sequence( new Action(ret => PetManager.CallPet(petName)), Helpers.Common.CreateWaitForLagDuration(), new Wait( 5, ret => StyxWoW.Me.GotAlivePet || !StyxWoW.Me.IsCasting, new PrioritySelector( new Decorator( ret => StyxWoW.Me.IsCasting, new Action(ret => SpellManager.StopCasting())), new ActionAlwaysSucceed()))))); }
public static Composite CreateFrostMageNormalPull() { 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"))), Spell.Cast("Frostbolt"), Movement.CreateMoveToTargetBehavior(true, 35f) )); }
public static Composite HunterCallPetBehavior(bool reviveInCombat) { return(new Decorator(ret => !StyxWoW.Me.GotAlivePet && PetManager.PetTimer.IsFinished, new PrioritySelector( Spell.WaitForCast(false), new Decorator(ret => StyxWoW.Me.Pet != null && (!StyxWoW.Me.Combat || reviveInCombat), new PrioritySelector( Movement.EnsureMovementStoppedBehavior(), Spell.CastSelfSpell("Revive Pet", ret => true, "Revive Pet"))), new Sequence( new Action(ret => PetManager.CallPet("" + (int)CLUSettings.Instance.Hunter.PetSlotSelection)), Spell.CreateWaitForLagDuration(), new WaitContinue(2, ret => StyxWoW.Me.GotAlivePet || StyxWoW.Me.Combat, new ActionAlwaysSucceed()), new Decorator(ret => !StyxWoW.Me.GotAlivePet && (!StyxWoW.Me.Combat || reviveInCombat), Spell.CastSelfSpell("Revive Pet", ret => true, "Revive Pet"))) ) )); }
public static Composite CreateHunterCallPetBehavior(bool reviveInCombat) { return(new Decorator( ret => !SingularSettings.Instance.DisablePetUsage && !StyxWoW.Me.GotAlivePet && PetManager.PetTimer.IsFinished, new PrioritySelector( Spell.WaitForCast(), new Decorator( ret => StyxWoW.Me.Pet != null && (!StyxWoW.Me.Combat || reviveInCombat), new PrioritySelector( Movement.CreateEnsureMovementStoppedBehavior(), Spell.BuffSelf("Revive Pet"))), new Sequence( new Action(ret => PetManager.CallPet(SingularSettings.Instance.Hunter.PetSlot)), Helpers.Common.CreateWaitForLagDuration(), new WaitContinue(2, ret => StyxWoW.Me.GotAlivePet || StyxWoW.Me.Combat, new ActionAlwaysSucceed()), new Decorator( ret => !StyxWoW.Me.GotAlivePet && (!StyxWoW.Me.Combat || reviveInCombat), Spell.BuffSelf("Revive Pet"))) ) )); }
public static Composite CreateMageFrostNormalPull() { return(new PrioritySelector( Safers.EnsureTarget(), Common.CreateStayAwayFromFrozenTargetsBehavior(), Movement.CreateMoveToLosBehavior(), Movement.CreateFaceTargetBehavior(), Helpers.Common.CreateAutoAttack(true), Spell.WaitForCast(true), new Decorator(ctx => SingularSettings.Instance.DisablePetUsage && StyxWoW.Me.GotAlivePet, new Action(ctx => Lua.DoString("PetDismiss()"))), // We want our pet alive ! new Decorator( ret => !SingularSettings.Instance.DisablePetUsage && !StyxWoW.Me.GotAlivePet && PetManager.PetTimer.IsFinished && SpellManager.CanCast("Summon Water Elemental"), new Sequence( new Action(ret => PetManager.CallPet("Summon Water Elemental")), Helpers.Common.CreateWaitForLagDuration())), Spell.Cast("Frostbolt", ret => !StyxWoW.Me.CurrentTarget.IsImmune(WoWSpellSchool.Frost)), Spell.Cast("Frostfire Bolt"), Movement.CreateMoveToTargetBehavior(true, 39f) )); }
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) )); }
public static Composite CreateFrostMageInstancePullAndCombat() { return(new PrioritySelector( Safers.EnsureTarget(), 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), Spell.BuffSelf("Mirror Image"), Spell.BuffSelf("Mage Ward", ret => StyxWoW.Me.HealthPercent <= 75), Spell.BuffSelf("Icy Veins"), Common.CreateUseManaGemBehavior(ret => StyxWoW.Me.ManaPercent < 80), // AoE comes first new Decorator( ret => Unit.UnfriendlyUnitsNearTarget(10f).Count() >= 3, new PrioritySelector( Spell.CastOnGround("Flamestrike", ret => Clusters.GetBestUnitForCluster(Unit.NearbyUnfriendlyUnits, ClusterType.Radius, 8f).Location, ret => !ObjectManager.GetObjectsOfType <WoWDynamicObject>().Any(o => o.CasterGuid == StyxWoW.Me.Guid && o.Spell.Name == "Flamestrike" && o.Location.Distance( Clusters.GetBestUnitForCluster(Unit.NearbyUnfriendlyUnits, ClusterType.Radius, 8f).Location) < o.Radius)), Spell.Cast("Cone of Cold", ret => Clusters.GetClusterCount(StyxWoW.Me.CurrentTarget, Unit.NearbyUnfriendlyUnits, ClusterType.Cone, 15f) >= 3), Spell.CastOnGround("Blizzard", ret => StyxWoW.Me.CurrentTarget.Location), Spell.Cast("Arcane Explosion", ret => Clusters.GetClusterCount(StyxWoW.Me, Unit.NearbyUnfriendlyUnits, ClusterType.Radius, 10f) >= 3), Movement.CreateMoveToTargetBehavior(true, 35f) )), Spell.BuffSelf("Time Warp", ret => !StyxWoW.Me.IsInRaid && StyxWoW.Me.CurrentTarget.HealthPercent > 20 && StyxWoW.Me.CurrentTarget.IsBoss() && !StyxWoW.Me.HasAura("Temporal Displacement")), // 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"), Pet.CreateCastPetActionOnLocation("Freeze"), 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) )); }