当前位置: 首页>>代码示例>>C#>>正文


C# SpellSlot.IsReady方法代码示例

本文整理汇总了C#中SpellSlot.IsReady方法的典型用法代码示例。如果您正苦于以下问题:C# SpellSlot.IsReady方法的具体用法?C# SpellSlot.IsReady怎么用?C# SpellSlot.IsReady使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在SpellSlot的用法示例。


在下文中一共展示了SpellSlot.IsReady方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: UltimateDamage

        private static float UltimateDamage(AIHeroClient enemy, SpellSlot slot)
        {
            const float damage = 0f;

            if (!slot.IsReady() || ObjectManager.Player.Spellbook.GetSpell(slot).State != SpellState.NotLearned)
            {
                return 0f;
            }

            if (Utilities.UltimateKey() == "Q")
            {
                return
                    (float)
                        ObjectManager.Player.CalcDamage(enemy, DamageType.Magical, RQ[Spells.R.Level - 1] + .60*
                                                                                          ObjectManager.Player
                                                                                              .FlatMagicDamageMod);
            }
            if (Utilities.UltimateKey() == "W")
            {
                return
                    (float)
                        ObjectManager.Player.CalcDamage(enemy, DamageType.Magical,
                            RW[Spells.R.Level - 1] + .90*ObjectManager.Player.FlatMagicDamageMod);
            }
            if (Utilities.UltimateKey() == "E")
            {
                return
                    (float)
                        ObjectManager.Player.CalcDamage(enemy, DamageType.Magical, RQ[Spells.R.Level - 1] + .60 *
                                                                                          ObjectManager.Player
                                                                                              .FlatMagicDamageMod);
            }

            return damage;
        }
开发者ID:yMeliodasNTD,项目名称:PortAIO,代码行数:35,代码来源:DamageCalculator.cs

示例2: IsSpellActive

        /// <summary>
        ///     The is the spell active method.
        /// </summary>
        /// <param name="spellSlot">
        ///     The spell slot.
        /// </param>
        /// <param name="orbwalkingMode">
        ///     The orbwalking mode.
        /// </param>
        /// <returns>
        ///     <see cref="bool" />
        /// </returns>
        private static bool IsSpellActive(SpellSlot spellSlot, Orbwalking.OrbwalkingMode orbwalkingMode)
        {
            if (Program.Orbwalker.ActiveMode != orbwalkingMode || !spellSlot.IsReady())
            {
                return false;
            }

            try
            {
                var orbwalkerModeLower = Program.Orbwalker.ActiveMode.ToString().ToLower();
                var spellSlotNameLower = spellSlot.ToString().ToLower();

                return MyMenu.RootMenu.Item(orbwalkerModeLower + spellSlotNameLower + "use").GetValue<bool>()
                       && MyMenu.RootMenu.Item(orbwalkerModeLower + spellSlotNameLower + "mana")
                              .GetValue<Slider>()
                              .Value <= ObjectManager.Player.ManaPercent;
            }
            catch (Exception e)
            {
                Logging.AddEntry(
                    LoggingEntryTrype.Error,
                    "@SpellManager.cs: Can not get spell active state for slot {0} - {1}",
                    spellSlot.ToString(),
                    e);
                throw;
            }
        }
开发者ID:vuathan2,项目名称:LeagueSharp,代码行数:39,代码来源:SpellManager.cs

示例3: CalcDamage

        private static int CalcDamage(Obj_AI_Base target)
        {
            var aa = player.GetAutoAttackDamage(target, true) * (1 + player.Crit);
            var damage = aa;
            Ignite = player.GetSpellSlot("summonerdot");

            if (Ignite.IsReady())
                damage += player.GetSummonerSpellDamage(target, Damage.SummonerSpell.Ignite);

            if (Items.HasItem(3153) && Items.CanUseItem(3153))
                damage += player.GetItemDamage(target, Damage.DamageItems.Botrk); //ITEM BOTRK

            if (Items.HasItem(3144) && Items.CanUseItem(3144))
                damage += player.GetItemDamage(target, Damage.DamageItems.Bilgewater); //ITEM BOTRK

            if (R.IsReady() && Config.Item("UseR").GetValue<bool>()) // rdamage
            {
                if (R.IsReady())
                {
                    damage += R.GetDamage(target);
                }
            }

            if (Q.IsReady() && Config.Item("UseQ").GetValue<KeyBind>().Active) // qdamage
            {

                damage += Q.GetDamage(target);
            }

            if (E.IsReady() && Config.Item("UseE").GetValue<KeyBind>().Active) // edamage
            {

                damage += E.GetDamage(target);
            }

            if (W.IsReady() && Config.Item("UseW").GetValue<KeyBind>().Active) // wdamage
            {

                damage += W.GetDamage(target);
            }
            return (int)damage;
        }
