Ejemplo n.º 1
0
 public static double GetExecuteDamage(Obj_AI_Base target)
 {
     return
         target.GetBuffCount("TristanaECharge") != 0 ?
             Variables.E.GetDamage(target) * (0.3 * target.GetBuffCount("TristanaECharge") + 1)
                 + (target.BaseAttackDamage + target.FlatPhysicalDamageMod)
                 + (ObjectManager.Player.TotalMagicalDamage * 0.5)
             : 0;
 }
Ejemplo n.º 2
0
        public static float GetRawRendDamage(Obj_AI_Base target, int customStacks = -1)
        {     
            if (target.GetBuffCount("kalistaexpungemarker") != 0 || customStacks > -1)
            {
                return (_rawRendDamage[Kalista.spells[Spells.E].Level - 1] + _rawRendDamageMultiplier[Kalista.spells[Spells.E].Level - 1] * player.TotalAttackDamage()) + 
                       ((customStacks < 0 ? target.GetBuffCount("kalistaexpungemarker") : customStacks) - 1) * 
                       (_rawRendDamagePerSpear[Kalista.spells[Spells.E].Level - 1] + _rawRendDamagePerSpearMultiplier[Kalista.spells[Spells.E].Level - 1] * player.TotalAttackDamage()); 
            }

            return 0;
        }
Ejemplo n.º 3
0
        private float GetComboDamage(Obj_AI_Base target)
        {
            float damage = 0f;

            if (GeassLib.Functions.Calculations.Damage.CheckNoDamageBuffs((Obj_AI_Hero)target))return damage;

            //if (!Champion.Player.IsWindingUp) // can auto attack
            //    if (Champion.Player.Distance(target) < Champion.Player.AttackRange) // target in auto range
            //        damage += (float)Champion.Player.GetAutoAttackDamage(target) - 50;

            if (Champion.GetSpellR.IsReady())
                if (Champion.Player.Distance(target) < Champion.GetSpellR.Range)
                    damage += Champion.GetSpellR.GetDamage(target);

            if (target.HasBuff("tristanaecharge"))
            {
                int count = target.GetBuffCount("tristanaecharge");
                if (!Champion.Player.IsWindingUp)
                    if (Champion.Player.Distance(target) < Champion.Player.AttackRange) // target in auto range
                        count++;

                damage += (float)(Champion.GetSpellE.GetDamage(target) * (count * 0.30)) + Champion.GetSpellE.GetDamage(target);

                return damage;
            }

            if (Champion.GetSpellE.IsReady())
                if (Champion.Player.Distance(target) < Champion.GetSpellE.Range)
                    damage += (float)(Champion.GetSpellE.GetDamage(target) * 0.30) + Champion.GetSpellE.GetDamage(target); // 1 auto charge

            return damage;
        }
Ejemplo n.º 4
0
        public static float GetEdamage(Obj_AI_Base target)
        {
            if (target.GetBuffCount("kalistaexpungemarker") > 0)
            {
                var dmg =
                    (float)
                        ((new double[] { 20, 30, 40, 50, 60 }[Program.E.Level - 1] +
                          0.6 * (Program.Player.BaseAttackDamage + Program.Player.FlatPhysicalDamageMod)) +
                         ((target.GetBuffCount("kalistaexpungemarker") - 1) *
                          (new double[] { 10, 14, 19, 25, 32 }[Program.E.Level - 1] +
                           new double[] { 0.2, 0.225, 0.25, 0.275, 0.3 }[Program.E.Level - 1] *
                           (Program.Player.BaseAttackDamage + Program.Player.FlatPhysicalDamageMod))));


                if (Program.Player.HasBuff("summonerexhaust"))
                {
                    dmg *= 0.6f;
                }
                if (Program.Player.HasBuff("urgotcorrosivedebuff"))
                {
                    dmg *= 0.85f;
                }
                if (target.HasBuff("FerociousHowl"))
                {
                    dmg *= 0.3f;
                }   
                if (target.HasBuff("vladimirhemoplaguedebuff"))
                {
                    dmg *= 1.15f;
                }
                if (target.Name.Contains("Baron") && Program.Player.HasBuff("barontarget"))
                {
                    dmg *= 0.5f;
                }
                if (target.Name.Contains("Dragon") && Program.Player.HasBuff("s5test_dragonslayerbuff"))
                {
                    dmg *= (1f - (0.07f * Program.Player.GetBuffCount("s5test_dragonslayerbuff")));
                }


                return
                (float)
                    Program.Player.CalcDamage(target, LeagueSharp.Common.Damage.DamageType.Physical, dmg + target.FlatHPRegenMod);
            }
            return 0;

        }
Ejemplo n.º 5
0
 public static float GetEdamage(Obj_AI_Base target)
 {
     if (target.GetBuffCount("kalistaexpungemarker") > 0)
     {
         return EDamage(target);
     }
     return 0;
 }
