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);
        }
Beispiel #2
0
        public static void CastE(List <Obj_AI_Base> enemies, bool ks, bool goUnderEnemyTower)
        {
            if (!Program.E.IsReady() || YasuoCalcs.IsDashing() || didActionThisTick || !enemies.Any(a => a.MeetsCriteria() && a.IsInRange(Yasuo, Program.E.Range)))
            {
                return;
            }

            Obj_AI_Base unit = enemies.Where(a =>
                                             a.MeetsCriteria() &&
                                             a.IsInRange(Yasuo, Program.E.Range) &&
                                             (!ks || YasuoCalcs.E(a) >= a.Health) &&
                                             YasuoCalcs.ERequirements(a, goUnderEnemyTower)
                                             ).FirstOrDefault();

            if (unit != null)
            {
                CastE(unit);
            }
        }
Beispiel #3
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;
            }
        }