コード例 #1
0
ファイル: Ninja.cs プロジェクト: newb23/MagitekRoutine
        public static async Task <bool> PreCombatBuff()
        {
            await Casting.CheckForSuccessfulCast();

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

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

            if (!NinjaSettings.Instance.UseHutonOutsideOfCombat)
            {
                return(false);
            }

            if (NinjaSettings.Instance.UseHutonOutsideOfCombat)
            {
                if (WorldManager.InSanctuary)
                {
                    return(false);
                }
            }

            return(Ninjutsu.Huton());
        }
コード例 #2
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);
        }
コード例 #3
0
        public static async Task <bool> Execute()
        {
            if (await Chocobo.HandleChocobo())
            {
                return(true);
            }

            await Casting.CheckForSuccessfulCast();

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

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

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

            if (!NinjaSettings.Instance.UseHutonOutsideOfCombat)
            {
                return(false);
            }

            if (NinjaSettings.Instance.UseHutonOutsideOfCombat)
            {
                if (!DutyManager.InInstance)
                {
                    return(false);
                }
            }

            return(Ninjutsu.Huton());
        }
コード例 #4
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());
        }
コード例 #5
0
ファイル: Combat.cs プロジェクト: thadeusb/MagitekRoutine
        public static async Task <bool> Execute()
        {
            if (BotManager.Current.IsAutonomous)
            {
                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 PhysicalDps.Interrupt(NinjaSettings.Instance))
            {
                return(true);
            }

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

            if (Utilities.Routines.Ninja.OnGcd)
            {
                if (await PhysicalDps.SecondWind(NinjaSettings.Instance))
                {
                    return(true);
                }
                if (await PhysicalDps.Bloodbath(NinjaSettings.Instance))
                {
                    return(true);
                }
                if (await PhysicalDps.Feint(NinjaSettings.Instance))
                {
                    return(true);
                }

                if (Core.Me.HasAura(Auras.Suiton))
                {
                    if (await PhysicalDps.TrueNorth(NinjaSettings.Instance))
                    {
                        return(true);
                    }
                }

                if (await Buff.ShadeShift())
                {
                    return(true);
                }
                if (await Buff.Bunshin())
                {
                    return(true);
                }
                if (await SingleTarget.Assassinate())
                {
                    return(true);
                }
                if (await SingleTarget.Mug())
                {
                    return(true);
                }
                if (await Buff.Kassatsu())
                {
                    return(true);
                }
                if (await SingleTarget.TrickAttack())
                {
                    return(true);
                }
                if (await SingleTarget.DreamWithinADream())
                {
                    return(true);
                }
                if (await Aoe.HellfrogMedium())
                {
                    return(true);
                }
                if (await SingleTarget.Bhavacakra())
                {
                    return(true);
                }
                if (await Ninjutsu.TenChiJin())
                {
                    return(true);
                }
            }

            if (Ninjutsu.Huton())
            {
                return(true);
            }
            if (Ninjutsu.GokaMekkyaku())
            {
                return(true);
            }
            if (Ninjutsu.Doton())
            {
                return(true);
            }
            if (Ninjutsu.Katon())
            {
                return(true);
            }
            if (Ninjutsu.Suiton())
            {
                return(true);
            }
            if (Ninjutsu.HyoshoRanryu())
            {
                return(true);
            }
            if (Ninjutsu.Raiton())
            {
                return(true);
            }
            if (Ninjutsu.FumaShuriken())
            {
                return(true);
            }

            if (await Aoe.HakkeMujinsatsu())
            {
                return(true);
            }
            if (await Aoe.DeathBlossom())
            {
                return(true);
            }
            if (await SingleTarget.ShadowFang())
            {
                return(true);
            }
            if (await SingleTarget.ArmorCrush())
            {
                return(true);
            }
            if (await SingleTarget.AeolianEdge())
            {
                return(true);
            }
            if (await SingleTarget.GustSlash())
            {
                return(true);
            }
            return(await SingleTarget.SpinningEdge());
        }