Ejemplo n.º 6
0
 public static float EDamage(Obj_AI_Base target)
 {
     var buff = target.HasBuff("twitchdeadlyvenom");
     var bc = target.GetBuffCount("twitchdeadlyvenom");
     if (!buff || !E.IsLearned) return 0f;
     return  _Player.CalculateDamageOnUnit(target, DamageType.True,(float)
         (new[] { 15, 20, 25, 30, 35 }[E.Level -1] * bc +
         0.2 * _Player.FlatMagicDamageMod +
         0.25 * _Player.FlatPhysicalDamageMod +
         new[] { 20, 35, 50, 65, 80 }[E.Level -1]));
 }
Ejemplo n.º 7
0
        public static float CustomCalculator(Obj_AI_Base target, int customStacks = -1)
        {
            int buff = target.GetBuffCount("KalistaExpungeMarker");

            if (buff > 0 || customStacks > -1)
            {
                var tDamage = (RRD[Program.E.Level - 1] + RRDM[Program.E.Level - 1] * ObjectManager.Player.TotalAttackDamage) +
                       ((customStacks < 0 ? buff : customStacks) - 1) *
                       (RRPS[Program.E.Level - 1] + RRPSM[Program.E.Level - 1] * ObjectManager.Player.TotalAttackDamage);

                return (float)ObjectManager.Player.CalcDamage(target, Damage.DamageType.Physical, tDamage);
            }
            return 0;
        }
Ejemplo n.º 8
0
        /// <summary>
        ///     Returns the real number of the stacks of the 'buffname' buff the target possesses.
        /// </summary>
        /// <param name="from">The target.</param>
        /// <param name="buffname">The buffname.</param>
        public static int GetRealBuffCount(this Obj_AI_Base from, string buffname)
        {
            var getBuffCount = from.GetBuffCount(buffname);

            switch (getBuffCount)
            {
            case -1:
                return(0);

            case 0:
                return(1);
            }

            return(getBuffCount);
        }
Ejemplo n.º 9
0
        private static void ValidateSentinel(Obj_AI_Base sentinel)
        {
            if (sentinel.Health == 2 && sentinel.GetBuffCount("kalistaw") == 1)
            {
                if (!ActiveSentinels.ContainsKey(SentLocation.Item1))
                {
                    ActiveSentinels.Add(SentLocation.Item1, new Dictionary <SentinelLocations, Obj_AI_Base>());
                }
                ActiveSentinels[SentLocation.Item1].Remove(SentLocation.Item2);
                ActiveSentinels[SentLocation.Item1].Add(SentLocation.Item2, sentinel);

                SentLocation = null;
                RecalculateOpenLocations();
            }
        }
Ejemplo n.º 10
0
        private static float EDamage(Obj_AI_Base target)
        {
            var stacks = target.GetBuffCount("kalistaexpungemarker");

            if (!_e.IsReady() || stacks == 0)
            {
                return(0.0f);
            }

            return(Player.Instance.CalculateDamageOnUnit(target, DamageType.Physical,
                                                         EBaseDamage[_e.Level - 1] + stacks * EStackDamage[_e.Level - 1] +
                                                         Player.Instance.TotalAttackDamage * (EBaseDamageMultiplier[_e.Level - 1] +
                                                                                              stacks * EStackDamageMultiplier[_e.Level - 1]) -
                                                         Value.Get("combo.e.damage")));
        }
Ejemplo n.º 11
0
        public static float MinionCalculator(Obj_AI_Base minion, int customStacks = -1)
        {
            int buff = minion.GetBuffCount("KalistaExpungeMarker");

            if (buff > 0 || customStacks > -1)
            {
                var tDamage = (RRD[Program.E.Level - 1] + RRDM[Program.E.Level - 1] * (ObjectManager.Player.BaseAttackDamage + ObjectManager.Player.FlatPhysicalDamageMod)) +
                              ((customStacks < 0 ? buff : customStacks) - 1) *
                              (RRPS[Program.E.Level - 1] + RRPSM[Program.E.Level - 1] * (ObjectManager.Player.BaseAttackDamage + ObjectManager.Player.FlatPhysicalDamageMod));

                return((float)ObjectManager.Player.CalcDamage(minion, Damage.DamageType.Physical, tDamage));
            }

            return(0);
        }
Ejemplo n.º 12
0
        internal static SkillshotData GetData(Obj_AI_Base caster, GameObjectProcessSpellCastEventArgs args, MissileClient missile)
        {
            SkillshotData result = null;
            var           hero   = caster as AIHeroClient;

            List <SkillshotData> AllData = SkillshotDatabase.List.FindAll(s => hero != null ? s.hero.Equals(Champion.Unknown) || s.hero.Equals(hero.Hero) : !string.IsNullOrEmpty(s.CasterName) && caster.BaseSkinName.StartsWith(s.CasterName));

            if (AllData == null || !AllData.Any())
            {
                return(result);
            }

            if (missile == null)
            {
                var slotData = AllData.FindAll(s => s.slot.Equals(args.Slot) || s.slot.Equals(SpellSlot.Unknown));
                if (slotData != null && slotData.Any())
                {
                    var spellname = args.SData.Name;
                    var data      =
                        slotData.FirstOrDefault(
                            s =>
                            !string.IsNullOrEmpty(s.SpellName) && s.SpellName.Equals(spellname, StringComparison.CurrentCultureIgnoreCase) ||
                            s.ExtraSpellName != null && s.ExtraSpellName.Any(x => x.Equals(spellname, StringComparison.CurrentCultureIgnoreCase)));

                    if (data != null && !data.DetectByMissile && (string.IsNullOrEmpty(data.RequireBuff) || caster.GetBuffCount(data.RequireBuff) >= data.RequireBuffCount) && (data.StartsFromTarget && args.Target != null || !data.StartsFromTarget))
                    {
                        result = data;
                    }
                }
            }
            else
            {
                var missilename = missile.SData.Name;
                var data        =
                    AllData.FirstOrDefault(
                        s =>
                        !string.IsNullOrEmpty(s.MissileName) && s.MissileName.Equals(missilename, StringComparison.CurrentCultureIgnoreCase) ||
                        s.ExtraMissileName != null && s.ExtraMissileName.Any(x => x.Equals(missilename, StringComparison.CurrentCultureIgnoreCase)));

                if (data != null && (string.IsNullOrEmpty(data.RequireBuff) || caster.GetBuffCount(data.RequireBuff) >= data.RequireBuffCount) && !data.StartsFromTarget)
                {
                    result = data;
                }
            }
            return(result);
        }
