コード例 #1
0
ファイル: Program.cs プロジェクト: kclean2/LeagueSharp
        static float GetComboDamage(Obj_AI_Base enemy)
        {
            var  APdmg   = 0d;
            var  ADdmg   = 0d;
            var  Truedmg = 0d;
            bool card    = false;

            if (Q.IsReady())
            {
                APdmg += Player.GetSpellDamage(enemy, SpellSlot.Q);
            }

            if (W.IsReady())
            {
                APdmg += Player.GetSpellDamage(enemy, SpellSlot.W, 2);
            }
            else
            {
                card = true;
                foreach (var buff in Player.Buffs)
                {
                    if (buff.Name == "bluecardpreattack")
                    {
                        APdmg += Player.GetSpellDamage(enemy, SpellSlot.W);
                    }
                    else if (buff.Name == "redcardpreattack")
                    {
                        APdmg += Player.GetSpellDamage(enemy, SpellSlot.W, 1);
                    }
                    else if (buff.Name == "goldcardpreattack")
                    {
                        APdmg += Player.GetSpellDamage(enemy, SpellSlot.W, 2);
                    }
                    else
                    {
                        card = false;
                    }
                }
            }

            bool passive = false;

            foreach (var buff in Player.Buffs)
            {
                if (buff.Name == "cardmasterstackparticle")
                {
                    APdmg  += Player.GetSpellDamage(enemy, SpellSlot.E);
                    passive = true;
                }

                if (buff.Name == "lichbane")
                {
                    APdmg  += Damage.CalcDamage(Player, enemy, Damage.DamageType.Magical, (Player.BaseAttackDamage * 0.75) + ((Player.BaseAbilityDamage + Player.FlatMagicDamageMod) * 0.5));
                    passive = true;
                }

                if (buff.Name == "sheen")
                {
                    ADdmg  += Player.GetAutoAttackDamage(enemy, false);
                    passive = true;
                }
            }

            if (!card && passive)
            {
                ADdmg += Player.GetAutoAttackDamage(enemy, false);
            }

            if (Dfg.IsReady() && Menu.Item("usedfg").GetValue <bool>())
            {
                APdmg += Player.GetItemDamage(enemy, Damage.DamageItems.Dfg);
                APdmg  = APdmg * 1.2;
            }
            else if (Bft.IsReady() && Menu.Item("usebft").GetValue <bool>())
            {
                APdmg += Player.GetItemDamage(enemy, Damage.DamageItems.BlackFireTorch);
                APdmg  = APdmg * 1.2;
            }

            return((float)ADdmg + (float)APdmg + (float)Truedmg);
        }
コード例 #2
0
ファイル: Program.cs プロジェクト: kclean2/LeagueSharp
        static void Combo()
        {
            Obj_AI_Hero target = TargetSelector.GetTarget(Q.Range, TargetSelector.DamageType.Magical, Menu.Item("ignoreshield").GetValue <bool>());

            if (Dfg.IsReady() && Menu.Item("usedfg").GetValue <bool>())
            {
                if (target.IsValidTarget(Dfg.Range))
                {
                    Dfg.Cast(target);
                }
            }

            if (Bft.IsReady() && Menu.Item("usebft").GetValue <bool>())
            {
                if (target.IsValidTarget(Bft.Range))
                {
                    Bft.Cast(target);
                }
            }

            if (W.IsReady() && Menu.Item("useW").GetValue <bool>())
            {
                if (target.IsValidTarget(W.Range))
                {
                    if (Menu.Item("useblue").GetValue <bool>())
                    {
                        if (Utility.ManaPercentage(Player) < 20)
                        {
                            CardSelector.StartSelecting(Cards.Blue);
                        }
                        else
                        {
                            CardSelector.StartSelecting(Cards.Yellow);
                        }
                    }
                    else
                    {
                        CardSelector.StartSelecting(Cards.Yellow);
                    }
                }
            }

            if (Q.IsReady() && Menu.Item("useQ").GetValue <bool>())
            {
                if (target.IsValidTarget(Menu.Item("qrange").GetValue <Slider>().Value))
                {
                    var pred = Q.GetPrediction(target);

                    if (Menu.Item("cconly").GetValue <bool>())
                    {
                        if (pred.Hitchance >= HitChance.High && DetectCollision(target))
                        {
                            foreach (var buff in target.Buffs)
                            {
                                if (buff.Type == BuffType.Stun || buff.Type == BuffType.Taunt || buff.Type == BuffType.Snare || buff.Type == BuffType.Suppression || buff.Type == BuffType.Charm || buff.Type == BuffType.Fear || buff.Type == BuffType.Flee || buff.Type == BuffType.Slow)
                                {
                                    Q.Cast(target, Menu.Item("usepacket").GetValue <bool>());
                                }
                            }
                        }
                    }
                    else if (pred.Hitchance >= HitChance.VeryHigh && DetectCollision(target))
                    {
                        Q.Cast(target, Menu.Item("usepacket").GetValue <bool>());
                    }
                }
            }
        }