public static Composite CreateMageFrostNormalPull() { return(new PrioritySelector( Safers.EnsureTarget(), Common.CreateStayAwayFromFrozenTargetsBehavior(), Helpers.Common.EnsureReadyToAttackFromLongRange(), Spell.WaitForCastOrChannel(), new Decorator( ret => !Spell.IsGlobalCooldown(), new PrioritySelector( Common.CreateMagePullBuffs(), Movement.WaitForFacing(), Movement.WaitForLineOfSpellSight(), #region TRIVIAL MOB FARM SUPPORT new Decorator( req => Me.CurrentTarget.IsTrivial(), new PrioritySelector( Spell.Cast("Cone of Cold", mov => false, on => Me.CurrentTarget, req => { IEnumerable <WoWUnit> coneUnits = Clusters.GetConeCluster(Unit.UnfriendlyUnits(12), 12); int count = coneUnits.Count(); if (count > 1 && Spell.CanCastHack("Cone of Cold", Me.CurrentTarget) && coneUnits.Any(u => u.Guid == Me.CurrentTargetGuid)) { if (coneUnits.All(u => u.IsTrivial())) { Logger.Write("^AOE Trivial Pull: casting Cone of Cold"); return true; } } return false; }), CreateIceLanceBehavior(on => Me.CurrentTarget, req => { if (!Spell.CanCastHack("Ice Lance", Me.CurrentTarget)) { return false; } Logger.Write(LogColor.Hilite, "^Trivial Pull: casting Ice Lance"); return true; }) ) ), #endregion #region FAST PULL SUPPORT new Decorator( ret => { WoWPlayer nearby = ObjectManager.GetObjectsOfType <WoWPlayer>(true, false).FirstOrDefault(p => !p.IsMe && p.DistanceSqr <= 40 * 40); if (nearby != null) { Logger.WriteDiagnostic("NormalPull: doing fast pull since player {0} nearby @ {1:F1} yds", nearby.SafeName(), nearby.Distance); return true; } return false; }, new PrioritySelector( Spell.Buff("Nether Tempest", 1, on => Me.CurrentTarget, req => true), Spell.Buff("Living Bomb", 0, on => Me.CurrentTarget, req => true), Spell.Cast("Ice Lance", ret => { if (Me.GotTarget && Me.CurrentTarget.IsImmune(WoWSpellSchool.Frost)) { return false; } if (!Spell.CanCastHack("Ice Lance", Me.CurrentTarget)) { return false; } Logger.Write(LogColor.Hilite, "^Fast Pull: casting Ice Lance for instant pull"); return true; }) ) ), #endregion // Pull with Ice Lance if trivial or FoF built up CreateIceLanceFoFBehavior(), // Otherwise.... lets set a Bomb first new Decorator( req => !Me.CurrentTarget.IsTrivial(), new PrioritySelector( Spell.Buff("Ice Nova", 0, on => Me.CurrentTarget, req => true), Spell.Buff("Frost Bomb", 0, on => Me.CurrentTarget, req => true) ) ), Spell.Cast("Frostbolt", ret => Me.GotTarget() && !Me.CurrentTarget.IsImmune(WoWSpellSchool.Frost)), Spell.Cast("Ice Lance", ret => { if (Me.GotTarget && Me.CurrentTarget.IsImmune(WoWSpellSchool.Frost)) { return false; } if (!Spell.CanCastHack("Ice Lance", Me.CurrentTarget)) { return false; } if (!Me.IsMoving) { return false; } Logger.Write(LogColor.Hilite, "^Cast on the Move: Ice Lance"); return true; }) ) ), Movement.CreateMoveToUnitBehavior(on => StyxWoW.Me.CurrentTarget, 38f, 33f) )); }