Ejemplo n.º 13
0
        private float GetComboDamage(Obj_AI_Base target)
        {
            float damage = 0f;

            if (GeassLib.Functions.Calculations.Damage.CheckNoDamageBuffs((AIHeroClient)target))
            {
                return(damage);
            }

            //if (!Champion.Player.Spellbook.IsAutoAttacking) // can auto attack
            //    if (Champion.Player.Distance(target) < Champion.Player.AttackRange) // target in auto range
            //        damage += (float)Champion.Player.GetAutoAttackDamage(target) - 50;

            if (Champion.GetSpellR.IsReady())
            {
                if (Champion.Player.Distance(target) < Champion.GetSpellR.Range)
                {
                    damage += Champion.GetSpellR.GetDamage(target);
                }
            }

            if (target.HasBuff("tristanaecharge"))
            {
                int count = target.GetBuffCount("tristanaecharge");
                if (!Champion.Player.Spellbook.IsAutoAttacking)
                {
                    if (Champion.Player.Distance(target) < Champion.Player.AttackRange) // target in auto range
                    {
                        count++;
                    }
                }

                damage += (float)(Champion.GetSpellE.GetDamage(target) * (count * 0.30)) + Champion.GetSpellE.GetDamage(target);

                return(damage);
            }

            if (Champion.GetSpellE.IsReady())
            {
                if (Champion.Player.Distance(target) < Champion.GetSpellE.Range)
                {
                    damage += (float)(Champion.GetSpellE.GetDamage(target) * 0.30) + Champion.GetSpellE.GetDamage(target); // 1 auto charge
                }
            }
            return(damage);
        }
Ejemplo n.º 14
0
        /// <summary>
        ///     Gets the Base Damage
        /// </summary>
        /// <param name="target">
        ///     The target
        /// </param>
        /// <returns>
        ///     The <see cref="float" />.
        /// </returns>
        private static float GetBaseDamage(Obj_AI_Base target)
        {
            var rawRendDamage                   = new float[] { 20, 30, 40, 50, 60 };
            var rawRendDamageMultiplier         = new[] { 0.6f, 0.6f, 0.6f, 0.6f, 0.6f };
            var rawRendDamagePerSpear           = new float[] { 10, 14, 19, 25, 32 };
            var rawRendDamagePerSpearMultiplier = new[] { 0.2, 0.225, 0.25, 0.275, 0.3 };
            var buffCount = target.GetBuffCount("kalistaexpungemarker");

            var baseDamage = (rawRendDamage[SpellManager.Spell[SpellSlot.E].Level - 1]
                              + rawRendDamageMultiplier[SpellManager.Spell[SpellSlot.E].Level - 1]
                              * ObjectManager.Player.TotalAttackDamage)
                             + (buffCount - 1)
                             * (rawRendDamagePerSpear[SpellManager.Spell[SpellSlot.E].Level - 1]
                                + rawRendDamagePerSpearMultiplier[SpellManager.Spell[SpellSlot.E].Level - 1]
                                * ObjectManager.Player.TotalAttackDamage);

            return((float)ObjectManager.Player.CalculateDamage(target, DamageType.Physical, baseDamage));
        }
Ejemplo n.º 15
0
        public static float CustomCalculator(Obj_AI_Base target, int customStacks = -1)
        {
            int buff = target.GetBuffCount("KalistaExpungeMarker");

            if (buff > 0 || customStacks > -1)
            {
                var tDamage = (RRD[_E.Level - 1] + RRDM[_E.Level - 1] * Program._Player.TotalAttackDamage) +
                       ((customStacks < 0 ? buff : customStacks) - 1) *
                       (RRPS[_E.Level - 1] + RRPSM[_E.Level - 1] * Program._Player.TotalAttackDamage);

                return (float)Program._Player.CalculateDamageOnUnit(target, DamageType.Physical, tDamage);

                //return RRD[_E.Level - 1] + buff * RRPS[_E.Level - 1] +
                 //      Program._Player.TotalAttackDamage * (RRDM[_E.Level - 1] + buff * RRPSM[_E.Level - 1]);
            }

            return 0;
        }
