Пример #1
0
        public static float GetItemsDamage(AIHeroClient target)
        {
            double damage = 0;

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

            if (ludenStacks != null && (Items.HasItem(Ludens.Id) && ludenStacks.Count == 100))
            {
                damage += player.CalcDamage(
                    target, Damage.DamageType.Magical,
                    Damage.CalcDamage(player, target, Damage.DamageType.Magical, 100 + player.FlatMagicDamageMod * 0.15));
            }
            if (Items.HasItem(lich.Id) && Items.CanUseItem(lich.Id))
            {
                damage += player.CalcDamage(
                    target, Damage.DamageType.Magical, player.BaseAttackDamage * 0.75 + player.FlatMagicDamageMod * 0.5);
            }
            if (Items.HasItem(Dfg.Id) && Items.CanUseItem(Dfg.Id))
            {
                damage  = damage * 1.2;
                damage += Damage.GetItemDamageLS(player, target, Damage.DamageItems.Dfg);
            }
            if (Items.HasItem(Bft.Id) && Items.CanUseItem(Bft.Id))
            {
                damage  = damage * 1.2;
                damage += Damage.GetItemDamageLS(player, target, Damage.DamageItems.BlackFireTorch);
            }
            if (Items.HasItem(tiamat.Id) && Items.CanUseItem(tiamat.Id))
            {
                damage += Damage.GetItemDamageLS(player, target, Damage.DamageItems.Tiamat);
            }
            if (Items.HasItem(hydra.Id) && Items.CanUseItem(hydra.Id))
            {
                damage += Damage.GetItemDamageLS(player, target, Damage.DamageItems.Hydra);
            }
            if (Items.HasItem(bilgewater.Id) && Items.CanUseItem(bilgewater.Id))
            {
                damage += Damage.GetItemDamageLS(player, target, Damage.DamageItems.Bilgewater);
            }
            if (Items.HasItem(botrk.Id) && Items.CanUseItem(botrk.Id))
            {
                damage += Damage.GetItemDamageLS(player, target, Damage.DamageItems.Botrk);
            }
            damage += GetSheenDmg(target);
            return((float)damage);
        }