Example #1
0
        /// <summary>
        /// Gets the hero average damage to the opposing team.
        /// </summary>
        /// <param name="player">The player.</param>
        /// <param name="Enemies">The enemies.</param>
        /// <returns></returns>
        public static float GetHeroAvgDamage(Obj_AI_Hero player, List<Obj_AI_Hero> Enemies)
        {
            var totalEnemies = Enemies.Count();
            if (totalEnemies == 0)
            {
                return -1;
            }
            var AADamage = Enemies.Aggregate(0, (current, s) => (int) (current + player.GetAutoAttackDamage(s) * 2));
            var QDamage = Enemies.Aggregate(0, (current, s) => (int)(current + (player.GetSpell(SpellSlot.Q).IsReady() ? player.GetSpellDamage(s, SpellSlot.Q) : 0f)));
            var WDamage = Enemies.Aggregate(0, (current, s) => (int)(current + (player.GetSpell(SpellSlot.W).IsReady() ? player.GetSpellDamage(s, SpellSlot.W) : 0f)));
            var EDamage = Enemies.Aggregate(0, (current, s) => (int)(current + (player.GetSpell(SpellSlot.E).IsReady() ? player.GetSpellDamage(s, SpellSlot.E) : 0f)));
            var RDamage = Enemies.Aggregate(0, (current, s) => (int)(current + (player.GetSpell(SpellSlot.R).IsReady() ? player.GetSpellDamage(s, SpellSlot.R) : 0f)));
            
            var itemsDamage = 0f;

            foreach (var item in player.InventoryItems)
            {
                foreach (var hero in Enemies)
                {
                    var itemID = item.Id;
                    switch (itemID)
                    {
                        case ItemId.Bilgewater_Cutlass:
                            itemsDamage +=
                                (float) player.GetItemDamage(hero, Damage.DamageItems.Bilgewater);
                            break;
                        case ItemId.Blade_of_the_Ruined_King:
                            itemsDamage += (float) player.GetItemDamage(hero, Damage.DamageItems.Botrk);
                            break;
                        case ItemId.Hextech_Gunblade:
                            itemsDamage += (float) player.GetItemDamage(hero, Damage.DamageItems.Hexgun);
                            break;
                        case ItemId.Frost_Queens_Claim:
                            itemsDamage +=
                                (float) player.GetItemDamage(hero, Damage.DamageItems.FrostQueenClaim);
                            break;
                        case ItemId.Tiamat_Melee_Only:
                            itemsDamage += player.IsMelee
                                ? (float) player.GetItemDamage(hero, Damage.DamageItems.Tiamat)
                                : 0f;
                            break;
                        case ItemId.Ravenous_Hydra_Melee_Only:
                            itemsDamage += player.IsMelee
                                ? (float) player.GetItemDamage(hero, Damage.DamageItems.Hydra)
                                : 0f;
                            break;
                        case ItemId.Liandrys_Torment:
                            itemsDamage +=
                                (float) player.GetItemDamage(hero, Damage.DamageItems.LiandrysTorment);
                            break;
                    }
                }
                
            }

            var totalDamage = AADamage + QDamage + WDamage + EDamage + RDamage + itemsDamage;

            return (float) totalDamage / totalEnemies;
        }
Example #2
0
 public static float GetAdOverFive(Obj_AI_Hero hero)
 {
     double basicDmg = 0;
     int attacks = (int) Math.Floor(hero.AttackSpeedMod * 5);
     for (int i = 0; i < attacks; i++)
     {
         if (hero.Crit > 0)
         {
             basicDmg += hero.GetAutoAttackDamage(player) * (1 + hero.Crit / attacks);
         }
         else
         {
             basicDmg += hero.GetAutoAttackDamage(player);
         }
     }
     return (float) basicDmg;
 }
        /// <summary>
        /// Gets the hero average damage to the opposing team.
        /// </summary>
        /// <param name="player">The player.</param>
        /// <param name="Enemies">The enemies.</param>
        /// <returns></returns>
        public static float GetHeroAvgDamage(Obj_AI_Hero player, List<Obj_AI_Hero> Enemies)
        {
            var totalEnemies = Enemies.Count();
            if (totalEnemies == 0)
            {
                return -1;
            }
            var AADamage = Enemies.Aggregate(0, (current, s) => (int) (current + player.GetAutoAttackDamage(s)));
            var QDamage = Enemies.Aggregate(0, (current, s) => (int)(current + (player.GetSpell(SpellSlot.Q).IsReady() ? player.GetSpellDamage(s, SpellSlot.Q) : 0)));
            var WDamage = Enemies.Aggregate(0, (current, s) => (int)(current + (player.GetSpell(SpellSlot.W).IsReady() ? player.GetSpellDamage(s, SpellSlot.W) : 0)));
            var EDamage = Enemies.Aggregate(0, (current, s) => (int)(current + (player.GetSpell(SpellSlot.E).IsReady() ? player.GetSpellDamage(s, SpellSlot.E) : 0)));
            var RDamage = Enemies.Aggregate(0, (current, s) => (int)(current + (player.GetSpell(SpellSlot.R).IsReady() ? player.GetSpellDamage(s, SpellSlot.R) : 0)));

            var totalDamage = AADamage + QDamage + WDamage + EDamage + RDamage;

            return (float) totalDamage / totalEnemies;
        }