Ejemplo n.º 16
0
        /// <summary>
        ///     Gets the magical passive flat mod.
        /// </summary>
        /// <param name="source">The source.</param>
        /// <param name="target">The target.</param>
        /// <returns>System.Double.</returns>
        private static double GetMagicalPassiveFlatMod(this Obj_AI_Base source, Obj_AI_Base target)
        {
            var amount = 0d;
            var hero = source as Obj_AI_Hero;
            if (hero != null)
            {
                var ardentCenserBuff = hero.GetBuff("itemangelhandbuff");
                if (ardentCenserBuff != null)
                {
                    var ardentCenserBuffCaster = ardentCenserBuff.Caster as Obj_AI_Hero;
                    if (ardentCenserBuffCaster != null)
                    {
                        amount += 19.12 + 0.88 * ardentCenserBuffCaster.Level;
                    }
                }

                var namiE = hero.GetBuff("NamiE");
                if (namiE != null)
                {
                    var namiECaster = namiE.Caster as Obj_AI_Hero;
                    if (namiECaster != null)
                    {
                        amount += namiECaster.GetSpellDamage(target, SpellSlot.E);
                    }
                }

                var leonaPassive = target.GetBuff("LeonaSunlight");
                if (leonaPassive != null)
                {
                    var leonaPassiveCaster = leonaPassive.Caster as Obj_AI_Hero;
                    if (leonaPassiveCaster != null)
                    {
                        amount += 15 + 5 * leonaPassiveCaster.Level;
                    }
                }

                if (target.GetBuffCount("braummarkcounter") == 3)
                {
                    amount += 16 + 10 * hero.Level;
                }
            }

            return amount;
        }
Ejemplo n.º 17
0
 internal static bool IsWillDieByTristanaE(this Obj_AI_Base target)
 {
     if (ObjectManager.Player.ChampionName == "Tristana")
     {
         if (target.HasBuff("tristanaecharge"))
         {
             if (
                 target.IsKillableAndValidTarget(
                     (float)
                     (ObjectManager.Player.GetSpellDamage(target, SpellSlot.E) *
                      (target.GetBuffCount("tristanaecharge") * 0.30) +
                      ObjectManager.Player.GetSpellDamage(target, SpellSlot.E)),
                     TargetSelector.DamageType.Physical))
             {
                 return(true);
             }
         }
     }
     return(false);
 }
Ejemplo n.º 18
0
        private static void ValidateSentinel(Obj_AI_Base sentinel)
        {
            if (sentinel.Health == 2 && sentinel.GetBuffCount("kalistaw") == 1)
            {
                DeBug.WriteConsole("[ValidateSentinel]", "进入ValidateSentinel", DebugLevel.Info, Config.Menu.GetBool("调试"));
                if (!ActiveSentinels.ContainsKey(SentLocation.Item1))
                {
                    ActiveSentinels.Add(SentLocation.Item1, new Dictionary <SentinelLocations, Obj_AI_Base>());
                    DeBug.WriteConsole("[ValidateSentinel]", "不包含这个哨兵", DebugLevel.Info, Config.Menu.GetBool("调试"));
                }
                DeBug.WriteConsole("[ValidateSentinel]", "包含这个哨兵", DebugLevel.Info, Config.Menu.GetBool("调试"));
                ActiveSentinels[SentLocation.Item1].Remove(SentLocation.Item2);
                ActiveSentinels[SentLocation.Item1].Add(SentLocation.Item2, sentinel);

                DeBug.WriteConsole("[ValidateSentinel]", "替换哨兵信息", DebugLevel.Info, Config.Menu.GetBool("调试"));
                SentLocation = null;
                RecalculateOpenLocations();
                DeBug.WriteConsole("[ValidateSentinel]", "方法结束", DebugLevel.Info, Config.Menu.GetBool("调试"));
            }
        }
Ejemplo n.º 19
0
        public override void useW(Obj_AI_Base target)
        {
            if (!W.IsReady() || current != SwallowedTarget.None)
            {
                return;
            }

            if (target.Distance(player) <= 250 && target.GetBuffCount("TahmKenchPDebuffCounter") == 3 && current == SwallowedTarget.None)
            {
                W.CastOnUnit(target);
            }
            else if (current == SwallowedTarget.None)
            {
                W.CastOnUnit(ObjectManager.Get <Obj_AI_Minion>().Where(x => x.IsEnemy).OrderBy(x => x.Distance(player)).First());
            }
            else if (current == SwallowedTarget.Minion)
            {
                W2.Cast(target.Position);
            }
        }
Ejemplo n.º 20
0
        private float GetComboDamage(Obj_AI_Base enemy)
        {
            float damage = 0;

            if (!ObjectManager.Player.IsWindingUp)
            {
                damage += (float)ObjectManager.Player.GetAutoAttackDamage(enemy, true);
            }

            if (enemy.HasBuff("tristanaecharge"))
            {
                damage += (float)(E.GetDamage(enemy) * (enemy.GetBuffCount("tristanaecharge") * 0.30)) + E.GetDamage(enemy);
            }

            if (R.isReadyPerfectly())
            {
                damage += R.GetDamage(enemy);
            }

            return(damage);
        }
