コード例 #1
0
ファイル: Spells.cs プロジェクト: sergix1/addons
        public void CastQE(Obj_AI_Base target)
        {
            if (GetE.IsReady())
            {
                //    var prediction = Prediction.GetPrediction(target, 500);
                var predictionInput = new PredictionInput
                {
                    Aoe       = false,
                    Collision = EQ.Collision,
                    Speed     = EQ.Speed,
                    Delay     = EQ.Delay,
                    Range     = EQ.Range,
                    From      = HeroManager.Player.ServerPosition,
                    Radius    = EQ.Width,
                    Unit      = target,
                    Type      = SkillshotType.SkillshotLine
                };
                var prediction = Prediction.GetPrediction(predictionInput);


                Vector3 castQpos = prediction.CastPosition;

                if (HeroManager.Player.Distance(castQpos) > GetQ.Range)
                {
                    castQpos = HeroManager.Player.Position.Extend(castQpos, GetE.Range);
                }


                if (prediction.Hitchance >= HitChance.VeryHigh)
                {
                    EQcastNow = true;
                    GetQ.Cast(castQpos);
                }
            }
        }
コード例 #2
0
ファイル: Spells.cs プロジェクト: sergix1/addons
        public bool castE(Obj_AI_Hero t)
        {
            if (!GetE.IsReady())
            {
                return(false);
            }
            var ePred = Eany.GetPrediction(t);

            if (ePred.Hitchance >= HitChance.VeryHigh)
            {
                var playerToCP = HeroManager.Player.Distance(ePred.CastPosition);
                foreach (var pos in GetOrbs.GetOrbs())
                {
                    if (HeroManager.Player.Distance(pos) < GetE.Range)
                    {
                        var ballFinalPos = HeroManager.Player.ServerPosition.Extend(pos, playerToCP);
                        if (ballFinalPos.Distance(ePred.CastPosition) < 50)
                        {
                            GetE.Cast(pos);

                            return(true);
                        }
                    }
                }
            }
            return(false);
        }
コード例 #3
0
ファイル: Spells.cs プロジェクト: sergix1/addons
        private bool notKilleableWithOthersSpells(Obj_AI_Hero tar)
        {
            double totalDamage = 0;
            double qDamage = 0d, wDamage = 0d, eDamage = 0d;

            if (GetQ.IsReady())
            {
                qDamage = GetQ.GetDamage(tar);
            }
            if (GetW.IsReady())
            {
                wDamage = GetW.GetDamage(tar);
            }
            if (GetE.IsReady())
            {
                eDamage = GetE.GetDamage(tar);
            }
            totalDamage = qDamage + wDamage + eDamage;

            if (isKilleable(tar, totalDamage))
            {
                return(false);
            }

            return(true);
        }
コード例 #4
0
ファイル: Spells.cs プロジェクト: sergix1/addons
 public override bool castE(Core core)
 {
     if (GetE.IsReady())
     {
         var eTarget = TargetSelector.GetTarget(GetE.Range, TargetSelector.DamageType.Magical);
         if (eTarget == null || !GetE.IsInRange(eTarget))
         {
             return(false);
         }
         GetE.Cast(eTarget);
     }
     return(base.castE(core));
 }
コード例 #5
0
ファイル: Spells.cs プロジェクト: sergix1/addons
 private bool NotKilleableWithOtherSpells(Obj_AI_Hero target, SyndraCore core)
 {
     if (GetQ.IsReady() && GetQ.IsKillable(target))
     {
         CastQ();
         return(false);
     }
     if (GetW.IsReady() && GetW.IsKillable(target))
     {
         CastW();
         return(false);
     }
     if (GetE.IsReady() && GetE.IsKillable(target))
     {
         CastE(core);
         return(false);
     }
     return(true);
 }
コード例 #6
0
ファイル: Spells.cs プロジェクト: sergix1/addons
        public bool CastE(SyndraCore core)
        {
            if (!GetE.IsReady())
            {
                return(false);
            }
            if (GetW.IsReady())
            {
                return(false);
            }
            if (GetOrbs.WObject(false) != null)
            {
                return(false);
            }
            for (var index = 0; index < core.GetOrbs.Count; index++)
            {
                foreach (Obj_AI_Hero tar in HeroManager.Enemies)
                {
                    if (!(tar.Distance(core.Hero) <= GetE.Range))
                    {
                        continue;
                    }
                    var orb = core.GetOrbs[index];
                    if (orb.IsValid())
                    {
                        if (!GetE.IsInRange(orb))
                        {
                            continue;
                        }
                    }
                    //500 extended range.
                    var finalBallPos = HeroManager.Player.Position.Extend(orb, 500);

                    if (CalcE(orb, finalBallPos, tar))
                    {
                        GetE.Cast(orb);
                    }
                }
            }
            return(false);
        }