Esempio n. 1
0
File: Yasuo.cs Progetto: betw01/detu
        public static void useWSmart(Skillshot skillShot)
        {
            //try douge with E if cant windWall

            if (!W.IsReady())
            {
                return;
            }
            if (skillShot.IsAboutToHit(250, Player))
            {
                var sd = SpellDatabase.GetByMissileName(skillShot.SpellData.MissileSpellName);
                if (sd == null)
                {
                    return;
                }

                //If enabled
                if (!YasuoSharp.EvadeSpellEnabled(sd.MenuItemName))
                {
                    return;
                }

                //if only dangerous
                if (YasuoSharp.Config.Item("wwDanger").GetValue <bool>() &&
                    !YasuoSharp.skillShotIsDangerous(sd.MenuItemName))
                {
                    return;
                }

                //Console.WriteLine("dmg: " + missle.SpellCaster.GetSpellDamage(Player, sd.SpellName));
                float spellDamage = (float)skillShot.Unit.GetSpellDamage(Player, sd.SpellName);
                int   procHp      = (int)((spellDamage / Player.MaxHealth) * 100);

                if (procHp < YasuoSharp.Config.Item("wwDmg").GetValue <Slider>().Value&& Player.Health - spellDamage > 0)
                {
                    return;
                }


                Vector3 blockwhere = Player.ServerPosition + Vector3.Normalize(skillShot.MissilePosition.To3D() - Player.ServerPosition) * 10; // missle.Position;
                W.Cast(blockwhere);
            }
        }
Esempio n. 2
0
File: Yasuo.cs Progetto: betw01/detu
        public static void useWSmartOld(Obj_SpellMissile missle)
        {
            if (!W.IsReady())
            {
                return;
            }
            try
            {
                if (missle.SpellCaster is Obj_AI_Hero && missle.IsEnemy)
                {
                    var sd = SpellDatabase.GetByMissileName(missle.SData.Name);
                    if (sd == null)
                    {
                        return;
                    }

                    //If enabled
                    if (!YasuoSharp.EvadeSpellEnabled(sd.MenuItemName))
                    {
                        return;
                    }

                    //if only dangerous
                    if (YasuoSharp.Config.Item("wwDanger").GetValue <bool>() &&
                        !YasuoSharp.skillShotIsDangerous(sd.MenuItemName))
                    {
                        return;
                    }

                    //Console.WriteLine("dmg: " + missle.SpellCaster.GetSpellDamage(Player, sd.SpellName));
                    float spellDamage = (float)missle.SpellCaster.GetSpellDamage(Player, sd.SpellName);
                    int   procHp      = (int)((spellDamage / Player.MaxHealth) * 100);

                    if (procHp < YasuoSharp.Config.Item("wwDmg").GetValue <Slider>().Value&& Player.Health - spellDamage > 0)
                    {
                        return;
                    }

                    Obj_AI_Base enemHero = missle.SpellCaster;
                    float       dmg      = (float)enemHero.GetAutoAttackDamage(Player);
                    //enemHero.BaseAttackDamage + enemHero.FlatPhysicalDamageMod);
                    if (missle.SData.Name.Contains("Crit"))
                    {
                        dmg *= 2;
                    }
                    if (!missle.SData.Name.Contains("Attack") ||
                        (enemHero.CombatType == GameObjectCombatType.Ranged && dmg > Player.MaxHealth / 8))
                    {
                        if (missleWillHit(missle))
                        {
                            Vector3 blockWhere = missle.Position;
                            //Player.ServerPosition + Vector3.Normalize(missle.Position - Player.ServerPosition)*30; // missle.Position;
                            if (Player.Distance(missle.Position) < 420)
                            {
                                if (missle.Target.IsMe || isMissileCommingAtMe(missle))
                                {
                                    YasuoSharp.lastSpell = missle.SData.Name;
                                    W.Cast(blockWhere, true);
                                    //YasuoSharp.skillShots.Clear();
                                }
                            }
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex);
            }
        }