Example #1
0
        public static bool EnemyHasShield(Obj_AI_Hero target)
        {
            var status = false;

            if (target.HasBuff("blackshield"))
            {
                status = true;
            }

            if (target.HasBuff("sivire"))
            {
                status = true;
            }

            if (target.HasBuff("nocturneshroudofdarkness"))
            {
                status = true;
            }

            if (target.HasBuff("bansheesveil"))
            {
                status = true;
            }
            return status;
        }
Example #2
0
        private static int calcDamage(Obj_AI_Hero target)
        {
            //var vTarget = SimpleTs.GetTarget(Q.Range, SimpleTs.DamageType.Physical);
            // normal damage 2 Auto Attacks
            var AA = Player.CalcDamage(target, Damage.DamageType.Physical, Player.FlatPhysicalDamageMod + Player.BaseAttackDamage);
            var damage = AA;

            if (_igniteSlot != SpellSlot.Unknown &&
            Player.SummonerSpellbook.CanUseSpell(_igniteSlot) == SpellState.Ready)
            damage += ObjectManager.Player.GetSummonerSpellDamage(target, Damage.SummonerSpell.Ignite);

            if (Items.HasItem(3153) && Items.CanUseItem(3153))
            damage += Player.GetItemDamage(target, Damage.DamageItems.Botrk); //ITEM BOTRK

            if (E.IsReady() && Config.Item("UseE").GetValue<bool>()) // edamage
            {
            damage += Player.CalcDamage(target, Damage.DamageType.Physical,
            10 + (E.Level * 30) + (Player.FlatPhysicalDamageMod * 0.2));
            }

            if (Q.IsReady() && Config.Item("UseQ").GetValue<bool>()) // qdamage
            {
            damage += Player.CalcDamage(target, Damage.DamageType.Physical,
            30 + (Q.Level * 40) + (Player.FlatPhysicalDamageMod * 0.65));
            }

            if (!IsValorMode() && target.HasBuff("QuinnW") && E.IsReady())
            {
            damage += Player.CalcDamage(target, Damage.DamageType.Physical,
            15 + (Player.Level * 10) + (Player.FlatPhysicalDamageMod * 0.5)) * 2; // //if target has buff and E is ready passive*2
            }

            if (!IsValorMode() && !target.HasBuff("QuinnW") && E.IsReady()) // if e ISANT ready then calculate only 1 time passive
            {
            damage += Player.CalcDamage(target, Damage.DamageType.Physical,
            15 + (Player.Level * 10) + (Player.FlatPhysicalDamageMod * 0.5)); // passive
            }

            if (!IsValorMode() && target.HasBuff("QuinnW") && !E.IsReady()) // if e ISANT ready then calculate only 1 time passive
            {
            damage += Player.CalcDamage(target, Damage.DamageType.Physical,
            15 + (Player.Level * 10) + (Player.FlatPhysicalDamageMod * 0.5)); // passive
            }

            if (R.IsReady() && Config.Item("UseR").GetValue<bool>()) // rdamage
            {
            if (Player.CalcDamage(target, Damage.DamageType.Physical, (75 + (R.Level * 55) + (Player.FlatPhysicalDamageMod * 0.5)) * (2 - ((target.Health - damage - AA*3) / target.MaxHealth))) > target.Health)
            {
                damage += Player.CalcDamage(target, Damage.DamageType.Physical, (75 + (R.Level * 55) + (Player.FlatPhysicalDamageMod * 0.5)) * (2 - ((target.Health - damage) / target.MaxHealth)));
            }
            }

            return (int)damage;
        }
Example #3
0
 public static bool ShouldUseCleanse(Obj_AI_Hero target)
 {
     return target.HasBuffOfType(BuffType.Charm)
         || target.HasBuffOfType(BuffType.Flee)
         || target.HasBuffOfType(BuffType.Polymorph)
         || target.HasBuffOfType(BuffType.Snare)
         || target.HasBuffOfType(BuffType.Stun)
         || target.HasBuffOfType(BuffType.Taunt)
         || target.HasBuff("summonerexhaust")
         || target.HasBuff("summonerdot");
 }
