Ejemplo n.º 1
0
        public override void Execute()
        {
            if (Settings.UseE)
            {
                var etarget     = TargetSelector.GetTarget(E.Range, DamageType.Physical);
                var eprediction = E.GetPrediction(etarget);
                if (eprediction.HitChance >= HitChance.High)
                {
                    if (E.IsReady() && etarget != null)
                    {
                        E.Cast(eprediction.CastPosition);
                    }
                }
            }
            if (Settings.UseW)
            {
                var target = TargetSelector.GetTarget(W.Range, DamageType.Physical);
                if (W.IsReady() && target != null)
                {
                    W.Cast();
                }
            }

            if (Settings.UseQ)
            {
                var target = TargetSelector.GetTarget(Q.Range, DamageType.Physical);
                if (Q.IsReady() && target != null)
                {
                    Q.Cast();
                }
            }
            if (Settings.UseR && R.IsReady())
            {
                var target = TargetSelector.GetTarget(E.Range, DamageType.Physical);

                if (target.IsValidTarget(R.Range) && !target.IsZombie && !target.IsInvulnerable && !target.IsDead)
                {
                    int passiveCounter = target.GetBuffCount("dariushemo") <= 0 ? 0 : target.GetBuffCount("dariushemo");
                    if (!target.HasBuffOfType(BuffType.Invulnerability) && !target.HasBuffOfType(BuffType.SpellShield))
                    {
                        if (Damages.RDamage(target, passiveCounter) >=
                            target.Health + Damages.PassiveDmg(target, 1))
                        {
                            if (!target.HasBuffOfType(BuffType.Invulnerability) &&
                                !target.HasBuffOfType(BuffType.SpellShield))
                            {
                                R.Cast(target);
                            }
                        }
                    }
                }
            }
        }
Ejemplo n.º 2
0
        public override void Execute()
        {
            if (Player.Instance.IsDead)
            {
                return;
            }

            var enemies =
                EntityManager.Heroes.Enemies.Where(
                    e => e.IsEnemy && e.IsVisible && !e.IsDead && !e.IsZombie && !e.IsInvulnerable && e.Health > 0)
                .ToList();

            foreach (var enemy in enemies)
            {
                if (Settings.KSQ && SpellManager.Q.IsReady() && Damages.QDamage(enemy) > enemy.Health &&
                    SpellManager.Q.IsInRange(enemy))
                {
                    if (enemy.HasBuffOfType(BuffType.SpellImmunity) || enemy.HasBuffOfType(BuffType.SpellShield))
                    {
                        continue;
                    }
                    if (Settings.KSQ)
                    {
                        Q.Cast();
                        break;
                    }
                }

                if (Settings.KSW && SpellManager.W.IsReady() && Damages.WDamage(enemy) > enemy.Health &&
                    SpellManager.W.IsInRange(enemy))
                {
                    if (enemy.HasBuffOfType(BuffType.SpellImmunity) || enemy.HasBuffOfType(BuffType.SpellShield))
                    {
                        continue;
                    }
                    if (Settings.KSW)
                    {
                        W.Cast();
                        break;
                    }
                }
                if (Settings.KSR && R.IsReady())
                {
                    if (enemy.IsValidTarget(R.Range) && !enemy.IsZombie && !enemy.IsInvulnerable && !enemy.IsDead)
                    {
                        int passiveCounter = enemy.GetBuffCount("dariushemo") <= 0
                            ? 0
                            : enemy.GetBuffCount("dariushemo");
                        if (!enemy.HasBuffOfType(BuffType.Invulnerability) && !enemy.HasBuffOfType(BuffType.SpellShield))
                        {
                            if (Damages.RDamage(enemy, passiveCounter) >= enemy.Health + Damages.PassiveDmg(enemy, 1))
                            {
                                if (!enemy.HasBuffOfType(BuffType.Invulnerability) &&
                                    !enemy.HasBuffOfType(BuffType.SpellShield))
                                {
                                    R.Cast(enemy);
                                }
                            }
                        }
                    }
                }
                if (Config.Modes.Harass.UseQ && Player.Instance.ManaPercent > Config.Modes.Harass.Mana &&
                    Q.IsReady())
                {
                    var target = TargetSelector.GetTarget(Q.Range, DamageType.Physical);
                    if (target != null)
                    {
                        Q.Cast();
                    }
                }
                if (Config.Modes.Harass.UseE && Player.Instance.ManaPercent > Config.Modes.Harass.Mana &&
                    E.IsReady())
                {
                    var target      = TargetSelector.GetTarget(E.Range, DamageType.Physical);
                    var eprediction = E.GetPrediction(target);
                    if (eprediction.HitChance >= HitChance.High)
                    {
                        if (E.IsReady() && target != null)
                        {
                            E.Cast(eprediction.CastPosition);
                        }
                    }
                }
            }
        }