コード例 #6
0
        public static async Task <bool> Combat()
        {
            if (BotManager.Current.IsAutonomous)
            {
                Movement.NavigateToUnitLos(Core.Me.CurrentTarget, 3 + Core.Me.CurrentTarget.CombatReach);
            }

            Utilities.Routines.Monk.RefreshVars();

            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.FistsOf())
            {
                return(true);
            }

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

            //var count = Utilities.Combat.Enemies.Count;
            //if (2 >= count && count < 5)
            //{
            //    //TODO: Add 2-4 target DPS rotation
            //}
            //else if (count >= 5)
            //{
            //    //TODO: Add 5+ target DPS rotation
            //}
            if (!Core.Me.HasAura(Auras.Anatman) || MonkSettings.Instance.UseManualPB && Core.Me.HasAura(Auras.PerfectBalance))
            {
                if (Weaving.GetCurrentWeavingCounter() < 2 && Spells.Bootshine.Cooldown.TotalMilliseconds > 750 + BaseSettings.Instance.UserLatencyOffset)
                {
                    if (await PhysicalDps.Interrupt(MonkSettings.Instance))
                    {
                        return(true);
                    }
                    if (await PhysicalDps.SecondWind(MonkSettings.Instance))
                    {
                        return(true);
                    }
                    if (await PhysicalDps.Bloodbath(MonkSettings.Instance))
                    {
                        return(true);
                    }
                    if (await PhysicalDps.Feint(MonkSettings.Instance))
                    {
                        return(true);
                    }
                    if (await Buff.RiddleOfFire())
                    {
                        return(true);
                    }
                    if (await Buff.Brotherhood())
                    {
                        return(true);
                    }
                    if (await SingleTarget.TornadoKick())
                    {
                        return(true);
                    }
                    if (await Aoe.Enlightenment())
                    {
                        return(true);
                    }
                    if (await SingleTarget.TheForbiddenChakra())
                    {
                        return(true);
                    }
                    if (await SingleTarget.ShoulderTackle())
                    {
                        return(true);
                    }
                    if (await Buff.PerfectBalance())
                    {
                        return(true);
                    }
                    if (await Buff.TrueNorthRiddleOfEarth())
                    {
                        return(true);
                    }
                    //if (await Buff.RiddleOfFire()) return true;
                    //if (await Buff.Brotherhood()) return true;
                    if (await SingleTarget.ElixirField())
                    {
                        return(true);
                    }
                }
                if (await Aoe.Rockbreaker())
                {
                    return(true);
                }
                if (await Aoe.FourPointStrike())
                {
                    return(true);
                }
                if (await Aoe.ArmOfDestroyer())
                {
                    return(true);
                }
                if (await SingleTarget.PerfectBalanceRoT())
                {
                    return(true);
                }
                //if (await Aoe.Rockbreaker()) return true;
                //if (await Aoe.FourPointStrike()) return true;
                //if (await Aoe.ArmOfDestroyer()) return true;
                if (await SingleTarget.Demolish())
                {
                    return(true);
                }
                if (await SingleTarget.SnapPunch())
                {
                    return(true);
                }
                if (await SingleTarget.TwinSnakes())
                {
                    return(true);
                }
                if (await SingleTarget.TrueStrike())
                {
                    return(true);
                }
                if (await SingleTarget.Bootshine())
                {
                    return(true);
                }
                if (await SingleTarget.DragonKick())
                {
                    return(true);
                }
                return(await Buff.FormShiftIC());
            }

            return(false);
        }
コード例 #7
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());
        }
コード例 #8
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());
            }
        }
コード例 #9
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());
        }
