Пример #1
0
        private static float ComboDamage(AIHeroClient hero)
        {
            double damage = 0;

            if (activatedP)
            {
                return((float)player.GetAutoAttackDamage(hero, true));
            }
            if (Q.IsReady())
            {
                damage += Damage.GetSpellDamageLS(player, hero, SpellSlot.Q) * 2f;
            }
            if (W.IsReady() || activatedW)
            {
                damage += Damage.GetSpellDamageLS(player, hero, SpellSlot.W);
            }
            if (E.IsReady())
            {
                damage += Damage.GetSpellDamageLS(player, hero, SpellSlot.E);
            }
            if (R.IsReady())
            {
                damage += Damage.GetSpellDamageLS(player, hero, SpellSlot.R) * hero.Distance(player) > 1000 ? 2f : 1.3f;
            }
            //damage += ItemHandler.GetItemsDamage(target);
            var ignitedmg = player.GetSummonerSpellDamage(hero, Damage.SummonerSpell.Ignite);

            if (player.Spellbook.CanUseSpell(player.GetSpellSlot("summonerdot")) == SpellState.Ready &&
                hero.Health < damage + ignitedmg)
            {
                damage += ignitedmg;
            }
            return((float)damage);
        }
Пример #2
0
        private float ComboDamage(AIHeroClient hero)
        {
            double damage = 0;

            if (R.IsReady())
            {
                damage += Damage.GetSpellDamageLS(player, hero, SpellSlot.R) * 2;
            }
            damage += ItemHandler.GetItemsDamage(hero);
            if (Q.IsReady())
            {
                damage += Damage.GetSpellDamageLS(player, hero, SpellSlot.Q);
            }
            if (W.IsReady())
            {
                damage += Damage.GetSpellDamageLS(player, hero, SpellSlot.W, 1);
            }
            if ((Items.HasItem(ItemHandler.Bft.Id) && Items.CanUseItem(ItemHandler.Bft.Id)) ||
                (Items.HasItem(ItemHandler.Dfg.Id) && Items.CanUseItem(ItemHandler.Dfg.Id)))
            {
                damage = (float)(damage * 1.2);
            }
            var ignitedmg = player.GetSummonerSpellDamage(hero, Damage.SummonerSpell.Ignite);

            if (player.Spellbook.CanUseSpell(player.GetSpellSlot("summonerdot")) == SpellState.Ready &&
                hero.Health < damage + ignitedmg)
            {
                damage += ignitedmg;
            }
            return((float)damage);
        }
Пример #3
0
        private static float ComboDamage(AIHeroClient hero)
        {
            float damage = 0;

            if (Q.IsReady())
            {
                damage += (float)Damage.GetSpellDamageLS(player, hero, SpellSlot.Q);
            }
            if (W.IsReady())
            {
                damage += (float)Damage.GetSpellDamageLS(player, hero, SpellSlot.W);
            }
            if (E.IsReady())
            {
                damage += (float)Damage.GetSpellDamageLS(player, hero, SpellSlot.E);
                damage += (float)Damage.GetSpellDamageLS(player, hero, SpellSlot.E, 1);
            }
            if (R.IsReady())
            {
                damage += (float)Damage.GetSpellDamageLS(player, hero, SpellSlot.R);
                damage += (float)player.CalcDamage(hero, Damage.DamageType.Magical, maoRStack);
            }
            if ((Items.HasItem(ItemHandler.Bft.Id) && Items.CanUseItem(ItemHandler.Bft.Id)) ||
                (Items.HasItem(ItemHandler.Dfg.Id) && Items.CanUseItem(ItemHandler.Dfg.Id)))
            {
                damage = (float)(damage * 1.2);
            }
            if (player.Spellbook.CanUseSpell(player.GetSpellSlot("summonerdot")) == SpellState.Ready &&
                hero.Health < damage + player.GetSummonerSpellDamage(hero, Damage.SummonerSpell.Ignite))
            {
                damage += (float)player.GetSummonerSpellDamage(hero, Damage.SummonerSpell.Ignite);
            }
            damage += ItemHandler.GetItemsDamage(hero);
            return(damage);
        }
Пример #4
0
        private static float ComboDamage(AIHeroClient hero)
        {
            double damage = 0;

            if (Q.IsReady())
            {
                damage += Damage.GetSpellDamageLS(player, hero, SpellSlot.Q);
            }
            if (W.IsReady() || player.GetSpell(SpellSlot.W).State == SpellState.Surpressed)
            {
                damage += player.CalcDamage(hero, Damage.DamageType.Physical, Wdmg(hero));
            }
            if (E.IsReady())
            {
                damage += Damage.GetSpellDamageLS(player, hero, SpellSlot.E);
            }
            if ((Items.HasItem(ItemHandler.Bft.Id) && Items.CanUseItem(ItemHandler.Bft.Id)) ||
                (Items.HasItem(ItemHandler.Dfg.Id) && Items.CanUseItem(ItemHandler.Dfg.Id)))
            {
                damage = (damage * 1.2);
            }
            if (player.Spellbook.CanUseSpell(player.GetSpellSlot("summonerdot")) == SpellState.Ready &&
                hero.Health < damage + player.GetSummonerSpellDamage(hero, Damage.SummonerSpell.Ignite))
            {
                damage += player.GetSummonerSpellDamage(hero, Damage.SummonerSpell.Ignite);
            }
            damage += ItemHandler.GetItemsDamage(hero);
            return((float)damage);
        }