开发者ID:werdbrian,项目名称:LeagueSharp-9,代码行数:42,代码来源:Program.cs

示例4: CalcDamage

        public static float CalcDamage(Obj_AI_Base target)
        {
            //Calculate Combo Damage
            var aa = player.GetAutoAttackDamage(target);
            var damage = aa;
            Ignite = player.GetSpellSlot("summonerdot");

            if (Ignite.IsReady())
                damage += player.GetSummonerSpellDamage(target, Damage.SummonerSpell.Ignite);

            if (Config.Item("UseE").GetValue<bool>()) // edamage
            {
                if (E.IsReady())
                {
                    damage += E.GetDamage(target);
                }
            }
            if (target.HasBuff("luxilluminatingfraulein"))
            {
                damage += aa +  player.CalcDamage(target, Damage.DamageType.Magical,
                    10 + (8*player.Level) + 0.2*player.FlatMagicDamageMod);
            }
            if (player.HasBuff("lichbane"))
            {
                damage += player.CalcDamage(target, Damage.DamageType.Magical,
                    (player.BaseAttackDamage*0.75) + ((player.BaseAbilityDamage + player.FlatMagicDamageMod)*0.5));
            }
            if (R.IsReady() && Config.Item("UseR").GetValue<bool>()) // rdamage
            {
                damage += R.GetDamage(target);
            }

            if (Q.IsReady() && Config.Item("UseQ").GetValue<bool>())
            {
                damage += Q.GetDamage(target);
            }
            return (float) damage;
        }
开发者ID:hugohgx43,项目名称:LeagueSharp,代码行数:38,代码来源:Program.cs

示例5: CalcDamage

        public static float CalcDamage(Obj_AI_Base target)
        {
            //Calculate Combo Damage
            float damage = (float)player.GetAutoAttackDamage(target, true) * (1 + player.Crit);

            Ignite = player.GetSpellSlot("summonerdot");

            if (Ignite.IsReady())
                damage += (float)player.GetSummonerSpellDamage(target, Damage.SummonerSpell.Ignite);

            if (Items.HasItem(3153) && Items.CanUseItem(3153))
                damage += (float)player.GetItemDamage(target, Damage.DamageItems.Botrk); //ITEM BOTRK

            if (Items.HasItem(3144) && Items.CanUseItem(3144))
                damage += (float)player.GetItemDamage(target, Damage.DamageItems.Bilgewater); //ITEM BOTRK

            if (Config.Item("UseE").GetValue<bool>()) // edamage
            {
                if (E.IsReady())
                {
                    damage += E.GetDamage(target);
                }
            }

            if (R.IsReady() && Config.Item("UseR").GetValue<KeyBind>().Active) // rdamage
            {

                damage += R.GetDamage(target);
            }

            if (W.IsReady() && Config.Item("UseW").GetValue<bool>())
            {
                damage += W.GetDamage(target);
            }
            return damage;
        }
开发者ID:shootandkill,项目名称:Leaguesharp,代码行数:36,代码来源:Program.cs

