Exemple #1
0
        //-------------------------------------SpellDamage(SpellSlot slot)--------------------------------------

        static float SpellDamage(Obj_AI_Base target, SpellSlot slot)
        {
            float damage = new float();

            if (slot == SpellSlot.R && target.HasBuff("garenpassiveenemytarget"))
            {
                return(EloBuddy.Player.Instance.CalculateDamageOnUnit(target, DamageType.True, RDamages[R.Level - 1] + (target.MaxHealth - target.Health) * RMissingHealth[R.Level - 1], true, true));
            }

            switch (slot)
            {
            case SpellSlot.Q:
                damage = Player.CalculateDamageOnUnit(target, DamageType.Physical, QDamages[Q.Level - 1] + 1.4f * Player.TotalAttackDamage, true, true);
                break;

            case SpellSlot.E:
                damage = Player.CalculateDamageOnUnit(target, DamageType.Physical, (EDamages[E.Level - 1] + EPercentADSpin[E.Level - 1] * Player.TotalAttackDamage) * Espins()) - 100;
                break;

            case SpellSlot.R:
                damage = EloBuddy.Player.Instance.CalculateDamageOnUnit(target, DamageType.Magical, RDamages[R.Level - 1] + (target.MaxHealth - target.Health) * RMissingHealth[R.Level - 1], true, true);
                break;
            }

            return(damage);
        }
Exemple #2
0
        private static float QCalc(Obj_AI_Minion m)
        {
            var _Targ = m;

            return(User.CalculateDamageOnUnit(m, DamageType.Physical,
                                              (float)(new[] { 0, 35, 55, 75, 95, 115 }[Program.Q.Level] +1.1f * User.FlatPhysicalDamageMod + 0.4f * User.FlatMagicDamageMod * (100.0f / (100.0f + _Targ.Armor)))));
        }
Exemple #3
0
        private static float GetComboDamage(AIHeroClient Enemy)
        {
            float Damage = 0;

            if (Q.IsReady())
            {
                Damage += (Player.GetSpellDamage(Enemy, SpellSlot.Q) * 2);
            }

            if (W.IsReady())
            {
                Damage += (Player.GetSpellDamage(Enemy, SpellSlot.W));
            }

            if (E.IsReady())
            {
                Damage += (Player.GetSpellDamage(Enemy, SpellSlot.E));
            }

            if (R.IsReady())
            {
                Damage += (Player.GetSpellDamage(Enemy, SpellSlot.R) * GetRCount());
            }

            if (Ignite != null && Ignite.IsReady())
            {
                Damage += DamageLibrary.GetSummonerSpellDamage(Player, Enemy, DamageLibrary.SummonerSpells.Ignite);
            }


            if (Player.HasBuff("itemmagicshankcharge"))
            {
                if (Player.GetBuff("itemmagicshankcharge").Count == 100)
                {
                    Damage += Player.CalculateDamageOnUnit(Enemy, DamageType.Magical, 100f + 0.1f * Player.FlatMagicDamageMod);
                }
            }

            if (Sheen.IsReady() && Sheen.IsOwned())
            {
                Damage += Player.GetAutoAttackDamage(Enemy) + EloBuddy.Player.Instance.BaseAttackDamage * 2;
            }

            if (Lich_Bane.IsReady() && Lich_Bane.IsOwned())
            {
                Damage += Player.GetAutoAttackDamage(Enemy) * 0.75f;
                Damage += Player.CalculateDamageOnUnit(Enemy, DamageType.Magical, Player.FlatMagicDamageMod * 0.5f);
            }

            Damage += Player.GetAutoAttackDamage(Enemy, true);
            Damage -= Enemy.AllShield;

            return(Damage);
        }
        public static float Q(Obj_AI_Base target)
        {
            float dmg = 25 + 45 * Program.Q.Level;

            dmg += 1.2f * (JarvanIV.TotalAttackDamage - JarvanIV.BaseAttackDamage);

            if (target.Type == GameObjectType.AIHeroClient)
            {
                dmg *= 1.33f;
            }

            return(JarvanIV.CalculateDamageOnUnit(target, DamageType.Physical, dmg));
        }
        public static float Q(Obj_AI_Base target)
        {
            float dmg = 45 + 25 * Program.Q.Level;

            dmg += 1.4f * (Kha.TotalAttackDamage - Kha.BaseAttackDamage);

            if (target.IsIsolated())
            {
                dmg *= 1.5f;
            }

            return(Kha.CalculateDamageOnUnit(target, DamageType.Physical, dmg));
        }