Пример #5
0
        public double GetdTotalBuffDamage(Obj_AI_Base target, BuffInstance buff)
        {
            var caster    = buff.Caster as AIHeroClient;
            var SpelLevel = caster.Spellbook.GetSpell(Slot).Level;

            if (caster.Spellbook.GetSpell(Slot).Level <= 0)
            {
                return(0);
            }
            if (Slot != SpellSlot.Unknown)
            {
                return(Damage.GetSpellDamageLS(caster, target, Slot, Stage) * Multiplier);
            }
            if (BuffName == "toxicshotparticle")
            {
                var dmg = new double[] { 24, 48, 72, 96, 120 }[SpelLevel - 1] +0.4 * caster.TotalMagicalDamage;
                return(Damage.CalcDamage(caster, target, Damage.DamageType.Magical, dmg));
            }
            if (BuffName == "deadlyvenom")
            {
                return(GetBuffDamage(12, 4, 6, SpelLevel) * buff.Count);
            }
            if (BuffName == "MordekaiserChildrenOfTheGrave")
            {
                var dmg = (new double[] { 18.75, 22.5, 26.25 }[SpelLevel - 1] / 100 + 0.03 / 100) *
                          caster.TotalMagicalDamage * target.MaxHealth;
                return(Damage.CalcDamage(caster, target, Damage.DamageType.Magical, dmg));
            }
            if (BuffName == "dariushemo")
            {
                var dmg = (9 + SpelLevel + caster.FlatPhysicalDamageMod * 0.3d) * buff.Count;
                return(Damage.CalcDamage(caster, target, Damage.DamageType.Physical, dmg));
            }
            if (BuffName == "brandablaze")
            {
                var dmg = target.MaxHealth * 0.08d;
                return(Damage.CalcDamage(caster, target, Damage.DamageType.Magical, dmg));
            }
            if (BuffName == "summonerdot")
            {
                return(caster.GetSummonerSpellDamage(target, Damage.SummonerSpell.Ignite));
            }
            if (BuffName == "tristanaechargesound")
            {
                var dmg = Damage.GetSpellDamageLS(caster, target, Slot, Stage) * buff.Count;
                return(Damage.CalcDamage(caster, target, Damage.DamageType.Physical, dmg));
            }
            if (BuffName == "swainbeamdamage")
            {
                var dmg = Damage.GetSpellDamageLS(caster, target, Slot, Stage) * 3;
                return(Damage.CalcDamage(caster, target, Damage.DamageType.Magical, dmg));
            }
            if (BuffName == "SwainTorment")
            {
                var dmg = new double[] { 81, 128, 176, 228, 282 }[SpelLevel - 1] +
                new double[] { 0.86, 0.89, 0.92, 0.93, 0.96 }[SpelLevel - 1] *caster.TotalMagicalDamage;
                return(Damage.CalcDamage(caster, target, Damage.DamageType.Magical, dmg));
            }
            return(0);
        }
Пример #6
0
        private static float ComboDamage(AIHeroClient hero)
        {
            double damage = 0;

            if (E.IsReady() && E.Instance.SData.Mana < player.Mana)
            {
                damage += Damage.GetSpellDamageLS(player, hero, SpellSlot.E);
            }
            if (R.IsReady() && config.Item("Rdamage").GetValue <bool>())
            {
                damage += Damage.GetSpellDamageLS(player, hero, SpellSlot.R) * 15;
            }
            if (Q.IsReady() && config.Item("Qdamage").GetValue <bool>())
            {
                damage += Q.GetDamage(hero) + player.GetAutoAttackDamage(hero);
            }
            //damage += ItemHandler.GetItemsDamage(hero);
            var ignitedmg = player.GetSummonerSpellDamage(hero, Damage.SummonerSpell.Ignite);

            if (player.Spellbook.CanUseSpell(player.GetSpellSlot("summonerdot")) == SpellState.Ready &&
                hero.Health < damage + ignitedmg)
            {
                damage += ignitedmg;
            }
            return((float)damage);
        }
Пример #7
0
        private static double getWdamage(AIHeroClient target)
        {
            var dmg = new double[] { 20, 50, 80, 110, 140 }[W.Level - 1] +8f / 100f * target.MaxHealth +
            0.3f * player.FlatMagicDamageMod;

            return(Damage.CalcDamage(player, target, Damage.DamageType.Magical, dmg));
        }
Пример #8
0
        private static float ComboDamage(AIHeroClient hero)
        {
            double damage = 0;

            damage += getQdamage(hero);
            if (E.IsReady())
            {
                damage += Damage.GetSpellDamageLS(player, hero, SpellSlot.E);
            }
            if (W.IsReady() || player.HasBuff("gragaswattackbuff"))
            {
                damage += getWdamage(hero);
            }
            if (R.IsReady())
            {
                damage += Damage.GetSpellDamageLS(player, hero, SpellSlot.R);
            }
            //damage += ItemHandler.GetItemsDamage(target);
            var ignitedmg = player.GetSummonerSpellDamage(hero, Damage.SummonerSpell.Ignite);

            if (player.Spellbook.CanUseSpell(player.GetSpellSlot("summonerdot")) == SpellState.Ready &&
                hero.Health < damage + ignitedmg)
            {
                damage += ignitedmg;
            }
            return((float)damage);
        }
