Пример #1
0
        internal static bool CanCastFromLastSeen(Teleport_Infomation info)
        {
            var enemy     = EnemyList.FirstOrDefault(e => e.Value.Enemy.NetworkId.Equals(info.Enemy.NetworkId));
            int timelimit = BaseMenu.VSliderValue("Base.Time");

            if (enemy.Value != null)
            {
                if (timelimit.Equals(0))
                {
                    return(true);
                }
                return(Core.GameTickCount - enemy.Value.Lastseen <= timelimit * 1000);
            }
            return(Core.GameTickCount - info?.Lastseen <= timelimit * 1000);
        }
Пример #2
0
        private static void DoBaseUlt(Teleport_Infomation info)
        {
            var CountDown  = info.Started + info.Duration - Core.GameTickCount;
            var Traveltime = GetTravelTime(info.Enemy);

            if ((IsEnable && (!PreventCombo || !Orbwalker.ActiveModes.Combo.IsOrb())) || IsActiving)
            {
                if (SpellBase.IsReady() && CountDown >= Traveltime && CanKill(info))
                {
                    if (CountDown - Traveltime < 60)
                    {
                        SpellBase.Cast(info.Enemy.Home());
                    }
                }
            }
        }
Пример #3
0
        internal static float GetHealth(Teleport_Infomation info)
        {
            if (info.Enemy.IsHPBarRendered)
            {
                return(info.Enemy.TotalShieldHealth());
            }

            var invisibleTime = Core.GameTickCount - info.Lastseen;

            #warning HPRegenRate not true now
            //var healthregen = info.Enemy.HPRegenRate * (invisibleTime / 1000);
            var healthregen = 5f * (invisibleTime / 1000);

            var result = info.Enemy.TotalShieldHealth() + healthregen;

            return(Math.Min(info.Enemy.TotalShieldMaxHealth(), result));
        }
Пример #4
0
 public static bool CanKill(Teleport_Infomation info)
 {
     return(SpellBase != null && /*SpellBase.IsInRange(info.Enemy.Home())*/ info.Enemy.IsEnemy &&
            info.IsRecall && IsKillable(info) && !HasCollison(info.Enemy) && CanCastFromLastSeen(info));
 }
Пример #5
0
        internal static bool IsKillable(Teleport_Infomation info)
        {
            var enemy = EnemyList.FirstOrDefault(e => e.Value.Enemy.NetworkId.Equals(info.Enemy.NetworkId));

            return(GetDamage(enemy.Value?.Enemy) >= GetHealth(info));
        }