Пример #1
0
        private static double GetBaseUltSpellDamage(BaseUltSpell spell, AIHeroClient target)
        {
            var level = Player.Spellbook.GetSpell(spell.Slot).Level - 1;

            switch (spell.Name)
            {
            case "Jinx":
            {
                float damage = new float[] { 250, 350, 450 }[level] +
                new float[] { 25, 30, 35 }[level] / 100 * (target.MaxHealth - target.Health) +
                1 * Player.FlatPhysicalDamageMod;
                return(Damage.CalculateDamageOnUnit(Player, target, DamageType.Physical, damage));
            }

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

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

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

            case "Karthus":
            {
                float damage = new float[] { 250, 400, 550 }[level] +0.6f * Player.FlatMagicDamageMod;
                return(Damage.CalculateDamageOnUnit(Player, target, DamageType.Magical, damage));;
            }

            case "Lux":
            {
                float damage = new float[] { 300, 400, 500 }[level] +0.75f * Player.FlatMagicDamageMod;
                return(Damage.CalculateDamageOnUnit(Player, target, DamageType.Magical, damage));
            }

            case "Xerath":
            {
                float damage = new float[] { 190, 245, 300 }[level] +0.43f * Player.FlatMagicDamageMod;
                return(Damage.CalculateDamageOnUnit(Player, target, DamageType.Magical, damage));
            }

            case "Ziggs":
            {
                float damage = new float[] { 250, 375, 500 }[level] +0.9f * Player.FlatMagicDamageMod;
                return(Damage.CalculateDamageOnUnit(Player, target, DamageType.Magical, damage));
            }
            }

            return(0);
        }
Пример #2
0
        private static List <Obj_AI_Base> GetCollision(float spellwidth, BaseUltSpell spell)
        {
            var collisionList = new List <Obj_AI_Base>();

            foreach (var unit in HeroManager.Enemies.Where(h => Player.Distance(h) < 2000))
            {
                var pred = Prediction.Position.PredictLinearMissile(unit, 2000, (int)spell.Radius, (int)spell.Delay,
                                                                    spell.Speed, -1);
                var endpos    = Player.ServerPosition.Extend(GetFountainPos(), 2000);
                var projectOn = pred.UnitPosition.To2D()
                                .ProjectOn(Player.ServerPosition.To2D(), endpos);
                if (projectOn.SegmentPoint.Distance(endpos) < spellwidth + unit.BoundingRadius)
                {
                    collisionList.Add(unit);
                }
            }

            return(collisionList);
        }
Пример #3
0
        private static List<Obj_AI_Base> GetCollision(float spellwidth, BaseUltSpell spell)
        {
            var collisionList = new List<Obj_AI_Base>();
            foreach (var unit in HeroManager.Enemies.Where(h => Player.Distance(h) < 2000))
            {
                var pred = Prediction.Position.PredictLinearMissile(unit, 2000, (int) spell.Radius, (int)spell.Delay,
                    spell.Speed, -1);
                var endpos = Player.ServerPosition.Extend(GetFountainPos(), 2000);
                var projectOn = pred.UnitPosition.To2D()
                    .ProjectOn(Player.ServerPosition.To2D(), endpos);
                if (projectOn.SegmentPoint.Distance(endpos) < spellwidth + unit.BoundingRadius)
                {
                    collisionList.Add(unit);
                }
            }

            return collisionList;
        }
Пример #4
0
        private static double GetBaseUltSpellDamage(BaseUltSpell spell, AIHeroClient target)
        {
            var level = Player.Spellbook.GetSpell(spell.Slot).Level - 1;
            switch (spell.Name)
            {
                case "Jinx":
                {
                    float damage = new float[]{250, 350, 450}[level] +
                                 new float[] {25, 30, 35}[level]/100*(target.MaxHealth - target.Health) +
                                 1*Player.FlatPhysicalDamageMod;
                    return Damage.CalculateDamageOnUnit(Player, target, DamageType.Physical, damage);
                }
                case "Ezreal":
                {
                    float damage = new float[] {350, 500, 650}[level] + 0.9f*Player.FlatMagicDamageMod + 1*Player.FlatPhysicalDamageMod;
                    return Damage.CalculateDamageOnUnit(Player, target, DamageType.Magical, damage) *0.7;
                }
                case "Ashe":
                {
                    float damage = new float[] {250, 425, 600}[level] + 1*Player.FlatMagicDamageMod;
                    return Damage.CalculateDamageOnUnit(Player, target, DamageType.Magical, damage);
                }
                case "Draven":
                {
                    float damage = new float[] {175, 275, 375}[level] + 1.1f*Player.FlatPhysicalDamageMod;
                    return Damage.CalculateDamageOnUnit(Player, target, DamageType.Physical, damage)*0.7;
                }
                case "Karthus":
                {
                    float damage = new float[] {250, 400, 550}[level] + 0.6f*Player.FlatMagicDamageMod;
                    return Damage.CalculateDamageOnUnit(Player, target, DamageType.Magical, damage); ;
                }
                case "Lux":
                {
                    float damage = new float[] {300, 400, 500}[level] + 0.75f*Player.FlatMagicDamageMod;
                    return Damage.CalculateDamageOnUnit(Player, target, DamageType.Magical, damage);
                }
                case "Xerath":
                {
                    float damage = new float[] {190, 245, 300}[level] + 0.43f*Player.FlatMagicDamageMod;
                    return Damage.CalculateDamageOnUnit(Player, target, DamageType.Magical, damage);
                }
                case "Ziggs":
                {
                    float damage = new float[] {250, 375, 500}[level] + 0.9f*Player.FlatMagicDamageMod;
                    return Damage.CalculateDamageOnUnit(Player, target, DamageType.Magical, damage);
                }
            }

            return 0;
        }