Пример #9
0
        private static float ComboDamage(AIHeroClient hero)
        {
            double damage = 0;

            if (Q.IsReady())
            {
                damage += Damage.LSGetSpellDamage(player, hero, SpellSlot.Q);
            }
            if (W.IsReady())
            {
                damage += Damage.LSGetSpellDamage(player, hero, SpellSlot.W);
            }
            if (E.IsReady())
            {
                damage += Damage.LSGetSpellDamage(player, hero, SpellSlot.E);
            }
            if (R.IsReady())
            {
                if (getCheckBoxItem(drawingsMenu, "rDamage"))
                {
                    damage += Damage.LSGetSpellDamage(player, hero, SpellSlot.R) * 15;
                }
            }


            var ignitedmg = player.GetSummonerSpellDamage(hero, Damage.SummonerSpell.Ignite);

            if (player.Spellbook.CanUseSpell(player.GetSpellSlot("summonerdot")) == SpellState.Ready &&
                hero.Health < damage + ignitedmg)
            {
                damage += ignitedmg;
            }
            return((float)damage);
        }
Пример #10
0
 public static double Rdmg(Obj_AI_Base target)
 {
     return(Damage.CalcDamage(
                player, target, Damage.DamageType.Physical,
                (new double[] { 200, 300, 400 }[R.Level - 1] +
                 0.9f * (player.BaseAttackDamage + player.FlatPhysicalDamageMod))));
 }
Пример #11
0
        private static float ComboDamage(AIHeroClient hero)
        {
            double damage = 0;

            if (Q.IsReady())
            {
                damage += Damage.GetSpellDamageLS(player, hero, SpellSlot.Q);
            }
            if (W.IsReady())
            {
                damage += Damage.GetSpellDamageLS(player, hero, SpellSlot.W);
            }
            if (E.IsReady())
            {
                damage += Damage.GetSpellDamageLS(player, hero, SpellSlot.E);
            }
            if (R.IsReady())
            {
                damage += Damage.GetSpellDamageLS(player, hero, SpellSlot.R);
            }
            damage += ItemHandler.GetItemsDamage(hero);
            var ignitedmg = player.GetSummonerSpellDamage(hero, Damage.SummonerSpell.Ignite);

            if (player.Spellbook.CanUseSpell(player.GetSpellSlot("summonerdot")) == SpellState.Ready &&
                hero.Health < damage + ignitedmg)
            {
                damage += ignitedmg;
            }
            return((float)damage);
        }
Пример #12
0
        public static float ComboDamage(AIHeroClient hero)
        {
            double damage = 0;

            if (Q.IsReady())
            {
                damage += Damage.GetSpellDamageLS(player, hero, SpellSlot.Q);
            }
            if (W.IsReady())
            {
                damage += Damage.GetSpellDamageLS(player, hero, SpellSlot.W);
            }
            if ((Items.HasItem(ItemHandler.Bft.Id) && Items.CanUseItem(ItemHandler.Bft.Id)) ||
                (Items.HasItem(ItemHandler.Dfg.Id) && Items.CanUseItem(ItemHandler.Dfg.Id)))
            {
                damage = (float)(damage * 1.2);
            }
            if (player.Spellbook.CanUseSpell(player.GetSpellSlot("summonerdot")) == SpellState.Ready)
            {
                damage += player.GetSummonerSpellDamage(hero, Damage.SummonerSpell.Ignite);
            }
            if (R.IsReady())
            {
                damage += Damage.GetSpellDamageLS(player, hero, SpellSlot.R);
            }
            damage += ItemHandler.GetItemsDamage(hero);
            return((float)damage);
        }
Пример #13
0
 private static float PassiveDmg(Obj_AI_Base hero)
 {
     return
         ((float)
          (Damage.CalcDamage(
               player, hero, Damage.DamageType.Magical, 20 + (5 * player.Level) + player.AbilityPower() * 0.3f) +
           player.GetAutoAttackDamage(hero)));
 }
Пример #14
0
 private static double GetRDmagage(Obj_AI_Base hero)
 {
     return(Damage.GetSpellDamageLS(player, hero, SpellSlot.R) * 5 +
            Damage.CalcDamage(
                player, hero, Damage.DamageType.Magical,
                new double[5] {
         40, 80, 120, 160, 200
     }[R.Level - 1] +0.45 * (double)player.FlatMagicDamageMod));
 }
Пример #15
0
        private double getWDamage(AIHeroClient target)
        {
            var r        = R.Level - 1;
            var Rpercent = new float[] { 0.04f, 0.06f, 0.08f }[r >= 1 ? r: 1];
            var bonusDmg = 20 + ((player.MaxHealth - (515f + (95f * (player.Level - 1f)))) * Rpercent);
            var dmg      = (new double[] { 0.20, 0.23, 0.26, 0.29, 0.32 }[W.Level - 1] +
                            0.02 * player.TotalMagicalDamage / 100) * target.MaxHealth;

            return(Damage.CalcDamage(player, target, Damage.DamageType.Magical, dmg + bonusDmg));
        }
Пример #16
0
        private static float getEdamage(AIHeroClient target)
        {
            if (!E.IsReady())
            {
                return(0);
            }
            var num = ActiveE ? 1 : 2;
            var dmg = Damage.GetSpellDamageLS(player, target, SpellSlot.E) * num;

            return((float)(Enhanced ? dmg * 1.5f : dmg));
        }
