Example #1
0
 public override void Execute(Obj_AI_Hero target)
 {
     if (((target.GetBuffCount("twitchdeadlyvenom") >= ComboAfterStacks || ComboAfterStacks == 0) && _afterAttack || !Orbwalking.InAutoAttackRange(target)) && (!NotDuringR || !ObjectManager.Player.HasBuff("TwitchFullAutomatic")))
     {
         Cast(target, aoe: IsAreaOfEffect);
     }
 }
Example #2
0
        public static double CalcDamage(Obj_AI_Hero enemy)
        {
            double damage = 0;
            if (enemy.GetBuffCount("EkkoStacks") == 2)
                damage += 10 + 10 * Player.Level + 0.7 * Player.TotalMagicalDamage;
            if (SpellManager.Q.IsReady())
                damage += 45 + SpellManager.Q.Level * 15 + Player.TotalMagicalDamage * 0.1;
            if (SpellManager.E.IsReady() || Player.HasBuff("ekkoeattackbuff"))
                damage += 20 + SpellManager.E.Level * 30 + Player.TotalMagicalDamage() * 0.2;
            if (EkkoUlt != null)
                if (enemy.Distance(EkkoUlt.Position) <= SpellManager.R.Range)
                    damage += Rdamage();

            return Player.CalcDamage(enemy, Damage.DamageType.Magical, damage);
        }
Example #3
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 #4
0
        /// <summary>
        /// Gets the Killsteal damage.
        /// </summary>
        public static float GetDamage(Obj_AI_Hero target)
        {
            float dmg = 0f;

            if (target.GetBuffCount("vaynesilvereddebuff") == 2)
            {
                dmg += Variables.W.GetDamage(target);
            }

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

            return dmg;
        }
Example #5
0
        public static Vector3 FindTumblePosition(Obj_AI_Hero target)
        {
            if ((Only2W || (s_Champion.Orbwalker.ActiveMode == SCommon.Orbwalking.Orbwalker.Mode.Mixed && Only2WHarass)) && target.GetBuffCount("vaynesilvereddebuff") == 1) // == 1 cuz calling this after attack which is aa missile still flying
                return Vector3.Zero;

            if(WallIfPossible)
            {
                var outRadius = ObjectManager.Player.BoundingRadius / (float)Math.Cos(2 * Math.PI / 8);

                for (var i = 1; i <= 8; i++)
                {
                    var angle = i * 2 * Math.PI / 8;
                    float x = ObjectManager.Player.Position.X + outRadius * (float)Math.Cos(angle);
                    float y = ObjectManager.Player.Position.Y + outRadius * (float)Math.Sin(angle);
                    var colFlags = NavMesh.GetCollisionFlags(x, y);
                    if (colFlags.HasFlag(CollisionFlags.Wall) || colFlags.HasFlag(CollisionFlags.Building))
                        return new Vector3(x, y, 0);
                }
            }

            if (Mode == 0)
            {
                Vector3 vec = target.ServerPosition;

                if (target.Path.Length > 0)
                {
                    if (ObjectManager.Player.Distance(vec) < ObjectManager.Player.Distance(target.Path.Last()))
                        return IsSafe(target, Game.CursorPos);
                    else
                        return IsSafe(target, Game.CursorPos.To2D().Rotated(Geometry.DegreeToRadian((vec - ObjectManager.Player.ServerPosition).To2D().AngleBetween((Game.CursorPos - ObjectManager.Player.ServerPosition).To2D()) % 90)).To3D());
                }
                else
                {
                    if (target.IsMelee)
                        return IsSafe(target, Game.CursorPos);
                }

                return IsSafe(target, ObjectManager.Player.ServerPosition + (target.ServerPosition - ObjectManager.Player.ServerPosition).Normalized().To2D().Rotated(Geometry.DegreeToRadian(90 - (vec - ObjectManager.Player.ServerPosition).To2D().AngleBetween((Game.CursorPos - ObjectManager.Player.ServerPosition).To2D()))).To3D() * 300f);
            }
            else if(Mode == 1)
            {
                return Game.CursorPos;
            }

            return Vector3.Zero;
        }
        /// <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 #7
0
 private void handeQ(Obj_AI_Hero target, HitChance hitChance)
 {
     if (player.Distance(target) <= Orbwalking.GetRealAutoAttackRange(target) && !Orbwalking.CanAttack() &&
         Orbwalking.CanMove(100) && target.GetBuffCount("TahmKenchPDebuffCounter") != 2)
     {
         Q.CastIfHitchanceEquals(target, hitChance, config.Item("packets").GetValue<bool>());
     }
     else if (player.Distance(target) > Orbwalking.GetRealAutoAttackRange(target))
     {
         Q.CastIfHitchanceEquals(target, hitChance, config.Item("packets").GetValue<bool>());
     }
 }