Exemple #6
0
        //------------------------------------|| Methods ||--------------------------------------

        //-------------------------------------GetQDamage()---------------------------------------

        float GetQDamage(Obj_AI_Base unit)
        {
            if (!unit.IsValidTarget())
            {
                return(0);
            }

            if (unit.IsMinion)
            {
                return(Player.CalculateDamageOnUnit(unit, DamageType.Physical, new[] { 0, 100, 160, 220, 280, 340 }[Q.Level] +Player.TotalAttackDamage, true, true));
            }

            return(Player.CalculateDamageOnUnit(unit, DamageType.Physical, new[] { 0, 25, 60, 95, 130, 165 }[Q.Level] +Player.TotalAttackDamage, true, true));
        }
Exemple #7
0
        public static float Q(Obj_AI_Base target, float chargeTime)
        {
            float dmg = 20 + 20 * Program.Q.Level;

            dmg += 0.6f * (Vi.TotalAttackDamage - Vi.BaseAttackDamage);
            dmg += (Math.Min(chargeTime, 1.25f) / 1.25f) * (20 + 20 * Program.Q.Level);

            if (target.Type == GameObjectType.AIHeroClient)
            {
                dmg *= 1.33f;
            }

            return(Vi.CalculateDamageOnUnit(target, DamageType.Physical, dmg));
        }
        public static AIHeroClient GetChampionTarget(float range, DamageType damagetype, bool isAlly = false, float ksdamage = -1f)
        {
            var herotype = EntityManager.Heroes.AllHeroes;
            var targets  = herotype
                           .OrderByDescending(a => a.HealthPercent)
                           .Where(a => a.IsValidTarget(range) && ((isAlly && a.IsAlly) || (!isAlly && a.IsEnemy)) &&
                                  !a.IsDead && !a.IsZombie &&
                                  TargetStatus(a) &&
                                  ((ksdamage > -1f && a.Health <= Champion.CalculateDamageOnUnit(a, damagetype, ksdamage)) || ksdamage == -1) &&
                                  !Champion.IsRecalling() &&
                                  a.Distance(Champion) <= range);

            return(TargetSelector.GetTarget(targets, damagetype));
        }
        private static double GetBaseUltSpellDamage(BaseUltSpell spell, AIHeroClient target)
        {
            var level = Player.Spellbook.GetSpell(spell.Slot).Level - 1;

            switch (spell.Name)
            {
            case "Jinx":
            {
                var damage = new float[] { 250, 350, 450 }[level] +
                new float[] { 25, 30, 35 }[level] / 100 * (target.MaxHealth - target.Health) +
                1 * Player.FlatPhysicalDamageMod;
                return(Player.CalculateDamageOnUnit(target, DamageType.Physical, damage));
            }

            case "Ezreal":
            {
                var damage = new float[] { 350, 500, 650 }[level] +0.9f * Player.FlatMagicDamageMod +
                1 * Player.FlatPhysicalDamageMod;
                return(Player.CalculateDamageOnUnit(target, DamageType.Magical, damage) * 0.7);
            }

            case "Ashe":
            {
                var damage = new float[] { 250, 425, 600 }[level] +1 * Player.FlatMagicDamageMod;
                return(Player.CalculateDamageOnUnit(target, DamageType.Magical, damage));
            }

            case "Draven":
            {
                var damage = new float[] { 175, 275, 375 }[level] +1.1f * Player.FlatPhysicalDamageMod;
                return(Player.CalculateDamageOnUnit(target, DamageType.Physical, damage) * 0.7);
            }

            case "Karthus":
            {
                var damage = new float[] { 250, 400, 550 }[level] +0.6f * Player.FlatMagicDamageMod;
                return(Player.CalculateDamageOnUnit(target, DamageType.Magical, damage));
            }

            case "Lux":
            {
                var damage = new float[] { 300, 400, 500 }[level] +0.75f * Player.FlatMagicDamageMod;
                return(Player.CalculateDamageOnUnit(target, DamageType.Magical, damage));
            }

            case "Xerath":
            {
                var damage = new float[] { 190, 245, 300 }[level] +0.43f * Player.FlatMagicDamageMod;
                return(Player.CalculateDamageOnUnit(target, DamageType.Magical, damage));
            }

            case "Ziggs":
            {
                var damage = new float[] { 250, 375, 500 }[level] +0.9f * Player.FlatMagicDamageMod;
                return(Player.CalculateDamageOnUnit(target, DamageType.Magical, damage));
            }
            }

            return(0);
        }