Example #4
0
 /// <summary>
 /// Defines whether the player should use cleanse.
 /// </summary>
 public static bool ShouldUseCleanse(Obj_AI_Hero target)
 =>
     !ObjectManager.Player.IsInvulnerable &&
     !IsSpellShielded(ObjectManager.Player) &&
     (
         Bools.IsValidStun() ||
         Bools.IsValidSnare() ||
         target.HasBuff("summonerdot") ||
         target.HasBuff("summonerexhaust") ||
         target.HasBuffOfType(BuffType.Flee) ||
         target.HasBuffOfType(BuffType.Charm) ||
         target.HasBuffOfType(BuffType.Taunt) ||
         target.HasBuffOfType(BuffType.Polymorph)
     );
 public static bool Check(Obj_AI_Hero target, DamageType damageType = DamageType.True, bool ignoreShields = true)
 {
     try
     {
         if (target.HasBuffOfType(BuffType.Invulnerability) || target.IsInvulnerable)
         {
             return true;
         }
         foreach (var invulnerable in Items)
         {
             if (invulnerable.Champion == null || invulnerable.Champion == target.ChampionName)
             {
                 if (invulnerable.DamageType == null || invulnerable.DamageType == damageType)
                 {
                     if (!ignoreShields && invulnerable.IsShield && target.HasBuff(invulnerable.BuffName))
                     {
                         return true;
                     }
                     if (invulnerable.CustomCheck != null && CustomCheck(invulnerable, target, damageType))
                     {
                         return true;
                     }
                 }
             }
         }
         return false;
     }
     catch (Exception ex)
     {
         Global.Logger.AddItem(new LogItem(ex));
     }
     return false;
 }
 public static bool Check(Obj_AI_Hero target, DamageType damageType = DamageType.True, bool ignoreShields = true)
 {
     if (target.HasBuffOfType(BuffType.Invulnerability) || target.IsInvulnerable)
     {
         return true;
     }
     foreach (var invulnerable in Items)
     {
         if (invulnerable.Champion == null || invulnerable.Champion == target.ChampionName)
         {
             if (invulnerable.DamageType == null || invulnerable.DamageType == damageType)
             {
                 if (!ignoreShields && invulnerable.IsShield && target.HasBuff(invulnerable.BuffName))
                 {
                     return true;
                 }
                 if (invulnerable.CustomCheck != null)
                 {
                     return CustomCheck(invulnerable, target, damageType);
                 }
             }
         }
     }
     return false;
 }
Example #7
0
        public override void Execute(Obj_AI_Hero target)
        {
            if (target == null)
                target = TargetSelector.GetTarget(1200, TargetSelector.DamageType.Magical);
            if (target == null) return;

            var dmgPerBounce = ObjectManager.Player.GetSpellDamage(target, Slot) + BrandCombo.GetPassiveDamage(target);
            if (dmgPerBounce > target.Health && target.Distance(ObjectManager.Player) > 750)
            {
                TryBridgeUlt(target);

                //   Console.WriteLine("ayy lmao bridge bois");
            }

            if (dmgPerBounce > target.Health && !Provider.ShouldBeDead(target) && ObjectManager.Player.GetAutoAttackDamage(target, true) < target.Health && ((_otherSkills.All(skill => skill.Instance.State != SpellState.Ready && skill.Instance.State != SpellState.Surpressed /*&& !skill.IsSafeCasting(1)*/) /*|| target.Distance(ObjectManager.Player) > 650*/) || ObjectManager.Player.GetSpellDamage(target, SpellSlot.Q) + dmgPerBounce + ObjectManager.Player.GetAutoAttackDamage(target) > target.Health && !target.HasBuff("brandablaze") && target.Distance(ObjectManager.Player) < 750))
            {
                if (ObjectManager.Player.HealthPercent - target.HealthPercent < OverkillPercent || !AntiOverkill || IgnoreAntiOverkillOnFlee && target.Distance(ObjectManager.Player) > ObjectManager.Player.AttackRange)
                {
                    Cast(target);
                }
                else if (ObjectManager.Player.HealthPercent < target.HealthPercent && IgniteManager.CanBeUsed() && IgniteManager.GetDamage() + dmgPerBounce > target.Health)
                {
                    if (target.Distance(ObjectManager.Player) < 600)
                        IgniteManager.UseIgnite(target);
                    Cast(target);
                }
            }

            // if (target.Distance(ObjectManager.Player) > 750) return;
            var inBounce = new bool[HeroManager.Enemies.Count];
            var canBounce = BounceCheck(target, inBounce);
            if (canBounce)
            {

                var inBounceEnemies = HeroManager.Enemies.Where(enemy => inBounce[HeroManager.Enemies.IndexOf(enemy)]).ToArray();
                var distance = target.Distance(ObjectManager.Player);

                var bounceCount = inBounce.Count(item => item);
                if (bounceCount <= 1) return;
                //Console.WriteLine("bounce r " + bounceCount);

                if ((inBounceEnemies.Any(enemy => (dmgPerBounce > enemy.Health && MaxDamage > enemy.Health)) && (bounceCount == 2 || RiskyUlt)))
                {
                    TryUlt(target, inBounceEnemies, distance);
                }
                else if (bounceCount == 2 && dmgPerBounce * 3 > target.Health && MaxDamage > target.Health && distance < 750 && RiskyUlt)
                {
                    Cast(target);
                }
                else if (dmgPerBounce * 2 > target.Health && MaxDamage > target.Health)
                {
                    TryUlt(target, inBounceEnemies, distance);
                }
                else if (UltNonKillable && MinBounceTargets <= bounceCount)
                {
                    TryUlt(target, inBounceEnemies, distance, false);
                }
            }
        }
