コード例 #1
0
        private static void Drawing_OnDraw(EventArgs args)
        {
            var color = Color.Red;

            foreach (var enemy in EntityManager.Heroes.Enemies)                //Checks for every enemy
            {
                if (enemy.IsVisible && enemy.IsValidTarget() && !enemy.IsDead) //Are they visible, valid, and alive?
                {
                    if (enemy.Health < Q.GetSpellDamage(enemy) && Q.IsReady()) //Can we kill with Q?
                    {
                        canKill = "Kill with Q";
                        color   = Color.Lime;
                    }
                    if (enemy.Health < E.GetSpellDamage(enemy) * 7 && E.IsReady()) //Can we kill with E?
                    {
                        canKill = "Kill with E";
                        color   = Color.Lime;
                    }
                    if (enemy.Health < R.GetSpellDamage(enemy) && R.IsReady()) //Can we kill with R?
                    {
                        canKill = "Kill with R";
                        color   = Color.Lime;
                    }
                    Drawing.DrawText(enemy.HPBarPosition.X, enemy.HPBarPosition.Y + 50, color, canKill, 25); //Show text under enemy HP Bar showing we can kill them
                }
                if (!enemy.IsVisible || enemy.IsDead)                                                        //Are they not visible or dead?
                {
                    canKill = "Not Killable";
                }
            }
        }
コード例 #2
0
ファイル: Program.cs プロジェクト: Ouija01/EloBuddy
        private static double IsRapeble(Obj_AI_Base victim)
        {
            double comboDamage = 0d;

            if (Q.IsReady())
            {
                comboDamage += Q.GetSpellDamage(victim) + Player.Instance.CalculateDamageOnUnit(victim, DamageType.Magical, (float)(45 + 35 * Q.Level + 0.5 * player.FlatMagicDamageMod));
            }
            if (E.IsReady())
            {
                comboDamage += E.GetSpellDamage(victim);
            }

            if (hasBuff(victim, "AkaliMota"))
            {
                comboDamage += Player.Instance.CalculateDamageOnUnit(victim, DamageType.Magical, (float)(45 + 35 * Q.Level + 0.5 * player.FlatMagicDamageMod));
            }
            //comboDamage += player.GetAutoAttackDamage(victim, true);

            comboDamage += player.CalculateDamageOnUnit(victim, DamageType.Magical, (float)CalcPassiveDmg());
            comboDamage += player.CalculateDamageOnUnit(victim, DamageType.Magical, (float)CalcItemsDmg(victim));

            foreach (var item in player.InventoryItems)
            {
                if ((int)item.Id == 3128)
                {
                    if (player.Spellbook.CanUseSpell((SpellSlot)item.Slot) == SpellState.Ready)
                    {
                        comboDamage *= 1.2;
                    }
                }
            }
            if (hasBuff(victim, "deathfiregraspspell"))
            {
                comboDamage *= 1.2;
            }

            if (ultiCount() > 0)
            {
                comboDamage += Player.Instance.GetSpellDamage(victim, SpellSlot.Unknown) * (ultiCount() - (int)(victim.Distance(player.Position) / R.Range));
            }
            if (IgniteSlot != SpellSlot.Unknown && player.Spellbook.CanUseSpell(IgniteSlot) == SpellState.Ready)
            {
                comboDamage += ObjectManager.Player.GetSummonerSpellDamage(victim, DamageLibrary.SummonerSpells.Ignite);
            }
            return(comboDamage);
        }
コード例 #3
0
        public static bool ShouldUlt(AIHeroClient target)
        {
            var mode =
                Config.spellRMenu[$"ylm.spellr.rtarget.{target.ChampionName.ToLower()}"].Cast <ComboBox>().CurrentValue;

            if (mode == 0 || !R.IsReady() || (!Config.spellRMenu["ylm.spellr.towercheck"].Cast <CheckBox>().CurrentValue&& target.IsUnderEnemyturret())
                /* || !target.HasBuffOfType(BuffType.Knockup) || !target.HasBuffOfType(BuffType.Knockback)*/)
            {
                return(false);
            }

            switch (mode)
            {
            case 1:
                return(R.GetSpellDamage(target) + SteelTempest.Q.GetSpellDamage(target) > target.Health);

            case 2:
                return(true);

            case 3:
                if (Config.spellRMenu["ylm.spellr.targethealth"].Cast <CheckBox>().CurrentValue&&
                    (target.HealthPercent > Config.spellRMenu["ylm.spellr.targethealthslider"].Cast <Slider>().CurrentValue))
                {
                    return(false);
                }

                if (Config.spellRMenu["ylm.spellr.playerhealth"].Cast <CheckBox>().CurrentValue&&
                    (ObjectManager.Player.HealthPercent < Config.spellRMenu["ylm.spellr.playerhealthslider"].Cast <Slider>().CurrentValue))
                {
                    return(false);
                }

                return(true);
            }
            return(false);
        }
コード例 #4
0
ファイル: SpellManager.cs プロジェクト: tekintr/Elobuddy
 public static float QDamage(Obj_AI_Base target)
 {
     return(_player.CalculateDamageOnUnit(target, Q.DamageType, Q.GetSpellDamage(target), true, true));
 }