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


C# Obj_AI_Hero.GetComboDamage方法代码示例

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


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

示例1: UnleashedPowerCheck

        private static bool UnleashedPowerCheck(Obj_AI_Hero target)
        {
            var currentTick = (int) (Game.ClockTime * 0x3E8);
            var tickDelay = 600 + Game.Ping;

            var attackDamage = 0d;
            if (EntryPoint.Menu.Item("l33t.stds.ups.disable.AA").GetValue<bool>())
            {
                attackDamage = EntryPoint.Player.GetAutoAttackDamage(target);
            }

            var includeQ = EntryPoint.Menu.Item("l33t.stds.ups.disable.Q").GetValue<bool>();
            var includeW = EntryPoint.Menu.Item("l33t.stds.ups.disable.W").GetValue<bool>();
            var includeE = EntryPoint.Menu.Item("l33t.stds.ups.disable.E").GetValue<bool>();
            switch (EntryPoint.Menu.Item("l33t.stds.ups.disable").GetValue<StringList>().SelectedIndex)
            {
                case 2:
                    return true;
                case 0:
                    return !(target.GetComboDamage(includeQ, includeW, includeE, false) + attackDamage >= target.Health);
                case 1:
                    return
                        !(target.GetComboDamage(includeQ, false, false, false) >= target.Health ||
                          target.GetComboDamage(false, includeW, false, false) >= target.Health ||
                          target.GetComboDamage(false, false, includeE, false) >= target.Health);
            }

            return currentTick - Spells[SpellSlot.Q].LastCastAttemptTick > tickDelay &&
                   currentTick - Spells[SpellSlot.E].LastCastAttemptTick > tickDelay &&
                   currentTick - Spells[SpellSlot.W].LastCastAttemptTick > tickDelay;
        }
开发者ID:trigopano,项目名称:LeagueSharp,代码行数:31,代码来源:Mechanics.cs

示例2: DrawEnemyInfo

        private static void DrawEnemyInfo(Obj_AI_Hero enemy)
        {
            var hpBarPos = enemy.HPBarPosition;
            hpBarPos.X += 45;
            hpBarPos.Y += 18;
            var killText = "";
            var combodamage = enemy.GetComboDamage(
                EntryPoint.Menu.Item("l33t.stds.combo.useQ").GetValue<bool>(),
                EntryPoint.Menu.Item("l33t.stds.combo.useW").GetValue<bool>(),
                EntryPoint.Menu.Item("l33t.stds.combo.useE").GetValue<bool>(),
                EntryPoint.Menu.Item("l33t.stds.combo.useR").GetValue<bool>());

            var percentHPleftAfterCombo = (enemy.Health - combodamage) / enemy.MaxHealth;
            var percentHPleft = enemy.Health / enemy.MaxHealth;
            if (percentHPleftAfterCombo < 0)
            {
                percentHPleftAfterCombo = 0;
            }

            var comboXPos = hpBarPos.X - 36 + (107 * percentHPleftAfterCombo);
            double currentHpxPos = hpBarPos.X - 36 + (107 * percentHPleft);
            var barcolor = System.Drawing.Color.FromArgb(100, 0, 220, 0);
            var barcolorline = System.Drawing.Color.WhiteSmoke;
            if (combodamage + Mechanics.Spells[SpellSlot.Q].Damage(enemy) +
                EntryPoint.Player.GetAutoAttackDamage(enemy) * 2 > enemy.Health)
            {
                killText = "Killable by: Full Combo + 1Q + 2AA";
                if (combodamage >= enemy.Health)
                {
                    killText = "Killable by: Full Combo";
                }
                barcolor = System.Drawing.Color.FromArgb(100, 255, 255, 0);
                barcolorline = System.Drawing.Color.SpringGreen;
                var linecolor = barcolor;
                if (
                    enemy.GetComboDamage(
                        EntryPoint.Menu.Item("l33t.stds.combo.useQ").GetValue<bool>(),
                        EntryPoint.Menu.Item("l33t.stds.combo.useW").GetValue<bool>(),
                        EntryPoint.Menu.Item("l33t.stds.combo.useE").GetValue<bool>(), false) > enemy.Health)
                {
                    killText = "Killable by: Q + W + E";
                    barcolor = System.Drawing.Color.FromArgb(130, 255, 70, 0);
                    linecolor = System.Drawing.Color.FromArgb(150, 255, 0, 0);
                }
                if (EntryPoint.Menu.Item("l33t.stds.drawing.drawGank").GetValue<bool>())
                {
                    var pos = EntryPoint.Player.Position +
                              Vector3.Normalize(enemy.Position - EntryPoint.Player.Position) * 100;
                    var myPos = Drawing.WorldToScreen(pos);
                    pos = EntryPoint.Player.Position +
                          Vector3.Normalize(enemy.Position - EntryPoint.Player.Position) * 350;
                    var ePos = Drawing.WorldToScreen(pos);
                    Drawing.DrawLine(myPos.X, myPos.Y, ePos.X, ePos.Y, 1, linecolor);
                }
            }
            var killTextPos = Drawing.WorldToScreen(enemy.Position);
            var hPleftText = Math.Round(percentHPleftAfterCombo * 100) + "%";
            Drawing.DrawLine((float)comboXPos, hpBarPos.Y, (float)comboXPos, hpBarPos.Y + 5, 1, barcolorline);
            if (EntryPoint.Menu.Item("l33t.stds.drawing.drawKillText").GetValue<bool>())
            {
                Drawing.DrawText(killTextPos[0] - 105, killTextPos[1] + 25, barcolor, killText);
            }
            if (EntryPoint.Menu.Item("l33t.stds.drawing.drawKillTextHP").GetValue<bool>())
            {
                Drawing.DrawText(hpBarPos.X + 98, hpBarPos.Y + 5, barcolor, hPleftText);
            }
            if (EntryPoint.Menu.Item("l33t.stds.drawing.drawHPFill").GetValue<bool>())
            {
                var diff = currentHpxPos - comboXPos;
                for (var i = 0; i < diff; i++)
                {
                    Drawing.DrawLine(
                        (float)comboXPos + i, hpBarPos.Y + 2, (float)comboXPos + i, hpBarPos.Y + 10, 1,
                        barcolor);
                }
            }
        }