Example #8
0
        public override void Interruptable(ComboProvider combo, Obj_AI_Hero sender, ComboProvider.InterruptableSpell interruptableSpell, float endTime)
        {
            var distance = sender.Distance(ObjectManager.Player);
            if (sender.HasBuff("brandablaze") || Provider.IsMarked(sender) || !_brandQ.CouldHit(sender) || !InterruptW) return;

            if (Cast(sender) == CastStates.SuccessfullyCasted)
                Provider.SetMarked(sender); //Todo: risky, keep an eye on this. If the W misses u r fucked
        }
Example #9
0
        public static float GetRealDamage(Obj_AI_Hero target)
        {
            if (target.HasBuff("ferocioushowl"))
            {
                return Program.E.GetDamage(target) * 0.7f;
            }

            return Program.E.GetDamage(target);
        }
Example #10
0
 public static bool Check(Obj_AI_Hero target, DamageType damageType = DamageType.True, bool ignoreShields = true)
 {
     return target.HasBuffOfType(BuffType.Invulnerability) || target.IsInvulnerable ||
            (from invulnerable in Items
                where invulnerable.Champion == null || invulnerable.Champion == target.ChampionName
                where invulnerable.DamageType == null || invulnerable.DamageType == damageType
                where target.HasBuff(invulnerable.BuffName)
                where !ignoreShields || !invulnerable.IsShield
                select invulnerable).Any(
                    invulnerable =>
                        invulnerable.CheckFunction == null || CheckFunction(invulnerable, target, damageType));
 }
Example #11
0
        //some part of combo from diabaths
        private void Combo(Obj_AI_Hero t)
        {
 

            if (R.IsReady())
            {
                if (t.IsValidTarget(Q.Range) && !haveUlti)
                    if (!t.HasBuff("JudicatorIntervention") && !t.HasBuff("Undying Rage"))
                        R.CastIfHitchanceEquals(t, HitChance.Medium);
            }
            if ( E.IsReady() && t.IsValidTarget(Q.Range) && Q.IsReady())
            {
                //xsalice Code
                var vec = t.ServerPosition - Player.ServerPosition;
                var castBehind = E.GetPrediction(t).CastPosition + Vector3.Normalize(vec) * 100;
                E.Cast(castBehind);
            }
            if (t.IsValidTarget(Q.Range) && Q.IsReady() && _epos != default(Vector3) &&
                t.IsValidTarget(200, true, _epos))
            {
                Q.Cast(_epos);
            }

            if (W.IsReady())
            {
                if (t.IsValidTarget(W.Range))
                    W.Cast();
            }
            if (Q.IsReady() && !E.IsReady())
            {
                if (t.IsValidTarget(Q.Range))
                    Q.Cast(t, UsePackets, true);
            }
            if (R.IsReady() && !haveUlti)
            {
                if (GetNumberHitByR(t) >= 2)
                    R.Cast(t, UsePackets, true);
            }
        }