Example #4
0
        public static double GetAlliesComboDmg(Obj_AI_Hero target, Obj_AI_Hero ally)
        {
            var SpellSlots = new List<SpellSlot>();
            double dmg = 0;
            #region SpellSots
            SpellSlots.Add(SpellSlot.Q);
            SpellSlots.Add(SpellSlot.W);
            SpellSlots.Add(SpellSlot.E);
            SpellSlots.Add(SpellSlot.R);
            #endregion

            foreach (var slot in SpellSlots)
            {
                var spell = ally.Spellbook.GetSpell(slot);

                dmg += ally.GetSpellDamage(target, slot);
                dmg += ally.GetAutoAttackDamage(target);
            }

            return dmg;
        }
Example #5
0
        public static float GetChampDmgToMe(Obj_AI_Hero enemy)
        {
            double result = 0;
            double basicDmg = 0;
            int attacks = (int) Math.Floor(enemy.AttackSpeedMod * 5);
            for (int i = 0; i < attacks; i++)
            {
                if (enemy.Crit > 0)
                {
                    basicDmg += enemy.GetAutoAttackDamage(player) * (1 + enemy.Crit / attacks);
                }
                else
                {
                    basicDmg += enemy.GetAutoAttackDamage(player);
                }
            }
            result += basicDmg;
            var spells = enemy.Spellbook.Spells;
            foreach (var spell in spells)
            {
                var t = spell.CooldownExpires - Game.Time;
                if (t < 0.5)
                {
                    switch (enemy.SkinName)
                    {
                        case "Ahri":
                            if (spell.Slot == SpellSlot.Q)
                            {
                                result += (Damage.GetSpellDamage(enemy, player, spell.Slot));
                                result += (Damage.GetSpellDamage(enemy, player, spell.Slot, 1));
                            }
                            else
                            {
                                result += Damage.GetSpellDamage(enemy, player, spell.Slot);
                            }
                            break;
                        case "Akali":
                            if (spell.Slot == SpellSlot.R)
                            {
                                result += (Damage.GetSpellDamage(enemy, player, spell.Slot) * spell.Ammo);
                            }
                            else if (spell.Slot == SpellSlot.Q)
                            {
                                result += (Damage.GetSpellDamage(enemy, player, spell.Slot));
                                result += (Damage.GetSpellDamage(enemy, player, spell.Slot, 1));
                            }
                            else
                            {
                                result += Damage.GetSpellDamage(enemy, player, spell.Slot);
                            }
                            break;
                        case "Amumu":
                            if (spell.Slot == SpellSlot.W)
                            {
                                result += (Damage.GetSpellDamage(enemy, player, spell.Slot) * 5);
                            }
                            else
                            {
                                result += Damage.GetSpellDamage(enemy, player, spell.Slot);
                            }
                            break;
                        case "Cassiopeia":
                            if (spell.Slot == SpellSlot.Q || spell.Slot == SpellSlot.E || spell.Slot == SpellSlot.W)
                            {
                                result += (Damage.GetSpellDamage(enemy, player, spell.Slot) * 2);
                            }
                            else
                            {
                                result += Damage.GetSpellDamage(enemy, player, spell.Slot);
                            }
                            break;
                        case "Fiddlesticks":
                            if (spell.Slot == SpellSlot.W || spell.Slot == SpellSlot.E)
                            {
                                result += (Damage.GetSpellDamage(enemy, player, spell.Slot) * 5);
                            }
                            else
                            {
                                result += Damage.GetSpellDamage(enemy, player, spell.Slot);
                            }
                            break;
                        case "Garen":
                            if (spell.Slot == SpellSlot.E)
                            {
                                result += (Damage.GetSpellDamage(enemy, player, spell.Slot) * 3);
                            }
                            else
                            {
                                result += Damage.GetSpellDamage(enemy, player, spell.Slot);
                            }
                            break;
                        case "Irelia":
                            if (spell.Slot == SpellSlot.W)
                            {
                                result += (Damage.GetSpellDamage(enemy, player, spell.Slot) * attacks);
                            }
                            else
                            {
                                result += Damage.GetSpellDamage(enemy, player, spell.Slot);
                            }
                            break;
                        case "Karthus":
                            if (spell.Slot == SpellSlot.Q)
                            {
                                result += (Damage.GetSpellDamage(enemy, player, spell.Slot) * 4);
                            }
                            else
                            {
                                result += Damage.GetSpellDamage(enemy, player, spell.Slot);
                            }
                            break;
                        case "KogMaw":
                            if (spell.Slot == SpellSlot.W)
                            {
                                result += (Damage.GetSpellDamage(enemy, player, spell.Slot) * attacks);
                            }
                            else
                            {
                                result += Damage.GetSpellDamage(enemy, player, spell.Slot);
                            }
                            break;
                        case "LeeSin":
                            if (spell.Slot == SpellSlot.Q)
                            {
                                result += Damage.GetSpellDamage(enemy, player, spell.Slot);
                                result += Damage.GetSpellDamage(enemy, player, spell.Slot, 1);
                            }
                            else
                            {
                                result += Damage.GetSpellDamage(enemy, player, spell.Slot);
                            }
                            break;
                        case "Lucian":
                            if (spell.Slot == SpellSlot.R)
                            {
                                result += Damage.GetSpellDamage(enemy, player, spell.Slot) * 4;
                            }
                            else
                            {
                                result += Damage.GetSpellDamage(enemy, player, spell.Slot);
                            }
                            break;
                        case "Nunu":
                            if (spell.Slot != SpellSlot.R && spell.Slot != SpellSlot.Q)
                            {
                                result += Damage.GetSpellDamage(enemy, player, spell.Slot);
                            }
                            else
                            {
                                result += Damage.GetSpellDamage(enemy, player, spell.Slot);
                            }
                            break;
                        case "MasterYi":
                            if (spell.Slot != SpellSlot.E)
                            {
                                result += Damage.GetSpellDamage(enemy, player, spell.Slot) * attacks;
                            }
                            else
                            {
                                result += Damage.GetSpellDamage(enemy, player, spell.Slot);
                            }
                            break;
                        case "MonkeyKing":
                            if (spell.Slot != SpellSlot.R)
                            {
                                result += Damage.GetSpellDamage(enemy, player, spell.Slot) * 4;
                            }
                            else
                            {
                                result += Damage.GetSpellDamage(enemy, player, spell.Slot);
                            }
                            break;
                        case "Pantheon":
                            if (spell.Slot == SpellSlot.E)
                            {
                                result += Damage.GetSpellDamage(enemy, player, spell.Slot) * 3;
                            }
                            else if (spell.Slot == SpellSlot.R)
                            {
                                result += 0;
                            }
                            else
                            {
                                result += Damage.GetSpellDamage(enemy, player, spell.Slot);
                            }

                            break;
                        case "Rammus":
                            if (spell.Slot == SpellSlot.R)
                            {
                                result += Damage.GetSpellDamage(enemy, player, spell.Slot) * 6;
                            }
                            else
                            {
                                result += Damage.GetSpellDamage(enemy, player, spell.Slot);
                            }
                            break;
                        case "Riven":
                            if (spell.Slot == SpellSlot.Q)
                            {
                                result += RivenDamageQ(spell, enemy, player);
                            }
                            else
                            {
                                result += Damage.GetSpellDamage(enemy, player, spell.Slot);
                            }
                            break;
                        case "Viktor":
                            if (spell.Slot == SpellSlot.R)
                            {
                                result += Damage.GetSpellDamage(enemy, player, spell.Slot);
                                result += Damage.GetSpellDamage(enemy, player, spell.Slot, 1) * 5;
                            }
                            else
                            {
                                result += Damage.GetSpellDamage(enemy, player, spell.Slot);
                            }
                            break;
                        case "Vladimir":
                            if (spell.Slot == SpellSlot.E)
                            {
                                result += Damage.GetSpellDamage(enemy, player, spell.Slot) * 2;
                            }
                            else
                            {
                                result += Damage.GetSpellDamage(enemy, player, spell.Slot);
                            }
                            break;
                        default:
                            result += Damage.GetSpellDamage(enemy, player, spell.Slot);
                            break;
                    }
                }
            }
            if (enemy.Spellbook.CanUseSpell(player.GetSpellSlot("summonerdot")) == SpellState.Ready)
            {
                result += enemy.GetSummonerSpellDamage(player, Damage.SummonerSpell.Ignite);
            }
            foreach (var minions in
                ObjectManager.Get<Obj_AI_Minion>()
                    .Where(i => i.Distance(player.Position) < 750 && i.IsMinion && !i.IsAlly && !i.IsDead))
            {
                result += minions.GetAutoAttackDamage(player, false);
            }
            return (float) result;
        }
