Exemplo n.º 1
0
        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 (!Core.Me.HasTarget || !Core.Me.CurrentTarget.ThoroughCanAttack())
            {
                return(false);
            }


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

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

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

            if (await Buff.LucidDreaming())
            {
                return(true);
            }
            if (await Pets.SummonCarbuncleOrEgi())
            {
                return(true);
            }
            if (await Aoe.EnergySiphon())
            {
                return(true);
            }
            if (await SingleTarget.EnergyDrain())
            {
                return(true);
            }
            if (await SingleTarget.Enkindle())
            {
                return(true);
            }
            if (await Aoe.AstralFlow())
            {
                return(true);
            }
            if (await Aoe.CrimsonStrike())
            {
                return(true);
            }
            if (await Aoe.Painflare())
            {
                return(true);
            }
            if (await SingleTarget.Fester())
            {
                return(true);
            }
            if (await Buff.Aethercharge())
            {
                return(true);
            }
            if (await Aoe.Ruin4())
            {
                return(true);
            }
            if (await Aoe.Outburst())
            {
                return(true);
            }
            return(await SingleTarget.Ruin());
        }