Example #12
0
        public static float GetKsDamage(Obj_AI_Hero t, Spell QWER)
        {
            var totalDmg = QWER.GetDamage(t);
            totalDmg -= t.HPRegenRate;

            if (totalDmg > t.Health)
            {
                if (ObjectManager.Player.HasBuff("summonerexhaust"))
                    totalDmg = totalDmg * 0.6f;

                if (t.HasBuff("ferocioushowl"))
                    totalDmg = totalDmg * 0.7f;

                if (t.ChampionName == "Blitzcrank" && !t.HasBuff("BlitzcrankManaBarrierCD") && !t.HasBuff("ManaBarrier"))
                {
                    totalDmg -= t.Mana / 2f;
                }
            }
            //if (Thunderlord && !Player.HasBuff( "masterylordsdecreecooldown"))
            //totalDmg += (float)Player.CalcDamage(t, Damage.DamageType.Magical, 10 * Player.Level + 0.1 * Player.FlatMagicDamageMod + 0.3 * Player.FlatPhysicalDamageMod);
            totalDmg += (float)OktwCommon.GetIncomingDamage(t);
            return totalDmg;
        }
Example #13
0
 /// <summary>
 /// Judge Target MoveMent Status (This Part From SebbyLib)
 /// </summary>
 /// <param name="Target">Target</param>
 /// <returns></returns>
 public static bool CanMove(Obj_AI_Hero Target)
 {
     if (Target.MoveSpeed < 50 || Target.IsStunned || Target.HasBuffOfType(BuffType.Stun) ||
         Target.HasBuffOfType(BuffType.Fear) || Target.HasBuffOfType(BuffType.Snare) ||
         Target.HasBuffOfType(BuffType.Knockup) || Target.HasBuff("Recall") ||
         Target.HasBuffOfType(BuffType.Knockback) || Target.HasBuffOfType(BuffType.Charm) ||
         Target.HasBuffOfType(BuffType.Taunt) || Target.HasBuffOfType(BuffType.Suppression)
         || (Target.IsCastingInterruptableSpell() && !Target.IsMoving))
     {
         return false;
     }
     else
         return true;
 }
Example #14
0
        public override void Execute(Obj_AI_Hero target)
        {
            if (_brandQWE.Any(spell => spell.Instance.State == SpellState.Ready || spell.Instance.CooldownExpires > Game.Time && spell.Instance.CooldownExpires - Game.Time < spell.Instance.Cooldown / 2f) || _w.Instance.Cooldown - (_w.Instance.CooldownExpires - Game.Time) < 1)
            {
                if ((!target.HasBuff("brandablaze") || target.GetBuff("brandablaze").EndTime - Game.Time < Delay) && !Provider.IsMarked(target) && !(ObjectManager.Player.GetSpellDamage(target, Instance.Slot) + ObjectManager.Player.GetAutoAttackDamage(target, true) > target.Health))
                    return;
            }

            //if ((((!target.HasBuff("brandablaze") || target.GetBuff("brandablaze").EndTime - Game.Time < Delay) && !Provider.IsMarked(target)) &&
            //    (!(ObjectManager.Player.GetSpellDamage(target, Instance.Slot) + ObjectManager.Player.GetAutoAttackDamage(target, true) > target.Health))) &&
            //    _brandQWE.Any(spell => spell.Instance.State == SpellState.Ready || spell.Instance.CooldownExpires > Game.Time && spell.Instance.CooldownExpires - Game.Time < spell.Instance.Cooldown / 2f)) return;
            //// wenn any skill ready || half cooldown

            Cast(target);
        }
Example #15
0
 public static float Q2Damage(Obj_AI_Hero target,Spell Q)
 {
     if (target == null)
     {
         return 0f;
     }
     var damage = 0f;
     if (target.HasBuff("BlindMonkQOne") && Q.Instance.Name == "blindmonkqtwo")
     {
         var total = Q2Dmg[Q.Level - 1] + 0.9*ObjectManager.Player.FlatPhysicalDamageMod +
                     0.08*(target.MaxHealth - target.Health);
         damage += (float)ObjectManager.Player.CalcDamage(target, Damage.DamageType.Physical, total);
     }
     return (float)damage;
 }