Пример #17
0
        public static float GetItemsDamage(AIHeroClient target)
        {
            double damage = 0;

            if (Items.HasItem(odins.Id) && Items.CanUseItem(odins.Id))
            {
                damage += LeagueSharp.Common.Damage.GetItemDamageLS(player, target, LeagueSharp.Common.Damage.DamageItems.OdingVeils);
            }
            if (Items.HasItem(hexgun.Id) && Items.CanUseItem(hexgun.Id))
            {
                damage += Damage.GetItemDamageLS(player, target, Damage.DamageItems.Hexgun);
            }
            var ludenStacks = player.Buffs.FirstOrDefault(buff => buff.Name == "itemmagicshankcharge");

            if (ludenStacks != null && (Items.HasItem(Ludens.Id) && ludenStacks.Count == 100))
            {
                damage += player.CalcDamage(
                    target, Damage.DamageType.Magical,
                    Damage.CalcDamage(player, target, Damage.DamageType.Magical, 100 + player.FlatMagicDamageMod * 0.15));
            }
            if (Items.HasItem(lich.Id) && Items.CanUseItem(lich.Id))
            {
                damage += player.CalcDamage(
                    target, Damage.DamageType.Magical, player.BaseAttackDamage * 0.75 + player.FlatMagicDamageMod * 0.5);
            }
            if (Items.HasItem(Dfg.Id) && Items.CanUseItem(Dfg.Id))
            {
                damage  = damage * 1.2;
                damage += Damage.GetItemDamageLS(player, target, Damage.DamageItems.Dfg);
            }
            if (Items.HasItem(Bft.Id) && Items.CanUseItem(Bft.Id))
            {
                damage  = damage * 1.2;
                damage += Damage.GetItemDamageLS(player, target, Damage.DamageItems.BlackFireTorch);
            }
            if (Items.HasItem(tiamat.Id) && Items.CanUseItem(tiamat.Id))
            {
                damage += Damage.GetItemDamageLS(player, target, Damage.DamageItems.Tiamat);
            }
            if (Items.HasItem(hydra.Id) && Items.CanUseItem(hydra.Id))
            {
                damage += Damage.GetItemDamageLS(player, target, Damage.DamageItems.Hydra);
            }
            if (Items.HasItem(bilgewater.Id) && Items.CanUseItem(bilgewater.Id))
            {
                damage += Damage.GetItemDamageLS(player, target, Damage.DamageItems.Bilgewater);
            }
            if (Items.HasItem(botrk.Id) && Items.CanUseItem(botrk.Id))
            {
                damage += Damage.GetItemDamageLS(player, target, Damage.DamageItems.Botrk);
            }
            damage += GetSheenDmg(target);
            return((float)damage);
        }
Пример #18
0
        private static void Combo()
        {
            Ulti();
            float        perc   = (float)config.Item("minmana", true).GetValue <Slider>().Value / 100f;
            var          minHit = config.Item("useemin", true).GetValue <Slider>().Value;
            AIHeroClient target = LeagueSharp.Common.TargetSelector.GetTarget(R.Range, LeagueSharp.Common.TargetSelector.DamageType.Magical);

            if (target == null)
            {
                return;
            }
            if (config.Item("useItems").GetValue <bool>())
            {
                ItemHandler.UseItems(target, config, ComboDamage(target));
            }

            var buffs = CombatHelper.SejuaniCountFrostHero(E.Range);

            if (E.IsReady() && me.Distance(target.Position) < E.Range && buffs > 0 &&
                ((buffs > minHit) || (Damage.GetSpellDamageLS(me, target, SpellSlot.E) >= target.Health) ||
                 (me.Distance(target) > config.Item("useEminr", true).GetValue <Slider>().Value&&
                  me.Distance(target) < E.Range && buffs == 1)))
            {
                if (!(Q.IsReady() && me.Mana - me.Spellbook.GetSpell(SpellSlot.Q).SData.Mana < me.MaxMana * perc) ||
                    !(W.IsReady() && me.Mana - me.Spellbook.GetSpell(SpellSlot.W).SData.Mana < me.MaxMana * perc))
                {
                    E.Cast();
                }
            }
            if (Q.IsReady() && config.Item("useq", true).GetValue <bool>() &&
                me.Distance(target.Position) > config.Item("useQminr", true).GetValue <Slider>().Value)
            {
                var hits = Q.GetHitCount(HitChance.High);
                if (target.CountEnemiesInRange(Q.Width) >= hits)
                {
                    if (Program.IsSPrediction)
                    {
                        Q.SPredictionCast(target, HitChance.High);
                    }
                    else
                    {
                        Q.CastIfHitchanceEquals(target, HitChance.High);
                    }
                }
            }
            bool hasIgnite = me.Spellbook.CanUseSpell(me.GetSpellSlot("SummonerDot")) == SpellState.Ready;
            var  ignitedmg = (float)me.GetSummonerSpellDamage(target, Damage.SummonerSpell.Ignite);

            if (ignitedmg > target.Health && hasIgnite && !E.CanCast(target) && !W.CanCast(target) && !Q.CanCast(target))
            {
                me.Spellbook.CastSpell(me.GetSpellSlot("SummonerDot"), target);
            }
        }
