public static Composite CreateRestoDruidPull() { return(new PrioritySelector( HealerManager.CreateStayNearTankBehavior(), new Decorator( req => !HealerManager.Instance.TargetList.Any(h => h.IsAlive && !h.IsMe && h.Distance < 40), new PrioritySelector( Helpers.Common.EnsureReadyToAttackFromLongRange(), Spell.WaitForCastOrChannel(), new Decorator( req => !Spell.IsGlobalCooldown(), new PrioritySelector( Helpers.Common.CreateInterruptBehavior(), Movement.WaitForFacing(), Movement.WaitForLineOfSpellSight(), Spell.Buff("Moonfire"), Spell.Cast("Wrath"), Movement.CreateMoveToUnitBehavior(on => Me.CurrentTarget, 35f, 30f) ) ) ) ) )); }
public static Composite CreateHolyHeal() { return(new PrioritySelector( CreateHolyDiagnosticOutputBehavior("HEAL"), HealerManager.CreateStayNearTankBehavior(), // Group heals new Decorator( ret => Unit.NearbyGroupMembers.Any(m => m.IsAlive && !m.IsMe), CreateHolyHealOnlyBehavior(false, true) ), // Solo heals new Decorator( ret => !Unit.NearbyGroupMembers.Any(m => m.IsAlive && !m.IsMe), new PrioritySelector( Spell.Cast("Desperate Prayer", ret => Me, ret => Me.Combat && Me.HealthPercent < PriestSettings.DesperatePrayerHealth), // keep heal buffs on if glyphed Spell.BuffSelf("Prayer of Mending", ret => Me.Combat && Me.HealthPercent <= 90), Spell.BuffSelf("Renew", ret => Me.Combat && Me.HealthPercent <= 95), Common.CreatePsychicScreamBehavior(), Spell.Cast("Flash Heal", ctx => Me, ret => Me.HealthPercent <= PriestSettings.ShadowHeal), Spell.Cast("Flash Heal", ctx => Me, ret => !Me.Combat && Me.PredictedHealthPercent(includeMyHeals: true) <= 90) ) ))); }
public static Composite CreateRestoDruidHealBehavior() { return(new PrioritySelector( CreateRestoDiagnosticOutputBehavior(), HealerManager.CreateStayNearTankBehavior(), new Decorator( ret => HealerManager.Instance.TargetList.Any(h => h.Distance < 40 && h.IsAlive && !h.IsMe), new PrioritySelector( CreateRestoDruidHealOnlyBehavior() ) ) )); }
public static Composite CreateRestoShamanCombatBehaviorBattlegrounds() { return(new PrioritySelector( Spell.WaitForCastOrChannel(), CreateRestoDiagnosticOutputBehavior(on => HealerManager.Instance.FirstUnit), new Decorator( ret => !Spell.IsGlobalCooldown() && HealerManager.Instance.TargetList.Any(t => !t.IsMe && t.IsAlive), new PrioritySelector( HealerManager.CreateStayNearTankBehavior(), CreateRestoShamanHealingOnlyBehavior(selfOnly: false) ) ), new Decorator( ret => !Spell.IsGlobalCooldown() && HealerManager.AllowHealerDPS(), new PrioritySelector( Helpers.Common.EnsureReadyToAttackFromMediumRange(), Spell.WaitForCastOrChannel(), new Decorator( ret => !Spell.IsGlobalCooldown(), new PrioritySelector( Helpers.Common.CreateInterruptBehavior(), Totems.CreateTotemsBehavior(), Movement.WaitForFacing(), Movement.WaitForLineOfSpellSight(), Dispelling.CreatePurgeEnemyBehavior("Purge"), Common.CastElementalBlast(), Spell.Buff("Flame Shock", 3, on => Me.CurrentTarget, req => true), Spell.Cast("Lava Burst"), Spell.Cast("Frost Shock"), Spell.Cast("Chain Lightning", ret => Spell.UseAOE && Unit.UnfriendlyUnitsNearTarget(10f).Count() >= 2 && !Unit.UnfriendlyUnitsNearTarget(12f).Any(u => u.IsCrowdControlled())), Spell.Cast("Lightning Bolt") ) ) ) ) )); }
public static Composite CreateRestoDruidCombat() { return(new PrioritySelector( HealerManager.CreateStayNearTankBehavior(), new Decorator( req => HealerManager.AllowHealerDPS(), new PrioritySelector( Helpers.Common.EnsureReadyToAttackFromLongRange(), Spell.WaitForCastOrChannel(), new Decorator( req => !Spell.IsGlobalCooldown(), new PrioritySelector( Helpers.Common.CreateInterruptBehavior(), Movement.WaitForFacing(), Movement.WaitForLineOfSpellSight(), Common.CastForm(ShapeshiftForm.Moonkin, req => Common.HasTalent(DruidTalents.BalanceAffinity) && Me.Shapeshift != ShapeshiftForm.Moonkin && !Utilities.EventHandlers.IsShapeshiftSuppressed), Spell.Cast("Moonfire", on => Unit.NearbyUnitsInCombatWithUsOrOurStuff.FirstOrDefault(u => u.GetAuraTimeLeft("Moonfire").TotalSeconds < 1.8 && u.TimeToDeath(int.MaxValue) > 4)), Spell.Cast("Sunfire", on => Unit.NearbyUnitsInCombatWithUsOrOurStuff.FirstOrDefault(u => u.GetAuraTimeLeft("Sunfire").TotalSeconds < 1.8 && u.TimeToDeath(int.MaxValue) > 4)), Spell.Cast( "Starsurge", on => Unit.UnitsInCombatWithUsOrOurStuff(40).Where(u => !u.IsCrowdControlled() && u.InLineOfSpellSight).OrderByDescending(u => (uint)u.HealthPercent).FirstOrDefault(), req => true, cancel => HealerManager.CancelHealerDPS() ), Spell.Cast( "Lunar Strike", on => Unit.UnitsInCombatWithUsOrOurStuff(40).Where(u => !u.IsCrowdControlled() && u.InLineOfSpellSight).OrderByDescending(u => (uint)u.HealthPercent).FirstOrDefault(), req => true, cancel => HealerManager.CancelHealerDPS() ), Spell.Cast( "Solar Wrath", on => Unit.UnitsInCombatWithUsOrOurStuff(40).Where(u => !u.IsCrowdControlled() && u.InLineOfSpellSight).OrderByDescending(u => (uint)u.HealthPercent).FirstOrDefault(), req => true, cancel => HealerManager.CancelHealerDPS() ) ) ) ) ) )); }
public static Composite CreateRestoShamanCombatBehaviorInstances() { #if OLD_APPROACH return(new PrioritySelector( ctx => HealerManager.Instance.TargetList.Any(t => !t.IsMe && t.IsAlive), Safers.EnsureTarget(), Movement.CreateFaceTargetBehavior(), Spell.WaitForCastOrChannel(), new Decorator( ret => !Spell.IsGlobalCooldown(), new PrioritySelector( CreateRestoDiagnosticOutputBehavior(on => Me.CurrentTarget), new Decorator( ret => (bool)ret, new PrioritySelector( HealerManager.CreateStayNearTankBehavior(), CreateRestoShamanHealingOnlyBehavior(selfOnly: false), Helpers.Common.CreateInterruptBehavior(), Dispelling.CreatePurgeEnemyBehavior("Purge"), Totems.CreateTotemsBehavior(), Spell.Cast("Lightning Bolt", ret => TalentManager.HasGlyph("Telluric Currents")) ) ), new Decorator( ret => !((bool)ret), new PrioritySelector( CreateRestoDiagnosticOutputBehavior(on => HealerManager.Instance.FirstUnit), Spell.Cast("Elemental Blast"), Spell.Buff("Flame Shock", true, on => Me.CurrentTarget, req => true, 3), Spell.Cast("Lava Burst"), Spell.Cast("Frost Shock"), Spell.Cast("Chain Lightning", ret => Spell.UseAOE && Unit.UnfriendlyUnitsNearTarget(10f).Count() >= 2 && !Unit.UnfriendlyUnitsNearTarget(12f).Any(u => u.IsCrowdControlled())), Spell.Cast("Lightning Bolt") ) ) ) ) )); #else return(new PrioritySelector( Spell.WaitForCastOrChannel(), CreateRestoDiagnosticOutputBehavior(on => HealerManager.FindLowestHealthTarget()), HealerManager.CreateStayNearTankBehavior(), new Decorator( ret => Me.Combat && HealerManager.AllowHealerDPS(), new PrioritySelector( Helpers.Common.EnsureReadyToAttackFromMediumRange(), Movement.CreateFaceTargetBehavior(), Spell.WaitForCastOrChannel(), new Decorator( ret => !Spell.IsGlobalCooldown(), new PrioritySelector( Helpers.Common.CreateInterruptBehavior(), Totems.CreateTotemsBehavior(), Movement.WaitForFacing(), Movement.WaitForLineOfSpellSight(), Common.CastElementalBlast(cancel: c => HealerManager.CancelHealerDPS()), Spell.Buff("Flame Shock", 3, on => Me.CurrentTarget, req => true), Spell.Cast("Lava Burst", on => Me.CurrentTarget, req => true, cancel => HealerManager.CancelHealerDPS()), Spell.Cast("Frost Shock"), Spell.Cast("Chain Lightning", on => Me.CurrentTarget, req => Spell.UseAOE && Unit.UnfriendlyUnitsNearTarget(10f).Count() >= 2 && !Unit.UnfriendlyUnitsNearTarget(12f).Any(u => u.IsCrowdControlled()), cancel => HealerManager.CancelHealerDPS()), Spell.Cast("Lightning Bolt", on => Me.CurrentTarget, req => true, cancel => HealerManager.CancelHealerDPS()) ) ) ) ), new Decorator( ret => Unit.NearbyGroupMembers.Any(m => m.IsAlive && !m.IsMe), new PrioritySelector( CreateRestoShamanHealingOnlyBehavior(selfOnly: false), Helpers.Common.CreateInterruptBehavior(), Dispelling.CreatePurgeEnemyBehavior("Purge"), Totems.CreateTotemsBehavior(), new Decorator( req => TalentManager.HasGlyph("Telluric Currents"), new PrioritySelector( Safers.EnsureTarget(), Movement.CreateFaceTargetBehavior(), Spell.Cast("Lightning Bolt", mov => true, on => Unit.NearbyUnitsInCombatWithUsOrOurStuff .Where(u => u.IsAlive && u.SpellDistance() < 40 && Me.IsSafelyFacing(u)) .OrderByDescending(u => u.HealthPercent) .FirstOrDefault(), req => !HealerManager.Instance.TargetList.Any(h => h.IsAlive && h.SpellDistance() < 40 && h.HealthPercent < ShamanSettings.RestoHealSettings.TelluricHealthCast), cancel => HealerManager.Instance.TargetList.Any(h => h.IsAlive && h.SpellDistance() < 40 && h.HealthPercent < ShamanSettings.RestoHealSettings.TelluricHealthCancel) ) ) ) ) ) )); #endif }
public static Composite CreateMistweaverCombatBehaviorInstances() { return(new PrioritySelector( CancelSoothingMistAsNeeded(), CreateMistWeaverDiagnosticOutputBehavior(on => MyHealTarget), new Decorator( req => true, new PrioritySelector( // HealerManager.CreateMeleeHealerMovementBehavior( Common.CreateMonkCloseDistanceBehavior( min => 30, on => (WoWUnit) on)), HealerManager.CreateStayNearTankBehavior(Common.CreateMonkCloseDistanceBehavior(min => 30, on => (WoWUnit)on)), /* * new Decorator( * unit => MovementManager.IsClassMovementAllowed * && !MonkSettings.DisableRoll * && (unit as WoWUnit).SpellDistance() > 10 * && Me.IsSafelyFacing(unit as WoWUnit, 5f), * Spell.Cast("Roll") * ) * ), */ new Decorator( ret => Me.Combat && HealerManager.AllowHealerDPS(), new PrioritySelector( CreateMistweaverMoveToEnemyTarget(), new Decorator( req => Me.GotTarget() && Me.CurrentTarget.IsAlive, Movement.CreateFaceTargetBehavior() ), Spell.WaitForCastOrChannel(), #region Spinning Crane Kick progress handler new Decorator( req => Me.HasActiveAura("Spinning Crane Kick"), // don't wait for Rushing Jade Wind since we can cast new PrioritySelector( new Action(r => { Logger.WriteFile(SpinningCraneKick + ": in progress with {0} ms left", (long)Me.GetAuraTimeLeft(SpinningCraneKick).TotalMilliseconds); return RunStatus.Failure; }), new Decorator( req => { if (Me.GetAuraTimeLeft(SpinningCraneKick).TotalMilliseconds < 333) { return false; } int countFriendly = Unit.NearbyGroupMembersAndPets.Count(u => u.SpellDistance() <= 8); if (countFriendly >= 3) { return false; } if (HealerManager.CancelHealerDPS()) { Logger.Write(LogColor.Cancel, "/cancel {0} since only {1} friendly targets hit and cannot DPS", SpinningCraneKick, countFriendly); return true; } int countEnemy = Unit.NearbyUnfriendlyUnits.Count(u => u.SpellDistance() <= 8); if ((countFriendly + countEnemy) < 3) { Logger.Write(LogColor.Cancel, "/cancel {0} since only {1} friendly and {2} enemy targets hit", SpinningCraneKick, countFriendly, countEnemy); return true; } return false; }, new Sequence( new Action(r => Me.CancelAura(SpinningCraneKick)), new Wait(1, until => !Me.HasActiveAura(SpinningCraneKick), new ActionAlwaysFail()) ) ), // dont go past here if SCK active new ActionAlwaysSucceed() ) ), #endregion new Decorator( ret => !Spell.IsGlobalCooldown(), new PrioritySelector( new Decorator( req => Me.GotTarget() && Me.CurrentTarget.IsWithinMeleeRange, Helpers.Common.CreateAutoAttack() ), Helpers.Common.CreateInterruptBehavior(), Spell.Cast("Leg Sweep", ret => Spell.UseAOE && SingularRoutine.CurrentWoWContext == WoWContext.Normal && Me.CurrentTarget.IsWithinMeleeRange), Spell.Cast( SpinningCraneKick, ret => Spell.UseAOE && HealerManager.AllowHealerDPS() && Unit.NearbyUnfriendlyUnits.Count(u => u.SpellDistance() <= 8) >= MonkSettings.SpinningCraneKickCnt ), Spell.Cast("Rising Sun Kick"), Spell.Cast("Blackout Kick", req => Me.GetAuraStacks("Teachings of the Monastery") >= 3), Spell.Cast("Tiger Palm") ) ), Spell.Cast("Roll", req => MovementManager.IsClassMovementAllowed && !MonkSettings.DisableRoll && Me.CurrentTarget.Distance > minDistRollAllowed ) ) ) ) ), new Decorator( ret => !Spell.IsGlobalCooldown() && Unit.NearbyGroupMembers.Any(m => m.IsAlive && !m.IsMe), new PrioritySelector( CreateMistweaverMonkHealing(selfOnly: false), new Decorator( req => true, Helpers.Common.CreateInterruptBehavior() ) ) ), Spell.WaitForCastOrChannel() )); }