コード例 #1
0
        protected override float GetComboDamage(Obj_AI_Base target, IEnumerable <SpellBase> list)
        {
            var damage = list.Sum(spell => spell.GetDamage(target));

            if (RShadowIsValid)
            {
                var hero = target as AIHeroClient;
                if (hero != null && TargetHaveR(hero))
                {
                    damage += (damage - Ignite.GetDamage(target) - Smite.GetDamage(target)) * (20f + R.Level * 10) / 100f;
                }
            }
            else
            {
                damage += damage * (20f + R.Level * 10) / 100f;
            }
            damage += MyHero.GetAttackDamage(target);
            damage += GetPassiveDamage(target, target.TotalShieldHealth() - damage);
            return(damage);
        }
コード例 #2
0
ファイル: Program.cs プロジェクト: baskan/LeagueSharp
        private static void OnCombo(Obj_AI_Hero target)
        {
            if (_menu.Item("miscIgnite").GetValue <bool>() && Ignite.IsReady() &&
                Ignite.GetDamage(target) > target.Health)
            {
                Ignite.Cast(target);
            }

            float pounceDistance = target.IsHunted() ? 740 : _pounce.Range;

            if (_player.IsCougar())
            {
                if (_menu.Item("useTakedown").GetValue <bool>() && _takedown.IsReady() &&
                    _player.Distance(target.Position) <= _takedown.Range)
                {
                    _takedown.Cast(true);
                }

                if (_pounce.IsReady() && _menu.Item("usePounce").GetValue <bool>())
                {
                    if (_menu.Item("turretSafety").GetValue <bool>() && IsUnderEnemyTurret(target))
                    {
                        ShowNotification("Target is under turret, won't pounce.", Color.Red, 3100);
                        return;
                    }

                    if (target.IsHunted() && _player.Distance(target.Position) <= 740)
                    {
                        _pounce.Cast(target.ServerPosition);
                    }
                    else if (_player.Distance(target.Position) <= 400)
                    {
                        _pounce.Cast(target.Position);
                    }
                }

                if (_menu.Item("useSwipe").GetValue <bool>() && _swipe.IsReady() &&
                    _player.Distance(target.Position) <= _swipe.RangeSqr)
                {
                    if (!_pounce.IsReady())
                    {
                        _swipe.Cast(target);
                    }
                }

                if (_menu.Item("useHuman").GetValue <bool>())
                {
                    if (!_pounce.IsReady() && _player.Distance(target.Position) > pounceDistance &&
                        _cooldownTracker.CheckSpell(CooldownTracker.CooldownSpell.Javelin) &&
                        _javelinToss.GetPrediction(target).Hitchance >= CustomHitChance)
                    {
                        if (_aspectOfTheCougar.IsReady())
                        {
                            _aspectOfTheCougar.Cast();
                        }
                    }
                }
            }
            else
            {
                if (_menu.Item("useJavelin").GetValue <bool>() && _javelinToss.IsReady() &&
                    target.IsValidTarget(_javelinToss.Range) && _player.Distance(target.Position) <= _javelinToss.Range)
                {
                    _javelinToss.CastIfHitchanceEquals(target, CustomHitChance);
                }

                if (_menu.Item("useBushwhack").GetValue <bool>() && _bushwhack.IsReady() &&
                    target.IsValidTarget(_bushwhack.Range) && _player.Distance(target.Position) <= _bushwhack.Range)
                {
                    _bushwhack.CastIfHitchanceEquals(target, CustomHitChance);
                }

                if (target.IsHunted() && !_javelinToss.IsReady() && _player.Distance(target.Position) < pounceDistance)
                {
                    if (_aspectOfTheCougar.IsReady() && _menu.Item("useCougar").GetValue <bool>())
                    {
                        _aspectOfTheCougar.Cast();
                    }
                }
            }
        }