Пример #19
0
        public static bool checkFuryMode(SpellSlot spellSlot, Obj_AI_Base target)
        {
            if (Damage.LSGetSpellDamage(player, target, spellSlot) > target.Health)
            {
                return(true);
            }
            if (canBeOpWIthQ(player.Position))
            {
                return(false);
            }
            if (!fury)
            {
                return(true);
            }
            if (ObjectManager.Player.Spellbook.IsAutoAttacking)
            {
                return(false);
            }
            switch (getBoxItem(comboMenu, "furyMode"))
            {
            case 0:
                return(true);

                break;

            case 1:
                if (spellSlot != SpellSlot.Q && Q.IsReady())
                {
                    return(false);
                }
                break;

            case 2:
                if (spellSlot != SpellSlot.W && (W.IsReady() || renw))
                {
                    return(false);
                }
                break;

            case 3:
                if (spellSlot != SpellSlot.E && rene)
                {
                    return(false);
                }
                break;

            default:
                return(true);

                break;
            }
            return(false);
        }
Пример #20
0
        public bool checkFuryMode(SpellSlot spellSlot, Obj_AI_Base target)
        {
            if (Damage.GetSpellDamageLS(player, target, spellSlot) > target.Health)
            {
                return(true);
            }
            if (canBeOpWIthQ(player.Position) && spellSlot != SpellSlot.Q)
            {
                return(false);
            }
            if (!fury)
            {
                return(true);
            }
            if (player.Spellbook.IsAutoAttacking)
            {
                return(false);
            }
            switch (config.Item("furyMode", true).GetValue <StringList>().SelectedIndex)
            {
            case 0:
                return(true);

                break;

            case 1:
                if (spellSlot != SpellSlot.Q && Q.IsReady(500))
                {
                    return(false);
                }
                break;

            case 2:
                if (spellSlot != SpellSlot.W && (W.IsReady(500) || renw) && target.IsInAttackRange())
                {
                    return(false);
                }
                break;

            case 3:
                if (spellSlot != SpellSlot.E && rene && E.IsReady(500))
                {
                    return(false);
                }
                break;

            default:
                return(true);

                break;
            }
            return(true);
        }
Пример #21
0
 static void killsteal()
 {
     if (KsQ && Q.IsReady())
     {
         var targets = HeroManager.Enemies.Where(x => x.LSIsValidTarget(Q.Range) && !x.IsZombie);
         foreach (var target in targets)
         {
             if (target.IsValid && target.Health < Q.GetDamage(target) && (!target.HasBuff("kindrednodeathbuff") || !target.HasBuff("Undying Rage") || !target.HasBuff("JudicatorIntervention")) && (!Orbwalking.InAutoAttackRange(target) || !Orbwalker.CanAutoAttack))
             {
                 Q.Cast(target);
             }
         }
     }
     if (KsB &&
         (ItemData.Bilgewater_Cutlass.GetItem().IsReady() ||
          ItemData.Blade_of_the_Ruined_King.GetItem().IsReady()))
     {
         var targets =
             HeroManager.Enemies.Where(
                 x => x.LSIsValidTarget(ItemData.Blade_of_the_Ruined_King.Range) && !x.IsZombie);
         foreach (var target in targets)
         {
             if (target.Health < Damage.GetItemDamage(Player, target, Damage.DamageItems.Bilgewater))
             {
                 ItemData.Bilgewater_Cutlass.GetItem().Cast(target);
             }
             if (target.Health < Damage.GetItemDamage(Player, target, Damage.DamageItems.Botrk))
             {
                 ItemData.Blade_of_the_Ruined_King.GetItem().Cast(target);
             }
         }
     }
     if (KsT &&
         (ItemData.Tiamat_Melee_Only.GetItem().IsReady() ||
          ItemData.Ravenous_Hydra_Melee_Only.GetItem().IsReady()))
     {
         var targets =
             HeroManager.Enemies.Where(
                 x => x.LSIsValidTarget(ItemData.Ravenous_Hydra_Melee_Only.Range) && !x.IsZombie);
         foreach (var target in targets)
         {
             if (target.Health < Damage.GetItemDamage(Player, target, Damage.DamageItems.Tiamat))
             {
                 ItemData.Tiamat_Melee_Only.GetItem().Cast();
             }
             if (target.Health < Damage.GetItemDamage(Player, target, Damage.DamageItems.Hydra))
             {
                 ItemData.Ravenous_Hydra_Melee_Only.GetItem().Cast();
             }
         }
     }
 }
Пример #22
0
        private double getRDamage(AIHeroClient hero)
        {
            var dmg = new double[] { 175, 350, 525 }[R.Level - 1] +
            new[] { 28.57, 33.33, 40 }[R.Level - 1] / 100 * (hero.MaxHealth - hero.Health);

            if (hero.HasBuff("garenpassiveenemytarget"))
            {
                return(Damage.CalcDamage(player, hero, Damage.DamageType.True, dmg));
            }
            else
            {
                return(Damage.CalcDamage(player, hero, Damage.DamageType.Magical, dmg));
            }
        }
