コード例 #1
0
        public static async Task <bool> Execute()
        {
            Group.UpdateAllies();

            if (await Chocobo.HandleChocobo())
            {
                return(true);
            }

            if (await Casting.TrackSpellCast())
            {
                return(true);
            }
            await Casting.CheckForSuccessfulCast();

            Globals.InParty       = PartyManager.IsInParty;
            Globals.PartyInCombat = Globals.InParty && Utilities.Combat.Enemies.Any(r => r.TaggerType == 2);
            if (await GambitLogic.Gambit())
            {
                return(true);
            }
            if (await Logic.RedMage.Heal.Verraise())
            {
                return(true);
            }
            return(await Logic.RedMage.Heal.Vercure());
        }
コード例 #2
0
ファイル: Heal.cs プロジェクト: thadeusb/MagitekRoutine
        public static async Task <bool> Execute()
        {
            if (await Chocobo.HandleChocobo())
            {
                return(true);
            }

            if (await Casting.TrackSpellCast())
            {
                return(true);
            }
            await Casting.CheckForSuccessfulCast();

            Globals.InParty       = PartyManager.IsInParty;
            Globals.PartyInCombat = Globals.InParty && Utilities.Combat.Enemies.Any(r => r.TaggerType == 2);
            if (await GambitLogic.Gambit())
            {
                return(true);
            }

            if (Globals.InParty && WarriorSettings.Instance.OpenWithThreatCombo)
            {
                if (!Globals.PartyInCombat)
                {
                    Utilities.Routines.Warrior.NeedThreatCombo = true;
                }
            }

            return(false);
        }
コード例 #3
0
ファイル: BlueMage.cs プロジェクト: hyskylord/MagitekRoutine
        public static async Task <bool> Heal()
        {
            if (await Casting.TrackSpellCast())
            {
                return(true);
            }
            await Casting.CheckForSuccessfulCast();

            //Dispell Party if necessary
            if (await Dispel.Exuviation())
            {
                return(true);
            }

            //Self Heal if necessary
            if (await Logic.BlueMage.Heal.SelfCure())
            {
                return(true);
            }

            //Raise if necessary
            if (await Logic.BlueMage.Heal.AngelWhisper())
            {
                return(true);
            }

            return(await GambitLogic.Gambit());
        }
コード例 #4
0
ファイル: Heal.cs プロジェクト: nishalp/MagitekRoutine
        public static async Task <bool> Execute()
        {
            if (Core.Me.IsMounted)
            {
                return(true);
            }

            if (await Chocobo.HandleChocobo())
            {
                return(true);
            }

            Group.UpdateAllies();
            if (await GambitLogic.Gambit())
            {
                return(true);
            }
            if (await Casting.TrackSpellCast())
            {
                return(true);
            }
            await Casting.CheckForSuccessfulCast();

            Globals.InParty       = PartyManager.IsInParty;
            Globals.PartyInCombat = Globals.InParty && Utilities.Combat.Enemies.Any(r => r.TaggerType == 2);

            return(await Logic.Paladin.Heal.Clemency());
        }
コード例 #5
0
        public static async Task<bool> Heal()
        {


            if (await Casting.TrackSpellCast()) return true;
            await Casting.CheckForSuccessfulCast();

            return await GambitLogic.Gambit();
        }
コード例 #6
0
        public static async Task <bool> Combat()
        {
            if (!Core.Me.HasTarget || !Core.Me.CurrentTarget.ThoroughCanAttack())
            {
                return(false);
            }

            if (await GambitLogic.Gambit())
            {
                return(true);
            }

            if (!SpellQueueLogic.SpellQueue.Any())
            {
                SpellQueueLogic.InSpellQueue = false;
            }

            if (BotManager.Current.IsAutonomous)
            {
                Movement.NavigateToUnitLos(Core.Me.CurrentTarget, 3);
            }

            if (!Core.Me.HasTarget || !Core.Me.CurrentTarget.ThoroughCanAttack())
            {
                return(false);
            }
            if (Core.Me.CurrentTarget.HasAnyAura(Auras.Invincibility))
            {
                return(false);
            }

            if (await CustomOpenerLogic.Opener())
            {
                return(true);
            }

            if (SpellQueueLogic.SpellQueue.Any())
            {
                if (await SpellQueueLogic.SpellQueueMethod())
                {
                    return(true);
                }
            }

            if (Utilities.Routines.BlueMage.OnGcd)
            {
            }

            //return await SingleTarget.Enpi();

            return(false);
        }
コード例 #7
0
ファイル: Heal.cs プロジェクト: thadeusb/MagitekRoutine
        public static async Task <bool> Execute()
        {
            if (await Chocobo.HandleChocobo())
            {
                return(true);
            }

            Group.UpdateAllies();
            Globals.InParty       = PartyManager.IsInParty;
            Globals.PartyInCombat = Globals.InParty && Utilities.Combat.Enemies.Any(r => r.TaggerType == 2);

            return(await GambitLogic.Gambit());
        }
コード例 #8
0
ファイル: Dancer.cs プロジェクト: hyskylord/MagitekRoutine
        public static async Task <bool> Heal()
        {
            if (await Casting.TrackSpellCast())
            {
                return(true);
            }
            await Casting.CheckForSuccessfulCast();

            if (await GambitLogic.Gambit())
            {
                return(true);
            }
            return(false);
        }
コード例 #9
0
ファイル: Machinist.cs プロジェクト: hyskylord/MagitekRoutine
        public static async Task <bool> Heal()
        {
            if (Core.Me.IsMounted)
            {
                return(true);
            }

            if (await Casting.TrackSpellCast())
            {
                return(true);
            }

            await Casting.CheckForSuccessfulCast();

            return(await GambitLogic.Gambit());
        }
コード例 #10
0
ファイル: RedMage.cs プロジェクト: hyskylord/MagitekRoutine
        public static async Task <bool> Heal()
        {
            if (await Casting.TrackSpellCast())
            {
                return(true);
            }
            await Casting.CheckForSuccessfulCast();

            if (await GambitLogic.Gambit())
            {
                return(true);
            }
            if (await Logic.RedMage.Heal.Verraise())
            {
                return(true);
            }
            return(await Logic.RedMage.Heal.Vercure());
        }
コード例 #11
0
        public static async Task <bool> Execute()
        {
            if (await Chocobo.HandleChocobo())
            {
                return(true);
            }

            if (Core.Me.IsMounted)
            {
                return(true);
            }

            Group.UpdateAllies(Utilities.Routines.Scholar.GroupExtension);
            Globals.HealTarget = Group.CastableAlliesWithin30.OrderBy(x => x.CurrentHealthPercent).FirstOrDefault();

            if (await Casting.TrackSpellCast())
            {
                return(true);
            }
            await Casting.CheckForSuccessfulCast();

            Casting.DoHealthChecks = false;

            Globals.InParty       = PartyManager.IsInParty || Globals.InGcInstance;
            Globals.PartyInCombat = Globals.InParty && Utilities.Combat.Enemies.Any(r => r.TaggerType == 2) || Core.Me.InCombat;
            Globals.OnPvpMap      = Core.Me.OnPvpMap();

            if (Duty.State() == Duty.States.Ended)
            {
                return(false);
            }

            if (await CustomOpenerLogic.Opener())
            {
                return(true);
            }
            if (await GambitLogic.Gambit())
            {
                return(true);
            }

            return(await Logic.Summoner.Heal.Physick());
        }
コード例 #12
0
ファイル: Summoner.cs プロジェクト: hyskylord/MagitekRoutine
        public static async Task <bool> Heal()
        {
            if (Core.Me.IsMounted)
            {
                return(true);
            }

            if (await Casting.TrackSpellCast())
            {
                return(true);
            }
            await Casting.CheckForSuccessfulCast();

            Casting.DoHealthChecks = false;

            if (await GambitLogic.Gambit())
            {
                return(true);
            }
            if (await Logic.Summoner.Heal.Resurrection())
            {
                return(true);
            }
            #region Force Toggles
            if (await Logic.Summoner.Heal.ForceRaise())
            {
                return(true);
            }
            if (await Logic.Summoner.Heal.ForceHardRaise())
            {
                return(true);
            }
            #endregion

            if (await Logic.Summoner.Heal.RadiantAegis())
            {
                return(true);
            }
            return(await Logic.Summoner.Heal.Physick());
        }