Example #6
0
        private static void Game_OnGameLoad(EventArgs args)
        {
            Player = ObjectManager.Player;
            if (Player.BaseSkinName != ChampionName) return;

            //Create the spells

            Q.SetSkillshot(0.25f, 40, 1200, true, SkillshotType.SkillshotLine);

            //Create the menu
            Config = new Menu(ChampionName, ChampionName, true);

            var targetSelectorMenu = new Menu("Target Selector", "Target Selector");
            SimpleTs.AddToMenu(targetSelectorMenu);
            Config.AddSubMenu(targetSelectorMenu);

            //Orbwalker submenu
            Config.AddSubMenu(new Menu("Orbwalking", "Orbwalking"));

            //Load the orbwalker and add it to the submenu.
            Orbwalker = new Orbwalking.Orbwalker(Config.SubMenu("Orbwalking"));

            Config.AddSubMenu(new Menu("Combo", "Combo"));
            Config.SubMenu("Combo").AddItem(new MenuItem("ComboQ", "Use Q?").SetValue(true));
            Config.SubMenu("Combo").AddItem(new MenuItem("ComboR","Use R?").SetValue(true));
            Config.SubMenu("Combo").AddItem(new MenuItem("ComboActive", "Combo!").SetValue(new KeyBind(32, KeyBindType.Press)));

            Config.AddSubMenu(new Menu("Harass", "Harass"));
            Config.SubMenu("Harass").AddItem(new MenuItem("UseQHarass", "Use Q").SetValue(true));
            Config.SubMenu("Harass").AddItem(new MenuItem("QMana", "Min Mana Q").SetValue(new Slider(40, 1, 100)));
            Config.SubMenu("Harass").AddItem(new MenuItem("HarassActive", "Harass!").SetValue(new KeyBind("C".ToCharArray()[0], KeyBindType.Press)));

            //Damage after combo:
            var eDamage = new MenuItem("DamageAfterCombo", "HP After Used Q+2AA").SetValue(true);
            Utility.HpBarDamageIndicator.DamageToUnit += hero => (float)(Player.GetSpellDamage(hero, SpellSlot.Q) + (Player.GetAutoAttackDamage(hero)*2));
            Utility.HpBarDamageIndicator.Enabled = eDamage.GetValue<bool>();
            eDamage.ValueChanged += delegate(object sender, OnValueChangeEventArgs eventArgs)
            {
                Utility.HpBarDamageIndicator.Enabled = eventArgs.GetNewValue<bool>();
            };

            Config.AddSubMenu(new Menu("KS", "KS"));
            Config.SubMenu("KS").AddItem(new MenuItem("StealE","Steal With E").SetValue(true));
            Config.AddSubMenu(new Menu("Misc", "Misc"));
            Config.SubMenu("Misc").AddItem(new MenuItem("eStacks", "E Stacks *Broken").SetValue(new Slider(10, 2, 30)));
            Config.SubMenu("Misc").AddItem(new MenuItem("eMana", "Min Mana E").SetValue(new Slider(40, 1, 100)));
            Config.SubMenu("Misc").AddItem(new MenuItem("safer", "Use R to save allies").SetValue(true));
            Config.SubMenu("Misc").AddItem(new MenuItem("savehp", "HP to Save %").SetValue(new Slider(40, 1, 100)));
            Config.SubMenu("Misc").AddItem(new MenuItem("Harasser", "Harass Allways").SetValue(true));
               // Config.AddItem(new MenuItem("packetCast", "Packet Cast").SetValue(true));
            Config.AddSubMenu(new Menu("Drawings", "Drawings"));
            Config.SubMenu("Drawings").AddItem(new MenuItem("QRange", "Q range").SetValue(new Circle(true, Color.FromArgb(255, 255, 255, 255))));
            Config.SubMenu("Drawings") .AddItem(new MenuItem("WRange", "W range").SetValue(new Circle(false, Color.FromArgb(255, 255, 255, 255))));
            Config.SubMenu("Drawings").AddItem(new MenuItem("RRange", "R range").SetValue(new Circle(false, Color.FromArgb(255, 255, 255, 255))));
            Config.SubMenu("Drawings").AddItem(eDamage);
            Config.AddToMainMenu();

            //Add the events we are going to use:
            Drawing.OnDraw += Drawing_OnDraw;
            Game.OnGameUpdate += Game_OnGameUpdate;
             GameObject.OnCreate += OnCreateObject;
             //   Orbwalking.BeforeAttack += OrbwalkingOnBeforeAttack;
            Game.PrintChat("<font color='#00FFFF'>>> Deniz Kalista v0.5 Loaded");
        }
