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


C# Item.IsReady方法代码示例

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


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

示例1: Execute

        public static void Execute()
        {
            if (!Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Harass))
            {
                return;
            }

            if (Menu.Harass.E && Spells.E.IsReady())
            {
                var target = TargetSelector.GetTarget(Spells.E.Range, DamageType.Magical, Player.Instance.Position);
                if (target != null &&
                    (!Player.Instance.IsInAutoAttackRange(target) || Player.Instance.Health < target.Health))
                {
                    Utility.Debug(string.Format("Used E on {0} (Harass Mode).", target.Name));
                    Spells.E.Cast(target);
                }
            }

            if (Menu.Harass.Hydra)
            {
                var hydra = new Item((int) ItemId.Ravenous_Hydra_Melee_Only, 250);
                var tiamat = new Item((int) ItemId.Tiamat_Melee_Only, 250);
                var item = hydra.IsReady() ? hydra : tiamat;
                var target = TargetSelector.GetTarget(item.Range, DamageType.Physical);
                if ((Item.HasItem(hydra.Id, Player.Instance) ||
                     Item.HasItem(tiamat.Id, Player.Instance)) && item.IsReady() &&
                    target.Distance(Player.Instance) < item.Range - 80)
                {
                    Utility.Debug("Used Hydra/Tiamat (Harass Mode).");
                    item.Cast();
                }
            }
        }
开发者ID:RoachxD,项目名称:EloBuddy,代码行数:33,代码来源:Harass.cs

示例2: Execute

        public static void Execute()
        {
            if (!Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.Combo))
            {
                return;
            }

            if (Menu.Combo.R && Spells.R.IsReady() && !Player.Instance.IsDashing())
            {
                var targets =
                    EntityManager.Heroes.Enemies.Where(enemy => enemy != null && enemy.IsValidTarget(Spells.R.Range))
                        .ToList();
                if ((targets.Count > 1 &&
                     targets.Any(target => target != null && target.Health < Damages.Spell.R.GetDamage(target))) ||
                    targets.Any(target => target != null && target.HealthPercent < Menu.Combo.RHp) ||
                    targets.Count >= Menu.Combo.RCount)
                {
                    Utility.Debug(string.Format("Used R (Combo Mode) [Targets Count: {0}].", targets.Count));
                    Spells.R.Cast();
                }
            }

            if (Menu.Combo.E && Spells.E.IsReady())
            {
                var target = TargetSelector.GetTarget(Spells.E.Range, DamageType.Magical);
                if (target != null &&
                    (!Player.Instance.IsInAutoAttackRange(target) || Player.Instance.Health < target.Health))
                {
                    Utility.Debug(string.Format("Used E on {0} (Combo Mode).", target.Name));
                    Spells.E.Cast(target);
                }
            }

            if (Menu.Combo.Hydra)
            {
                var hydra = new Item((int) ItemId.Ravenous_Hydra_Melee_Only, 250);
                var tiamat = new Item((int) ItemId.Tiamat_Melee_Only, 250);
                var item = hydra.IsReady() ? hydra : tiamat;
                var target = TargetSelector.GetTarget(item.Range, DamageType.Physical);
                if ((Item.HasItem(hydra.Id, Player.Instance) ||
                     Item.HasItem(tiamat.Id, Player.Instance)) && item.IsReady() &&
                    target.Distance(Player.Instance) < item.Range - 80)
                {
                    Utility.Debug("Used Hydra/Tiamat (Combo Mode).");
                    item.Cast();
                }
            }
        }
开发者ID:RoachxD,项目名称:EloBuddy,代码行数:48,代码来源:Combo.cs

示例3: Execute

        public static void Execute()
        {
            if (!Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.JungleClear) &&
                !Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.LaneClear))
            {
                return;
            }

            var minionObj =
                ObjectManager.Get<Obj_AI_Minion>()
                    .Where(minion => !minion.IsAlly && minion.Distance(Player.Instance) < Spells.E.Range);
            var objAiMinions = minionObj as Obj_AI_Minion[] ?? minionObj.ToArray();
            if (!objAiMinions.Any())
            {
                return;
            }

            if (Menu.Clear.E && Spells.E.IsReady())
            {
                var obj = objAiMinions.FirstOrDefault(minion => minion.Health < Damages.Spell.E.GetDamage(minion));
                if (obj == null && !objAiMinions.Any(minion => Player.Instance.IsInAutoAttackRange(minion)))
                {
                    obj = objAiMinions.MinOrDefault(minion => minion.Health);
                }

                if (obj != null)
                {
                    Utility.Debug(string.Format("Used E on {0} (Lane/Jungle Clear Mode).", obj.Name));
                    Spells.E.Cast(obj);
                }
            }

            if (Menu.Clear.Hydra)
            {
                var hydra = new Item((int) ItemId.Ravenous_Hydra_Melee_Only, 250);
                var tiamat = new Item((int) ItemId.Tiamat_Melee_Only, 250);
                var item = hydra.IsReady() ? hydra : tiamat;
                if ((Item.HasItem(hydra.Id, Player.Instance) ||
                     Item.HasItem(tiamat.Id, Player.Instance)) && item.IsReady() &&
                    (objAiMinions.Count(i => item.IsInRange(i)) > 2 ||
                     objAiMinions.Any(i => i.MaxHealth >= 1200 && i.Distance(Player.Instance) < item.Range - 80)))
                {
                    Utility.Debug("Used Hydra/Tiamat (Lane/Jungle Clear Mode).");
                    item.Cast();
                }
            }
        }
