Example #1
0
        public override void Execute(Obj_AI_Hero target)
        {
            var pred = GetPrediction(target);
            if (pred.Hitchance < Commons.Prediction.HitChance.Low) return;

            var targets = HeroManager.Enemies.Where(enemy => enemy.IsValidTarget(Range) && WillHit(enemy.Position, pred.CastPosition));
            var looking = targets.Count(trgt => trgt.IsFacingMe());

            if (looking >= MinTargetsFacing || targets.Count() >= MinTargetsNotFacing || UltOnKillable && Provider.GetComboDamage(target) > target.Health && target.IsFacingMe() && target.HealthPercent > MinHealth && target.IsValidTarget(Range) || PanicModeHealth > ObjectManager.Player.HealthPercent || BurstMode.IsActive())
            {
                Cast(pred.CastPosition);
            }
        }