Example #7
0
        private static float ComboDamage(Obj_AI_Hero src, Obj_AI_Hero dsc)
        {
            if (!src.IsValid || !dsc.IsValid) return 0f;
            float basicDmg = 0;
            int attacks = (int)Math.Floor(src.AttackSpeedMod*5);
            if (src.Crit>0)
            {

                basicDmg += (float)src.GetAutoAttackDamage(dsc) * attacks * (1 + src.Crit);
            }
            else
            {

                basicDmg += (float)src.GetAutoAttackDamage(dsc) * attacks;
            }
            float damage = basicDmg;
            var spells = src.Spellbook.Spells;

            foreach (var spell in spells)
            {
                var t = spell.CooldownExpires - Game.Time;
                if (spell.Level > 0 && t < 0.5 && Damage.GetSpellDamage(src, dsc, spell.Slot) > 0)
                {
                    switch (src.SkinName)
                    {
                                case "Ahri":
                                    if (spell.Slot == SpellSlot.Q)
                                    {
                                        damage += (float)(Damage.GetSpellDamage(src, dsc, spell.Slot));
                                        damage += (float)(Damage.GetSpellDamage(src, dsc, spell.Slot,1));
                                    }
                                    else damage += (float)Damage.GetSpellDamage(src, dsc, spell.Slot);
                                    break;
                                case "Akali":
                                    if (spell.Slot == SpellSlot.R)
                                    {
                                        damage += (float) (Damage.GetSpellDamage(src, dsc, spell.Slot)*spell.Ammo);
                                    }
                                    else if (spell.Slot == SpellSlot.Q)
                                    {
                                        damage += (float)(Damage.GetSpellDamage(src, dsc, spell.Slot));
                                        damage += (float)(Damage.GetSpellDamage(src, dsc, spell.Slot, 1));
                                    }
                                    else damage += (float)Damage.GetSpellDamage(src, dsc, spell.Slot);
                                    break;
                                case "Amumu":
                                    if (spell.Slot == SpellSlot.W)
                                    {
                                        damage += (float)(Damage.GetSpellDamage(src, dsc, spell.Slot) * 5);
                                    }
                                    else damage += (float)Damage.GetSpellDamage(src, dsc, spell.Slot);
                                    break;
                                case "Cassiopeia":
                                    if (spell.Slot == SpellSlot.Q || spell.Slot == SpellSlot.E || spell.Slot == SpellSlot.W)
                                    {
                                        damage += (float)(Damage.GetSpellDamage(src, dsc, spell.Slot) * 2);
                                    }
                                    else damage += (float)Damage.GetSpellDamage(src, dsc, spell.Slot);
                                    break;
                                case "Fiddlesticks":
                                    if (spell.Slot == SpellSlot.W || spell.Slot == SpellSlot.E)
                                    {
                                        damage += (float)(Damage.GetSpellDamage(src, dsc, spell.Slot)*5);
                                    }
                                    else damage += (float)Damage.GetSpellDamage(src, dsc, spell.Slot);
                                    break;
                                case "Garen":
                                    if (spell.Slot == SpellSlot.E)
                                    {
                                        damage += (float)(Damage.GetSpellDamage(src, dsc, spell.Slot) * 3);
                                    }
                                    else damage += (float)Damage.GetSpellDamage(src, dsc, spell.Slot);
                                    break;
                                case "Irelia":
                                    if (spell.Slot == SpellSlot.W)
                                    {
                                        damage += (float)(Damage.GetSpellDamage(src, dsc, spell.Slot) * attacks);
                                    }
                                    else damage += (float)Damage.GetSpellDamage(src, dsc, spell.Slot);
                                    break;
                                case "Karthus":
                                    if (spell.Slot == SpellSlot.Q)
                                    {
                                        damage += (float)(Damage.GetSpellDamage(src, dsc, spell.Slot) * 4);
                                    }
                                    else damage += (float)Damage.GetSpellDamage(src, dsc, spell.Slot);
                                    break;
                                case "KogMaw":
                                    if (spell.Slot == SpellSlot.W)
                                    {
                                        damage += (float)(Damage.GetSpellDamage(src, dsc, spell.Slot) * attacks);
                                    }
                                    else damage += (float)Damage.GetSpellDamage(src, dsc, spell.Slot);
                                    break;
                                case "LeeSin":
                                    if (spell.Slot == SpellSlot.Q)
                                    {
                                        damage += (float)Damage.GetSpellDamage(src, dsc, spell.Slot);
                                        damage += (float)Damage.GetSpellDamage(src, dsc, spell.Slot,1);
                                    }
                                    else damage += (float)Damage.GetSpellDamage(src, dsc, spell.Slot);
                                    break;
                                case "Lucian":
                                    if (spell.Slot == SpellSlot.R)
                                    {
                                        damage += (float)Damage.GetSpellDamage(src, dsc, spell.Slot)*4;
                                    }
                                    else damage += (float)Damage.GetSpellDamage(src, dsc, spell.Slot);
                                    break;
                                case "Nunu":
                                    if (spell.Slot != SpellSlot.R && spell.Slot != SpellSlot.Q)
                                    {
                                        damage += (float)Damage.GetSpellDamage(src, dsc, spell.Slot);
                                    }
                                    else damage += (float)Damage.GetSpellDamage(src, dsc, spell.Slot);
                                    break;
                                case "MasterYi":
                                    if (spell.Slot != SpellSlot.E)
                                    {
                                        damage += (float)Damage.GetSpellDamage(src, dsc, spell.Slot)*attacks;
                                    }
                                    else damage += (float)Damage.GetSpellDamage(src, dsc, spell.Slot);
                                    break;
                                case "MonkeyKing":
                                    if (spell.Slot != SpellSlot.R)
                                    {
                                        damage += (float)Damage.GetSpellDamage(src, dsc, spell.Slot) * 4;
                                    }
                                    else damage += (float)Damage.GetSpellDamage(src, dsc, spell.Slot);
                                    break;
                                case "Pantheon":
                                    if (spell.Slot == SpellSlot.E)
                                    {
                                        damage += (float)Damage.GetSpellDamage(src, dsc, spell.Slot)*3;
                                    }
                                    else if (spell.Slot == SpellSlot.R)
                                    {
                                        damage +=0;
                                    }
                                    else damage += (float)Damage.GetSpellDamage(src, dsc, spell.Slot);

                                    break;
                                case "Rammus":
                                    if (spell.Slot == SpellSlot.R)
                                    {
                                        damage += (float)Damage.GetSpellDamage(src, dsc, spell.Slot)*6;
                                    }
                                    else damage += (float)Damage.GetSpellDamage(src, dsc, spell.Slot);
                                    break;
                                case "Riven":
                                    if (spell.Slot == SpellSlot.Q)
                                    {
                                        damage += RivenDamageQ(spell, src, dsc);
                                    }
                                    else damage += (float)Damage.GetSpellDamage(src, dsc, spell.Slot);
                                    break;
                                case "Viktor":
                                    if (spell.Slot == SpellSlot.R)
                                    {
                                        damage += (float)Damage.GetSpellDamage(src, dsc, spell.Slot);
                                        damage += (float)Damage.GetSpellDamage(src, dsc, spell.Slot,1) * 5;
                                    }
                                    else damage += (float)Damage.GetSpellDamage(src, dsc, spell.Slot);
                                    break;
                                case "Vladimir":
                                    if (spell.Slot == SpellSlot.E)
                                    {
                                        damage += (float)Damage.GetSpellDamage(src, dsc, spell.Slot) * 2;

                                    }
                                    else damage += (float)Damage.GetSpellDamage(src, dsc, spell.Slot);
                                    break;
                                default:
                                damage += (float)Damage.GetSpellDamage(src, dsc, spell.Slot);
                                break;
                    }

                }
            }

            if (src.Spellbook.CanUseSpell(src.GetSpellSlot("summonerdot")) == SpellState.Ready)
            {
                damage += (float)src.GetSummonerSpellDamage(dsc, Damage.SummonerSpell.Ignite);
            }
            return damage;
        }
