private static void KillSteal() { if (ksMenu["Q"].Cast <CheckBox>().CurrentValue&& Q.IsReady()) { var qt = GameObjects.EnemyHeroes.Where(x => x.LSIsValidTarget(Q.Range) && x.Health < Q.GetDamage(x)).FirstOrDefault(); if (qt != null) { Q.Cast(qt); return; } } if (ksMenu["E"].Cast <CheckBox>().CurrentValue&& E.IsReady()) { var et = GameObjects.EnemyHeroes.Where(x => !blacklistMenu[x.ChampionName.ToLower()].Cast <CheckBox>().CurrentValue&& x.LSIsValidTarget(E.Range) && x.Health < E.GetDamage(x)).FirstOrDefault(); if (et != null) { E.Cast(et); return; } } if (ksMenu["R"].Cast <CheckBox>().CurrentValue&& R.IsReady()) { var rt = GameObjects.EnemyHeroes.Where(x => x.IsValidTarget(R.Range - 50) && x.Health < R.GetDamage(x) && ksMenu[x.ChampionName.ToLower()].Cast <CheckBox>().CurrentValue).FirstOrDefault(); if (rt != null) { R.Cast(rt); return; } } }
/// <summary> /// Thats basically provide combo damage /// </summary> /// <param name="spell1">Q Spell</param> /// <param name="spell2">W Spell</param> /// <param name="spell3">E Spell</param> /// <param name="spell4">R Spell</param> /// <param name="unit">Target</param> /// <returns></returns> public static float ComboDamage(this Spell spell1, Spell spell2, Spell spell3, Spell spell4, AIHeroClient unit) { var combodamage = 0f; if (spell1.IsReady()) { combodamage += spell1.GetDamage(unit); } if (spell2.IsReady()) { combodamage += spell2.GetDamage(unit); } if (spell3.IsReady()) { combodamage += spell2.GetDamage(unit); } if (spell4.IsReady()) { combodamage += spell2.GetDamage(unit); } return combodamage; }
/// <summary> /// Thats basically provide combo damage /// </summary> /// <param name="spell1">Q Spell</param> /// <param name="spell2">W Spell</param> /// <param name="spell3">E Spell</param> /// <param name="spell4">R Spell</param> /// <param name="unit">Target</param> /// <returns></returns> public static float ComboDamage(this Spell spell1, Spell spell2, Spell spell3, Spell spell4, AIHeroClient unit) { var combodamage = 0f; if (spell1.IsReady()) { combodamage += spell1.GetDamage(unit); } if (spell2.IsReady()) { combodamage += spell2.GetDamage(unit); } if (spell3.IsReady()) { combodamage += spell2.GetDamage(unit); } if (spell4.IsReady()) { combodamage += spell2.GetDamage(unit); } return(combodamage); }
public void QLogic() { if (!Q.IsReady() || (ObjectManager.Player.Mana < 3 * GetWManaCost() && CanW())) { return; } var shouldntKS = EntityManager.Heroes.Allies.Any( h => h.Position.Distance(ObjectManager.Player.Position) < 600 && !h.IsDead && !h.IsMe); foreach (var hero in ValidTargets.Where(h => h.LSIsValidTarget(925))) { if (shouldntKS && Q.GetDamage(hero) > hero.Health) { continue; } var pred = Prediction.GetPrediction(hero, Q); if (((int)pred.Item1 > (int)HitChance.Medium || hero.HasBuff("SorakaEPacify")) && pred.Item2.Distance(ObjectManager.Player.ServerPosition) < Q.Range) { Q.Cast(pred.Item2); } } }
public static float GetKsDamage(Obj_AI_Hero t, Spell QWER) { var totalDmg = QWER.GetDamage(t); totalDmg -= t.HPRegenRate; if (totalDmg > t.Health) { if (ObjectManager.Player.HasBuff("summonerexhaust")) totalDmg = totalDmg * 0.6f; if (t.HasBuff("ferocioushowl")) totalDmg = totalDmg * 0.7f; if (t.ChampionName == "Blitzcrank" && !t.HasBuff("BlitzcrankManaBarrierCD") && !t.HasBuff("ManaBarrier")) { totalDmg -= t.Mana / 2f; } } //if (Thunderlord && !Player.HasBuff( "masterylordsdecreecooldown")) //totalDmg += (float)Player.CalcDamage(t, Damage.DamageType.Magical, 10 * Player.Level + 0.1 * Player.FlatMagicDamageMod + 0.3 * Player.FlatPhysicalDamageMod); totalDmg += (float)OktwCommon.GetIncomingDamage(t); return totalDmg; }
public static bool IsKillable(this Obj_AI_Base target, LeagueSharp.SDK.Spell spell) { return(spell.GetDamage(target) >= Health.GetPrediction(target, spell.TravelTime(target))); }
public static bool CanKillTarget(this Obj_AI_Base target, LeagueSharp.SDK.Spell spell, int customDelay = 0) { var predictedHealth = Health.GetPrediction(target, customDelay == 0 ? (int)(spell.Delay * 1000f) : customDelay); return(predictedHealth < spell.GetDamage(target) && predictedHealth >= Me.GetAutoAttackDamage(target)); }
/// <summary> /// Thats provide selected spell damage /// </summary> /// <param name="spell">Spell</param> /// <param name="unit">Target</param> /// <returns></returns> public static int GetDamage(this Spell spell, AIHeroClient unit) { return((int)spell.GetDamage(unit)); }
public static bool CanKillTarget(this Obj_AI_Base target, Spell spell, int customDelay = 0) { var predictedHealth = Health.GetPrediction(target, customDelay == 0 ? (int)(spell.Delay * 1000f) : customDelay); return predictedHealth < spell.GetDamage(target) && predictedHealth >= Me.GetAutoAttackDamage(target); }