Beispiel #1
0
        public override void useR(Obj_AI_Base target)
        {
            if (!R.IsReady() || target == null)
            {
                return;
            }

            foreach (var t in EntityManager.Heroes.Enemies.Where(t => RMissile != null && RMissile.IsValid && t.IsValidTarget() && RMissile.Position.Distance(R.GetPrediction(t).CastPosition) < 350 && RMissile.Position.Distance(t.ServerPosition) < 350))
            {
                var comboDmg = GetRdmg(t) + GetWdmg(t);
                if (Q.IsReady())
                {
                    comboDmg += GetQdmg(t);
                }
                if (E.IsReady())
                {
                    comboDmg += GetEdmg(t);
                }
                if (t.Health < comboDmg)
                {
                    R.Cast();
                }
            }

            if (player.Health < player.CountEnemiesInRange(600) * player.Level * 15)
            {
                R.Cast();
            }
        }