Ejemplo n.º 1
0
        public static void OnGameUpdateModes(EventArgs args)
        {
            if (Player.IsDead)
            {
                return;
            }
            if (Player.HasBuff("Recall"))
            {
                return;
            }
            var target = TargetSelector.GetTarget(SkillHandler.Q.Range, TargetSelector.DamageType.Magical);

            if (Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Combo)
            {
                if (target.Health <= MathHandler.ComboDamage(target))
                {
                    FightHandler.Combo2();
                }

                if (SkillHandler.Q.GetPrediction(target).Hitchance >= HitChance.VeryHigh)
                {
                    FightHandler.Combo3();
                }

                if (target.Health <= MathHandler.GapCloseKill1Damage(target))
                {
                    FightHandler.GapCloseKill();
                }

                if (target.Health <= MathHandler.GapCloseKill2Damage(target))
                {
                    FightHandler.GapCloseKill2();
                }

                else
                {
                    FightHandler.Combo1();
                }
            }

            if (Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Mixed)
            {
            }

            if (Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.LaneClear)
            {
                FightHandler.LaneClear();
            }

            if (MenuHandler.DianaConfig.Item("HarassActive").GetValue <KeyBind>().Active || MenuHandler.DianaConfig.Item("HarassToggle").GetValue <KeyBind>().Active)
            {
                FightHandler.Harass();
            }
        }
        public static void GapCloseKill2()
        {
            //if (!_menu.Item("useMinionGapclose").GetValue<bool>()) return;

            var target = TargetSelector.GetTarget(SkillHandler.Q.Range + SkillHandler.R.Range, TargetSelector.DamageType.Physical);

            if (!target.IsValidTarget() || target == null)
            {
                return;
            }

            foreach (
                var minion in
                MinionManager.GetMinions(ObjectManager.Player.ServerPosition, SkillHandler.Q.Range)
                .Where(minion => ObjectManager.Player.GetSpellDamage(minion, SpellSlot.Q) < minion.Health &&
                       minion.ServerPosition.Distance(target.ServerPosition) < SkillHandler.R.Range)
                .Where(minion => minion.IsValidTarget(SkillHandler.Q.Range))
                .Where(minion => SkillHandler.Q.IsReady() && SkillHandler.R.IsReady()))
            {
                SkillHandler.Q.Cast(minion, Packeting());

                if (minion.HasBuff("dianamoonlight", true))
                {
                    SkillHandler.R.Cast(minion, Packeting());
                }
                SkillHandler.R.Cast(target, Packeting());
                SkillHandler.W.Cast();

                if (ItemHandler.IgniteSlot != SpellSlot.Unknown && Player.Spellbook.CanUseSpell(ItemHandler.IgniteSlot) == SpellState.Ready)
                {
                    if (target.Health <= MathHandler.GapCloseKill2Damage(target))
                    {
                        Player.Spellbook.CastSpell(ItemHandler.IgniteSlot, target);
                    }
                }
                break;
            }
        }