コード例 #1
0
 public override void Harass(Obj_AI_Hero target)
 {
     if (ManaManager.CanUseMana(Orbwalking.OrbwalkingMode.Mixed))
     {
         base.Harass(target);
     }
 }
コード例 #2
0
ファイル: CassE.cs プロジェクト: wade1990/PortAIO
 public override void Harass(AIHeroClient target)
 {
     if (ManaManager.CanUseMana(Orbwalking.OrbwalkingMode.Mixed))
     {
         base.Harass(target);
     }
 }
コード例 #3
0
ファイル: Skill.cs プロジェクト: wx8829110/WUYANZZZ
        public virtual void Update(Orbwalking.OrbwalkingMode mode, ComboProvider combo, Obj_AI_Hero target)
        {
            if (mode == Orbwalking.OrbwalkingMode.None)
            {
                return;
            }
            if (mode == Orbwalking.OrbwalkingMode.LaneClear && SwitchClearToHarassOnTarget && target != null)
            {
                mode = Orbwalking.OrbwalkingMode.Mixed;
            }
            if (UseManaManager && !ManaManager.CanUseMana(mode))
            {
                return;
            }

            var targetIsValid = target.IsValidTarget();

            if (OnlyUpdateIfTargetValid && mode == Orbwalking.OrbwalkingMode.Combo && !targetIsValid)
            {
                return;
            }
            if (OnlyUpdateIfCastable && !CanBeCast())
            {
                return;                                       //Todo: check if nessecary with new comboSystem
            }
            MinHitChance = mode == Orbwalking.OrbwalkingMode.Combo ? MinComboHitchance : MinHarassHitchance;

            switch (mode)
            {
            case Orbwalking.OrbwalkingMode.Combo:
                if (ComboEnabled)
                {
                    Combo(target);
                }
                break;

            case Orbwalking.OrbwalkingMode.LaneClear:
                if (LaneclearEnabled)
                {
                    LaneClear();
                }
                break;

            case Orbwalking.OrbwalkingMode.Mixed:
                if (HarassEnabled)
                {
                    if (targetIsValid || !OnlyUpdateIfTargetValid)
                    {
                        Harass(target);
                    }
                    Lasthit();
                }
                break;

            case Orbwalking.OrbwalkingMode.LastHit:
                Lasthit();
                break;
            }
        }
コード例 #4
0
ファイル: Skill.cs プロジェクト: wx8829110/WUYANZZZ
        public virtual void Update(Orbwalking.OrbwalkingMode mode, ComboProvider combo, Obj_AI_Hero target)
        {
            if (IsSafeCasting()) //Todo: check if it will instant double-toggle toggleable spells like garenE
            {
                _castAction();
            }

            if (OnlyUpdateIfTargetValid && !target.IsValidTarget())
            {
                return;
            }
            if (OnlyUpdateIfCastable && (!CanBeCast() || IsSafeCasting()))
            {
                return;
            }

            if (mode == Orbwalking.OrbwalkingMode.None)
            {
                return;
            }
            if (mode == Orbwalking.OrbwalkingMode.LaneClear && SwitchClearToHarassOnTarget && target != null && HarassEnabled)
            {
                mode = Orbwalking.OrbwalkingMode.Mixed;
            }
            if (UseManaManager && !ManaManager.CanUseMana(mode))
            {
                return;
            }

            Spell.MinHitChance = mode == Orbwalking.OrbwalkingMode.Combo ? MinComboHitchance : MinHarassHitchance;

            switch (mode)
            {
            case Orbwalking.OrbwalkingMode.Combo:
                if (ComboEnabled)
                {
                    Combo(combo, target);
                }
                break;

            case Orbwalking.OrbwalkingMode.LaneClear:
                if (LaneclearEnabled)
                {
                    LaneClear(combo, target);
                }
                break;

            case Orbwalking.OrbwalkingMode.Mixed:
                if (HarassEnabled)
                {
                    Harass(combo, target);
                }
                break;
            }
        }
