示例#1
0
        public static Composite CreateHunterSurvivalPullAndCombat()
        {
            return(new PrioritySelector(
                       Helpers.Common.EnsureReadyToAttackFromMelee(),

                       Spell.WaitForCastOrChannel(),
                       new Decorator(
                           ret => !Spell.IsGlobalCooldown(),

                           new PrioritySelector(
                               CreateSurvivalDiagnosticOutputBehavior(),

                               Movement.WaitForFacing(),
                               Movement.WaitForLineOfSpellSight(),

                               Helpers.Common.CreateInterruptBehavior(),

                               // Artifact Weapon
                               new Decorator(
                                   ret => HunterSettings.UseArtifactOnlyInAoE && Clusters.GetConeClusterCount(90f, Unit.UnfriendlyUnits(8), 100f) > 1,
                                   new PrioritySelector(
                                       Spell.Cast("Fury of the Eagle",
                                                  ret =>
                                                  HunterSettings.UseDPSArtifactWeaponWhen == UseDPSArtifactWeaponWhen.OnCooldown ||
                                                  (HunterSettings.UseDPSArtifactWeaponWhen == UseDPSArtifactWeaponWhen.AtHighestDPSOpportunity && Me.GetAuraStacks("Mongoose Fury") >= 6)
                                                  )
                                       )
                                   ),
                               Spell.Cast("Fury of the Eagle",
                                          ret =>
                                          HunterSettings.UseDPSArtifactWeaponWhen == UseDPSArtifactWeaponWhen.OnCooldown ||
                                          (HunterSettings.UseDPSArtifactWeaponWhen == UseDPSArtifactWeaponWhen.AtHighestDPSOpportunity && Me.GetAuraStacks("Mongoose Fury") >= 6)
                                          ),

                               Spell.BuffSelf("Aspect of the Eagle", ret => Me.GetAuraTimeLeft("Mongoose Fury", false).TotalSeconds > 10),
                               Spell.Cast("Mongoose Bite", req => SpellManager.HasSpell("Aspect of the Eagle") && Spell.GetSpellCooldown("Aspect of the Eagle").TotalSeconds <= 0 && !Me.HasActiveAura("Mongoose Fury")),
                               Spell.BuffSelf("Snake Hunter", ret => Me.HasAura("Aspect of the Eagle") && Spell.GetCharges("Mongoose Bite") <= 0),
                               Spell.Cast("Butchery", ret => Unit.UnfriendlyUnits(8).Count() >= 2),
                               Spell.CastOnGround("Explosive Trap", on => Me.CurrentTarget.Location),
                               Spell.Cast("Dragonsfire Grenade"),
                               Spell.CastOnGround("Steel Trap", on => Me.CurrentTarget.Location, ret => Me.CurrentTarget.TimeToDeath() > 5),
                               Spell.Cast("Raptor Strike",
                                          ret => Common.HasTalent(HunterTalents.WayOfTheMokNathal) && (Me.GetAuraTimeLeft("Mok'Nathal Tactics").TotalSeconds < 1.8 || Me.GetAuraStacks("Mok'Nathal Tactics") < 4)),
                               Spell.Cast("Lacerate"),
                               Spell.Cast("Mongoose Bite",
                                          ret => Spell.GetCharges("Mongoose Bite") == 2 && Spell.TimeUntilNextCharge("Mongoose Bite").TotalSeconds < 1.8),
                               Spell.Cast("Throwing Axes"),
                               Spell.CastOnGround("Caltrops", on => Me.CurrentTarget.Location),
                               Spell.Cast("Spitting Cobra"),
                               // Avoiding getting focus capped with Flanking Strike
                               Spell.Cast("Flanking Strike", ret => Common.FocusDeficit < 20 && Unit.UnfriendlyUnits(8).Count() <= 3),
                               Spell.Cast("Carve", ret => Common.FocusDeficit < 20 && Unit.UnfriendlyUnits(8).Count() >= 4),
                               Spell.Cast("Carve", ret => Common.HasTalent(HunterTalents.SerpentString) && Unit.UnfriendlyUnits(8).Count(u => u.GetAuraTimeLeft("Serpent String").TotalSeconds < 1.8) >= 3),
                               Spell.Cast("Mongoose Bite", ret => !SpellManager.HasSpell("Aspect of the Eagle") || Spell.GetSpellCooldown("Aspect of the Eagle").TotalSeconds > 12)
                               )
                           )
                       ));
        }
