// 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 Immortal : RotationBase
{
public override string Name
{
get { return "Juggernaut Immortal"; }
}
public override Composite Buffs
{
get
{
return new PrioritySelector(
Spell.Buff("Soresu Form"),
Spell.Buff("Unnatural Might"),
Spell.Cast("Guard", on => Me.Companion,
ret => Me.Companion != null && !Me.Companion.IsDead && !Me.Companion.HasBuff("Guard"))
);
}
}
public override Composite Cooldowns
{
get
{
return new PrioritySelector(
Spell.Buff("Unleash"),
Spell.Buff("Saber Reflect", ret => Me.HealthPercent <= 90),
Spell.Buff("Endure Pain", ret => Me.HealthPercent <= 80),
Spell.Buff("Enraged Defense", ret => Me.HealthPercent < 70),
Spell.Buff("Invincible", ret => Me.HealthPercent <= 50),
Spell.Buff("Saber Ward", ret => Me.HealthPercent <= 30),
Spell.Buff("Enrage", ret => Me.ActionPoints <= 6)
);
}
}
public override Composite SingleTarget
{
get
{
return new PrioritySelector(
//Movement
CombatMovement.CloseDistance(Distance.Melee),
//Rotation
Spell.Cast("Retaliation"),
Spell.Cast("Force Scream"),
Spell.Cast("Aegis Assault"),
Spell.Cast("Crushing Blow"),
Spell.Cast("Ravage"),
Spell.Cast("Crushing Blow"),
Spell.Cast("Smash", ret => Me.CurrentTarget.Distance <= 0.5f && Me.InCombat),
Spell.Cast("Backhand"),
Spell.Cast("Vicious Throw"),
Spell.Cast("Saber Throw", ret => Me.CurrentTarget.Distance <= 0.5f && Me.InCombat),
Spell.Cast("Vicious Slash"),
Spell.Cast("Force Choke", ret => Me.ActionPoints < 5),
Spell.Cast("Force Push"),
Spell.Cast("Assault")
);
}
}
public override Composite AreaOfEffect
{
get
{
return new Decorator(ret => Targeting.ShouldPbaoe,
new PrioritySelector(
Spell.Cast("Crushing Blow", ret => Me.HasBuff("Aegis")),
Spell.Cast("Smash", ret => Me.CurrentTarget.Distance >= 0.5f && Me.InCombat),
Spell.Cast("Sweeping Slash"),
Spell.Cast("Mad Dash")
));
}
}
}
}