Example #1
0
        public static async Task <bool> NeutralSect()
        {
            if (!AstrologianSettings.Instance.NeutralSect)
            {
                return(false);
            }

            if (!Core.Me.InCombat)
            {
                return(false);
            }

            if (!Spells.NeutralSect.IsKnownAndReady())
            {
                return(false);
            }

            if (AstrologianSettings.Instance.FightLogic_NeutralSectAspectedHelios && FightLogic.EnemyIsCastingBigAoe() && (AstrologianSettings.Instance.FightLogic_Macrocosmos && !Spells.Macrocosmos.IsKnownAndReady()) && !Core.Me.HasAnyAura(AstroUtils.ScholarAndSageShieldsNotToOverwrite))
            {
                return(await FightLogic.DoAndBuffer(Spells.NeutralSect.CastAura(Core.Me, Auras.NeutralSect)));
            }

            var neutral = Group.CastableAlliesWithin15.Count(r => r.CurrentHealth > 0 &&
                                                             r.CurrentHealthPercent <= AstrologianSettings.Instance.NeutralSectHealthPercent);

            if (neutral < AstrologianSettings.Instance.NeutralSectAllies)
            {
                return(false);
            }

            return(await Spells.NeutralSect.CastAura(Core.Me, Auras.NeutralSect));
        }
Example #2
0
        public static async Task <bool> FightLogic_ArcaneCrest()
        {
            if (!Spells.ArcaneCrest.IsKnownAndReady())
            {
                return(false);
            }

            if (!FightLogic.ZoneHasFightLogic() || !FightLogic.EnemyHasAnyAoeLogic())
            {
                return(false);
            }

            if (FightLogic.EnemyIsCastingAoe() || FightLogic.EnemyIsCastingBigAoe())
            {
                return(await FightLogic.DoAndBuffer(Spells.ArcaneCrest.CastAura(Core.Me, Auras.CrestOfTimeBorrowed)));
            }

            return(false);
        }
Example #3
0
        public static async Task <bool> FightLogic_Feint()
        {
            if (!Spells.Feint.IsKnownAndReady())
            {
                return(false);
            }

            if (!FightLogic.ZoneHasFightLogic())
            {
                return(false);
            }

            if (FightLogic.EnemyIsCastingAoe() ||
                FightLogic.EnemyIsCastingBigAoe() ||
                FightLogic.EnemyIsCastingTankBuster() != null ||
                FightLogic.EnemyIsCastingSharedTankBuster() != null)
            {
                return(await FightLogic.DoAndBuffer(Spells.Feint.CastAura(Core.Me.CurrentTarget, Auras.Feint)));
            }

            return(false);
        }
        public static async Task <bool> Aoe()
        {
            if (!Globals.InParty)
            {
                return(false);
            }

            if (!FightLogic.ZoneHasFightLogic())
            {
                return(false);
            }

            if (FightLogic.EnemyIsCastingBigAoe())
            {
                return(await BigAoe());
            }

            if (FightLogic.EnemyIsCastingAoe())
            {
                return(await JustAoe());
            }

            return(false);
        }
Example #5
0
        public static async Task <bool> Lightspeed()
        {
            if (!AstrologianSettings.Instance.Lightspeed)
            {
                return(false);
            }

            if (!Core.Me.InCombat)
            {
                return(false);
            }

            if (Combat.CombatTotalTimeLeft <= 25)
            {
                return(false);
            }

            if (!Spells.Lightspeed.IsKnownAndReady())
            {
                return(false);
            }

            if (Spells.EssentialDignity.Charges > 0)
            {
                return(false);
            }

            if (Globals.InParty)
            {
                if (AstrologianSettings.Instance.FightLogic_Lightspeed && FightLogic.EnemyIsCastingBigAoe() && !Spells.NeutralSect.IsKnownAndReady() && !Spells.Macrocosmos.IsKnownAndReady())
                {
                    return(await FightLogic.DoAndBuffer(Spells.Lightspeed.CastAura(Core.Me, Auras.Lightspeed)));
                }

                if (AstrologianSettings.Instance.LightspeedTankOnly && Group.CastableTanks.All(r => r.CurrentHealthPercent >= AstrologianSettings.Instance.LightspeedHealthPercent))
                {
                    return(false);
                }

                if (!Spells.Horoscope.IsReady())
                {
                    return(false);
                }

                if (!Spells.CelestialOpposition.IsReady())
                {
                    return(false);
                }

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

                if (Group.CastableAlliesWithin15.Count(r => r.CurrentHealthPercent <= AstrologianSettings.Instance.LightspeedHealthPercent) > Heals.AoeThreshold)
                {
                    return(await Spells.Lightspeed.CastAura(Core.Me, Auras.Lightspeed));
                }
            }

            if (Core.Me.CurrentHealthPercent >= 40f)
            {
                return(false);
            }

            return(await Spells.Lightspeed.CastAura(Core.Me, Auras.Lightspeed));
        }
