Guest User

Untitled

a guest
Jun 22nd, 2018
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.45 KB | None | 0 0
  1. using Singular.Dynamics;
  2. using Singular.Helpers;
  3. using Singular.Managers;
  4. using Styx.Combat.CombatRoutine;
  5. using Styx.Logic.Combat;
  6. using TreeSharp;
  7. using Styx;
  8. using System.Linq;
  9.  
  10. namespace Singular.ClassSpecific.Warlock
  11. {
  12. public class Demonology
  13. {
  14. [Class(WoWClass.Warlock)]
  15. [Spec(TalentSpec.DemonologyWarlock)]
  16. [Context(WoWContext.All)]
  17. [Behavior(BehaviorType.Combat)]
  18. [Behavior(BehaviorType.Pull)]
  19. public static Composite CreateDemonologyCombat()
  20. {
  21. PetManager.WantedPet = "Felguard";
  22. return new PrioritySelector(
  23. Safers.EnsureTarget(),
  24. Movement.CreateMoveToLosBehavior(),
  25. Movement.CreateFaceTargetBehavior(),
  26. new Decorator(
  27. ret => StyxWoW.Me.CastingSpell != null && StyxWoW.Me.CastingSpell.Name == "Hellfire" && StyxWoW.Me.HealthPercent < 70,
  28. new Action(ret => SpellManager.StopCasting())),
  29. Spell.WaitForCast(true),
  30. Helpers.Common.CreateAutoAttack(true),
  31. Helpers.Common.CreateInterruptSpellCast(ret => StyxWoW.Me.CurrentTarget),
  32. Spell.BuffSelf("Soulburn", ret => SpellManager.HasSpell("Soul Fire") || StyxWoW.Me.HealthPercent < 70),
  33. Spell.Cast("Life Tap", ret => StyxWoW.Me.ManaPercent < 50 && StyxWoW.Me.HealthPercent > 70),
  34. new Decorator(ret => StyxWoW.Me.CurrentTarget.Fleeing,
  35. Pet.CreateCastPetAction("Axe Toss")),
  36. new Decorator(ret => StyxWoW.Me.GotAlivePet && Unit.NearbyUnfriendlyUnits.Count(u => u.Location.DistanceSqr(StyxWoW.Me.Pet.Location) < 10*10) > 1,
  37. Pet.CreateCastPetAction("Felstorm")),
  38. new Decorator(ret => Unit.NearbyUnfriendlyUnits.Count(u => u.DistanceSqr < 10*10) > 1 && StyxWoW.Me.HealthPercent >= 70,
  39. Spell.BuffSelf("Hellfire")
  40. ),
  41. new Decorator(ret => StyxWoW.Me.CurrentTarget.IsBoss(),
  42. new PrioritySelector(
  43. Spell.BuffSelf("Metamorphosis"),
  44. Spell.BuffSelf("Demon Soul"),
  45. Spell.Cast("Immolation Aura", ret => StyxWoW.Me.CurrentTarget.Distance < 5f),
  46. Spell.Cast("Shadowflame", ret => StyxWoW.Me.CurrentTarget.Distance < 5)
  47. )),
  48. Spell.Buff("Immolate", true),
  49. Spell.Buff("Curse of Tongues", ret => StyxWoW.Me.CurrentTarget.PowerType == WoWPowerType.Mana),
  50. Spell.Buff("Curse of Elements", ret => StyxWoW.Me.CurrentTarget.PowerType != WoWPowerType.Mana),
  51. Spell.Buff("Bane of Doom", true, ret => StyxWoW.Me.CurrentTarget.IsBoss()),
  52.  
  53. Spell.Buff("Bane of Agony", true, ret => !StyxWoW.Me.CurrentTarget.HasAura("Bane of Doom") && (StyxWoW.Me.CurrentTarget.HealthPercent >= 30 || StyxWoW.Me.CurrentTarget.Elite)),
  54. // Use the infernal if we have a few mobs around us, and it's off CD. Otherwise, just use the Doomguard.
  55. // Its a 10min CD, with a 1-1.2min uptime on the minion. Hey, any extra DPS is fine in my book!
  56. // Make sure these 2 summons are AFTER the banes above.
  57. new Decorator(ret => Unit.NearbyUnfriendlyUnits.Count(u => u.Distance <= 10) > 2,
  58. Spell.CastOnGround("Summon Infernal", ret => StyxWoW.Me.CurrentTarget.Location)
  59. ),
  60. Spell.Cast("Summon Doomguard", ret=> StyxWoW.Me.CurrentTarget.IsBoss()),
  61. Spell.Buff("Corruption", true, ret => StyxWoW.Me.CurrentTarget.HealthPercent >= 30 || StyxWoW.Me.CurrentTarget.Elite),
  62. Spell.Cast("Drain Life", ret => StyxWoW.Me.HealthPercent < 70),
  63. Spell.Cast("Health Funnel", ret => StyxWoW.Me.GotAlivePet && PetManager.PetTimer.IsFinished && StyxWoW.Me.Pet.HealthPercent < 70),
  64. Spell.Cast("Hand of Gul'dan"),
  65. // TODO: Make this cast Soulburn if it's available
  66. Spell.Cast("Soul Fire", ret => StyxWoW.Me.HasAura("Improved Soul Fire") || StyxWoW.Me.HasAura("Soulburn")),
  67. //Spell.Cast("Soul Fire", ret => StyxWoW.Me.HasAura("Decimation")),
  68. Spell.Cast("Incinerate", ret => StyxWoW.Me.HasAura("Molten Core")),
  69. Spell.Cast("Shadow Bolt"),
  70. Movement.CreateMoveToTargetBehavior(true, 35f)
  71. );
  72. }
  73. }
  74. }
Add Comment
Please, Sign In to add comment