miceiken

Singular Subtlety Rogue

Mar 18th, 2011
158
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 3.21 KB | None | 0 0
  1. #region Revision Info
  2.  
  3. // This file is part of Singular - A community driven Honorbuddy CC
  4. // $Author: raphus $
  5. // $Date: 2011-03-18 02:04:33 +0100 (fr, 18 mar 2011) $
  6. // $HeadURL: http://svn.apocdev.com/singular/trunk/Singular/ClassSpecific/Rogue/Combat.cs $
  7. // $LastChangedBy: raphus $
  8. // $LastChangedDate: 2011-03-18 02:04:33 +0100 (fr, 18 mar 2011) $
  9. // $LastChangedRevision: 182 $
  10. // $Revision: 182 $
  11.  
  12. #endregion
  13.  
  14. using System.Linq;
  15.  
  16. using Styx.Combat.CombatRoutine;
  17.  
  18. using TreeSharp;
  19. using Styx.Helpers;
  20. using Styx.Logic.Pathing;
  21.  
  22. namespace Singular
  23. {
  24.     partial class SingularRoutine
  25.     {
  26.         [Class(WoWClass.Rogue)]
  27.         [Spec(TalentSpec.SubtletyRogue)]
  28.         [Behavior(BehaviorType.Pull)]
  29.         [Context(WoWContext.All)]
  30.         public Composite CreateSubtletyRoguePull()
  31.         {
  32.             return new PrioritySelector(
  33.                 CreateSpellBuffOnSelf("Sprint", ret => Me.IsMoving && Me.HasAura("Stealth")),
  34.                 CreateSpellBuffOnSelf("Stealth"),
  35.                     new PrioritySelector(
  36.                         CreateSpellCast("Shadowstep"),
  37.                         new Decorator(
  38.                             ret => WoWMathHelper.CalculatePointBehind(Me.CurrentTarget.Location, Me.CurrentTarget.Rotation, 1f).Distance2D(Me.Location) > 3f,
  39.                             new Action(ret => Navigator.MoveTo(WoWMathHelper.CalculatePointBehind(Me.CurrentTarget.Location, Me.CurrentTarget.Rotation, 1f)))
  40.                         )
  41.                     ),
  42.                 CreateFaceUnit(),
  43.                 CreateSpellCast("Premeditation"),
  44.                 CreateSpellCast("Ambush"),
  45.                 CreateSpellCast("Hemorrhage"),
  46.                 CreateAutoAttack(true)
  47.                 );
  48.         }
  49.  
  50.         [Class(WoWClass.Rogue)]
  51.         [Spec(TalentSpec.SubtletyRogue)]
  52.         [Behavior(BehaviorType.Combat)]
  53.         [Context(WoWContext.All)]
  54.         public Composite CreateSubtletyRogueCombat()
  55.         {
  56.             return new PrioritySelector
  57.                 (
  58.                 CreateEnsureTarget(),
  59.                 CreateAutoAttack(false),
  60.                 CreateMoveToAndFace(5f, ret => Me.CurrentTarget),
  61.                 CreateCombatRogueDefense(),
  62.                 CreateSpellCast(
  63.                     "Redirect", ret => Me.RawComboPoints > 0 &&
  64.                                        Me.ComboPoints < 1),
  65.                     CreateSpellBuffOnSelf("Slice and Dice", ret => Me.RawComboPoints > 1 && !Me.HasAura("Slice and Dice")),
  66.                     CreateSpellCast("Eviscerate", ret => Me.ComboPoints >= 3),                
  67.                     CreateSpellCast("Hemorrhage", ret => Me.ComboPoints < 3));
  68.         }
  69.  
  70.         public Composite CreateSubtletyRogueDefense()
  71.         {
  72.             return new PrioritySelector(
  73.                 CreateMoveToAndFace(),
  74.                 new Decorator(
  75.                     ret => Me.CurrentTarget.IsCasting,
  76.                     new PrioritySelector(
  77.                         CreateSpellCast("Kick"),
  78.                         CreateSpellCast("Gouge"),
  79.                         CreateSpellCast("Cloak of Shadows"))),
  80.                 CreateSpellCast("Evasion", ret => NearbyUnfriendlyUnits.Count(u => u.DistanceSqr < 6 * 6) > 1 || Me.HealthPercent < 50),
  81.                 CreateSpellCast("Cloak of Shadows", ret => Me.HealthPercent < 10),
  82.                 CreateSpellCast("Preparation")
  83.                 );
  84.         }
  85.     }
  86. }
Advertisement
Add Comment
Please, Sign In to add comment