public static Composite WizardMovement() { return(new PrioritySelector( Common.CreateWaitForAttack(), Common.CreateWaitForCast(), new CastAtLocation(SNOPower.Wizard_Teleport, ctx => (Vector3)ctx, ctx => BelphegorSettings.Instance.Wizard.Teleport && ZetaDia.Me.Position.Distance((Vector3)ctx) > BelphegorSettings.Instance.Wizard.TeleportDistance), new CastAtLocation(SNOPower.Wizard_Archon_Teleport, ctx => (Vector3)ctx, ctx => Hotbar.HasRune(SNOPower.Wizard_Archon, 2) && ZetaDia.Me.HasBuff(SNOPower.Wizard_Archon) && ZetaDia.Me.Position.Distance((Vector3)ctx) > BelphegorSettings.Instance.Wizard.TeleportDistance), new Action(ret => { ZetaDia.Me.Movement.MoveActor((Vector3)ret); return RunStatus.Success; }) )); }
public static Composite CrusaderCombat() { return(new PrioritySelector(CtxChanger, Common.CreateUsePotion(), Common.CreateWaitWhileFearedStunnedFrozenOrBlind(), Common.CreateGetHealthGlobe(), Common.CreateUseHealthWell(), Common.CreateWaitForAttack(), #region Defensive new CastAtLocation(SNOPower.X1_Crusader_Judgment, ctx => ((CombatContext)ctx).TargetPosition, ctx => (((CombatContext)ctx).CurrentTargetIsElite && ((CombatContext)ctx).TargetDistance <= 30) || Clusters.GetClusterCount(((CombatContext)ctx).CurrentTarget, ((CombatContext)ctx), 15f) >= BelphegorSettings.Instance.Crusader.JudgmentAoECount), new CastOnUnit(SNOPower.X1_Crusader_ShieldGlare, ctx => ((CombatContext)ctx).TargetGuid, ctx => Unit.IsEliteInRange(16f, ((CombatContext)ctx)) || Clusters.GetFacingCount(16f, 70f, ((CombatContext)ctx)) >= BelphegorSettings.Instance.Crusader.ShieldGlareAoECount), new SelfCast(SNOPower.X1_Crusader_IronSkin, ret => ZetaDia.Me.HitpointsCurrentPct <= BelphegorSettings.Instance.Crusader.IronSkinHpPct), new SelfCast(SNOPower.X1_Crusader_Consecration, ret => ZetaDia.Me.HitpointsCurrentPct <= BelphegorSettings.Instance.Crusader.ConsecrationHpPct), #endregion #region Laws new SelfCast(SNOPower.X1_Crusader_LawsOfHope2, ret => ZetaDia.Me.HitpointsCurrentPct <= BelphegorSettings.Instance.Crusader.LawsOfHopeHpPct), new SelfCast(SNOPower.X1_Crusader_LawsOfJustice2, ctx => Unit.IsEliteInRange(16f, ((CombatContext)ctx)) || ZetaDia.Me.HitpointsCurrentPct <= BelphegorSettings.Instance.Crusader.LawsOfJusticeHpPct), new SelfCast(SNOPower.X1_Crusader_LawsOfValor2, ctx => Unit.IsEliteInRange(16f, ((CombatContext)ctx)) || (Hotbar.HasRune(SNOPower.X1_Crusader_LawsOfValor2, 4) && ((CombatContext)ctx).TargetDistance <= 15f)), #endregion #region Conviction new SelfCast(SNOPower.X1_Crusader_AkaratsChampion, ctx => Unit.IsEliteInRange(16f, ((CombatContext)ctx)) || ZetaDia.Me.HitpointsCurrentPct < 0.30), new CastOnUnit(SNOPower.X1_Crusader_Bombardment, ctx => ((CombatContext)ctx).TargetGuid, ctx => ((CombatContext)ctx).CurrentTargetIsElite || Clusters.GetClusterCount(ZetaDia.Me, ((CombatContext)ctx), 15f) >= BelphegorSettings.Instance.Crusader.BombardmentAoECount), new CastOnUnit(SNOPower.X1_Crusader_FallingSword, ctx => ((CombatContext)ctx).TargetGuid, ctx => ((CombatContext)ctx).CurrentTargetIsElite || Clusters.GetClusterCount(ZetaDia.Me, ((CombatContext)ctx), 15f) >= BelphegorSettings.Instance.Crusader.FallingSwordAoECount), new CastOnUnit(SNOPower.X1_Crusader_HeavensFury3, ctx => ((CombatContext)ctx).TargetGuid, ctx => ((CombatContext)ctx).CurrentTargetIsElite || Clusters.GetClusterCount(ZetaDia.Me, ((CombatContext)ctx), 15f) >= BelphegorSettings.Instance.Crusader.HeavensFuryAoECount), #endregion #region Utility new SelfCast(SNOPower.X1_Crusader_Provoke, ctx => ZetaDia.Me.CurrentPrimaryResource < 70 && (Clusters.GetClusterCount(((CombatContext)ctx).CurrentTarget, ((CombatContext)ctx), 15f) >= 3 || Unit.IsEliteInRange(14f, ((CombatContext)ctx)))), new SelfCast(SNOPower.X1_Crusader_Condemn, ctx => (((CombatContext)ctx).CurrentTargetIsElite && ((CombatContext)ctx).TargetDistance <= 15f) || Clusters.GetClusterCount(ZetaDia.Me, ((CombatContext)ctx), 15f) >= BelphegorSettings.Instance.Crusader.CondemnAoECount), new SelfCast(SNOPower.X1_Crusader_SteedCharge, ctx => ((CombatContext)ctx).TargetDistance >= BelphegorSettings.Instance.Crusader.SteedChargeMinRange), new CastOnUnit(SNOPower.x1_Crusader_Phalanx3, ctx => ((CombatContext)ctx).TargetGuid, ctx => Clusters.GetClusterCount(((CombatContext)ctx).CurrentTarget, ((CombatContext)ctx), 15f) >= 3), #endregion #region Secondary //Secondary skills new SelfCast(SNOPower.X1_Crusader_BlessedHammer, ctx => Clusters.GetClusterCount(ZetaDia.Me, ((CombatContext)ctx), 18f) >= BelphegorSettings.Instance.Crusader.BlessedHammerkAoECount), //If we have the 5th rune it no longer bounces new CastOnUnit(SNOPower.X1_Crusader_BlessedShield, ctx => ((CombatContext)ctx).TargetGuid, ctx => Hotbar.HasRune(SNOPower.X1_Crusader_BlessedShield, 5) || Clusters.GetClusterCount(((CombatContext)ctx).CurrentTarget, ((CombatContext)ctx), 14f) >= 3), new CastOnUnit(SNOPower.X1_Crusader_FistOfTheHeavens, ctx => ((CombatContext)ctx).TargetGuid), new CastOnUnit(SNOPower.X1_Crusader_ShieldBash2, ctx => ((CombatContext)ctx).TargetGuid), new CastOnUnit(SNOPower.X1_Crusader_SweepAttack, ctx => ((CombatContext)ctx).TargetGuid, ctx => Unit.IsEliteInRange(18f, ((CombatContext)ctx)) || Clusters.GetFacingCount(18f, 100f, ((CombatContext)ctx)) >= BelphegorSettings.Instance.Crusader.SweepAttackAoECount), #endregion #region Primary new CastOnUnit(SNOPower.X1_Crusader_Slash, ctx => ((CombatContext)ctx).TargetGuid, null, ctx => PrimarySpamTimer.Reset(), keepSpamming => !PrimarySpamTimer.IsFinished, CtxChanger), new CastOnUnit(SNOPower.X1_Crusader_Smite, ctx => ((CombatContext)ctx).TargetGuid, null, ctx => PrimarySpamTimer.Reset(), keepSpamming => !PrimarySpamTimer.IsFinished, CtxChanger), new CastOnUnit(SNOPower.X1_Crusader_Punish, ctx => ((CombatContext)ctx).TargetGuid, null, ctx => PrimarySpamTimer.Reset(), keepSpamming => !PrimarySpamTimer.IsFinished, CtxChanger), new CastOnUnit(SNOPower.X1_Crusader_Justice, ctx => ((CombatContext)ctx).TargetGuid, null, ctx => PrimarySpamTimer.Reset(), keepSpamming => !PrimarySpamTimer.IsFinished, CtxChanger) )); #endregion }