コード例 #13
0
ファイル: Summoner.cs プロジェクト: aukon/MagitekRoutine
        public static async Task <bool> Heal()
        {
            if (Core.Me.IsMounted)
            {
                return(true);
            }

            if (await Casting.TrackSpellCast())
            {
                return(true);
            }
            await Casting.CheckForSuccessfulCast();

            Casting.DoHealthChecks = false;

            if (await GambitLogic.Gambit())
            {
                return(true);
            }

            return(await Logic.Summoner.Heal.Physick());
        }
コード例 #14
0
        public static async Task <bool> Heal()
        {
            if (Core.Me.IsMounted)
            {
                return(true);
            }

            if (await Casting.TrackSpellCast())
            {
                return(true);
            }

            await Casting.CheckForSuccessfulCast();


            if (await GambitLogic.Gambit())
            {
                return(true);
            }

            // if (await Buff.TransposeMovement()) return true;

            return(false);
        }
コード例 #15
0
ファイル: BlueMage.cs プロジェクト: newb23/MagitekRoutine
        public static async Task <bool> Combat()
        {
            if (!Core.Me.HasTarget || !Core.Me.CurrentTarget.ThoroughCanAttack())
            {
                return(false);
            }

            if (await GambitLogic.Gambit())
            {
                return(true);
            }

            if (!SpellQueueLogic.SpellQueue.Any())
            {
                SpellQueueLogic.InSpellQueue = false;
            }

            if (BotManager.Current.IsAutonomous)
            {
                Movement.NavigateToUnitLos(Core.Me.CurrentTarget, 3 + Core.Me.CurrentTarget.CombatReach);
            }

            if (!Core.Me.HasTarget || !Core.Me.CurrentTarget.ThoroughCanAttack())
            {
                return(false);
            }
            if (Core.Me.CurrentTarget.HasAnyAura(Auras.Invincibility))
            {
                return(false);
            }

            if (await CustomOpenerLogic.Opener())
            {
                return(true);
            }

            if (SpellQueueLogic.SpellQueue.Any())
            {
                if (await SpellQueueLogic.SpellQueueMethod())
                {
                    return(true);
                }
            }

            if (!Models.BlueMage.BlueMageSettings.Instance.OnlyWaterCannon)
            {
                if (await Buff.OffGuard())
                {
                    return(true);
                }
                if (await SingleTarget.Surpanakha())
                {
                    return(true);
                }
                if (await SingleTarget.SongOfTorment())
                {
                    return(true);
                }
                if (Utilities.Routines.BlueMage.OnGcd)
                {
                    if (await SingleTarget.Eruption())
                    {
                        return(true);
                    }
                    if (await SingleTarget.GlassDance())
                    {
                        return(true);
                    }
                    if (await SingleTarget.ShockStrike())
                    {
                        return(true);
                    }
                    if (await SingleTarget.Quasar())
                    {
                        return(true);
                    }
                }

                if (await SingleTarget.SharpKnife())
                {
                    return(true);
                }
                return(await SingleTarget.AbyssalTransfixion());
            }
            return(await SingleTarget.WaterCannon());
        }
コード例 #16
0
        public static async Task <bool> Heal()
        {
            if (WorldManager.InSanctuary)
            {
                return(false);
            }

            if (Core.Me.IsMounted)
            {
                return(false);
            }

            if (await Casting.TrackSpellCast())
            {
                return(true);
            }
            await Casting.CheckForSuccessfulCast();

            Casting.DoHealthChecks = false;

            if (await GambitLogic.Gambit())
            {
                return(true);
            }

            if (await Logic.Astrologian.Heal.Ascend())
            {
                return(true);
            }
            if (await Logic.Astrologian.Heal.EssentialDignity())
            {
                return(true);
            }
            if (await Dispel.Execute())
            {
                return(true);
            }
            if (await Buff.LucidDreaming())
            {
                return(true);
            }
            if (await Buff.Lightspeed())
            {
                return(true);
            }
            if (await Buff.Synastry())
            {
                return(true);
            }
            if (await Buff.NeutralSect())
            {
                return(true);
            }

            if (Globals.InActiveDuty || Core.Me.InCombat)
            {
                if (Globals.InParty)
                {
                    if (await Logic.Astrologian.Heal.EssentialDignity())
                    {
                        return(true);
                    }
                    if (await Logic.Astrologian.Heal.CelestialIntersection())
                    {
                        return(true);
                    }
                    if (await Logic.Astrologian.Heal.CelestialOpposition())
                    {
                        return(true);
                    }
                    if (await Logic.Astrologian.Heal.Horoscope())
                    {
                        return(true);
                    }
                    if (await Logic.Astrologian.Heal.HoroscopePop())
                    {
                        return(true);
                    }
                    if (await Logic.Astrologian.Heal.AspectedHelios())
                    {
                        return(true);
                    }
                    if (await Logic.Astrologian.Heal.CollectiveUnconscious())
                    {
                        return(true);
                    }
                    if (await Logic.Astrologian.Heal.Helios())
                    {
                        return(true);
                    }
                    if (await Logic.Astrologian.Heal.Benefic2())
                    {
                        return(true);
                    }
                }

                if (await Logic.Astrologian.Heal.Benefic2())
                {
                    return(true);
                }
                if (await Logic.Astrologian.Heal.AspectedBenefic())
                {
                    return(true);
                }
                if (await Logic.Astrologian.Heal.EarthlyStar())
                {
                    return(true);
                }
            }
            if (await Logic.Astrologian.Heal.Benefic())
            {
                return(true);
            }
            return(await Combat());
        }
コード例 #17
0
ファイル: Heal.cs プロジェクト: thadeusb/MagitekRoutine
        public static async Task <bool> Execute()
        {
            Group.UpdateAllies(Utilities.Routines.WhiteMage.GroupExtension);
            Globals.HealTarget = Group.CastableAlliesWithin30.OrderBy(x => x.CurrentHealthPercent).FirstOrDefault();

            if (await Casting.TrackSpellCast())
            {
                return(true);
            }
            await Casting.CheckForSuccessfulCast();

            Casting.DoHealthChecks = false;

            Globals.InParty       = PartyManager.IsInParty || Globals.InGcInstance;
            Globals.PartyInCombat = Globals.InParty && Utilities.Combat.Enemies.Any(r => r.TaggerType == 2) || Core.Me.InCombat;
            Globals.OnPvpMap      = Core.Me.OnPvpMap();

            if (Core.Me.OnPvpMap())
            {
                await PvpRotation();

                return(true);
            }

            if (Duty.State() == Duty.States.Ended)
            {
                return(false);
            }

            if (await GambitLogic.Gambit())
            {
                return(true);
            }

            if (await Chocobo.HandleChocobo())
            {
                return(true);
            }

            if (Globals.PartyInCombat && Globals.InParty)
            {
                if (await TankBusters.Execute())
                {
                    return(true);
                }
            }

            if (await Logic.WhiteMage.Heal.Raise())
            {
                return(true);
            }

            // Scalebound Extreme Rathalos
            if (Core.Me.HasAura(1495))
            {
                if (await Dispel.Execute())
                {
                    return(true);
                }
                return(false);
            }

            if (Casting.LastSpell == Spells.PlenaryIndulgence)
            {
                if (await Logic.WhiteMage.Heal.Cure3())
                {
                    return(true);
                }
                if (await Logic.WhiteMage.Heal.Medica2())
                {
                    return(true);
                }
                return(await Spells.Medica.Cast(Core.Me));
            }

            if (await Logic.WhiteMage.Heal.Benediction())
            {
                return(true);
            }
            if (await Dispel.Execute())
            {
                return(true);
            }
            if (await Buff.Temperance())
            {
                return(true);
            }
            if (await Buff.ThinAir(false))
            {
                return(true);
            }
            if (await Buff.DivineBenison())
            {
                return(true);
            }
            if (await Logic.WhiteMage.Heal.PlenaryIndulgence())
            {
                return(true);
            }
            if (await Buff.LucidDreaming())
            {
                return(true);
            }
            if (await Buff.AssizeForMana())
            {
                return(true);
            }
            if (await Buff.PresenceOfMind())
            {
                return(true);
            }
            if (await Logic.WhiteMage.Heal.Tetragrammaton())
            {
                return(true);
            }
            if (await Logic.WhiteMage.Heal.AfflatusSolace())
            {
                return(true);
            }
            if (await Logic.WhiteMage.Heal.Cure3())
            {
                return(true);
            }

            if (Globals.InParty)
            {
                if (await Logic.WhiteMage.Heal.AssizeHeal())
                {
                    return(true);
                }
                if (await Logic.WhiteMage.Heal.Benediction())
                {
                    return(true);
                }
                if (await Logic.WhiteMage.Heal.Tetragrammaton())
                {
                    return(true);
                }
                if (await Logic.WhiteMage.Heal.AfflatusRapture())
                {
                    return(true);
                }
                if (await Logic.WhiteMage.Heal.Medica())
                {
                    return(true);
                }
                if (await Logic.WhiteMage.Heal.Medica2())
                {
                    return(true);
                }
                if (await Logic.WhiteMage.Heal.Cure3())
                {
                    return(true);
                }
                if (await Logic.WhiteMage.Heal.Asylum())
                {
                    return(true);
                }
            }

            if (await Logic.WhiteMage.Heal.Cure2())
            {
                return(true);
            }
            if (await Logic.WhiteMage.Heal.Cure())
            {
                return(true);
            }
            if (await SingleTarget.FluidAura())
            {
                return(true);
            }
            return(await Logic.WhiteMage.Heal.Regen());
        }
