示例#1
0
        private void Orbwalker_OnUnkillableMinion(Obj_AI_Base target, Orbwalker.UnkillableMinionArgs args)
        {
            if (Orbwalker.IsAutoAttacking)
            {
                return;
            }

            if (!target.IsKillable(user.GetAutoAttackRange(target) + W.Range) || !W.IsReady() || !Config.useWlane)
            {
                return;
            }

            var shoulduse = Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.LaneClear) || Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.LastHit);

            if (shoulduse && user.GetAutoAttackDamage(target) + DariusStuff.Wdmg(target) >= target.PredictHealth(W.CastDelay) && !target.WillDie(W))
            {
                Orbwalker.ForcedTarget = target;
                W.Cast();
                Core.DelayAction((() => Orbwalker.ForcedTarget = null), (int)(Orbwalker.AttackCastDelay * 1000f));
            }
        }
示例#2
0
        private static void ComboR()
        {
            if (!ultReady)
            {
                return;
            }

            var validEnemies = EntityManager.Heroes.Enemies.FindAll(e => e.IsKillable(R.Range, true, true, true));

            if (!validEnemies.Any())
            {
                return;
            }

            var ksTarget = validEnemies.OrderByDescending(TargetSelector.GetPriority).FirstOrDefault(t => !t.WillDie(R) && DariusStuff.Rdmg(t) > t.TotalShieldHealth());

            if (ksTarget != null)
            {
                R.Cast(ksTarget);
            }
        }
示例#3
0
        private void Drawing_OnEndScene(EventArgs args)
        {
            foreach (var e in EntityManager.Heroes.Enemies.Where(e => e.HPBarPosition.IsOnScreen() && e.IsValidTarget()))
            {
                if (Config.drawDmg)
                {
                    e.DrawDamage(DariusStuff.ComboDamage(e, Config.calcP, Config.calcQ, Config.calcW, Config.calcR));
                }

                if (Config.stacksTimer)
                {
                    var buff = DariusStuff.GetDariusPassive(e);
                    if (buff != null)
                    {
                        var timeLeft  = buff.EndTime - Game.Time;
                        var mypos     = e.ServerPosition.WorldToScreen();
                        var buffcount = Math.Max(1, buff.Count);
                        var ra        = 51 * buffcount;
                        var ba        = 255 - ra;
                        var ga        = 255 - ra;
                        var c         = Color.FromArgb(ra, ga, ba);
                        passive.Draw($"Stacks: {buff.Count} ({timeLeft.ToString("F1")})", c, new Vector2(mypos.X, mypos.Y - 36));
                    }
                }

                if (Config.dunkable)
                {
                    var killable = R.IsReady() && DariusStuff.Rdmg(e) > e.TotalShieldHealth() && e.IsKillable(-1, true, true, true);
                    if (killable)
                    {
                        var hpos    = e.HpBarPos();
                        var drawpos = new Vector2(hpos.X, hpos.Y - 24);
                        dunktext.Draw("DUNK = KILL", Color.Red, drawpos);
                    }
                }
            }

            if (Config.ultTimer && DariusStuff.HasDariusUltResetBuff)
            {
                var x       = Drawing.Width * 0.35f;
                var y       = Drawing.Height * 0.8f;
                var drawpos = new Vector2(x, y);
                var timer   = (DariusStuff.DariusUltResetBuff.EndTime - Game.Time).ToString("F1");
                ulttext.Draw($"R Expire Timer: {timer}", Color.OrangeRed, drawpos);
            }

            var pos = qPos();

            if (pos != null && pos != Vector3.Zero)
            {
                pos.Value.DrawCircle(100, SharpDX.Color.Red);
            }

            if (Config.drawoutQ)
            {
                Circle.Draw(SharpDX.Color.AliceBlue, outerBlade, user);
            }

            if (Config.drawinQ)
            {
                Circle.Draw(SharpDX.Color.AliceBlue, bladeStart, user);
            }

            if (Config.drawE)
            {
                E.DrawRange(Color.AliceBlue);
            }

            if (Config.drawR)
            {
                R.DrawRange(Color.AliceBlue);
            }
        }