Exemple #10
0
        public float SpellDamage(Obj_AI_Base target, SpellSlot slot, float addedDamage = -20)
        {
            if (target == null || !target.IsValidTarget() || !_damages.Any(it => it.spell.Slot == slot))
            {
                return(0);
            }

            var damage = new float();

            foreach (var dmg in _damages.Where(it => it.spell.Slot == slot))
            {
                var BonusDamage = new float();

                if (dmg.scales != null)
                {
                    foreach (var scale in dmg.scales)
                    {
                        BonusDamage += scale.scaling[dmg.spell.Level] * GetProperty(scale.scalingType, target);
                    }
                }

                /*if (_echo.IsOwned() && _echo.ItemInfo.Stacks == 100 && dmg.dealtDamageType == DamageType.Magical)
                 * {
                 *  BonusDamage += 100 + (0.1f * GetProperty(ScalingTypes.AP));
                 * }*/

                if (dmg.applyOnHitEffects)
                {
                    if (_trinity.IsOwned() && (_trinity.IsReady() || Player.HasBuff("sheen")))
                    {
                        BonusDamage += 2 * Player.BaseAttackDamage;
                    }
                    else if (_sheen.IsOwned() && (_sheen.IsReady() || Player.HasBuff("sheen")))
                    {
                        BonusDamage += Player.BaseAttackDamage;
                    }

                    if (_iceborn.IsOwned() && ((_iceborn.IsReady() && !Player.HasBuff("itemfrozenfist")) || Player.HasBuff("itemfrozenfist")))
                    {
                        BonusDamage += 1.25f * Player.BaseAttackDamage;
                    }

                    /*if (_shiv.IsOwned() && _shiv.Stacks == 100)
                     * {
                     *  if (target.IsMinion)
                     *      BonusDamage += (154 / 17) * Player.Level + (66 - (154 / 17));
                     *      //f(x) = (154/17)x + (66 - (154/17))
                     *  else
                     *      BonusDamage += (70 / 17) * Player.Level + (30 - (70 / 17));
                     *      //f(x) = (70/17)x + (30 - (70/17))
                     * }*/
                }

                damage += Player.CalculateDamageOnUnit(target, dmg.dealtDamageType, dmg.baseDamage[dmg.spell.Level] + BonusDamage, dmg.isAbility, dmg.isAAorTargeted);
                damage += addedDamage;
            }

            return(damage);
        }
Exemple #11
0
        //---------------------------------------------SpellDamage()-----------------------------------------------

        static float SpellDamage(Obj_AI_Base target, SpellSlot slot)
        {
            switch (slot)
            {
            case SpellSlot.Q:
                return(Player.CalculateDamageOnUnit(target, DamageType.Physical, new float[] { 70, 110, 150, 190, 230 }[Q.Level - 1] +Player.FlatPhysicalDamageMod + 0.6f * Player.TotalMagicalDamage, true, true));

            case SpellSlot.W:
                return(Player.CalculateDamageOnUnit(target, DamageType.Magical, new float[] { 40, 75, 110, 145, 180 }[W.Level - 1] +0.6f * Player.TotalMagicalDamage, true, true));

            case SpellSlot.E:
                return(Player.CalculateDamageOnUnit(target, DamageType.Physical, new float[] { 50, 75, 100, 125, 150 }[E.Level - 1] +Player.FlatPhysicalDamageMod / 2));

            default:
                return(0);
            }
        }
Exemple #12
0
        //----------------------------SpellDamage(Obj_AI_Base target, SpellSlot slot)------------------------------

        static float SpellDamage(Obj_AI_Base target, SpellSlot slot)
        {
            switch (slot)
            {
            case SpellSlot.Q:
                return(Player.CalculateDamageOnUnit(target, DamageType.Magical, new float[] { 80, 135, 190, 245, 300 }[Q.Level - 1] +0.9f * Player.TotalMagicalDamage) - 30);

            case SpellSlot.W:
                return(Player.CalculateDamageOnUnit(target, DamageType.Magical, new float[] { 80, 160, 240, 320, 400 }[W.Level - 1] +1.1f * Player.TotalMagicalDamage) * 3 / 5);

            case SpellSlot.R:
                return(Player.CalculateDamageOnUnit(target, DamageType.Magical, new float[] { 300, 450, 600 }[R.Level - 1] +1.4f * Player.TotalMagicalDamage) - 30);

            default:
                return(0);
            }
        }