コード例 #18
0
        public static async Task <bool> Execute()
        {
            Group.UpdateAllies();

            if (BotManager.Current.IsAutonomous)
            {
                Movement.NavigateToUnitLos(Core.Me.CurrentTarget, 3 + Core.Me.CurrentTarget.CombatReach);
            }

            if (await GambitLogic.Gambit())
            {
                return(true);
            }


            if (!SpellQueueLogic.SpellQueue.Any())
            {
                SpellQueueLogic.InSpellQueue = false;
            }

            if (SpellQueueLogic.SpellQueue.Any())
            {
                if (await SpellQueueLogic.SpellQueueMethod())
                {
                    return(true);
                }
            }

            if (!Core.Me.HasTarget || !Core.Me.CurrentTarget.ThoroughCanAttack())
            {
                return(false);
            }

            if (await CustomOpenerLogic.Opener())
            {
                return(true);
            }

            if (await Buff.DancePartner())
            {
                return(true);
            }

            if (await Dances.StartTechnicalDance())
            {
                return(true);
            }
            if (Dances.TechnicalStep())
            {
                return(true);
            }

            if (await Dances.StartStandardDance())
            {
                return(true);
            }
            if (Dances.StandardStep())
            {
                return(true);
            }


            if (Utilities.Routines.Dancer.OnGcd)
            {
                //Only cast spells that are instant/off gcd
                if (await Buff.PreTechnicalDevilment())
                {
                    return(true);
                }
                if (await Aoe.FanDance3())
                {
                    return(true);
                }
                if (await Aoe.FanDance2())
                {
                    return(true);
                }
                if (await SingleTarget.FanDance())
                {
                    return(true);
                }
                if (await Buff.Flourish())
                {
                    return(true);
                }
                if (await Buff.Devilment())
                {
                    return(true);
                }
                if (await Buff.CuringWaltz())
                {
                    return(true);
                }
                if (await Buff.Improvisation())
                {
                    return(true);
                }
                if (await PhysicalDps.SecondWind(DancerSettings.Instance))
                {
                    return(true);
                }
            }

            if (await Aoe.SaberDance())
            {
                return(true);
            }

            if (await Aoe.Bloodshower())
            {
                return(true);
            }
            if (await Aoe.RisingWindmill())
            {
                return(true);
            }

            if (await SingleTarget.Fountainfall())
            {
                return(true);
            }
            if (await SingleTarget.ReverseCascade())
            {
                return(true);
            }

            if (await Aoe.Bladeshower())
            {
                return(true);
            }
            if (await Aoe.Windmill())
            {
                return(true);
            }

            if (await SingleTarget.Fountain())
            {
                return(true);
            }

            return(await SingleTarget.Cascade());
        }
コード例 #19
0
ファイル: Bard.cs プロジェクト: hyskylord/MagitekRoutine
 public static async Task <bool> Heal()
 {
     return(await GambitLogic.Gambit());
 }
コード例 #20
0
ファイル: BlueMage.cs プロジェクト: hyskylord/MagitekRoutine
        public static async Task <bool> Combat()
        {
            if (await GambitLogic.Gambit())
            {
                return(true);
            }

            if (!SpellQueueLogic.SpellQueue.Any())
            {
                SpellQueueLogic.InSpellQueue = false;
            }

            if (BotManager.Current.IsAutonomous)
            {
                Movement.NavigateToUnitLos(Core.Me.CurrentTarget, 3 + Core.Me.CurrentTarget.CombatReach);
            }

            // Can't attack, so just exit
            if (!Core.Me.HasTarget || !Core.Me.CurrentTarget.ThoroughCanAttack())
            {
                return(false);
            }

            // Can't attack, so just exit
            if (Core.Me.CurrentTarget.HasAnyAura(Auras.Invincibility))
            {
                return(false);
            }

            // Can't attack, so just exit
            if (Core.Me.HasAura(Auras.WaningNocturne, true, 1000))
            {
                return(false);
            }

            //Opener
            if (await CustomOpenerLogic.Opener())
            {
                return(true);
            }

            if (SpellQueueLogic.SpellQueue.Any())
            {
                if (await SpellQueueLogic.SpellQueueMethod())
                {
                    return(true);
                }
            }

            //Interrupt
            if (await MagicDps.Interrupt(BlueMageSettings.Instance))
            {
                return(true);
            }

            //Manage PhantomFlury
            ff14bot.Objects.Aura waxingNocturne = Core.Me.Auras.FirstOrDefault(x => x.Id == Auras.WaxingNocturne && x.CasterId == Core.Player.ObjectId);
            ff14bot.Objects.Aura phantomFlurry  = Core.Me.Auras.FirstOrDefault(x => x.Id == Auras.PhantomFlurry && x.CasterId == Core.Player.ObjectId);

            if (Core.Me.InCombat && BlueMageSettings.Instance.UsePhantomFlurry && Casting.LastSpell == Spells.PhantomFlurry)
            {
                if (Core.Me.HasAura(Auras.WaxingNocturne) && waxingNocturne.TimespanLeft.TotalMilliseconds <= 1000)
                {
                    return(await Aoe.PhantomFlurryEnd());
                }

                if (Core.Me.HasAura(Auras.PhantomFlurry) && phantomFlurry.TimespanLeft.TotalMilliseconds <= 1000)
                {
                    return(await Aoe.PhantomFlurryEnd());
                }

                return(true);
            }

            //Buff should always be active
            if (await Buff.OffGuard())
            {
                return(true);
            }

            //Buff
            if (await Buff.Whistle())
            {
                return(true);
            }
            if (await Aoe.Tingle())
            {
                return(true);
            }
            if (await Buff.Bristle())
            {
                return(true);
            }
            if (await Buff.MoonFlute())
            {
                return(true);
            }

            //Jump
            if (await Aoe.JKick())
            {
                return(true);
            }

            //DOT should always be active
            if (await SingleTarget.SongOfTorment())
            {
                return(true);
            }

            if (Casting.LastSpell != Spells.Surpanakha || (Casting.LastSpell == Spells.Surpanakha && Spells.Surpanakha.Charges < 1))
            {
                //GCD
                if (await Buff.Swiftcast())
                {
                    return(true);
                }
                if (await SingleTarget.TripleTrident())
                {
                    return(true);
                }
                if (await SingleTarget.MatraMagic())
                {
                    return(true);
                }
                if (await SingleTarget.TheRoseOfDestruction())
                {
                    return(true);
                }
                if (await Aoe.Surpanakha())
                {
                    return(true);
                }

                if (BlueMageRoutine.OnGcd && Casting.LastSpell != Spells.Surpanakha)
                {
                    if (BlueMageRoutine.GlobalCooldown.CountOGCDs() < 2)
                    {
                        //put oGCD here
                        if (await Aoe.NightBloom())
                        {
                            return(true);
                        }
                        if (await Aoe.PhantomFlurry())
                        {
                            return(true);
                        }
                        if (await Aoe.ShockStrike())
                        {
                            return(true);
                        }
                        if (await Aoe.GlassDance())
                        {
                            return(true);
                        }
                        if (await Aoe.Quasar())
                        {
                            return(true);
                        }
                        if (await Aoe.FeatherRain())
                        {
                            return(true);
                        }
                        if (await Buff.LucidDreaming())
                        {
                            return(true);
                        }

                        if (await Aoe.Eruption())
                        {
                            return(true);                      //FeatherRain if possible, otherwise Eruption
                        }
                        if (await Aoe.MountainBuster())
                        {
                            return(true);                            //ShockStrike if possible, otherwise MountainBuster
                        }
                    }
                }

                if (await SingleTarget.SharpKnife())
                {
                    return(true);                                 //if melee
                }
                if (await SingleTarget.AbyssalTransfixion())
                {
                    return(true);                                         //if SonicBoom deactivated
                }
                return(await SingleTarget.SonicBoom());
            }
            else
            {
                //Logger.WriteInfo($@"[Surpanakha] Charges = {Spells.Surpanakha.Charges}");
                return(await Aoe.Surpanakha());
            }
        }
