示例#1
0
        public void QLogic()
        {
            if (!Q.IsReady() || (ObjectManager.Player.Mana < 3 * GetWManaCost() && CanW()))
            {
                return;
            }
            var shouldntKS =
                EntityManager.Heroes.Allies.Any(
                    h => h.Position.Distance(ObjectManager.Player.Position) < 600 && !h.IsDead && !h.IsMe);

            foreach (var hero in ValidTargets.Where(h => h.IsValidTarget(925)))
            {
                if (shouldntKS && Q.GetDamage(hero) > hero.Health)
                {
                    break;
                }
                var pred = Q.GetPrediction(hero);
                if ((int)pred.Hitchance > (int)HitChance.Medium && pred.UnitPosition.Distance(ObjectManager.Player.ServerPosition) < Q.Range)
                {
                    Q.Cast(hero);
                }
            }
        }
示例#2
0
文件: Damage.cs 项目: sergix1/addons
 public float getDamageValue(Obj_AI_Hero target)
 {
     return(spell.GetDamage(target));
 }