public Composite CreateProtectionPaladinCombat() { NeedTankTargeting = true; return(new PrioritySelector( CreateEnsureTarget(), CreateFaceUnit(), CreateSpellCast("Hammer of Wrath", false), CreateSpellCast("Avenger's Shield", false), // Make sure we're in range, and facing the damned target. (LOS check as well) CreateMoveToAndFace(5f, ret => Me.CurrentTarget), CreateAutoAttack(true), // Same rotation for both. CreateSpellCast("Shield of the Righteous", ret => Me.CurrentHolyPower == 3), //Multi target new Decorator( ret => NearbyUnfriendlyUnits.Count(a => a.Distance < 8) > 1, new PrioritySelector( CreateSpellCast("Hammer of the Righteous"), CreateSpellCast("Crusader Strike"), CreateSpellCast("Consecration"), CreateSpellCast("Holy Wrath"), CreateSpellCast("Judgement"))), new Decorator( ret => NearbyUnfriendlyUnits.Count(a => a.Distance < 8) <= 1, new PrioritySelector( //Single target CreateSpellCast("Crusader Strike"), CreateSpellCast("Judgement"), CreateSpellCast("Consecration"), CreateSpellCast("Holy Wrath"))))); }
public static IEnumerable <WoWUnit> UnfriendlyNearTarget(float distance, WoWPlayer tar) { var dist = distance * distance; var curTarLocation = tar.Location; return(NearbyUnfriendlyUnits.Where( p => ValidUnit(p) && p.Location.DistanceSqr(curTarLocation) <= dist).ToList()); }
protected Composite CreateRogueBlindOnAddBehavior() { return(new PrioritySelector( ctx => NearbyUnfriendlyUnits.FirstOrDefault(u => u.IsTargetingMeOrPet && u != Me.CurrentTarget), new Decorator( ret => ret != null, CreateSpellBuff("Blind", ret => NearbyUnfriendlyUnits.Count(u => u.Aggro) > 1, ret => (WoWUnit)ret, true)))); }
protected Composite CreateMagePolymorphOnAddBehavior() { return(new PrioritySelector( ctx => NearbyUnfriendlyUnits.FirstOrDefault(u => u.IsTargetingMeOrPet && u != Me.CurrentTarget && (u.CreatureType == WoWCreatureType.Beast || u.CreatureType == WoWCreatureType.Humanoid)), new Decorator( ret => ret != null, CreateSpellBuff("Polymorph", ret => NearbyUnfriendlyUnits.Count(u => u.Aggro) > 1, ret => (WoWUnit)ret, true)))); }
public Composite CreateCombatRogueCombat() { return(new PrioritySelector ( CreateEnsureTarget(), // Make sure we're in range, and facing the damned target. (LOS check as well) CreateAutoAttack(false), CreateMoveToAndFace(5f, ret => Me.CurrentTarget), // Kick/Defensive cooldowns/Recuperation CreateCombatRogueDefense(), // Redirect if we have CP left CreateSpellCast( "Redirect", ret => Me.RawComboPoints > 0 && Me.ComboPoints < 1), // CP generators, put em at start, since they're strictly conditional // and will help burning energy on Adrenaline Rush new Decorator( ret => (NearbyUnfriendlyUnits.Count(u => u.DistanceSqr < 6 * 6) <= 1 || NearbyUnfriendlyUnits.Any(u => u.DistanceSqr < 6 * 6 && u.HasAura("Blind"))) && Me.HasAura("Blade Flurry"), new Sequence( new Action(ret => Lua.DoString("RunMacroText(\"/cancelaura Blade Flurry\")")), new Action(ret => StyxWoW.SleepForLagDuration()))), CreateRogueBlindOnAddBehavior(), CreateSpellCast("Blade Flurry", ret => !NearbyUnfriendlyUnits.Any(u => u.HasAura("Blind")) && NearbyUnfriendlyUnits.Count(u => u.DistanceSqr < 6 * 6) > 1), CreateSpellCast("Eviscerate", ret => !CurrentTargetIsElite && Me.CurrentTarget.HealthPercent <= 40 && Me.ComboPoints > 2), // Always keep Slice and Dice up CreateSpellBuffOnSelf("Slice and Dice", ret => Me.RawComboPoints > 0), // Sinister Strike till 4 CP CreateSpellCast("Sinister Strike", ret => Me.ComboPoints < 4), // Revealing Strike if we're at 4 CP and target does not have it already CreateSpellBuff("Revealing Strike", ret => Me.ComboPoints > 3 && Me.ComboPoints < 5), // // Cooldowns: CreateSpellBuffOnSelf("Adrenaline Rush", ret => Me.CurrentEnergy < 20), // Killing Spree if we are at highest level of Bandit's Guise ( Shallow Insight / Moderate Insight / Deep Insight ) CreateSpellCast("Killing Spree", ret => Me.CurrentEnergy < 30 && Me.HasAura("Deep Insight")), // Finishers: new Decorator( ret => Me.ComboPoints > 4, new PrioritySelector( // wait out low SnD duration to cast it at it's finish // through not casting other finishers meanwhile and launching SnD below 1 sec duration new Decorator( ret => Me.Auras["Slice and Dice"].TimeLeft.TotalSeconds > 5 || Me.CurrentEnergy > 85, new PrioritySelector( // Check for >our own< Rupture debuff on target since there may be more rogues in party/raid! CreateSpellCast( "Rupture", ret => !Me.CurrentTarget.GetAllAuras().Any(a => a.Name == "Rupture" && a.CreatorGuid == Me.Guid)), CreateSpellCast("Eviscerate"))), CreateSpellCast("Slice and Dice", ret => Me.Auras["Slice and Dice"].TimeLeft.TotalSeconds < 0.9))))); }
protected Composite CreateHunterTrapOnAddBehavior() { return(new PrioritySelector( ctx => NearbyUnfriendlyUnits.FirstOrDefault(u => u.IsTargetingMeOrPet && u != Me.CurrentTarget && !u.IsMoving), new Decorator( ret => ret != null && CanCast("Freezing Trap", (WoWUnit)ret, false), new PrioritySelector( CreateSpellBuffOnSelf("Trap Launcher"), new Sequence( new Action(ret => Lua.DoString("RunMacroText(\"/cast Freezing Trap\")")), new Action(ret => LegacySpellManager.ClickRemoteLocation(((WoWUnit)ret).Location))))))); }
public Composite CreateLowbiePriestCombat() { return(new PrioritySelector( CreateDiscHealOnlyBehavior(), CreateEnsureTarget(), CreateMoveToAndFace(28f, ret => Me.CurrentTarget), CreateWaitForCast(), CreateSpellBuffOnSelf("Arcane Torrent", ret => NearbyUnfriendlyUnits.Any(u => u.IsCasting && u.DistanceSqr < 8 * 8)), CreateSpellBuff("Shadow Word: Pain"), CreateSpellCast("Mind Blast"), CreateSpellCast("Smite"), CreateFireRangedWeapon() )); }
public Composite CreateDemonologyCombat() { WantedPet = "Felguard"; return(new PrioritySelector( CreateEnsureTarget(), CreateMoveToAndFace(35f, ret => Me.CurrentTarget), CreateWaitForCast(true), CreateAutoAttack(true), CreateSpellBuffOnSelf("Soulburn", ret => SpellManager.HasSpell("Soul Fire") || Me.HealthPercent < 70), CreateSpellCast("Life Tap", ret => Me.ManaPercent < 50 && Me.HealthPercent > 70), new Decorator( ret => Me.CurrentTarget.Fleeing, CreateCastPetAction("Axe Toss")), new Decorator( ret => NearbyUnfriendlyUnits.Count > 1, CreateCastPetAction("Felstorm")), new Decorator( ret => CurrentTargetIsElite, new PrioritySelector( CreateSpellBuffOnSelf("Metamorphosis"), CreateSpellBuffOnSelf("Demon Soul"), CreateSpellCast("Immolation Aura", ret => Me.CurrentTarget.Distance < 5f), CreateSpellCast("Shadowflame", ret => Me.CurrentTarget.Distance < 5) )), CreateSpellBuff("Immolate", true), CreateSpellBuff("Curse of Tongues", ret => Me.CurrentTarget.PowerType == WoWPowerType.Mana), CreateSpellBuff("Curse of Weakness", ret => Me.CurrentTarget.PowerType != WoWPowerType.Mana), CreateSpellBuff("Bane of Doom", ret => CurrentTargetIsEliteOrBoss), CreateSpellBuff("Bane of Agony", ret => !Me.CurrentTarget.HasAura("Bane of Doom") && (Me.CurrentTarget.HealthPercent >= 30 || CurrentTargetIsEliteOrBoss)), // Use the infernal if we have a few mobs around us, and it's off CD. Otherwise, just use the Doomguard. // Its a 10min CD, with a 1-1.2min uptime on the minion. Hey, any extra DPS is fine in my book! // Make sure these 2 summons are AFTER the banes above. new Decorator( ret => NearbyUnfriendlyUnits.Count(u => u.Distance <= 10) > 2, CreateSpellCastOnLocation("Summon Infernal", ret => Me.CurrentTarget.Location) ), CreateSpellCast("Summon Doomguard"), CreateSpellBuff("Corruption", ret => Me.CurrentTarget.HealthPercent >= 30 || CurrentTargetIsElite), CreateSpellCast("Drain Life", ret => Me.HealthPercent < 70), CreateSpellCast("Health Funnel", ret => Me.GotAlivePet && Me.Pet.HealthPercent < 70), CreateSpellCast("Hand of Gul'dan"), // TODO: Make this cast Soulburn if it's available CreateSpellCast("Soul Fire", ret => Me.HasAura("Improved Soul Fire") || Me.HasAura("Soulburn")), CreateSpellCast("Soul Fire", ret => Me.HasAura("Decimation")), CreateSpellCast("Incinerate", ret => Me.HasAura("Molten Core")), CreateSpellCast("Shadow Bolt") )); }
public Composite CreateFireMageCombat() { return(new PrioritySelector( CreateEnsureTarget(), //Move away from frozen targets new Decorator( ret => Me.CurrentTarget.HasAura("Frost Nova") && Me.CurrentTarget.DistanceSqr < 5 * 5, new Action( ret => { Logger.Write("Getting away from frozen target"); WoWPoint moveTo = WoWMathHelper.CalculatePointFrom(Me.Location, Me.CurrentTarget.Location, 10f); if (Navigator.CanNavigateFully(Me.Location, moveTo)) { Navigator.MoveTo(moveTo); } })), // Make sure we're in range, and facing the damned target. (LOS check as well) CreateMoveToAndFace(39f, ret => Me.CurrentTarget), CreateSpellBuffOnSelf("Ice Block", ret => Me.HealthPercent < 10 && !Me.ActiveAuras.ContainsKey("Hypothermia")), new Decorator(ret => Me.ActiveAuras.ContainsKey("Ice Block"), new ActionIdle()), CreateSpellBuff("Frost Nova", ret => NearbyUnfriendlyUnits.Any(u => u.DistanceSqr <= 8 * 8)), CreateSpellCast("Evocation", ret => Me.ManaPercent < 20), new Decorator(ret => HaveManaGem() && Me.ManaPercent <= 30, new Action(ctx => UseManaGem())), CreateSpellBuffOnSelf("Mana Shield", ret => !Me.Auras.ContainsKey("Mana Shield") && Me.HealthPercent <= 75), CreateMagePolymorphOnAddBehavior(), CreateSpellCast("Counterspell", ret => Me.CurrentTarget.IsCasting), CreateSpellCast("Mirror Image", ret => Me.CurrentTarget.HealthPercent > 20), CreateSpellCast("Time Warp", ret => Me.CurrentTarget.HealthPercent > 20), new Decorator( ret => Me.CurrentTarget.HealthPercent > 50, new Sequence( new Action(ctx => Me.CurrentTarget.Face()), new Action(ctx => StyxWoW.SleepForLagDuration()), new PrioritySelector(CreateSpellCast("Flame Orb")) )), CreateSpellCast("Scorch", ret => (!Me.CurrentTarget.HasAura("Critical Mass") || Me.CurrentTarget.Auras["Critical Mass"].TimeLeft.TotalSeconds < 3) && TalentManager.GetCount(2, 20) != 0 && LastSpellCast != "Scorch"), CreateSpellCast("Pyroblast", ret => Me.ActiveAuras.ContainsKey("Hot Streak") && Me.ActiveAuras["Hot Streak"].TimeLeft.TotalSeconds > 1), CreateSpellCast("Fire Blast", ret => Me.ActiveAuras.ContainsKey("Impact")), CreateSpellBuff("Living Bomb", ret => !Me.CurrentTarget.HasAura("Living Bomb")), CreateSpellCast("Combustion", ret => Me.CurrentTarget.ActiveAuras.ContainsKey("Living Bomb") && Me.CurrentTarget.ActiveAuras.ContainsKey("Ignite") && Me.CurrentTarget.ActiveAuras.ContainsKey("Pyroblast!")), CreateSpellCast("Fireball"), CreateFireRangedWeapon() )); }
public Composite CreateArcaneMageCombat() { return(new PrioritySelector( CreateEnsureTarget(), //Move away from frozen targets new Decorator( ret => Me.CurrentTarget.HasAura("Frost Nova") && Me.CurrentTarget.DistanceSqr < 5 * 5, new Action( ret => { Logger.Write("Getting away from frozen target"); WoWPoint moveTo = WoWMathHelper.CalculatePointFrom(Me.Location, Me.CurrentTarget.Location, 10f); if (Navigator.CanNavigateFully(Me.Location, moveTo)) { Navigator.MoveTo(moveTo); } })), CreateMoveToAndFace(34f, ret => Me.CurrentTarget), CreateSpellBuffOnSelf("Ice Block", ret => Me.HealthPercent < 10 && !Me.ActiveAuras.ContainsKey("Hypothermia")), new Decorator(ret => Me.ActiveAuras.ContainsKey("Ice Block"), new ActionIdle()), CreateSpellBuff("Frost Nova", ret => NearbyUnfriendlyUnits.Any(u => u.DistanceSqr <= 8 * 8)), CreateWaitForCast(true), CreateSpellCast("Evocation", ret => Me.ManaPercent < 20), new Decorator(ret => HaveManaGem() && Me.ManaPercent <= 30, new Action(ctx => UseManaGem())), CreateMagePolymorphOnAddBehavior(), CreateSpellCast("Counterspell", ret => Me.CurrentTarget.IsCasting), CreateSpellCast("Mirror Image", ret => Me.CurrentTarget.HealthPercent > 20), CreateSpellCast("Time Warp", ret => Me.CurrentTarget.HealthPercent > 20), new Decorator( ret => Me.CurrentTarget.HealthPercent > 50, new Sequence( new Action(ctx => Me.CurrentTarget.Face()), new Action(ctx => StyxWoW.SleepForLagDuration()), new PrioritySelector(CreateSpellCast("Flame Orb")) )), CreateSpellBuffOnSelf("Mana Shield", ret => !Me.Auras.ContainsKey("Mana Shield") && Me.HealthPercent <= 75), CreateSpellCast("Slow", ret => TalentManager.GetCount(1, 18) < 2 && !Me.CurrentTarget.ActiveAuras.ContainsKey("Slow") && Me.CurrentTarget.Distance > 5), CreateSpellCast("Arcane Missiles", ret => Me.ActiveAuras.ContainsKey("Arcane Missiles!") && Me.ActiveAuras.ContainsKey("Arcane Blast") && Me.ActiveAuras["Arcane Blast"].StackCount >= 2), CreateSpellCast("Arcane Barrage", ret => Me.ActiveAuras.ContainsKey("Arcane Blast") && Me.ActiveAuras["Arcane Blast"].StackCount >= 3), CreateSpellBuffOnSelf("Presence of Mind"), CreateSpellCast("Arcane Blast"), CreateFireRangedWeapon() )); }
public Composite CreateBearTankCombat() { NeedTankTargeting = true; WantedDruidForm = ShapeshiftForm.Bear; return(new PrioritySelector( CreateEnsureTarget(), new Decorator( ret => Me.Shapeshift != WantedDruidForm, CreateSpellCast("Bear Form")), // Can we charge at the unit? If so... do it new Decorator( ret => SingularSettings.Instance.Druid.UseFeralChargeBear && Me.CurrentTarget.Distance > 8f && Me.CurrentTarget.Distance < 25f, CreateSpellCast("Feral Charge (Bear)")), CreateMoveToAndFace(4.5f, ret => Me.CurrentTarget), CreateAutoAttack(false), CreateSpellBuffOnSelf("Barkskin"), CreateSpellBuffOnSelf("Survival Instincts", ret => Me.HealthPercent < 60), CreateSpellBuffOnSelf("Frenzied Regeneration", ret => Me.HealthPercent < 30), CreateSpellCast("Skull Bash (Bear)", ret => Me.CurrentTarget.IsCasting), CreateSpellCast("Berserk", ret => CurrentTargetIsBoss), new Decorator( ret => NearbyUnfriendlyUnits.Count(u => u.DistanceSqr < 8 * 8) > 1, new PrioritySelector( CreateSpellBuffOnSelf("Berserk"), CreateSpellCast("Swipe (Bear)") )), CreateSpellCast("Maul", ret => Me.RagePercent >= 50), CreateSpellCast("Mangle (Bear)"), CreateSpellBuff("Demoralizing Roar"), // Thrash is a giant help in threat gen, so lets keep it on CD. Kthx. CreateSpellBuff("Thrash"), CreateSpellCast("Lacerate", ret => !HasAuraStacks("Lacerate", 3, Me.CurrentTarget)), CreateSpellCast( "Pulverize", ret => HasAuraStacks("Lacerate", 3, Me.CurrentTarget) && GetAuraTimeLeft("Pulverize", Me, true).TotalSeconds < 3), CreateSpellCast("Faerie Fire (Feral)"), // Lacerate is a filler, kthx. CreateSpellCast("Lacerate") )); }
public Composite CreateCombatRogueDefense() { return(new PrioritySelector( CreateMoveToAndFace(), new Decorator( ret => Me.CurrentTarget.IsCasting, new PrioritySelector( CreateSpellCast("Kick"), CreateSpellCast("Gouge"), CreateSpellCast("Cloak of Shadows"))), // Recuperate to keep us at high health //CreateSpellCast("Recuperate", ret => Me.HealthPercent < 50 && Me.RawComboPoints > 3), CreateSpellCast("Evasion", ret => NearbyUnfriendlyUnits.Count(u => u.DistanceSqr < 6 * 6) > 1 || Me.HealthPercent < 50), // Recuperate to not let us down //CreateSpellCast("Recuperate", ret => Me.HealthPercent < 20 && Me.RawComboPoints > 1), // Cloak of Shadows as really last resort CreateSpellCast("Cloak of Shadows", ret => Me.HealthPercent < 10) )); }
public Composite CreateProtectionWarriorCombat() { NeedTankTargeting = true; return (new PrioritySelector( CreateEnsureTarget(), // Note: this will make sure we charge at any unit within proper range. (Like an actual tank would) // We can cast Charge while in combat if we have the talent. [Notice that I am NOT checking for the talent!] // chargeSpell.CanCast should return false if we can't cast it. CreateSpellCast("Charge", ret => Me.CurrentTarget.Distance.Between(8f, TalentManager.HasGlyph("Long Charge") ? 30f : 25f)), CreateSpellCast("Intercept", ret => Me.CurrentTarget.Distance.Between(8f, 25f)), CreateMoveToAndFace(5f, ret => Me.CurrentTarget), CreateAutoAttack(true), CreateSpellCast("Heroic Strike", ret => Me.CurrentRage >= 60), CreateSpellCast("Revenge"), // If we have Blood and Thunder talented, then try and apply Rend via tclap. (This will apply rend to all targets!) CreateSpellCast( "Thunder Clap", ret => NearbyUnfriendlyUnits.Any(u => HasAuraStacks("Rend", 1, u)) && TalentManager.GetCount(3, 3) != 0), CreateSpellBuff("Rend"), // To be honest, we should be throwing this whenever its off CD. But we'll use it for the 20% hit speed debuff for now. CreateSpellCast("Thunder Clap"), new Decorator( ret => NearbyUnfriendlyUnits.Count(u => u.Distance < 6) > 2, new PrioritySelector( CreateSpellCast("War Stomp"), CreateSpellCast("Thunder Clap"), CreateSpellCast("Shockwave"), CreateSpellCast("Shield Block") )), CreateSpellCast("Victory Rush"), CreateSpellCast("Arcane Torrent", ret => Me.CurrentTarget.IsCasting), CreateSpellCast("Shield Bash", ret => Me.CurrentTarget.IsCasting), CreateSpellCast("Shield Slam"), CreateSpellBuff("Demoralizing Shout", ret => Me.CurrentRage > 30 && Me.CurrentTarget.HealthPercent > 30), // Get sunders up, Devastate if we have it (extra damage) or just plain Sunder. new Decorator( ret => !Me.CurrentTarget.HasAura("Sunder Armor") || Me.CurrentTarget.Auras["Sunder Armor"].StackCount < 3, new PrioritySelector( CreateSpellCast("Devastate"), CreateSpellCast("Sunder Armor"))) )); }
public Composite CreatePriestCommonCombatSpells() { return new PrioritySelector( // use our shadowfiend if we're in combat (so not on a pull or resting), if we're below the mana threshold, and our target is okydoky CreateSpellCast("Shadowfiend", ret => Me.Combat && Me.ManaPercent <= SingularSettings.Instance.Priest.ShadowfiendMana && Me.CurrentTarget != null && (Me.CurrentTarget.HealthPercent > 60 || NearbyUnfriendlyUnits.Count(u => u.Aggro) > 1)), // use hymn of hope if we're shielded or no one is targetting us CreateSpellCast("Hymn of Hope", ret => Me.ManaPercent < SingularSettings.Instance.Priest.HymnofHopeMana && (NearbyUnfriendlyUnits.Count(u => u.IsTargetingMeOrPet) <= 0 || HasAuraStacks("Power Word: Shield", 0))), // use archangel if we can CreateSpellBuff("Archangel", ret => (HasAuraStacks("Dark Evangelism", 5) || HasAuraStacks("Evangelism", 5)) && Me.ManaPercent <= SingularSettings.Instance.Priest.ArchangelMana), // cast psychic scream if it's on CreateSpellCast("Psychic Scream", ret => SingularSettings.Instance.Priest.UsePsychicScream && NearbyUnfriendlyUnits.Count(unit => unit.Aggro && unit.Distance <= 8) >= SingularSettings.Instance.Priest.PsychicScreamAddCount), new Decorator( ret => !StyxWoW.Me.Combat, CreateDefaultRestComposite(SingularSettings.Instance.DefaultRestHealth, SingularSettings.Instance.DefaultRestMana)) ); }
public Composite CreateFrostDeathKnightCombat() { return(new PrioritySelector( CreateEnsureTarget(), CreateAutoAttack(true), CreateFaceUnit(), // Note: You should have this in 2 different methods. Hence the reason for WoWContext being a [Flags] enum. // In this case, since its only one spell being changed, we can live with it. CreateSpellCast("Death Grip", ret => Me.CurrentTarget.Distance > 15 && !Me.IsInInstance), //Make sure we're in range, and facing the damned target. (LOS check as well) CreateMoveToAndFace(5f, ret => Me.CurrentTarget), CreateSpellCast("Raise Dead", ret => !Me.GotAlivePet), CreateSpellCast("Rune Strike"), CreateSpellCast("Mind Freeze", ret => Me.CurrentTarget.IsCasting || Me.CurrentTarget.ChanneledCastingSpellId != 0), CreateSpellCast("Strangulate", ret => Me.CurrentTarget.IsCasting || Me.CurrentTarget.ChanneledCastingSpellId != 0), CreateSpellCast("Death Strike", ret => Me.HealthPercent < 80), CreateSpellCast("Pillar of Frost"), CreateSpellCast("Howling Blast", ret => Me.HasAura("Freezing Fog") || !Me.CurrentTarget.HasAura("Frost Fever")), CreateSpellCast( "Pestilence", ret => Me.CurrentTarget.HasAura("Blood Plague") && Me.CurrentTarget.HasAura("Frost Fever") && (from add in NearbyUnfriendlyUnits where !add.HasAura("Blood Plague") && !add.HasAura("Frost Fever") && add.Distance < 10 select add).Count() > 0), new Decorator( ret => SpellManager.CanCast("Death and Decay") && NearbyUnfriendlyUnits.Count(a => a.Distance < 8) > 1, new Action( ret => { SpellManager.Cast("Death and Decay"); LegacySpellManager.ClickRemoteLocation(Me.CurrentTarget.Location); })), CreateSpellCast("Outbreak", ret => Me.CurrentTarget.HasAura("Frost Fever") || Me.CurrentTarget.HasAura("Blood Plague")), CreateSpellCast("Plague Strike", ret => !Me.CurrentTarget.HasAura("Blood Plague")), CreateSpellCast( "Obliterate", ret => (Me.FrostRuneCount == 2 && Me.UnholyRuneCount == 2) || Me.DeathRuneCount == 2 || Me.HasAura("Killing Machine")), CreateSpellCast("Blood Strike", ret => Me.BloodRuneCount == 2), CreateSpellCast("Frost Strike", ret => Me.HasAura("Freezing Fog") || Me.CurrentRunicPower == Me.MaxRunicPower), CreateSpellCast("Blood Tap", ret => Me.BloodRuneCount < 2), CreateSpellCast("Obliterate"), CreateSpellCast("Blood Strike"), CreateSpellCast("Frost Strike"))); }
public Composite CreateUnholyDeathKnightCombat() { return(new PrioritySelector( CreateEnsureTarget(), CreateAutoAttack(true), CreateFaceUnit(), // Note: You should have this in 2 different methods. Hence the reason for WoWContext being a [Flags] enum. // In this case, since its only one spell being changed, we can live with it. CreateSpellCast("Death Grip", ret => Me.CurrentTarget.Distance > 15 && !Me.IsInInstance), //Make sure we're in range, and facing the damned target. (LOS check as well) CreateMoveToAndFace(5f, ret => Me.CurrentTarget), CreateSpellCast("Raise Dead", ret => !Me.GotAlivePet), CreateSpellCast("Rune Strike"), CreateSpellCast("Mind Freeze", ret => Me.CurrentTarget.IsCasting || Me.CurrentTarget.ChanneledCastingSpellId != 0), CreateSpellCast("Strangulate", ret => Me.CurrentTarget.IsCasting || Me.CurrentTarget.ChanneledCastingSpellId != 0), CreateSpellCast("Unholy Frenzy", ret => Me.HealthPercent >= 80), CreateSpellCast("Death Strike", ret => Me.HealthPercent < 80), CreateSpellCast("Outbreak", ret => Me.CurrentTarget.HasAura("Frost Fever") || Me.CurrentTarget.HasAura("Blood Plague")), CreateSpellCast("Icy Touch"), CreateSpellCast("Plague Strike", ret => !Me.CurrentTarget.HasAura("Blood Plague")), CreateSpellCast( "Pestilence", ret => Me.CurrentTarget.HasAura("Blood Plague") && Me.CurrentTarget.HasAura("Frost Fever") && (NearbyUnfriendlyUnits.Where( add => !add.HasAura("Blood Plague") && !add.HasAura("Frost Fever") && add.Distance < 10)).Count() > 0), new Decorator( ret => SpellManager.CanCast("Death and Decay") && NearbyUnfriendlyUnits.Count(a => a.Distance < 8) > 1, new Action( ret => { SpellManager.Cast("Death and Decay"); LegacySpellManager.ClickRemoteLocation(Me.CurrentTarget.Location); })), CreateSpellCast("Summon Gargoyle"), CreateSpellCast("Dark Transformation", ret => Me.GotAlivePet && !Me.Pet.ActiveAuras.ContainsKey("Dark Transformation")), CreateSpellCast("Scourge Strike", ret => Me.BloodRuneCount == 2 && Me.FrostRuneCount == 2), CreateSpellCast("Festering Strike", ret => Me.BloodRuneCount == 2 && Me.FrostRuneCount == 2), CreateSpellCast("Death Coil", ret => Me.ActiveAuras.ContainsKey("Sudden Doom") || Me.CurrentRunicPower >= 80), CreateSpellCast("Scourge Strike"), CreateSpellCast("Festering Strike"), CreateSpellCast("Death Coil"))); }
public Composite CreateBloodDeathKnightCombat() { NeedTankTargeting = true; return(new PrioritySelector( CreateEnsureTarget(), CreateAutoAttack(true), CreateFaceUnit(), // Blood DKs are tanks. NOT DPS. If you're DPSing as blood, go respec right now, because you fail hard. // Death Grip is used at all times in this spec, so don't bother with an instance check, like the other 2 specs. CreateSpellCast("Death Grip", ret => Me.CurrentTarget.Distance > 15), //Make sure we're in range, and facing the damned target. (LOS check as well) CreateMoveToAndFace(5f, ret => Me.CurrentTarget), CreateSpellBuffOnSelf("Bone Shield"), CreateSpellCast("Rune Strike"), CreateSpellCast("Mind Freeze", ret => Me.CurrentTarget.IsCasting || Me.CurrentTarget.ChanneledCastingSpellId != 0), CreateSpellCast("Strangulate", ret => Me.CurrentTarget.IsCasting || Me.CurrentTarget.ChanneledCastingSpellId != 0), CreateSpellBuffOnSelf("Rune Tap", ret => Me.HealthPercent <= 60), CreateSpellCast( "Pestilence", ret => Me.CurrentTarget.HasAura("Blood Plague") && Me.CurrentTarget.HasAura("Frost Fever") && (from add in NearbyUnfriendlyUnits where !add.HasAura("Blood Plague") && !add.HasAura("Frost Fever") && add.Distance < 10 select add).Count() > 0), new Decorator( ret => SpellManager.CanCast("Death and Decay") && NearbyUnfriendlyUnits.Count(a => a.Distance < 8) > 1, new Action( ret => { SpellManager.Cast("Death and Decay"); LegacySpellManager.ClickRemoteLocation(Me.CurrentTarget.Location); })), CreateSpellCast("Icy Touch"), CreateSpellCast("Plague Strike", ret => !Me.CurrentTarget.HasAura("Blood Plague")), CreateSpellCast("Death Strike", ret => Me.HealthPercent < 80), CreateSpellCast("Blood Boil", ret => NearbyUnfriendlyUnits.Count(a => a.Distance < 8) > 1), CreateSpellCast("Heart Strike"), CreateSpellCast("Death Coil"))); }
public Composite CreateShadowPriestCombat() { return(new PrioritySelector( // targetting behaviours CreateEnsureTarget(), CreateMoveToAndFace(30, ret => Me.CurrentTarget), CreateWaitForCast(true), // cast devouring plague first if option is set CreateSpellBuff("Devouring Plague", ret => SingularSettings.Instance.Priest.DevouringPlageuFirst, true), // don't attempt to heal unless below a certain percentage health new Decorator(ret => Me.HealthPercent < SingularSettings.Instance.Priest.DontHealPercent, CreateDiscHealOnlyBehavior(true)), // always try to be in shadow form, but not if we're below the above health % (stops in and out shadowform spam) CreateSpellBuffOnSelf("Shadowform", ret => SingularSettings.Instance.Priest.DontShadowFormHealth && Me.HealthPercent < SingularSettings.Instance.Priest.DontHealPercent), // finish the guy off first if we can CreateSpellCast("Shadow Word: Death", ret => Me.CurrentTarget.HealthPercent < 25, false), // if we've got 2+ unfriendly units beating on us, psychic horror on one CreateSpellCast("Psychic Horror", ret => SingularSettings.Instance.Priest.UsePsychicHorrorAdds && NearbyUnfriendlyUnits.Count(unit => unit.Aggro && CanCast("Psychic Horror", unit, false)) >= 2, ret => NearbyUnfriendlyUnits.FirstOrDefault(unit => Me.CurrentTargetGuid != unit.Guid && unit.Aggro && CanCast("Psychic Horror", unit, false)), false), // stop person casting CreateSpellCast("Silence", ret => Me.CurrentTarget.IsCasting || Me.CurrentTarget.CastingSpell != null, false), CreateSpellCast("Psychic Horror", ret => SingularSettings.Instance.Priest.UsePsychicHorrorInterrupt && Me.CurrentTarget.IsCasting || Me.CurrentTarget.CastingSpell != null), // use dispersion if we can CreateSpellCast("Dispersion", ret => Me.ManaPercent < SingularSettings.Instance.Priest.DispersionMana, false), new Decorator(ret => HasAuraStacks("Dispersion", 0), new ActionAlwaysSucceed()), CreateSpellCast("Archangel", ret => SingularSettings.Instance.Priest.AlwaysArchangel5 && HasAuraStacks("Dark Evangelism", 5)), // open with spike or if its a totem CreateSpellCast("Mind Spike", ret => !HasMyAura("Mind Trauma", Me.CurrentTarget, 0) && (Me.CurrentTarget.CreatureType == Styx.WoWCreatureType.Totem || !Me.Combat), true), // use mind blast after 2+ spikes, or if orbs, CreateSpellCast("Mind Blast", ret => HasMyAura("Mind Spike", Me.CurrentTarget, 2)), // use spike a second time if we can, either after pull or after dots have run out for whatever reason CreateSpellCast("Mind Spike", ret => !HasMyAura("Mind Trauma", Me.CurrentTarget, 0) && !HasMyAura("Vampiric Touch", Me.CurrentTarget) && !HasMyAura("Devouring Plague", Me.CurrentTarget) && !HasMyAura("Shadow Word: Pain", Me.CurrentTarget)), // start up with the dots CreateSpellBuff("Vampiric Touch", true), CreateSpellBuff("Devouring Plague"), CreateSpellBuff("Shadow Word: Pain"), // blast for shadow orbs or timer new Decorator(ret => ((HasAuraStacks("Shadow Orb", SingularSettings.Instance.Priest.MindBlastOrbs) && !HasAuraStacks("Empowered Shadow", 0)) || _lastMindBlast + TimeSpan.FromSeconds(SingularSettings.Instance.Priest.MindBlastTimer) < DateTime.Now), new Sequence( new Action(ret => _lastMindBlast = DateTime.Now), CreateSpellCast("Mind Blast"))), // attempt to cast shield before flay, if we need to CreateSpellBuffOnSelf("Power Word: Shield", ret => !HasAuraStacks("Weakened Soul", 0) && NearbyUnfriendlyUnits.Count(u => u.CurrentTargetGuid == Me.Guid) > 0), // flay if we have shield or if no one's beating on us CreateSpellCast("Mind Flay", ret => !Me.IsMoving && (NearbyUnfriendlyUnits.Count(u => u.CurrentTargetGuid == Me.Guid) <= 0 || HasAuraStacks("Power Word: Shield", 0))), // maybe try a spike if there's none of our dots on it CreateSpellCast("Mind Spike", ret => !HasMyAura("Vampiric Touch", Me.CurrentTarget) && !HasMyAura("Devouring Plague", Me.CurrentTarget) && !HasMyAura("Shadow Word: Pain", Me.CurrentTarget)), // finally, no mana?, try to use archangel if we have _any_ stacks of evangelism CreateSpellCast("Archangel", ret => HasAuraStacks("Dark Evangelism", 0) && Me.ManaPercent <= SingularSettings.Instance.Priest.ArchangelMana), // try to do _something_ CreateSpellCast("Mind Blast"), // use wand CreateUseWand(ret => SingularSettings.Instance.Priest.UseWand) )); }
public Composite CreateAfflictionCombat() { WantedPet = "Succubus"; return(new PrioritySelector( CreateEnsureTarget(), //CreateLosAndFace(ret => Me.CurrentTarget), CreateMoveToAndFace(35f, ret => Me.CurrentTarget), CreateWaitForCast(), CreateAutoAttack(true), // Emergencies new Decorator( ret => Me.HealthPercent < 20, new PrioritySelector( //CreateSpellBuff("Fear", ret => !Me.CurrentTarget.HasAura("Fear")), CreateSpellCast("Howl of Terror", ret => Me.CurrentTarget.Distance < 10 && Me.CurrentTarget.IsPlayer), CreateSpellCast("Death Coil", ret => !Me.CurrentTarget.HasAura("Howl of Terror") && !Me.CurrentTarget.HasAura("Fear")), CreateSpellBuffOnSelf("Soulburn", ret => Me.CurrentSoulShards > 0), CreateSpellCast("Drain Life") )), CreateSpellCast("Life Tap", ret => Me.ManaPercent < 10), CreateSpellCast("Health Funnel", ret => Me.GotAlivePet && Me.Pet.HealthPercent < 30), // Finishing sequence CreateSpellCast( "Soul Swap", ret => !Me.HasAura("Soul Swap") && Me.CurrentTarget.HealthPercent < 10 && Me.CurrentTarget.HasAura("Unstable Affliction") && !CurrentTargetIsEliteOrBoss), CreateSpellCast("Drain Soul", ret => Me.CurrentTarget.HealthPercent < 10), // Elites new Decorator( ret => CurrentTargetIsEliteOrBoss, new PrioritySelector( CreateSpellBuffOnSelf("Demon Soul"), CreateSpellBuff("Curse of Elements", ret => !Me.CurrentTarget.HasAura("Curse of Elements")), new Decorator( ret => SpellManager.CanCast("Summon Infernal"), new Action( ret => { SpellManager.Cast("Summon Infernal"); LegacySpellManager.ClickRemoteLocation(Me.CurrentTarget.Location); })) )), // AoE new Decorator( ret => NearbyUnfriendlyUnits.Count(u => u.Distance < 15) >= 5, new PrioritySelector( CreateSpellBuffOnSelf("Demon Soul"), CreateSpellBuffOnSelf( "Soulburn", ret => !Me.CurrentTarget.HasAura("Seed of Corruption") && Me.CurrentSoulShards > 0 && TalentManager.GetCount(1, 15) == 1), CreateSpellBuff("Seed of Corruption", ret => !Me.CurrentTarget.HasAura("Seed of Corruption")) )), // Standard Nuking CreateSpellCast("Shadow Bolt", ret => Me.HasAura("Shadow Trance")), CreateSpellBuff("Haunt"), CreateSpellCast("Soul Swap", ret => Me.HasAura("Soul Swap") && Me.CurrentTarget.HealthPercent > 10), CreateSpellBuff("Bane of Doom", ret => CurrentTargetIsEliteOrBoss && !Me.CurrentTarget.HasAura("Bane of Doom")), CreateSpellBuff("Bane of Agony", ret => !Me.CurrentTarget.HasAura("Bane of Agony") && !Me.CurrentTarget.HasAura("Bane of Doom")), CreateSpellBuff("Corruption", ret => !Me.CurrentTarget.HasAura("Corruption") && !Me.CurrentTarget.HasAura("Seed of Corruption")), CreateSpellBuff("Unstable Affliction", ret => !Me.CurrentTarget.HasAura("Unstable Affliction")), CreateSpellCast("Drain Soul", ret => Me.CurrentTarget.HealthPercent < 25), CreateSpellCast("Shadowflame", ret => Me.CurrentTarget.Distance < 5), CreateSpellBuffOnSelf("Demon Soul"), CreateSpellBuff("Curse of Weakness", ret => Me.CurrentTarget.IsPlayer && !Me.CurrentTarget.HasAura("Curse of Weakness")), CreateSpellCast("Life Tap", ret => Me.ManaPercent < 50 && Me.HealthPercent > 70), CreateSpellCast("Drain Life", ret => Me.HealthPercent < 70), CreateSpellCast("Health Funnel", ret => Me.GotAlivePet && Me.Pet.HealthPercent < 70), CreateSpellCast("Shadow Bolt") )); }
public Composite CreateRogueCombatBuffs() { return(new PrioritySelector( CreateUsePotionAndHealthstone(30, 0), CreateSpellBuffOnSelf("Vanish", ret => Me.HealthPercent < 20 && NearbyUnfriendlyUnits.Count(u => u.Aggro) > 0) )); }
public Composite CreateRetributionPaladinCombat() { return (new PrioritySelector( CreateEnsureTarget(), CreateAutoAttack(true), //mele CreateMoveToAndFace(5f, ret => Me.CurrentTarget), CreateRetributionPaladinCombatBuffs(), CreateFaceUnit(ret => Me.CurrentTarget), //Interrupts new Decorator( ret => Me.CurrentTarget.IsCasting, new PrioritySelector( //Rebuke ID = 96231 CreateSpellCast(96231), // Calling Rebuke by name FAILS!!!!!!!!!!! sigh :( //CreateSpellCast("Rebuke", ret => Me.CurrentTarget.IsCasting || Me.CurrentTarget.ChanneledCastingSpellId != null), CreateSpellCast("Hammer of Justice"), CreateSpellCast("Arcane Torrent") )), // Zealotry Routine new Decorator( ret => Me.HasAura("Zealotry"), new PrioritySelector( CreateSpellBuffOnSelf("Inquisition", ret => Me.CurrentHolyPower > 1), CreateSpellCast("Hammer of Wrath"), CreateSpellCast("Exorcism", ret => Me.ActiveAuras.ContainsKey("The Art of War")), CreateSpellCast("Templar's Verdict", ret => Me.CurrentHolyPower > 2 || Me.ActiveAuras.ContainsKey("Hand of Light")), CreateSpellCast("Judgement"), CreateSpellCast("Crusader Strike", ret => Me.CurrentHolyPower < 3) )), // AoE Routine - I know the EJ guide says at 5 but I put it to 3 mainly for dungeons. new Decorator( ret => NearbyUnfriendlyUnits.Count(u => u.Distance < 8) >= 3, new PrioritySelector( CreateSpellBuffOnSelf("Inquisition", ret => Me.CurrentHolyPower > 1), CreateSpellCast("Divine Storm", ret => Me.CurrentHolyPower < 3), CreateSpellCast("Hammer of Wrath"), CreateSpellCast("Exorcism", ret => Me.ActiveAuras.ContainsKey("The Art of War")), CreateSpellCast("Templar's Verdict", ret => Me.CurrentHolyPower > 2 || Me.ActiveAuras.ContainsKey("Hand of Light")), CreateSpellCast("Judgement"), CreateSpellCast("Consecration", ret => Me.ManaPercent > 50), CreateSpellCast("Holy Wrath", ret => Me.ManaPercent > 50) )), // Undead Routine new Decorator( ret => CurrentTargetIsUndeadOrDemon, new PrioritySelector( CreateSpellBuffOnSelf("Inquisition", ret => Me.CurrentHolyPower > 1), CreateSpellCast("Crusader Strike", ret => Me.CurrentHolyPower < 3 && NearbyUnfriendlyUnits.Count(u => u.Distance < 8) < 2), CreateSpellCast("Divine Storm", ret => Me.CurrentHolyPower < 3 && NearbyUnfriendlyUnits.Count(u => u.Distance < 8) > 2), CreateSpellCast("Exorcism", ret => Me.ActiveAuras.ContainsKey("The Art of War")), CreateSpellCast("Hammer of Wrath"), CreateSpellCast("Templar's Verdict", ret => Me.CurrentHolyPower > 2 || Me.ActiveAuras.ContainsKey("Hand of Light")), CreateSpellCast("Judgement"), CreateSpellCast("Holy Wrath", ret => Me.ManaPercent > 50), CreateSpellCast("Consecration", ret => Me.ManaPercent > 50) )), // Single Routine - See AoE notes. new Decorator( ret => NearbyUnfriendlyUnits.Count(u => u.Distance < 8) < 3, new PrioritySelector( CreateSpellBuffOnSelf("Inquisition", ret => Me.CurrentHolyPower > 1), CreateSpellCast("Crusader Strike", ret => Me.CurrentHolyPower < 3), CreateSpellCast("Hammer of Wrath"), CreateSpellCast("Exorcism", ret => Me.ActiveAuras.ContainsKey("The Art of War")), CreateSpellCast("Templar's Verdict", ret => Me.CurrentHolyPower > 2 || Me.ActiveAuras.ContainsKey("Hand of Light")), CreateSpellCast("Judgement"), CreateSpellCast("Holy Wrath", ret => Me.ManaPercent > 50), CreateSpellCast("Consecration", ret => Me.ManaPercent > 50) )), //Bot Control CreateMoveToAndFace(5f, ret => Me.CurrentTarget) // to check it was routine prioritizing correctly or just a general logger due to all the green spell spam that is by default :( //new Action(delegate // { // Logger.Write("-- END -- "); // } // ) )); }
public Composite CreateArmsWarriorCombat() { return(new PrioritySelector( // Make sure we have target CreateEnsureTarget(), // Face target CreateFaceUnit(), //Make sure were attacking CreateAutoAttack(true), // Ranged interupt on players CreateSpellCast( "Intimidating Shout", ret => Me.CurrentTarget.Distance < 8 && Me.CurrentTarget.IsPlayer && Me.CurrentTarget.IsCasting), // Dispel Bubbles CreateSpellCast( "Shattering Throw", ret => Me.CurrentTarget.IsPlayer && (Me.CurrentTarget.HasAura("Ice Block") || Me.CurrentTarget.HasAura("Hand of Protection") || Me.CurrentTarget.HasAura("Divine Shield"))), // close gap CreateArmsCloseGap(), //Rocket belt! new Decorator( ret => Me.CurrentTarget.IsPlayer && Me.CurrentTarget.Distance > 20, new PrioritySelector( CreateUseEquippedItem(10) )), // ranged slow CreateSpellCast( "Piercing Howl", ret => Me.CurrentTarget.Distance < 10 && Me.CurrentTarget.IsPlayer && (!Me.CurrentTarget.HasAura("Hamstring") || !Me.CurrentTarget.HasAura("Piercing Howl") || !Me.CurrentTarget.HasAura("Slowing Poison") || !Me.CurrentTarget.HasAura("Hand of Freedom"))), //Move to melee CreateMoveToAndFace(ret => Me.CurrentTarget), //use it or lose it CreateSpellCast("Colossus Smash", ret => Me.HasAura("Sudden Death")), // Mele slow CreateSpellCast( "Hamstring", ret => Me.CurrentTarget.IsPlayer && (!Me.CurrentTarget.HasAura("Hamstring") || !Me.CurrentTarget.HasAura("Piercing Howl") || !Me.CurrentTarget.HasAura("Slowing Poison") || !Me.CurrentTarget.HasAura("Hand of Freedom"))), // slow runners new Decorator( ret => Me.CurrentTarget.IsPlayerBehind && !Me.IsInInstance && !Me.CurrentTarget.HasAura("Hamstring"), new PrioritySelector( CreateSpellCast("Hamstring"))), // AOE new Decorator( ret => NearbyUnfriendlyUnits.Count(u => u.Distance < 6) > 3, new PrioritySelector( CreateSpellCast("Rend", ret => !Me.CurrentTarget.HasAura("Rend")), CreateSpellCast("Thunderclap"), CreateSpellCast("Sweeping Strikes"), CreateSpellCast("Bladestorm"), CreateSpellCast("Retaliation"), CreateSpellCast("Cleave") )), // Fury of angerforge new Decorator( ret => HasAuraStacks("Raw Fury", 5) && StyxWoW.Me.Inventory.Equipped.Trinket1 != null && StyxWoW.Me.Inventory.Equipped.Trinket1.Name.Contains("Fury of Angerforge") && StyxWoW.Me.Inventory.Equipped.Trinket1.Cooldown <= 0, new Action( ret => { StyxWoW.Me.Inventory.Equipped.Trinket1.Use(); })), new Decorator( ret => HasAuraStacks("Raw Fury", 5) && StyxWoW.Me.Inventory.Equipped.Trinket2 != null && StyxWoW.Me.Inventory.Equipped.Trinket2.Name.Contains("Fury of Angerforge") && StyxWoW.Me.Inventory.Equipped.Trinket2.Cooldown <= 0, new Action( ret => { StyxWoW.Me.Inventory.Equipped.Trinket2.Use(); })), //Mele Heal CreateSpellCast("Victory Rush", ret => Me.HealthPercent < 80), //Interupts CreateSpellCast( "Pummel", ret => Me.CurrentTarget.IsCasting || Me.CurrentTarget.ChanneledCastingSpellId != 0), CreateSpellCast( "Arcane Torrent", ret => Me.CurrentTarget.IsCasting || Me.CurrentTarget.ChanneledCastingSpellId != 0), CreateSpellCast( "War Stomp", ret => Me.CurrentTarget.IsCasting || Me.CurrentTarget.ChanneledCastingSpellId != 0), //Interupt / Stun elite / knockdown player CreateSpellCast( "Throwdown", ret => CurrentTargetIsElite || Me.CurrentTarget.IsPlayer || Me.CurrentTarget.IsCasting), //Rage Dump CreateSpellCast( "Heroic Strike", ret => Me.RagePercent > 75 || HasAuraStacks("Incite", 1)), //Use Engineering Gloves CreateUseEquippedItem(9), //Execute under 20% CreateSpellCast("Execute", ret => Me.CurrentTarget.HealthPercent < 20), //Default Rotatiom CreateSpellCast("Rend", ret => !Me.CurrentTarget.HasAura("Rend")), CreateSpellCast("Colossus Smash"), CreateSpellCast("Mortal Strike"), //Bladestorm after dots and MS if against player CreateSpellCast("Bladestorm", ret => Me.CurrentTarget.IsPlayer), CreateSpellCast("Overpower", ret => !HasAuraStacks("Overpower", 1)), CreateSpellCast("Slam", ret => Me.RagePercent > 30), //ensure were in melee CreateMoveToAndFace(5f, ret => Me.CurrentTarget) )); }
public Composite CreateFeralCatCombat() { // Get us in cat form pl0x WantedDruidForm = ShapeshiftForm.Cat; return(new PrioritySelector( // Make sure we're in cat form first, period. new Decorator( ret => Me.Shapeshift != WantedDruidForm, CreateSpellCast("Cat Form")), CreateEnsureTarget(), CreateSpellBuffOnSelf("Rejuvenation", ret => !Me.IsInParty && !Me.IsInRaid && Me.HealthPercent < 60), CreateSpellCast("Berserk", ret => Me.Fleeing), CreateSpellCast("Survival Instincts", ret => Me.HealthPercent <= 45), CreateFaceUnit(), CreateAutoAttack(false), CreateSpellCast("Feral Charge (Cat)", ret => Me.CurrentTarget.Distance >= 8 && Me.CurrentTarget.Distance <= 25), CreateSpellCast("Skull Bash (Cat)", ret => Me.CurrentTarget.IsCasting), // Kudos to regecksqt for the dash/stampeding roar logic. Slightly changed for reading purposes. new Decorator( ret => Me.CurrentTarget.Distance > 5 && Me.Combat && !Me.CurrentTarget.IsSafelyFacing(Me.Location) && Me.CurrentTarget.IsMoving && Me.CurrentTarget.MovementInfo.RunSpeed > Me.MovementInfo.RunSpeed, new PrioritySelector( CreateSpellCast("Dash"), CreateSpellCast("Stampeding Roar (Cat)", ret => Me.CurrentEnergy >= 50))), new Decorator( ret => Me.CurrentTarget.Distance <= 5, new PrioritySelector( //new Decorator( // ret => StyxWoW.Me.IsMoving, // // We use the player mover, since people can override it. This lets us support their stuff. // new Action(ret => Navigator.PlayerMover.MoveStop())), CreateSpellCast("Barkskin", ret => NearbyUnfriendlyUnits.Count(u => u.Distance < 5) > 0), CreateSpellCast("Tiger's Fury", ret => Me.CurrentEnergy <= 50), new Decorator( ret => Me.ComboPoints == 5 || Me.ComboPoints > 2 && Me.CurrentTarget.HealthPercent < 40 && !CurrentTargetIsElite, new PrioritySelector( CreateSpellBuffOnSelf("Savage Roar", ret => Me.HealthPercent >= 75), CreateSpellCast("Maim", ret => !Me.CurrentTarget.Stunned), CreateSpellCast( "Rip", ret => !Me.CurrentTarget.HasAura("Rip") || Me.CurrentTarget.GetAuraByName("Rip").CreatorGuid != Me.Guid), CreateSpellCast("Ferocious Bite"))), // Handle Ravage! proc. Cast from spell ID here. Ignore the SpellManager! new Decorator( ret => /*IsBehind(Me.CurrentTarget) &&*/ Me.HasAura("Stampede"), new Action(a => WoWSpell.FromId(81170).Cast())), new Decorator( ret => !Me.CurrentTarget.HasAura("Mangle") && SpellManager.CanCast("Mangle (Cat)"), new Action(ret => SpellManager.Cast("Mangle (Cat)"))), CreateSpellCast( "Rake", ret => !Me.CurrentTarget.HasAura("Rake") || Me.CurrentTarget.GetAuraByName("Rake").CreatorGuid != Me.Guid), CreateSpellCast("Shred", ret => Me.IsBehind(Me.CurrentTarget)), // Don't swipe if we don't have more than 2 people/mobs on us, within range. CreateSpellCast("Swipe (Cat)", ret => NearbyUnfriendlyUnits.Count(u => u.DistanceSqr <= 5 * 5) >= 2), //new ActionLog("Mangle"), CreateSpellCast("Mangle (Cat)"))), CreateSpellBuff("Faerie Fire (Feral)", ret => !Me.HasAura("Prowl")), // We're putting movement at the bottom. Since we want the stuff above, to happen first. If we're out of range, we'll automatically fall // back to here and get within melee range to f**k shit up. CreateMoveToAndFace(4, ret => Me.CurrentTarget) )); }
public Composite CreateFrostMageCombat() { WantedPet = "Water Elemental"; return(new PrioritySelector( CreateEnsureTarget(), //Move away from frozen targets new Decorator( ret => (Me.CurrentTarget.HasAura("Frost Nova") || Me.CurrentTarget.HasAura("Freeze")) && Me.CurrentTarget.DistanceSqr < 5 * 5, new Action( ret => { Logger.Write("Getting away from frozen target"); WoWPoint moveTo = WoWMathHelper.CalculatePointFrom(Me.Location, Me.CurrentTarget.Location, 10f); if (Navigator.CanNavigateFully(Me.Location, moveTo)) { Navigator.MoveTo(moveTo); } })), CreateMoveToAndFace(34f, ret => Me.CurrentTarget), CreateWaitForCast(true), CreateCastPetActionOnLocation("Freeze", ret => !Me.CurrentTarget.HasAura("Frost Nova")), CreateSpellBuff("Frost Nova", ret => NearbyUnfriendlyUnits.Any(u => u.DistanceSqr <= 8 * 8)), CreateMagePolymorphOnAddBehavior(), new Decorator( ret => !Me.GotAlivePet, new Action(ret => PetManager.CallPet(WantedPet))), CreateSpellCast("Evocation", ret => Me.ManaPercent < 20), CreateSpellCast("Counterspell", ret => Me.CurrentTarget.IsCasting), CreateSpellCast("Mirror Image"), CreateSpellCast("Time Warp"), new Decorator( ret => Me.CurrentTarget.HealthPercent > 50, new Sequence( new Action(ctx => Me.CurrentTarget.Face()), new Action(ctx => StyxWoW.SleepForLagDuration()), new PrioritySelector(CreateSpellCast("Flame Orb")) )), CreateSpellBuffOnSelf("Ice Barrier", ret => !Me.Auras.ContainsKey("Mana Shield")), CreateSpellBuffOnSelf("Mana Shield", ret => !Me.Auras.ContainsKey("Ice Barrier") && Me.HealthPercent <= 50), CreateSpellCast( "Deep Freeze", ret => (Me.ActiveAuras.ContainsKey("Fingers of Frost") || Me.CurrentTarget.HasAura("Frost Nova") || Me.CurrentTarget.HasAura("Freeze"))), CreateSpellCast( "Ice Lance", ret => (Me.ActiveAuras.ContainsKey("Fingers of Frost") || Me.CurrentTarget.ActiveAuras.ContainsKey("Frost Nova") || Me.CurrentTarget.ActiveAuras.ContainsKey("Freeze"))), //CreateSpellCast("Fireball", Me.ActiveAuras.ContainsKey("Brain Freeze")), CreateSpellCast("Arcane Missiles", ret => Me.ActiveAuras.ContainsKey("Arcane Missiles!")), new Decorator( ret => Me.ActiveAuras.ContainsKey("Brain Freeze"), new PrioritySelector( CreateSpellCast("Frostfire Bolt"), CreateSpellCast("Fireball") )), CreateSpellBuff("Fire Blast", ret => Me.CurrentTarget.HealthPercent < 10), CreateSpellCast("Frostbolt") )); }
public Composite CreateWarriorFuryCombat() { return(new PrioritySelector( // Make sure you have target CreateEnsureTarget(), //Face target if not facing already CreateFaceUnit(), //autoattack CreateAutoAttack(true), //low level support new Decorator( ret => Me.Level < 30, new PrioritySelector( CreateSpellCast("Charge"), CreateSpellCast("Victory Rush"), CreateSpellCast("Rend", ret => !Me.CurrentTarget.HasAura("Rend")), CreateSpellCast("Bloodthirst"), CreateMoveToAndFace(ret => Me.CurrentTarget))), //30-50 support CreateSpellBuffOnSelf("Berserker Stance", ret => Me.Level > 30 && Me.Level < 50), //Ranged Attack if pvping CreateSpellCast("Heroic Throw", ret => Me.CurrentTarget.IsPlayer), //Use fear to interupt casters at range CreateSpellCast( "Intimidating Shout", ret => Me.CurrentTarget.Distance < 8 && Me.CurrentTarget.IsPlayer && Me.CurrentTarget.IsCasting), //Close Gap to target CreateFuryCloseGap(), //Rocket belt! new Decorator( ret => Me.CurrentTarget.IsPlayer && Me.CurrentTarget.Distance > 20, new PrioritySelector( CreateUseEquippedItem(10) )), //Slow Players at range CreateSpellCast( "Piercing Howl", ret => Me.CurrentTarget.Distance < 10 && Me.CurrentTarget.IsPlayer && (!Me.CurrentTarget.HasAura("Hamstring") || !Me.CurrentTarget.HasAura("Piercing Howl") || !Me.CurrentTarget.HasAura("Slowing Poison") || !Me.CurrentTarget.HasAura("Hand of Freedom"))), //Move to melee CreateMoveToAndFace(), //Slow Players once in mele range CreateSpellCast( "Hamstring", ret => Me.CurrentTarget.IsPlayer && (!Me.CurrentTarget.HasAura("Hamstring") || !Me.CurrentTarget.HasAura("Piercing Howl") || !Me.CurrentTarget.HasAura("Slowing Poison") || !Me.CurrentTarget.HasAura("Hand of Freedom"))), // slow runners new Decorator( ret => Me.CurrentTarget.IsPlayerBehind && !Me.IsInInstance && !Me.CurrentTarget.HasAura("Hamstring"), new PrioritySelector( CreateSpellCast("Hamstring"))), //Aoe when more than 3 around new Decorator( ret => NearbyUnfriendlyUnits.Count(u => u.Distance < 6) > 3, new PrioritySelector( CreateSpellCast("Cleave"), CreateSpellCast("Whirlwind"), CreateSpellCast("Raging Blow"), CreateSpellCast("Bloodthirst") )), // Fury of angerforge new Decorator( ret => HasAuraStacks("Raw Fury", 5) && StyxWoW.Me.Inventory.Equipped.Trinket1 != null && StyxWoW.Me.Inventory.Equipped.Trinket1.Name.Contains("Fury of Angerforge") && StyxWoW.Me.Inventory.Equipped.Trinket1.Cooldown <= 0, new Action( ret => { StyxWoW.Me.Inventory.Equipped.Trinket1.Use(); })), new Decorator( ret => HasAuraStacks("Raw Fury", 5) && StyxWoW.Me.Inventory.Equipped.Trinket2 != null && StyxWoW.Me.Inventory.Equipped.Trinket2.Name.Contains("Fury of Angerforge") && StyxWoW.Me.Inventory.Equipped.Trinket2.Cooldown <= 0, new Action( ret => { StyxWoW.Me.Inventory.Equipped.Trinket2.Use(); })), //Interupts CreateSpellCast( "Pummel", ret => Me.CurrentTarget.IsCasting || Me.CurrentTarget.ChanneledCastingSpellId != 0), CreateSpellCast( "Arcane Torrent", ret => Me.CurrentTarget.IsCasting || Me.CurrentTarget.ChanneledCastingSpellId != 0), CreateSpellCast( "War Stomp", ret => Me.CurrentTarget.IsCasting || Me.CurrentTarget.ChanneledCastingSpellId != 0), //Heal up in mele CreateSpellCast("Victory Rush", ret => Me.HealthPercent < 80), //Use Incite or dump rage CreateSpellCast( "Heroic Strike", ret => Me.RagePercent > 60 || HasAuraStacks("Incite", 1)), //Use Engineering Gloves CreateUseEquippedItem(9), //Rotation under 20% CreateSpellCast("Colossus Smash"), CreateSpellCast("Execute", ret => Me.CurrentTarget.HealthPercent < 20), //Rotation over 20% CreateSpellCast("Raging Blow"), CreateSpellCast("Bloodthirst"), CreateSpellCast("Slam", ret => HasAuraStacks("Bloodsurge", 1)), //Mele range check CreateMoveToAndFace(ret => Me.CurrentTarget) )); }