コード例 #21
0
        public static async Task<bool> Heal()
        {
            if (WorldManager.InSanctuary)
                return false;

            if (Core.Me.IsMounted)
                return false;

            if (await Casting.TrackSpellCast())
                return true;

            await Casting.CheckForSuccessfulCast();

            if (await Buff.SummonPet()) return true;

            Casting.DoHealthChecks = false;

            if (await GambitLogic.Gambit()) return true;

            if (CustomOpenerLogic.InOpener) return false;
            
            if (await HealFightLogic.Aoe()) return true;
            if (await HealFightLogic.Tankbuster()) return true;

            if (await Logic.Scholar.Heal.Resurrection()) return true;

            // Scalebound Extreme Rathalos
            if (Core.Me.HasAura(1495))
            {
                return await Dispel.Execute();
            }

            #region Pre-Healing Stuff

            if (await Logic.Scholar.Heal.ForceWhispDawn()) return true;
            if (await Logic.Scholar.Heal.ForceAdlo()) return true;
            if (await Logic.Scholar.Heal.ForceIndom()) return true;
            if (await Logic.Scholar.Heal.ForceExcog()) return true;

            if (await Dispel.Execute()) return true;
            if (await Buff.Aetherflow()) return true;
            if (await Buff.LucidDreaming()) return true;

            if (Globals.InParty)
            {
                if (await Buff.DeploymentTactics()) return true;
                if (await Buff.Aetherpact()) return true;
                if (await Buff.BreakAetherpact()) return true;
            }

            if (await Buff.ChainStrategem()) return true;

            #endregion

            if (await Logic.Scholar.Heal.Excogitation()) return true;
            if (await Logic.Scholar.Heal.Lustrate()) return true;

            if (Core.Me.Pet != null && Core.Me.InCombat)
            {
                if (await Logic.Scholar.Buff.SummonSeraph()) return true;
                if (await Logic.Scholar.Heal.Consolation()) return true;
                if (await Logic.Scholar.Heal.FeyIllumination()) return true;
                if (await Logic.Scholar.Heal.WhisperingDawn()) return true;
                if (await Logic.Scholar.Heal.FeyBlessing()) return true;
            }

            if (Globals.InParty)
            {
                if (await Logic.Scholar.Heal.Indomitability()) return true;
                if (await Logic.Scholar.Heal.EmergencyTacticsSuccor()) return true;
                if (await Logic.Scholar.Heal.Succor()) return true;
                if (await Logic.Scholar.Heal.SacredSoil()) return true;
            }

            if (await Buff.Expedient()) return true;
            if (await Buff.Protraction()) return true;
            if (await Logic.Scholar.Heal.EmergencyTacticsAdloquium()) return true;
            if (await Logic.Scholar.Heal.Adloquium()) return true;
            if (await Logic.Scholar.Heal.Physick()) return true;

            return await HealAlliance();
        }
コード例 #22
0
        public static async Task <bool> Combat()
        {
            Utilities.Routines.Samurai.RefreshVars();

            if (!Core.Me.HasTarget || !Core.Me.CurrentTarget.ThoroughCanAttack())
            {
                return(false);
            }

            if (await GambitLogic.Gambit())
            {
                return(true);
            }

            if (!SpellQueueLogic.SpellQueue.Any())
            {
                SpellQueueLogic.InSpellQueue = false;
            }

            if (BotManager.Current.IsAutonomous)
            {
                Movement.NavigateToUnitLos(Core.Me.CurrentTarget, 3);
            }

            if (!Core.Me.HasTarget || !Core.Me.CurrentTarget.ThoroughCanAttack())
            {
                return(false);
            }
            if (Core.Me.CurrentTarget.HasAnyAura(Auras.Invincibility))
            {
                return(false);
            }

            if (await CustomOpenerLogic.Opener())
            {
                return(true);
            }

            if (SpellQueueLogic.SpellQueue.Any())
            {
                if (await SpellQueueLogic.SpellQueueMethod())
                {
                    return(true);
                }
            }
            // Shoha must come out before kaeshi or you overcap

            if (await SingleTarget.KaeshiSetsugekka())
            {
                return(true);
            }
            if (await Aoe.KaeshiGoken())
            {
                return(true);
            }

            if (Utilities.Routines.Samurai.OnGcd)
            {
                //Only cast spells that are instant/off gcd
                if (await PhysicalDps.Interrupt(SamuraiSettings.Instance))
                {
                    return(true);
                }
                if (await SingleTarget.MidareSetsugekka())
                {
                    return(true);
                }
                if (await Aoe.TenkaGoken())
                {
                    return(true);
                }
                if (await SingleTarget.Higanbana())
                {
                    return(true);
                }
                if (await Buff.BloodBath())
                {
                    return(true);
                }
                if (await Aoe.HissatsuKyuten())
                {
                    return(true);
                }
                if (await Aoe.HissatsuGuren())
                {
                    return(true);
                }
                if (await SingleTarget.HissatsuSenei())
                {
                    return(true);
                }
                if (await SingleTarget.HissatsuSeigan())
                {
                    return(true);
                }
                if (await SingleTarget.HissatsuShinten())
                {
                    return(true);
                }
                if (await SingleTarget.HissatsuGuren())
                {
                    return(true);
                }
                if (await Buff.Ikishoten())
                {
                    return(true);
                }
                if (await Buff.SecondWind())
                {
                    return(true);
                }
                if (await Buff.TrueNorth())
                {
                    return(true);
                }
                if (await Buff.MeikyoShisui())
                {
                    return(true);
                }
            }

            if (await SingleTarget.MidareSetsugekka())
            {
                return(true);
            }
            if (await SingleTarget.Shoha())
            {
                return(true);
            }
            if (await Aoe.TenkaGoken())
            {
                return(true);
            }
            if (await Aoe.Oka())
            {
                return(true);
            }
            if (await Aoe.Mangetsu())
            {
                return(true);
            }
            if (await Aoe.Fuga())
            {
                return(true);
            }

            if (await SingleTarget.Higanbana())
            {
                return(true);
            }



            if (await SingleTarget.Gekko())
            {
                return(true);
            }
            if (await SingleTarget.Kasha())
            {
                return(true);
            }
            if (await SingleTarget.Yukikaze())
            {
                return(true);
            }

            #region Last Spell Hakaze

            if (ActionManager.LastSpell == Spells.Hakaze)
            {
                if (Core.Me.ClassLevel < 18)
                {
                    if (await SingleTarget.Jinpu())
                    {
                        return(true);
                    }
                }

                var hasKa    = ActionResourceManager.Samurai.Sen.HasFlag(ActionResourceManager.Samurai.Iaijutsu.Ka);
                var hasGetsu = ActionResourceManager.Samurai.Sen.HasFlag(ActionResourceManager.Samurai.Iaijutsu.Getsu);
                var hasSetsu = ActionResourceManager.Samurai.Sen.HasFlag(ActionResourceManager.Samurai.Iaijutsu.Setsu);

                if (hasGetsu && !hasKa || !hasGetsu && hasKa)
                {
                    if (!Core.Me.HasAura(Auras.Shifu, true, 5000) || !ActionResourceManager.Samurai.Sen.HasFlag(ActionResourceManager.Samurai.Iaijutsu.Ka))
                    {
                        if (await SingleTarget.Shifu())
                        {
                            ViewModels.BaseSettings.Instance.PositionalText = "Flank Position Next";
                            return(true);
                        }
                    }
                    if (!Core.Me.HasAura(Auras.Jinpu, true, 5000) || !ActionResourceManager.Samurai.Sen.HasFlag(ActionResourceManager.Samurai.Iaijutsu.Getsu))
                    {
                        if (await SingleTarget.Jinpu())
                        {
                            ViewModels.BaseSettings.Instance.PositionalText = "Rear Position Next";
                            return(true);
                        }
                    }
                }

                var shifuAuraTimeleft = Core.Me.GetAuraById(Auras.Shifu)?.TimeLeft;
                var jinpuAuraTimeleft = Core.Me.GetAuraById(Auras.Jinpu)?.TimeLeft;

                if (!shifuAuraTimeleft.HasValue)
                {
                    if (await SingleTarget.Shifu())
                    {
                        ViewModels.BaseSettings.Instance.PositionalText = "Flank Position Next";
                        return(true);
                    }
                }
                else if (!jinpuAuraTimeleft.HasValue)
                {
                    if (await SingleTarget.Jinpu())
                    {
                        ViewModels.BaseSettings.Instance.PositionalText = "Rear Position Next";
                        return(true);
                    }
                }
                else if (shifuAuraTimeleft.Value > jinpuAuraTimeleft.Value)
                {
                    if (await SingleTarget.Jinpu())
                    {
                        ViewModels.BaseSettings.Instance.PositionalText = "Rear Position Next";
                        return(true);
                    }
                }
                else
                {
                    if (await SingleTarget.Shifu())
                    {
                        ViewModels.BaseSettings.Instance.PositionalText = "Flank Position Next";
                        return(true);
                    }
                }
            }

            #endregion

            if (await SingleTarget.Hakaze())
            {
                return(true);
            }
            ;

            return(await SingleTarget.Enpi());
        }
