示例#1
0
        private static void Game_OnGameLoad(EventArgs args)
        {
            //Return if Player is not playing Darius..
            if (Player.ChampionName != ChampionName)
            {
                return;
            }

            //Initizalize
            SpellHandler.Initialize();
            ConfigHandler.Initialize();

            //Subscribe to events
            Orbwalking.AfterAttack += ComboHandler.ExecuteAfterAttack;
            Game.OnGameUpdate      += Game_OnGameUpdate;
            Drawing.OnDraw         += Drawing_OnDraw;
        }
示例#2
0
        //Harass
        public static void ExecuteHarass()
        {
            //Get target
            var target = TargetSelector.GetTarget(Q.Range, TargetSelector.DamageType.Physical);

            if (target == null) //Return if no target
            {
                return;
            }

            //Return if not enough Mana
            if (Player.ManaPercentage() < ConfigHandler.SliderLinks["harassMana"].Value.Value)
            {
                return;
            }

            //Cast Q if all conditions met
            if (SpellHandler.IsEnabled("comboUseQ") && Q.CanCast(target))
            {
                Q.Cast();
            }
        }
示例#3
0
        //Logic
        private static void CastR(Obj_AI_Hero target)
        {
            if (!R.IsReady())
            {
                return;
            }

            foreach (var hero in ObjectManager.Get <Obj_AI_Hero>().Where(hero => hero.IsValidTarget(R.Range)))
            {
                if (Player.GetSpellDamage(target, SpellSlot.R) + SpellHandler.AdjustDamage() > hero.Health)
                {
                    R.Cast(target);
                }

                else if (Player.GetSpellDamage(target, SpellSlot.R) + SpellHandler.AdjustDamage() < hero.Health)
                {
                    foreach (var buff in hero.Buffs.Where(buff => buff.Name == "dariushemo"))
                    {
                        if (Player.GetSpellDamage(target, SpellSlot.R, 1) * (1 + buff.Count / 5) + SpellHandler.AdjustDamage() > target.Health)
                        {
                            R.CastOnUnit(target, true);
                        }
                    }
                }
            }
        }