Skip to content

Instantly share code, notes, and snippets.

@brandonjank
Created December 25, 2015 20:51
Show Gist options
  • Save brandonjank/2a408eb813e51a8e1d37 to your computer and use it in GitHub Desktop.
Save brandonjank/2a408eb813e51a8e1d37 to your computer and use it in GitHub Desktop.
// Copyright (C) 2011-2015 Bossland GmbH
// See the file LICENSE for the source code's detailed license
using Buddy.BehaviorTree;
using DefaultCombat.Core;
using DefaultCombat.Helpers;
namespace DefaultCombat.Routines
{
internal class Marksmanship : RotationBase
{
public override string Name
{
get { return "Sniper Marksmanship"; }
}
public override Composite Buffs
{
get
{
return new PrioritySelector(
Spell.Buff("Coordination")
);
}
}
public override Composite Cooldowns
{
get
{
return new LockSelector(
Spell.Buff("Escape", ret => Me.IsStunned),
Spell.Buff("Shield Probe", ret => Me.HealthPercent <= 70),
Spell.Buff("Evasion", ret => Me.HealthPercent <= 30),
Spell.Buff("Adrenaline Probe", ret => Me.EnergyPercent < 50),
Spell.Buff("Sniper Volley", ret => Me.EnergyPercent <= 60),
Spell.Buff("Entrench", ret => Me.CurrentTarget.StrongOrGreater() && Me.IsInCover()),
Spell.Buff("Laze Target"),
Spell.Buff("Target Acquired")
);
}
}
public override Composite SingleTarget
{
get
{
return new LockSelector(
//Movement
CombatMovement.CloseDistance(Distance.Ranged),
//Low Energy
new Decorator(ret => Me.EnergyPercent < 60,
new LockSelector(
Spell.Cast("Rifle Shot")
)),
// Corrosive Dart (Reason: Marked Debuff)
// Penetrating Blasts // Sniper Volley/Burst Volley
// Takedown (Be wary of your energy management when using this)
// Followthrough
// Ambush (2 stacks of Zeroing Shots)
// Snipe
//Rotation
Spell.Cast("Distraction", ret => Me.CurrentTarget.IsCasting),
Spell.Cast("Followthrough"),
Spell.Cast("Penetrating Blasts", ret => Me.Level >= 26),
Spell.Cast("Series of Shots", ret => Me.Level < 26),
Spell.DoT("Corrosive Dart", "Corrosive Dart"),
Spell.Cast("Ambush", ret => Me.BuffCount("Zeroing Shots") == 2),
Spell.Cast("Takedown", ret => Me.CurrentTarget.HealthPercent <= 30),
Spell.Cast("Snipe")
);
}
}
public override Composite AreaOfEffect
{
get
{
return new Decorator(ret => Targeting.ShouldAoe,
new LockSelector(
Spell.CastOnGround("Orbital Strike"),
Spell.Cast("Fragmentation Grenade"),
Spell.CastOnGround("Suppressive Fire")
));
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment