Exemple #1
0
        private static bool ShouldUseIgnite(AIHeroClient target)
        {
            if (!CanCastIgnite())
            {
                return(false);
            }
            var damage = 0f;

            damage += (float)ObjectManager.Player.GetAutoAttackDamage(target, true) * 2;
            damage += (SkillsHandler.GetQPrediction(target) != null && SkillsHandler.Spells[SpellSlot.Q].IsReady() && GetMenuValue <bool>("lissandra.combo.useQ"))
                ? (float)player.GetSpellDamage(target, SpellSlot.Q)
                : 0f;
            damage += (target.IsValidTarget(SkillsHandler.Spells[SpellSlot.W].Range) && SkillsHandler.Spells[SpellSlot.W].IsReady() && GetMenuValue <bool>("lissandra.combo.useW"))
                ? (float)player.GetSpellDamage(target, SpellSlot.W)
                : 0f;
            damage += (target.IsValidTarget(SkillsHandler.Spells[SpellSlot.E].Range) && SkillsHandler.Spells[SpellSlot.E].IsReady() && GetMenuValue <bool>("lissandra.combo.useE"))
                ? (float)player.GetSpellDamage(target, SpellSlot.E)
                : 0f;
            damage += (target.IsValidTarget(SkillsHandler.Spells[SpellSlot.R].Range) && SkillsHandler.Spells[SpellSlot.R].IsReady() && GetMenuValue <bool>("lissandra.combo.useR"))
                ? (float)player.GetSpellDamage(target, SpellSlot.R)
                : 0f;
            var damageWithIgnite = damage + player.GetSummonerSpellDamage(target, Damage.SummonerSpell.Ignite);

            if (damage < target.Health + 15 && damageWithIgnite > target.Health + 15)
            {
                return(true);
            }

            return(false);
        }
Exemple #2
0
        private static void OnHarass()
        {
            var harassTarget = TargetSelector.GetTarget(SkillsHandler.QShard.Range, TargetSelector.DamageType.Magical);

            if (!ManaManager.CanHarass() && !ManaManager.PlayerHasPassive())
            {
                return;
            }

            if (harassTarget.IsValidTarget())
            {
                if (GetMenuValue <bool>("lissandra.harass.useQ") &&
                    harassTarget.IsValidTarget(SkillsHandler.QShard.Range) &&
                    SkillsHandler.Spells[SpellSlot.Q].IsReady())
                {
                    var predictionPosition = SkillsHandler.GetQPrediction(harassTarget);
                    if (predictionPosition != null)
                    {
                        //Found a valid Q prediction
                        SkillsHandler.Spells[SpellSlot.Q].Cast((Vector3)predictionPosition);
                    }
                }

                if (GetMenuValue <bool>("lissandra.harass.useW") &&
                    harassTarget.IsValidTarget(SkillsHandler.Spells[SpellSlot.W].Range) &&
                    SkillsHandler.Spells[SpellSlot.W].IsReady())
                {
                    SkillsHandler.Spells[SpellSlot.W].Cast();
                }

                if (GetMenuValue <bool>("lissandra.harass.useE") &&
                    harassTarget.IsValidTarget(SkillsHandler.Spells[SpellSlot.E].Range) &&
                    SkillsHandler.Spells[SpellSlot.E].IsReady())
                {
                    if (!EActive)
                    {
                        SkillsHandler.Spells[SpellSlot.E].CastIfHitchanceEquals(harassTarget, CustomHitChance);
                    }
                }
            }
        }
Exemple #3
0
        public static float GetComboDamage(AIHeroClient target)
        {
            var damage = 0f;

            damage += (float)player.GetAutoAttackDamage(target, true) * 2;
            damage += (SkillsHandler.GetQPrediction(target) != null && SkillsHandler.Spells[SpellSlot.Q].IsReady() &&
                       GetMenuValue <bool>("lissandra.combo.useQ"))
                          ? (float)player.GetSpellDamage(target, SpellSlot.Q)
                          : 0f;
            damage += (target.IsValidTarget(SkillsHandler.Spells[SpellSlot.W].Range) &&
                       SkillsHandler.Spells[SpellSlot.W].IsReady() && GetMenuValue <bool>("lissandra.combo.useW"))
                          ? (float)player.GetSpellDamage(target, SpellSlot.W)
                          : 0f;
            damage += (target.IsValidTarget(SkillsHandler.Spells[SpellSlot.E].Range) &&
                       SkillsHandler.Spells[SpellSlot.E].IsReady() && GetMenuValue <bool>("lissandra.combo.useE"))
                          ? (float)player.GetSpellDamage(target, SpellSlot.E)
                          : 0f;
            damage += (target.IsValidTarget(SkillsHandler.Spells[SpellSlot.R].Range) &&
                       SkillsHandler.Spells[SpellSlot.R].IsReady() && GetMenuValue <bool>("lissandra.combo.useR"))
                          ? (float)player.GetSpellDamage(target, SpellSlot.R)
                          : 0f;

            return(damage);
        }