Ejemplo n.º 21
0
        public bool HasBuff(Obj_AI_Base caster)
        {
            if (caster == null)
            {
                return(false);
            }

            if (!string.IsNullOrEmpty(this.DontHaveBuff))
            {
                if (caster.HasBuff(this.DontHaveBuff))
                {
                    return(false);
                }
            }

            if (this.RequireBuffs == null)
            {
                return(true);
            }

            return(this.RequireBuffs.Any(b => !string.IsNullOrEmpty(b.Name) && caster.GetBuffCount(b.Name) >= b.Count));
        }
Ejemplo n.º 22
0
        private float GetComboDamage(Obj_AI_Base enemy)
        {
            float damage = 0;

            if (!ObjectManager.Player.Spellbook.IsAutoAttacking)
            {
                damage += (float)ObjectManager.Player.GetAutoAttackDamage(enemy, true);
            }

            if (enemy.HasBuff("tristanaecharge"))
            {
                damage += (float)(_e.GetDamage(enemy) * (enemy.GetBuffCount("tristanaecharge") * 0.30)) +
                          _e.GetDamage(enemy);
            }

            if (_r.IsReadyPerfectly())
            {
                damage += _r.GetDamage(enemy);
            }

            return(damage);
        }
Ejemplo n.º 23
0
        public static float GetComboDamage(Obj_AI_Base enemy)
        {
            float damage = 0;

            if (!Orbwalker.IsAutoAttacking)
            {
                damage += ObjectManager.Player.GetAutoAttackDamage(enemy, true);
            }

            if (enemy.HasBuff("tristanaecharge"))
            {
                damage += (float)(spells[Spells.E].GetDamage(enemy) * (enemy.GetBuffCount("tristanaecharge") * 0.30)) +
                          spells[Spells.E].GetDamage(enemy);
            }

            if (spells[Spells.R].IsReady())
            {
                damage += spells[Spells.R].GetDamage(enemy);
            }

            return(damage);
        }
Ejemplo n.º 24
0
 private int GetWStacks(Obj_AI_Base target)
 {
     return target.GetBuffCount("varuswdebuff");
 }
Ejemplo n.º 25
0
 internal static int PassiveCount(Obj_AI_Base unit)
 {
     return(unit.GetBuffCount("dariushemo") > 0 ? unit.GetBuffCount("dariushemo") : 0);
 }
Ejemplo n.º 26
0
 private bool _ECanKill(Obj_AI_Base hero, Spell.Active _E)
 {
     var EDamage = Convert.ToSingle(hero.GetBuffCount("twitchdeadlyvenom")*
                                    (_EDamage[_E.Level] +
                                     ObjectManager.Player.TotalAttackDamage*0.25
                                     + ObjectManager.Player.TotalMagicalDamage*0.2));
     return ObjectManager.Player.CalculateDamageOnUnit(hero, DamageType.Physical, EDamage) > hero.Health;
 }
Ejemplo n.º 27
0
        public static double GetSummonerSpellDamage(
            this Obj_AI_Hero source,
            Obj_AI_Base target,
            SummonerSpell summonerSpell)
        {
            if (summonerSpell == SummonerSpell.Ignite)
            {
                return 50 + 20 * source.Level - (target.HPRegenRate / 5 * 3);
            }

            if (summonerSpell == SummonerSpell.Smite)
            {
                if (target is Obj_AI_Hero)
                {
                    var chillingSmite =
                        source.Spellbook.Spells.FirstOrDefault(h => h.Name.Equals("s5_summonersmiteplayerganker"));
                    var challengingSmite =
                        source.Spellbook.Spells.FirstOrDefault(h => h.Name.Equals("s5_summonersmiteduel"));

                    if (chillingSmite != null)
                    {
                        return 20 + 8 * source.Level;
                    }

                    if (target.GetBuffCount("gnarw") == 2)

                    if (challengingSmite != null)

                    {
                        return 54 + 6 * source.Level;
                    }
                }

                return
                    new double[]
                        { 390, 410, 430, 450, 480, 510, 540, 570, 600, 640, 680, 720, 760, 800, 850, 900, 950, 1000 }[
                            source.Level - 1];
            }

            return 0d;
        }
Ejemplo n.º 28
0
 public static int VayneWStacks(this Obj_AI_Base o)
 {
     return(o.GetBuffCount("vaynesilvereddebuff"));
 }
Ejemplo n.º 29
0
 internal static float GetDariusPassiveCount(Obj_AI_Base target)
 {
     return(target.GetBuffCount("DariusHemo") > 0 ? target.GetBuffCount("DariusHemo") : 0);
 }
Ejemplo n.º 30
0
        private float GetCustomDamage(Obj_AI_Base target)
        {
            var baseDamage = new[] { 20, 30, 40, 50, 60 };
            var additionalBaseDamage = new[] { 0.6f, 0.6f, 0.6f, 0.6f, 0.6f };

            var spearDamage = new[] { 5, 9, 14, 20, 27 };
            var additionalSpearDamage = new[] { 0.15f, 0.18f, 0.21f, 0.24f, 0.27f };

            var stacks = target.GetBuffCount("kalistaexpungemarker");

            var totalDamage = baseDamage[this.spells[SpellSlot.E].Level - 1]
                              + additionalBaseDamage[this.spells[SpellSlot.E].Level - 1]
                              * ObjectManager.Player.TotalAttackDamage()
                              + (stacks - 1)
                              * (spearDamage[this.spells[SpellSlot.E].Level - 1]
                                 + additionalSpearDamage[this.spells[SpellSlot.E].Level - 1]
                                 * ObjectManager.Player.TotalAttackDamage());

            return 100
                   / (100 + (target.Armor * ObjectManager.Player.PercentArmorPenetrationMod)
                      - ObjectManager.Player.FlatArmorPenetrationMod) * totalDamage;
        }