开发者ID:RoachxD,项目名称:EloBuddy,代码行数:47,代码来源:Clear.cs

示例4: CastItem

        public static void CastItem()
        {
            var tiamat = new Item(ItemId.Tiamat_Melee_Only);
            var hydra = new Item(ItemId.Ravenous_Hydra_Melee_Only);

            if (tiamat.IsReady())
                tiamat.Cast();

            if (hydra.IsReady())
                hydra.Cast();
            
            if (Items.CanUseItem(3748))
                Items.UseItem(3748);
        }
开发者ID:yMeliodasNTD,项目名称:PortAIO,代码行数:14,代码来源:Combos.cs

示例5: HasItem

        public static bool HasItem()
        {
            var tiamat = new Item(ItemId.Tiamat_Melee_Only);
            var hydra = new Item(ItemId.Ravenous_Hydra_Melee_Only);

            if (tiamat.IsReady() || hydra.IsReady() || Items.CanUseItem(3748))
            {
                return true;
            }
            else
            {
                return false;
            }
        }
开发者ID:yMeliodasNTD,项目名称:PortAIO,代码行数:14,代码来源:Combos.cs

示例6: GetRealDamage

        public static float GetRealDamage(this SpellSlot slot, Obj_AI_Base target)
        {
            // Helpers
            var spellLevel = Player.Instance.Spellbook.GetSpell(slot).Level;
            const DamageType damageType = DamageType.Magical;
            float damage = 0;

            // Validate spell level
            if (spellLevel == 0)
            {
                return 0;
            }
            spellLevel--;

            switch (slot)
            {
                case SpellSlot.Q:

                    var sheen = new Item(ItemId.Sheen);
                    var trinity = new Item(ItemId.Trinity_Force);
                    var ice = new Item(ItemId.Iceborn_Gauntlet);
                    if (sheen.IsOwned() && sheen.IsReady())
                    {
                        damage += new float[] { 35, 55, 75, 95, 115 }[spellLevel] + 0.40f * Player.Instance.FlatMagicDamageMod + 1.1f * Player.Instance.FlatPhysicalDamageMod + 1f * Player.Instance.FlatPhysicalDamageMod;
                    }
                    else if (sheen.IsOwned() && sheen.IsReady())
                    {
                        damage += new float[] { 35, 55, 75, 95, 115 }[spellLevel] + 0.40f * Player.Instance.FlatMagicDamageMod + 1.1f * Player.Instance.FlatPhysicalDamageMod + 1f * Player.Instance.FlatPhysicalDamageMod;
                    }
                    else if (trinity.IsOwned() && trinity.IsReady())
                    {
                        damage += new float[] { 35, 55, 75, 95, 115 }[spellLevel] + 0.40f * Player.Instance.FlatMagicDamageMod + 1.1f * Player.Instance.FlatPhysicalDamageMod + 2f * Player.Instance.FlatPhysicalDamageMod;
                    }
                    else if (ice.IsOwned() && ice.IsReady())
                    {
                        damage += new float[] { 35, 55, 75, 95, 115 }[spellLevel] + 0.40f * Player.Instance.FlatMagicDamageMod + 1.1f * Player.Instance.FlatPhysicalDamageMod + 1.25f * Player.Instance.FlatPhysicalDamageMod;
                    }
                    else
                    {
                        damage = new float[] { 35, 55, 75, 95, 115 }[spellLevel] + 0.40f * Player.Instance.FlatMagicDamageMod + 1.1f * Player.Instance.FlatPhysicalDamageMod;
                    }
                    break;

                case SpellSlot.W:

                    damage = new float[] { 70, 115, 160, 205, 250 }[spellLevel] + 0.80f * Player.Instance.FlatMagicDamageMod;
                    break;

                case SpellSlot.E:

                    damage = new float[] { 75, 125, 175, 225, 275 }[spellLevel] + 0.75f * Player.Instance.FlatMagicDamageMod + 0.5f * Player.Instance.FlatPhysicalDamageMod;
                    break;

                case SpellSlot.R:

                    damage = new float[] { 350, 500, 650 }[spellLevel] + 0.9f * Player.Instance.FlatMagicDamageMod + 1f * Player.Instance.FlatPhysicalDamageMod;
                    break;
            }

            if (damage <= 0)
            {
                return 0;
            }

            return Player.Instance.CalculateDamageOnUnit(target, damageType, damage) - 20;
        }
开发者ID:mariogk,项目名称:EB,代码行数:66,代码来源:SpellDamage.cs


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