Example #8
0
        public static float GetComboDMG(Obj_AI_Hero source, Obj_AI_Hero target)
        {
            double result = 0;
            double basicDmg = 0;
            int attacks = (int) Math.Floor(source.AttackSpeedMod * 5);
            for (int i = 0; i < attacks; i++)
            {
                if (source.Crit > 0)
                {
                    basicDmg += source.GetAutoAttackDamage(target, true) * (1f + source.Crit / attacks);
                }
                else
                {
                    basicDmg += source.GetAutoAttackDamage(target, true);
                }
            }
            result += basicDmg;
            var spells = source.Spellbook.Spells;
            foreach (var spell in spells)
            {
                var t = spell.CooldownExpires - Game.Time;
                if (t < 0.5)
                {
                    switch (source.SkinName)
                    {
                        case "Ahri":
                            if (spell.Slot == SpellSlot.Q)
                            {
                                result += (Damage.GetSpellDamage(source, target, spell.Slot));
                                result += (Damage.GetSpellDamage(source, target, spell.Slot, 1));
                            }
                            else
                            {
                                result += Damage.GetSpellDamage(source, target, spell.Slot);
                            }
                            break;
                        case "Akali":
                            if (spell.Slot == SpellSlot.R)
                            {
                                result += (Damage.GetSpellDamage(source, target, spell.Slot) * spell.Ammo);
                            }
                            else if (spell.Slot == SpellSlot.Q)
                            {
                                result += (Damage.GetSpellDamage(source, target, spell.Slot));
                                result += (Damage.GetSpellDamage(source, target, spell.Slot, 1));
                            }
                            else
                            {
                                result += Damage.GetSpellDamage(source, target, spell.Slot);
                            }
                            break;
                        case "Amumu":
                            if (spell.Slot == SpellSlot.W)
                            {
                                result += (Damage.GetSpellDamage(source, target, spell.Slot) * 5);
                            }
                            else
                            {
                                result += Damage.GetSpellDamage(source, target, spell.Slot);
                            }
                            break;
                        case "Cassiopeia":
                            if (spell.Slot == SpellSlot.Q || spell.Slot == SpellSlot.E || spell.Slot == SpellSlot.W)
                            {
                                result += (Damage.GetSpellDamage(source, target, spell.Slot) * 2);
                            }
                            else
                            {
                                result += Damage.GetSpellDamage(source, target, spell.Slot);
                            }
                            break;
                        case "Fiddlesticks":
                            if (spell.Slot == SpellSlot.W || spell.Slot == SpellSlot.E)
                            {
                                result += (Damage.GetSpellDamage(source, target, spell.Slot) * 5);
                            }
                            else
                            {
                                result += Damage.GetSpellDamage(source, target, spell.Slot);
                            }
                            break;
                        case "Garen":
                            if (spell.Slot == SpellSlot.E)
                            {
                                result += (Damage.GetSpellDamage(source, target, spell.Slot) * 3);
                            }
                            else
                            {
                                result += Damage.GetSpellDamage(source, target, spell.Slot);
                            }
                            break;
                        case "Irelia":
                            if (spell.Slot == SpellSlot.W)
                            {
                                result += (Damage.GetSpellDamage(source, target, spell.Slot) * attacks);
                            }
                            else
                            {
                                result += Damage.GetSpellDamage(source, target, spell.Slot);
                            }
                            break;
                        case "Karthus":
                            if (spell.Slot == SpellSlot.Q)
                            {
                                result += (Damage.GetSpellDamage(source, target, spell.Slot) * 4);
                            }
                            else
                            {
                                result += Damage.GetSpellDamage(source, target, spell.Slot);
                            }
                            break;
                        case "KogMaw":
                            if (spell.Slot == SpellSlot.W)
                            {
                                result += (Damage.GetSpellDamage(source, target, spell.Slot) * attacks);
                            }
                            else
                            {
                                result += Damage.GetSpellDamage(source, target, spell.Slot);
                            }
                            break;
                        case "LeeSin":
                            if (spell.Slot == SpellSlot.Q)
                            {
                                result += Damage.GetSpellDamage(source, target, spell.Slot);
                                result += Damage.GetSpellDamage(source, target, spell.Slot, 1);
                            }
                            else
                            {
                                result += Damage.GetSpellDamage(source, target, spell.Slot);
                            }
                            break;
                        case "Lucian":
                            if (spell.Slot == SpellSlot.R)
                            {
                                result += Damage.GetSpellDamage(source, target, spell.Slot) * 4;
                            }
                            else
                            {
                                result += Damage.GetSpellDamage(source, target, spell.Slot);
                            }
                            break;
                        case "Nunu":
                            if (spell.Slot != SpellSlot.R && spell.Slot != SpellSlot.Q)
                            {
                                result += Damage.GetSpellDamage(source, target, spell.Slot);
                            }
                            else
                            {
                                result += Damage.GetSpellDamage(source, target, spell.Slot);
                            }
                            break;
                        case "MasterYi":
                            if (spell.Slot == SpellSlot.E)
                            {
                                result += Damage.GetSpellDamage(source, target, spell.Slot) * attacks;
                            }
                            else if (spell.Slot == SpellSlot.R)
                            {
                                result += basicDmg * 0.6f;
                            }
                            else
                            {
                                result += Damage.GetSpellDamage(source, target, spell.Slot);
                            }
                            break;
                        case "MonkeyKing":
                            if (spell.Slot == SpellSlot.R)
                            {
                                result += Damage.GetSpellDamage(source, target, spell.Slot) * 4;
                            }
                            else
                            {
                                result += Damage.GetSpellDamage(source, target, spell.Slot);
                            }
                            break;
                        case "Pantheon":
                            if (spell.Slot == SpellSlot.E)
                            {
                                result += Damage.GetSpellDamage(source, target, spell.Slot) * 3;
                            }
                            else if (spell.Slot == SpellSlot.R)
                            {
                                result += 0;
                            }
                            else
                            {
                                result += Damage.GetSpellDamage(source, target, spell.Slot);
                            }

                            break;
                        case "Rammus":
                            if (spell.Slot == SpellSlot.R)
                            {
                                result += Damage.GetSpellDamage(source, target, spell.Slot) * 6;
                            }
                            else
                            {
                                result += Damage.GetSpellDamage(source, target, spell.Slot);
                            }
                            break;
                        case "Riven":
                            if (spell.Slot == SpellSlot.Q)
                            {
                                result += RivenDamageQ(spell, source, target);
                            }
                            else
                            {
                                result += Damage.GetSpellDamage(source, target, spell.Slot);
                            }
                            break;
                        case "Shyvana":
                            if (spell.Slot == SpellSlot.W)
                            {
                                result += Damage.GetSpellDamage(source, target, spell.Slot) * 4;
                            }
                            else
                            {
                                result += Damage.GetSpellDamage(source, target, spell.Slot);
                            }
                            break;
                        case "Viktor":
                            if (spell.Slot == SpellSlot.R)
                            {
                                result += Damage.GetSpellDamage(source, target, spell.Slot);
                                result += Damage.GetSpellDamage(source, target, spell.Slot, 1) * 5;
                            }
                            else
                            {
                                result += Damage.GetSpellDamage(source, target, spell.Slot);
                            }
                            break;
                        case "Vladimir":
                            if (spell.Slot == SpellSlot.E)
                            {
                                result += Damage.GetSpellDamage(source, target, spell.Slot) * 2;
                            }
                            else
                            {
                                result += Damage.GetSpellDamage(source, target, spell.Slot);
                            }
                            break;
                        default:
                            result += Damage.GetSpellDamage(source, target, spell.Slot);
                            break;
                    }
                }
            }
            if (source.Spellbook.CanUseSpell(target.GetSpellSlot("summonerdot")) == SpellState.Ready)
            {
                result += source.GetSummonerSpellDamage(target, Damage.SummonerSpell.Ignite);
            }
            return (float) result;
        }