コード例 #5
0
        public override void LaneClear()
        {
            if (!ManaManager.CanUseMana(Orbwalking.OrbwalkingMode.LaneClear))
            {
                return;
            }

            var clearMinion = MinionManager.GetMinions(Range, MinionTypes.All, MinionTeam.NotAlly).FirstOrDefault();

            if (clearMinion != null)
            {
                Cast(clearMinion);
            }
        }
コード例 #6
0
        public virtual void Update(Orbwalking.OrbwalkingMode mode, ComboProvider combo, Obj_AI_Hero target)
        {
            if (OnlyUpdateIfTargetValid && !target.IsValidTarget() && (mode == Orbwalking.OrbwalkingMode.Combo || mode == Orbwalking.OrbwalkingMode.Mixed))
            {
                return;
            }
            if (OnlyUpdateIfCastable && !CanBeCast())
            {
                return;
            }

            if (mode == Orbwalking.OrbwalkingMode.None)
            {
                return;
            }
            if (mode == Orbwalking.OrbwalkingMode.LaneClear && SwitchClearToHarassOnTarget && target != null && HarassEnabled)
            {
                mode = Orbwalking.OrbwalkingMode.Mixed;
            }
            if (UseManaManager && !ManaManager.CanUseMana(mode))
            {
                return;
            }

            Spell.MinHitChance = mode == Orbwalking.OrbwalkingMode.Combo ? MinComboHitchance : MinHarassHitchance;

            switch (mode)
            {
            case Orbwalking.OrbwalkingMode.Combo:
                if (ComboEnabled)
                {
                    Combo(combo, target);
                }
                break;

            case Orbwalking.OrbwalkingMode.LaneClear:
                if (LaneclearEnabled)
                {
                    LaneClear(combo, target);
                }
                break;

            case Orbwalking.OrbwalkingMode.Mixed:
                if (HarassEnabled)
                {
                    Harass(combo, target);
                }
                break;
            }
        }
コード例 #7
0
 public override void Initialize(ComboProvider combo)
 {
     _currentRandomDelay      = _random.Next(0, SkillDelayRnd);
     Orbwalking.BeforeAttack += args =>
     {
         if (combo.Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.LastHit || combo.Orbwalker.ActiveMode == Orbwalking.OrbwalkingMode.Mixed)
         {
             if (this.IsReady() && ManaManager.CanUseMana(Orbwalking.OrbwalkingMode.LastHit) || _killedWithE == args.Target.NetworkId)
             {
                 args.Process = false;
             }
         }
     };
     base.Initialize(combo);
 }
コード例 #8
0
ファイル: Skill.cs プロジェクト: wade1990/PortAIO
        public virtual void Update(Orbwalking.OrbwalkingMode mode, IMainContext context, ComboProvider combo, AIHeroClient target)
        {
            if (mode == Orbwalking.OrbwalkingMode.None)
            {
                return;
            }
            if (mode == Orbwalking.OrbwalkingMode.LaneClear && SwitchClearToHarassOnTarget && target != null && HarassEnabled)
            {
                mode = Orbwalking.OrbwalkingMode.Mixed;
            }
            if (UseManaManager && !ManaManager.CanUseMana(mode))
            {
                return;
            }
            switch (mode)
            {
            case Orbwalking.OrbwalkingMode.Combo:
                if (ComboEnabled)
                {
                    Combo(context, combo, target);
                }
                break;

            case Orbwalking.OrbwalkingMode.LaneClear:
                if (LaneclearEnabled)
                {
                    LaneClear(context, combo, target);
                }
                break;

            case Orbwalking.OrbwalkingMode.Mixed:
                if (HarassEnabled)
                {
                    Harass(context, combo, target);
                }
                break;
            }
        }
コード例 #9
0
        private void OnNotKillableMinion(AttackableUnit minion)
        {
            if (!FarmAssist || minion.Position.Distance(ObjectManager.Player.Position) > 1100 || !ManaManager.CanUseMana(Orbwalking.OrbwalkingMode.LastHit))
            {
                return;
            }
            var target = (Obj_AI_Base)minion;

            if (GetActivateDamage(target, target.GetBuffCount("twitchdeadlyvenom")) > minion.Health)
            {
                Cast();
            }
        }