Example #16
0
        public static float Damage(Obj_AI_Hero target)
        {
            double dmg = 0f;

            if (target.HasBuff("TristanaECharge"))
            {
                dmg += Variables.E.GetDamage(target) * (0.3 * target.GetBuffCount("TristanaECharge") + 1);
            }

            if (Variables.R.IsReady())
            {
                dmg += Variables.R.GetDamage(target);
            }

            return (float)dmg;
        }
Example #17
0
        public static float GetDamage(Obj_AI_Hero hero)
        {
            var baseDamage = Variables.spells[SpellSlot.E].GetDamage(hero);

            if (ObjectManager.Player.HasBuff("summonerexhaust"))
            {
                baseDamage *= 0.4f;
            }

            if (hero.HasBuff("FerociousHowl"))
            {
                baseDamage *= 0.35f;
            }

            return baseDamage;
        }
Example #18
0
        public static void OnInterruptableTarget(Obj_AI_Hero sender, Interrupter2.InterruptableTargetEventArgs args)
        {
            if (!MenuConfig.InterruptMenu || !sender.IsEnemy || !sender.IsValidTarget(Spells.W.Range) || sender.HasBuff("FioraW"))
            {
                return;
            }

            if (Spells.W.IsReady())
            {
                Spells.W.Cast(sender);
            }

            if (Qstack != 3)
            {
                return;
            }

            Spells.Q.Cast(sender);
        }
Example #19
0
        public static float EDamage(Obj_AI_Hero unit)
        {
            float damage = 0;
            if (unit == null) return 0;
            var data = Player.Buffs.FirstOrDefault(b => b.DisplayName == "TristanaECharge");
                var i = data != null ? data.Count : 0;
            
            var buff = unit.GetBuff("TristanaECharge").Count;
            if (!unit.HasBuff("tristanaechargesound"))
                return 0;
            if (i != 0)
            {
                damage += (float) (Tristana.E.GetDamage(unit)*((0.3*(i + 1)))
                                   + (Player.TotalMagicalDamage*0.5));
                damage += BonusDamagePerStack(unit)*(i + 1);
            }

            return damage;
        }
Example #20
0
 // ReSharper restore StringLiteralTypo
 public static bool HasBuff(Obj_AI_Hero target,
     LeagueSharp.Common.TargetSelector.DamageType damageType = LeagueSharp.Common.TargetSelector.DamageType.True,
     bool ignoreShields = true)
 {
     try
     {
         return target.HasBuffOfType(BuffType.Invulnerability) ||
                Invulnerables.Any(
                    i =>
                        (i.Champion == null || i.Champion == target.ChampionName) &&
                        (!ignoreShields || !i.IsShield) && (i.DamageType == null || i.DamageType == damageType) &&
                        target.HasBuff(i.BuffName) &&
                        (i.CustomCheck == null || i.CustomCheck(target, damageType)));
     }
     catch (Exception ex)
     {
         Global.Logger.AddItem(new LogItem(ex));
     }
     return false;
 }
        /// <summary>
        ///     Get the E damage.
        /// </summary>
        /// <param name="target">
        ///     The target.
        /// </param>
        /// <returns>
        /// </returns>
        public float GetChargeDamage(Obj_AI_Hero target)
        {
            if (target.HasBuff("tristanaecharge"))
            {
                var count=target.GetBuffCount("tristanaecharge");
                if (Objects.Player.IsWindingUp)
                    return (float)(E.GetDamage(target)*(count*0.30))+E.GetDamage(target);

                if (Objects.Player.Distance(target)<Objects.Player.AttackRange) // target in auto range
                    count++;

                return (float)(E.GetDamage(target)*(count*0.30))+E.GetDamage(target);
            }

            if (!E.IsReady())
                return 0f;

            if (Objects.Player.Distance(target)<E.Range)
                return (float)(E.GetDamage(target)*0.30)+E.GetDamage(target); // 1 auto charge

            return 0f;
        }