Exemple #4
0
        private static void OnCombo()
        {
            //TODO The All In Combo.
            var comboTarget = TargetSelector.GetTarget(SkillsHandler.QShard.Range,
                                                       TargetSelector.DamageType.Magical);

            if (comboTarget.IsValidTarget())
            {
                if (GetMenuValue <bool>("lissandra.combo.useQ") &&
                    comboTarget.IsValidTarget(SkillsHandler.QShard.Range) &&
                    SkillsHandler.Spells[SpellSlot.Q].IsReady())
                {
                    var predictionPosition = SkillsHandler.GetQPrediction(comboTarget);
                    if (predictionPosition != null)
                    {
                        //Found a valid Q prediction
                        SkillsHandler.Spells[SpellSlot.Q].Cast((Vector3)predictionPosition);
                    }
                }

                if (GetMenuValue <bool>("lissandra.combo.useW") &&
                    comboTarget.IsValidTarget(SkillsHandler.Spells[SpellSlot.W].Range) &&
                    SkillsHandler.Spells[SpellSlot.W].IsReady() && !comboTarget.IsStunned)
                {
                    SkillsHandler.Spells[SpellSlot.W].Cast();
                }

                if (GetMenuValue <bool>("lissandra.combo.useE") &&
                    comboTarget.IsValidTarget(SkillsHandler.Spells[SpellSlot.E].Range) &&
                    SkillsHandler.Spells[SpellSlot.E].IsReady())
                {
                    if (!EActive)
                    {
                        var comboTargetPosition = Prediction.GetPrediction(comboTarget,
                                                                           TimeToEEnd(ObjectManager.Player.ServerPosition, comboTarget.ServerPosition)).UnitPosition;
                        //TODO This will probably fail horribly because it's such a long delay ayy lmao
                        if (comboTargetPosition.IsSafePositionEx() && comboTargetPosition.PassesNoEIntoEnemiesCheck())
                        {
                            SkillsHandler.Spells[SpellSlot.E].Cast(comboTargetPosition);
                        }
                        else
                        {
                            if (SkillsHandler.Spells[SpellSlot.E].IsInRange(comboTargetPosition) && CurrentEPosition.IsSafePositionEx())
                            {
                                SkillsHandler.Spells[SpellSlot.E].Cast(comboTarget);
                            }
                        }
                    }
                }

                if (GetMenuValue <bool>("lissandra.combo.useR") &&
                    comboTarget.IsValidTarget(SkillsHandler.Spells[SpellSlot.R].Range) &&
                    SkillsHandler.Spells[SpellSlot.R].IsReady())
                {
                    var selfR      = GetMenuValue <Slider>("lissandra.combo.options.selfR").Value;
                    var defensiveR = GetMenuValue <Slider>("lissandra.combo.options.defensiveR").Value;

                    if (player.CountEnemiesInRange(250) >= defensiveR)
                    {
                        SkillsHandler.Spells[SpellSlot.R].CastOnUnit(player);
                    }

                    if (player.Health / player.MaxHealth * 100 < selfR && player.CountEnemiesInRange(SkillsHandler.Spells[SpellSlot.R].Range) > 0)
                    {
                        SkillsHandler.Spells[SpellSlot.R].CastOnUnit(player);
                    }

                    if (GetMenuValue <bool>("lissandra.combo.options.alwaysR"))
                    {
                        SkillsHandler.Spells[SpellSlot.R].CastOnUnit(comboTarget);
                    }

                    if ((player.GetSpellDamage(comboTarget, SpellSlot.R) * 1.2) > comboTarget.Health + 10 &&
                        Menu.Item("lissandra.combo.options.whitelistR" + comboTarget.CharData.BaseSkinName) != null &&
                        Menu.Item("lissandra.combo.options.whitelistR" + comboTarget.CharData.BaseSkinName)
                        .GetValue <bool>() == false)
                    {
                        SkillsHandler.Spells[SpellSlot.R].CastOnUnit(comboTarget);
                    }

                    if (GetComboDamage(comboTarget) > comboTarget.Health + 10 &&
                        Menu.Item("lissandra.combo.options.whitelistR" + comboTarget.CharData.BaseSkinName) != null &&
                        Menu.Item("lissandra.combo.options.whitelistR" + comboTarget.CharData.BaseSkinName)
                        .GetValue <bool>() == false)
                    {
                        SkillsHandler.Spells[SpellSlot.R].CastOnUnit(comboTarget);
                    }
                }

                if (ShouldUseIgnite(comboTarget) && player.Distance(comboTarget) <= 600)
                {
                    player.Spellbook.CastSpell(SkillsHandler.IgniteSlot, comboTarget);
                }
            }
        }