Exemple #1
0
        public static void OnProcessSpellCast(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args)
        {
            if (ObjectManager.Player.IsDead)
            {
                return;
            }

            if (sender != null)
            {
                if (sender.IsMe)
                {
                    if (args.Slot == SpellSlot.R)
                    {
                        if (args.SData.Name.ToLowerInvariant() == "gate")
                        {
                            switch (CardSelector.Status)
                            {
                            case SelectStatus.Selecting:
                            {
                                CardSelector.JumpToCard(Cards.Yellow);
                                break;
                            }

                            case SelectStatus.Ready:
                            {
                                CardSelector.StartSelecting(Cards.Yellow);
                                break;
                            }
                            }
                        }
                    }
                }
            }
        }
Exemple #2
0
        public static void Gapcloser_OnGapCloser(ActiveGapcloser gapcloser)
        {
            if (ObjectManager.Player.IsDead)
            {
                return;
            }

            if (Config.UseAntiGapCloser)
            {
                var wMana = ObjectManager.Player.Spellbook.GetSpell(SpellSlot.W).ManaCost;

                if (gapcloser.Sender.IsValidTarget(Spells._w.Range))
                {
                    switch (CardSelector.Status)
                    {
                    case SelectStatus.Selecting:
                    {
                        CardSelector.JumpToCard(Cards.Yellow);
                        break;
                    }

                    case SelectStatus.Ready:
                    {
                        if (ObjectManager.Player.ManaPercent >= wMana)
                        {
                            CardSelector.StartSelecting(Cards.Yellow);
                        }
                        break;
                    }
                    }

                    if (HasGold)
                    {
                        if (SebbyLib.Orbwalking.InAutoAttackRange(gapcloser.Sender))
                        {
                            if (SebbyLib.Orbwalking.CanAttack())
                            {
                                ObjectManager.Player.IssueOrder(GameObjectOrder.AttackUnit, gapcloser.Sender);
                            }
                        }
                    }
                }
            }
        }
Exemple #3
0
        public static void InterruptableSpell_OnInterruptableTarget(Obj_AI_Hero sender, Interrupter2.InterruptableTargetEventArgs args)
        {
            if (ObjectManager.Player.IsDead)
            {
                return;
            }

            if (Config.UseInterrupter)
            {
                var wMana = ObjectManager.Player.Spellbook.GetSpell(SpellSlot.W).ManaCost;

                if (sender.IsValidTarget(Spells._w.Range))
                {
                    switch (CardSelector.Status)
                    {
                    case SelectStatus.Selecting:
                    {
                        CardSelector.JumpToCard(Cards.Yellow);
                        break;
                    }

                    case SelectStatus.Ready:
                    {
                        if (ObjectManager.Player.ManaPercent >= wMana)
                        {
                            CardSelector.StartSelecting(Cards.Yellow);
                        }
                        break;
                    }
                    }

                    if (HasGold)
                    {
                        if (SebbyLib.Orbwalking.InAutoAttackRange(sender))
                        {
                            if (SebbyLib.Orbwalking.CanAttack())
                            {
                                ObjectManager.Player.IssueOrder(GameObjectOrder.AttackUnit, sender);
                            }
                        }
                    }
                }
            }
        }