Ejemplo n.º 1
0
        public static bool CanBaseUlt(TrackedRecall recall, Baseult spell, AIHeroClient source)
        {
            var visiable = NotVisiableEnemies.FirstOrDefault(e => e.Target.IdEquals(recall.Caster));

            return(!recall.Ulted &&
                   spell.IsReady() &&
                   (FowTolerance == 0 || visiable == null || FowTolerance * 1000 > visiable.TicksPassed - recall.TicksPassed) &&
                   MenuIni.Get <CheckBox>(recall.Caster.BaseSkinName).CurrentValue &&
                   spell.IsInRange(recall.CastPosition(spell, source)) &&
                   recall.TicksLeft > spell.TravelTime(recall.CastPosition(spell, source)) &&
                   Collision.Check(source, recall.CastPosition(spell, source), spell, recall.Caster) &&
                   calculateDamage(recall, source, spell) >= healthAfterTime(recall, spell.TravelTime(recall.CastPosition(spell, source))));
        }
Ejemplo n.º 2
0
        public Vector3 CastPosition(Baseult spell, Obj_AI_Base source)
        {
            if (spell.SkillType != null && spell.SkillType == SkillShotType.Circular)
            {
                if (source.Distance(this.EndPosition) > spell.CurrentRange)
                {
                    if (this.EndPosition.IsInRange(source, spell.CurrentRange + (spell.Width / 2f)))
                    {
                        var modRange = source.Distance(this.EndPosition) - spell.Range;
                        return(this.EndPosition.Extend(source, modRange).To3DWorld());
                    }
                }
            }

            return(this.EndPosition);
        }
Ejemplo n.º 3
0
        public static bool Check(AIHeroClient start, Vector3 end, Baseult spell, AIHeroClient target = null)
        {
            if (spell.AllowedCollisionCount >= int.MaxValue)
            {
                return(true);
            }

            if (spell.AllowedCollisionCount == -1 || spell.AllowedCollisionCount == 1)
            {
                if (start.GetYasuoWallCollision(end, start.IsAlly) != Vector3.Zero)
                {
                    return(false);
                }
            }

            var polygon = new Geometry.Polygon.Rectangle(start.ServerPosition, end, spell.Width);

            return(!EntityManager.Heroes.AllHeroes.Any(h => h.IsValid && !h.IsDead && h.Team != start.Team && (target == null || !target.IdEquals(h)) && polygon.IsInside(h)));
        }