示例#2
0
 private static Composite CreateGlacialAdvanceRotation()
 {
     return(new PrioritySelector(
                Spell.Cast("Howling Blast", ret => Me.CurrentTarget.GetAuraTimeLeft("Frost Fever").TotalSeconds < 1.8d),
                Spell.Cast("Remorseless Winter", ret => Spell.UseAOE && Unit.NearbyUnfriendlyUnits.Count(u => u.IsWithinMeleeRange) >= 2),
                Spell.Cast("Glacial Advance", ret => Spell.UseAOE && Clusters.GetConeClusterCount(20f, Unit.UnfriendlyUnits(15), 100f) > 1),
                Spell.Cast("Frostscythe", ret => Spell.UseAOE && Clusters.GetClusterCount(Me.CurrentTarget, Unit.NearbyUnfriendlyUnits, ClusterType.Cone, 8) >= 3),
                Spell.Cast("Obliterate", ret => (Common.RunicPowerDeficit >= 10 && (!Spell.UseAOE || !Unit.UnfriendlyUnitsNearTarget(8).Any())) || Me.HasActiveAura("Killing Machine")),
                Spell.Cast("Howling Blast", ret => Me.HasActiveAura("Rime")),
                Spell.Cast("Horn of Winter", ret => Me.CurrentRunes < 4 && Common.RunicPowerDeficit >= 20),
                Spell.Cast("Frost Strike"),
                Spell.Cast("Howling Blast")
                ));
 }