开发者ID:trigopano,项目名称:LeagueSharp,代码行数:77,代码来源:Graphics.cs

示例3: ProcessFlashKillsteal

 private static void ProcessFlashKillsteal(Obj_AI_Hero enemy)
 {
     var useFlash = EntryPoint.Menu.Item("l33t.stds.ks.kenemies." + enemy.ChampionName) != null &&
                    EntryPoint.Menu.Item("l33t.stds.ks.kenemies." + enemy.ChampionName).GetValue<bool>();
     var useR = EntryPoint.Menu.Item("l33t.stds.ups.ignore." + enemy.ChampionName) != null &&
                EntryPoint.Menu.Item("l33t.stds.ups.ignore." + enemy.ChampionName).GetValue<bool>() == false;
     var rflash =
         enemy.GetComboDamage(
             EntryPoint.Menu.Item("l33t.stds.ks.useQ").GetValue<bool>(), false,
             EntryPoint.Menu.Item("l33t.stds.ks.useE").GetValue<bool>(), false) < enemy.Health;
     var ePos = Spells[SpellSlot.R].Instance.GetPrediction(enemy);
     if ((FlashSpell.Slot == LeagueSharp.SpellSlot.Unknown && FlashSpell.IsReady()) || !useFlash ||
         !(EntryPoint.Player.Distance(ePos.UnitPosition, true) <=
           Math.Pow(Spells[SpellSlot.Q].Range + 25f + 395, 2)) ||
         !(EntryPoint.Player.Distance(ePos.UnitPosition, true) >
           Math.Pow(Spells[SpellSlot.Q].Range + 25f + 200, 2)))
     {
         return;
     }
     if (
         (!(enemy.GetComboDamage(
             EntryPoint.Menu.Item("l33t.stds.ks.useQ").GetValue<bool>(), false,
             EntryPoint.Menu.Item("l33t.stds.ks.useE").GetValue<bool>(), false) > enemy.Health) ||
          !EntryPoint.Menu.Item("l33t.stds.ks.usefqe").GetValue<bool>()) &&
         (!(enemy.GetComboDamage(false, false, false, EntryPoint.Menu.Item("l33t.stds.ks.useR").GetValue<bool>()) >
            enemy.Health) || !EntryPoint.Menu.Item("l33t.stds.ks.usefr").GetValue<bool>() ||
          !(EntryPoint.Player.Distance(ePos.UnitPosition, true) <= Math.Pow(Spells[SpellSlot.R].Range + 390, 2)) ||
          (int) (Game.ClockTime * 0x3E8) - Spells[SpellSlot.R].LastCastAttemptTick <= Game.Ping + 750 ||
          (int) (Game.ClockTime * 0x3E8) - Spells[SpellSlot.SphereE].LastCastAttemptTick <= Game.Ping + 750 ||
          !(EntryPoint.Player.Distance(ePos.UnitPosition, true) > Math.Pow(Spells[SpellSlot.R].Range + 200, 2))))
     {
         return;
     }
     var manaCost = 0d;
     if (EntryPoint.Menu.Item("l33t.stds.ks.mana").GetValue<bool>())
     {
         manaCost = Spells.Where(s => s.Key != SpellSlot.SphereE)
             .Aggregate(manaCost, (current, spell) => current + spell.Value.Instance.Instance.ManaCost);
     }
     if (manaCost > EntryPoint.Player.Mana && EntryPoint.Menu.Item("l33t.stds.ks.mana").GetValue<bool>() &&
         EntryPoint.Menu.Item("l33t.stds.ks.mana").GetValue<bool>())
     {
         return;
     }
     var nearbyE = ePos.UnitPosition.CountEnemiesInRange(1000);
     if (nearbyE > EntryPoint.Menu.Item("l33t.stds.ks.maxenemy").GetValue<Slider>().Value)
     {
         return;
     }
     var flashPos = EntryPoint.Player.ServerPosition -
                    Vector3.Normalize(EntryPoint.Player.ServerPosition - ePos.UnitPosition) * 400;
     if (flashPos.IsWall())
     {
         return;
     }
     if (rflash)
     {
         if (useR)
         {
             FlashSpell.Cast(flashPos);
             ProcessSpells(
                 false, false, false, EntryPoint.Menu.Item("l33t.stds.ks.useR").GetValue<bool>(), false);
             Audio.PlaySound();
         }
     }
     else
     {
         FlashSpell.Cast(flashPos);
     }
     _flashCastTick = (int) (Game.ClockTime * 0x3E8);
 }
开发者ID:trigopano,项目名称:LeagueSharp,代码行数:71,代码来源:Mechanics.cs


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