コード例 #10
0
ファイル: Ninja.cs プロジェクト: newb23/MagitekRoutine
        public static async Task <bool> Combat()
        {
            Utilities.Routines.Ninja.RefreshVars();
            //Logger.Write("Ninki:" + Utilities.Routines.Ninja.ninki);
            if (BotManager.Current.IsAutonomous)
            {
                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 (!Core.Me.HasTarget || !Core.Me.CurrentTarget.ThoroughCanAttack())
            {
                return(false);
            }

            if (await PhysicalDps.Interrupt(NinjaSettings.Instance))
            {
                return(true);
            }

            //if (Core.Me.HasAura(Auras.TenChiJin))
            //{
            //    Logger.Error("Capturd TCJ");
            //    //Let's check which TCJ we will do. 1=Suiton/2-Doton
            //    if (Utilities.Routines.Ninja.AoeEnemies5Yards > 1 && Utilities.Routines.Ninja.TCJState == 0 && !Core.Me.HasAura(Auras.Doton))
            //    {
            //        Utilities.Routines.Ninja.TCJState = 2;
            //    }
            //    if (Utilities.Routines.Ninja.AoeEnemies5Yards < 2 && Utilities.Routines.Ninja.TCJState == 0)
            //    {
            //        Utilities.Routines.Ninja.TCJState = 1;
            //    }

            //    if (Utilities.Routines.Ninja.TCJState == 1)
            //    {
            //        if (Casting.LastSpell == Spells.Chi)
            //        {
            //            Utilities.Routines.Ninja.TCJState = 0;
            //            return await Spells.Jin.Cast(Core.Me.CurrentTarget);
            //        }

            //        if (Casting.LastSpell == Spells.Ten)
            //        {
            //            return await Spells.Chi.Cast(Core.Me.CurrentTarget);
            //        }

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

            //    if (Utilities.Routines.Ninja.TCJState == 2)
            //    {
            //        if (Casting.LastSpell == Spells.Jin)
            //        {
            //            Utilities.Routines.Ninja.TCJState = 0;
            //            return await Spells.Chi.Cast(Core.Me);
            //        }

            //        if (Casting.LastSpell == Spells.Ten)
            //        {
            //            return await Spells.Jin.Cast(Core.Me.CurrentTarget);
            //        }

            //        return await Spells.Ten.Cast(Core.Me.CurrentTarget);
            //    }
            //}
            if (Ninjutsu.ForceRaiton())
            {
                return(true);
            }
            if (Spells.SpinningEdge.Cooldown.TotalMilliseconds > 650)
            {
                //Utility Force Toggle
                if (await PhysicalDps.ArmsLength(NinjaSettings.Instance))
                {
                    return(true);
                }
                if (await Utility.SecondWindForce())
                {
                    return(true);
                }
                if (await Utility.ShadeShift())
                {
                    return(true);
                }
                if (await Utility.TrueNorth())
                {
                    return(true);
                }
                if (await Utility.Feint())
                {
                    return(true);
                }
                if (await Utility.BloodBath())
                {
                    return(true);
                }

                if (await PhysicalDps.SecondWind(NinjaSettings.Instance))
                {
                    return(true);
                }

                //if (await PhysicalDps.SecondWind(NinjaSettings.Instance)) return true;
                if (await SingleTarget.TrickAttack())
                {
                    return(true);
                }
                if (await Ninjutsu.TenChiJin())
                {
                    return(true);
                }
                if (await Buff.Meisui())
                {
                    return(true);
                }
                //if (await Buff.TrueNorth()) return true;
                //if (await Buff.ShadeShift()) return true;
                if (await Buff.Bunshin())
                {
                    return(true);
                }
                if (await SingleTarget.Assassinate())
                {
                    return(true);
                }
                if (await Aoe.HellfrogMedium())
                {
                    return(true);
                }
                if (await SingleTarget.Bhavacakra())
                {
                    return(true);
                }
                if (await SingleTarget.Mug())
                {
                    return(true);
                }
                if (await Buff.Kassatsu())
                {
                    return(true);
                }
                if (await SingleTarget.DreamWithinADream())
                {
                    return(true);
                }
            }
            if (await SingleTarget.ShadowFang())
            {
                return(true);
            }

            //Ninjutsu
            if (NinjutsuCheck())
            {
                if (Ninjutsu.Huton())
                {
                    return(true);
                }
                if (Ninjutsu.GokaMekkyaku())
                {
                    return(true);
                }
                if (Ninjutsu.Doton())
                {
                    return(true);
                }
                if (Ninjutsu.Katon())
                {
                    return(true);
                }
                if (Ninjutsu.Suiton())
                {
                    return(true);
                }
                if (Ninjutsu.HyoshoRanryu())
                {
                    return(true);
                }
                if (Ninjutsu.Raiton())
                {
                    return(true);
                }
                //if (Ninjutsu.FumaShuriken()) return true;
            }

            if (await Aoe.HakkeMujinsatsu())
            {
                return(true);
            }
            if (await Aoe.DeathBlossom())
            {
                return(true);
            }
            if (await SingleTarget.ArmorCrush())
            {
                return(true);
            }
            if (await SingleTarget.AeolianEdge())
            {
                return(true);
            }
            if (await SingleTarget.GustSlash())
            {
                return(true);
            }
            return(await SingleTarget.SpinningEdge());
        }
コード例 #11
0
        public static async Task <bool> Execute()
        {
            if (BotManager.Current.IsAutonomous)
            {
                Movement.NavigateToUnitLos(Core.Me.CurrentTarget, 3 + Core.Me.CurrentTarget.CombatReach);
            }

            Utilities.Routines.Monk.RefreshVars();

            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.FistsOf())
            {
                return(true);
            }

            //var count = Utilities.Combat.Enemies.Count;
            //if (2 >= count && count < 5)
            //{
            //    //TODO: Add 2-4 target DPS rotation
            //}
            //else if (count >= 5)
            //{
            //    //TODO: Add 5+ target DPS rotation
            //}

            if (!Core.Me.HasAura(Auras.Anatman))
            {
                if (Utilities.Routines.Monk.OnGcd)
                {
                    if (await Buff.Brotherhood())
                    {
                        return(true);
                    }
                    if (await SingleTarget.TheForbiddenChakra())
                    {
                        return(true);
                    }
                    if (await SingleTarget.ShoulderTackle())
                    {
                        return(true);
                    }
                    if (await Buff.PerfectBalance())
                    {
                        return(true);
                    }
                    if (await PhysicalDps.TrueNorth(MonkSettings.Instance))
                    {
                        return(true);
                    }
                    if (await Buff.RiddleOfFire())
                    {
                        return(true);
                    }
                    if (await Buff.RiddleOfEarth())
                    {
                        return(true);
                    }
                    if (await Aoe.ElixerField())
                    {
                        return(true);
                    }
                }
                if (SingleTarget.PerfectBalanceRoT())
                {
                    return(true);
                }
                if (await Aoe.Rockbreaker())
                {
                    return(true);
                }
                if (await Aoe.FourPointStrike())
                {
                    return(true);
                }
                if (await Aoe.ArmOfDestroyer())
                {
                    return(true);
                }
                if (await SingleTarget.Demolish())
                {
                    return(true);
                }
                if (await SingleTarget.SnapPunch())
                {
                    return(true);
                }
                if (await SingleTarget.TwinSnakes())
                {
                    return(true);
                }
                if (await SingleTarget.TrueStrike())
                {
                    return(true);
                }
                if (await SingleTarget.Bootshine())
                {
                    return(true);
                }
                if (await SingleTarget.DragonKick())
                {
                    return(true);
                }
                return(await Buff.FormShift());
            }
            else
            {
                return(false);
            }
        }
