public static float ComboDamage(this AIHeroClient enemy)
        {
            float qdmg      = Program.Q.IsReady() ? YasuoCalcs.Q(enemy) : 0;
            float edmg      = Program.E.IsReady() ? YasuoCalcs.E(enemy) : 0;
            float autoDmg   = Player.Instance.GetAutoAttackDamage(enemy) * MenuHandler.Drawing.GetSliderValue("Autos used in Combo");
            float qTotalDmg = qdmg * MenuHandler.Drawing.GetSliderValue("Q's used in Combo");
            float tiamat    = Player.Instance.GetItem(ItemId.Tiamat) != null && Player.Instance.GetItem(ItemId.Tiamat).CanUseItem() ? DamageLibrary.GetItemDamage(Player.Instance, enemy, ItemId.Tiamat) : 0;
            float thydra    = Player.Instance.GetItem(ItemId.Titanic_Hydra) != null && Player.Instance.GetItem(ItemId.Titanic_Hydra).CanUseItem() ? DamageLibrary.GetItemDamage(Player.Instance, enemy, ItemId.Titanic_Hydra) : 0;
            float rhydra    = Player.Instance.GetItem(ItemId.Ravenous_Hydra) != null && Player.Instance.GetItem(ItemId.Ravenous_Hydra).CanUseItem() ? DamageLibrary.GetItemDamage(Player.Instance, enemy, ItemId.Ravenous_Hydra) : 0;

            float comboDamage = qTotalDmg + edmg + autoDmg + tiamat + thydra + rhydra;

            return(comboDamage);
        }
Пример #2
0
        public static void CastEQ(List <Obj_AI_Base> dashEnemies, bool ks, bool goUnderEnemyTower, List <Obj_AI_Base> EQEnemies = null)
        {
            if (!Program.E.IsReady() || !YasuoCalcs.WillQBeReady() || didActionThisTick ||
                !dashEnemies.Any(a => a.IsInRange(Yasuo, Program.E.Range)) ||
                Yasuo.GetNearbyEnemies(Program.E.Range).Count() == 0 || YasuoCalcs.IsDashing())
            {
                return;
            }

            if (EQEnemies == null)
            {
                EQEnemies = dashEnemies;
            }

            int         numberOfEnemiesHitWithEQ = 0;
            Obj_AI_Base unitToDashTo             = null;

            List <Obj_AI_Base> possibleDashUnits = dashEnemies.Where(a => a.MeetsCriteria() && a.IsInRange(Yasuo, Program.E.Range) && YasuoCalcs.ERequirements(a, goUnderEnemyTower) && a.Health > YasuoCalcs.E(a)).ToList();

            foreach (Obj_AI_Base possibleDashUnit in possibleDashUnits)
            {
                List <Obj_AI_Base> unitsHitWithEQ = EQEnemies.Where(a => a.MeetsCriteria() && a.Position(250).IsInRange(YasuoCalcs.GetDashingEnd(possibleDashUnit), Program.EQ.Range)).ToList();
                if (ks)
                {
                    unitsHitWithEQ = unitsHitWithEQ.Where(a => a.Health <= YasuoCalcs.Q(a) || (a.Name == possibleDashUnit.Name && a.Health <= YasuoCalcs.Q(a) + YasuoCalcs.E(a))).ToList();
                }

                if (numberOfEnemiesHitWithEQ < unitsHitWithEQ.Count())
                {
                    numberOfEnemiesHitWithEQ = unitsHitWithEQ.Count();
                    unitToDashTo             = possibleDashUnit;
                }
            }

            if (unitToDashTo != null && numberOfEnemiesHitWithEQ >= 1 && !didActionThisTick)
            {
                CastE(unitToDashTo);
                if (YasuoCalcs.GetQReadyTimeInt() == 0)
                {
                    Core.DelayAction(delegate { CastEQsQ(EQEnemies); }, 100);
                }
                else
                {
                    Core.DelayAction(delegate { CastEQsQ(EQEnemies); }, YasuoCalcs.GetQReadyTimeInt());
                }
                didActionThisTick = true;
            }
        }
Пример #3
0
        public static void CastQ(List <Obj_AI_Base> enemies, bool ks)
        {
            if (didActionThisTick || !Program.Q.IsReady() || YasuoCalcs.IsDashing() ||
                !enemies.Any(a =>
                             (Yasuo.HasBuff("YasuoQ3W") && a.IsInRange(Yasuo, Program.Q3.Range)) || (!Yasuo.HasBuff("YasuoQ3W") && a.IsInRange(Yasuo, Program.Q.Range))) ||
                !Yasuo.IsAutoCanceling(enemies))
            {
                return;
            }

            if (ks)
            {
                enemies = enemies.Where(a => YasuoCalcs.Q(a) >= a.Health).ToList();
            }

            int     enemiesHit = 0;
            Vector3 bestPos    = Vector3.Zero;

            if (Yasuo.HasBuff("YasuoQ3W"))
            {
                bestPos = Program.Q3.GetBestLinearPredictionPos(enemies, Yasuo.Position, out enemiesHit);
            }
            else
            {
                bestPos = Program.Q.GetBestLinearPredictionPos(enemies, Yasuo.Position + new Vector3(0, 0, 150f), out enemiesHit);
            }

            if (bestPos != Vector3.Zero && enemiesHit > 0)
            {
                if (Yasuo.HasBuff("YasuoQ3W"))
                {
                    didActionThisTick = Program.Q3.Cast(bestPos);
                }
                else
                {
                    didActionThisTick = Program.Q.Cast(bestPos);
                }
            }
        }