Exemplo n.º 1
0
        public static async Task <bool> Combat()
        {
            //Only stop doing damage when in party
            if (Globals.InParty && Utilities.Combat.Enemies.Count > SageSettings.Instance.StopDamageWhenMoreThanEnemies)
            {
                return(false);
            }

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

            if (!GameSettingsManager.FaceTargetOnAction &&
                !Core.Me.CurrentTarget.InView())
            {
                return(false);
            }

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

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

            if (Globals.OnPvpMap)
            {
                return(false);
            }

            if (SageRoutine.CanWeave())
            {
                if (await Buff.Kardia())
                {
                    return(true);
                }
                if (await Buff.Soteria())
                {
                    return(true);
                }
            }

            if (Core.Me.CurrentManaPercent < SageSettings.Instance.MinimumManaPercentToDoDamage &&
                Core.Target.CombatTimeLeft() > SageSettings.Instance.DoDamageIfTimeLeftLessThan)
            {
                if (await AoE.Toxikon())
                {
                    return(true);
                }
                return(true);
            }

            if (await AoE.Toxikon())
            {
                return(true);
            }
            if (await AoE.Phlegma())
            {
                return(true);
            }
            if (await AoE.Pneuma())
            {
                return(true);
            }
            if (await SingleTarget.EukrasianDosis())
            {
                return(true);
            }
            if (await SingleTarget.DotMultipleTargets())
            {
                return(true);
            }
            if (await AoE.Dyskrasia())
            {
                return(true);
            }
            return(await SingleTarget.Dosis());
        }