Example #8
0
        private void handleWEnemyHero(Obj_AI_Hero target)
        {
            if (target.GetBuffCount("TahmKenchPDebuffCounter") == 3 && !CombatHelper.CheckCriticalBuffs(target) &&
                !target.HasBuffOfType(BuffType.Stun) && !target.HasBuffOfType(BuffType.Snare) && !Q.CanCast(target) &&
                !justQ)
            {
                orbwalker.SetMovement(false);
                if (Orbwalking.CanMove(100) && Game.CursorPos.Distance(target.Position) < 300)
                {
                    player.IssueOrder(GameObjectOrder.MoveTo, target.Position.Extend(player.Position, 100));
                }

                lastWtarget = Team.Enemy;
                W.CastOnUnit(target, true);
            }
        }
        public static bool Contains(Obj_AI_Hero unit, GameObjectProcessSpellCastEventArgs args)
        {
            var name = unit.ChampionName;
            var slot = args.Slot.Equals(48) ? SpellSlot.R : args.Slot;

            if (args.SData.Name.Equals("KalistaRAllyDash") && Program.Menu.Item("Oathsworn").IsActive())
            {
                return true;
            }

            var spells = new List<BlockedSpell>();
            BlockedSpells.TryGetValue(name, out spells);

            if (spells == null || spells.Count == 0)
            {
                return false;
            }

            foreach (var spell in
                spells)
            {
                var item = Menu.Item(name + spell.MenuName);
                if (item == null || !item.IsActive())
                {
                    continue;
                }

                if (!spell.PassesModelCondition(unit))
                {
                    continue;
                }

                if (!spell.PassesSpellCondition(args.SData.Name))
                {
                    continue;
                }

                if (!spell.PassesBuffCondition(unit))
                {
                    continue;
                }

                if (!spell.PassesSlotCondition(args.Slot))
                {
                    continue;
                }

                if (spell.IsAutoAttack)
                {
                    if (!args.SData.IsAutoAttack())
                    {
                        continue;
                    }

                    if (spell.SpellName.Equals("-1"))
                    {
                        Console.WriteLine(args.SData.Name);
                    }

                    var condition = true;

                    if (unit.ChampionName.Equals("Gnar"))
                    {
                        var buff = ObjectManager.Player.Buffs.FirstOrDefault(b => b.Name.Equals("gnarwproc"));
                        condition = buff != null && buff.Count == 2;
                    }
                    else if (unit.ChampionName.Equals("Rengar"))
                    {
                        condition = unit.Mana.Equals(5);
                    }

                    if (condition)
                    {
                        return true;
                    }

                    continue;
                }

                if (name.Equals("Riven"))
                {
                    return unit.GetBuffCount("RivenTriCleave").Equals(2);
                }

                return true;
            }

            return false;
        }
Example #10
0
 public override void Harass(Obj_AI_Hero target)
 {
     base.Harass(target);
     if (HarassActivateWhenLeaving <= target.GetBuffCount("twitchdeadlyvenom") && target.Distance(ObjectManager.Player) > Orbwalking.GetRealAutoAttackRange(target))
         Cast();
 }
Example #11
0
 public override void Execute(Obj_AI_Hero target)
 {
     if (CanKill(target) || target.GetBuffCount("twitchdeadlyvenom") == 6 && AlwaysExecuteAtFullStacks)
         Cast();
 }
Example #12
0
        /// <summary>
        /// Calculates mastery passives 
        /// </summary>
        /// <param name="source">The source.</param>
        /// <param name="target">The target.</param>
        /// <returns></returns>
        private static float PassiveFlatMod(Obj_AI_Hero source, Obj_AI_Base target)
        {
            float value = 0f;
            
             //Offensive masteries:

            //Fervor of Battle: STACKTIVATE Your basic attacks and spells give you stacks of Fervor for 5 seconds, stacking 10 times. Each stack of Fervor adds 1-8 bonus physical damage to your basic attacks against champions, based on your level.
            if (target.Type == GameObjectType.obj_AI_Hero)
            {
                Mastery Fervor = ObjectManager.Player.Masteries.FirstOrDefault(p => p.Page == MasteryPage.Ferocity && p.Id == (int)Ferocity.FervorofBattle);
                if (Fervor != null && Fervor.Points >= 1)
                    value += (0.9f + source.Level * 0.42f) * source.GetBuffCount("MasteryOnHitDamageStacker");
            }

            // Defensive masteries:

            //Tough Skin DIRT OFF YOUR SHOULDERS You take 2 less damage from champion and monster basic attacks
            if (target.Type == GameObjectType.obj_AI_Hero)
            {
                Mastery Toughskin = ObjectManager.Player.Masteries.FirstOrDefault(p => p.Page == MasteryPage.Resolve && p.Id == (int)Resolve.ToughSkin);
                if (Toughskin != null && Toughskin.Points >= 1)
                    value -= 2;
            }

            return value;
        }
