示例#1
0
文件: Zed.cs 项目: Burbb/Portaio
        private static bool CastQKill(LeagueSharp.SDK.Spell spell, Obj_AI_Base target)
        {
            var pred = spell.GetPrediction(target, false, -1, LeagueSharp.SDK.CollisionableObjects.YasuoWall);

            if (pred.Hitchance < Q.MinHitChance)
            {
                return(false);
            }
            var col = spell.GetCollision(
                target,
                new List <Vector3> {
                pred.UnitPosition, target.Position
            },
                LeagueSharp.SDK.CollisionableObjects.Heroes | LeagueSharp.SDK.CollisionableObjects.Minions);

            if (col.Count == 0)
            {
                return(Q.Cast(pred.CastPosition));
            }
            var subDmg = Q.GetDamage(target, DamageStage.SecondForm);

            switch (target.Type)
            {
            case GameObjectType.AIHeroClient:
                return(target.Health + target.AttackShield <= subDmg && Q.Cast(pred.CastPosition));

            case GameObjectType.obj_AI_Minion:
                return(spell.CanLastHit(target, subDmg) && Q.Cast(pred.CastPosition));
            }
            return(false);
        }
示例#2
0
文件: Zed.cs 项目: geramz/PortAIO
        private static bool CastQKill(LeagueSharp.SDK.Spell spell, Obj_AI_Base target)
        {
            var pred1 = spell.GetPrediction(target, false, -1, CollisionableObjects.YasuoWall);

            if (pred1.Hitchance < Q.MinHitChance)
            {
                return(false);
            }
            var pred2 = spell.GetPrediction(
                target,
                false,
                -1,
                CollisionableObjects.Heroes | CollisionableObjects.Minions);

            if (pred2.Hitchance == HitChance.Collision)
            {
                var subDmg = Q.GetDamage(target, DamageStage.SecondForm);
                switch (target.Type)
                {
                case GameObjectType.AIHeroClient:
                    return(target.Health + target.AttackShield <= subDmg && Q.Cast(pred1.CastPosition));

                case GameObjectType.obj_AI_Minion:
                    return(spell.CanLastHit(target, subDmg) && Q.Cast(pred1.CastPosition));
                }
            }
            else if (pred2.Hitchance >= Q.MinHitChance)
            {
                return(Q.Cast(pred2.CastPosition));
            }
            return(false);
        }
示例#3
0
 private static bool CastQKill(LeagueSharp.SDK.Spell spell, Obj_AI_Base target)
 {
     var pred = spell.GetPrediction(target, false, -1, LeagueSharp.SDK.CollisionableObjects.YasuoWall);
     if (pred.Hitchance < Q.MinHitChance)
     {
         return false;
     }
     var col = pred.GetCollision(LeagueSharp.SDK.CollisionableObjects.Heroes | LeagueSharp.SDK.CollisionableObjects.Minions);
     if (col.Count == 0)
     {
         return Q.Cast(pred.CastPosition);
     }
     var subDmg = Q.GetDamage(target, DamageStage.SecondForm);
     if (target is AIHeroClient && target.Health + target.AttackShield <= subDmg)
     {
         return Q.Cast(pred.CastPosition);
     }
     return target is Obj_AI_Minion && spell.CanLastHit(target, subDmg) && Q.Cast(pred.CastPosition);
 }