Ejemplo n.º 31
0
 public static bool ECanKill(this Obj_AI_Base target)
 {
     if (target.HasBuff("TristanaECharge"))
     {
         if (target.isKillableAndValidTarget(LeagueSharp.Common.Damage.LSGetSpellDamage(ObjectManager.Player, target, SpellSlot.E) * (target.GetBuffCount("TristanaECharge") * 0.30) + LeagueSharp.Common.Damage.LSGetSpellDamage(ObjectManager.Player, target, SpellSlot.E), DamageType.Physical))
         {
             return(true);
         }
         return(false);
     }
     return(false);
 }
Ejemplo n.º 32
0
 public static int GetRendCount(Obj_AI_Base target)
 {
     var count = target.GetBuffCount("kalistaexpungemarker");
     return target.GetBuffCount("kalistaexpungemarker") < 2 ? count + 1 : count;
 }
Ejemplo n.º 33
0
 public static float QHealing(Obj_AI_Base target)
 {
     return target.GetBuffCount("Starlight") * ((10 + (10 * Q.Level)) + (0.2f * Program.Champion.FlatMagicDamageMod) + (0.015f * BonusHealth()));
 }
Ejemplo n.º 34
0
 private static bool HaveW(Obj_AI_Base target, bool onlyStun = false)
 {
     return target.HasBuff("KennenMarkOfStorm") && (!onlyStun || target.GetBuffCount("KennenMarkOfStorm") == 2);
 }
Ejemplo n.º 35
0
 private bool CanKill(Obj_AI_Base target, bool includePassiveDamage = true)
 {
     if (CustomCalculation)
     {
         var targetBuffCountKs = target.GetBuffCount("twitchdeadlyvenom");
         if (targetBuffCountKs == 0) return false;
         return (includePassiveDamage ? GetPassiveAndActivateDamage(target, targetBuffCountKs) : GetActivateDamage(target, targetBuffCountKs)) > target.Health;
     }
     return IsKillable(target);
 }
Ejemplo n.º 36
0
 private static bool HaveW(Obj_AI_Base target, bool checkCanStun = false)
 {
     var buff = target.GetBuffCount("KennenMarkOfStorm");
     return buff != -1 && (!checkCanStun || buff == 2);
 }
Ejemplo n.º 37
0
 private static int GetWStacks(Obj_AI_Base target)
 {
     return(target.GetBuffCount("varuswdebuff"));
 }
Ejemplo n.º 38
0
        private static double GetExecuteDamage(Obj_AI_Base target)
        {
            if (target.GetBuffCount("TristanaECharge") != 0)
            {
                return (spells[Spells.E].GetDamage(target) * ((0.3 * target.GetBuffCount("TristanaECharge") + 1))
                        + (Player.TotalAttackDamage()) + (Player.TotalMagicalDamage * 0.5));
            }

            return 0;
        }
Ejemplo n.º 39
0
 public static int GetBuffCount(Obj_AI_Base target)
 {
     return target.GetBuffCount("kalistaexpungemarker") < 2 ? target.GetBuffCount("kalistaexpungemarker") + 1 : target.GetBuffCount("kalistaexpungemarker");
 }
Ejemplo n.º 40
0
 internal static bool isWillDeadByTristanaE(this Obj_AI_Base target)
 {
     if (ObjectManager.Player.ChampionName == "Tristana")
     {
         if (target.HasBuff("tristanaecharge"))
         {
             if (target.isKillableAndValidTarget((float)(Damage.GetSpellDamage(ObjectManager.Player, target, SpellSlot.E) * (target.GetBuffCount("tristanaecharge") * 0.30)) + Damage.GetSpellDamage(ObjectManager.Player, target, SpellSlot.E)))
             {
                 return(true);
             }
         }
     }
     return(false);
 }
Ejemplo n.º 41
0
        private float GetComboDamage(Obj_AI_Base enemy)
        {
            float damage = 0;

            if (!ObjectManager.Player.IsWindingUp)
            {
                damage += (float)ObjectManager.Player.GetAutoAttackDamage(enemy, true);
            }

            if (enemy.HasBuff("tristanaecharge"))
            {
                damage += (float)(E.GetDamage(enemy) * (enemy.GetBuffCount("tristanaecharge") * 0.30)) + E.GetDamage(enemy);
            }

            if (R.isReadyPerfectly())
            {
                damage += R.GetDamage(enemy);
            }

            return damage;
        }
