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


C# Obj_AI_Base.LSGetSpellDamage方法代码示例

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


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

示例1: Protector

 public static void Protector(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs spell)
 {
     if (!Program.R.IsReady() && Kindred.IsDead && Kindred.IsZombie && sender.IsAlly && !sender.IsMe &&
         !getCheckBoxItem(Language.miscMenu, "protector"))
     {
         return;
     }
     if (sender is AIHeroClient && Program.R.IsReady() && sender.IsEnemy && !spell.SData.IsAutoAttack()
         && !sender.IsDead && !sender.IsZombie && sender.IsValidTarget(1000))
     {
         foreach (var protector in SpellDatabase.Spells.Where(x => x.spellName == spell.SData.Name
                                                                   &&
                                                                   getCheckBoxItem(Language.miscMenu,
                                                                       "hero." + x.spellName)))
         {
             if (protector.spellType == SpellType.Circular && Kindred.Distance(spell.End) <= 200 &&
                 sender.LSGetSpellDamage(Kindred, protector.spellName) > Kindred.Health)
             {
                 Program.R.Cast(Kindred);
             }
             if (protector.spellType == SpellType.Cone && Kindred.Distance(spell.End) <= 200 &&
                 sender.LSGetSpellDamage(Kindred, protector.spellName) > Kindred.Health)
             {
                 Program.R.Cast(Kindred);
             }
             if (protector.spellType == SpellType.Line && Kindred.Distance(spell.End) <= 200
                 && sender.LSGetSpellDamage(Kindred, protector.spellName) > Kindred.Health)
             {
                 Program.R.Cast(Kindred);
             }
         }
     }
 }
开发者ID:Xelamats,项目名称:PortAIO,代码行数:33,代码来源:Helper.cs