Exemple #13
0
        public static float GetItemDamage(this AIHeroClient source, Obj_AI_Base target, ItemId item)
        {
            switch (item)
            {
            case ItemId.Bilgewater_Cutlass:
                return(source.CalculateDamageOnUnit(target, DamageType.Magical, 100));

            case ItemId.Blade_of_the_Ruined_King:
                return(Math.Max(100, source.CalculateDamageOnUnit(target, DamageType.Physical, target.MaxHealth * 0.1f)));

            case ItemId.Frost_Queens_Claim:
                return(source.CalculateDamageOnUnit(target, DamageType.Magical, 50 + 5 * source.Level));

            case ItemId.Hextech_Gunblade:
                return(source.CalculateDamageOnUnit(target, DamageType.Magical, 150 + 0.4f * source.TotalMagicalDamage));

            case ItemId.Liandrys_Torment:
                return(source.CalculateDamageOnUnit(target, DamageType.Magical, target.Health * 0.2f * 3 * (target.CanMove ? 1 : 2)));

            case ItemId.Ravenous_Hydra_Melee_Only:
                return(source.CalculateDamageOnUnit(target, DamageType.Physical, 0.6f * source.TotalAttackDamage));

            case ItemId.Tiamat_Melee_Only:
                return(source.CalculateDamageOnUnit(target, DamageType.Physical, 0.6f * source.TotalAttackDamage));

            default:
                Logger.Log(LogLevel.Info, "Item id '{0}' not yet added to DamageLibrary.GetItemDamage!", item);
                break;
            }
            return(0);
        }
Exemple #14
0
 public static float Q(Obj_AI_Base target)
 {
     if (Yasuo.FlatCritChanceMod >= 1 && !Yasuo.HasItem(ItemId.Infinity_Edge))
     {
         return(Yasuo.CalculateDamageOnUnit(target, DamageType.Physical,
                                            (new float[] { 0, 20, 40, 60, 80, 100 }[Program.Q.Level] +(Yasuo.TotalAttackDamage * 1.5f))));
     }
     else if (Yasuo.FlatCritChanceMod >= 1 && Yasuo.HasItem(ItemId.Infinity_Edge))
     {
         return(Yasuo.CalculateDamageOnUnit(target, DamageType.Physical,
                                            (new float[] { 0, 20, 40, 60, 80, 100 }[Program.Q.Level] +(Yasuo.TotalAttackDamage * 1.87f))));
     }
     else
     {
         return(Yasuo.CalculateDamageOnUnit(target, DamageType.Physical,
                                            (new float[] { 0, 20, 40, 60, 80, 100 }[Program.Q.Level] +Yasuo.TotalAttackDamage)));
     }
 }
Exemple #15
0
        //------------------------SpellDamage(Obj_AI_Base target, SpellSlot slot)------------------------------

        static float SpellDamage(Obj_AI_Base target, SpellSlot slot)
        {
            switch (slot)
            {
            case SpellSlot.Q:
                return(Player.CalculateDamageOnUnit(target, DamageType.Magical, new int[] { 75, 115, 155, 195, 235 }[Q.Level - 1] +0.75f * Player.TotalMagicalDamage));

            case SpellSlot.W:
                return(Player.CalculateDamageOnUnit(target, DamageType.Magical, new int[] { 65, 95, 125, 15, 185 }[W.Level - 1] +new float[] { 0.4f, 0.5f, 0.6f, 0.7f, 0.8f }[W.Level - 1] *Player.TotalAttackDamage + 0.55f * Player.TotalMagicalDamage, true, true));

            case SpellSlot.E:
                return(Player.CalculateDamageOnUnit(target, DamageType.Magical, new int[] { 85, 125, 165, 205, 245 }[E.Level - 1] +0.6f * Player.TotalMagicalDamage));

            case SpellSlot.R:
                return(Player.CalculateDamageOnUnit(target, DamageType.Magical, new int[] { 80, 145, 210 }[R.Level - 1] +0.4f * Player.TotalMagicalDamage));

            default:
                return(0);
            }
        }
        public static float Q(Obj_AI_Base target)
        {
            float qdmg            = (-5 + (25 * Program.Q.Level)) + GP.TotalAttackDamage;
            bool  hasSheenBuff    = GP.HasBuff("sheen");
            bool  canUseSheenItem = GP.InventoryItems.Any(a => a.CanUseItem() && (a.Id == ItemId.Trinity_Force || a.Id == ItemId.Lich_Bane || a.Id == ItemId.Iceborn_Gauntlet || a.Id == ItemId.Sheen));

            if (canUseSheenItem || hasSheenBuff)
            {
                if (GP.HasItem(ItemId.Lich_Bane))
                {
                    qdmg += (0.75f * GP.BaseAttackDamage) + (0.5f * GP.FlatMagicDamageMod);
                }
                else if (GP.HasItem(ItemId.Trinity_Force))
                {
                    qdmg += (2f * GP.BaseAttackDamage);
                }
                else if (GP.HasItem(ItemId.Iceborn_Gauntlet))
                {
                    qdmg += GP.BaseAttackDamage;
                }
                else if (GP.HasItem(ItemId.Sheen))
                {
                    qdmg += GP.BaseAttackDamage;
                }
            }

            return(GP.CalculateDamageOnUnit(target, DamageType.Physical, qdmg));
        }