コード例 #23
0
        public static async Task <bool> Heal()
        {
            if (await Casting.TrackSpellCast())
            {
                return(true);
            }
            await Casting.CheckForSuccessfulCast();

            Casting.DoHealthChecks = false;

            if (await GambitLogic.Gambit())
            {
                return(true);
            }

            if (Globals.PartyInCombat && Globals.InParty)
            {
                if (await TankBusters.Execute())
                {
                    return(true);
                }
            }
            //force cast logics
            if (await Logic.WhiteMage.Heal.ForceRegen())
            {
                return(true);
            }
            if (await Logic.WhiteMage.Heal.ForceBenediction())
            {
                return(true);
            }
            if (await Logic.WhiteMage.Heal.ForceMedica())
            {
                return(true);
            }
            if (await Logic.WhiteMage.Heal.ForceMedicaII())
            {
                return(true);
            }
            if (await Logic.WhiteMage.Heal.ForceAfflatusSolace())
            {
                return(true);
            }
            if (await Logic.WhiteMage.Heal.ForceAfflatusRapture())
            {
                return(true);
            }
            if (await Logic.WhiteMage.Heal.ForceCureII())
            {
                return(true);
            }
            if (await Logic.WhiteMage.Heal.ForceCureIII())
            {
                return(true);
            }

            if (await Logic.WhiteMage.Heal.ForceTetra())
            {
                return(true);
            }

            if (await SingleTarget.ForceAfflatusMisery())
            {
                return(true);
            }


            if (await Logic.WhiteMage.Heal.Raise())
            {
                return(true);
            }

            // Scalebound Extreme Rathalos
            if (Core.Me.HasAura(1495))
            {
                if (await Dispel.Execute())
                {
                    return(true);
                }
                return(false);
            }

            if (Casting.LastSpell == Spells.PlenaryIndulgence)
            {
                if (await Logic.WhiteMage.Heal.AfflatusRapture())
                {
                    return(true);
                }
                if (await Logic.WhiteMage.Heal.Cure3())
                {
                    return(true);
                }
                if (await Logic.WhiteMage.Heal.Medica2())
                {
                    return(true);
                }
                return(await Spells.Medica.Cast(Core.Me));
            }

            if (await Logic.WhiteMage.Heal.Benediction())
            {
                return(true);
            }
            if (await Dispel.Execute())
            {
                return(true);
            }
            if (await Buff.Temperance())
            {
                return(true);
            }
            if (await Buff.ThinAir(false))
            {
                return(true);
            }
            if (await Buff.DivineBenison())
            {
                return(true);
            }
            if (await Logic.WhiteMage.Heal.PlenaryIndulgence())
            {
                return(true);
            }
            if (await Buff.LucidDreaming())
            {
                return(true);
            }
            if (await Buff.AssizeForMana())
            {
                return(true);
            }
            if (await Buff.PresenceOfMind())
            {
                return(true);
            }
            if (await Logic.WhiteMage.Heal.Tetragrammaton())
            {
                return(true);
            }
            if (await Logic.WhiteMage.Heal.AfflatusSolace())
            {
                return(true);
            }
            if (await Logic.WhiteMage.Heal.Cure3())
            {
                return(true);
            }

            if (Globals.InParty)
            {
                if (await Logic.WhiteMage.Heal.AssizeHeal())
                {
                    return(true);
                }
                if (await Logic.WhiteMage.Heal.Benediction())
                {
                    return(true);
                }
                if (await Logic.WhiteMage.Heal.Tetragrammaton())
                {
                    return(true);
                }
                if (await Logic.WhiteMage.Heal.AfflatusRapture())
                {
                    return(true);
                }
                if (await Logic.WhiteMage.Heal.Medica())
                {
                    return(true);
                }
                if (await Logic.WhiteMage.Heal.Medica2())
                {
                    return(true);
                }
                if (await Logic.WhiteMage.Heal.Cure3())
                {
                    return(true);
                }
                if (await Logic.WhiteMage.Heal.Asylum())
                {
                    return(true);
                }
            }

            if (await Logic.WhiteMage.Heal.Cure2())
            {
                return(true);
            }
            if (await Logic.WhiteMage.Heal.Cure())
            {
                return(true);
            }
            if (await SingleTarget.FluidAura())
            {
                return(true);
            }
            return(await Logic.WhiteMage.Heal.Regen());
        }
