using System;
using Belphegor.Dynamics;
using Belphegor.Helpers;
using Zeta;
using Zeta.Common;
using Zeta.CommonBot;
using Zeta.Internals.Actors;
using Zeta.TreeSharp;
using Action = Zeta.TreeSharp.Action;
namespace Belphegor.Routines
{
public class Monk
{
[Class(ActorClass.Monk)]
[Behavior(BehaviorType.OutOfCombat)]
[Priority(2)]
public static Composite MonkBuffs()
{
return
new PrioritySelector(
Spell.Buff(SNOPower.Monk_SweepingWind),
Spell.Buff(SNOPower.Monk_MantraOfEvasion,
require => ZetaDia.Me.HasBuff(SNOPower.Monk_SweepingWind)
)
);
}
[Class(ActorClass.Monk)]
[Behavior(BehaviorType.Combat)]
[Priority(1)]
public static Composite MonkCombat()
{
return
new PrioritySelector(ctx => CombatTargeting.Instance.FirstNpc,
MonkBuffs(),
new Decorator(ctx => ctx != null,
new PrioritySelector(
Spell.Buff(SNOPower.Monk_BreathOfHeaven,
require => ZetaDia.Me.HitpointsCurrentPct <= 80 || Clusters.GetClusterCount(ZetaDia.Me, CombatTargeting.Instance.LastObjects, ClusterType.Radius, 12f) >= 2
),
// Defence low hp or many attackers.
Spell.Buff(SNOPower.Monk_Serenity,
require => ZetaDia.Me.HitpointsCurrentPct <= 25 || Clusters.GetClusterCount(ZetaDia.Me, CombatTargeting.Instance.LastObjects, ClusterType.Radius, 12f) >= 6
),
// Pull phase.
new Decorator(ctx => ctx != null && ((DiaUnit)ctx).Distance > 15f,
new PrioritySelector(
Spell.CastAtLocation(SNOPower.Monk_FistsofThunder, ret => CombatTargeting.Instance.FirstNpc.Position)
)
),
// Move to the unit.
new Decorator(ctx => ctx != null && ((DiaUnit)ctx).Distance > 15f,
CommonBehaviors.MoveTo(ctx => ((DiaUnit)ctx).Position, "Moving towards unit")
),
Spell.CastAOESpell(SNOPower.Monk_BlindingFlash,
extra => Clusters.GetClusterCount(ZetaDia.Me, CombatTargeting.Instance.LastObjects, ClusterType.Radius, 20f) >= 5
),
// AOE
Spell.CastAOESpell(SNOPower.Monk_SweepingWind,
require => !ZetaDia.Me.HasBuff(SNOPower.Monk_SweepingWind)
),
Spell.CastAtLocation(SNOPower.Monk_FistsofThunder, ret => CombatTargeting.Instance.FirstNpc.Position)
)
),
new Action(ret => RunStatus.Success)
);
}
public static void MonkOnLevelUp(object sender, EventArgs e)
{
if (ZetaDia.Me.ActorClass != ActorClass.Monk)
return;
int myLevel = ZetaDia.Me.Level;
Logger.Write("Player leveled up, congrats! Your level is now: {0}",
myLevel
);
// Set Lashing tail kick once we reach level 2
if (myLevel == 2)
{
ZetaDia.Me.SetActiveSkill(SNOPower.Monk_LashingTailKick, -1, 1);
Logger.Write("Setting Lash Tail Kick as Secondary");
}
// Set Dead reach it's better then Fists of thunder imo.
if (myLevel == 3)
{
ZetaDia.Me.SetActiveSkill(SNOPower.Monk_DeadlyReach, -1, 0);
Logger.Write("Setting Deadly Reach as Primary");
}
// Make sure we set binding flash, useful spell in crowded situations!
if (myLevel == 4)
{
ZetaDia.Me.SetActiveSkill(SNOPower.Monk_BlindingFlash, -1, 2);
Logger.Write("Setting Binding Flash as Defensive");
}
// Binding flash is nice but being alive is even better!
if (myLevel == 8)
{
ZetaDia.Me.SetActiveSkill(SNOPower.Monk_BreathOfHeaven, -1, 2);
Logger.Write("Setting Breath of Heaven as Defensive");
}
// Make sure we set Dashing strike, very cool and useful spell great opener.
if (myLevel == 9)
{
ZetaDia.Me.SetActiveSkill(SNOPower.Monk_DashingStrike, -1, 3);
Logger.Write("Setting Dashing Strike as Techniques");
}
}
}
}