return new PrioritySelector(ctx => CombatTargeting.Instance.FirstUnit,
new Decorator(ctx => ctx != null,
new PrioritySelector(CommonBehaviors.CreateUseHealthPotionBehavior(ent => 0.4f),
// Get in Stealth.
Spell.Cast("Trickster_Stealth_Slottable", ent => ent as NWUnit, ent => !(ent as NWUnit).Character.HasBuff("Trickster_Stealth_Slottable")),
Spell.Cast("Trickster_Encounter_Deftstrike", null, ext => (ext as NWUnit).Distance <= 59f, ent => (ent as NWUnit).Position),
// Make sure we are in range.
CommonBehaviors.MoveAndStop(ctx => (ctx as NWUnit).Position, 9f, true, "Moving to unit"),
// DPS Skills.
// Daily:
Spell.Cast("Trickster_Daily_Lurkersassault", null, ext => HasFullPower && Clusters.GetClusterCount(ext as NWUnit, ClusterType.Radius, 30.0f) >= 3, ent => (ent as NWUnit).Position),
Spell.Cast("Trickster_Daily_Easytarget", null, ext => HasFullPower && Clusters.GetClusterCount(ext as NWUnit, ClusterType.Radius, 30.0f) >= 3, ent => (ent as NWUnit).Position),
Spell.Cast("Trickster_Daily_Whirlwindofblades", null, ext => HasFullPower && Clusters.GetClusterCount(ext as NWUnit, ClusterType.Radius, 30.0f) >= 3, ent => (ent as NWUnit).Position),
// Encounter:
Spell.Cast("Trickster_Encounter_Lashingblade", ent => ent as NWUnit, ent => (ent as NWUnit).Character.HasBuff("Trickster_Stealth_Slottable")),
Spell.Cast("Trickster_Encounter_Shadowstrike", ent => ent as NWUnit, ret => true),
Spell.Cast("Trickster_Encounter_Dazingstrike", ent => ent as NWUnit, ret => true),
Spell.Cast("Trickster_Encounter_Blitz", ent => ent as NWUnit, ret => true),
// At-will:
Spell.Cast("Trickster_Atwill_Slyflourish_Combo", ent => ent as NWUnit, ret => true),
Spell.Cast("Trickster_Atwill_Cloudofsteel", null, ext => (ext as NWUnit).Distance >= 10f, ent => (ent as NWUnit).Position)
)));