Example #22
0
        private static float GetDeathmarkDamage(Obj_AI_Hero target)
        {
            double totalDamage = 0;

            if (Zed._spells[SpellSlot.R].IsReady() || target.HasBuff("zedulttargetmark"))
            {
                totalDamage += Zed._spells[SpellSlot.R].GetDamage(target);

                switch (Zed._spells[SpellSlot.R].Level)
                {
                    case 1:
                        totalDamage += totalDamage * 1.2;
                        break;
                    case 2:
                        totalDamage += totalDamage * 1.35;
                        break;
                    case 3:
                        totalDamage += totalDamage * 1.5;
                        break;
                }
            }

            return (float) totalDamage;
        }
Example #23
0
        private void Interrupter2_OnInterruptableTarget(Obj_AI_Hero t, Interrupter2.InterruptableTargetEventArgs args)
        {
            if (!Config.Item("intQ", true).GetValue<bool>() || Player.Mana < QMANA + EMANA)
                return;

            if (t.IsValidTarget(E.Range) && (t.HasBuff("brandablaze") || E.IsReady()))
            {
                E.CastOnUnit(t);
                if (Q.IsReady())
                    Q.Cast(t);
            }
        }
Example #24
0
        private float GetRealDamage(Obj_AI_Hero target)
        {
            if (target.HasBuff("ferocioushowl") && target.ChampionName == "Alistar")
            {
                return this.spells[SpellSlot.E].GetDamage(target) * 0.7f;
            }

            return this.spells[SpellSlot.E].GetDamage(target) - this.sliderLinks["eDamageReduction"].Value.Value;
        }
Example #25
0
        private static void CastSpell(Spell QWER, Obj_AI_Hero target, int HitChanceNum)
        {
            //HitChance 0 - 2
            // example CastSpell(Q, ts, 2);
            if (HitChanceNum == 0)
                QWER.Cast(target, true);
            else if (HitChanceNum == 1)
                QWER.CastIfHitchanceEquals(target, HitChance.VeryHigh, true);
            else if (HitChanceNum == 2)
            {
                if (QWER.Delay < 0.3)
                    QWER.CastIfHitchanceEquals(target, HitChance.Dashing, true);
                QWER.CastIfHitchanceEquals(target, HitChance.Immobile, true);
                QWER.CastIfWillHit(target, 2, true);
                if (target.Path.Count() < 2)
                    QWER.CastIfHitchanceEquals(target, HitChance.VeryHigh, true);
            }
            else if (HitChanceNum == 3)
            {
                List<Vector2> waypoints = target.GetWaypoints();
                //debug("" + target.Path.Count() + " " + (target.Position == target.ServerPosition) + (waypoints.Last<Vector2>().To3D() == target.ServerPosition));
                if (QWER.Delay < 0.3)
                    QWER.CastIfHitchanceEquals(target, HitChance.Dashing, true);
                QWER.CastIfHitchanceEquals(target, HitChance.Immobile, true);
                QWER.CastIfWillHit(target, 2, true);

                float SiteToSite = ((target.MoveSpeed * QWER.Delay) + (Player.Distance(target.ServerPosition) / QWER.Speed)) * 6 - QWER.Width;
                float BackToFront = ((target.MoveSpeed * QWER.Delay) + (Player.Distance(target.ServerPosition) / QWER.Speed));
                if (ObjectManager.Player.Distance(waypoints.Last<Vector2>().To3D()) < SiteToSite || ObjectManager.Player.Distance(target.Position) < SiteToSite)
                    QWER.CastIfHitchanceEquals(target, HitChance.High, true);
                else if (target.Path.Count() < 2
                    && (target.ServerPosition.Distance(waypoints.Last<Vector2>().To3D()) > SiteToSite
                    || Math.Abs(ObjectManager.Player.Distance(waypoints.Last<Vector2>().To3D()) - ObjectManager.Player.Distance(target.Position)) > BackToFront
                    || target.HasBuffOfType(BuffType.Slow) || target.HasBuff("Recall")
                    || (target.Path.Count() == 0 && target.Position == target.ServerPosition)
                    ))
                {
                    if (target.IsFacing(ObjectManager.Player) || target.Path.Count() == 0)
                    {
                        if (ObjectManager.Player.Distance(target.Position) < QWER.Range - ((target.MoveSpeed * QWER.Delay) + (Player.Distance(target.Position) / QWER.Speed)))
                            QWER.CastIfHitchanceEquals(target, HitChance.High, true);
                    }
                    else
                    {
                        QWER.CastIfHitchanceEquals(target, HitChance.High, true);
                    }
                }
            }
            else if (HitChanceNum == 4 && (int)QWER.GetPrediction(target).Hitchance > 4)
            {
                List<Vector2> waypoints = target.GetWaypoints();
                //debug("" + target.Path.Count() + " " + (target.Position == target.ServerPosition) + (waypoints.Last<Vector2>().To3D() == target.ServerPosition));
                if (QWER.Delay < 0.3)
                    QWER.CastIfHitchanceEquals(target, HitChance.Dashing, true);
                QWER.CastIfHitchanceEquals(target, HitChance.Immobile, true);
                QWER.CastIfWillHit(target, 2, true);

                float SiteToSite = ((target.MoveSpeed * QWER.Delay) + (Player.Distance(target.ServerPosition) / QWER.Speed)) * 6 - QWER.Width;
                float BackToFront = ((target.MoveSpeed * QWER.Delay) + (Player.Distance(target.ServerPosition) / QWER.Speed));
                if (ObjectManager.Player.Distance(waypoints.Last<Vector2>().To3D()) < SiteToSite || ObjectManager.Player.Distance(target.Position) < SiteToSite)
                    QWER.CastIfHitchanceEquals(target, HitChance.High, true);
                else if (target.Path.Count() < 2
                    && (target.ServerPosition.Distance(waypoints.Last<Vector2>().To3D()) > SiteToSite
                    || Math.Abs(ObjectManager.Player.Distance(waypoints.Last<Vector2>().To3D()) - ObjectManager.Player.Distance(target.Position)) > BackToFront
                    || target.HasBuffOfType(BuffType.Slow) || target.HasBuff("Recall")
                    || (target.Path.Count() == 0 && target.Position == target.ServerPosition)
                    ))
                {
                    if (target.IsFacing(ObjectManager.Player) || target.Path.Count() == 0)
                    {
                        if (ObjectManager.Player.Distance(target.Position) < QWER.Range - ((target.MoveSpeed * QWER.Delay) + (Player.Distance(target.Position) / QWER.Speed)))
                            QWER.CastIfHitchanceEquals(target, HitChance.High, true);
                    }
                    else
                    {
                        QWER.CastIfHitchanceEquals(target, HitChance.High, true);
                    }
                }
            }
        }