Ejemplo n.º 4
0
        private static bool loadUlts()
        {
            foreach (var a in EntityManager.Heroes.Allies)
            {
                if (a.ChampionName.Equals("Ashe"))
                {
                    BaseUltSpell = new Baseult(SpellSlot.R, DamageType.Magical, int.MaxValue, 140, 250, 1600)
                    {
                        RawDamage             = () => (200f * getSpell(a, SpellSlot.R).Level) + a.TotalMagicalDamage,
                        AllowedCollisionCount = 1
                    };

                    InGameUlts.Add(a.NetworkId, BaseUltSpell);
                }

                if (a.ChampionName.Equals("Draven"))
                {
                    BaseUltSpell = new Baseult(SpellSlot.R, DamageType.Physical, int.MaxValue, 160, 300, 2000)
                    {
                        RawDamage             = () => 75f + (100f * getSpell(a, SpellSlot.R).Level) + a.FlatPhysicalDamageMod * 1.1f,
                        AllowedCollisionCount = -1,
                        NameCheck             = "DravenRCast"
                    };

                    InGameUlts.Add(a.NetworkId, BaseUltSpell);
                }

                if (a.ChampionName.Equals("Ezreal"))
                {
                    BaseUltSpell = new Baseult(SpellSlot.R, DamageType.Magical, int.MaxValue, 160, 1000, 2000)
                    {
                        RawDamage             = () => 200f + (150f * getSpell(a, SpellSlot.R).Level) + a.FlatPhysicalDamageMod + (a.TotalMagicalDamage * 0.9f),
                        AllowedCollisionCount = -1,
                    };

                    InGameUlts.Add(a.NetworkId, BaseUltSpell);
                }

                if (a.ChampionName.Equals("Jinx"))
                {
                    BaseUltSpell = new Baseult(SpellSlot.R, DamageType.Physical, int.MaxValue, 140, 550, 2100)
                    {
                        RawDamage             = () => 150f + (100f * getSpell(a, SpellSlot.R).Level) + a.FlatPhysicalDamageMod * 1.5f,
                        AllowedCollisionCount = 1,
                    };

                    InGameUlts.Add(a.NetworkId, BaseUltSpell);
                }

                if (a.ChampionName.Equals("Karthus"))
                {
                    BaseUltSpell = new Baseult(SpellSlot.R, DamageType.Magical, int.MaxValue, -1, 3000, int.MaxValue)
                    {
                        RawDamage             = () => 100f + (150f * getSpell(a, SpellSlot.R).Level) + a.TotalMagicalDamage * 0.6f,
                        AllowedCollisionCount = int.MaxValue,
                    };

                    InGameUlts.Add(a.NetworkId, BaseUltSpell);
                }

                if (a.ChampionName.Equals("Lux"))
                {
                    BaseUltSpell = new Baseult(SpellSlot.R, DamageType.Magical, 3500, 150, 950, int.MaxValue)
                    {
                        RawDamage             = () => 200f + (100f * getSpell(a, SpellSlot.R).Level) + a.TotalMagicalDamage * 0.75f,
                        AllowedCollisionCount = int.MaxValue
                    };

                    InGameUlts.Add(a.NetworkId, BaseUltSpell);
                }

                if (a.ChampionName.Equals("Xerath"))
                {
                    BaseUltSpell = new Baseult(SpellSlot.R, DamageType.Magical, 3520, 200, 600, int.MaxValue)
                    {
                        RawDamage             = () => 170f + (30f * getSpell(a, SpellSlot.R).Level) + a.TotalMagicalDamage * 0.43f,
                        AllowedCollisionCount = int.MaxValue,
                        NameCheck             = "XerathRMissileWrapper",
                        RangeGrow             = 1320,
                        SkillType             = SkillShotType.Circular
                    };

                    InGameUlts.Add(a.NetworkId, BaseUltSpell);
                }

                if (a.ChampionName.Equals("Pantheon"))
                {
                    BaseUltSpell = new Baseult(SpellSlot.R, DamageType.Magical, 5500, 700, 4600, int.MaxValue)
                    {
                        RawDamage             = () => 100f + (300f * getSpell(a, SpellSlot.R).Level) + a.TotalMagicalDamage,
                        AllowedCollisionCount = int.MaxValue,
                        NameCheck             = "PantheonRJump"
                    };

                    InGameUlts.Add(a.NetworkId, BaseUltSpell);
                }

                if (a.ChampionName.Equals("Ziggs"))
                {
                    BaseUltSpell = new Baseult(SpellSlot.R, DamageType.Magical, 5250, 275, 250, 1750)
                    {
                        RawDamage             = () => 150f + (150f * getSpell(a, SpellSlot.R).Level) + a.TotalMagicalDamage * 1.1f,
                        AllowedCollisionCount = int.MaxValue,
                        SkillType             = SkillShotType.Circular
                    };

                    InGameUlts.Add(a.NetworkId, BaseUltSpell);
                }

                if (a.ChampionName.Equals("Gragas"))
                {
                    BaseUltSpell = new Baseult(SpellSlot.R, DamageType.Magical, 1100, 400, 250, 1600)
                    {
                        RawDamage             = () => 100f + (100f * getSpell(a, SpellSlot.R).Level) + a.TotalMagicalDamage * 0.7f,
                        AllowedCollisionCount = -1,
                        SkillType             = SkillShotType.Circular
                    };

                    InGameUlts.Add(a.NetworkId, BaseUltSpell);
                }

                if (a.ChampionName.Equals("Graves"))
                {
                    BaseUltSpell = new Baseult(SpellSlot.R, DamageType.Physical, 1250, 100, 250, 2100)
                    {
                        RawDamage             = () => 100f + (150f * getSpell(a, SpellSlot.R).Level) + a.FlatPhysicalDamageMod * 1.5f,
                        AllowedCollisionCount = 1,
                    };

                    InGameUlts.Add(a.NetworkId, BaseUltSpell);
                }
            }

            BaseUltSpell = null;

            try { BaseUltSpell = InGameUlts[Player.Instance.NetworkId]; }
            catch (Exception) { return(false); }

            return(BaseUltSpell != null);
        }
Ejemplo n.º 5
0
 private static float calculateDamage(TrackedRecall recall, AIHeroClient source, Baseult spell)
 {
     return(spell.CalculateDamage(source, recall));
 }