Example #13
0
 public static int Damage(Obj_AI_Hero target)
 =>
     Bools.IsCharged(target) ?
         (int)(Variables.E.GetDamage(target) *
             ((0.30f * target.GetBuffCount("TristanaECharge")) + 1f) + 
             Variables.R.GetDamage(target))
     :
         (int)Variables.R.GetDamage(target);
Example #14
0
        private void Interrupter2_OnInterruptableTarget(
            Obj_AI_Hero unit,
            Interrupter2.InterruptableTargetEventArgs args)
        {
            switch (unit.GetBuffCount(this.tahmPassive))
            {
                case 1:
                    if (TahmKenchChampion.GetSubMenu("SAssembliesChampionsTahmKenchQ")
                            .Item("SAssembliesChampionsTahmKenchQInterrupt")
                            .GetValue<bool>()
                        && TahmKenchChampion.GetSubMenu("SAssembliesChampionsTahmKenchW")
                               .Item("SAssembliesChampionsTahmKenchWInterrupt")
                               .GetValue<bool>())
                    {
                        if (Orbwalking.InAutoAttackRange(unit) && CustomSpell.Q.IsReady() && (CustomSpell.W.IsReady()
                            && this.swallowedUnit == SwallowedUnit.None))
                        {
                            ObjectManager.Player.IssueOrder(GameObjectOrder.AttackUnit, unit);
                            Utility.DelayAction.Add(100, () => CustomSpell.Q.Cast(unit));
                            Utility.DelayAction.Add(200, () => CustomSpell.W.CastOnUnit(unit));
                        }
                    }
                    break;

                case 2:
                    if ((CustomSpell.Q.IsReady() && TahmKenchChampion.GetSubMenu("SAssembliesChampionsTahmKenchQ")
                            .Item("SAssembliesChampionsTahmKenchQInterrupt")
                            .GetValue<bool>()) || (CustomSpell.W.IsReady() && TahmKenchChampion.GetSubMenu("SAssembliesChampionsTahmKenchW")
                               .Item("SAssembliesChampionsTahmKenchWInterrupt")
                               .GetValue<bool>() && this.swallowedUnit == SwallowedUnit.None))
                    {
                        if (Orbwalking.InAutoAttackRange(unit))
                        {
                            ObjectManager.Player.IssueOrder(GameObjectOrder.AttackUnit, unit);
                            if (CustomSpell.Q.IsReady())
                            {
                                Utility.DelayAction.Add(100, () => CustomSpell.Q.Cast(unit));
                            }
                            else if (CustomSpell.W.IsReady())
                            {
                                Utility.DelayAction.Add(100, () => CustomSpell.W.CastOnUnit(unit));
                            }
                        }
                        else if (CustomSpell.Q.IsReady() && CustomSpell.W.IsReady())
                        {
                            CustomSpell.Q.Cast(unit);
                            Utility.DelayAction.Add(100, () => CustomSpell.W.CastOnUnit(unit));
                        }
                    }
                    break;

                case 3:
                    if ((CustomSpell.Q.IsReady() && TahmKenchChampion.GetSubMenu("SAssembliesChampionsTahmKenchQ")
                            .Item("SAssembliesChampionsTahmKenchQInterrupt")
                            .GetValue<bool>()) || (CustomSpell.W.IsReady() && TahmKenchChampion.GetSubMenu("SAssembliesChampionsTahmKenchW")
                               .Item("SAssembliesChampionsTahmKenchWInterrupt")
                               .GetValue<bool>() && this.swallowedUnit == SwallowedUnit.None))
                    {
                        if (CustomSpell.Q.IsReady())
                        {
                            CustomSpell.Q.Cast(unit);
                        }
                        else if (CustomSpell.W.IsReady())
                        {
                            CustomSpell.W.CastOnUnit(unit);
                        }
                    }
                    break;
            }
        }
Example #15
0
 public static float GetRDamage(Obj_AI_Hero target)
 =>
     (float)(Variables.R.GetDamage(target) * (1 + 0.20 * target.GetBuffCount("dariushemo")));