Пример #1
0
        public static double RDamage(this AIHeroClient target)
        {
            if (!SpellManager.R.IsLearned)
                return 0;

            return (new double[] { 100, 200, 300 }[SpellManager.R.Level - 1] + 0.75 * Player.Instance.FlatPhysicalDamageMod) * (1 + 0.2 * target.BuffCount("dariushemo"));
        }
Пример #2
0
        public static UltimateOutPut GetResult(this AIHeroClient unit)
        {
            UltimateOutPut result = new UltimateOutPut();

            float Health = unit.Health;
            float Shield = unit.AllShield + unit.MordeShield();
            int Stack = unit.BuffCount("dariushemo");

            if (Player.Instance.HealthPercent >= 75 && unit.HealthPercent <= 25 && result.IsAlone && SpellManager.R.Level < 3 && Config.SpellMenu["unneR"].Cast<CheckBox>().CurrentValue)
                result.Unnecessary = true;

            if (!unit.IsValidTarget(SpellManager.R.Range + SpellManager.Flash.Range) || unit.HasSpellShield() || unit.HasBuff("kindredrnodeathbuff") || unit.HasBuff("FioraW") || unit.HasBuff("UndyingRage"))
                return result;

            if (Player.Instance.CountEnemiesInRange(1500) == 1)
                result.IsAlone = true;

            if (Player.Instance.CountAlliesInRange(1500) == 1 && Player.Instance.CountEnemiesInRange(1500) == 1)
                result.LanePhase = true;

            if (unit.RDamage() > Health + Shield + unit.HPRegenRate)
            {
                result.IsKillable = true;

                if (unit.IsValidTarget(SpellManager.R.Range + SpellManager.Flash.Range) && unit.ServerPosition.Distance(Player.Instance.ServerPosition) > SpellManager.R.Range)
                    result.Range = UltRange.FlashRRange;

                if (unit.IsValidTarget(SpellManager.R.Range))
                    result.Range = UltRange.RRange;
            }

            int sec = 4;

            if (unit.RDamage() + unit.PassiveDamage(Stack == 5 ? Stack : Stack + 1, sec) + unit.IgniteDamage() > Health + Shield + unit.HPRegenRate(sec, true) && result.IsAlone)
                result.LetItGo = true;

            return result;
        }
Пример #3
0
        public static float PassiveDamage(this AIHeroClient target, int second)
        {
            float damagePerSec = (9 + Player.Instance.Level + 0.3f * Player.Instance.FlatPhysicalDamageMod) / 5;

            return Damage.CalculateDamageOnUnit(Player.Instance, target, DamageType.Physical, damagePerSec * target.BuffCount("dariushemo") * target.BuffRemainTime("dariushemo") > second ? second : target.BuffRemainTime("dariushemo"), false, false);
        }