public static Composite CreateHolyCombatBuffs() { return(new PrioritySelector( new Decorator( req => !Me.CurrentTarget.IsTrivial(), new PrioritySelector( Common.CreateFadeBehavior(), Spell.BuffSelf("Desperate Prayer", ret => StyxWoW.Me.HealthPercent <= PriestSettings.DesperatePrayerHealth), Common.CreateShadowfiendBehavior(), Common.CreateLeapOfFaithBehavior(), Spell.Cast("Power Infusion", ret => StyxWoW.Me.ManaPercent <= 75 || HealerManager.Instance.TargetList.Any(h => h.HealthPercent < 40)) ) ) )); }
public static Composite CreateDiscCombatBuffs() { return(new PrioritySelector( new Decorator( req => !Unit.IsTrivial(Me.CurrentTarget), new PrioritySelector( Common.CreateFadeBehavior(), Spell.BuffSelf("Power Word: Shield", req => HasReflectiveShield && SingularRoutine.CurrentWoWContext == WoWContext.Normal ), Common.CreateShadowfiendBehavior(), Common.CreateLeapOfFaithBehavior(), // Spell.Cast("Power Word: Solace", req => Me.GotTarget() && Unit.ValidUnit(Me.CurrentTarget) && Me.IsSafelyFacing( Me.CurrentTarget) && Me.CurrentTarget.InLineOfSpellSight ) // Spell.Cast(129250, req => Me.GotTarget() && Unit.ValidUnit(Me.CurrentTarget) && Me.IsSafelyFacing(Me.CurrentTarget) && Me.CurrentTarget.InLineOfSpellSight), Spell.CastHack("Schism", req => Me.GotTarget() && Unit.ValidUnit(Me.CurrentTarget) && Me.IsSafelyFacing(Me.CurrentTarget) && Me.CurrentTarget.InLineOfSpellSight) ) ) )); }
public static Composite CreatePriestShadowNormalCombat() { return(new PrioritySelector( Helpers.Common.EnsureReadyToAttackFromLongRange(), Spell.WaitForCastOrChannel(), CreateFightAssessment(), new Decorator( ret => !Spell.IsGlobalCooldown(), new PrioritySelector( SingularRoutine.MoveBehaviorInlineToCombat(BehaviorType.Heal), SingularRoutine.MoveBehaviorInlineToCombat(BehaviorType.CombatBuffs), Helpers.Common.CreateInterruptBehavior(), Movement.WaitForFacing(), Movement.WaitForLineOfSpellSight(), new Decorator( req => !Me.CurrentTarget.IsTrivial(), new PrioritySelector( Dispelling.CreatePurgeEnemyBehavior("Dispel Magic"), // Mana Management stuff - send in the fiends Common.CreateShadowfiendBehavior(), // Defensive stuff Spell.BuffSelf("Dispersion", ret => Me.ManaPercent < PriestSettings.DispersionMana || Me.HealthPercent < 40 || (Me.ManaPercent < SingularSettings.Instance.MinMana && Me.IsSwimming) || Unit.NearbyUnfriendlyUnits.Count(t => t.GotTarget() && t.CurrentTarget.IsTargetingMyStuff()) >= 3), Common.CreatePriestShackleUndeadAddBehavior(), Common.CreatePsychicScreamBehavior(), Spell.HandleOffGCD( new PrioritySelector( ctx => Me.CurrentTarget.TimeToDeath() > 15 || cntAoeTargets > 1, new Sequence( Spell.BuffSelfAndWait(sp => "Vampiric Embrace", req => ((bool)req) && Me.HealthPercent < PriestSettings.VampiricEmbracePct), Spell.BuffSelf("Power Infusion") ), Spell.Cast("Power Infusion", req => ((bool)req) || Me.HasAura("Vampiric Embrace")) ) ) ) ), // Shadow immune npcs. // Spell.Cast("Holy Fire", req => Me.CurrentTarget.IsImmune(WoWSpellSchool.Shadow)), // AoE Rotation new Decorator( ret => Spell.UseAOE && cntAoeTargets > 1, new PrioritySelector( ctx => AoeTargets.FirstOrDefault(u => Me.IsSafelyFacing(u) && u.InLineOfSpellSight), Spell.Cast("Void Eruption", when => !InVoidform), Spell.Cast( "Mind Sear", mov => true, on => { IEnumerable <WoWUnit> aoeTargetsFacing = AoeTargets.Where(u => Me.IsSafelyFacing(u) && u.InLineOfSpellSight && u.IsTrivial()); WoWUnit unit = Clusters.GetBestUnitForCluster(aoeTargetsFacing, ClusterType.Radius, 10); if (unit == null) { return null; } if (3 > Clusters.GetClusterCount(unit, AoeTargets, ClusterType.Radius, 10)) { return null; } if (Unit.UnfriendlyUnits(50).Any(u => !u.IsTrivial() && unit.SpellDistance(u) < 12)) { return null; } Logger.Write(LogColor.Hilite, "^Trivial Farming: all trivial mobs within 12 yds of {0}", unit.SafeName()); return unit; }, cancel => Me.HealthPercent < PriestSettings.ShadowHeal ), Spell.Buff("Shadow Word: Pain", true), // no multi message for current target Spell.Buff("Vampiric Touch", true), // no multi message for current target Spell.Buff( // multi-dot others w/ message "Vampiric Touch", true, on => { WoWUnit dotTarget = AoeTargets.FirstOrDefault(u => u != Me.CurrentTarget && !u.HasMyAura("Vampiric Touch") && u.InLineOfSpellSight && !Spell.DoubleCastContains(u, "Vampiric Touch")); if (dotTarget != null && Spell.CanCastHack("Vampiric Touch", dotTarget)) { Logger.Write(LogColor.Hilite, "^Multi-DoT: cast Vampiric Touch on {0}", dotTarget.SafeName()); return dotTarget; } return null; }, req => true ), Spell.Buff( // multi-dot others w/ message "Shadow Word: Pain", true, on => { WoWUnit dotTarget = AoeTargets.FirstOrDefault(u => u != Me.CurrentTarget && !u.HasMyAura("Shadow Word: Pain") && u.InLineOfSpellSight && !Spell.DoubleCastContains(u, "Shadow Word: Pain")); if (dotTarget != null && Spell.CanCastHack("Shadow Word: Pain", dotTarget)) { Logger.Write(LogColor.Hilite, "^Multi-DoT: cast Shadow Word: Pain on {0}", dotTarget.SafeName()); return dotTarget; } return null; }, req => true ), // When we enter void form, even if AOE, we use our single target rotation after maintaining debuffs. new Decorator(ret => InVoidform, CreateMaintainVoidformBehaviour()), // filler spell Spell.Cast( "Mind Sear", mov => true, on => { IEnumerable <WoWUnit> AoeTargetsFacing = AoeTargets.Where(u => Me.IsSafelyFacing(u) && u.InLineOfSpellSight); WoWUnit unit = Clusters.GetBestUnitForCluster(AoeTargetsFacing, ClusterType.Radius, 10); if (unit == null) { return null; } if (4 > Clusters.GetClusterCount(unit, AoeTargets, ClusterType.Radius, 10)) { return null; } return unit; }, cancel => Me.HealthPercent < PriestSettings.ShadowHeal ), CastMindFlay(on => (WoWUnit)on, req => cntAoeTargets < 4) ) ), new Decorator(ret => InVoidform, CreateMaintainVoidformBehaviour()), CreateBuildVoidformBehaviour() ) ) )); }