Exemplo n.º 1
0
        private static void Combo()
        {
            var t = TargetSelector.GetTarget(
                Spell[SpellSlot.E].Range + Spells.ECastRange, TargetSelector.DamageType.Magical);
            var useQ = Config.ViktorConfig.Item("apollo.viktor.combo.q.bool").GetValue <bool>();
            var useW = Config.ViktorConfig.Item("apollo.viktor.combo.w.bool").GetValue <bool>();
            var useE = Config.ViktorConfig.Item("apollo.viktor.combo.e.bool").GetValue <bool>();
            var useR = Config.ViktorConfig.Item("apollo.viktor.combo.r.bool").GetValue <bool>();
            var preE =
                (HitChance)
                (Config.ViktorConfig.Item("apollo.viktor.combo.e.pre").GetValue <StringList>().SelectedIndex + 3);

            if (t == null)
            {
                return;
            }

            if (IgniteSlot != SpellSlot.Unknown && IgniteSlot.IsReady() &&
                Config.ViktorConfig.Item("apollo.viktor.combo.ignite.bool").GetValue <bool>() &&
                t.Health < Damages.ComboDmg(t))
            {
                Player.Spellbook.CastSpell(IgniteSlot, t);
            }

            if (useQ)
            {
                CastQ(t);
            }
            if (useW)
            {
                CastW();
            }
            if (useE)
            {
                CastE(t, preE);
            }
            if (useR)
            {
                CastR(t);
            }
        }
Exemplo n.º 2
0
        private static void CastR(Obj_AI_Base t)
        {
            if (t == null || !Spell[SpellSlot.R].IsReady() || ChaosStorm != null)
            {
                return;
            }

            var preR = Spell[SpellSlot.R].GetPrediction(t, true);

            if (t.IsValidTarget(Spell[SpellSlot.R].Range) &&
                Config.ViktorConfig.Item("apollo.viktor.combo.r.kill").GetValue <bool>() &&
                Damages.ComboDmg(t) > t.Health &&
                t.HealthPercent > Config.ViktorConfig.Item("apollo.viktor.combo.r.minhp").GetValue <Slider>().Value)
            {
                Spell[SpellSlot.R].Cast(t, PacketCast, true);
            }
            else if (preR.CastPosition.CountEnemiesInRange(Spell[SpellSlot.R].Width) >=
                     Config.ViktorConfig.Item("apollo.viktor.combo.r.hit").GetValue <Slider>().Value)
            {
                Spell[SpellSlot.R].Cast(preR.CastPosition, PacketCast);
            }
        }