Example #26
0
 private bool checkChilled(Obj_AI_Hero target)
 {
     return target.HasBuff("Chilled");
 }
Example #27
0
 public static bool Check(Obj_AI_Hero target,
     float damage,
     DamageType damageType = DamageType.True,
     bool ignoreShields = true)
 {
     if (target.HasBuffOfType(BuffType.Invulnerability) || target.IsInvulnerable)
     {
         return true;
     }
     foreach (var invulnerable in Items)
     {
         if (invulnerable.Champion == null || invulnerable.Champion == target.ChampionName)
         {
             if (invulnerable.DamageType == null || invulnerable.DamageType == damageType)
             {
                 if (target.HasBuff(invulnerable.BuffName))
                 {
                     if (!ignoreShields || !invulnerable.IsShield)
                     {
                         if (invulnerable.CheckFunction == null ||
                             CheckFunction(invulnerable, target, damageType))
                         {
                             if (invulnerable.MinHealthPercent > 0 &&
                                 (target.Health - damage) / target.MaxHealth * 100 <
                                 invulnerable.MinHealthPercent)
                             {
                                 return true;
                             }
                             return true;
                         }
                     }
                 }
             }
         }
     }
     return false;
 }
        public static bool Contains(Obj_AI_Hero unit, GameObjectProcessSpellCastEventArgs args)
        {
            var name = unit.ChampionName;
            var slot = unit.GetSpellSlot(args.SData.Name);

            foreach (var spell in
                BlockedSpells.Where(o => o.Name.Equals(name))
                    .Where(spell => !spell.HasModelCondition || unit.CharData.BaseSkinName.Equals(spell.ModelName))
                    .Where(spell => !spell.HasBuffCondition || unit.HasBuff(spell.AutoAttackBuff)))
            {
                if (spell.IsAutoAttack)
                {
                    if (!args.SData.IsAutoAttack())
                    {
                        continue;
                    }

                    var condition = spell.AutoAttackName.Equals(args.SData.Name);

                    if (unit.ChampionName.Equals("Rengar"))
                    {
                        condition = condition && unit.Mana.Equals(5);
                    }
                    condition = condition && _menu.Item(_menu.Name + "." + name + "AA") != null &&
                                _menu.Item(_menu.Name + "." + name + "AA").GetValue<bool>();
                    if (condition)
                    {
                        return true;
                    }
                    continue;
                }

                if (_menu.Item(_menu.Name + "." + name) == null || !_menu.Item(_menu.Name + "." + name).GetValue<bool>() ||
                    !spell.Slot.Equals(slot))
                {
                    continue;
                }

                if (name.Equals("Riven"))
                {
                    var buff = unit.Buffs.FirstOrDefault(b => b.Name.Equals("RivenTriCleave"));
                    if (buff != null && buff.Count == 3)
                    {
                        return true;
                    }
                }
                return true;
            }
            return false;
        }