示例#3
0
        public static Composite CreateBrewmasterMonkCombat()
        {
            TankManager.NeedTankTargeting = (SingularRoutine.CurrentWoWContext == WoWContext.Instances);

            return(new PrioritySelector(
                       Common.CreateAttackFlyingOrUnreachableMobs(),
                       Helpers.Common.EnsureReadyToAttackFromMelee(),
                       Spell.WaitForCastOrChannel(),

                       new Decorator(
                           req => !Spell.IsGlobalCooldown(),
                           new PrioritySelector(
                               ctx =>
                               TankManager.Instance.TargetList.FirstOrDefault(u => u.IsWithinMeleeRange) ??
                               Me.CurrentTarget,

                               Helpers.Common.CreateInterruptBehavior(),
                               SingularRoutine.MoveBehaviorInlineToCombat(BehaviorType.CombatBuffs),

                               Movement.WaitForFacing(),
                               Movement.WaitForLineOfSpellSight(),

                               new Decorator(
                                   ret => SingularRoutine.CurrentWoWContext == WoWContext.Instances && Unit.NearbyUnfriendlyUnits.Count(u => !u.IsBoss) > 2,
                                   new PrioritySelector(
                                       CreateSummonBlackOxStatueBehavior(on => Me.CurrentTarget),
                                       Spell.Cast("Provoke", on => FindStatue(), ret => TankManager.Instance.NeedToTaunt.Count >= 2))
                                   ),
                               // taunt if needed
                               Spell.Cast("Provoke", ret => TankManager.Instance.NeedToTaunt.FirstOrDefault(), ret => SingularSettings.Instance.EnableTaunting),
                               new Decorator(ret => Unit.UnfriendlyUnits(8).Count() >= 2,
                                             new PrioritySelector(
                                                 Spell.CastOnGround("Exploding Keg", on => (WoWUnit)on, ret => Me.CurrentTarget.IsWithinMeleeRange &&
                                                                    (Me.HealthPercent <= MonkSettings.ArtifactHealthPercent || Unit.NearbyUnfriendlyUnits.Count(u => !u.IsBoss) > 2)),
                                                 Spell.Cast("Keg Smash", on => (WoWUnit)on),
                                                 Spell.Cast("Breath of Fire", on => (WoWUnit)on),
                                                 Spell.Cast("Blackout Strike", on => (WoWUnit)on, req => Common.HasTalent(MonkTalents.BlackoutCombo)),
                                                 Spell.Cast("Chi Burst", on => (WoWUnit)on),
                                                 Spell.Cast("Breath of Fire", on => (WoWUnit)on),
                                                 Spell.Cast("Rushing Jade Wind", on => (WoWUnit)on),
                                                 Spell.Cast("Tiger Palm", on => (WoWUnit)on, req => Me.CurrentEnergy >= 65),
                                                 Spell.Cast("Leg Sweep", on => (WoWUnit)on, ret => ((WoWUnit)ret).IsWithinMeleeRange),
                                                 Spell.Cast("Blackout Strike", on => (WoWUnit)on)
                                                 )
                                             ),

                               Spell.Cast("Blackout Strike", on => (WoWUnit)on),
                               Spell.Cast("Tiger Palm", on => (WoWUnit)on, req => Me.CurrentEnergy >= 65),
                               Spell.Cast("Rushing Jade Wind", on => (WoWUnit)on),
                               Spell.Cast("Chi Wave", on => (WoWUnit)on),
                               Spell.Cast("Leg Sweep", on => (WoWUnit)on, ret => ((WoWUnit)ret).IsWithinMeleeRange),
                               Spell.Cast("Breath of Fire", on => (WoWUnit)on, req => (Me.CurrentTarget.IsPlayer || Me.CurrentTarget.IsBoss || Me.CurrentTarget.Elite) && Me.IsSafelyFacing(Me.CurrentTarget, 90f) && Me.CurrentTarget.SpellDistance() < 12),
                               Spell.Cast("Breath of Fire", on => (WoWUnit)on, req => Clusters.GetConeClusterCount(90f, Unit.UnfriendlyUnits(12), 100f) > 1),
                               SingularRoutine.MoveBehaviorInlineToCombat(BehaviorType.Heal),
                               Common.CreateCloseDistanceBehavior()
                               )
                           )
                       ));
        }
        private static Composite CreateProtectionDefensiveCombat()
        {
            return(new PrioritySelector(

                       CreateProtectionDiagnosticOutput(),

                       Common.CreateVictoryRushBehavior(),

                       new Decorator(
                           ret => SingularSettings.Instance.EnableTaunting && SingularRoutine.CurrentWoWContext == WoWContext.Instances,
                           CreateProtectionTauntBehavior()
                           ),

                       new Sequence(
                           new Decorator(
                               ret => Common.IsSlowNeeded(Me.CurrentTarget),
                               new PrioritySelector(
                                   Spell.Buff("Hamstring")
                                   )
                               ),
                           new Wait(TimeSpan.FromMilliseconds(500), until => !Common.IsSlowNeeded(Me.CurrentTarget), new ActionAlwaysSucceed())
                           ),

                       CreateProtectionInterrupt(),
                       Common.CreateSpellReflectBehavior(),

                       // special "in combat" pull logic for mobs not tagged and out of melee range
                       Common.CreateWarriorCombatPullMore(),

                       // Multi-target?  get the debuff on them
                       new Decorator(
                           ret => Unit.NearbyUnitsInCombatWithMeOrMyStuff.Count() > 1,
                           new PrioritySelector(
                               Spell.BuffSelf("Avatar", ret => WarriorSettings.AvatarOnCooldownAOE),
                               Spell.Cast("Thunder Clap", on => Unit.UnfriendlyUnits(Common.DistanceWindAndThunder(8)).FirstOrDefault()),
                               Spell.Cast("Shockwave", on => Unit.UnfriendlyUnits(8).FirstOrDefault(u => Me.IsSafelyFacing(u)), ret => Clusters.GetClusterCount(StyxWoW.Me, Unit.NearbyUnfriendlyUnits, ClusterType.Cone, 10f) >= 3))
                           ),

                       Spell.BuffSelf("Avatar", ret => WarriorSettings.AvatarOnCooldownSingleTarget),

                       Spell.HandleOffGCD(Spell.Cast("Focused Rage", ret => Me.HasAura(ULTIMATUM_PROC) || Me.RagePercent > 45 && Me.HasAura(FOCUSED_PROC) && !Me.HasAura("Focused Rage") || Me.RagePercent > 90)),
                       Spell.HandleOffGCD(Spell.Cast("Ignore Pain",
                                                     ret =>
                                                     Me.RagePercent > 70 && Me.HasAura(IGNORE_PROC) ||
                                                     (Me.RagePercent > 40 && Me.HasAura(IGNORE_PROC) && !Me.HasAura("Ignore Pain")) ||
                                                     (Me.RagePercent > 70 && !Me.HasAura("Ignore Pain")))
                                          ),
                       Spell.Cast("Shield Block", ret => Spell.GetCharges("Shield Block") > 1),

                       // Generate Rage
                       SingularRoutine.MoveBehaviorInlineToCombat(BehaviorType.Heal),
                       SingularRoutine.MoveBehaviorInlineToCombat(BehaviorType.CombatBuffs),

                       Movement.WaitForFacing(),
                       Movement.WaitForLineOfSpellSight(),

                       Spell.Cast("Shield Slam", ret => Me.CurrentRage < RageBuild && HasShieldInOffHand),
                       Spell.Cast("Revenge"),

                       // Artifact Weapon
                       new Decorator(
                           ret => WarriorSettings.UseArtifactOnlyInAoE && Clusters.GetConeClusterCount(90f, Unit.UnfriendlyUnits(12), 100f) > 1,
                           new PrioritySelector(
                               Spell.HandleOffGCD(Spell.BuffSelf("Battle Cry", req => true, 0, HasGcd.No)),
                               Spell.Cast("Neltharion's Fury", movement => false, target => Me.CurrentTarget, ret => WarriorSettings.UseDPSArtifactWeaponWhen != UseDPSArtifactWeaponWhen.None)
                               )
                           ),
                       Spell.HandleOffGCD(Spell.BuffSelf("Battle Cry", req => true, 0, HasGcd.No)),
                       Spell.Cast("Neltharion's Fury",
                                  movement => false,
                                  target => Me.CurrentTarget,
                                  ret => !WarriorSettings.UseArtifactOnlyInAoE && WarriorSettings.UseDPSArtifactWeaponWhen != UseDPSArtifactWeaponWhen.None && Clusters.GetConeClusterCount(90f, Unit.UnfriendlyUnits(12), 100f) >= 1
                                  ),

                       // Filler
                       Spell.Cast("Devastate"),

                       //Charge
                       Common.CreateChargeBehavior(),

                       Common.CreateAttackFlyingOrUnreachableMobs(),

                       new Action(ret =>
            {
                if (Me.GotTarget() && Me.CurrentTarget.IsWithinMeleeRange && Me.IsSafelyFacing(Me.CurrentTarget))
                {
                    Logger.WriteDebug("--- we did nothing!");
                }
                return RunStatus.Failure;
            })


                       ));
        }
        public static Composite CreatePaladinRetributionNormalPullAndCombat()
        {
            return(new PrioritySelector(

                       Helpers.Common.EnsureReadyToAttackFromMelee(),

                       Spell.WaitForCastOrChannel(),

                       new Decorator(
                           ret => !Spell.IsGlobalCooldown() && Me.GotTarget(),
                           new PrioritySelector(
                               SingularRoutine.MoveBehaviorInlineToCombat(BehaviorType.Heal),
                               SingularRoutine.MoveBehaviorInlineToCombat(BehaviorType.CombatBuffs),

                               // aoe count
                               ActionAoeCount(),

                               CreateRetDiagnosticOutputBehavior(),

                               Helpers.Common.CreateInterruptBehavior(),

                               Movement.WaitForFacing(),
                               Movement.WaitForLineOfSpellSight(),

                               Common.CreatePaladinPullMore(),

                               //Survive!
                               Spell.BuffSelf("Word of Glory", req => Me.HealthPercent <= PaladinSettings.SelfWordOfGloryHealth && (SingularRoutine.CurrentWoWContext != WoWContext.Instances || !Me.GroupInfo.IsInParty)),
                               Spell.BuffSelf("Eye for an Eye", req => Me.HealthPercent <= PaladinSettings.EyeForAndEyeHealth),
                               Spell.BuffSelf("Shield of Vengeance", req => Me.HealthPercent <= PaladinSettings.ShieldOfVengeanceHealth),
                               Spell.Cast("Blessing of Freedom", on => Me, ret =>
                                          Me.HasAuraWithMechanic(WoWSpellMechanic.Rooted, WoWSpellMechanic.Slowed, WoWSpellMechanic.Snared) ||
                                          Me.HasAuraWithEffect(WoWApplyAuraType.ModRoot, WoWApplyAuraType.ModDecreaseSpeed) && !Me.HasAuraWithMechanic(WoWSpellMechanic.Dazed)
                                          ),

                               Spell.BuffSelf("Cleanse Toxins", ret => StyxWoW.Me.GetAllAuras().Any(a => a.Spell.DispelType == WoWDispelType.Disease || a.Spell.DispelType == WoWDispelType.Poison)),

                               //Changed: WoWContext.ALL (was not casting in dungeons) and added Player for BGs
                               Spell.Cast("Hammer of Justice", ret => PaladinSettings.StunMobsWhileSolo || Me.CurrentTarget.IsPlayer),
                               Spell.Cast(
                                   "War Stomp",
                                   req => PaladinSettings.StunMobsWhileSolo &&
                                   Me.Race == WoWRace.Tauren &&
                                   EventHandlers.TimeSinceAttackedByEnemyPlayer.TotalSeconds < 5 &&
                                   EventHandlers.AttackingEnemyPlayer != null &&
                                   EventHandlers.AttackingEnemyPlayer.SpellDistance() < 8
                                   ),

                               //7	Blow buffs seperatly.  No reason for stacking while grinding.
                               Spell.BuffSelf(
                                   "Holy Avenger",
                                   req => PaladinSettings.RetAvengAndGoatK &&
                                   Me.GotTarget() &&
                                   Me.CurrentTarget.IsWithinMeleeRange && !Me.CurrentTarget.IsTrivial() &&
                                   (_mobCount > 1 || Me.CurrentTarget.TimeToDeath() > 25) &&
                                   (!Me.HasAura("Avenging Wrath") && Spell.GetSpellCooldown("Avenging Wrath").TotalSeconds > 1)
                                   ),

                               Spell.BuffSelf(
                                   "Avenging Wrath",
                                   req => PaladinSettings.RetAvengAndGoatK &&
                                   Me.GotTarget() &&
                                   Me.CurrentTarget.IsWithinMeleeRange && !Me.CurrentTarget.IsTrivial() &&
                                   (_mobCount > 1 || Me.CurrentTarget.TimeToDeath() > 25) &&
                                   (!Me.HasAura("Holy Avenger") && Spell.GetSpellCooldown("Holy Avenger").TotalSeconds > 1)
                                   ),

                               Spell.Cast("Execution Sentence", ret => Me.CurrentTarget.TimeToDeath() > 15),
                               Spell.Cast("Holy Prism", on => Group.Tanks.FirstOrDefault(t => t.IsAlive && t.Distance < 40)),

                               // lowbie farming priority
                               new Decorator(
                                   ret => _mobCount > 1 && Spell.UseAOE && Me.CurrentTarget.IsTrivial(),
                                   new PrioritySelector(
                                       // Bobby53: Inq > 5HP DS > Exo > HotR > 3-4HP DS
                                       Spell.Cast("Divine Storm", ret => Me.CurrentHolyPower == 5 && Spell.UseAOE),
                                       Spell.Cast("Hammer of the Righteous"),
                                       Spell.Cast("Divine Storm", ret => Me.CurrentHolyPower >= 3 && Spell.UseAOE)
                                       )
                                   ),

                               Common.CreatePaladinBlindingLightBehavior(),

                               // Wake of Ashes notes:  UseDPSArtifactWeaponWhen.AtHighestDPSOpportunity would be good if the player has the Ashes to Ashes artifact trait and if the player needs Holy Power.

                               new Decorator(
                                   ret => _mobCount >= 3 && Spell.UseAOE && !Me.CurrentTarget.IsPlayer,
                                   new PrioritySelector(
                                       // was EJ: Inq > 5HP DS > LH > HoW > Exo > HotR > Judge > 3-4HP DS (> SS)
                                       // now EJ: Inq > 5HP DS > LH > HoW (> T16 Free DS) > HotR > Judge > Exo > 3-4HP DS (> SS)

                                       Spell.Cast("Wake of Ashes", ret =>
                                                  (PaladinSettings.UseDPSArtifactWeaponWhen == UseDPSArtifactWeaponWhen.OnCooldown ||
                                                   (PaladinSettings.UseDPSArtifactWeaponWhen == UseDPSArtifactWeaponWhen.AtHighestDPSOpportunity && Me.CurrentHolyPower <= 1)) &&
                                                  Clusters.GetConeClusterCount(90f, Unit.UnfriendlyUnits(10), 100f) > 1),

                                       Spell.Cast("Judgment", ret => Me.CurrentHolyPower >= 3),

                                       new Decorator(ret => Common.HasTalent(PaladinTalents.JusticarsVengeance),
                                                     new PrioritySelector(
                                                         Spell.Cast("Justicar's Vengeance", ret => Me.HealthPercent <= 50),
                                                         Spell.Cast("Divine Storm", ret => Spell.UseAOE && Me.HealthPercent > 50 && (Me.CurrentTarget.HasAura(J_DEBUFF) || Me.CurrentHolyPower == 5))
                                                         )
                                                     ),
                                       Spell.Cast("Divine Storm", ret => !Common.HasTalent(PaladinTalents.JusticarsVengeance) && Spell.UseAOE && (Me.CurrentTarget.HasAura(J_DEBUFF) || Me.CurrentHolyPower == 5)),

                                       Spell.Cast("Blade of Justice", ret => Me.CurrentHolyPower < 5),
                                       Spell.Cast("Consecration", req => Unit.UnfriendlyUnits(8).Any()),
                                       Spell.Cast("Holy Wrath", ret => Me.HealthPercent <= 55),
                                       Spell.CastOnGround("Light's Hammer", on => Me.CurrentTarget, ret => 2 <= Clusters.GetClusterCount(Me.CurrentTarget, Unit.NearbyUnfriendlyUnits, ClusterType.Radius, 10f)),
                                       Spell.Cast("Crusader Strike"), // Can be replaced by Zeal - casts both ways.
                                       Movement.CreateMoveToMeleeBehavior(true),
                                       new ActionAlwaysSucceed()
                                       )
                                   ),
                               //No need to specify Holy Power, bot will cast anyway if it can.

                               Spell.BuffSelf("Divine Steed", req => !Me.Mounted && Me.IsMoving && Me.CurrentTarget.SpellDistance().Between(20, 60)),
                               Spell.Cast("Hand of Hindrance", req => Me.CurrentTarget.SpellDistance().Between(3, 27) && Me.CurrentTarget.IsMovingAway()),
                               Spell.Cast("Wake of Ashes", ret => !PaladinSettings.UseArtifactOnlyInAoE &&
                                          ((PaladinSettings.UseDPSArtifactWeaponWhen != UseDPSArtifactWeaponWhen.None && PaladinSettings.UseDPSArtifactWeaponWhen != UseDPSArtifactWeaponWhen.AtHighestDPSOpportunity) ||
                                           (PaladinSettings.UseDPSArtifactWeaponWhen == UseDPSArtifactWeaponWhen.AtHighestDPSOpportunity && Me.CurrentHolyPower <= 1)) &&
                                          Clusters.GetConeClusterCount(90f, Unit.UnfriendlyUnits(10), 100f) >= 1),

                               Spell.Cast("Judgment", ret => Me.CurrentHolyPower >= 3 || Me.CurrentTarget.Distance > 20d),

                               new Decorator(ret => Common.HasTalent(PaladinTalents.JusticarsVengeance),
                                             new PrioritySelector(
                                                 Spell.Cast("Justicar's Vengeance", ret => Me.HasAura(DP_PROC) && Me.CurrentTarget.HasAura(J_DEBUFF) || Me.HealthPercent <= 50),
                                                 Spell.Cast("Templar's Verdict", ret => Me.HealthPercent > 50 && (Me.CurrentTarget.HasAura(J_DEBUFF) || Me.CurrentHolyPower == 5))
                                                 )
                                             ),
                               Spell.Cast("Templar's Verdict", ret => !Common.HasTalent(PaladinTalents.JusticarsVengeance) && (Me.CurrentTarget.HasAura(J_DEBUFF) || Me.CurrentHolyPower == 5)),

                               Spell.Cast("Blade of Justice", ret => Me.CurrentHolyPower < 5),
                               Spell.Cast("Execution Sentence", when => Me.CurrentTarget.TimeToDeath() > 8),
                               Spell.Cast("Crusader Strike") // Can be replaced by Zeal - casts both ways.
                               )
                           ),

                       // Move to melee is LAST. Period.
                       Movement.CreateMoveToMeleeBehavior(true)
                       ));
        }