示例6: Rlogic

        private static void Rlogic()
        {
            {
                if (!Q.IsReady())
                    qcasted = true;
                Utility.DelayAction.Add(1000, () => qcasted = false);
            }

            Ignite = player.GetSpellSlot("summonerdot");
            var target = TargetSelector.GetTarget(R.Range, TargetSelector.DamageType.Magical);
            if (target == null)
                return;

            var rdmg = R.GetDamage(target);
            var rpdmg = R.GetDamage(target) + player.CalcDamage(target, Damage.DamageType.Magical,
                    10 + (8*player.Level) + 0.2*player.FlatMagicDamageMod);
            var rpred = R.GetPrediction(target);
            var ripdmg = R.GetDamage(target) + player.CalcDamage(target, Damage.DamageType.Magical,
                    10 + (8 * player.Level) + 0.2 * player.FlatMagicDamageMod) +
                         IgniteDamage(target);
            var lichdmg = player.CalcDamage(target, Damage.DamageType.Magical,
                (player.BaseAttackDamage*0.75) + ((player.BaseAbilityDamage + player.FlatMagicDamageMod)*0.5));

            var cdmg = R.GetDamage(target) + E.GetDamage(target);
            var passivedmg = player.CalcDamage(target, Damage.DamageType.Magical,
                10 + (8 * player.Level) + 0.2 * player.FlatMagicDamageMod);
            var passiveaa = player.GetAutoAttackDamage(player) + passivedmg;

            if (target.IsInvulnerable)
                return;

            if (target.HasBuff("caitlynaceinthehole"))
                return;

            if (target.Health <= passiveaa && target.HasBuff("luxilluminatingfraulein") &&
                player.Distance(target.Position) <= Orbwalking.GetRealAutoAttackRange(player))
                return;

            if (target.Health <= Q.GetDamage(target) && Q.GetPrediction(target).Hitchance >= HitChance.VeryHigh &&
                Q.IsReady())
                return;

            if (target.Health <= Q.GetDamage(target) && Q.GetPrediction(target).Hitchance >= HitChance.VeryHigh &&
                qcasted)
                return;

            if (LuxEGameObject != null && target.IsValidTarget(R.Range) &&
                target.Position.Distance(LuxEGameObject.Position) <= E.Width && R.IsReady() //EPR combo
                && target.IsValidTarget(R.Range) && rpred.Hitchance >= HitChance.VeryHigh &&
                target.Health < cdmg + (passivedmg*1) && target.HasBuff("LuxLightBindingMis")
                ||
                LuxEGameObject != null && target.IsValidTarget(R.Range) &&
                target.Position.Distance(LuxEGameObject.Position) <= E.Width && R.IsReady() && Ignite.IsReady()
                    //ERQPI combo
                && target.IsValidTarget(R.Range) && rpred.Hitchance >= HitChance.VeryHigh &&
                target.Health < cdmg + (passivedmg*1) + IgniteDamage(target) && target.HasBuff("LuxLightBindingMis")
                ||
                LuxEGameObject != null && target.IsValidTarget(R.Range) && player.HasBuff("lichbane") &&
                player.Distance(target.Position) <= Orbwalking.GetRealAutoAttackRange(player) && //ERPB combo
                target.Position.Distance(LuxEGameObject.Position) <= E.Width && R.IsReady()
                && target.IsValidTarget(R.Range) && rpred.Hitchance >= HitChance.VeryHigh &&
                target.Health < cdmg + (passivedmg*1) + lichdmg && target.HasBuff("LuxLightBindingMis")
                ||
                LuxEGameObject != null && target.IsValidTarget(R.Range) && player.HasBuff("lichbane") &&
                player.Distance(target.Position) <= Orbwalking.GetRealAutoAttackRange(player) && //ERLIP combo
                target.Position.Distance(LuxEGameObject.Position) <= E.Width && R.IsReady() && Ignite.IsReady()
                && target.IsValidTarget(R.Range) && rpred.Hitchance >= HitChance.VeryHigh &&
                target.Health < cdmg + (passivedmg*1) + IgniteDamage(target) + lichdmg &&
                target.HasBuff("LuxLightBindingMis"))
                R.Cast(target);

            if (target.HasBuff("LuxLightBindingMis") && Config.Item("RQ").GetValue<bool>() && //RQ config
                rpred.Hitchance >= HitChance.VeryHigh)
                R.Cast(target);

            if (player.HasBuff("lichbane") && target.Health < lichdmg && //LIchbane AA check
                player.Distance(target.Position) < Orbwalking.GetRealAutoAttackRange(player))
                return;

            if (player.HasBuff("lichbane") && target.HasBuff("luxilluminatingfraulein") &&
                target.Health < lichdmg + passivedmg && //LIchbane AA PASSIVE check
                player.Distance(target.Position) < Orbwalking.GetRealAutoAttackRange(player))
                return;

            if (target.IsValidTarget(Q.Range) && Q.GetPrediction(target).Hitchance >= HitChance.VeryHigh && Q.IsReady() &&
                //QE overkill check
                E.IsReady() && target.Health < E.GetDamage(target) + Q.GetDamage(target))
                return;

            if (player.Distance(target.Position) < E.Range - 200 && E.GetDamage(target) > target.Health && E.IsReady() ||
                LuxEGameObject != null && target.Distance(LuxEGameObject.Position) <= E.Width &&
                target.Health < E.GetDamage(target) || //ECHECK
                player.Distance(target.Position) < E.Range - 200 && Q.GetDamage(target) > target.Health && Q.IsReady() &&
                Q.GetPrediction(target).Hitchance >= HitChance.VeryHigh ||
                player.Distance(target.Position) < Orbwalking.GetRealAutoAttackRange(player) &&
                player.GetAutoAttackDamage(target)*2 > target.Health)
                return;

            if (LuxEGameObject != null && target.Distance(LuxEGameObject.Position) <= E.Width &&
                target.Health < E.GetDamage(target) ||
//.........这里部分代码省略.........
开发者ID:hugohgx43,项目名称:LeagueSharp,代码行数:101,代码来源:Program.cs

示例7: Killsteal

        private static void Killsteal()
        {
            foreach (var enemy in
                ObjectManager.Get<Obj_AI_Hero>()
                    .Where(x => x.IsValidTarget(R.Range))
                    .Where(x => !x.IsZombie)
                    .Where(x => !x.IsDead))
            {
                Ignite = player.GetSpellSlot("summonerdot");
                var edmg = E.GetDamage(enemy);
                var qdmg = Q.GetDamage(enemy);
                var rdmg = R.GetDamage(enemy);
                var passivedmg1 = player.CalcDamage(enemy, Damage.DamageType.Magical,
                    10 + (8 * player.Level) + 0.2 * player.FlatMagicDamageMod);
                var rpdmg = R.GetDamage(enemy) + passivedmg1;
                var rpred = R.GetPrediction(enemy);
                var qpred = Q.GetPrediction(enemy);
                var epred = E.GetPrediction(enemy);

                var qcollision = Q.GetCollision(player.ServerPosition.To2D(),
                    new List<Vector2> {qpred.CastPosition.To2D()});
                var minioncol = qcollision.Where(x => !(x is Obj_AI_Hero)).Count(x => x.IsMinion);

                if (player.Distance(enemy.Position) <= 600 && IgniteDamage(enemy) >= enemy.Health &&
                    player.HealthPercent <= 25 &&
                    Config.Item("KSI").GetValue<bool>())
                    player.Spellbook.CastSpell(Ignite, enemy);

                if (enemy.Health < edmg && E.IsReady() && epred.Hitchance >= HitChance.VeryHigh)
                    E.Cast(epred.CastPosition);
                else if (enemy.Health < edmg && E.IsReady() && epred.Hitchance >= HitChance.VeryHigh)
                    E.Cast(epred.CastPosition);

                if (enemy.Health < qdmg && qpred.Hitchance >= HitChance.VeryHigh && minioncol <= 1 && Q.IsReady() &&
                    Config.Item("KSQ").GetValue<bool>())
                    Q.Cast(enemy);

                var ripdmg = R.GetDamage(enemy) + passivedmg1;

                var passivedmg = player.CalcDamage(enemy, Damage.DamageType.Magical,
                    10 + (8*player.Level) + 0.2*player.FlatMagicDamageMod);
                var passiveaa = player.GetAutoAttackDamage(player) + passivedmg;
                var lichdmg = player.CalcDamage(enemy, Damage.DamageType.Magical,
                    (player.BaseAttackDamage*0.75) + ((player.BaseAbilityDamage + player.FlatMagicDamageMod)*0.5));

                if (enemy.IsValidTarget(Q.Range) && Q.GetPrediction(enemy).Hitchance >= HitChance.VeryHigh &&
                    Q.IsReady() &&
                    E.IsReady() && enemy.Health < E.GetDamage(enemy) + Q.GetDamage(enemy))
                    return;

                if (player.HasBuff("lichbane") && enemy.Health < lichdmg &&
                    player.Distance(enemy.Position) < Orbwalking.GetRealAutoAttackRange(player))
                    return;

                if (player.HasBuff("lichbane") && enemy.HasBuff("luxilluminatingfraulein") &&
                    enemy.Health < lichdmg + passivedmg && //LIchbane AA PASSIVE check
                    player.Distance(enemy.Position) < Orbwalking.GetRealAutoAttackRange(player))
                    return;

                if (player.Distance(enemy.Position) < E.Range - 200 && E.GetDamage(enemy) > enemy.Health && E.IsReady() ||
                    LuxEGameObject != null && enemy.Distance(LuxEGameObject.Position) <= E.Width &&
                    enemy.Health < E.GetDamage(enemy) ||
                    player.Distance(enemy.Position) < E.Range - 200 && Q.GetDamage(enemy) > enemy.Health && Q.IsReady() &&
                    Q.GetPrediction(enemy).Hitchance >= HitChance.VeryHigh ||
                    player.Distance(enemy.Position) < Orbwalking.GetRealAutoAttackRange(player) &&
                    player.GetAutoAttackDamage(enemy)*2 > enemy.Health)
                    return;

                if (LuxEGameObject != null && enemy.Distance(LuxEGameObject.Position) <= E.Width &&
                    enemy.Health < E.GetDamage(enemy) ||
                    enemy.HasBuff("LuxLightBindingMis")
                    && enemy.Health < passiveaa &&
                    player.Distance(enemy.Position) <= Orbwalking.GetRealAutoAttackRange(player) &&
                    enemy.HasBuff("luxilluminatingfraulein"))
                    return;

                if (enemy.Health < rdmg - 100 + (3*player.Level) && enemy.Position.CountAlliesInRange(650) >= 1)
                    return;

                if (enemy.Health <= passiveaa && enemy.HasBuff("luxilluminatingfraulein") &&
                    player.Distance(enemy.Position) <= Orbwalking.GetRealAutoAttackRange(player))
                    return;

                if (enemy.Health <= Q.GetDamage(enemy) && Q.GetPrediction(enemy).Hitchance >= HitChance.VeryHigh &&
                    Q.IsReady())
                    return;

                if (enemy.HasBuff("caitlynaceinthehole"))
                    return;

                if (enemy.Health < rdmg - 100 + (3*player.Level) && enemy.Position.CountAlliesInRange(650) >= 1)
                    return;

                if (enemy.IsValidTarget(R.Range)
                    && rpred.Hitchance >= HitChance.VeryHigh
                    && Config.Item("RKS").GetValue<bool>()
                    && enemy.HasBuff("luxilluminatingfraulein")
                    && enemy.Health < rpdmg
                    && player.Distance(enemy.Position) >= 100
                    || enemy.IsValidTarget(R.Range)
//.........这里部分代码省略.........
开发者ID:hugohgx43,项目名称:LeagueSharp,代码行数:101,代码来源:Program.cs

示例8: combatGraves

        private static void combatGraves()
        {
            if (Config.Item("combatgraves").GetValue<bool>() && Q.IsReady() && E.IsReady())
            {
                var pushDistance = 400;
                Flash = Player.GetSpellSlot("SummonerFlash");
                float range1000 = Player.CountEnemiesInRange(1000);
                float range750  = Player.CountEnemiesInRange(750);
                float range650  = Player.CountEnemiesInRange(750);

                switch (Config.Item("positioning").GetValue<StringList>().SelectedIndex)
                {
                    case 0:
                        foreach (var vsGraves in HeroManager.Enemies.Where(h => h.IsValidTarget(1000) && h.ChampionName == "Graves"))
                        {
                            if (range1000 == 1 && vsGraves.ChampionName == "Graves")
                            {
                                if (R.IsReady() && Config.Item("rCombat").GetValue<bool>() && range750 == 1)
                                {
                                    if (vsGraves.IsValidTarget(650) && range650 == 1)
                                    {
                                        R.Cast();
                                    }
                                }
                                if (Config.Item("fCombat").GetValue<bool>() && Config.Item("eCombat").GetValue<bool>() && Flash.IsReady() && vsGraves.IsValidTarget(E.Range))
                                {
                                    foreach (
                             var qPosition in
                               CondemnPosition()
                               .OrderBy(qPosition => qPosition.Distance(vsGraves.ServerPosition)))
                                    {
                                        if (qPosition.Distance(vsGraves.Position) < E.Range)
                                            E.UpdateSourcePosition(qPosition, qPosition);
                                        var targetPosition = E.GetPrediction(vsGraves).CastPosition;
                                        var finalPosition = targetPosition.Extend(qPosition, 400);
                                        if (finalPosition.IsWall())
                                        {
                                            Player.Spellbook.CastSpell(Flash, qPosition);

                                        }
                                        if (E.IsReady())
                                        {
                                            E.Cast(vsGraves);
                                        }

                                    }
                                }
                                if (Q.IsReady() && Config.Item("qCombat").GetValue<bool>())
                                {
                                    if (vsGraves.IsValidTarget(Q.Range))
                                    {
                                        Q.Cast(Game.CursorPos);
                                    }
                                }

                            }
                        }
                        break;
                    case 1:
                        foreach (var vsGraves in HeroManager.Enemies.Where(h => h.IsValidTarget(1000) && h.ChampionName == "Graves"))
                        {
                            if (range1000 == 1 && vsGraves.ChampionName == "Graves")
                            {
                                if (R.IsReady() && Config.Item("rCombat").GetValue<bool>() && range750 == 1)
                                {
                                    if (vsGraves.IsValidTarget(650) && range650 == 1)
                                    {
                                        R.Cast();
                                    }
                                }
                                if (Config.Item("fCombat").GetValue<bool>() && Config.Item("eCombat").GetValue<bool>() && Flash.IsReady() && vsGraves.IsValidTarget(E.Range))
                                {
                                    foreach (
                                var qPosition in
                                  CondemnPosition()
                                  .OrderBy(qPosition => qPosition.Distance(vsGraves.ServerPosition)))
                                    {
                                        if (qPosition.Distance(vsGraves.Position) < E.Range)
                                            E.UpdateSourcePosition(qPosition, qPosition);
                                        var targetPosition = E.GetPrediction(vsGraves).CastPosition;
                                        var finalPosition = targetPosition.Extend(qPosition, -pushDistance);
                                        if (finalPosition.IsWall())
                                        {
                                            Q.Cast(qPosition);

                                        }
                                    }
                                }
                            }
                        }
                        break;
                }
            }
        }
开发者ID:pinpolhoxx,项目名称:LeagueSharp,代码行数:94,代码来源:Program.cs

示例9: Evade

        public bool Evade(SpellSlot slot)
        {
            if (ForceDisabled || !slot.IsReady())
            {
                return false;
            }

            if (Utils.TickCount - _cachedValueTick < 100)
            {
                return _cachedValue;
            }

            if (!GetValue("IsDangerous") && YasuoMenu.EvadeM["Evade.OnlyDangerous"].Cast<CheckBox>().CurrentValue)
            {
                _cachedValue = false;
                _cachedValueTick = Utils.TickCount;
                return _cachedValue;
            }

            _cachedValue = slot == SpellSlot.W ? GetValue("EvadeW") : GetValue("EvadeE");
            _cachedValueTick = Utils.TickCount;
            return _cachedValue;
        }
开发者ID:,项目名称:,代码行数:23,代码来源:

示例10: IgniteLogic

        private static void IgniteLogic()
        {
            var target = TargetSelector.GetTarget(R.Range * 2 + 150, TargetSelector.DamageType.Magical);
            var rstacks = Player.Buffs.Find(buff => buff.Name == "AkaliShadowDance").Count;
            var markdmg = Player.CalcDamage(target, Damage.DamageType.Magical,
                (45 + 35 * Q.Level + 0.5 * Player.FlatMagicDamageMod));
            var RendPos = Player.ServerPosition.Extend(target.Position, Player.ServerPosition.Distance(target.Position) + 175);
            Ignite = Player.GetSpellSlot("summonerdot");
            if (!Config.Item("UseIgnite").GetValue<bool>())
                return;

            //WHEN NOT TO IGNITE
            if (Player.Distance(target.Position) <= E.Range && E.IsReady() && target.Health < E.GetDamage(target))
                return;
            if (Player.Distance(target.Position) <= Q.Range && Q.IsReady() && target.Health < Q.GetDamage(target))
                return;
            if (Player.Distance(target.Position) <= Orbwalking.GetRealAutoAttackRange(Player) && target.Health < Player.GetAutoAttackDamage(target))
                return;
            if (Player.Distance(target.Position) <= Orbwalking.GetRealAutoAttackRange(Player) && target.Health < Player.GetAutoAttackDamage(target) + markdmg && target.HasBuff("AkaliMota"))
                return;

            //WHEN TO IGNITE
            if (Player.Distance(target.Position) <= E.Range && Ignite.IsReady() && PotentialDmg(target) > target.Health && Player.ManaPercent > 50 && rstacks >= 1 && !RendPos.UnderTurret(true))
                Player.Spellbook.CastSpell(Ignite, target);

            if (Player.Distance(target.Position) <= Q.Range && Ignite.IsReady() && Q.GetDamage(target) + E.GetDamage(target) + IgniteDamage(target) > target.Health && Player.ManaPercent > 50 && rstacks >= 1 && !RendPos.UnderTurret(true) && Q.IsReady() && E.IsReady())
                Player.Spellbook.CastSpell(Ignite, target);

            if (Player.Distance(target.Position) <= 600 && Ignite.IsReady() && IgniteDamage(target) > target.Health)
                Player.Spellbook.CastSpell(Ignite, target);
        }
开发者ID:hugohgx43,项目名称:LeagueSharp,代码行数:31,代码来源:Program.cs

示例11: SmartKS

        private static void SmartKS()
        {
            foreach (var enemy in ObjectManager.Get<Obj_AI_Hero>()
                .Where(x => x.IsValidTarget(R.Range + 150))
                .Where(x => !x.IsZombie)
                .Where(x => !x.IsDead))
            {
                Ignite = Player.GetSpellSlot("summonerdot");
                var qdmg = Q.GetDamage(enemy);
                var edmg = E.GetDamage(enemy);

                if (IgniteDamage(enemy) >= enemy.Health && Ignite.IsReady()
                    && Config.Item("KSIgnite").GetValue<bool>()
                    && Player.Distance(enemy.Position) <= 600)

                    Player.Spellbook.CastSpell(Ignite, enemy);

                if (enemy.Health < qdmg &&
                    Config.Item("KSQ").GetValue<bool>())

                    Q.Cast(enemy);

                if (enemy.Health < edmg && Config.Item("KSE").GetValue<bool>())
                    E.Cast(enemy);

                if (enemy.Health < edmg + qdmg
                    && Config.Item("KSE").GetValue<bool>() && Config.Item("KSE").GetValue<bool>())
                {
                    E.Cast(enemy);
                    Q.Cast(enemy);
                }

                if (enemy.Health < edmg + qdmg + IgniteDamage(enemy) && Ignite.IsReady()
                    && Config.Item("KSE").GetValue<bool>() && Config.Item("KSE").GetValue<bool>())
                {
                    E.Cast(enemy);
                    Q.Cast(enemy);
                }

                if (enemy.Health < ActualDMG(enemy) && R.IsReady()
                    && Config.Item("KSR").GetValue<bool>())
                {
                    R.Cast(enemy);
                }

            }
        }
开发者ID:hugohgx43,项目名称:LeagueSharp,代码行数:47,代码来源:Program.cs

示例12: Killsteal

        private static void Killsteal()
        {
            {

                foreach (var enemy in
                    ObjectManager.Get<Obj_AI_Hero>()
                        .Where(x => x.IsValidTarget(R.Range))
                        .Where(x => !x.IsZombie)
                        .Where(x => !x.IsDead))
                {
                    Ignite = player.GetSpellSlot("summonerdot");
                    var edmg = E.GetDamage(enemy);
                    var qdmg = Q.GetDamage(enemy);
                    var rdmg = R.GetDamage(enemy);
                    var rpred = R.GetPrediction(enemy);
                    var qpred = Q.GetPrediction(enemy);
                    var epred = E.GetPrediction(enemy);

                    if (enemy.Health < edmg && E.IsReady() && epred.Hitchance >= HitChance.VeryHigh)
                        E.Cast(epred.CastPosition, Config.Item("packetcast").GetValue<bool>());

                    if (enemy.Health < qdmg && qpred.Hitchance >= HitChance.VeryHigh &&
                        Q.IsReady() &&
                        Config.Item("KSQ").GetValue<bool>())

                        Q.Cast(enemy, Config.Item("packetcast").GetValue<bool>());

                    if (enemy.Health < rdmg && rpred.Hitchance >= HitChance.VeryHigh &&
                        !Q.IsReady() &&
                        Config.Item("KSR").GetValue<bool>())

                        R.Cast(enemy, Config.Item("packetcast").GetValue<bool>());

                    if (player.Distance(enemy.Position) <= 600 && IgniteDamage(enemy) >= enemy.Health &&
                        Config.Item("UseIgnite").GetValue<bool>() && R.IsReady() && Ignite.IsReady())
                        player.Spellbook.CastSpell(Ignite, enemy);
                }
            }
        }
开发者ID:Justyyy,项目名称:LeagueSharp-6,代码行数:39,代码来源:Program.cs

示例13: CalcDamage

        private static int CalcDamage(Obj_AI_Base target)
        {
            Ignite = player.GetSpellSlot("summonerdot");
                var aa = player.GetAutoAttackDamage(target, true) * (1 + player.Crit);
                var damage = aa;

            if (Ignite.IsReady())
                damage += player.GetSummonerSpellDamage(target, Damage.SummonerSpell.Ignite);

            if (Items.HasItem(3153) && Items.CanUseItem(3153))
                damage += player.GetItemDamage(target, Damage.DamageItems.Botrk); //ITEM BOTRK

            if (E.IsReady() && Config.Item("UseE").GetValue<bool>()) // edamage
            {
                damage += player.CalcDamage(target, Damage.DamageType.Physical,
                    10 + (E.Level*30) + (player.FlatPhysicalDamageMod*0.3) + aa);
            }

            if (Q.IsReady() && Config.Item("UseQ").GetValue<bool>()) // qdamage
            {
                damage += Q.GetDamage(target);
            }

            if (target.HasBuff("QuinnW") && !E.IsReady())
                damage += player.CalcDamage(target, Damage.DamageType.Physical,
                    15 + (player.Level*10) + (player.FlatPhysicalDamageMod*0.5)); // passive

            if (Config.Item("UseRD").GetValue<bool>() && R.IsReady()) // rdamage
                        damage += R.Level * 125 + aa;

                        return (int) damage;
        }
开发者ID:Justyyy,项目名称:LeagueSharp-6,代码行数:32,代码来源:Program.cs

示例14: ASMode

        private static void ASMode()
        {
            var botrk = ItemData.Blade_of_the_Ruined_King.GetItem();
            var Ghost = ItemData.Youmuus_Ghostblade.GetItem();
            var cutlass = ItemData.Bilgewater_Cutlass.GetItem();
            Ignite = player.GetSpellSlot("summonerdot");

            var target = TargetSelector.GetTarget(1200, TargetSelector.DamageType.Physical);
            if (target == null || !target.IsValidTarget())
                return;
            var ultfinisher = player.CalcDamage(target, Damage.DamageType.Physical,
                (75 + (R.Level*55) + (player.FlatPhysicalDamageMod*0.5))*(2 - (target.Health/target.MaxHealth)));
            var ultignite = IgniteDamage(target) +player.CalcDamage(target, Damage.DamageType.Physical,
                (75 + (R.Level * 55) + (player.FlatPhysicalDamageMod * 0.5)) * (2 - (target.Health / target.MaxHealth)));

            if (botrk.IsReady() && target.IsValidTarget(botrk.Range))
                botrk.Cast(target);
            if (cutlass.IsReady() && target.IsValidTarget(cutlass.Range))
                botrk.Cast(target);
            if (Ghost.IsReady() && target.IsValidTarget(900))
                Ghost.Cast();

            if (E.IsReady())
                E.CastOnUnit(target);

            if (Q.IsReady() && target.IsValidTarget(225) && player.Position.CountEnemiesInRange(250) > 0)
                Q.Cast(target);

            if (R.IsReady() && Ignite.IsReady() && ultignite > target.Health &&
                player.Position.CountEnemiesInRange(500) > 0)
                R.Cast(player);

            if (R.IsReady() && ultfinisher > target.Health && player.Position.CountEnemiesInRange(500) > 0)
                R.Cast(player);
        }
开发者ID:Justyyy,项目名称:LeagueSharp-6,代码行数:35,代码来源:Program.cs

示例15: CalcDamage

        private static int CalcDamage(Obj_AI_Base target)
        {
            var aa = Player.GetAutoAttackDamage(target, true) * (1 + Player.Crit);
            var damage = aa;
            _ignite = Player.GetSpellSlot("summonerdot");

            if (_ignite.IsReady())
                damage += Player.GetSummonerSpellDamage(target, Damage.SummonerSpell.Ignite);

            if (R.IsReady()) // rdamage
            {
                    damage += R.GetDamage(target);
            }

            if (Q.IsReady()) // qdamage
            {

                damage += Q.GetDamage(target);
            }

            if (E.IsReady()) // edamage
            {

                damage += E.GetDamage(target);
            }

            if (_smite.IsReady()) // edamage
            {

                damage += GetSmiteDmg();
            }

            return (int)damage;
        }
开发者ID:fgpmaia123,项目名称:LeagueSharp-18,代码行数:34,代码来源:Program.cs


注:本文中的SpellSlot.IsReady方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。