Пример #1
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);
        }
Пример #2
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);
        }