Ejemplo n.º 42
0
        private static void TryEThird(Obj_AI_Base Target)
        {
            if (!(Target is Obj_AI_Hero) || !(spells[SpellSlot.E].IsReady()) || !(Target.IsValidTarget(spells[SpellSlot.E].Range)))
            {
                return;
            }

            if (Target.GetBuffCount("vaynesilvereddebuff") == 1 && VHRMenu["dz191.vhr.hybrid"]["eThird"].GetValue<MenuBool>().Value)
            {
                spells[SpellSlot.E].Cast(Target);
            }
        }
Ejemplo n.º 43
0
        private static void ValidateSentinel(Obj_AI_Base sentinel)
        {
            if (sentinel.Health == 2 && sentinel.GetBuffCount("kalistaw") == 1)
            {
                if (!ActiveSentinels.ContainsKey(SentLocation.Item1))
                {
                    ActiveSentinels.Add(SentLocation.Item1, new Dictionary<SentinelLocations, Obj_AI_Base>());
                }
                ActiveSentinels[SentLocation.Item1].Remove(SentLocation.Item2);
                ActiveSentinels[SentLocation.Item1].Add(SentLocation.Item2, sentinel);

                SentLocation = null;
                RecalculateOpenLocations();
            }
        }
Ejemplo n.º 44
0
 public static bool HasWBuff(this Obj_AI_Base target)
 {
     return(target.GetBuffCount("VayneSilverDebuff") == 2);
 }
Ejemplo n.º 45
0
 internal static int PassiveCount(Obj_AI_Base unit)
 {
     return unit.GetBuffCount("dariushemo") > 0 ? unit.GetBuffCount("dariushemo") : 0;
 }
Ejemplo n.º 46
0
 private double GetEDamage(Obj_AI_Base target)
 {
     if (target.GetBuffCount("TristanaECharge") != 0)
     {
         return (Player.GetSpellDamage(target, SpellSlot.E)*((0.3*target.GetBuffCount("TristanaECharge") + 1))
                 + (Player.TotalAttackDamage) + (Player.TotalMagicalDamage*0.5));
     }
     return 0;
 }
Ejemplo n.º 47
0
 private int GetEStackCount(Obj_AI_Base target)
 {
     return(target.HasBuff("TwitchDeadlyVenom") ? target.GetBuffCount("TwitchDeadlyVenom") : 0);
 }
Ejemplo n.º 48
0
 public static float GetPoisonStacks(this Obj_AI_Base target)
 {
     return(target.GetBuffCount("TwitchDeadlyVenom"));
 }
Ejemplo n.º 49
0
 public static bool CanStun(Obj_AI_Base target)
 {
     return(target.GetBuffCount("KennenMarkOfStorm") == 2);
 }
Ejemplo n.º 50
0
 public static bool hasE(Obj_AI_Base target)
 {
     return target.GetBuffCount("kalistaexpungemarker") > 0;
 }
Ejemplo n.º 51
0
 private static int GetBuffCount(Obj_AI_Base target) => target.GetBuffCount("VarusWDebuff");
Ejemplo n.º 52
0
        public static float GetComboDamage(Obj_AI_Base enemy)
        {
            float damage = 0;

            if (!ObjectManager.Player.Spellbook.IsAutoAttacking)
            {
                damage += ObjectManager.Player.GetAutoAttackDamage(enemy, true);
            }

            if (enemy.HasBuff("tristanaecharge"))
            {
                damage += (float)(spells[Spells.E].GetDamage(enemy) * (enemy.GetBuffCount("tristanaecharge") * 0.30)) +
                          spells[Spells.E].GetDamage(enemy);
            }

            if (spells[Spells.R].IsReady())
            {
                damage += spells[Spells.R].GetDamage(enemy);
            }

            return damage;
        }
Ejemplo n.º 53
0
 public static bool Has2WStacks(Obj_AI_Base target)
 =>
     target.HasBuff("vaynesilvereddebuff") &&
     target.GetBuffCount("vaynesilvereddebuff") == 2;
