private static Composite CreateAoe() { return(new PrioritySelector( // actions.aoe //F 0.00 unholy_blight,if=talent.unholy_blight.enabled new Throttle(1, 2, new PrioritySelector( Spell.Cast("Unholy Blight", ret => TalentManager.IsSelected((int)DeathKnightTalents.UnholyBlight) && Me.CurrentTarget.DistanceSqr <= 10 * 10 && !StyxWoW.Me.HasAura("Unholy Blight")))), //G 14.11 pestilence,if=dot.blood_plague.ticking&talent.plague_leech.enabled,line_cd=28 new Throttle(1, 2, new PrioritySelector( Spell.Cast("Blood Boil", ret => TalentManager.IsSelected((int)DeathKnightTalents.RoillingBlood) && !Me.HasAura("Unholy Blight") && ShouldSpreadDiseases))), new Throttle(1, 2, new PrioritySelector( Spell.Cast("Pestilence", ret => !TalentManager.IsSelected((int)DeathKnightTalents.RoillingBlood) && !Me.HasAura("Unholy Blight") && ShouldSpreadDiseases))), //H 0.00 pestilence,if=dot.blood_plague.ticking&talent.unholy_blight.enabled&cooldown.unholy_blight.remains<49,line_cd=28 Spell.Cast("Soul Reaper", ret => Me.CurrentTarget.HealthPercent <= 35 || Me.HasAura(138347) && Me.CurrentTarget.HealthPercent <= 45), //I 174.96 howling_blast Spell.Cast("Howling Blast"), //J 0.00 blood_tap,if=talent.blood_tap.enabled&buff.blood_charge.stack>10 Spell.Cast("Blood Tap", ret => Me.HasAura("Blood Charge", 10) && (BloodRuneSlotsActive == 0 || FrostRuneSlotsActive == 0 || UnholyRuneSlotsActive == 0)), //K 22.21 frost_strike,if=runic_power>76 Spell.Cast("Frost Strike", ret => Me.RunicPowerPercent >= 76), //L 14.13 death_and_decay,if=unholy=1 Spell.CastOnGround("Death and Decay", on => Me.CurrentTarget.Location, ret => Me.UnholyRuneCount == 1), //M 34.90 plague_strike,if=unholy=2 Spell.Cast("Plague Strike", ret => Me.UnholyRuneCount == 2), //N 0.00 blood_tap,if=talent.blood_tap.enabled Spell.Cast("Blood Tap", ret => Me.HasAura("Blood Charge", 5) && (BloodRuneSlotsActive == 0 || FrostRuneSlotsActive == 0 || UnholyRuneSlotsActive == 0)), //O 139.66 frost_strike Spell.Cast("Frost Strike"), //P 11.37 horn_of_winter Spell.Cast("Horn of Winter"), //Q 7.92 plague_leech,if=talent.plague_leech.enabled&unholy=1 Spell.Cast("Plague Leech", ret => Me.CurrentTarget.HasAura("Frost Fever") && Me.CurrentTarget.HasAura("Blood Plague") && Me.UnholyRuneCount == 1), //R 9.05 plague_strike,if=unholy=1 Spell.Cast("Plague Strike", ret => Me.UnholyRuneCount == 1), //S 1.17 empower_rune_weapon Spell.Cast("Empower Rune Weapon", ret => AdvancedAI.Burst && Me.UnholyRuneCount == 0 && Me.DeathRuneCount == 0 && Me.FrostRuneCount == 0) )); }
public static Composite CreateAssaRogueInstanceCombat() { return(new PrioritySelector( Safers.EnsureTarget(), Movement.CreateMoveToLosBehavior(), Movement.CreateFaceTargetBehavior(), new Decorator( ret => !StyxWoW.Me.HasAura("Vanish"), Helpers.Common.CreateAutoAttack(true)), Helpers.Common.CreateInterruptSpellCast(ret => StyxWoW.Me.CurrentTarget), // Defensive Spell.BuffSelf("Evasion", ret => Unit.NearbyUnfriendlyUnits.Count(u => u.DistanceSqr < 6 * 6 && u.IsTargetingMeOrPet) >= 1), Spell.BuffSelf("Cloak of Shadows", ret => Unit.NearbyUnfriendlyUnits.Count(u => u.IsTargetingMeOrPet && u.IsCasting) >= 1), // Redirect if we have CP left Spell.Cast("Redirect", ret => StyxWoW.Me.RawComboPoints > 0 && StyxWoW.Me.ComboPoints < 1), // Agro management Spell.Cast( "Tricks of the Trade", ret => Common.BestTricksTarget, ret => SingularSettings.Instance.Rogue.UseTricksOfTheTrade), Spell.Cast("Feint", ret => StyxWoW.Me.CurrentTarget.ThreatInfo.RawPercent > 80), Movement.CreateMoveBehindTargetBehavior(), Spell.BuffSelf("Vanish", ret => TalentManager.IsSelected(14) && StyxWoW.Me.CurrentTarget.HasMyAura("Rupture") && StyxWoW.Me.HasAura("Slice and Dice")), Spell.Cast("Garrote", ret => (StyxWoW.Me.HasAura("Vanish") || StyxWoW.Me.IsStealthed) && StyxWoW.Me.CurrentTarget.MeIsBehind), Spell.Buff("Vendetta", ret => StyxWoW.Me.CurrentTarget.IsBoss() && (StyxWoW.Me.CurrentTarget.HealthPercent < 35 || TalentManager.IsSelected(13))), new Decorator( ret => Unit.NearbyUnfriendlyUnits.Count(u => u.DistanceSqr < 8 * 8) >= 3, Spell.BuffSelf("Fan of Knives", ret => Item.RangedIsType(WoWItemWeaponClass.Thrown))), Spell.BuffSelf("Slice and Dice", ret => StyxWoW.Me.RawComboPoints > 0 && !StyxWoW.Me.HasAura("Slice and Dice")), Spell.Buff("Rupture", true, ret => (StyxWoW.Me.CurrentTarget.GetAuraTimeLeft("Rupture", true).TotalSeconds < 3)), Spell.Buff("Envenom", true, ret => (StyxWoW.Me.GetAuraTimeLeft("Slice and Dice", true).TotalSeconds < 3 && StyxWoW.Me.ComboPoints > 0) || StyxWoW.Me.ComboPoints == 5), Spell.Cast("Dispatch"), Spell.Cast("Mutilate"), Movement.CreateMoveToMeleeBehavior(true) )); }
public static Composite CreateDeathKnightBloodHeals() { return (new PrioritySelector( Spell.BuffSelf("Death Pact", ret => TalentManager.IsSelected((int)Common.DeathKnightTalents.DeathPact) && StyxWoW.Me.HealthPercent < SingularSettings.Instance.DeathKnight.DeathPactPercent && Common.GhoulMinionIsActive), Spell.Cast("Death Siphon", ret => TalentManager.IsSelected((int)Common.DeathKnightTalents.DeathSiphon) && StyxWoW.Me.GotTarget && StyxWoW.Me.HealthPercent < SingularSettings.Instance.DeathKnight.DeathSiphonPercent), Spell.BuffSelf("Conversion", ret => TalentManager.IsSelected((int)Common.DeathKnightTalents.Conversion) && StyxWoW.Me.HealthPercent < SingularSettings.Instance.DeathKnight.ConversionPercent && StyxWoW.Me.RunicPowerPercent >= SingularSettings.Instance.DeathKnight.MinimumConversionRunicPowerPrecent), Spell.BuffSelf("Rune Tap", ret => StyxWoW.Me.HealthPercent < SingularSettings.Instance.DeathKnight.RuneTapPercent || StyxWoW.Me.HealthPercent < 90 && StyxWoW.Me.HasAura("Will of the Necropolis")), Spell.BuffSelf("Death Coil", ret => StyxWoW.Me.HealthPercent < SingularSettings.Instance.DeathKnight.LichbornePercent && StyxWoW.Me.HasAura("Lichborne")), Spell.BuffSelf("Lichborne", ret => StyxWoW.Me.HealthPercent < SingularSettings.Instance.DeathKnight.LichbornePercent && StyxWoW.Me.CurrentRunicPower >= 60 && (!SingularSettings.Instance.DeathKnight.LichborneExclusive || (!StyxWoW.Me.HasAura("Bone Shield") && !StyxWoW.Me.HasAura("Vampiric Blood") && !StyxWoW.Me.HasAura("Dancing Rune Weapon") && !StyxWoW.Me.HasAura("Icebound Fortitude")))), Spell.BuffSelf("Raise Dead", ret => // I need to summon pet for Death Pact StyxWoW.Me.HealthPercent < SingularSettings.Instance.DeathKnight.SummonGhoulPercentBlood && !Common.GhoulMinionIsActive && (!SingularSettings.Instance.DeathKnight.DeathPactExclusive || (!StyxWoW.Me.HasAura("Bone Shield") && !StyxWoW.Me.HasAura("Vampiric Blood") && !StyxWoW.Me.HasAura("Dancing Rune Weapon") && !StyxWoW.Me.HasAura("Lichborne") && !StyxWoW.Me.HasAura("Icebound Fortitude")))) )); }
/// <summary>Creates an interrupt spell cast composite. This will attempt to use racials before any class/spec abilities. It will attempt to stun if possible!</summary> /// <remarks>Created 9/7/2011.</remarks> /// <param name="onUnit">The on unit.</param> /// <returns>.</returns> public static Composite CreateInterruptSpellCast(UnitSelectionDelegate onUnit) { return (new Decorator( // If the target is casting, and can actually be interrupted, AND we've waited out the double-interrupt timer, then find something to interrupt with. ret => onUnit != null && onUnit(ret) != null && onUnit(ret).IsCasting&& onUnit(ret).CanInterruptCurrentSpellCast /* && PreventDoubleInterrupt*/, new PrioritySelector( Spell.Cast("Rebuke", onUnit), Spell.Cast("Avenger's Shield", onUnit), Spell.Cast("Hammer of Justice", onUnit), Spell.Cast("Repentance", onUnit, ret => onUnit(ret).IsPlayer || onUnit(ret).IsDemon || onUnit(ret).IsHumanoid || onUnit(ret).IsDragon || onUnit(ret).IsGiant || onUnit(ret).IsUndead), Spell.Cast("Kick", onUnit), Spell.Cast("Gouge", onUnit, ret => !onUnit(ret).IsBoss() && !onUnit(ret).MeIsSafelyBehind), // Can't gouge bosses. Spell.Cast("Counterspell", onUnit), Spell.Cast("Wind Shear", onUnit), Spell.Cast("Pummel", onUnit), Spell.Cast("Spear Hand Strike", onUnit), // AOE interrupt Spell.Cast("Disrupting Shout", onUnit), // Gag Order only works on non-bosses due to it being a silence, not an interrupt! Spell.Cast("Heroic Throw", onUnit, ret => TalentManager.IsSelected(7) && !onUnit(ret).IsBoss()), Spell.Cast("Silence", onUnit), Spell.Cast("Silencing Shot", onUnit), // Can't stun most bosses. So use it on trash, etc. Spell.Cast("Bash", onUnit, ret => !onUnit(ret).IsBoss()), Spell.Cast("Skull Bash (Cat)", onUnit, ret => StyxWoW.Me.Shapeshift == ShapeshiftForm.Cat), Spell.Cast("Skull Bash (Bear)", onUnit, ret => StyxWoW.Me.Shapeshift == ShapeshiftForm.Bear), Spell.Cast("Mighty Bash", onUnit, ret => !onUnit(ret).IsBoss() && onUnit(ret).IsWithinMeleeRange), Spell.Cast("Solar Beam", onUnit, ret => StyxWoW.Me.Shapeshift == ShapeshiftForm.Moonkin), Spell.Cast("Strangulate", onUnit), Spell.Cast("Mind Freeze", onUnit), // Racials last. Spell.Cast("Arcane Torrent", onUnit), // Don't waste stomp on bosses. They can't be stunned 99% of the time! Spell.Cast("War Stomp", onUnit, ret => !onUnit(ret).IsBoss() && onUnit(ret).Distance < 8), Spell.Cast("Quaking Palm", onUnit) ))); }
public static Composite CreatePriestMovementBuff() { if (!SpellManager.HasSpell("Angelic Feather") && !TalentManager.IsSelected((int)PriestTalents.BodyAndSoul)) { return(new ActionAlwaysFail()); } return(new Decorator( ret => MovementManager.IsClassMovementAllowed && StyxWoW.Me.IsAlive && Me.IsMoving && !StyxWoW.Me.Mounted && !StyxWoW.Me.IsOnTransport && !StyxWoW.Me.OnTaxi && !StyxWoW.Me.HasAnyAura("Angelic Feather", "Body and Soul") && !StyxWoW.Me.IsAboveTheGround(), new PrioritySelector( Spell.WaitForCast(), new Throttle(3, new Decorator( ret => !Spell.IsGlobalCooldown(), new PrioritySelector( Spell.BuffSelf("Power Word: Shield", ret => TalentManager.IsSelected((int)PriestTalents.BodyAndSoul) && !StyxWoW.Me.HasAnyAura("Body and Soul", "Weakened Soul")), new Decorator( ret => SpellManager.HasSpell("Angelic Feather") && !StyxWoW.Me.HasAura("Angelic Feather"), new PrioritySelector( new Sequence( Spell.CastOnGround( "Angelic Feather", loc => Me.Location.RayCast(Me.RenderFacing, 1.5f), req => true, waitForSpell: true, tgtDescRtrv: desc => string.Format("Speed Boost on {0}", Me.SafeName()) ), new Action(ret => Lua.DoString("SpellStopTargeting()")) ) ) ) ) ) ) ) )); }
public static Composite CreateAssaRoguePvPCombat() { return(new PrioritySelector( Safers.EnsureTarget(), Movement.CreateMoveToLosBehavior(), Movement.CreateFaceTargetBehavior(), new Decorator( ret => !StyxWoW.Me.HasAura("Vanish"), Helpers.Common.CreateAutoAttack(true)), Helpers.Common.CreateInterruptSpellCast(ret => StyxWoW.Me.CurrentTarget), // Defensive Spell.BuffSelf("Evasion", ret => Unit.NearbyUnfriendlyUnits.Count(u => u.DistanceSqr < 6 * 6 && u.IsTargetingMeOrPet) >= 1), Spell.BuffSelf("Cloak of Shadows", ret => Unit.NearbyUnfriendlyUnits.Count(u => u.IsTargetingMeOrPet && u.IsCasting) >= 1), Spell.BuffSelf("Smoke Bomb", ret => StyxWoW.Me.HealthPercent < 15), // Redirect if we have CP left Spell.Cast("Redirect", ret => StyxWoW.Me.RawComboPoints > 0 && StyxWoW.Me.ComboPoints < 1), Spell.BuffSelf("Vanish", ret => TalentManager.IsSelected(14) && StyxWoW.Me.CurrentTarget.HasMyAura("Rupture") && StyxWoW.Me.HasAura("Slice and Dice")), Spell.Cast("Garrote", ret => (StyxWoW.Me.HasAura("Vanish") || StyxWoW.Me.IsStealthed) && StyxWoW.Me.CurrentTarget.MeIsBehind), Spell.Buff("Vendetta"), Spell.BuffSelf("Slice and Dice", ret => StyxWoW.Me.RawComboPoints > 0 && !StyxWoW.Me.HasAura("Slice and Dice")), Spell.Buff("Rupture", true, ret => (StyxWoW.Me.CurrentTarget.GetAuraTimeLeft("Rupture", true).TotalSeconds < 3)), Spell.Buff("Envenom", true, ret => (StyxWoW.Me.GetAuraTimeLeft("Slice and Dice", true).TotalSeconds < 3 && StyxWoW.Me.ComboPoints > 0) || StyxWoW.Me.ComboPoints == 5), Spell.Cast("Dispatch"), Spell.Cast("Mutilate"), Movement.CreateMoveToMeleeBehavior(true) )); }
private static Composite HealthFunnel(int petMinHealth, int petMaxHealth = 99) { return(new Decorator( ret => GetCurrentPet() != WarlockPet.None && Me.Pet.HealthPercent < petMinHealth && !Spell.IsSpellOnCooldown("Health Funnel") && Me.Pet.Distance < 45 && Me.Pet.InLineOfSpellSight && !TalentManager.IsSelected((int)WarlockTalents.SoulLink), new Sequence( new PrioritySelector( // glyph of health funnel prevents Soulburn: Health Funnel from being used new Decorator(ret => TalentManager.HasGlyph("Health Funnel"), new ActionAlwaysSucceed()), CastSoulburn(ret => { if (Me.Specialization == WoWSpec.WarlockAffliction) { if (Me.CurrentSoulShards > 0 && Spell.CanCastHack("Soulburn", Me)) { Logging.WriteDiagnostic("Soulburn should follow to make instant health funnel"); return true; } Logging.WriteDiagnostic("soulburn not available, shards={0}", Me.CurrentSoulShards); } return false; }), // neither of instant funnels available, so stop moving new Sequence( new Action(ctx => StopMoving.Now()), new Wait(1, until => !Me.IsMoving, new ActionAlwaysSucceed()))), new Decorator(ret => Spell.CanCastHack("Health Funnel", Me.Pet), new ActionAlwaysSucceed()), new Action(ret => Logging.WriteDiagnostic("Casting Health Funnel on Pet @ {0:F1}%", Me.Pet.HealthPercent)), new PrioritySelector( Spell.Cast(ret => "Health Funnel", mov => false, on => Me.Pet, req => Me.HasAura("Soulburn") || TalentManager.HasGlyph("Health Funnel")), Spell.Cast(ret => "Health Funnel", mov => true, on => Me.Pet, req => true, cancel => !Me.GotAlivePet || Me.Pet.HealthPercent >= petMaxHealth)), Common.CreateWaitForLagDuration()))); }
public static bool HasTalent(DemonHunterTalents talent) => TalentManager.IsSelected((int)talent);
public static Composite CreatePriestMovementBuffOnTank(string mode, bool checkMoving = true) { return(new PrioritySelector( new Throttle(2, new Decorator( req => PriestSettings.UseSpeedBuffOnTank && (HasTalent(PriestTalents.BodyAndSoul) || HasTalent(PriestTalents.AngelicFeather)) && SingularRoutine.CurrentWoWContext == WoWContext.Instances, new PrioritySelector( ctx => Group.Tanks.FirstOrDefault(t => t.IsAlive && t.IsMoving && !t.Combat && !t.HasAnyAura("Body and Soul", "Angelic Feather") && t.SpellDistance() < 40), Spell.Buff("Power Word: Shield", on => (WoWUnit)on, req => HasTalent(PriestTalents.BodyAndSoul) && !((WoWUnit)req).HasAura("Weakened Soul")), new Sequence( Spell.CastOnGround( "Angelic Feather", loc => (loc as WoWUnit).Location.RayCast((loc as WoWUnit).RenderFacing, 1.5f), req => req != null, waitForSpell: false, tgtDescRtrv: desc => string.Format("Speed Boost Tank {0}", (desc as WoWUnit).SafeName()) ), Helpers.Common.CreateWaitForLagDuration(orUntil => Spell.GetPendingCursorSpell != null), new Action(ret => Lua.DoString("SpellStopTargeting()")) ) ) ) ), new Decorator( ret => MovementManager.IsClassMovementAllowed && PriestSettings.UseSpeedBuff && StyxWoW.Me.IsAlive && (!checkMoving || StyxWoW.Me.IsMoving) && !StyxWoW.Me.Mounted && !StyxWoW.Me.IsOnTransport && !StyxWoW.Me.OnTaxi && (SpellManager.HasSpell("Angelic Feather") || TalentManager.IsSelected((int)PriestTalents.BodyAndSoul)) && !StyxWoW.Me.HasAnyAura("Angelic Feather", "Body and Soul") && (BotPoi.Current == null || BotPoi.Current.Type == PoiType.None || BotPoi.Current.Location.Distance(StyxWoW.Me.Location) > 10) && !StyxWoW.Me.IsAboveTheGround(), new PrioritySelector( Spell.WaitForCast(), new Throttle(3, new Decorator( ret => !Spell.IsGlobalCooldown(), new PrioritySelector( Spell.BuffSelf("Power Word: Shield", ret => TalentManager.IsSelected((int)PriestTalents.BodyAndSoul) && !StyxWoW.Me.HasAnyAura("Body and Soul", "Weakened Soul")), new Decorator( ret => SpellManager.HasSpell("Angelic Feather") && !StyxWoW.Me.HasAura("Angelic Feather"), new Sequence( // new Action( ret => Logger.Write( "Speed Buff for {0}", mode ) ), Spell.CastOnGround("Angelic Feather", on => StyxWoW.Me, ret => true, false), Helpers.Common.CreateWaitForLagDuration(orUntil => Spell.GetPendingCursorSpell != null), new Action(ret => Lua.DoString("SpellStopTargeting()")) ) ) ) ) ) ) ) )); }
private static Composite AfflictionCombatBuffs() { return(new PrioritySelector( // Symbiosis Spell.Cast("Rejuvenation", on => Me, ret => Me.HasAuraExpired("Rejuvenation", 1) && Me.HealthPercent < 95), // won't live long with no Pet, so try to summon //new Decorator(ret => GetCurrentPet() == WarlockPet.None && GetBestPet() != WarlockPet.None, // SummonPet()), new Decorator(req => !Me.CurrentTarget.IsTrivial(), new PrioritySelector( Spell.Cast("Twilight Ward", ret => NeedTwilightWard && !Me.CachedHasAura("Twilight Ward")), // need combat healing? check here since mix of buffs and abilities // heal / shield self as needed Spell.Cast("Dark Regeneration", ret => Me.HealthPercent < 45), new Decorator( ret => StyxWoW.Me.HealthPercent < 60 || Me.CachedHasAura("Dark Regeneration"), new PrioritySelector( ctx => Item.FindFirstUsableItemBySpell("Healthstone", "Life Spirit"), new Decorator( ret => ret != null, new Sequence( new Action(ret => Logging.Write("Using {0}", ((WoWItem)ret).Name)), new Action(ret => ((WoWItem)ret).UseContainerItem()), Common.CreateWaitForLagDuration())))), new PrioritySelector( // find an add within 8 yds (not our current target) ctx => Unit.UnfriendlyUnits(8).FirstOrDefault(u => (u.Combat || Battlegrounds.IsInsideBattleground) && !u.IsStunned() && u.CurrentTargetGuid == Me.Guid && Me.CurrentTargetGuid != u.Guid), Spell.CastOnGround("Shadowfury", on => ((WoWUnit)on).Location, ret => ret != null), // treat as a heal, but we cast on what would be our fear target -- allow even when fear use disabled Spell.Cast("Mortal Coil", on => (WoWUnit)on, ret => !((WoWUnit)ret).IsUndead && Me.HealthPercent < 50), new Decorator(ret => (Me.GotTarget && AdvancedAI.Burst && (!Me.HasAura(113860) && SpellManager.CanCast(113860)) && (Me.CurrentTarget.IsPlayer || Me.CurrentTarget.IsBoss() || Me.CurrentTarget.TimeToDeath() > 20)) || Unit.NearbyUnfriendlyUnits.Count(u => u.IsTargetingMeOrPet) >= 3, new PrioritySelector( Spell.Cast("Dark Soul: Misery"))), Spell.Cast("Summon Doomguard", ret => AdvancedAI.Burst && Me.CurrentTarget.IsBoss() && (PartyBuff.WeHaveBloodlust || Me.CurrentTarget.HealthPercent <= 20)), // lower threat if tanks nearby to pickup Spell.Cast("Soulshatter", ret => AdvancedAI.CurrentWoWContext == WoWContext.Instances && Group.AnyTankNearby && Unit.UnfriendlyUnits(30).Any(u => u.CurrentTargetGuid == Me.Guid)), // lower threat if voidwalker nearby to pickup Spell.Cast("Soulshatter", ret => AdvancedAI.CurrentWoWContext != WoWContext.Battlegrounds && !Group.AnyTankNearby && GetCurrentPet() == WarlockPet.Voidwalker && Unit.UnfriendlyUnits(30).Any(u => u.CurrentTargetGuid == Me.Guid)), Spell.Cast("Dark Bargain", ret => Me.HealthPercent < 45), Spell.Cast("Sacrificial Pact", ret => Me.HealthPercent < 60 && GetCurrentPet() != WarlockPet.None && GetCurrentPet() != WarlockPet.Other && Me.Pet.HealthPercent > 50), new Decorator(ret => Me.HealthPercent < 40 && !Group.AnyHealerNearby, new Sequence( new PrioritySelector( CastSoulburn(ret => Spell.CanCastHack("Drain Life", Me.CurrentTarget)), new ActionAlwaysSucceed()), Spell.Cast("Drain Life"))), new Decorator(ret => Unit.NearbyUnfriendlyUnits.Count(u => u.IsTargetingMeOrPet) >= 3 || Unit.NearbyUnfriendlyUnits.Any(u => u.IsPlayer && u.IsTargetingMeOrPet), new PrioritySelector( Spell.Cast("Dark Soul: Misery"), Spell.Cast("Unending Resolve"), new Decorator(ret => TalentManager.IsSelected((int)WarlockTalents.GrimoireOfService), new PrioritySelector( Spell.Cast("Grimoire: Felhunter", ret => AdvancedAI.CurrentWoWContext == WoWContext.Battlegrounds), //Spell.Cast("Grimoire: Voidwalker", ret => GetCurrentPet() != WarlockPet.Voidwalker), Spell.Cast("Grimoire: Felhunter", ret => GetCurrentPet() != WarlockPet.Felhunter))))), new Decorator(ret => !Me.IsInGroup(), HealthFunnel(40, 95)), Spell.Cast("Life Tap", ret => Me.ManaPercent < 30 && Me.HealthPercent > 85), PartyBuff.BuffGroup("Dark Intent"), new Decorator(ret => Me.GotTarget && Unit.ValidUnit(Me.CurrentTarget) && (Me.CurrentTarget.IsPlayer || Me.CurrentTarget.TimeToDeath() > 45), new Throttle(2, new PrioritySelector( Spell.Cast("Curse of the Elements", ret => !Me.CurrentTarget.CachedHasAura("Curse of the Elements") && !Me.CurrentTarget.HasMyAura("Curse of Enfeeblement") && !Me.CurrentTarget.HasAuraWithEffect(WoWApplyAuraType.ModDamageTaken)), Spell.Cast("Curse of Enfeeblement", ret => !Me.CurrentTarget.CachedHasAura("Curse of Enfeeblement") && !Me.CurrentTarget.HasMyAura("Curse of the Elements") && !Me.CurrentTarget.HasDemoralizing())))), // mana restoration - match against survival cooldowns new Decorator(ret => Me.ManaPercent < 60, new PrioritySelector( Spell.BuffSelf("Life Tap", ret => Me.HealthPercent > 50 && Me.HasAnyAura("Unending Resolve")), Spell.BuffSelf("Life Tap", ret => Me.HasAnyAura("Sacrificial Pact")), Spell.BuffSelf("Life Tap", ret => Me.HasAnyAura("Dark Bargain")))) ))))); }
public static Composite BaseRotation() { return(new Decorator(ret => !Me.IsChanneling && !Me.Mounted, new PrioritySelector( Helpers.Common.CreateInterruptSpellCast(ret => Me.CurrentTarget), //cd, cc & buff Spell.BuffSelf("Stance of the Sturdy Ox"), Spell.CastOnGround("Summon Black Ox Statue", ret => Me.CurrentTarget.Location, ret => !Me.HasAura("Sanctuary of the Ox")), Spell.BuffSelf("Fortifying Brew", ctx => Me.HealthPercent <= 40), Spell.BuffSelf("Guard", ctx => Me.HasAura("Power Guard")), Spell.Cast("Elusive Brew", ctx => Me.HasAura("Elusive Brew") && Me.Auras["Elusive Brew"].StackCount >= 9), Spell.Cast("Invoke Xuen, the White Tiger", ret => Unit.IsBoss(Me.CurrentTarget)), Spell.Cast("Paralysis", ret => Unit.NearbyUnfriendlyUnits.FirstOrDefault(u => u.Distance.Between(15, 20) && Me.IsFacing(u) && u.IsCasting && u != Me.CurrentTarget)), //rotation Spell.Cast("Keg Smash", ctx => Me.MaxChi - Me.CurrentChi >= 2), // && Clusters.GetCluster(Me, Unit.NearbyUnfriendlyUnits, ClusterType.Radius, 8).Any(u => !u.HasAura("Weakened Blows"))), Spell.CastOnGround("Dizzying Haze", ctx => TankManager.Instance.NeedToTaunt.FirstOrDefault().Location, ctx => TankManager.Instance.NeedToTaunt.Any() /* && SingularSettings.Instance.Monk.DizzyTaunt*/, false), Spell.Cast("Rushing Jade Wind", ret => Me.CurrentChi >= 2 && Me.IsSafelyFacing(Me.CurrentTarget)), // AOE new Decorator(ctx => Unit.NearbyUnfriendlyUnits.Count(u => u.DistanceSqr <= 8 * 8) >= 3, new PrioritySelector( Spell.Cast("Breath of Fire", ctx => Clusters.GetCluster(Me, Unit.NearbyUnfriendlyUnits, ClusterType.Cone, 8).Count(u => u.HasAura("Dizzying Haze") && !u.HasAura("Breath of Fire")) >= 3), Spell.Cast("Leg Sweep", ctx => TalentManager.IsSelected((int)Common.Talents.LegSweep) && SingularSettings.Instance.Monk.AOEStun) )), Spell.Cast("Blackout Kick", ctx => Me.CurrentChi >= 2), Spell.Cast("Tiger Palm", ret => !Me.HasAura("Tiger Power")), Spell.BuffSelf("Purifying Brew", ctx => Me.CurrentChi >= 1 && Me.HasAura("Moderate Stagger") || Me.HasAura("Heavy Stagger")), Spell.Cast("Keg Smash", ctx => Me.CurrentChi <= 3 && Me.CurrentEnergy >= 40), Spell.Cast("Chi Wave"), Spell.Cast("Expel Harm", ctx => Me.HealthPercent < 90 && Me.MaxChi - Me.CurrentChi >= 1 && Unit.NearbyUnfriendlyUnits.Any(u => u.DistanceSqr <= 10 * 10)), Spell.Cast("Jab", ctx => Me.MaxChi - Me.CurrentChi >= 1), // filler Spell.Cast("Tiger Palm", ret => !SpellManager.HasSpell("Blackout Kick") || SpellManager.HasSpell("Brewmaster Training")), Item.UseEquippedTrinket(TrinketUsage.OnCooldownInCombat) ) )); }
public static bool HasTalent(PaladinTalents tal) { return(TalentManager.IsSelected((int)tal)); }
public static Composite CreateDeathKnightCombatBuffs() { return (new PrioritySelector( // *** Defensive Cooldowns *** // Anti-magic shell - no cost and doesnt trigger GCD Spell.BuffSelf("Anti-Magic Shell", ret => Unit.NearbyUnfriendlyUnits.Any(u => (u.IsCasting || u.ChanneledCastingSpellId != 0) && u.CurrentTargetGuid == StyxWoW.Me.Guid)), // we want to make sure our primary target is within melee range so we don't run outside of anti-magic zone. Spell.CastOnGround("Anti-Magic Zone", ctx => StyxWoW.Me.Location, ret => TalentManager.IsSelected((int)DeathKnightTalents.AntiMagicZone) && !StyxWoW.Me.HasAura("Anti-Magic Shell") && Unit.NearbyUnfriendlyUnits.Any(u => (u.IsCasting || u.ChanneledCastingSpellId != 0) && u.CurrentTargetGuid == StyxWoW.Me.Guid) && Targeting.Instance.FirstUnit != null && Targeting.Instance.FirstUnit.IsWithinMeleeRange), Spell.BuffSelf("Icebound Fortitude", ret => StyxWoW.Me.HealthPercent < SingularSettings.Instance.DeathKnight.IceboundFortitudePercent), Spell.BuffSelf("Lichborne", ret => StyxWoW.Me.IsCrowdControlled()), Spell.BuffSelf("Desecrated Ground", ret => TalentManager.IsSelected((int)DeathKnightTalents.DesecratedGround) && StyxWoW.Me.IsCrowdControlled()), new PrioritySelector(ctx => StyxWoW.Me.PartyMembers.FirstOrDefault(u => u.IsDead && u.DistanceSqr < 40 * 40 && u.InLineOfSpellSight), Spell.Cast("Raise Ally", ctx => ctx as WoWUnit, ctx => ctx != null) ), // *** Offensive Cooldowns *** Spell.BuffSelf("Raise Dead", ret => // I'm unholy and I don't have a pet or I am blood/frost and I am using pet as dps bonus (TalentManager.CurrentSpec == WoWSpec.DeathKnightUnholy && !StyxWoW.Me.GotAlivePet) || (TalentManager.CurrentSpec == WoWSpec.DeathKnightFrost && SingularSettings.Instance.DeathKnight.UseGhoulAsDpsCdFrost && !GhoulMinionIsActive)), // never use army of the dead in instances if not blood specced unless you have the army of the dead glyph to take away the taunting Spell.BuffSelf("Army of the Dead", ret => SingularSettings.Instance.DeathKnight.UseArmyOfTheDead && (UseLongCoolDownAbility && (TalentManager.CurrentSpec != WoWSpec.DeathKnightBlood && (SingularRoutine.CurrentWoWContext != WoWContext.Instances || TalentManager.HasGlyph("Army of the Dead"))))), Spell.BuffSelf("Empower Rune Weapon", ret => UseLongCoolDownAbility && StyxWoW.Me.RunicPowerPercent < 70 && ActiveRuneCount == 0), Spell.BuffSelf("Death's Advance", ret => TalentManager.IsSelected((int)DeathKnightTalents.DeathsAdvance) && StyxWoW.Me.GotTarget && (!SpellManager.CanCast("Death Grip", false) || SingularRoutine.CurrentWoWContext == WoWContext.Instances) && StyxWoW.Me.CurrentTarget.DistanceSqr > 10 * 10), Spell.BuffSelf("Blood Tap", ret => StyxWoW.Me.HasAura("Blood Charge") && StyxWoW.Me.Auras["Blood Charge"].StackCount >= 5 && (BloodRuneSlotsActive == 0 || FrostRuneSlotsActive == 0 || UnholyRuneSlotsActive == 0)), Spell.Cast("Plague Leech", ret => CanCastPlagueLeech) )); }
public static bool HasTalent(DeathKnightTalents talent) => TalentManager.IsSelected((int)talent);
public static Composite CreateDeathKnightFrostInstanceCombat() { return(new PrioritySelector( Safers.EnsureTarget(), Movement.CreateMoveToLosBehavior(), Movement.CreateFaceTargetBehavior(), Helpers.Common.CreateAutoAttack(true), Helpers.Common.CreateInterruptSpellCast(ret => StyxWoW.Me.CurrentTarget), // Cooldowns Spell.BuffSelf("Pillar of Frost"), // Start AoE section new PrioritySelector(ctx => _nearbyUnfriendlyUnits = Unit.UnfriendlyUnitsNearTarget(12f).ToList(), new Decorator( ret => _nearbyUnfriendlyUnits.Count() >= SingularSettings.Instance.DeathKnight.DeathAndDecayCount, new PrioritySelector( // Diseases Spell.BuffSelf("Unholy Blight", ret => TalentManager.IsSelected( (int)Common.DeathKnightTalents.UnholyBlight) && StyxWoW.Me.CurrentTarget.DistanceSqr <= 10 * 10 && !StyxWoW.Me.HasAura("Unholy Blight")), Spell.Buff("Howling Blast", true, ret => !StyxWoW.Me.CurrentTarget.IsImmune(WoWSpellSchool.Frost), "Frost Fever"), Spell.Cast("Outbreak", ret => !StyxWoW.Me.CurrentTarget.HasMyAura("Frost Fever") || !StyxWoW.Me.CurrentTarget.HasAura("Blood Plague")), Spell.Buff("Icy Touch", true, ret => !StyxWoW.Me.CurrentTarget.IsImmune(WoWSpellSchool.Frost), "Frost Fever"), Spell.Buff("Plague Strike", true, "Blood Plague"), // spread the disease around. Spell.Cast("Blood Boil", ret => TalentManager.IsSelected( (int)Common.DeathKnightTalents.RollingBlood) && !StyxWoW.Me.HasAura("Unholy Blight") && StyxWoW.Me.CurrentTarget.DistanceSqr <= 10 * 10 && Common.ShouldSpreadDiseases), Spell.Cast("Pestilence", ret => !StyxWoW.Me.HasAura("Unholy Blight") && Common.ShouldSpreadDiseases), // aoe priority // both Frost runes and/or both Death runes are up Spell.Cast("Howling Blast", ret => StyxWoW.Me.FrostRuneCount == 2 || StyxWoW.Me.DeathRuneCount == 2), // both Unholy Runes are up Spell.CastOnGround("Death and Decay", ret => StyxWoW.Me.CurrentTarget.Location, ret => StyxWoW.Me.UnholyRuneCount == 2, false), // RP Capped Spell.Cast("Frost Strike", ret => StyxWoW.Me.RunicPowerPercent > 80), Spell.Cast("Obliterate", ret => StyxWoW.Me.UnholyRuneCount == 2), Spell.Cast("Howling Blast"), Spell.CastOnGround("Death and Decay", ret => StyxWoW.Me.CurrentTarget.Location, ret => true, false), // Execute Spell.Cast("Soul Reaper", ret => StyxWoW.Me.CurrentTarget.HealthPercent < 35), Spell.Cast("Frost Strike", ret => !StyxWoW.Me.CurrentTarget.IsImmune(WoWSpellSchool.Frost)), Spell.Cast("Remorseless Winter", ret => TalentManager.IsSelected( (int)Common.DeathKnightTalents.RemoreselessWinter)), Spell.Cast("Horn of Winter"), Movement.CreateMoveToMeleeBehavior(true) ))), // *** Dual Weld Single Target Priority new Decorator(ctx => IsDualWelding, new PrioritySelector( // Execute Spell.Cast("Soul Reaper", ret => StyxWoW.Me.CurrentTarget.HealthPercent < 35), // Diseases Spell.Buff("Howling Blast", true, ret => !StyxWoW.Me.CurrentTarget.IsImmune(WoWSpellSchool.Frost), "Frost Fever"), Spell.Cast("Outbreak", ret => !StyxWoW.Me.CurrentTarget.HasMyAura("Frost Fever") || !StyxWoW.Me.CurrentTarget.HasAura("Blood Plague")), Spell.Buff("Icy Touch", true, ret => !StyxWoW.Me.CurrentTarget.IsImmune(WoWSpellSchool.Frost), "Frost Fever"), Spell.Buff("Plague Strike", true, "Blood Plague"), // Killing Machine Spell.Cast("Frost Strike", ret => !StyxWoW.Me.CurrentTarget.IsImmune(WoWSpellSchool.Frost) && StyxWoW.Me.HasAura(KillingMachine)), Spell.Cast("Obliterate", ret => StyxWoW.Me.HasAura(KillingMachine) && Common.UnholyRuneSlotsActive == 2), // RP Capped Spell.Cast("Frost Strike", ret => !StyxWoW.Me.CurrentTarget.IsImmune(WoWSpellSchool.Frost) && StyxWoW.Me.RunicPowerPercent > 80), // Rime Proc Spell.Cast("Howling Blast", ret => !StyxWoW.Me.CurrentTarget.IsImmune(WoWSpellSchool.Frost) && StyxWoW.Me.HasAura("Freezing Fog")), // both Unholy Runes are off cooldown Spell.Cast("Obliterate", ret => StyxWoW.Me.UnholyRuneCount == 2), Spell.Cast("Frost Strike"), Spell.Cast("Howling Blast"), Spell.Cast("Horn of Winter") )), // *** 2 Hand Single Target Priority new Decorator(ctx => !IsDualWelding, new PrioritySelector( // Execute Spell.Cast("Soul Reaper", ret => StyxWoW.Me.CurrentTarget.HealthPercent < 35), // Diseases // Diseases Spell.Buff("Howling Blast", true, ret => !StyxWoW.Me.CurrentTarget.IsImmune(WoWSpellSchool.Frost), "Frost Fever"), Spell.Cast("Outbreak", ret => !StyxWoW.Me.CurrentTarget.HasMyAura("Frost Fever") || !StyxWoW.Me.CurrentTarget.HasAura("Blood Plague")), Spell.Buff("Icy Touch", true, ret => !StyxWoW.Me.CurrentTarget.IsImmune(WoWSpellSchool.Frost), "Frost Fever"), Spell.Buff("Plague Strike", true, "Blood Plague"), // Killing Machine Spell.Cast("Obliterate", ret => StyxWoW.Me.HasAura(KillingMachine)), // RP Capped Spell.Cast("Frost Strike", ret => !StyxWoW.Me.CurrentTarget.IsImmune(WoWSpellSchool.Frost) && StyxWoW.Me.RunicPowerPercent > 80), // Rime Proc Spell.Cast("Howling Blast", ret => !StyxWoW.Me.CurrentTarget.IsImmune(WoWSpellSchool.Frost) && StyxWoW.Me.HasAura("Freezing Fog")), Spell.Cast("Obliterate"), Spell.Cast("Frost Strike"), Spell.Cast("Horn of Winter") )), Movement.CreateMoveToMeleeBehavior(true) )); }
public static Composite CreateMageFireInstancePullAndCombat() { return(new PrioritySelector( Safers.EnsureTarget(), Movement.CreateMoveToLosBehavior(), Movement.CreateFaceTargetBehavior(), Helpers.Common.CreateAutoAttack(true), Spell.WaitForCast(true), // 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), Common.CreateUseManaGemBehavior(ret => StyxWoW.Me.ManaPercent < 80), // AoE comes first new Decorator( ret => Unit.UnfriendlyUnitsNearTarget(10f).Count() >= 3, new PrioritySelector( Spell.Cast("Fire Blast", ret => StyxWoW.Me.ActiveAuras.ContainsKey("Impact") && (StyxWoW.Me.CurrentTarget.HasMyAura("Combustion") || TalentManager.IsSelected(13))), Spell.CastOnGround("Blast Wave", ret => Clusters.GetBestUnitForCluster(Unit.NearbyUnitsInCombatWithMe, ClusterType.Radius, 8f).Location), Spell.Cast("Dragon's Breath", ret => Clusters.GetClusterCount(StyxWoW.Me, Unit.NearbyUnitsInCombatWithMe, ClusterType.Cone, 15f) >= 3), Spell.CastOnGround("Flamestrike", ret => Clusters.GetBestUnitForCluster(Unit.NearbyUnitsInCombatWithMe, 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.NearbyUnitsInCombatWithMe, ClusterType.Radius, 8f).Location) < o.Radius)) )), Spell.BuffSelf("Time Warp", ret => !StyxWoW.Me.GroupInfo.IsInRaid && StyxWoW.Me.CurrentTarget.HealthPercent > 20 && StyxWoW.Me.CurrentTarget.IsBoss() && !StyxWoW.Me.HasAura("Temporal Displacement")), // Rotation Spell.Cast("Frostfire Bolt", ret => StyxWoW.Me.CurrentTarget.IsImmune(WoWSpellSchool.Fire)), Spell.Cast("Living Bomb", ret => !StyxWoW.Me.CurrentTarget.HasAura("Living Bomb") || (StyxWoW.Me.CurrentTarget.HasAura("Living Bomb") && StyxWoW.Me.CurrentTarget.GetAuraTimeLeft("Living Bomb", true).TotalSeconds <= 2)), Spell.Cast("Inferno Blast", ret => StyxWoW.Me.HasAura("Heating Up")), Spell.Cast("Frost Bomb", ret => Unit.UnfriendlyUnitsNearTarget(10f).Count() >= 1), Spell.Cast("Combustion", ret => StyxWoW.Me.CurrentTarget.HasMyAura("Ignite") && StyxWoW.Me.CurrentTarget.HasMyAura("Pyroblast")), Spell.Cast("Pyroblast", ret => StyxWoW.Me.ActiveAuras.ContainsKey("Pyroblast!")), Spell.Cast("Fireball", ret => !SpellManager.HasSpell("Scorch")), Spell.Cast("Frostfire bolt", ret => !SpellManager.HasSpell("Fireball")), Spell.Cast("Scorch"), Movement.CreateMoveToTargetBehavior(true, 39f) )); }
public static Composite CreateDeathKnightBloodCombatBuffs() { return (new PrioritySelector( // *** Defensive Cooldowns *** // Anti-magic shell - no cost and doesnt trigger GCD Spell.BuffSelf("Anti-Magic Shell", ret => Unit.NearbyUnfriendlyUnits.Any(u => (u.IsCasting || u.ChanneledCastingSpellId != 0) && u.CurrentTargetGuid == StyxWoW.Me.Guid)), // we want to make sure our primary target is within melee range so we don't run outside of anti-magic zone. Spell.CastOnGround("Anti-Magic Zone", ctx => StyxWoW.Me.Location, ret => TalentManager.IsSelected((int)Common.DeathKnightTalents.AntiMagicZone) && !StyxWoW.Me.HasAura("Anti-Magic Shell") && Unit.NearbyUnfriendlyUnits.Any(u => (u.IsCasting || u.ChanneledCastingSpellId != 0) && u.CurrentTargetGuid == StyxWoW.Me.Guid) && Targeting.Instance.FirstUnit != null && Targeting.Instance.FirstUnit.IsWithinMeleeRange), Spell.Cast("Dancing Rune Weapon", ret => Unit.NearbyUnfriendlyUnits.Count() > 2), Spell.BuffSelf("Bone Shield", ret => (!SingularSettings.Instance.DeathKnight.BoneShieldExclusive || (!StyxWoW.Me.HasAura("Vampiric Blood") && !StyxWoW.Me.HasAura("Dancing Rune Weapon") && !StyxWoW.Me.HasAura("Lichborne") && !StyxWoW.Me.HasAura("Icebound Fortitude")))), Spell.BuffSelf("Vampiric Blood", ret => StyxWoW.Me.HealthPercent < SingularSettings.Instance.DeathKnight.VampiricBloodPercent && (!SingularSettings.Instance.DeathKnight.VampiricBloodExclusive || (!StyxWoW.Me.HasAura("Bone Shield") && !StyxWoW.Me.HasAura("Dancing Rune Weapon") && !StyxWoW.Me.HasAura("Lichborne") && !StyxWoW.Me.HasAura("Icebound Fortitude")))), Spell.BuffSelf("Icebound Fortitude", ret => StyxWoW.Me.HealthPercent < SingularSettings.Instance.DeathKnight.IceboundFortitudePercent && (!SingularSettings.Instance.DeathKnight.IceboundFortitudeExclusive || (!StyxWoW.Me.HasAura("Bone Shield") && !StyxWoW.Me.HasAura("Vampiric Blood") && !StyxWoW.Me.HasAura("Dancing Rune Weapon") && !StyxWoW.Me.HasAura("Lichborne")))), Spell.BuffSelf("Lichborne", ret => StyxWoW.Me.IsCrowdControlled()), Spell.BuffSelf("Desecrated Ground", ret => TalentManager.IsSelected((int)Common.DeathKnightTalents.DesecratedGround) && StyxWoW.Me.IsCrowdControlled()), // use army of the dead defensively Spell.BuffSelf("Army of the Dead", ret => SingularSettings.Instance.DeathKnight.UseArmyOfTheDead && SingularRoutine.CurrentWoWContext == WoWContext.Instances && StyxWoW.Me.HealthPercent < SingularSettings.Instance.DeathKnight.ArmyOfTheDeadPercent), // I need to use Empower Rune Weapon to use Death Strike Spell.BuffSelf("Empower Rune Weapon", ret => StyxWoW.Me.HealthPercent < Settings.EmpowerRuneWeaponPercent && !SpellManager.CanCast("Death Strike")), new PrioritySelector(ctx => StyxWoW.Me.PartyMembers.FirstOrDefault(u => u.IsDead && u.DistanceSqr < 40 * 40 && u.InLineOfSpellSight), Spell.Cast("Raise Ally", ctx => ctx as WoWUnit, ctx => ctx != null) ), // *** Offensive Cooldowns *** // I am using pet as dps bonus Spell.BuffSelf("Raise Dead", ret => Common.UseLongCoolDownAbility && Settings.UseGhoulAsDpsCdBlood && !Common.GhoulMinionIsActive), Spell.BuffSelf("Death's Advance", ret => TalentManager.IsSelected((int)Common.DeathKnightTalents.DeathsAdvance) && StyxWoW.Me.GotTarget && !SpellManager.CanCast("Death Grip", false) && StyxWoW.Me.CurrentTarget.DistanceSqr > 10 * 10), Spell.BuffSelf("Blood Tap", ret => StyxWoW.Me.HasAura("Blood Charge") && StyxWoW.Me.Auras["Blood Charge"].StackCount >= 5 && (Common.BloodRuneSlotsActive == 0 || Common.FrostRuneSlotsActive == 0 || Common.UnholyRuneSlotsActive == 0)), Spell.Cast("Plague Leech", ret => Common.CanCastPlagueLeech) )); }
public static Composite CreateDeathKnightBloodInstanceCombat() { return (new PrioritySelector( Safers.EnsureTarget(), Movement.CreateMoveToLosBehavior(), Movement.CreateFaceTargetBehavior(), Spell.WaitForCast(), Helpers.Common.CreateAutoAttack(true), Helpers.Common.CreateInterruptSpellCast(ret => StyxWoW.Me.CurrentTarget), Spell.BuffSelf("Blood Presence"), // ** Cool Downs ** Spell.BuffSelf("Vampiric Blood", ret => StyxWoW.Me.HealthPercent < SingularSettings.Instance.DeathKnight.VampiricBloodPercent), Spell.BuffSelf("Bone Shield"), // Taunts new Decorator( ret => SingularSettings.Instance.EnableTaunting && TankManager.Instance.NeedToTaunt.Any(), new Throttle(TimeSpan.FromSeconds(1), new PrioritySelector( Spell.Cast("Dark Command", ret => TankManager.Instance.NeedToTaunt.FirstOrDefault(), ret => true), new Sequence( Spell.Cast("Death Grip", ret => TankManager.Instance.NeedToTaunt.FirstOrDefault(), ret => TankManager.Instance.NeedToTaunt.Any() && /*recheck just before referencing member*/ TankManager.Instance.NeedToTaunt.FirstOrDefault().DistanceSqr > 10 * 10), new DecoratorContinue( ret => StyxWoW.Me.IsMoving, new Action(ret => Navigator.PlayerMover.MoveStop())), new WaitContinue(1, new ActionAlwaysSucceed()) ) ) ) ), // Start AoE section new PrioritySelector(ctx => _nearbyUnfriendlyUnits = Unit.UnfriendlyUnitsNearTarget(15f).ToList(), new Decorator(ret => _nearbyUnfriendlyUnits.Count() >= SingularSettings.Instance.DeathKnight.DeathAndDecayCount, new PrioritySelector( Spell.CastOnGround("Death and Decay", ret => StyxWoW.Me.CurrentTarget.Location, ret => true, false), Spell.Cast("Gorefiend's Grasp", ret => TalentManager.IsSelected((int)Common.DeathKnightTalents.GorefiendsGrasp)), Spell.Cast("Remorseless Winter", ret => TalentManager.IsSelected((int)Common.DeathKnightTalents.RemoreselessWinter)), // spread the disease around. Spell.BuffSelf("Unholy Blight", ret => TalentManager.IsSelected((int)Common.DeathKnightTalents.UnholyBlight) && StyxWoW.Me.CurrentTarget.DistanceSqr <= 10 * 10 && !StyxWoW.Me.HasAura("Unholy Blight")), Spell.Cast("Outbreak", ret => !StyxWoW.Me.HasAura("Unholy Blight") && (!StyxWoW.Me.CurrentTarget.HasMyAura("Frost Fever") || !StyxWoW.Me.CurrentTarget.HasAura("Blood Plague"))), Spell.Buff("Icy Touch", true, ret => !StyxWoW.Me.CurrentTarget.IsImmune(WoWSpellSchool.Frost), "Frost Fever"), Spell.Buff("Plague Strike", true, "Blood Plague"), Spell.Cast("Blood Boil", ret => TalentManager.IsSelected((int)Common.DeathKnightTalents.RollingBlood) && !StyxWoW.Me.HasAura("Unholy Blight") && StyxWoW.Me.CurrentTarget.DistanceSqr <= 10 * 10 && Common.ShouldSpreadDiseases), Spell.Cast("Pestilence", ret => !StyxWoW.Me.HasAura("Unholy Blight") && Common.ShouldSpreadDiseases), new Sequence( Spell.Cast("Death Strike", ret => DeathStrikeTimer.IsFinished), new Action(ret => DeathStrikeTimer.Reset())), Spell.Cast("Blood Boil", ret => _nearbyUnfriendlyUnits.Count >= Settings.BloodBoilCount), Spell.Cast("Heart Strike", ret => _nearbyUnfriendlyUnits.Count < Settings.BloodBoilCount), Spell.Cast("Rune Strike"), Spell.Cast("Icy Touch", ret => !StyxWoW.Me.CurrentTarget.IsImmune(WoWSpellSchool.Frost)), Movement.CreateMoveToMeleeBehavior(true) ))), Spell.Cast("Outbreak", ret => !StyxWoW.Me.CurrentTarget.HasMyAura("Frost Fever") || !StyxWoW.Me.CurrentTarget.HasAura("Blood Plague")), Spell.Buff("Icy Touch", true, ret => !StyxWoW.Me.CurrentTarget.IsImmune(WoWSpellSchool.Frost), "Frost Fever"), Spell.Buff("Plague Strike", true, "Blood Plague"), // If we don't have RS yet, just resort to DC. Its not the greatest, but oh well. Make sure we keep enough RP banked for a self-heal if need be. Spell.Cast("Death Coil", ret => !SpellManager.HasSpell("Rune Strike") && StyxWoW.Me.CurrentRunicPower >= 80), Spell.Cast("Death Coil", ret => !StyxWoW.Me.CurrentTarget.IsWithinMeleeRange), Spell.Cast("Rune Strike"), new Sequence( Spell.Cast("Death Strike", ret => DeathStrikeTimer.IsFinished), new Action(ret => DeathStrikeTimer.Reset())), Spell.Cast("Blood Boil", ret => _nearbyUnfriendlyUnits.Count >= Settings.BloodBoilCount), Spell.Cast("Heart Strike", ret => _nearbyUnfriendlyUnits.Count < Settings.BloodBoilCount), Spell.Cast("Icy Touch", ret => !StyxWoW.Me.CurrentTarget.IsImmune(WoWSpellSchool.Frost)), Movement.CreateMoveToMeleeBehavior(true) )); }
private static bool HasTalent(WarriorTalents tal) { return(TalentManager.IsSelected((int)tal)); }
public static Composite CreateDeathKnightUnholyInstanceCombat() { return(new PrioritySelector( Safers.EnsureTarget(), Movement.CreateMoveToLosBehavior(), Movement.CreateFaceTargetBehavior(), Helpers.Common.CreateAutoAttack(true), Helpers.Common.CreateInterruptSpellCast(ret => StyxWoW.Me.CurrentTarget), // *** Cool downs *** Spell.BuffSelf("Unholy Frenzy", ret => StyxWoW.Me.CurrentTarget.IsWithinMeleeRange && !StyxWoW.Me.HasAura("Heroism") && !StyxWoW.Me.HasAura("Bloodlust") && !StyxWoW.Me.HasAura("Time Warp") && !StyxWoW.Me.HasAura("Ancient Hysteria") && Common.UseLongCoolDownAbility), Spell.Cast("Summon Gargoyle", ret => SingularSettings.Instance.DeathKnight.UseSummonGargoyle && Common.UseLongCoolDownAbility), // Start AoE section new Decorator( ret => Settings.UseAoeInInstance && Unit.UnfriendlyUnitsNearTarget(12f).Count() >= SingularSettings.Instance.DeathKnight.DeathAndDecayCount, new PrioritySelector( // Diseases Spell.BuffSelf("Unholy Blight", ret => TalentManager.IsSelected((int)Common.DeathKnightTalents.UnholyBlight) && StyxWoW.Me.CurrentTarget.DistanceSqr <= 10 * 10 && !StyxWoW.Me.HasAura("Unholy Blight")), Spell.Cast("Outbreak", ret => !StyxWoW.Me.CurrentTarget.HasMyAura("Frost Fever") || !StyxWoW.Me.CurrentTarget.HasAura("Blood Plague")), Spell.Buff("Icy Touch", true, ret => !StyxWoW.Me.CurrentTarget.IsImmune(WoWSpellSchool.Frost), "Frost Fever"), Spell.Buff("Plague Strike", true, "Blood Plague"), // spread the disease around. Spell.Cast("Blood Boil", ret => TalentManager.IsSelected((int)Common.DeathKnightTalents.RollingBlood) && !StyxWoW.Me.HasAura("Unholy Blight") && StyxWoW.Me.CurrentTarget.DistanceSqr <= 10 * 10 && Common.ShouldSpreadDiseases), Spell.Cast("Pestilence", ret => !StyxWoW.Me.HasAura("Unholy Blight") && Common.ShouldSpreadDiseases), Spell.Cast("Dark Transformation", ret => StyxWoW.Me.GotAlivePet && !StyxWoW.Me.Pet.ActiveAuras.ContainsKey("Dark Transformation") && StyxWoW.Me.HasAura("Shadow Infusion") && StyxWoW.Me.Auras["Shadow Infusion"].StackCount >= 5), Spell.CastOnGround("Death and Decay", ret => StyxWoW.Me.CurrentTarget.Location, ret => StyxWoW.Me.UnholyRuneCount == 2, false), Spell.Cast("Blood Boil", ret => StyxWoW.Me.CurrentTarget.DistanceSqr <= 10 * 10 && StyxWoW.Me.DeathRuneCount > 0 || (StyxWoW.Me.BloodRuneCount == 2 && StyxWoW.Me.FrostRuneCount == 2)), // Execute Spell.Cast("Soul Reaper", ret => StyxWoW.Me.CurrentTarget.HealthPercent < 35), Spell.Cast("Scourge Strike", ret => StyxWoW.Me.UnholyRuneCount == 2), Spell.Cast("Death Coil", ctx => StyxWoW.Me.HasAura(SuddenDoom) || StyxWoW.Me.RunicPowerPercent >= 80 || !StyxWoW.Me.GotAlivePet || !StyxWoW.Me.Pet.ActiveAuras.ContainsKey("Dark Transformation")), Spell.Cast("Remorseless Winter", ret => TalentManager.IsSelected((int)Common.DeathKnightTalents.RemoreselessWinter)), Spell.Cast("Horn of Winter"), Movement.CreateMoveToMeleeBehavior(true) )), // *** Single target rotation. *** // Execute Spell.Cast("Soul Reaper", ret => StyxWoW.Me.CurrentTarget.HealthPercent < 35), // Diseases Spell.Cast("Outbreak", ret => !StyxWoW.Me.CurrentTarget.HasMyAura("Frost Fever") || !StyxWoW.Me.CurrentTarget.HasAura("Blood Plague")), Spell.Buff("Icy Touch", true, ret => !StyxWoW.Me.CurrentTarget.IsImmune(WoWSpellSchool.Frost), "Frost Fever"), Spell.Buff("Plague Strike", true, "Blood Plague"), Spell.Cast("Dark Transformation", ret => StyxWoW.Me.GotAlivePet && !StyxWoW.Me.Pet.ActiveAuras.ContainsKey("Dark Transformation") && StyxWoW.Me.HasAura("Shadow Infusion") && StyxWoW.Me.Auras["Shadow Infusion"].StackCount >= 5), Spell.CastOnGround("Death and Decay", ret => StyxWoW.Me.CurrentTarget.Location, ret => SingularSettings.Instance.DeathKnight.UseAoeInInstance && StyxWoW.Me.UnholyRuneCount == 2 || StyxWoW.Me.DeathRuneCount > 0, false), Spell.Cast("Scourge Strike", ret => StyxWoW.Me.UnholyRuneCount == 2 || StyxWoW.Me.DeathRuneCount > 0), Spell.Cast("Festering Strike", ret => StyxWoW.Me.BloodRuneCount == 2 && StyxWoW.Me.FrostRuneCount == 2), Spell.Cast("Death Coil", ret => StyxWoW.Me.HasAura(SuddenDoom) || StyxWoW.Me.CurrentRunicPower >= 80), Spell.Cast("Scourge Strike"), Spell.Cast("Festering Strike"), Spell.Cast("Death Coil", ret => !StyxWoW.Me.GotAlivePet || !StyxWoW.Me.Pet.ActiveAuras.ContainsKey("Dark Transformation")), Spell.Cast("Horn of Winter"), Movement.CreateMoveToMeleeBehavior(true) )); }
public static Composite UnholyDKCombat() { return(new PrioritySelector( Spell.WaitForCastOrChannel(), // Interrupt please. Spell.Cast("Mind Freeze", ret => Me.CurrentTarget.IsCasting && Me.CurrentTarget.CanInterruptCurrentSpellCast), Spell.Cast("Strangulate", ret => Me.CurrentTarget.IsCasting && Me.CurrentTarget.CanInterruptCurrentSpellCast), //Staying Alive //Item.CreateUsePotionAndHealthstone(60, 40), Spell.Cast("Conversion", ret => Me.HealthPercent < 50 && Me.RunicPowerPercent >= 20 && !Me.HasAura("Conversion")), Spell.Cast("Conversion", ret => Me.HealthPercent > 65 && Me.HasAura("Conversion")), Spell.Cast("Death Pact", ret => Me.HealthPercent < 45), Spell.Cast("Death Siphon", ret => Me.HealthPercent < 50), Spell.Cast("Icebound Fortiude", ret => Me.HealthPercent < 40), Spell.Cast("Death Strike", ret => Me.GotTarget && Me.HealthPercent < 15), Spell.Cast("Lichborne", ret => // use it to heal with deathcoils. (Me.HealthPercent < 25 && Me.CurrentRunicPower >= 60)), Spell.Cast("Death Coil", at => Me, ret => Me.HealthPercent < 50 && Me.HasAura("Lichborne")), new Throttle(2, new PrioritySelector( Spell.Cast("Blood Tap", ret => Me.HasAura("Blood Charge", 10) && (Me.UnholyRuneCount == 0 || Me.DeathRuneCount == 0 || Me.FrostRuneCount == 0)))), //Dispells if we ever need to add it in for pve but you have to be glyphed for it //new Decorator(ret => Me.CurrentTarget.HasAnyAura(), // new PrioritySelector( // Spell.Cast("Icy Touch"))), // AOE //new Decorator (ret => UnfriendlyUnits.Count() >= 2, CreateAoe()), // Execute Spell.Cast("Soul Reaper", ret => Me.CurrentTarget.HealthPercent < 36), // Diseases Spell.Cast("Outbreak", ret => !Me.CurrentTarget.HasMyAura("Frost Fever") || !Me.CurrentTarget.HasMyAura("Blood Plague")), Spell.Cast("Plague Strike", ret => !StyxWoW.Me.CurrentTarget.HasMyAura("Blood Plague") || !StyxWoW.Me.CurrentTarget.HasMyAura("Frost Fever")), new Throttle(1, 2, new PrioritySelector( Spell.Cast("Unholy Blight", ret => Unit.UnfriendlyUnitsNearTarget(12f).Count() >= 2 && TalentManager.IsSelected((int)DeathKnightTalents.UnholyBlight) && Me.CurrentTarget.DistanceSqr <= 10 * 10 && !StyxWoW.Me.HasAura("Unholy Blight")))), new Throttle(1, 2, new PrioritySelector( Spell.Cast("Blood Boil", ret => Unit.UnfriendlyUnitsNearTarget(12f).Count() >= 2 && TalentManager.IsSelected((int)DeathKnightTalents.RoillingBlood) && !Me.HasAura("Unholy Blight") && //StyxWoW.Me.CurrentTarget.DistanceSqr <= 15 * 15 && ShouldSpreadDiseases))), //Cooldowns new Decorator(ret => AdvancedAI.Burst, new PrioritySelector( Spell.Cast("Unholy Frenzy", ret => Me.CurrentTarget.IsWithinMeleeRange && !PartyBuff.WeHaveBloodlust), new Action(ret => { Item.UseTrinkets(); return RunStatus.Failure; }), new Action(ret => { Item.UseHands(); return RunStatus.Failure; }), Spell.Cast("Summon Gargoyle"))), new Throttle(1, 2, new PrioritySelector( Spell.Cast("Pestilence", ret => Unit.UnfriendlyUnitsNearTarget(12f).Count() >= 2 && !Me.HasAura("Unholy Blight") && ShouldSpreadDiseases))), //Kill Time Spell.Cast("Dark Transformation", ret => Me.GotAlivePet && !Me.Pet.ActiveAuras.ContainsKey("Dark Transformation") && Me.HasAura("Shadow Infusion", 5)), Spell.CastOnGround("Death and Decay", ret => Me.CurrentTarget.Location, ret => true, false), Spell.Cast("Scourge Strike", ret => Me.UnholyRuneCount == 2), Spell.Cast("Festering Strike", ret => Me.BloodRuneCount == 2 && Me.FrostRuneCount == 2), Spell.Cast("Death Coil", ret => (Me.HasAura(SuddenDoom) || Me.CurrentRunicPower >= 90)),// && StyxWoW.Me.Auras["Shadow Infusion"].StackCount < 5), Spell.Cast("Scourge Strike"), Spell.Cast("Plague Leech", ret => SpellManager.Spells["Outbreak"].CooldownTimeLeft.Seconds <= 1), Spell.Cast("Festering Strike"), //Blood Tap Spell.Cast("Blood Tap", ret => Me.HasAura("Blood Charge", 5) && (BloodRuneSlotsActive == 0 || FrostRuneSlotsActive == 0 || UnholyRuneSlotsActive == 0)), Spell.Cast("Death Coil", ret => SpellManager.Spells["Lichborne"].CooldownTimeLeft.Seconds >= 4 && Me.CurrentRunicPower < 60 || !Me.HasAura("Conversion")), // || StyxWoW.Me.Auras["Shadow Infusion"].StackCount == 5), Spell.Cast("Horn of Winter"), Spell.Cast("Empower Rune Weapon", ret => AdvancedAI.Burst && (Me.BloodRuneCount == 0 && Me.FrostRuneCount == 0 && Me.UnholyRuneCount == 0)), new ActionAlwaysSucceed())); }
public static Composite CreateDeathKnightHeals() { return (new PrioritySelector( Spell.BuffSelf("Death Pact", ret => TalentManager.IsSelected((int)DeathKnightTalents.DeathPact) && StyxWoW.Me.HealthPercent < SingularSettings.Instance.DeathKnight.DeathPactPercent && (StyxWoW.Me.GotAlivePet || GhoulMinionIsActive)), Spell.Cast("Death Siphon", ret => TalentManager.IsSelected((int)DeathKnightTalents.DeathSiphon) && StyxWoW.Me.GotTarget && StyxWoW.Me.HealthPercent < SingularSettings.Instance.DeathKnight.DeathSiphonPercent), Spell.BuffSelf("Conversion", ret => TalentManager.IsSelected((int)DeathKnightTalents.Conversion) && StyxWoW.Me.HealthPercent < SingularSettings.Instance.DeathKnight.ConversionPercent && StyxWoW.Me.RunicPowerPercent >= SingularSettings.Instance.DeathKnight.MinimumConversionRunicPowerPrecent), Spell.BuffSelf("Rune Tap", ret => TalentManager.CurrentSpec == WoWSpec.DeathKnightBlood && StyxWoW.Me.HealthPercent < SingularSettings.Instance.DeathKnight.RuneTapPercent), Spell.Cast("Death Strike", ret => StyxWoW.Me.GotTarget && StyxWoW.Me.HealthPercent < SingularSettings.Instance.DeathKnight.DeathStrikeEmergencyPercent), Spell.BuffSelf("Death Coil", ret => StyxWoW.Me.HealthPercent < SingularSettings.Instance.DeathKnight.LichbornePercent && StyxWoW.Me.HasAura("Lichborne")), Spell.BuffSelf("Lichborne", ret => // use it to heal with deathcoils. (StyxWoW.Me.HealthPercent < SingularSettings.Instance.DeathKnight.LichbornePercent && StyxWoW.Me.CurrentRunicPower >= 60 && (!SingularSettings.Instance.DeathKnight.LichborneExclusive || (!StyxWoW.Me.HasAura("Bone Shield") && !StyxWoW.Me.HasAura("Vampiric Blood") && !StyxWoW.Me.HasAura("Dancing Rune Weapon") && !StyxWoW.Me.HasAura("Icebound Fortitude"))))), Spell.BuffSelf("Raise Dead", ret => // I'm frost or blood and I need to summon pet for Death Pact ((TalentManager.CurrentSpec == WoWSpec.DeathKnightFrost && StyxWoW.Me.HealthPercent < SingularSettings.Instance.DeathKnight.SummonGhoulPercentFrost) || (TalentManager.CurrentSpec == WoWSpec.DeathKnightBlood && StyxWoW.Me.HealthPercent < SingularSettings.Instance.DeathKnight.SummonGhoulPercentBlood)) && !GhoulMinionIsActive && (!SingularSettings.Instance.DeathKnight.DeathPactExclusive || (!StyxWoW.Me.HasAura("Bone Shield") && !StyxWoW.Me.HasAura("Vampiric Blood") && !StyxWoW.Me.HasAura("Dancing Rune Weapon") && !StyxWoW.Me.HasAura("Lichborne") && !StyxWoW.Me.HasAura("Icebound Fortitude")))) )); }