コード例 #12
0
ファイル: Summoner.cs プロジェクト: newb23/MagitekRoutine
        public static async Task <bool> Combat()
        {
            if (BotManager.Current.IsAutonomous)
            {
                if (Core.Me.HasTarget)
                {
                    Movement.NavigateToUnitLos(Core.Me.CurrentTarget, 20);
                }
            }

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

            //Logger.Write("Aetherflow Count: " + MagitekActionResourceManager.Arcanist.Aetherflow);
            //Logger.Write("Can Trance: " + MagitekActionResourceManager.Arcanist.CanTrance);
            //Logger.Write("In Trance: " + MagitekActionResourceManager.Arcanist.CanTrance);

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

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

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

            if (Core.Me.CurrentTarget.HasAura(Auras.MagicResistance))
            {
                return(false);
            }

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

            //if (await SingleTarget.Ruin4MaxStacks()) return true;


            if (await Aoe.Bane())
            {
                return(true);
            }
            if (await Buff.DreadwyrmTrance())
            {
                return(true);
            }
            if (await SingleTarget.EnkindleBahamut())
            {
                return(true);
            }
            if (await Pets.SummonBahamut())
            {
                return(true);
            }
            if (await SingleTarget.Deathflare())
            {
                return(true);
            }
            if (await SingleTarget.TriDisaster())
            {
                return(true);
            }
            if (await Pets.Summon())
            {
                return(true);
            }
            if (await Buff.LucidDreaming())
            {
                return(true);
            }
            if (await SingleTarget.Enkindle())
            {
                return(true);
            }
            if (await Buff.Aetherpact())
            {
                return(true);
            }

            if (await Aoe.Painflare())
            {
                return(true);
            }
            if (await SingleTarget.Fester())
            {
                return(true);
            }
            if (await Aoe.EnergySiphon())
            {
                return(true);
            }
            if (await SingleTarget.EnergyDrain())
            {
                return(true);
            }

            if (await SingleTarget.Miasma())
            {
                return(true);
            }
            if (await SingleTarget.Bio())
            {
                return(true);
            }
            if (await SingleTarget.EgiAssault2())
            {
                return(true);
            }
            if (await SingleTarget.EgiAssault())
            {
                return(true);
            }
            if (await Aoe.Outburst())
            {
                return(true);
            }
            if (await SingleTarget.Ruin4())
            {
                return(true);
            }
            return(await SingleTarget.Ruin());
        }
