Пример #1
0
 private static IEnumerable <Obj_AI_Base> GetCollision(float spellwidth, BaseUltSpell spell)
 {
     return((from unit in EntityManager.Heroes.Enemies.Where(h => Player.Instance.Distance(h) < 2000)
             let pred =
                 Prediction.Position.PredictLinearMissile(unit, 2000, (int)spell.Radius, (int)spell.Delay,
                                                          spell.Speed, -1)
                 let endpos = Player.Instance.ServerPosition.Extend(GetFountainPos(), 2000)
                              let projectOn = pred.UnitPosition.To2D().ProjectOn(Player.Instance.ServerPosition.To2D(), endpos)
                                              where projectOn.SegmentPoint.Distance(endpos) < spellwidth + unit.BoundingRadius
                                              select unit).Cast <Obj_AI_Base>().ToList());
 }
Пример #2
0
        private double GetBaseUltSpellDamage(BaseUltSpell spell, AIHeroClient target)
        {
            var level = Player.Instance.Spellbook.GetSpell(spell.Slot).Level - 1;

            switch (spell.Name)
            {
            case "Ashe":
            {
                var damage = new float[] { 250, 425, 600 }[level] +1 * Player.Instance.FlatMagicDamageMod;
                return(Player.Instance.CalculateDamageOnUnit(target, DamageType.Magical, damage));
            }

            case "Draven":
            {
                var damage = new float[] { 175, 275, 375 }[level] +1.1f * Player.Instance.FlatPhysicalDamageMod;
                return(Player.Instance.CalculateDamageOnUnit(target, DamageType.Physical, damage) * 0.7);
            }

            case "Ezreal":
            {
                var damage = new float[] { 350, 500, 650 }[level] +0.9f * Player.Instance.FlatMagicDamageMod
                + 1 * Player.Instance.FlatPhysicalDamageMod;
                return(Player.Instance.CalculateDamageOnUnit(target, DamageType.Magical, damage) * 0.7);
            }

            case "Jinx":
            {
                var damage = new float[] { 250, 350, 450 }[level]
                +new float[] { 25, 30, 35 }[level] / 100 * (target.MaxHealth - target.Health)
                + 1 * Player.Instance.FlatPhysicalDamageMod;

                /*Chat.Print("Flat Damage: " + new float[] { 250, 350, 450 }[level]);
                 * Chat.Print("Bonus Damage: " + new float[] { 25, 30, 35 }[level] / 100 * (target.MaxHealth - target.Health));
                 * Chat.Print("Damage On Unit: " + Player.Instance.CalculateDamageOnUnit(target, DamageType.Physical, damage));
                 * Chat.Print("Unit Health: " + target.Health);*/
                return(Player.Instance.CalculateDamageOnUnit(target, DamageType.Physical, damage));
            }
            }

            return(0);
        }
Пример #3
0
 private IEnumerable<Obj_AI_Base> GetCollision(float spellwidth, BaseUltSpell spell)
 {
     return (from unit in EntityManager.Heroes.Enemies.Where(h => Player.Instance.Distance(h) < 2000)
             let pred =
                 Prediction.Position.PredictLinearMissile(
                     unit,
                     2000,
                     (int) spell.Radius,
                     (int) spell.Delay,
                     spell.Speed,
                     -1)
             let endpos = Player.Instance.ServerPosition.Extend(GetFountainPos(), 2000)
             let projectOn = pred.UnitPosition.To2D().ProjectOn(Player.Instance.ServerPosition.To2D(), endpos)
             where projectOn.SegmentPoint.Distance(endpos) < spellwidth + unit.BoundingRadius
             select unit).Cast<Obj_AI_Base>().ToList();
 }
Пример #4
0
        private double GetBaseUltSpellDamage(BaseUltSpell spell, AIHeroClient target)
        {
            var level = Player.Instance.Spellbook.GetSpell(spell.Slot).Level - 1;
            switch (spell.Name)
            {
                case "Ashe":
                {
                    var damage = new float[] { 250, 425, 600 }[level] + 1 * Player.Instance.FlatMagicDamageMod;
                    return Player.Instance.CalculateDamageOnUnit(target, DamageType.Magical, damage);
                }

                case "Draven":
                {
                    var damage = new float[] { 175, 275, 375 }[level] + 1.1f * Player.Instance.FlatPhysicalDamageMod;
                    return Player.Instance.CalculateDamageOnUnit(target, DamageType.Physical, damage) * 0.7;
                }

                case "Ezreal":
                {
                    var damage = new float[] { 350, 500, 650 }[level] + 0.9f * Player.Instance.FlatMagicDamageMod
                                 + 1 * Player.Instance.FlatPhysicalDamageMod;
                    return Player.Instance.CalculateDamageOnUnit(target, DamageType.Magical, damage) * 0.7;
                }

                case "Jinx":
                {
                    var damage = new float[] { 250, 350, 450 }[level]
                                 + new float[] { 25, 30, 35 }[level] / 100 * (target.MaxHealth - target.Health)
                                 + 1 * Player.Instance.FlatPhysicalDamageMod;
                    /*Chat.Print("Flat Damage: " + new float[] { 250, 350, 450 }[level]);
                    Chat.Print("Bonus Damage: " + new float[] { 25, 30, 35 }[level] / 100 * (target.MaxHealth - target.Health));
                    Chat.Print("Damage On Unit: " + Player.Instance.CalculateDamageOnUnit(target, DamageType.Physical, damage));
                    Chat.Print("Unit Health: " + target.Health);*/
                    return Player.Instance.CalculateDamageOnUnit(target, DamageType.Physical, damage);
                }
            }

            return 0;
        }