Exemple #17
0
        //-------------------------------------------SpellDamage()----------------------------------------------

        static float SpellDamage(Obj_AI_Base target, SpellSlot slot)
        {
            switch (slot)
            {
            case SpellSlot.Q:
                if (!Q.IsReady())
                {
                    return(0);
                }

                if (Item.HasItem(ItemId.Trinity_Force) && ((Trinity.IsReady() && !Player.HasBuff("sheen")) || Player.HasBuff("sheen")))
                {
                    return(Player.CalculateDamageOnUnit(target, DamageType.Physical, new float[] { 20, 50, 80, 110, 140 }[Q.Level - 1] +Player.TotalAttackDamage + 2 * Player.BaseAttackDamage, true, true));
                }
                if (Item.HasItem(ItemId.Sheen) && ((Sheen.IsReady() && !Player.HasBuff("sheen")) || Player.HasBuff("sheen")))
                {
                    return(Player.CalculateDamageOnUnit(target, DamageType.Physical, new float[] { 20, 50, 80, 110, 140 }[Q.Level - 1] +Player.TotalAttackDamage + Player.BaseAttackDamage, true, true));
                }
                return(Player.CalculateDamageOnUnit(target, DamageType.Physical, new float[] { 20, 50, 80, 110, 140 }[Q.Level - 1] +Player.TotalAttackDamage, true, true));

            case SpellSlot.W:
                return(Player.CalculateDamageOnUnit(target, DamageType.True, 15 * W.Level, true, true));

            case SpellSlot.E:
                return(Player.CalculateDamageOnUnit(target, DamageType.Magical, 40 * (E.Level + 1), true, true));

            case SpellSlot.R:
                return(Player.CalculateDamageOnUnit(target, DamageType.Physical, (40 * (R.Level + 1)) + Player.TotalMagicalDamage / 2 + Player.FlatPhysicalDamageMod * 0.6f));

            default:
                return(0);
            }
        }
Exemple #18
0
        public static float GetBaseUltSpellDamage(AIHeroClient target, AIHeroClient source,
                                                  float lastEstimatedTargetHealth)
        {
            var   level = ObjectManager.Player.Spellbook.GetSpell(SpellSlot.R).Level - 1;
            float dmg   = 0;

            if (source.ChampionName == "Jinx")
            {
                {
                    var damage = new float[] { 250, 350, 450 }[level] +
                    new float[] { 25, 30, 35 }[level] / 100 * (target.MaxHealth - lastEstimatedTargetHealth) +
                    ObjectManager.Player.FlatPhysicalDamageMod;
                    dmg = source.CalculateDamageOnUnit(target, DamageType.Physical, damage);
                }
            }
            if (source.ChampionName == "Ezreal")
            {
                {
                    var damage = new float[] { 350, 500, 650 }[level] +0.9f * ObjectManager.Player.FlatMagicDamageMod +
                    1 * ObjectManager.Player.FlatPhysicalDamageMod;
                    dmg = source.CalculateDamageOnUnit(target, DamageType.Magical, damage) * 0.7f;
                }
            }
            if (source.ChampionName == "Ashe")
            {
                {
                    var damage = new float[] { 250, 425, 600 }[level] +1 * ObjectManager.Player.FlatMagicDamageMod;
                    dmg = source.CalculateDamageOnUnit(target, DamageType.Magical, damage);
                }
            }
            if (source.ChampionName == "Draven")
            {
                {
                    var damage = new float[] { 175, 275, 375 }[level] +1.1f * ObjectManager.Player.FlatPhysicalDamageMod;
                    dmg = source.CalculateDamageOnUnit(target, DamageType.Physical, damage) * 0.7f;
                }
            }

            return(dmg * 0.925f);
        }
Exemple #19
0
 public static void LaneClear()
 {
     //Orbwalker.ForcedTarget = null;
     if (Logic._lastQ + 260 > Environment.TickCount)
     {
         return;
     }
     foreach (var minion in EntityManager.MinionsAndMonsters.EnemyMinions.Where(a => a.IsValidTarget(Spells._w.Range)))
     {
         if (MenuConfig.LaneQ && Spells._q.IsReady() && minion.Health <= Player.CalculateDamageOnUnit(minion, DamageType.Physical, QDamage()) && !Orbwalker.IsAutoAttacking)
         {
             ObjectManager.Player.Spellbook.CastSpell(SpellSlot.Q, minion.Position);
             Logic.CastHydra();
             return;
         }
         if (MenuConfig.LaneW && Spells._w.IsReady() && minion.Health <= Player.CalculateDamageOnUnit(minion, DamageType.Physical, WDamage()))
         {
             ObjectManager.Player.Spellbook.CastSpell(SpellSlot.W);
             return;
         }
     }
 }