Example #6
0
        public static async Task <bool> Aoe()
        {
            if (!Globals.InParty)
            {
                return(false);
            }

            if (!FightLogic.ZoneHasFightLogic())
            {
                return(false);
            }

            if (!FightLogic.EnemyIsCastingBigAoe() && !FightLogic.EnemyIsCastingAoe())
            {
                return(false);
            }

            var useAoEBuffs = Heal.UseAoEHealingBuff(Group.CastableAlliesWithin15);

            if (SageSettings.Instance.FightLogic_Kerachole &&
                Spells.Kerachole.IsKnownAndReady() &&
                Addersgall >= 1 &&
                useAoEBuffs)
            {
                var targets   = Group.CastableAlliesWithin15.Where(r => !r.HasAura(Auras.Kerachole) && !r.HasAura(Auras.Taurochole));
                var tankCheck = !SageSettings.Instance.FightLogic_RespectOnlyTank ||
                                !SageSettings.Instance.KeracholeOnlyWithTank ||
                                targets.Any(r => r.IsTank(SageSettings.Instance.KeracholeOnlyWithMainTank));

                if (targets.Count() >= Heal.AoeNeedHealing &&
                    tankCheck)
                {
                    if (BaseSettings.Instance.DebugFightLogic)
                    {
                        Logger.WriteInfo($"[AOE Response] Cast Kerachole");
                    }
                    return(await FightLogic.DoAndBuffer(Spells.Kerachole.CastAura(Core.Me, Auras.Kerachole)));
                }
            }

            if (SageSettings.Instance.FightLogic_Panhaima &&
                Spells.Panhaima.IsKnownAndReady() &&
                useAoEBuffs)
            {
                var targets   = Group.CastableAlliesWithin15.Where(r => !r.HasAura(Auras.Panhaimatinon));
                var tankCheck = !SageSettings.Instance.FightLogic_RespectOnlyTank ||
                                !SageSettings.Instance.PanhaimaOnlyWithTank ||
                                targets.Any(r => r.IsTank(SageSettings.Instance.PanhaimaOnlyWithMainTank));

                if (targets.Count() >= Heal.AoeNeedHealing &&
                    tankCheck)
                {
                    if (BaseSettings.Instance.DebugFightLogic)
                    {
                        Logger.WriteInfo($"[AOE Response] Cast Panhaima");
                    }
                    return(await FightLogic.DoAndBuffer(Spells.Panhaima.CastAura(Core.Me, Auras.Panhaimatinon)));
                }
            }

            if (SageSettings.Instance.FightLogic_Holos &&
                Spells.Holos.IsKnownAndReady() &&
                useAoEBuffs)
            {
                var targets   = Group.CastableAlliesWithin15.Where(r => !r.HasAura(Auras.Holos));
                var tankCheck = !SageSettings.Instance.FightLogic_RespectOnlyTank ||
                                !SageSettings.Instance.HolosTankOnly ||
                                targets.Any(r => r.IsTank(SageSettings.Instance.HolosMainTankOnly));

                if (targets.Count() >= Heal.AoeNeedHealing &&
                    tankCheck)
                {
                    if (BaseSettings.Instance.DebugFightLogic)
                    {
                        Logger.WriteInfo($"[AOE Response] Cast Holos");
                    }
                    return(await FightLogic.DoAndBuffer(Spells.Holos.CastAura(Core.Me, Auras.Holos)));
                }
            }

            if (SageSettings.Instance.FightLogic_EukrasianPrognosis &&
                Core.Me.ClassLevel >= Spells.Eukrasia.LevelAcquired &&
                Heal.IsEukrasiaReady())
            {
                var targets = Group.CastableAlliesWithin15.Where(r => !r.HasAura(Auras.EukrasianDiagnosis) &&
                                                                 !r.HasAura(Auras.EukrasianPrognosis) &&
                                                                 !r.HasAura(Auras.Galvanize));
                var tankCheck = !SageSettings.Instance.FightLogic_RespectOnlyTank ||
                                targets.Any(r => r.IsTank());

                if (targets.Count() >= Heal.AoeNeedHealing &&
                    tankCheck)
                {
                    if (BaseSettings.Instance.DebugFightLogic)
                    {
                        Logger.WriteInfo($"[AOE Response] Cast Eukrasian Prognosis");
                    }
                    if (await Heal.UseEukrasia(Spells.EukrasianPrognosis.Id))
                    {
                        return(await FightLogic.DoAndBuffer(Spells.EukrasianPrognosis.HealAura(Core.Me, Auras.EukrasianPrognosis)));
                    }
                }
            }

            return(false);
        }
Example #7
0
        public static async Task <bool> Macrocosmos()
        {
            if (!AstrologianSettings.Instance.Macrocosmos)
            {
                return(false);
            }

            if (!Core.Me.InCombat)
            {
                return(false);
            }

            if (!Globals.InParty)
            {
                return(false);
            }

            if (!Spells.Macrocosmos.IsKnown())
            {
                return(false);
            }

            if (Core.Me.HasMyAura(Auras.Macrocosmos))
            {
                return(await Microcosmos());
            }

            if (!Spells.Macrocosmos.IsReady())
            {
                return(false);
            }

            if (Group.CastableAlliesWithin20.Any(x => x.HasAura(Auras.Macrocosmos)))
            {
                return(false);
            }

            if (AstrologianSettings.Instance.FightLogic_Macrocosmos && FightLogic.EnemyIsCastingBigAoe())
            {
                return(await FightLogic.DoAndBuffer(Spells.Macrocosmos.HealAura(Core.Me, Auras.Macrocosmos)));
            }

            var enemyCount = Combat.Enemies.Count();

            if (enemyCount == 0)
            {
                return(false);
            }

            if (enemyCount > PartyManager.NumMembers)
            {
                if (Combat.Enemies.All(x => x.WithinSpellRange(Spells.Macrocosmos.Radius) && Group.CastableAlliesWithin20.Count() == PartyManager.NumMembers))
                {
                    return(await Spells.Macrocosmos.HealAura(Core.Me, Auras.Macrocosmos));
                }
            }

            var isThereABoss = Combat.Enemies.Any(x => x.IsBoss());

            if (isThereABoss || !Group.CastableTanks.All(x =>
                                                         x.Distance() <= Spells.Macrocosmos.Radius && x.CurrentHealthPercent < 30f) ||
                enemyCount <= AoeThreshold)
            {
                return(false);
            }

            return(await Spells.Macrocosmos.HealAura(Core.Me, Auras.Macrocosmos));
        }