Пример #23
0
        private void Clear()
        {
            float perc = config.Item("minmana", true).GetValue <Slider>().Value / 100f;
            var   buff = Jungle.GetNearest(player.Position);

            if (buff != null && config.Item("useeLCsteal", true).GetValue <bool>() && E.IsReady())
            {
                var dmg = new double[] { 50, 65, 80, 95, 110 }[E.Level] +0.75 * player.FlatMagicDamageMod +
                Math.Min(300, new double[] { 6, 6.5, 7, 7.5, 8 }[E.Level] / 100 * buff.MaxHealth);
                if (E.CanCast(buff) && Damage.CalcDamage(player, buff, Damage.DamageType.Magical, dmg) > buff.Health)
                {
                    E.CastOnUnit(buff);
                }
            }
            if (player.Mana < player.MaxMana * perc)
            {
                return;
            }
            var pos  = LeagueSharp.Common.Prediction.GetPrediction(player, 1);
            var coll = Qp.GetCollision(
                player.Position.To2D(),
                new List <Vector2>
            {
                player.Position.Extend(pos.UnitPosition, player.Distance(pos.CastPosition) * -1).To3DWorld().To2D()
            });

            if ((coll.Count > 0 || Environment.Minion.countMinionsInrange(player.Position, 250f) > 0) &&
                config.Item("useqLC", true).GetValue <bool>())
            {
                CastQ();
            }
            if (config.Item("moveLC", true).GetValue <bool>() && player.CountEnemiesInRange(1000) < 1 &&
                Orbwalking.CanMove(100) && player.Mana > 30 && !player.Spellbook.IsAutoAttacking)
            {
                var mini =
                    MinionManager.GetMinions(600, MinionTypes.All, MinionTeam.NotAlly)
                    .Where(m => !m.HasBuff("poisontrailtarget") && !m.UnderTurret(true))
                    .OrderBy(m => m.Distance(player))
                    .FirstOrDefault();

                if (mini != null && !Environment.Minion.KillableMinion(player.AttackRange))
                {
                    EloBuddy.Player.IssueOrder(
                        GameObjectOrder.MoveTo, player.Position.Extend(mini.Position, player.Distance(mini) + 100).To3DWorld());
                    Orbwalking.Attack = false;
                    Orbwalking.Move   = false;
                }
            }
        }
Пример #24
0
        private void Clear()
        {
            float perc = (float)config.Item("minmana").GetValue <Slider>().Value / 100f;

            if (player.Mana < player.MaxMana * perc)
            {
                return;
            }
            var bestpos =
                W.GetCircularFarmLocation(
                    MinionManager.GetMinions(W.Range, MinionTypes.All, MinionTeam.NotAlly, MinionOrderTypes.MaxHealth),
                    100);

            if (config.Item("usewLC").GetValue <bool>() && W.IsReady() &&
                config.Item("usewLChit").GetValue <Slider>().Value <= bestpos.MinionsHit)
            {
                W.Cast(bestpos.Position);
            }
            var target =
                MinionManager.GetMinions(E.Range, MinionTypes.All, MinionTeam.NotAlly)
                .Where(i => i.Health <E.GetDamage(i) || i.Health> 600f)
                .OrderByDescending(i => i.Distance(player))
                .FirstOrDefault();

            if (config.Item("useeLC").GetValue <bool>() && E.CanCast(target))
            {
                E.CastOnUnit(target);
            }
            if (config.Item("useqLC").GetValue <bool>() && Q.IsReady())
            {
                var targetQ =
                    MinionManager.GetMinions(Q.Range, MinionTypes.All, MinionTeam.NotAlly)
                    .Where(
                        i =>
                        (i.Health < Damage.GetSpellDamageLS(player, i, SpellSlot.Q) &&
                         !(i.Health < player.GetAutoAttackDamage(i))))
                    .OrderByDescending(i => i.Health)
                    .FirstOrDefault();
                if (targetQ == null)
                {
                    return;
                }
                Q.Cast();
                EloBuddy.Player.IssueOrder(GameObjectOrder.AutoAttack, targetQ);
            }
        }
Пример #25
0
        private void Clear()
        {
            var perc = getSliderItem(menuLC, "minmana") / 100f;

            if (player.Mana < player.MaxMana * perc)
            {
                return;
            }
            var bestpos =
                W.GetCircularFarmLocation(
                    MinionManager.GetMinions(W.Range, MinionTypes.All, MinionTeam.NotAlly, MinionOrderTypes.MaxHealth),
                    100);

            if (getCheckBoxItem(menuLC, "usewLC") && W.IsReady() &&
                getSliderItem(menuLC, "usewLChit") <= bestpos.MinionsHit)
            {
                W.Cast(bestpos.Position, getCheckBoxItem(config, "packets"));
            }
            var target =
                MinionManager.GetMinions(E.Range, MinionTypes.All, MinionTeam.NotAlly)
                .Where(i => i.Health <E.GetDamage(i) || i.Health> 500f)
                .OrderByDescending(i => i.Distance(player))
                .FirstOrDefault();

            if (getCheckBoxItem(menuLC, "useeLC") && E.CanCast(target))
            {
                E.CastOnUnit(target, getCheckBoxItem(config, "packets"));
            }
            if (getCheckBoxItem(menuLC, "useqLC") && Q.IsReady())
            {
                var targetQ =
                    MinionManager.GetMinions(Q.Range, MinionTypes.All, MinionTeam.NotAlly)
                    .Where(
                        i =>
                        (i.Health < Damage.LSGetSpellDamage(player, i, SpellSlot.Q) &&
                         !(i.Health < player.GetAutoAttackDamage(i))))
                    .OrderByDescending(i => i.Health)
                    .FirstOrDefault();
                if (targetQ == null)
                {
                    return;
                }
                Q.Cast(getCheckBoxItem(config, "packets"));
                Player.IssueOrder(GameObjectOrder.AutoAttack, targetQ);
            }
        }