コード例 #13
0
        public static async Task <bool> Execute()
        {
            if (BotManager.Current.IsAutonomous)
            {
                if (Core.Me.HasTarget)
                {
                    Movement.NavigateToUnitLos(Core.Me.CurrentTarget, 20);
                }
            }

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

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

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

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

            if (Core.Me.CurrentTarget.HasAura(Auras.MagicResistance))
            {
                return(false);
            }

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

            if (await SingleTarget.Ruin4MaxStacks())
            {
                return(true);
            }
            if (Utilities.Routines.Summoner.OnGcd || !ActionResourceManager.Summoner.DreadwyrmTrance)
            {
                if (await SingleTarget.Ruin4())
                {
                    return(true);
                }
                if (await Aoe.Bane())
                {
                    return(true);
                }
                if (await Buff.DreadwyrmTrance())
                {
                    return(true);
                }
                if (await SingleTarget.EnkindleBahamut())
                {
                    return(true);
                }
                if (await Pets.SummonBahamut())
                {
                    return(true);
                }
                if (await SingleTarget.Deathflare())
                {
                    return(true);
                }
                if (await SingleTarget.TriDisaster())
                {
                    return(true);
                }
                if (await Buff.LucidDreaming())
                {
                    return(true);
                }
                if (await SingleTarget.Enkindle())
                {
                    return(true);
                }
                if (await SingleTarget.EgiAssault2())
                {
                    return(true);
                }
                if (await SingleTarget.EgiAssault())
                {
                    return(true);
                }
                if (await Aoe.Painflare())
                {
                    return(true);
                }
                if (await SingleTarget.Fester())
                {
                    return(true);
                }
                if (await Aoe.EnergySiphon())
                {
                    return(true);
                }
                if (await SingleTarget.EnergyDrain())
                {
                    return(true);
                }
            }

            if (await Buff.DreadwyrmTrance())
            {
                return(true);
            }
            if (await SingleTarget.TriDisaster())
            {
                return(true);
            }
            if (await SingleTarget.Miasma())
            {
                return(true);
            }
            if (await SingleTarget.Bio())
            {
                return(true);
            }
            if (await Aoe.Outburst())
            {
                return(true);
            }
            return(await SingleTarget.Ruin());
        }
コード例 #14
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());
            }
        }
コード例 #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());
        }