コード例 #24
0
        public static async Task <bool> Heal()
        {
            if (WorldManager.InSanctuary)
            {
                return(false);
            }

            if (Core.Me.IsMounted)
            {
                return(false);
            }

            if (await Casting.TrackSpellCast())
            {
                return(true);
            }

            await Casting.CheckForSuccessfulCast();

            Casting.DoHealthChecks = false;

            if (await GambitLogic.Gambit())
            {
                return(true);
            }

            if (await Heals.Ascend())
            {
                return(true);
            }
            if (await Dispel.Execute())
            {
                return(true);
            }

            if ((AstrologianSettings.Instance.WeaveOGCDHeals && GlobalCooldown.CanWeave(1)) || Casting.LastSpellTimeFinishAge.ElapsedMilliseconds > Spells.Malefic.AdjustedCooldown.TotalMilliseconds || !Casting.LastSpellTimeFinishAge.IsRunning)
            {
                if (await Heals.EssentialDignity())
                {
                    return(true);
                }
                if (await Buff.LucidDreaming())
                {
                    return(true);
                }
                if (await Buff.Lightspeed())
                {
                    return(true);
                }
                if (await Buff.NeutralSect())
                {
                    return(true);
                }
            }

            if (Globals.InActiveDuty || Core.Me.InCombat)
            {
                if ((AstrologianSettings.Instance.WeaveOGCDHeals && GlobalCooldown.CanWeave(1)) || Casting.LastSpellTimeFinishAge.ElapsedMilliseconds > Spells.Malefic.AdjustedCooldown.TotalMilliseconds || !Casting.LastSpellTimeFinishAge.IsRunning)
                {
                    if (await Heals.EssentialDignity())
                    {
                        return(true);
                    }
                    if (await Heals.CelestialIntersection())
                    {
                        return(true);
                    }
                    if (await Heals.Macrocosmos())
                    {
                        return(true);
                    }
                    if (await Heals.CelestialOpposition())
                    {
                        return(true);
                    }
                    if (await Heals.LadyOfCrowns())
                    {
                        return(true);
                    }
                    if (await Heals.Horoscope())
                    {
                        return(true);
                    }
                    if (await Heals.HoroscopePop())
                    {
                        return(true);
                    }
                    if (await Heals.Exaltation())
                    {
                        return(true);
                    }
                    if (await Heals.CollectiveUnconscious())
                    {
                        return(true);
                    }
                    if (await Buff.Synastry())
                    {
                        return(true);
                    }
                }

                if (await Heals.AspectedHelios())
                {
                    return(true);
                }
                if (await Heals.Helios())
                {
                    return(true);
                }
                if (await Heals.Benefic2())
                {
                    return(true);
                }
                if (await Heals.Benefic())
                {
                    return(true);
                }
                if (await Heals.AspectedBenefic())
                {
                    return(true);
                }
                if (await Heals.EarthlyStar())
                {
                    return(true);
                }
                if (await Heals.DontLetTheDrkDie())
                {
                    return(true);
                }
            }

            return(await HealAlliance());
        }
コード例 #25
0
        public static async Task <bool> Execute()
        {
            if (await Chocobo.HandleChocobo())
            {
                return(true);
            }

            Group.UpdateAllies(Utilities.Routines.Astrologian.GroupExtension);
            Globals.HealTarget = Group.CastableAlliesWithin30.OrderBy(x => x.CurrentHealthPercent).FirstOrDefault();

            if (await Casting.TrackSpellCast())
            {
                return(true);
            }
            await Casting.CheckForSuccessfulCast();

            Casting.DoHealthChecks = false;

            Globals.InParty       = PartyManager.IsInParty || Globals.InGcInstance;
            Globals.PartyInCombat = Globals.InParty && Utilities.Combat.Enemies.Any(r => r.TaggerType == 2) || Core.Me.InCombat;
            Globals.OnPvpMap      = Core.Me.OnPvpMap();

            if (Duty.State() == Duty.States.Ended)
            {
                return(false);
            }

            if (await GambitLogic.Gambit())
            {
                return(true);
            }

            if (Globals.OnPvpMap)
            {
                if (await Pvp.EssentialDignity())
                {
                    return(true);                              //Heal
                }
                if (await Pvp.Purify())
                {
                    return(true);                    //Dispel/Heal
                }
                if (await Pvp.Muse())
                {
                    return(true);                  //Self-Buff
                }
                if (await Pvp.Lightspeed())
                {
                    return(true);                        //CombatBuff
                }
                if (await Pvp.Synastry())
                {
                    return(true);                      //Heal
                }
                if (await Pvp.Deorbit())
                {
                    return(true);                     //Heal
                }
                if (await Pvp.EmpyreanRain())
                {
                    return(true);                          //Heal
                }
                if (await Pvp.Recuperate())
                {
                    return(true);                        //Self-Heal
                }
                if (await Pvp.Benefic2())
                {
                    return(true);                      //Heal
                }
                if (await Pvp.Benefic())
                {
                    return(true);                     //Heal
                }
                if (await Pvp.Concentrate())
                {
                    return(true);                         //CombatBuff/Heal
                }
                if (await Pvp.Safeguard())
                {
                    return(true);                       //CombatBuff/Shield
                }
                if (await Card.Play())
                {
                    return(true);
                }
                return(await Card.Draw());
            }
            if (Globals.PartyInCombat && Globals.InParty)
            {
                if (await TankBusters.Execute())
                {
                    return(true);
                }
            }

            if (await Logic.Astrologian.Heal.Ascend())
            {
                return(true);
            }

            // Scalebound Extreme Rathalos
            if (Core.Me.HasAura(1495))
            {
                if (await Dispel.Execute())
                {
                    return(true);
                }
                return(false);
            }

            if (await Logic.Astrologian.Heal.EssentialDignity())
            {
                return(true);
            }
            if (await Dispel.Execute())
            {
                return(true);
            }
            if (await Buff.LucidDreaming())
            {
                return(true);
            }
            if (await Buff.Lightspeed())
            {
                return(true);
            }
            if (await Buff.Synastry())
            {
                return(true);
            }
            if (await Buff.CelestialOpposition())
            {
                return(true);
            }

            if (DutyManager.InInstance || Core.Me.InCombat)
            {
                if (Globals.InParty)
                {
                    if (await Logic.Astrologian.Heal.EssentialDignity())
                    {
                        return(true);
                    }
                    if (await Logic.Astrologian.Heal.AspectedHelios())
                    {
                        return(true);
                    }
                    if (await Logic.Astrologian.Heal.CollectiveUnconscious())
                    {
                        return(true);
                    }
                    if (await Logic.Astrologian.Heal.Helios())
                    {
                        return(true);
                    }
                    if (await Logic.Astrologian.Heal.LadyOfCrowns())
                    {
                        return(true);
                    }
                    if (await Logic.Astrologian.Heal.Benefic2())
                    {
                        return(true);
                    }
                }

                if (await Logic.Astrologian.Heal.Benefic())
                {
                    return(true);
                }
                if (await Logic.Astrologian.Heal.AspectedBenefic())
                {
                    return(true);
                }
                if (await Logic.Astrologian.Heal.EarthlyStar())
                {
                    return(true);
                }
            }

            if (await Logic.Astrologian.Heal.LadyOfCrowns())
            {
                return(true);
            }
            if (await Logic.Astrologian.Heal.Benefic())
            {
                return(true);
            }
            if (await Card.Play())
            {
                return(true);
            }
            return(await Card.Draw());
        }
コード例 #26
0
        public static async Task <bool> Heal()
        {
            if (Core.Me.IsMounted)
            {
                return(true);
            }

            if (await Casting.TrackSpellCast())
            {
                return(true);
            }
            await Casting.CheckForSuccessfulCast();

            Casting.DoHealthChecks = false;

            if (await GambitLogic.Gambit())
            {
                return(true);
            }

            if (CustomOpenerLogic.InOpener)
            {
                return(false);
            }

            if (await Logic.Scholar.Heal.Resurrection())
            {
                return(true);
            }

            // Scalebound Extreme Rathalos
            if (Core.Me.HasAura(1495))
            {
                return(await Dispel.Execute());
            }

            #region Pre-Healing Stuff
            if (Globals.PartyInCombat && Globals.InParty)
            {
                // if (await TankBusters.Execute()) return true;
            }

            if (await Logic.Scholar.Heal.ForceWhispDawn())
            {
                return(true);
            }
            if (await Logic.Scholar.Heal.ForceAdlo())
            {
                return(true);
            }
            if (await Logic.Scholar.Heal.ForceIndom())
            {
                return(true);
            }
            if (await Logic.Scholar.Heal.ForceExcog())
            {
                return(true);
            }

            if (await Buff.Aetherflow())
            {
                return(true);
            }
            if (await Buff.LucidDreaming())
            {
                return(true);
            }
            if (await Dispel.Execute())
            {
                return(true);
            }

            if (Globals.InParty)
            {
                if (await Buff.DeploymentTactics())
                {
                    return(true);
                }
                if (await Buff.Aetherpact())
                {
                    return(true);
                }
                if (await Buff.BreakAetherpact())
                {
                    return(true);
                }
            }

            if (await Buff.ChainStrategem())
            {
                return(true);
            }

            #endregion

            if (await Logic.Scholar.Heal.Excogitation())
            {
                return(true);
            }
            if (await Logic.Scholar.Heal.Lustrate())
            {
                return(true);
            }

            if (Core.Me.Pet != null && Core.Me.InCombat)
            {
                if (await Logic.Scholar.Heal.FeyBlessing())
                {
                    return(true);
                }
                if (await Logic.Scholar.Heal.WhisperingDawn())
                {
                    return(true);
                }
                if (await Logic.Scholar.Heal.FeyIllumination())
                {
                    return(true);
                }
                if (await Logic.Scholar.Heal.SummonSeraph())
                {
                    return(true);
                }
                if (await Logic.Scholar.Heal.Consolation())
                {
                    return(true);
                }
            }

            if (Globals.InParty)
            {
                if (await Logic.Scholar.Heal.Indomitability())
                {
                    return(true);
                }
                if (await Logic.Scholar.Heal.Succor())
                {
                    return(true);
                }
                if (await Logic.Scholar.Heal.SacredSoil())
                {
                    return(true);
                }
            }

            if (await Logic.Scholar.Heal.EmergencyTacticsAdlo())
            {
                return(true);
            }
            if (await Logic.Scholar.Heal.Adloquium())
            {
                return(true);
            }
            if (await Logic.Scholar.Heal.Physick())
            {
                return(true);
            }

            if (await Buff.SummonPet())
            {
                return(true);
            }

            if (Utilities.Combat.Enemies.Count > ScholarSettings.Instance.StopDamageWhenMoreThanEnemies)
            {
                return(true);
            }

            if (Globals.InParty)
            {
                if (!ScholarSettings.Instance.DoDamage)
                {
                    return(true);
                }

                if (Core.Me.CurrentManaPercent < ScholarSettings.Instance.MinimumManaPercent)
                {
                    return(true);
                }
            }

            return(await Combat());
        }