Exemple #20
0
        private static double GetBaseUltSpellDamage(AIHeroClient target, AIHeroClient source)
        {
            var level = ObjectManager.Player.Spellbook.GetSpell(SpellSlot.R).Level - 1;

            if (source.ChampionName == "Jinx")
            {
                {
                    var damage = new float[] { 250, 350, 450 }[level] +
                    new float[] { 25, 30, 35 }[level] / 100 * (target.MaxHealth - target.Health) +
                    1 * ObjectManager.Player.FlatPhysicalDamageMod;
                    return(source.CalculateDamageOnUnit(target, DamageType.Physical, damage));
                }
            }
            if (source.ChampionName == "Ezreal")
            {
                {
                    var damage = new float[] { 350, 500, 650 }[level] +0.9f * ObjectManager.Player.FlatMagicDamageMod +
                    1 * ObjectManager.Player.FlatPhysicalDamageMod;
                    return(source.CalculateDamageOnUnit(target, DamageType.Magical, damage) * 0.7f);
                }
            }
            if (source.ChampionName == "Ashe")
            {
                {
                    var damage = new float[] { 250, 425, 600 }[level] +1 * ObjectManager.Player.FlatMagicDamageMod;
                    return(source.CalculateDamageOnUnit(target, DamageType.Magical, damage));
                }
            }
            if (source.ChampionName == "Draven")
            {
                {
                    var damage = new float[] { 175, 275, 375 }[level] +1.1f * ObjectManager.Player.FlatPhysicalDamageMod;
                    return(source.CalculateDamageOnUnit(target, DamageType.Physical, damage) * 0.7f);
                }
            }

            return(0);
        }
Exemple #21
0
 public float CalculateDamage(AIHeroClient target, AIHeroClient source = null)
 {
     if (source == null) source = Player.Instance;
     if (_spellSlot != SpellSlot.Unknown &&
         (!_onlyIfActive || _onlyIfActive && source.Spellbook.GetSpell(_spellSlot).State == SpellState.Ready))
     {
         return source.GetSpellDamage(target, _spellSlot, _stage);
     }
     if (_flatDamage != -1)
     {
         return source.CalculateDamageOnUnit(target, _damageType, _flatDamage);
     }
     return 0;
 }
Exemple #22
0
        //------------------------SpellDamage(Obj_AI_Base target, SpellSlot slot)------------------------------

        static float SpellDamage(Obj_AI_Base target, SpellSlot slot)
        {
            switch (slot)
            {
            case SpellSlot.Q:
                return(Player.CalculateDamageOnUnit(target, DamageType.Magical, new int[] { 65, 85, 105, 125, 145 }[Q.Level - 1] +Player.TotalMagicalDamage / 2));

            case SpellSlot.W:
                if (Orbwalker.ValidAzirSoldiers.Any() || W.IsReady())
                {
                    return(Player.CalculateDamageOnUnit(target, DamageType.Magical, new int[] { 50, 55, 60, 65, 70, 75, 80, 85, 90, 100, 110, 120, 130, 140, 150, 160, 170, 180 }[Player.Level - 1] +0.6f * Player.TotalMagicalDamage, true, true));
                }
                return(0);

            case SpellSlot.E:
                return(Player.CalculateDamageOnUnit(target, DamageType.Magical, 30 * (E.Level + 1) + 0.4f * Player.TotalMagicalDamage));

            case SpellSlot.R:
                return(Player.CalculateDamageOnUnit(target, DamageType.Magical, new int[] { 150, 225, 300 }[R.Level - 1] +0.6f * Player.TotalMagicalDamage));

            default:
                return(0);
            }
        }
        public static float Damage(AIHeroClient T)
        {
            float Damage = 0f;

            //Chat.Print(Player.Instance.TotalMagicalDamage * 0.511f); // Q and E // R - W
            //Chat.Print(Player.Instance.TotalMagicalDamage * 0.6f); // RQ and W
            //Chat.Print(Player.Instance.TotalMagicalDamage * 0.4f); // RE

            /*
             * Q = 55, 80, 105, 130, 155
             * W = 85, 125, 165, 205, 245
             * E = 40, 65, 90, 115, 140
             *
             * Q = 150, 275, 400
             * W = 125, 225, 325
             * E = 100, 160, 220
             */

            if (Q.IsReady())
            {
                Damage += T.CalculateDamageOnUnit(T, DamageType.Magical, new float[] { 55, 80, 105, 130, 155 }[Q.Level - 1] +Player.Instance.TotalMagicalDamage * 0.511f);
            }

            if (W.IsReady())
            {
                Damage += T.CalculateDamageOnUnit(T, DamageType.Magical, new float[] { 85, 125, 165, 205, 245 }[W.Level - 1] +Player.Instance.TotalMagicalDamage * 0.6f);
            }

            if (E.IsReady())
            {
                Damage += T.CalculateDamageOnUnit(T, DamageType.Magical, new float[] { 40, 65, 90, 115, 140 }[E.Level - 1] +Player.Instance.TotalMagicalDamage * 0.511f);
            }

            if (R.IsReady())
            {
                SpellSlot S = ReturnSlot(ComboBox(Settings.Combo, "SR"));

                switch (S)
                {
                case SpellSlot.Q:
                    Damage += T.CalculateDamageOnUnit(T, DamageType.Magical, new float[] { 150, 275, 400 }[R.Level - 1] +Player.Instance.TotalMagicalDamage * 0.6f);
                    break;

                case SpellSlot.W:
                    Damage += T.CalculateDamageOnUnit(T, DamageType.Magical, new float[] { 125, 225, 325 }[R.Level - 1] +Player.Instance.TotalMagicalDamage * 0.511f);
                    break;

                case SpellSlot.E:
                    Damage += T.CalculateDamageOnUnit(T, DamageType.Magical, new float[] { 100, 160, 220 }[R.Level - 1] +Player.Instance.TotalMagicalDamage * 0.4f);
                    break;
                }
            }

            return(Damage);
        }
