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

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

            await Casting.CheckForSuccessfulCast();

            BardRoutine.RefreshVars();

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

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

            if (BardRoutine.GlobalCooldown.CanWeave())
            {
                // Utility
                if (await Utility.RepellingShot())
                {
                    return(true);
                }
                if (await Utility.WardensPaean())
                {
                    return(true);
                }
                if (await Utility.NaturesMinne())
                {
                    return(true);
                }
                if (await Utility.Troubadour())
                {
                    return(true);
                }
                if (await PhysicalDps.ArmsLength(BardSettings.Instance))
                {
                    return(true);
                }
                if (await PhysicalDps.SecondWind(BardSettings.Instance))
                {
                    return(true);
                }
                if (await PhysicalDps.Interrupt(BardSettings.Instance))
                {
                    return(true);
                }

                // Damage
                if (await SingleTarget.LastPossiblePitchPerfectDuringWM())
                {
                    return(true);
                }
                if (await Songs.LetMeSingYouTheSongOfMyPeople())
                {
                    return(true);
                }
                if (await Cooldowns.RagingStrikes())
                {
                    return(true);
                }
                if (await Cooldowns.BattleVoice())
                {
                    return(true);
                }
                if (await Cooldowns.RadiantFinale())
                {
                    return(true);
                }
                if (await Cooldowns.Barrage())
                {
                    return(true);
                }
                if (await SingleTarget.PitchPerfect())
                {
                    return(true);
                }
                if (await Aoe.RainOfDeathDuringMagesBallard())
                {
                    return(true);
                }
                if (await SingleTarget.BloodletterInMagesBallard())
                {
                    return(true);
                }
                if (await SingleTarget.EmpyrealArrow())
                {
                    return(true);
                }
                if (await SingleTarget.Sidewinder())
                {
                    return(true);
                }
                if (await Aoe.RainOfDeath())
                {
                    return(true);
                }
                if (await SingleTarget.Bloodletter())
                {
                    return(true);
                }
            }

            if (await DamageOverTime.IronJawsOnCurrentTarget())
            {
                return(true);
            }
            if (await DamageOverTime.SnapShotIronJawsOnCurrentTarget())
            {
                return(true);
            }
            if (await SingleTarget.StraightShotAfterBarrage())
            {
                return(true);
            }
            if (await DamageOverTime.WindbiteOnCurrentTarget())
            {
                return(true);
            }
            if (await DamageOverTime.VenomousBiteOnCurrentTarget())
            {
                return(true);
            }
            if (await Aoe.BlastArrow())
            {
                return(true);
            }
            if (await Aoe.ApexArrow())
            {
                return(true);
            }
            if (await Aoe.ShadowBite())
            {
                return(true);
            }
            if (await DamageOverTime.IronJawsOnOffTarget())
            {
                return(true);
            }
            if (await DamageOverTime.WindbiteOnOffTarget())
            {
                return(true);
            }
            if (await DamageOverTime.VenomousBiteOnOffTarget())
            {
                return(true);
            }
            if (await Aoe.LadonsBite())
            {
                return(true);
            }
            if (await SingleTarget.StraightShot())
            {
                return(true);
            }
            return(await SingleTarget.HeavyShot());
        }
コード例 #2
0
ファイル: Combat.cs プロジェクト: nishalp/MagitekRoutine
        public static async Task <bool> Execute()
        {
            Group.UpdateAllies();

            if (Core.Me.IsCasting)
            {
                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) || Core.Me.InCombat;
            Utilities.Routines.Bard.RefreshVars();

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

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

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

            if (Weaving.GetCurrentWeavingCounter() < 2 && Spells.HeavyShot.Cooldown.TotalMilliseconds > 650 + BaseSettings.Instance.UserLatencyOffset)
            {
                // Utility
                if (await Utility.RepellingShot())
                {
                    return(true);
                }
                if (await Utility.WardensPaean())
                {
                    return(true);
                }
                if (await Utility.NaturesMinne())
                {
                    return(true);
                }
                if (await Utility.Troubadour())
                {
                    return(true);
                }
                if (await PhysicalDps.ArmsLength(BardSettings.Instance))
                {
                    return(true);
                }
                if (await PhysicalDps.SecondWind(BardSettings.Instance))
                {
                    return(true);
                }
                if (await Utility.HeadGraze())
                {
                    return(true);
                }

                // Damage
                if (await SingleTarget.LastPossiblePitchPerfectDuringWM())
                {
                    return(true);
                }
                if (await Songs.LetMeSingYouTheSongOfMyPeople())
                {
                    return(true);
                }
                if (await Cooldowns.BattleVoice())
                {
                    return(true);
                }
                if (await Cooldowns.RagingStrikes())
                {
                    return(true);
                }
                if (await Cooldowns.Barrage())
                {
                    return(true);
                }
                if (await SingleTarget.PitchPerfect())
                {
                    return(true);
                }
                if (await Aoe.RainOfDeathDuringMagesBallard())
                {
                    return(true);
                }
                if (await SingleTarget.BloodletterInMagesBallard())
                {
                    return(true);
                }
                if (await SingleTarget.EmpyrealArrow())
                {
                    return(true);
                }
                if (await Aoe.ShadowBite())
                {
                    return(true);
                }
                if (await SingleTarget.Sidewinder())
                {
                    return(true);
                }
                if (await Aoe.RainOfDeath())
                {
                    return(true);
                }
                if (await SingleTarget.Bloodletter())
                {
                    return(true);
                }
            }

            if (await SingleTarget.StraightShotAfterBarrage())
            {
                return(true);
            }
            if (await DamageOverTime.IronJawsOnCurrentTarget())
            {
                return(true);
            }
            if (await DamageOverTime.SnapShotIronJawsOnCurrentTarget())
            {
                return(true);
            }
            if (await DamageOverTime.WindbiteOnCurrentTarget())
            {
                return(true);
            }
            if (await DamageOverTime.VenomousBiteOnCurrentTarget())
            {
                return(true);
            }
            if (await Aoe.ApexArrow())
            {
                return(true);
            }
            if (await DamageOverTime.IronJawsOnOffTarget())
            {
                return(true);
            }
            if (await DamageOverTime.WindbiteOnOffTarget())
            {
                return(true);
            }
            if (await DamageOverTime.VenomousBiteOnOffTarget())
            {
                return(true);
            }
            if (await Aoe.QuickNock())
            {
                return(true);
            }
            if (await SingleTarget.StraightShot())
            {
                return(true);
            }
            return(await SingleTarget.HeavyShot());
        }