Example #29
0
        private static void InsecCombo(Obj_AI_Hero target)
        {
            if (target != null && target.IsVisible)
            {
                if (Player.Distance(GetInsecPos(target)) < 200)
                {
                    insecComboStep = InsecComboStepSelect.Pressr;
                }
                else if (insecComboStep == InsecComboStepSelect.None
                         && GetInsecPos(target).Distance(Player.Position) < 600)
                {
                    insecComboStep = InsecComboStepSelect.Wgapclose;
                }
                else if (insecComboStep == InsecComboStepSelect.None
                         && target.Distance(Player) < spells[Spells.Q].Range)
                {
                    insecComboStep = InsecComboStepSelect.Qgapclose;
                }

                switch (insecComboStep)
                {
                    case InsecComboStepSelect.Qgapclose:
                        if (!(target.HasBuff("BlindMonkQOne") || target.HasBuff("blindmonkqonechaos"))
                            && spells[Spells.Q].Instance.Name == "BlindMonkQOne")
                        {
                            CastQ1(target);
                        }
                        else if ((target.HasBuff("BlindMonkQOne") || target.HasBuff("blindmonkqonechaos")))
                        {
                            spells[Spells.Q].Cast();
                            insecComboStep = InsecComboStepSelect.Wgapclose;
                        }
                        else
                        {
                            if (spells[Spells.Q].Instance.Name == "blindmonkqtwo"
                                && ReturnQBuff().Distance(target) <= 600)
                            {
                                spells[Spells.Q].Cast();
                            }
                        }
                        break;

                    case InsecComboStepSelect.Wgapclose:
                        if (FindBestWardItem() != null && spells[Spells.W].IsReady()
                            && spells[Spells.W].Instance.Name == "BlindMonkWOne"
                            && (ParamBool("waitForQBuff")
                                && (spells[Spells.Q].Instance.Name == "BlindMonkQOne"
                                    || (!spells[Spells.Q].IsReady() || spells[Spells.Q].Instance.Name == "blindmonkqtwo")
                                    && q2Done)) || !ParamBool("waitForQBuff"))
                        {
                            WardJump(GetInsecPos(target), false, false, true);
                            wardJumped = true;
                        }
                        else if (Player.Spellbook.CanUseSpell(flashSlot) == SpellState.Ready && ParamBool("flashInsec")
                                 && !wardJumped && Player.Distance(insecPos) < 400
                                 || Player.Spellbook.CanUseSpell(flashSlot) == SpellState.Ready
                                 && ParamBool("flashInsec") && !wardJumped && Player.Distance(insecPos) < 400
                                 && FindBestWardItem() == null)
                        {
                            Player.Spellbook.CastSpell(flashSlot, GetInsecPos(target));
                            Utility.DelayAction.Add(50, () => spells[Spells.R].CastOnUnit(target));
                        }
                        break;

                    case InsecComboStepSelect.Pressr:
                        spells[Spells.R].CastOnUnit(target);
                        break;
                }
            }
        }
Example #30
0
 private bool isKnockedUp(Obj_AI_Hero x)
 {
     return (x.HasBuffOfType(BuffType.Knockup) || x.HasBuffOfType(BuffType.Knockback) || x.HasBuff("yasuoq3mis"));
 }