Exemple #24
0
        void SmartR()
        {
            var target = TargetSelector.GetTarget(1400, DamageType.Physical);

            if (!target.IsValidTarget(Q.Range) || target == null)
            {
                return;
            }
            var rdamage = Player.CalculateDamageOnUnit(target, DamageType.Physical,
                                                       (new float[] { 0, 250, 475, 700 }[R.Level] +(2f * Player.FlatMagicDamageMod))) - target.FlatPhysicalReduction;

            if (R.IsReady() && CaitlynTheTrollMeNu.ComboR() && Player.CountEnemiesInRange(R.Range) == 1 && target.Distance(Player) >= 800 && rdamage >= target.Health && !target.IsInvulnerable)
            {
                R.Cast(target);
            }
        }
Exemple #25
0
 public float CalculateDamage(AIHeroClient target, AIHeroClient source = null)
 {
     if (source == null)
     {
         source = Player.Instance;
     }
     if (_spellSlot != SpellSlot.Unknown &&
         (!_onlyIfActive || _onlyIfActive && source.Spellbook.GetSpell(_spellSlot).State == SpellState.Ready))
     {
         return(source.GetSpellDamage(target, _spellSlot, _stage));
     }
     if (_flatDamage != -1)
     {
         return(source.CalculateDamageOnUnit(target, _damageType, _flatDamage));
     }
     return(0);
 }
Exemple #26
0
        public static float GetRealAaDmg(Obj_AI_Base targ)
        {
            if (!Azir)
            {
                return((float)Player.GetAutoAttackDamage(targ, true));
            }
            var solAround = SolidersAroundEnemy(targ);

            if (solAround == 0)
            {
                return((float)Player.GetAutoAttackDamage(targ));
            }
            int[] solBaseDmg = { 50, 55, 60, 65, 70, 75, 80, 85, 90, 95, 100, 110, 120, 130, 140, 150, 160, 170 };

            var solDmg = solBaseDmg[Player.Level - 1] + Player.FlatMagicDamageMod * 0.6f;

            return((float)Player.CalculateDamageOnUnit(targ, DamageType.Magical, solDmg + (solAround - 1) * solDmg * 0.25f));
        }
Exemple #27
0
        public static double getRDam(AIHeroClient target)
        {
            // thanks GOS
            if (target == null)
            {
                return(0f);
            }

            var rDam = 0f;

            if (target.HealthPercent > 33.3)
            {
                rDam = new[] { 175, 250, 325 }[_R.Level] +(.75f * Player.TotalMagicalDamage);
            }
            else
            {
                rDam = new[] { 350, 500, 650 }[_R.Level] +(1.5f * Player.TotalMagicalDamage);
            }

            //return rDam + ((0.015 * rDam) * (100 - ((target.Health / target.MaxHealth) * 100)));
            return(Player.CalculateDamageOnUnit(target, DamageType.Magical, (float)(rDam + ((0.015 * rDam) * (100 - ((target.Health / target.MaxHealth) * 100))))));
        }