Пример #26
0
        private static float ComboDamage(AIHeroClient hero)
        {
            float damage = 0;

            if (Q.IsReady() && player.Spellbook.GetSpell(SpellSlot.Q).SData.Mana < player.Mana)
            {
                damage += (float)Damage.GetSpellDamageLS(player, hero, SpellSlot.Q);
            }
            if (E.IsReady() && player.Spellbook.GetSpell(SpellSlot.E).SData.Mana < player.Mana)
            {
                damage += (float)Damage.GetSpellDamageLS(player, hero, SpellSlot.E);
            }
            if (player.Spellbook.CanUseSpell(player.GetSpellSlot("summonerdot")) == SpellState.Ready &&
                hero.Health - damage < (float)player.GetSummonerSpellDamage(hero, Damage.SummonerSpell.Ignite))
            {
                damage += (float)player.GetSummonerSpellDamage(hero, Damage.SummonerSpell.Ignite);
            }
            return(damage);
        }
Пример #27
0
        public static float getQdamage(Obj_AI_Base target)
        {
            var damage = 0d;

            if (Q.IsReady())
            {
                if (savedQ == null)
                {
                    damage += Damage.GetSpellDamageLS(player, target, SpellSlot.Q);
                }
                else
                {
                    if (savedQ.deltaT() > 2000)
                    {
                        damage += Damage.GetSpellDamageLS(player, target, SpellSlot.Q) * 1.5f;
                    }
                    else
                    {
                        damage += Damage.GetSpellDamageLS(player, target, SpellSlot.Q);
                    }
                }
            }
            if (target.Name.Contains("SRU_Dragon"))
            {
                var dsBuff = player.GetBuff("s5test_dragonslayerbuff");
                if (dsBuff != null)
                {
                    damage = damage * (1f - 0.07f * dsBuff.Count);
                }
            }
            if (target.Name.Contains("SRU_Baron"))
            {
                var bBuff = player.GetBuff("barontarget");
                if (bBuff != null)
                {
                    damage = damage * 0.5f;
                }
            }
            return((float)damage);
        }
Пример #28
0
        private static float ComboDamage(AIHeroClient hero)
        {
            float damage = 0;

            if (Q.IsReady())
            {
                damage += (float)Damage.GetSpellDamageLS(me, hero, SpellSlot.Q);
            }
            if (E.IsReady() || E.Instance.State == SpellState.Surpressed)
            {
                damage += (float)Damage.GetSpellDamageLS(me, hero, SpellSlot.E);
            }
            if (W.IsReady())
            {
                double watk = (new double[] { 4, 4.5, 5, 5.5, 6 }[W.Level - 1] +hero.FlatMagicDamageMod * 0.03) / 100 *
                              hero.Health;
                double wdot = new double[] { 40, 70, 100, 130, 160 }[W.Level - 1] +
                (new double[] { 4, 6, 8, 10, 12 }[W.Level - 1] / 100) * me.MaxHealth;
                damage += (float)me.CalcDamage(hero, Damage.DamageType.Magical, wdot);
                damage += (float)me.CalcDamage(hero, Damage.DamageType.Magical, watk);
            }
            if (R.IsReady())
            {
                damage += (float)Damage.GetSpellDamageLS(me, hero, SpellSlot.R);
            }

            if ((Items.HasItem(ItemHandler.Bft.Id) && Items.CanUseItem(ItemHandler.Bft.Id)) ||
                (Items.HasItem(ItemHandler.Dfg.Id) && Items.CanUseItem(ItemHandler.Dfg.Id)))
            {
                damage = (float)(damage * 1.2);
            }
            if (me.Spellbook.CanUseSpell(me.GetSpellSlot("summonerdot")) == SpellState.Ready &&
                hero.Health < damage + me.GetSummonerSpellDamage(hero, Damage.SummonerSpell.Ignite))
            {
                damage += (float)me.GetSummonerSpellDamage(hero, Damage.SummonerSpell.Ignite);
            }
            damage += ItemHandler.GetItemsDamage(hero);
            return(damage);
        }
Пример #29
0
        private static float ComboDamage(AIHeroClient hero)
        {
            double damage = 0;

            if (config.Item("drawcomboQ", true).GetValue <bool>())
            {
                damage += Damage.GetSpellDamageLS(player, hero, SpellSlot.Q) * 5;
            }
            if (E.IsReady())
            {
                damage += Damage.GetSpellDamageLS(player, hero, SpellSlot.E);
            }
            //damage += ItemHandler.GetItemsDamage(hero);
            var ignitedmg = player.GetSummonerSpellDamage(hero, Damage.SummonerSpell.Ignite);

            if (player.Spellbook.CanUseSpell(player.GetSpellSlot("summonerdot")) == SpellState.Ready &&
                hero.Health < damage + ignitedmg)
            {
                damage += ignitedmg;
            }
            return((float)damage);
        }