コード例 #27
0
ファイル: Heal.cs プロジェクト: nishalp/MagitekRoutine
        public static async Task <bool> Execute()
        {
            if (await Chocobo.HandleChocobo())
            {
                return(true);
            }

            if (Core.Me.IsMounted)
            {
                return(true);
            }

            Group.UpdateAllies(Utilities.Routines.Scholar.GroupExtension);
            Globals.HealTarget = Group.CastableAlliesWithin30.OrderBy(x => x.CurrentHealthPercent).FirstOrDefault();

            if (await Casting.TrackSpellCast())
            {
                return(true);
            }
            await Casting.CheckForSuccessfulCast();

            Casting.DoHealthChecks = false;

            Globals.InParty       = PartyManager.IsInParty || Globals.InGcInstance;
            Globals.PartyInCombat = Globals.InParty && Utilities.Combat.Enemies.Any(r => r.TaggerType == 2) || Core.Me.InCombat;
            Globals.OnPvpMap      = Core.Me.OnPvpMap();

            if (Duty.State() == Duty.States.Ended)
            {
                return(false);
            }

            if (await GambitLogic.Gambit())
            {
                return(true);
            }

            if (CustomOpenerLogic.InOpener)
            {
                return(false);
            }

            if (await Logic.Scholar.Heal.Resurrection())
            {
                return(true);
            }

            // Scalebound Extreme Rathalos
            if (Core.Me.HasAura(1495))
            {
                return(await Dispel.Execute());
            }

            #region Pre-Healing Stuff
            if (Globals.PartyInCombat && Globals.InParty)
            {
                if (await TankBusters.Execute())
                {
                    return(true);
                }
            }

            if (await Buff.Aetherflow())
            {
                return(true);
            }
            if (await Buff.LucidDreaming())
            {
                return(true);
            }
            if (await Dispel.Execute())
            {
                return(true);
            }

            if (Globals.InParty)
            {
                if (await Buff.DeploymentTactics())
                {
                    return(true);
                }
                if (await Buff.Aetherpact())
                {
                    return(true);
                }
                if (await Buff.BreakAetherpact())
                {
                    return(true);
                }
            }

            if (await Buff.ChainStrategem())
            {
                return(true);
            }

            #endregion

            if (await Logic.Scholar.Heal.Excogitation())
            {
                return(true);
            }
            if (await Logic.Scholar.Heal.Lustrate())
            {
                return(true);
            }

            if (Core.Me.Pet != null && Core.Me.InCombat)
            {
                if (await Logic.Scholar.Heal.FeyBlessing())
                {
                    return(true);
                }
                if (await Logic.Scholar.Heal.WhisperingDawn())
                {
                    return(true);
                }
                if (await Logic.Scholar.Heal.FeyIllumination())
                {
                    return(true);
                }
                if (await Logic.Scholar.Heal.SummonSeraph())
                {
                    return(true);
                }
                if (await Logic.Scholar.Heal.Consolation())
                {
                    return(true);
                }
            }

            if (Globals.InParty)
            {
                if (await Logic.Scholar.Heal.Indomitability())
                {
                    return(true);
                }
                if (await Logic.Scholar.Heal.Succor())
                {
                    return(true);
                }
                if (await Logic.Scholar.Heal.SacredSoil())
                {
                    return(true);
                }
            }

            if (await Logic.Scholar.Heal.EmergencyTacticsAdlo())
            {
                return(true);
            }
            if (await Logic.Scholar.Heal.Adloquium())
            {
                return(true);
            }
            if (await Logic.Scholar.Heal.Physick())
            {
                return(true);
            }

            if (await Buff.SummonPet())
            {
                return(true);
            }

            if (Utilities.Combat.Enemies.Count > ScholarSettings.Instance.StopDamageWhenMoreThanEnemies)
            {
                return(true);
            }

            if (PartyManager.IsInParty)
            {
                if (!ScholarSettings.Instance.DoDamage)
                {
                    return(true);
                }

                if (Core.Me.CurrentManaPercent < ScholarSettings.Instance.MinimumManaPercent)
                {
                    return(true);
                }
            }

            return(await Aoe.ArtOfWar());
        }
コード例 #28
0
ファイル: Dancer.cs プロジェクト: hyskylord/MagitekRoutine
        public static async Task <bool> Combat()
        {
            if (BotManager.Current.IsAutonomous)
            {
                if (Core.Me.HasTarget)
                {
                    Movement.NavigateToUnitLos(Core.Me.CurrentTarget, 3 + Core.Me.CurrentTarget.CombatReach);
                }
            }

            if (!SpellQueueLogic.SpellQueue.Any())
            {
                SpellQueueLogic.InSpellQueue = false;
            }

            if (SpellQueueLogic.SpellQueue.Any())
            {
                if (await SpellQueueLogic.SpellQueueMethod())
                {
                    return(true);
                }
            }

            if (!Core.Me.HasTarget || !Core.Me.CurrentTarget.ThoroughCanAttack())
            {
                return(false);
            }

            if (await CustomOpenerLogic.Opener())
            {
                return(true);
            }
            if (await GambitLogic.Gambit())
            {
                return(true);
            }

            if (await Buff.DancePartner())
            {
                return(true);
            }

            if (await Aoe.StarfallDance())
            {
                return(true);
            }
            if (await Dances.Tillana())
            {
                return(true);
            }
            if (await Dances.StandardStep())
            {
                return(true);
            }
            if (await Dances.TechnicalStep())
            {
                return(true);
            }
            if (await Dances.DanceStep())
            {
                return(true);
            }

            if (Core.Me.HasAura(Auras.StandardStep) || Core.Me.HasAura(Auras.TechnicalStep))
            {
                return(false);
            }

            if (DancerRoutine.GlobalCooldown.CanWeave())
            {
                if (await PhysicalDps.Interrupt(DancerSettings.Instance))
                {
                    return(true);
                }
                if (await PhysicalDps.SecondWind(DancerSettings.Instance))
                {
                    return(true);
                }
                if (await Buff.CuringWaltz())
                {
                    return(true);
                }
                if (await Buff.PreTechnicalDevilment())
                {
                    return(true);
                }
                if (await Aoe.FanDance3())
                {
                    return(true);
                }
                if (await Aoe.FanDance2())
                {
                    return(true);
                }
                if (await SingleTarget.FanDance())
                {
                    return(true);
                }
                if (await Aoe.FanDance4())
                {
                    return(true);
                }
                if (await Buff.Flourish())
                {
                    return(true);
                }
                if (await Buff.Devilment())
                {
                    return(true);
                }
                if (await Buff.Improvisation())
                {
                    return(true);
                }
            }

            if (await Aoe.SaberDance())
            {
                return(true);
            }
            if (await Aoe.Bloodshower())
            {
                return(true);
            }
            if (await Aoe.RisingWindmill())
            {
                return(true);
            }
            if (await SingleTarget.Fountainfall())
            {
                return(true);
            }
            if (await SingleTarget.ReverseCascade())
            {
                return(true);
            }
            if (await Aoe.Bladeshower())
            {
                return(true);
            }
            if (await Aoe.Windmill())
            {
                return(true);
            }
            if (await SingleTarget.Fountain())
            {
                return(true);
            }
            return(await SingleTarget.Cascade());
        }