Ejemplo n.º 54
0
        /// <summary>
        ///     Checks if the given target is killable
        /// </summary>
        /// <param name="target">
        ///     The Target
        /// </param>
        /// <returns>
        ///     The <see cref="bool" />.
        /// </returns>
        public static bool IsRendKillable(this Obj_AI_Base target)
        {
            if (target.IsInvulnerable || !target.HasBuff("kalistaexpungemarker"))
            {
                return(false);
            }

            double baseDamage = SpellManager.Spell[SpellSlot.E].GetDamage(target);

            // Exhaust
            if (ObjectManager.Player.HasBuff("SummonerExhaust"))
            {
                baseDamage *= 0.6;
            }

            // Urgot P
            if (ObjectManager.Player.HasBuff("urgotentropypassive"))
            {
                baseDamage *= 0.85;
            }

            // Bond Of Stone
            var bondofstoneBuffCount = target.GetBuffCount("MasteryWardenOfTheDawn");

            if (bondofstoneBuffCount > 0)
            {
                baseDamage *= 1 - (0.06 * bondofstoneBuffCount);
            }

            // Phantom Dancer
            var phantomdancerBuff = ObjectManager.Player.GetBuff("itemphantomdancerdebuff");

            if (phantomdancerBuff != null && phantomdancerBuff.Caster == target)
            {
                baseDamage *= 0.88;
            }

            // Alistar R
            if (target.HasBuff("FerociousHowl"))
            {
                baseDamage *= 0.6 - new[] { 0.1, 0.2, 0.3 }[target.Spellbook.GetSpell(SpellSlot.R).Level - 1];
            }

            // Amumu E
            if (target.HasBuff("Tantrum"))
            {
                baseDamage -= new[] { 2, 4, 6, 8, 10 }[target.Spellbook.GetSpell(SpellSlot.E).Level - 1];
            }

            // Braum E
            if (target.HasBuff("BraumShieldRaise"))
            {
                baseDamage *= 1
                              - new[] { 0.3, 0.325, 0.35, 0.375, 0.4 }[target.Spellbook.GetSpell(SpellSlot.E).Level - 1];
            }

            // Galio R
            if (target.HasBuff("GalioIdolOfDurand"))
            {
                baseDamage *= 0.5;
            }

            // Garen W
            if (target.HasBuff("GarenW"))
            {
                baseDamage *= 0.7;
            }

            // Gragas W
            if (target.HasBuff("GragasWSelf"))
            {
                baseDamage *= 1
                              - new[] { 0.1, 0.12, 0.14, 0.16, 0.18 }[target.Spellbook.GetSpell(SpellSlot.W).Level - 1];
            }

            /*
             * // Kassadin P
             * if (target.HasBuff("VoidStone") && damageType == DamageType.Magical)
             * {
             *  baseDamage *= 0.85;
             * }
             */

            // Katarina E
            if (target.HasBuff("KatarinaEReduction"))
            {
                baseDamage *= 0.85;
            }

            // Maokai R
            if (target.HasBuff("MaokaiDrainDefense"))
            {
                baseDamage *= 0.8;
            }

            // MasterYi W
            if (target.HasBuff("Meditate"))
            {
                baseDamage *= 1 - new[] { 0.5, 0.55, 0.6, 0.65, 0.7 }[target.Spellbook.GetSpell(SpellSlot.W).Level - 1];
            }

            // Urgot R
            if (target.HasBuff("urgotswapdef"))
            {
                baseDamage *= 1 - new[] { 0.3, 0.4, 0.5 }[target.Spellbook.GetSpell(SpellSlot.R).Level - 1];
            }

            // Yorick P
            if (target.HasBuff("YorickUnholySymbiosis"))
            {
                baseDamage *= 1
                              - (ObjectManager.Get <Obj_AI_Minion>()
                                 .Count(
                                     g =>
                                     g.Team == target.Team &&
                                     (g.Name.Equals("Clyde") || g.Name.Equals("Inky") || g.Name.Equals("Blinky") ||
                                      (g.HasBuff("yorickunholysymbiosis") &&
                                       g.GetBuff("yorickunholysymbiosis").Caster == target))) * 0.05);
            }

            if (target is Obj_AI_Minion)
            {
                if (target.Name.Contains("Baron"))
                {
                    baseDamage *= 0.5f;
                }
            }

            return((float)baseDamage > target.GetHealthWithShield());
        }
Ejemplo n.º 55
0
 private static int GetEStacks(Obj_AI_Base target)
 {
     return HasEBuff(target) ? 3 : target.GetBuffCount("TristanaECharge");
 }
Ejemplo n.º 56
0
        private static float ComboDamage(Obj_AI_Base enemy)
        {
            var damage = Player.Instance.GetAutoAttackDamage(enemy);

            if (_w.IsReady())
            {
                damage += Player.Instance.GetSpellDamage(enemy, SpellSlot.W);
            }

            if (_e.IsReady())
            {
                if (enemy.HasBuff("tristanaecharge"))
                {
                    damage += Player.Instance.GetSpellDamage(enemy, SpellSlot.E) +
                              Player.Instance.GetSpellDamage(enemy, SpellSlot.E)*
                              (enemy.GetBuffCount("tristanaecharge")*.30f);
                }
            }

            if (_r.IsReady())
            {
                damage += Player.Instance.GetSpellDamage(enemy, SpellSlot.R);
            }

            return damage;
        }
Ejemplo n.º 57
0
// Damage

        public static float EDamage(Obj_AI_Base target)
        {
            float Edamage = 0;

            if (target.HasBuff("tristanaecharge"))
            {
                Edamage += (float)(Player.Instance.GetSpellDamage(target, SpellSlot.E) * (target.GetBuffCount("tristanaecharge") * 0.30)) + Player.Instance.GetSpellDamage(target, SpellSlot.E);
            }

            return(Edamage);
        }
Ejemplo n.º 58
0
 private static int GetPassiveCount(Obj_AI_Base target)
 {
     return(target.HasBuff("varuswdebuff") ? target.GetBuffCount("varuswdebuff") : 0);
 }
Ejemplo n.º 59
0
 public static bool hasE(Obj_AI_Base target)
 {
     return(target.GetBuffCount("kalistaexpungemarker") > 0);
 }
Ejemplo n.º 60
0
 public static bool CanKill(Obj_AI_Base target)
 {
     var targetBuffs = target.GetBuffCount("twitchdeadlyvenom");
     if (targetBuffs == 0) return false;
     return (float) GetPassiveAndActivateDamage(target, targetBuffs) > target.Health;
 }