Пример #30
0
        private double getEDamage(AIHeroClient target, bool bufftime = false)
        {
            var spins = 0d;

            if (bufftime)
            {
                spins = CombatHelper.GetBuffTime(player.GetBuff("GarenE")) * GetSpins() / 3;
            }
            else
            {
                spins = GetSpins();
            }
            var dmg   = (baseEDamage[E.Level - 1] + bonusEDamage[E.Level - 1] / 100 * player.TotalAttackDamage) * spins;
            var bonus = target.HasBuff("garenpassiveenemytarget") ? target.MaxHealth / 100f * spins : 0;

            if (ObjectManager.Get <Obj_AI_Base>().Count(o => o.IsValidTargetLS() && o.Distance(target) < 650) == 0)
            {
                return(Damage.CalcDamage(player, target, Damage.DamageType.Physical, dmg) * 1.33 + bonus);
            }
            else
            {
                return(Damage.CalcDamage(player, target, Damage.DamageType.Physical, dmg) + bonus);
            }
        }
Пример #31
0
            public static void OnDrawMonster(EventArgs args)
            {
                try
                {
                    if (EnableMonsterDraw || DamageToMonster == null) return;
                    if (Player.IsDead) return;
                    foreach (var minion in ObjectManager.Get<Obj_AI_Minion>())
                    {
                        if (!minion.IsValidTarget(2000f)) continue;//If minion is outside 2000 range dont bother displaying the damage

                        var damage = new Damage().GetDamageToMonsters(minion);// Overwritten later

                        // Monster bar widths and offsets from ElSmite
                        var barWidth = 0;
                        var xOffset = 0;
                        var yOffset = 0;
                        var yOffset2 = 0;
                        var display = true;
                        switch (minion.CharData.BaseSkinName)
                        {
                            case "SRU_Red":
                            case "SRU_Blue":
                            case "SRU_Dragon":
                                barWidth = 145;
                                xOffset = 3;
                                yOffset = 18;
                                yOffset2 = 10;
                                break;

                            case "SRU_Baron":
                                barWidth = 194;
                                xOffset = -22;
                                yOffset = 13;
                                yOffset2 = 16;
                                break;

                            case "Sru_Crab":
                                barWidth = 61;
                                xOffset = 45;
                                yOffset = 34;
                                yOffset2 = 3;
                                break;

                            case "SRU_Krug":
                                barWidth = 81;
                                xOffset = 58;
                                yOffset = 18;
                                yOffset2 = 4;
                                break;

                            case "SRU_Gromp":
                                barWidth = 87;
                                xOffset = 62;
                                yOffset = 18;
                                yOffset2 = 4;
                                break;

                            case "SRU_Murkwolf":
                                barWidth = 75;
                                xOffset = 54;
                                yOffset = 19;
                                yOffset2 = 4;
                                break;

                            case "SRU_Razorbeak":
                                barWidth = 75;
                                xOffset = 54;
                                yOffset = 18;
                                yOffset2 = 4;
                                break;

                            default:
                                display = false;
                                break;
                        }
                        if (!display) continue;
                        var barPos = minion.HPBarPosition;
                        var percentHealthAfterDamage = Math.Max(0, minion.Health - damage)/minion.MaxHealth;
                        var yPos = barPos.Y + yOffset;
                        var xPosDamage = barPos.X + xOffset + barWidth*percentHealthAfterDamage;
                        var xPosCurrentHp = barPos.X + xOffset + barWidth*minion.Health/minion.MaxHealth;

                        if (EnableMonsterFill)
                        {
                            var differenceInHp = xPosCurrentHp - xPosDamage;
                            var pos1 = barPos.X + xOffset;

                            for (var i = 0; i < differenceInHp; i++)
                            {
                                LeagueSharp.Drawing.DrawLine(pos1 + i, yPos, pos1 + i, yPos + yOffset2, 1,FillColor);
                            }
                        }
                        else
                            LeagueSharp.Drawing.DrawLine(xPosDamage, yPos, xPosDamage, yPos + yOffset2, 1,LineColor);

                        if (damage < minion.Health) continue;
                        if (EnableText)
                        {

                            LeagueSharp.Drawing.DrawText(minion.HPBarPosition.X + xOffset, minion.HPBarPosition.Y, KillableColor, "Killable");
                        }
                    }
                }
                catch
                {
                    //Dumb color picker
                }
            }
Пример #32
0
 private static bool IsDamageType(Obj_AI_Hero hero, String spellName, Damage.DamageType damageType)
 {
     DamageSpell damageSpell = null;
     foreach (SpellDataInst spellDataInst in hero.Spellbook.Spells)
     {
         if (string.Equals(spellDataInst.Name, spellName,
             StringComparison.InvariantCultureIgnoreCase))
         {
             damageSpell = Damage.Spells[hero.ChampionName].FirstOrDefault(s =>
             {
                 if (s.Slot == spellDataInst.Slot)
                     return 0 == s.Stage;
                 return false;
             }) ?? Damage.Spells[hero.ChampionName].FirstOrDefault(s => s.Slot == spellDataInst.Slot);
             if (damageSpell != null)
                 break;
         }
     }
     if (damageSpell == null || damageSpell.DamageType != damageType)
         return false;
     return true;
 }
Пример #33
0
 internal static float GetDamageCalc(Obj_AI_Base Sender, Obj_AI_Base Target, Damage.DamageType Type, double Equation = 0d)
 {
     return (float)Damage.CalcDamage(Sender, Target, Type, Equation);
 }