예제 #1
0
        public static async Task <bool> HolyCircle()
        {
            if (!PaladinSettings.Instance.AoE)
            {
                return(false);
            }

            if (!PaladinRoutine.ToggleAndSpellCheck(PaladinSettings.Instance.HolyCircle, Spells.HolyCircle))
            {
                return(false);
            }

            if (PaladinRoutine.RequiescatStackCount <= 1)
            {
                return(false);
            }

            // In 6.0 PLD will cast Requiescat early because it lasts a long time. We now need
            // to make sure we don't still have FoF up as well.
            if (Core.Me.HasAura(Auras.FightOrFight, true))
            {
                return(false);
            }

            if (Combat.Enemies.Count(r => r.ValidAttackUnit() && r.Distance(Core.Me) <= 5 + r.CombatReach) < PaladinSettings.Instance.TotalEclipseEnemies)
            {
                return(false);
            }

            return(await Spells.HolyCircle.Cast(Core.Me));
        }
예제 #2
0
        public static async Task <bool> HolySpirit()
        {
            if (!PaladinRoutine.ToggleAndSpellCheck(PaladinSettings.Instance.HolySpirit, Spells.HolySpirit))
            {
                return(false);
            }

            if (PaladinRoutine.RequiescatStackCount <= 1)
            {
                return(false);
            }

            // Before 6.0 PLD would hold Requiestcat until starting the magic combo,
            // but now it's often put up early during physical combo because it lasts
            // a long time. It's not sufficient to only check if we have Requiestcat stacks
            // now, because we could have them but still be in the middle of our phys combo.
            // We also don't just check if we have FoF because it could be wearing off before
            // we actually finish the physical combo.

            if (ActionManager.LastSpell == Spells.FastBlade ||
                ActionManager.LastSpell == Spells.RiotBlade ||
                Core.Me.HasAura(Auras.FightOrFight, true, 2000))
            {
                return(false);
            }

            // TODO:optimization(wildchill)
            // There was a mana check here, but mana is changed in endwalker for paladin magic combo
            // to have more flexibility. We could check if you have stacks of Requiescat but not enough
            // mana to finish the confiteor combo and early cast confiteor.

            return(await Spells.HolySpirit.Cast(Core.Me.CurrentTarget));
        }
예제 #3
0
        public static async Task <bool> Confiteor()
        {
            if (!PaladinRoutine.ToggleAndSpellCheck(PaladinSettings.Instance.UseConfiteor, Spells.Confiteor))
            {
                return(false);
            }

            if (ActionManager.CanCast(Spells.BladeOfFaith.Id, Core.Me.CurrentTarget))
            {
                return(await Spells.BladeOfFaith.Cast(Core.Me.CurrentTarget));
            }

            if (ActionManager.CanCast(Spells.BladeOfTruth.Id, Core.Me.CurrentTarget))
            {
                return(await Spells.BladeOfTruth.Cast(Core.Me.CurrentTarget));
            }

            if (ActionManager.CanCast(Spells.BladeOfValor.Id, Core.Me.CurrentTarget))
            {
                return(await Spells.BladeOfValor.Cast(Core.Me.CurrentTarget));
            }

            // We want to Confit with our last stack, but if the req buff is
            // about to fall off, and this is our last action, use confit

            var reqAura = Core.Me.GetAuraById(Auras.Requiescat);

            if (reqAura == null)
            {
                return(false);
            }

            // In testing with Pohky we saw cases where we properly see Requiescat
            // stack count, but the aura TimeLeft property is a negative value (-30).
            // This works around that, which Pohky regularly could reproduce. Not sure
            // if a ping related problem or something systematic we need to look at
            // in more detail.
            if (PaladinRoutine.RequiescatStackCount > 1 &&
                (reqAura.TimeLeft > 3.0f || reqAura.TimeLeft < 0.0f))
            {
                return(false);
            }

            var ret = await Spells.Confiteor.Cast(Core.Me.CurrentTarget);

            if (ret && PaladinRoutine.RequiescatStackCount > 1)
            {
                Logger.Write($"[PLD DEBUG] Setting: {PaladinSettings.Instance.HolySpirit} Known: {Spells.HolySpirit.IsKnown()} ");;
                Logger.Write($"[PLD DEBUG] Stacks: {PaladinRoutine.RequiescatStackCount}");
                Logger.Write($"[PLD DEBUG] LastSpell: {ActionManager.LastSpell.Name}");

                foreach (var aura in Core.Me.Auras)
                {
                    Logger.Write($"[PLD DEBUG] Aura: {aura.Name} {aura.TimeLeft}");
                }
            }

            return(ret);
        }
예제 #4
0
        public static async Task <bool> Requiescat()
        {
            if (!PaladinRoutine.ToggleAndSpellCheck(PaladinSettings.Instance.Requiescat, Spells.Requiescat))
            {
                return(false);
            }

            // In 6.0 PLD casts Req early, while FoF is still up, because the req buff lasts a long time,
            // and early use can be beneficial in some fight lengths.
            // The 6.0 balance standard rotation has it about 3 gcds/7.5~ seconds after FoF usage, but we
            // default to 1 and expose the setting for users to adjust to what works for their situation.
            if (Core.Me.HasAura(Auras.FightOrFight, true,
                                PaladinSettings.Instance.RequiescatWithFofSecondsRemaining * 1000))
            {
                return(false);
            }

            // If we're in an aoe situation we want to Req even if our
            // target doesn't have goring. This is typically in dungeons.
            var enemyCount = Combat.Enemies.Count(r =>
                                                  r.ValidAttackUnit() && r.Distance(Core.Me) <= 5 + r.CombatReach);

            if (Spells.FightorFlight.IsKnown() &&
                Spells.FightorFlight.Cooldown != TimeSpan.Zero &&
                Casting.LastSpell != Spells.FightorFlight &&
                enemyCount >= PaladinSettings.Instance.TotalEclipseEnemies)
            {
                return(await Spells.Requiescat.Cast(Core.Me.CurrentTarget));
            }

            // Even if we're doing Req first, which is non-standard, we still
            // want to get goring up before starting req combo.
            if (!Core.Me.CurrentTarget.HasAura(Auras.GoringBlade, true, 1900))
            {
                return(false);
            }

            if (PaladinSettings.Instance.FoFFirst &&
                Spells.FightorFlight.Cooldown.Seconds < 8 &&
                !Core.Me.CurrentTarget.HasAura(Auras.GoringBlade, true, 10000))
            {
                return(false);
            }


            return(await Spells.Requiescat.Cast(Core.Me.CurrentTarget));
        }