Пример #1
0
        public static float GetDamage(AIHeroClient target, bool includeUltimateDamage)
        {
            if (target == null)
            {
                return(0);
            }
            float toReturn = 0;

            if (DaggerManager.GetDaggers().Any(d => d.GetPosition().Distance(target.Position) < 340))
            {
                toReturn += (float)Player.CalcDamage(target, Damage.DamageType.Magical, RawPassiveDamage());
            }
            if (Q.IsReady())
            {
                toReturn += Q.GetDamage(target);
            }
            if (E.IsReady())
            {
                toReturn += E.GetDamage(target);
            }
            if (includeUltimateDamage && R.IsReady())
            {
                toReturn += R.GetDamage(target, 1);
            }
            return((float)toReturn);
        }
Пример #2
0
        private static void ELogic(AIHeroClient target = null)
        {
            if (target == null)
            {
                target = TargetSelector.GetTarget(E.Range, TargetSelector.DamageType.Magical);
            }
            if (target == null)
            {
                return;
            }
            Dagger eDagger = DaggerManager.GetDaggers().FirstOrDefault(d => d.GetPosition().Distance(target.Position) <= 330 && d.GetPosition().Distance(Player.Position) >= 140); //Finetuning needed

            if (eDagger != null)
            {
                Vector3 ePositon = eDagger.GetPosition().Extend(target.Position, 140);
                if (Player.Distance(ePositon) <= E.Range)
                {
                    E.Cast(ePositon);
                    return;
                }
                ePositon = Player.Position.Extend(ePositon, E.Range);
                if (ePositon.Distance(eDagger.GetPosition()) <= 140 && ePositon.Distance(target.Position) < 200)
                {
                    E.Cast(ePositon);
                    return;
                }
            }
            if (Config.GetBoolValue("combo.ealways"))
            {
                E.Cast(target.Position.Extend(Player.Position, -50));
            }
        }