コード例 #29
0
        public static async Task <bool> Heal()
        {
            if (WorldManager.InSanctuary)
            {
                return(false);
            }

            if (Core.Me.IsMounted)
            {
                return(false);
            }

            if (await Casting.TrackSpellCast())
            {
                return(true);
            }

            await Casting.CheckForSuccessfulCast();

            Casting.DoHealthChecks = false;

            if (await GambitLogic.Gambit())
            {
                return(true);
            }

            if (await Logic.Sage.Heal.Egeiro())
            {
                return(true);
            }
            if (await Dispel.Execute())
            {
                return(true);
            }

            if (await Logic.Sage.Heal.ForceZoePneuma())
            {
                return(true);
            }
            if (await Logic.Sage.Heal.ForceEukrasianPrognosis())
            {
                return(true);
            }
            if (await Logic.Sage.Heal.ForceHaima())
            {
                return(true);
            }
            if (await Logic.Sage.Heal.ForcePanhaima())
            {
                return(true);
            }
            if (await Logic.Sage.Heal.ForcePepsisEukrasianPrognosis())
            {
                return(true);
            }

            if (await Logic.Sage.HealFightLogic.Aoe())
            {
                return(true);
            }
            if (await Logic.Sage.HealFightLogic.Tankbuster())
            {
                return(true);
            }

            if (SageRoutine.CanWeave())
            {
                if (await Buff.LucidDreaming())
                {
                    return(true);
                }
                if (await Buff.Rhizomata())
                {
                    return(true);
                }
                if (await Buff.Krasis())
                {
                    return(true);
                }
            }

            if (Globals.InActiveDuty || Core.Me.InCombat)
            {
                if (SageRoutine.CanWeave())
                {
                    if (await Logic.Sage.Heal.Pepsis())
                    {
                        return(true);
                    }
                    if (await Logic.Sage.Heal.Panhaima())
                    {
                        return(true);
                    }
                    if (await Logic.Sage.Heal.Holos())
                    {
                        return(true);
                    }
                    if (await Logic.Sage.Heal.Physis())
                    {
                        return(true);
                    }
                    if (await Logic.Sage.Heal.Ixochole())
                    {
                        return(true);
                    }
                    if (await Logic.Sage.Heal.Kerachole())
                    {
                        return(true);
                    }
                    if (await Logic.Sage.Heal.Haima())
                    {
                        return(true);
                    }
                    if (await Logic.Sage.Heal.Taurochole())
                    {
                        return(true);
                    }
                    if (await Logic.Sage.Heal.Druochole())
                    {
                        return(true);
                    }
                }

                if (await Logic.Sage.Heal.ZoePneuma())
                {
                    return(true);
                }
                if (await Logic.Sage.Heal.PepsisEukrasianPrognosis())
                {
                    return(true);
                }
                if (await Logic.Sage.Heal.Pneuma())
                {
                    return(true);
                }
                if (await Logic.Sage.Heal.EukrasianPrognosis())
                {
                    return(true);
                }
                if (await Logic.Sage.Heal.Prognosis())
                {
                    return(true);
                }
                if (await Logic.Sage.Heal.EukrasianDiagnosis())
                {
                    return(true);
                }
                if (await Logic.Sage.Heal.Diagnosis())
                {
                    return(true);
                }
                if (await Logic.Sage.Shield.ShieldsUpRedAlert())
                {
                    return(true);
                }
            }

            return(await HealAlliance());
        }
コード例 #30
0
        public static async Task <bool> Combat()
        {
            if (!Core.Me.HasTarget || !Core.Me.CurrentTarget.ThoroughCanAttack())
            {
                return(false);
            }

            if (await GambitLogic.Gambit())
            {
                return(true);
            }

            if (!SpellQueueLogic.SpellQueue.Any())
            {
                SpellQueueLogic.InSpellQueue = false;
            }

            if (BotManager.Current.IsAutonomous)
            {
                Movement.NavigateToUnitLos(Core.Me.CurrentTarget, 3 + Core.Me.CurrentTarget.CombatReach);
            }

            if (!Core.Me.HasTarget || !Core.Me.CurrentTarget.ThoroughCanAttack())
            {
                return(false);
            }

            if (Core.Me.CurrentTarget.HasAnyAura(Auras.Invincibility))
            {
                return(false);
            }

            if (await CustomOpenerLogic.Opener())
            {
                return(true);
            }

            if (Core.Me.HasAura(Auras.WaningNocturne, true, 1000))
            {
                return(false);
            }

            //Manage PhantomFlury
            if (Casting.LastSpell == Spells.PhantomFlurry)
            {
                if ((Core.Me.HasAura(Auras.WaxingNocturne, true, 1000) && Core.Me.HasAura(Auras.PhantomFlurry, true, 1000)) || !Core.Me.HasAura(Auras.PhantomFlurry))
                {
                    return(true);
                }
                else
                {
                    return(await Aoe.PhantomFlurryEnd());
                }
            }

            if (SpellQueueLogic.SpellQueue.Any())
            {
                if (await SpellQueueLogic.SpellQueueMethod())
                {
                    return(true);
                }
            }

            //Buff should always be active
            if (await Buff.OffGuard())
            {
                return(true);
            }

            //Buff
            if (await Buff.Whistle())
            {
                return(true);
            }
            if (await Aoe.Tingle())
            {
                return(true);
            }
            if (await Buff.Bristle())
            {
                return(true);
            }
            if (await Buff.MoonFlute())
            {
                return(true);
            }

            //Jump
            if (await Aoe.JKick())
            {
                return(true);
            }

            //DOT should always be active
            if (await SingleTarget.SongOfTorment())
            {
                return(true);
            }

            if (Casting.LastSpell != Spells.Surpanakha || (Casting.LastSpell == Spells.Surpanakha && Spells.Surpanakha.Charges < 1))
            {
                //GCD
                if (await Buff.Swiftcast())
                {
                    return(true);
                }
                if (await SingleTarget.TripleTrident())
                {
                    return(true);
                }
                if (await SingleTarget.MatraMagic())
                {
                    return(true);
                }
                if (await SingleTarget.TheRoseOfDestruction())
                {
                    return(true);
                }
                if (await Aoe.Surpanakha())
                {
                    return(true);
                }

                if (Utilities.Routines.BlueMage.OnGcd && Casting.LastSpell != Spells.Surpanakha)
                {
                    //put oGCD here
                    if (await Aoe.NightBloom())
                    {
                        return(true);
                    }
                    if (await Aoe.PhantomFlurry())
                    {
                        return(true);
                    }
                    if (await Aoe.ShockStrike())
                    {
                        return(true);
                    }
                    if (await Aoe.GlassDance())
                    {
                        return(true);
                    }
                    if (await Aoe.Quasar())
                    {
                        return(true);
                    }
                    if (await Aoe.FeatherRain())
                    {
                        return(true);
                    }
                    if (await Buff.LucidDreaming())
                    {
                        return(true);
                    }

                    if (await Aoe.Eruption())
                    {
                        return(true);                      //FeatherRain if possible, otherwise Eruption
                    }
                    if (await Aoe.MountainBuster())
                    {
                        return(true);                            //ShockStrike if possible, otherwise MountainBuster
                    }
                }

                if (await SingleTarget.SharpKnife())
                {
                    return(true);                                 //if melee
                }
                if (await SingleTarget.AbyssalTransfixion())
                {
                    return(true);                                         //if SonicBoom deactivated
                }
                return(await SingleTarget.SonicBoom());
            }
            else
            {
                //Logger.WriteInfo($@"[Surpanakha] Charges = {Spells.Surpanakha.Charges}");
                return(await Aoe.Surpanakha());
            }
        }