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

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

            var target = FightLogic.EnemyIsCastingTankBuster();

            if (target == null)
            {
                return(false);
            }

            if (!target.BeingTargetedBy(Core.Me.CurrentTarget))
            {
                while (Group.CastableTanks.Any(r => !r.HasAura(Auras.Galvanize)))
                {
                    await FightLogic.DoAndBuffer(
                        Spells.Adloquium.Heal(Group.CastableTanks.FirstOrDefault(r => !r.HasAura(Auras.Galvanize))));

                    await Coroutine.Yield();
                }

                return(true);
            }


            if (ScholarSettings.Instance.FightLogicExcogTank &&
                Spells.Excogitation.IsKnownAndReady() &&
                Core.Me.HasAetherflow() &&
                !target.HasAura(Auras.Excogitation))
            {
                return(await FightLogic.DoAndBuffer(Spells.Excogitation.CastAura(target, Auras.Excogitation)));
            }


            if (ScholarSettings.Instance.FightLogicAdloTank &&
                Spells.Adloquium.IsKnownAndReady() &&
                !target.HasAura(Auras.Galvanize))
            {
                return(await FightLogic.DoAndBuffer(Spells.Adloquium.HealAura(target, Auras.Galvanize)));
            }

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

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

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

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

            if (AstrologianSettings.Instance.FightLogic_Exaltation)
            {
                var tankBusterOnPartyMember = FightLogic.EnemyIsCastingTankBuster();

                if (tankBusterOnPartyMember == null)
                {
                    return(false);
                }

                return(await FightLogic.DoAndBuffer(
                           Spells.Exaltation.HealAura(tankBusterOnPartyMember, Auras.Exaltation)));
            }

            var tankToShieldAndHeal = Group.CastableTanks.FirstOrDefault(x =>
                                                                         x.CurrentHealthPercent < AstrologianSettings.Instance.ExaltationHealthPercent &&
                                                                         x.CheckTankImmunity() == TankImmunityCheck.HealThem);

            if (tankToShieldAndHeal == null)
            {
                return(false);
            }

            return(await Spells.Exaltation.HealAura(tankToShieldAndHeal, Auras.Exaltation));
        }
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);
        }
Example #4
0
        public static async Task <bool> Tankbuster()
        {
            if (!Globals.InParty)
            {
                return(false);
            }

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

            var target = FightLogic.EnemyIsCastingTankBuster();

            if (target == null)
            {
                target = FightLogic.EnemyIsCastingSharedTankBuster();

                if (target == null)
                {
                    return(false);
                }
            }

            if (SageSettings.Instance.FightLogic_Haima &&
                Spells.Haima.IsKnownAndReady() &&
                !target.HasAura(Auras.Haimatinon) &&
                !target.HasAura(Auras.Panhaimatinon) &&
                Spells.Haima.CanCast(target))
            {
                if (BaseSettings.Instance.DebugFightLogic)
                {
                    Logger.WriteInfo($"[TankBuster Response] Cast Haima on {target.Name}");
                }
                return(await FightLogic.DoAndBuffer(Spells.Haima.CastAura(target, Auras.Haimatinon)));
            }

            if (SageSettings.Instance.FightLogic_Taurochole &&
                Spells.Taurochole.IsKnownAndReady() &&
                !target.HasAura(Auras.Taurochole) &&
                Spells.Taurochole.CanCast(target))
            {
                if (BaseSettings.Instance.DebugFightLogic)
                {
                    Logger.WriteInfo($"[TankBuster Response] Cast Taurochole on {target.Name}");
                }
                return(await FightLogic.DoAndBuffer(Spells.Taurochole.HealAura(target, Auras.Taurochole)));
            }

            if (SageSettings.Instance.FightLogic_EukrasianDiagnosis &&
                Core.Me.ClassLevel >= Spells.Eukrasia.LevelAcquired &&
                !target.HasAura(Auras.EukrasianDiagnosis) &&
                !target.HasAura(Auras.Galvanize) &&
                !target.HasAura(Auras.EukrasianPrognosis) &&
                Heal.IsEukrasiaReady())
            {
                if (BaseSettings.Instance.DebugFightLogic)
                {
                    Logger.WriteInfo($"[TankBuster Response] Cast Eukrasian Diagnosis on {target.Name}");
                }
                if (await Heal.UseEukrasia(targetObject: target))
                {
                    return(await FightLogic.DoAndBuffer(Spells.EukrasianDiagnosis.HealAura(target, Auras.EukrasianDiagnosis)));
                }
            }

            return(false);
        }