コード例 #1
0
ファイル: Yasuo.cs プロジェクト: Merc491/GoodGuyJodu
        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);
            }
        }