Exemple #28
0
        static float GetComboDamage(AIHeroClient target)
        {
            var damage = 0d;

            int collisionCount = Q.GetPrediction(target).CollisionObjects.Count();

            if (Q.IsReady() && collisionCount < 1)
            {
                damage += Player.GetSpellDamage(target, SpellSlot.Q);
            }

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

            if (E.IsReady())
            {
                damage += Player.GetSpellDamage(target, SpellSlot.E);
            }

            if (R.IsReady())
            {
                damage += GetUltDmg((AIHeroClient)target);
            }
            if (Ignite != null && Ignite.IsReady())
            {
                damage += Player.GetSummonerSpellDamage(target, DamageLibrary.SummonerSpells.Ignite);
            }

            damage  = Player.CalculateDamageOnUnit(target, DamageType.Magical, (float)damage) - 20;
            damage += GetUltDmg((AIHeroClient)target);

            damage += GetPassiveDmg();

            return((float)damage);
        }
Exemple #29
0
        public static float GetBaseUltSpellDamage(AIHeroClient target, AIHeroClient source,
            float lastEstimatedTargetHealth)
        {
            var level = ObjectManager.Player.Spellbook.GetSpell(SpellSlot.R).Level - 1;
            float dmg = 0;

            if (source.ChampionName == "Jinx")
            { 
                {
                    var damage = new float[] {250, 350, 450}[level] +
                                 new float[] {25, 30, 35}[level]/100*(target.MaxHealth - lastEstimatedTargetHealth) +
                                 ObjectManager.Player.FlatPhysicalDamageMod;
                    dmg = source.CalculateDamageOnUnit(target, DamageType.Physical, damage);
                }
            }
            if (source.ChampionName == "Ezreal")
            {
                {
                    var damage = new float[] {350, 500, 650}[level] + 0.9f*ObjectManager.Player.FlatMagicDamageMod +
                                 1*ObjectManager.Player.FlatPhysicalDamageMod;
                    dmg = source.CalculateDamageOnUnit(target, DamageType.Magical, damage)*0.7f;
                }
            }
            if (source.ChampionName == "Ashe")
            {
                {
                    var damage = new float[] {250, 425, 600}[level] + 1*ObjectManager.Player.FlatMagicDamageMod;
                    dmg = source.CalculateDamageOnUnit(target, DamageType.Magical, damage);
                }
            }
            if (source.ChampionName == "Draven")
            {
                {
                    var damage = new float[] {175, 275, 375}[level] + 1.1f*ObjectManager.Player.FlatPhysicalDamageMod;
                    dmg = source.CalculateDamageOnUnit(target, DamageType.Physical, damage)*0.7f;
                }
            }

            return dmg*0.925f;
        }
Exemple #30
0
 public static float QCalc(Obj_AI_Base target)
 {
     return(_Player.CalculateDamageOnUnit(target, DamageType.Physical,
                                          (float)(new[] { 0, 60, 105, 150, 195, 240 }[Program.Q.Level] +0.6f * _Player.FlatMagicDamageMod
                                                  )));
 }
 public static bool CalculateKs(Obj_AI_Base target, DamageType damagetype, float damage)
 {
     return((damage > -1f && target.Health <= Champion.CalculateDamageOnUnit(target, damagetype, damage)) || damage == -1);
 }
Exemple #32
0
 public static float QDamage(Obj_AI_Base target)
 {
     return(_player.CalculateDamageOnUnit(target, Q.DamageType, Q.GetSpellDamage(target), true, true));
 }
Exemple #33
0
        private static double GetBaseUltSpellDamage(AIHeroClient target, AIHeroClient source)
        {
            var level = ObjectManager.Player.Spellbook.GetSpell(SpellSlot.R).Level - 1;
            if (source.ChampionName == "Jinx")
            {
                {
                    var damage = new float[] { 250, 350, 450 }[level] +
                                 new float[] { 25, 30, 35 }[level] / 100 * (target.MaxHealth - target.Health) +
                                 1 * ObjectManager.Player.FlatPhysicalDamageMod;
                    return source.CalculateDamageOnUnit(target, DamageType.Physical, damage);
                }
            }
            if (source.ChampionName == "Ezreal")
            {
                {
                    var damage = new float[] { 350, 500, 650 }[level] + 0.9f * ObjectManager.Player.FlatMagicDamageMod +
                                 1 * ObjectManager.Player.FlatPhysicalDamageMod;
                    return source.CalculateDamageOnUnit(target, DamageType.Magical, damage) * 0.7f;
                }
            }
            if (source.ChampionName == "Ashe")
            {
                {
                    var damage = new float[] { 250, 425, 600 }[level] + 1 * ObjectManager.Player.FlatMagicDamageMod;
                    return source.CalculateDamageOnUnit(target, DamageType.Magical, damage);
                }
            }
            if (source.ChampionName == "Draven")
            {
                {
                    var damage = new float[] { 175, 275, 375 }[level] + 1.1f * ObjectManager.Player.FlatPhysicalDamageMod;
                    return source.CalculateDamageOnUnit(target, DamageType.Physical, damage) * 0.7f;
                }
            }

            return 0;
        }