示例2: HealUltTrigger

        private static void HealUltTrigger(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
        {
            if (getCheckBoxItem(miscMenu, "Recallcheck") && Player.IsRecalling())
            {
                return;
            }

            var target = args.Target as AIHeroClient;
            var senderhero = sender as AIHeroClient;
            var senderturret = sender as Obj_AI_Turret;

            if (sender.IsAlly || (target == null) || !target.IsAlly)
            {
                return;
            }

            float setvaluehealth = getSliderItem(healMenu, "hpct" + target.NetworkId);
            float setvalueult = getSliderItem(ultMenu, "upct" + target.NetworkId);

            var triggered = false;

            if (W.IsReady() && getCheckBoxItem(healMenu, "heal" + target.NetworkId) && (target.HealthPercent <= setvaluehealth))
            {
                HealUltManager(true, false, target);
                triggered = true;
            }

            if (R.IsReady() && getCheckBoxItem(ultMenu, "ult" + target.NetworkId) && (target.HealthPercent <= setvalueult) && target.LSDistance(Player) <= R.Range)
            {
                if (args.SData.Name.ToLower().Contains("minion") && target.HealthPercent > 5)
                {
                    return;
                }
                if (debug())
                {
                    Chat.Print("Ult target: " + target.ChampionName + " Ult reason: Target hp percent below set value of: " + setvalueult + " Current value is: " + target.HealthPercent + " Triggered by: Incoming spell: + " + args.SData.Name);
                }
                HealUltManager(false, true, target);
                triggered = true;
            }

            if (triggered)
            {
                return;
            }

            var damage = sender.LSGetSpellDamage(target, args.SData.Name);
            var afterdmg = (target.Health - damage) / target.MaxHealth * 100f;

            if (W.IsReady() && Player.LSDistance(target) <= W.Range && getCheckBoxItem(healMenu, "heal" + target.NetworkId) && (target.HealthPercent <= setvaluehealth || (getCheckBoxItem(healMenu, "hcheckdmgafter") && afterdmg <= setvaluehealth)))
            {
                if (getCheckBoxItem(healMenu, "hdamagedetection"))
                {
                    HealUltManager(true, false, target);
                }
            }
        }
开发者ID:,项目名称:,代码行数:57,代码来源:

示例3: Obj_AI_Base_OnProcessSpellCast

        private static void Obj_AI_Base_OnProcessSpellCast(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
        {
            if (sender.IsMe && args.SData.Name == "OrianaIzunaCommand")
                BallPos = args.End;

            if (!E.IsReady() || !sender.IsEnemy || !getCheckBoxItem(eMenu, "autoW") || Player.Mana < EMANA + RMANA ||
                sender.LSDistance(Player.Position) > 1600)
                return;

            foreach (
                var ally in
                    Program.Allies.Where(
                        ally => ally.IsValid && !ally.IsDead && Player.LSDistance(ally.ServerPosition) < E.Range))
            {
                double dmg = 0;
                if (args.Target != null && args.Target.NetworkId == ally.NetworkId)
                {
                    dmg = dmg + sender.LSGetSpellDamage(ally, args.SData.Name);
                }
                else
                {
                    var castArea = ally.LSDistance(args.End)*(args.End - ally.ServerPosition).Normalized() +
                                   ally.ServerPosition;
                    if (castArea.LSDistance(ally.ServerPosition) < ally.BoundingRadius/2)
                        dmg = dmg + sender.LSGetSpellDamage(ally, args.SData.Name);
                    else
                        continue;
                }

                var HpPercentage = dmg*100/ally.Health;
                var shieldValue = 60 + E.Level*40 + 0.4*Player.FlatMagicDamageMod;

                if (HpPercentage >= getSliderItem(eMenu, "Wdmg") || dmg > shieldValue)
                    E.CastOnUnit(ally);
            }
        }
开发者ID:yMeliodasNTD,项目名称:PortAIO,代码行数:36,代码来源:Program.cs

示例4: AIHeroClient_OnProcessSpellCast

        /// <summary>
        ///     OnProcessSpellCast Event which detects skillshots
        /// </summary>
        /// <param name="sender">The sender.</param>
        /// <param name="args">The args.</param>
        private void AIHeroClient_OnProcessSpellCast(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
        {
            if (evade != null && getCheckBoxItem("EVADEENABLE") && sender.Type == GameObjectType.AIHeroClient)
            {
                if (sender.IsEnemy)
                {
                    var sender_pos = sender.ServerPosition.To2D();

                    if (getCheckBoxItem(string.Format("SCommon.Evade.Spell.{0}", args.SData.Name)))
                    {
                        var spell = SpellDatabase.EvadeableSpells.FirstOrDefault(p => p.SpellName == args.SData.Name);
                        if (spell != null)
                        {
                            if (spell.IsSkillshot)
                            {
                                var dcspell = m_spell_pool.GetObject();
                                dcspell.Set(spell, sender_pos, args.End.To2D(), sender, args);
                                m_spell_queue.Enqueue(dcspell);
                            }
                        }
                    }

                    //to do: ally check
                    if (args.Target != null && args.Target.IsMe && args != null && args.SData != null &&
                        !args.SData.IsAutoAttack() && sender.IsChampion())
                    {
                        if (sender.LSGetSpellDamage(ObjectManager.Player, args.SData.Name)*2 >=
                            ObjectManager.Player.Health)
                            OnSpellHitDetected(sender_pos, ObjectManager.Player);
                    }
                }
            }
        }
开发者ID:Xelamats,项目名称:PortAIO,代码行数:38,代码来源:Evader.cs

示例5: OnObjAiBaseProcessSpellCast

        private static void OnObjAiBaseProcessSpellCast(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
        {
            try
            {
                if (!Enabled)
                {
                    return;
                }
                var enemy = sender as AIHeroClient;
                var turret = sender as Obj_AI_Turret;
                foreach (
                    var hero in GameObjects.Heroes.Where(h => h.IsValid && IncomingDamages.ContainsKey(h.NetworkId)))
                {
                    if (ShouldReset(hero))
                    {
                        IncomingDamages[hero.NetworkId] = 0;
                        continue;
                    }

                    if (enemy != null && enemy.IsValid && enemy.IsEnemy && enemy.LSDistance(hero) <= 2000f)
                    {
                        if (args.Target != null && args.Target.NetworkId.Equals(hero.NetworkId))
                        {
                            if (args.SData.IsAutoAttack())
                            {
                                AddDamage(
                                    hero, (int)(GetTime(sender, hero, args.SData) * 0.3f),
                                    (float)sender.LSGetAutoAttackDamage(hero, true));
                            }
                            else if (args.SData.TargettingType == SpellDataTargetType.Unit ||
                                     args.SData.TargettingType == SpellDataTargetType.SelfAndUnit)
                            {
                                AddDamage(
                                    hero, (int)(GetTime(sender, hero, args.SData) * 0.3f),
                                    (float)sender.LSGetSpellDamage(hero, args.SData.Name));
                            }
                        }

                        if (args.Target == null && Skillshots)
                        {
                            var slot = enemy.GetSpellSlot(args.SData.Name);
                            if (slot != SpellSlot.Unknown &&
                                (slot == SpellSlot.Q || slot == SpellSlot.E || slot == SpellSlot.W ||
                                 slot == SpellSlot.R))
                            {
                                var width = Math.Min(
                                    750f,
                                    (args.SData.TargettingType == SpellDataTargetType.Cone || args.SData.LineWidth > 0) &&
                                    args.SData.TargettingType != SpellDataTargetType.Cone
                                        ? args.SData.LineWidth
                                        : (args.SData.CastRadius <= 0
                                            ? args.SData.CastRadiusSecondary
                                            : args.SData.CastRadius));
                                if (args.End.LSDistance(hero.ServerPosition) <= Math.Pow(width, 2))
                                {
                                    AddDamage(
                                        hero, (int)(GetTime(sender, hero, args.SData) * 0.6f),
                                        (float)sender.LSGetSpellDamage(hero, args.SData.Name));
                                }
                            }
                        }
                    }

                    if (turret != null && turret.IsValid && turret.IsEnemy && turret.LSDistance(hero) <= 1500f)
                    {
                        if (args.Target != null && args.Target.NetworkId.Equals(hero.NetworkId))
                        {
                            AddDamage(
                                hero, (int)(GetTime(sender, hero, args.SData) * 0.3f),
                                (float)
                                    sender.CalcDamage(
                                        hero, DamageType.Physical,
                                        sender.BaseAttackDamage + sender.FlatPhysicalDamageMod));
                        }
                    }
                }
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }
        }
开发者ID:yashine59fr,项目名称:PortAIO-1,代码行数:82,代码来源:IncomingDamageManager.cs

示例6: Obj_AI_Base_OnProcessSpellCast

        private static void Obj_AI_Base_OnProcessSpellCast(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
        {
            #region 自动QE塔下敌人
            if (getCheckBoxItem(TowerConfig, "QEallyTurrettarget") && sender.IsAlly && sender is Obj_AI_Turret && args.Target.IsEnemy && args.Target.Type == GameObjectType.AIHeroClient)
            {
                var target = args.Target as AIHeroClient;
                var turret = sender as Obj_AI_Turret;

                if (turret.IsAlly && E.CanCast(target) && target.LSDistance(turret) < turret.AttackRange + E.Range)
                {
                    if (target.LSDistance(turret) < Player.LSDistance(turret))
                    {
                        E.Cast(target);
                    }
                    else
                    {
                        E.CastToReverse(target);
                    }
                }
                if (Player.LSDistance(turret) < turret.AttackRange && SpellQ.GetState() == QState.ThreshQ)
                {
                    SpellQ.CastQ1(target);
                }
            }
            #endregion

            #region 自动W
            if (!W.IsReady() || !sender.IsEnemy || !sender.LSIsValidTarget(1500))
                return;
            double value = 20 + (Player.Level * 20) + (0.4 * Player.FlatMagicDamageMod);

            foreach (var ally in HeroManager.Allies.Where(ally => ally.IsValid && !ally.IsDead && Player.LSDistance(ally.ServerPosition) < W.Range + 200))
            {
                double dmg = 0;
                if (args.Target != null && args.Target.NetworkId == ally.NetworkId)
                {
                    dmg = dmg + sender.LSGetSpellDamage(ally, args.SData.Name);
                }
                else
                {
                    var castArea = ally.LSDistance(args.End) * (args.End - ally.ServerPosition).LSNormalized() + ally.ServerPosition;
                    if (castArea.LSDistance(ally.ServerPosition) < ally.BoundingRadius / 2)
                        dmg = dmg + sender.LSGetSpellDamage(ally, args.SData.Name);
                    else
                        continue;
                }

                if (dmg > 0)
                {
                    if (dmg > value)
                        W.Cast(ally.Position);
                    else if (Player.Health - dmg < Player.LSCountEnemiesInRange(700) * Player.Level * 20)
                        W.Cast(ally.Position);
                    else if (ally.Health - dmg < ally.Level * 10)
                        W.Cast(ally.Position);
                }
            }
            #endregion
        }
开发者ID:yMeliodasNTD,项目名称:PortAIO,代码行数:59,代码来源:Thresh.cs

示例7: Obj_AI_Base_OnProcessSpellCast

        private void Obj_AI_Base_OnProcessSpellCast(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
        {
            if (!sender.IsEnemy || sender.Type != GameObjectType.AIHeroClient)
                return;

            if (sender.LSDistance(Player.Position) > 1600)
                return;

            if (Zhonya.IsReady() && getCheckBoxItem("Zhonya"))
            {
                if (Sub["spellZ" + args.SData.Name] != null && getCheckBoxItem("spellZ" + args.SData.Name))
                {
                    if (args.Target != null && args.Target.NetworkId == Player.NetworkId)
                    {
                        ZhonyaTryCast();
                    }
                    else
                    {
                        var castArea = Player.LSDistance(args.End)*(args.End - Player.ServerPosition).Normalized() +
                                       Player.ServerPosition;
                        if (castArea.LSDistance(Player.ServerPosition) < Player.BoundingRadius/2)
                            ZhonyaTryCast();
                    }
                }
            }

            if (CanUse(exhaust) && getCheckBoxItem("Exhaust"))
            {
                foreach (
                    var ally in
                        Program.Allies.Where(
                            ally =>
                                ally.IsValid && !ally.IsDead && ally.HealthPercent < 51 &&
                                Player.LSDistance(ally.ServerPosition) < 700))
                {
                    double dmg = 0;
                    if (args.Target != null && args.Target.NetworkId == ally.NetworkId)
                    {
                        dmg = dmg + sender.LSGetSpellDamage(ally, args.SData.Name);
                    }
                    else
                    {
                        var castArea = ally.LSDistance(args.End)*(args.End - ally.ServerPosition).Normalized() +
                                       ally.ServerPosition;
                        if (castArea.LSDistance(ally.ServerPosition) < ally.BoundingRadius/2)
                            dmg = dmg + sender.LSGetSpellDamage(ally, args.SData.Name);
                        else
                            continue;
                    }

                    if (ally.Health - dmg < ally.CountEnemiesInRange(700)*ally.Level*40)
                        Player.Spellbook.CastSpell(exhaust, sender);
                }
            }
        }
开发者ID:yashine59fr,项目名称:PortAIO-1,代码行数:55,代码来源:Activator.cs

示例8: Obj_AI_Base_OnProcessSpellCast

        private static void Obj_AI_Base_OnProcessSpellCast(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
        {
            if (args.SData == null)
            {
                return;
            }
            /////////////////  HP prediction
            var targed = args.Target as Obj_AI_Base;

            if (targed != null)
            {
                if (targed.Type == GameObjectType.AIHeroClient && targed.Team != sender.Team && sender.IsMelee)
                {
                    IncomingDamageList.Add(new UnitIncomingDamage
                    {
                        Damage = sender.LSGetSpellDamage(targed, args.SData.Name),
                        TargetNetworkId = args.Target.NetworkId,
                        Time = Game.Time,
                        Skillshot = false
                    });
                }
            }
            else
            {
                foreach (
                    var champion in
                        ChampionList.Where(
                            champion =>
                                !champion.IsDead && champion.IsVisible && champion.IsHPBarRendered && champion.Team != sender.Team &&
                                champion.LSDistance(sender) < 2000))
                {
                    if (CanHitSkillShot(champion, args))
                    {
                        IncomingDamageList.Add(new UnitIncomingDamage
                        {
                            Damage = sender.LSGetSpellDamage(champion, args.SData.Name),
                            TargetNetworkId = champion.NetworkId,
                            Time = Game.Time,
                            Skillshot = true
                        });
                    }
                }

                if (!YasuoInGame)
                    return;

                if (!sender.IsEnemy || sender.IsMinion || args.SData.IsAutoAttack() ||
                    sender.Type != GameObjectType.AIHeroClient)
                    return;

                if (args.SData.Name == "YasuoWMovingWall")
                {
                    yasuoWall.CastTime = Game.Time;
                    yasuoWall.CastPosition = sender.Position.Extend(args.End, 400).To3D();
                    yasuoWall.YasuoPosition = sender.Position;
                    yasuoWall.WallLvl = sender.Spellbook.Spells[1].Level;
                }
            }
        }
开发者ID:CONANLXF,项目名称:AIO,代码行数:59,代码来源:OktwCommon.cs

示例9: Obj_AI_Base_OnDoCast

 private static void Obj_AI_Base_OnDoCast(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
 {
     if (args.Target != null && args.SData != null)
     {
         if (args.Target.Type == GameObjectType.AIHeroClient && !sender.IsMelee &&
             args.Target.Team != sender.Team)
         {
             IncomingDamageList.Add(new UnitIncomingDamage
             {
                 Damage = sender.LSGetSpellDamage((AIHeroClient) args.Target, args.SData.Name),
                 TargetNetworkId = args.Target.NetworkId,
                 Time = Game.Time,
                 Skillshot = false
             });
         }
     }
 }
开发者ID:CONANLXF,项目名称:AIO,代码行数:17,代码来源:OktwCommon.cs

示例10: Obj_AI_Base_OnProcessSpellCast

        public static void Obj_AI_Base_OnProcessSpellCast(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
        {
            if (Player.LSIsRecalling()) return;

            if ((sender.IsValid<AIHeroClient>() || sender.IsValid<Obj_AI_Turret>()) && sender.IsEnemy)
            {
                var PacketCast = getCheckBoxItem(SkyLv_Taric.Misc, "Taric.UsePacketCast");

                if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo) && getCheckBoxItem(SkyLv_Taric.Combo, "Taric.UseWIncomingDamageCombo") && W.IsReady() && W.ManaCost <= Player.Mana)
                {
                    if (Player.LSDistance(args.End) <= Player.BoundingRadius && sender.LSGetSpellDamage(Player, args.SData.Name.ToString()) > 0)
                    {
                        W.CastOnUnit(Player, PacketCast);
                    }
                }

                if (getCheckBoxItem(SkyLv_Taric.Combo, "Taric.UseWAlly"))
                {

                    switch (getBoxItem(SkyLv_Taric.Combo, "Taric.UseWAllyMode"))
                    {

                        case 0:
                            {
                                if (Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo))
                                {
                                    if (W.IsReady() && Player.Mana >= W.ManaCost)
                                    {
                                        foreach (var ally in HeroManager.Allies.Where(x => x.LSIsValidTarget(W.Range, false) && !x.IsMe && Player.LSDistance(x) <= W.Range && getCheckBoxItem(SkyLv_Taric.Combo, x.NetworkId + "IncomingDamageWAlly") && x.HealthPercent <= getSliderItem(SkyLv_Taric.Combo, x.NetworkId + "MinimumHpWAlly")))
                                        {
                                            foreach (var SendingUnit in HeroManager.Enemies.Where(x => x.NetworkId == sender.NetworkId))
                                            {
                                                if (ally.LSDistance(args.End) <= ally.BoundingRadius && SendingUnit.LSGetSpellDamage(ally, args.SData.Name.ToString()) > 0)
                                                {
                                                    W.CastOnUnit(ally, PacketCast);
                                                }
                                            }
                                        }
                                    }
                                }
                                break;
                            }

                        case 1:
                            {
                                if (W.IsReady() && Player.Mana >= W.ManaCost)
                                {
                                    foreach (var ally in HeroManager.Allies.Where(x => x.LSIsValidTarget(W.Range, false) && !x.IsMe && Player.LSDistance(x) <= W.Range && getCheckBoxItem(SkyLv_Taric.Combo, x.NetworkId + "IncomingDamageWAlly") && x.HealthPercent <= getSliderItem(SkyLv_Taric.Combo, x.NetworkId + "MinimumHpWAlly")))
                                    {
                                        foreach (var SendingUnit in HeroManager.Enemies.Where(x => x.NetworkId == sender.NetworkId))
                                        {
                                            if (ally.LSDistance(args.End) <= ally.BoundingRadius)
                                            {
                                                W.CastOnUnit(ally, PacketCast);
                                            }
                                        }
                                    }
                                }
                                break;
                            }
                    }
                }
            }
        }
开发者ID:yMeliodasNTD,项目名称:PortAIO,代码行数:64,代码来源:OnProcessSpellCast.cs

示例11: OnProcess

        private static void OnProcess(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
        {
            if (sender == null)
            {
                return;
            }
            if (E.IsReady())
            {
                if (esettings["e.engage." + args.SData.Name] != null)
                {
                    if (sender is AIHeroClient && sender.IsAlly && getCheckBoxItem(esettings, "e.engage." + args.SData.Name) && getCheckBoxItem(esettings, "e." + sender.BaseSkinName) && E.IsInRange((AIHeroClient)args.Target) && !sender.IsDead && !sender.IsZombie && sender.IsValid)
                    {
                        E.CastOnUnit(sender);
                    }
                }

                if (args.Target != null && !sender.IsMinion)
                {
                    if (args.Target.IsAlly && args.Target.IsValid)
                    {
                        if (esettings["e." + ((AIHeroClient)args.Target).ChampionName] != null)
                            if (sender is AIHeroClient && sender.IsEnemy && args.Target.IsAlly && args.Target.Type == GameObjectType.AIHeroClient && args.SData.IsAutoAttack() && ObjectManager.Player.ManaPercent >= getSliderItem(esettings, "min.mana.for.e") && getCheckBoxItem(esettings, "e." + ((AIHeroClient)args.Target).ChampionName) && E.IsInRange((AIHeroClient)args.Target))
                            {
                                E.Cast((AIHeroClient)args.Target);
                            }
                    }
                }

                if (args.Target != null)
                {
                    if (args.Target.IsAlly && sender is Obj_AI_Turret)
                    {
                        if (esettings["e." + ((AIHeroClient)args.Target).ChampionName] != null)
                        {
                            if (sender is Obj_AI_Turret && args.Target.IsAlly && ObjectManager.Player.ManaPercent >= getSliderItem(esettings, "min.mana.for.e")
                                && getCheckBoxItem(esettings, "e." + ((AIHeroClient)args.Target).ChampionName) && E.IsInRange((AIHeroClient)args.Target)
                                && getCheckBoxItem(esettings, "protect.carry.from.turret"))
                            {
                                E.Cast((AIHeroClient)args.Target);
                            }
                        }
                    }
                }

                if (esettings["e.protect." + args.SData.Name] != null || esettings["e.protect.targetted." + args.SData.Name] != null)
                {
                    if (sender is AIHeroClient && args.Target.IsAlly && args.Target.Type == GameObjectType.AIHeroClient
                        && !args.SData.IsAutoAttack() && (getCheckBoxItem(esettings, "e.protect." + args.SData.Name) || getCheckBoxItem(esettings, "e.protect.targetted." + args.SData.Name))
                        && sender.IsEnemy && sender.LSGetSpellDamage(((AIHeroClient)args.Target), args.SData.Name) > ((AIHeroClient)args.Target).Health)
                    {
                        E.Cast((AIHeroClient)args.Target);
                    }
                }

                 if (sender is AIHeroClient && sender.IsEnemy && args.Target.IsAlly && args.Target.Type == GameObjectType.obj_AI_Turret
                    && args.SData.IsAutoAttack() && ObjectManager.Player.ManaPercent >= getSliderItem(esettings, "min.mana.for.e") && E.IsInRange((Obj_AI_Turret)args.Target)
                    && ((Obj_AI_Turret)args.Target).HealthPercent < getSliderItem(esettings, "turret.hp.percent"))
                {
                    E.Cast((AIHeroClient)args.Target);
                }
            }

            if (args.Target is Obj_AI_Minion || !(sender is AIHeroClient))
                return;
            if (getCheckBoxItem(esettings, "Janna_AutoE") && E.IsReady())
            {
                if (sender.IsEnemy)
                {
                    var StartPos = args.Start;
                    var EndPos = args.End;
                    var NonTRange = new EloBuddy.SDK.Geometry.Polygon.Rectangle(StartPos, EndPos, sender.BoundingRadius + 30);
                    var Target = HeroManager.Allies.FirstOrDefault(f => f.Position.LSDistance(Player.Position) <= E.Range && NonTRange.IsInside(f.Position));
                    if (Target != null)
                    {
                        E.Cast(Target, true);
                        return;
                    }
                    if (args.Target != null && args.Target.Position.LSDistance(Player.Position) <= E.Range && args.Target is AIHeroClient)
                    {
                        var ShieldTarget = HeroManager.Allies.FirstOrDefault(f => f.Position.LSDistance(args.Target.Position) <= 10);
                        E.Cast(ShieldTarget, true);
                        return;
                    }
                }
                if (sender.IsAlly && args.Target is AIHeroClient)
                {
                    if (sender.Position.LSDistance(Player.Position) <= E.Range && args.Target != null && args.SData.Name.ToLower().Contains("attack"))
                    {
                        E.CastOnUnit(sender, true);
                        return;
                    }
                }
            }
        }
开发者ID:yashine59fr,项目名称:PortAIO,代码行数:94,代码来源:Program.cs

示例12: Obj_AI_Base_OnProcessSpellCast

        private static void Obj_AI_Base_OnProcessSpellCast(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
        {
            if (getCheckBoxItem(eMenu, "Edead") && E.IsReady() && sender.IsEnemy && sender.LSIsValidTarget(1500))
            {
                double dmg = 0;

                if (args.Target != null && args.Target.IsMe)
                {
                    dmg = dmg + sender.LSGetSpellDamage(Player, args.SData.Name);
                }
                else
                {
                    var castArea = Player.LSDistance(args.End)*(args.End - Player.ServerPosition).LSNormalized() +
                                   Player.ServerPosition;
                    if (castArea.LSDistance(Player.ServerPosition) < Player.BoundingRadius/2)
                    {
                        dmg = dmg + sender.LSGetSpellDamage(Player, args.SData.Name);
                    }
                }

                if (Player.Health - dmg < Player.LSCountEnemiesInRange(600)*Player.Level*10)
                {
                    E.Cast();
                }
            }
        }
开发者ID:yashine59fr,项目名称:PortAIO-1,代码行数:26,代码来源:Program.cs


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