private bool RLogic(UltimateModeType mode, HitChance hitChance, Obj_AI_Hero target) { try { if (Q.IsCharging || target == null || !Ultimate.IsActive(mode)) { return(false); } var pred = R.GetPrediction(target); if (pred.Hitchance >= hitChance) { var hits = GameObjects.EnemyHeroes.Where(x => x.Distance(target) <= _rSpreadRadius).ToList(); if (Ultimate.Check(mode, hits)) { R.Cast(pred.CastPosition); return(true); } } } catch (Exception ex) { Global.Logger.AddItem(new LogItem(ex)); } return(false); }
private bool RLogic(UltimateModeType mode, HitChance hitChance, Obj_AI_Hero target) { try { if (target == null || !Ultimate.IsActive(mode)) { return(false); } var pred = CPrediction.Circle(R, target, hitChance); if (pred.TotalHits > 0) { if (Ultimate.Check(mode, pred.Hits)) { _lastRCast = Game.Time; _lastRPosition = pred.CastPosition; R.Cast(pred.CastPosition); return(true); } } } catch (Exception ex) { Global.Logger.AddItem(new LogItem(ex)); } return(false); }
private void RLogicSingle(UltimateModeType mode, HitChance hitChance) { try { if (Ultimate.ShouldSingle(mode)) { return; } foreach (var t in GameObjects.EnemyHeroes.Where(t => Ultimate.CheckSingle(mode, t))) { var pred = CPrediction.Circle(R, t, hitChance); if (pred.TotalHits > 0) { _lastRCast = Game.Time; _lastRPosition = pred.CastPosition; R.Cast(pred.CastPosition); break; } } } catch (Exception ex) { Global.Logger.AddItem(new LogItem(ex)); } }
private bool RLogic(HitChance hitChance, int min, bool q, bool w, bool e, UltimateModeType mode = UltimateModeType.Combo) { try { foreach (var target in Targets.Where(t => R.CanCast(t))) { var pred = R.GetPrediction(target, true); if (pred.Hitchance >= hitChance) { var hits = GameObjects.EnemyHeroes.Where(enemy => R.WillHit(enemy, pred.CastPosition)).ToList(); if (UltimateManager.Check(mode, min, hits, hero => CalcComboDamage(hero, q, w, e, true))) { R.Cast(pred.CastPosition); return(true); } } } } catch (Exception ex) { Global.Logger.AddItem(new LogItem(ex)); } return(false); }
private bool RLogic(Obj_AI_Hero target, HitChance hitChance, int min, bool q, bool e, UltimateModeType mode = UltimateModeType.Combo) { try { if (Q.IsCharging || target == null) { return(false); } var pred = R.GetPrediction(target); if (pred.Hitchance >= hitChance) { var hits = GameObjects.EnemyHeroes.Where(x => x.Distance(target) <= _rSpreadRadius).ToList(); if (UltimateManager.Check(mode, min, hits, hero => CalcComboDamage(hero, q, e, true))) { R.Cast(pred.CastPosition); return(true); } } } catch (Exception ex) { Global.Logger.AddItem(new LogItem(ex)); } return(false); }
private void RLogicSingle(UltimateModeType mode) { try { if (Ultimate.ShouldSingle(mode)) { foreach (var target in GameObjects.EnemyHeroes.Where( t => Ultimate.CheckSingle(mode, t) && (R.GetDamage(t) * 0.95f > t.Health || t.Distance(Player) + 300 < Orbwalking.GetRealAutoAttackRange(t) * 0.8f))) { var hits = GetRHits(target); if (hits.Item1 > 0) { R.Cast(hits.Item3); break; } } } } catch (Exception ex) { Global.Logger.AddItem(new LogItem(ex)); } }
public bool CheckSingle(UltimateModeType mode, Obj_AI_Hero target) { try { if (_menu == null || target == null || !target.IsValidTarget()) { return(false); } if (ShouldSingle(mode)) { var minHealth = _menu.Item(_menu.Name + ".ultimate.single.min-health").GetValue <Slider>().Value; if (Spells != null && !Spells.Any( s => s.Slot != SpellSlot.R && s.IsReady() && s.IsInRange(target) && s.GetDamage(target, 1) > 10 && Math.Abs(s.Speed - float.MaxValue) < 1 || s.From.Distance(target.ServerPosition) / s.Speed + s.Delay <= 1.0f)) { minHealth = 0; } if (target.HealthPercent < minHealth) { return(false); } var alliesMax = _menu.Item(_menu.Name + ".ultimate.single.max-allies").GetValue <Slider>().Value; var enemiesMax = _menu.Item(_menu.Name + ".ultimate.single.max-enemies").GetValue <Slider>().Value; var pos = ObjectManager.Player.Position.Extend( target.Position, ObjectManager.Player.Distance(target) / 2f); var aCount = GameObjects.AllyHeroes.Count(h => h.IsValid && !h.IsMe && !h.IsDead && h.Distance(pos) <= 1750); var eCount = GameObjects.EnemyHeroes.Count( h => h.IsValid && !h.IsDead && h.IsVisible && h.Distance(pos) <= 1750); if (aCount > alliesMax || eCount > enemiesMax) { return(false); } if (DamageCalculation != null) { if (GetDamage(target, mode, 1) < target.Health) { return(false); } } return(true); } } catch (Exception ex) { Global.Logger.AddItem(new LogItem(ex)); } return(false); }
private string GetModeString(UltimateModeType mode, bool overrideFlash) { if (overrideFlash && mode == UltimateModeType.Flash) { mode = UltimateModeType.Assisted; } return(mode.ToString().ToLower()); }
public bool ShouldMove(UltimateModeType mode) { if (_menu != null) { var enabled = _menu.Item(_menu.Name + ".ultimate." + GetModeString(mode, true) + ".move-cursor"); return(enabled != null && enabled.GetValue <bool>()); } return(false); }
public bool ShouldSingle(UltimateModeType mode) { if (_menu != null) { var enabled = _menu.Item(_menu.Name + ".ultimate.single." + GetModeString(mode, false)); return(enabled != null && enabled.GetValue <bool>()); } return(false); }
public static bool Check(UltimateModeType mode, int min, List <Obj_AI_Hero> hits, Func <Obj_AI_Hero, float> calcDamage = null) { try { var modeString = mode.ToString().ToLower(); if (_menu == null || hits == null || !hits.Any()) { return(false); } if (_force && HeroListManager.Enabled("ultimate-force")) { var killable = _menu.Item(_menu.Name + ".ultimate.force.combo-killable").GetValue <bool>(); var additional = _menu.Item(_menu.Name + ".ultimate.force.additional").GetValue <Slider>().Value; var damageMulti = (_menu.Item(_menu.Name + ".ultimate.single.damage.percent").GetValue <Slider>().Value / 100f); if ( hits.Any( hit => HeroListManager.Check("ultimate-force", hit) && (!killable || calcDamage == null || calcDamage(hit) * damageMulti > hit.Health)) && hits.Count >= additional + 1) { return(true); } } if (_required && HeroListManager.Enabled("ultimate-required-" + modeString)) { var minReq = _menu.Item(_menu.Name + ".ultimate." + modeString + ".required.min").GetValue <Slider>().Value; var enabledHeroes = HeroListManager.GetEnabledHeroes("ultimate-required-" + modeString); if (minReq > 0 && enabledHeroes.Count > 0) { var count = enabledHeroes.Where( e => !e.IsDead && e.IsVisible && e.Distance(ObjectManager.Player) <= 2000) .Count(e => hits.Any(h => h.NetworkId.Equals(e.NetworkId))); if (count < minReq) { return(false); } } } return(hits.Count >= min); } catch (Exception ex) { Global.Logger.AddItem(new LogItem(ex)); } return(false); }
private bool RLogic(Obj_AI_Hero target, int min, bool q, UltimateModeType mode = UltimateModeType.Combo) { try { var hits = GetRHits(target); if (UltimateManager.Check(mode, min, hits.Item2, hero => CalcComboDamage(hero, q, true))) { R.Cast(hits.Item3); return(true); } return(false); } catch (Exception ex) { Global.Logger.AddItem(new LogItem(ex)); } return(false); }
private bool RLogic(Obj_AI_Hero target, int min, bool q, bool e, UltimateModeType mode = UltimateModeType.Combo) { try { var pred = CPrediction.Circle(R, target, HitChance.High, false); if (pred.TotalHits > 0 && UltimateManager.Check(mode, min, pred.Hits, hero => CalcComboDamage(hero, q, e, true))) { R.Cast(pred.CastPosition); return(true); } return(false); } catch (Exception ex) { Global.Logger.AddItem(new LogItem(ex)); } return(false); }
public float GetDamage(Obj_AI_Hero hero, UltimateModeType mode, int hits = 5) { if (DamageCalculation != null) { try { var dmgMultiplicator = _menu.Item(_menu.Name + ".ultimate.damage-percent" + (hits <= 1 ? "-single" : string.Empty)) .GetValue <Slider>() .Value / 100; return(DamageCalculation(hero, dmgMultiplicator, mode != UltimateModeType.Flash) * dmgMultiplicator); } catch (Exception ex) { Global.Logger.AddItem(new LogItem(ex)); } } return(0f); }
private bool RLogic(UltimateModeType mode, Obj_AI_Hero target) { try { if (_ultimate.IsActive(mode)) { var pred = CPrediction.Circle(R, target, HitChance.High, false); if (pred.TotalHits > 0 && _ultimate.Check(mode, pred.Hits)) { R.Cast(pred.CastPosition); return(true); } } } catch (Exception ex) { Global.Logger.AddItem(new LogItem(ex)); } return(false); }
private bool RLogic(UltimateModeType mode, AIHeroClient target) { try { if (Ultimate.IsActive(mode)) { var pred = CPrediction.Line(R, target, R.GetHitChance("combo")); if (pred.TotalHits > 0 && Ultimate.Check(mode, pred.Hits)) { R.Cast(pred.CastPosition); return(true); } } } catch (Exception ex) { Global.Logger.AddItem(new LogItem(ex)); } return(false); }
private bool RLogic(UltimateModeType mode, Obj_AI_Hero target) { try { if (_ultimate.IsActive(mode)) { var hits = GetRHits(target); if (_ultimate.Check(mode, hits.Item2)) { R.Cast(hits.Item3); return(true); } } } catch (Exception ex) { Global.Logger.AddItem(new LogItem(ex)); } return(false); }
private void RLogicSingle(UltimateModeType mode) { try { if (_ultimate.ShouldSingle(mode)) { foreach (var target in GameObjects.EnemyHeroes.Where(t => _ultimate.CheckSingle(mode, t))) { var pred = CPrediction.Circle(R, target, HitChance.High, false); if (pred.TotalHits > 0) { R.Cast(pred.CastPosition); break; } } } } catch (Exception ex) { Global.Logger.AddItem(new LogItem(ex)); } }
private bool RLogic(UltimateModeType mode, Obj_AI_Hero target) { try { if (Ultimate.IsActive(mode)) { var hits = GetRHits(target); if (Ultimate.Check(mode, hits.Item2) && (hits.Item2.Any(h => R.GetDamage(h) * 0.95f > h.Health) || hits.Item2.Any(h => h.Distance(Player) + 300 < Orbwalking.GetRealAutoAttackRange(h) * 0.9f))) { R.Cast(hits.Item3); return(true); } } } catch (Exception ex) { Global.Logger.AddItem(new LogItem(ex)); } return(false); }
private void RLogicSingle(UltimateModeType mode) { try { if (_ultimate.ShouldSingle(mode)) { foreach (var target in GameObjects.EnemyHeroes.Where(t => _ultimate.CheckSingle(mode, t))) { var hits = GetRHits(target); if (hits.Item1 > 0) { R.Cast(hits.Item3); break; } } } } catch (Exception ex) { Global.Logger.AddItem(new LogItem(ex)); } }
private bool RLogic(UltimateModeType mode, HitChance hitChance) { try { if (Ultimate.IsActive(mode)) { var maxHits = GetMaxRHits(hitChance); if (maxHits.Item1.Count > 0 && !maxHits.Item2.Equals(Vector3.Zero)) { if (Ultimate.Check(mode, maxHits.Item1)) { R.Cast(maxHits.Item2); return(true); } } } } catch (Exception ex) { Global.Logger.AddItem(new LogItem(ex)); } return(false); }
/// <summary> /// Attempts to cast the ultimate on a group of targets /// </summary> /// <param name="mode"></param> /// <param name="target"></param> /// <returns></returns> private bool CastUltimate(UltimateModeType mode, Obj_AI_Hero target) { try { if (!_ultimateManager.IsActive(mode)) { return(false); } var hits = GetUltimateExplosionHits(target); if (_ultimateManager.Check(mode, hits.Item2)) { R.Cast(hits.Item3); return(true); } } catch (Exception ex) { Global.Logger.AddItem(new LogItem(ex)); } return(false); }
private void RLogicSingle(UltimateModeType mode, HitChance hitChance) { try { if (Q.IsCharging || !Ultimate.ShouldSingle(mode)) { return; } foreach (var t in GameObjects.EnemyHeroes.Where(t => Ultimate.CheckSingle(mode, t))) { var pred = R.GetPrediction(t); if (pred.Hitchance >= hitChance) { R.Cast(pred.CastPosition); break; } } } catch (Exception ex) { Global.Logger.AddItem(new LogItem(ex)); } }
public bool IsActive(UltimateModeType mode, Obj_AI_Hero hero = null) { if (_menu != null) { if (mode == UltimateModeType.Combo) { return(Combo && _menu.Item(_menu.Name + ".ultimate.combo.enabled").GetValue <bool>()); } if (mode == UltimateModeType.Auto) { return(Auto && _menu.Item(_menu.Name + ".ultimate.auto.enabled").GetValue <bool>()); } if (mode == UltimateModeType.Flash) { return(Flash && Assisted && _menu.Item(_menu.Name + ".ultimate.assisted.enabled").GetValue <bool>() && _menu.Item(_menu.Name + ".ultimate.flash.hotkey").GetValue <KeyBind>().Active); } if (mode == UltimateModeType.Assisted) { return(Assisted && _menu.Item(_menu.Name + ".ultimate.assisted.enabled").GetValue <bool>() && _menu.Item(_menu.Name + ".ultimate.assisted.hotkey").GetValue <KeyBind>().Active); } if (mode == UltimateModeType.Interrupt) { return(Auto && Interrupt && hero != null && _menu.Item(_menu.Name + ".ultimate.auto.enabled").GetValue <bool>() && HeroListManager.Check("ultimate-interrupt", hero)); } if (mode == UltimateModeType.Gapcloser) { return(Auto && Gapcloser && hero != null && _menu.Item(_menu.Name + ".ultimate.auto.enabled").GetValue <bool>() && HeroListManager.Check("ultimate-gapcloser", hero)); } } return(false); }
/// <summary> /// Attempts to cast the ultimate on a single target /// </summary> /// <param name="mode"></param> /// <returns></returns> private void CastUltimateSingle(UltimateModeType mode) { try { if (!_ultimateManager.ShouldSingle(mode)) { return; } foreach (var target in GameObjects.EnemyHeroes.Where(t => _ultimateManager.CheckSingle(mode, t))) { var hits = GetUltimateExplosionHits(target); if (hits.Item1 > 0) { R.Cast(hits.Item3); return; } } } catch (Exception ex) { Global.Logger.AddItem(new LogItem(ex)); } }
private void RLogicSingle(UltimateModeType mode, HitChance hitChance, bool face = true) { try { if (Ultimate.ShouldSingle(mode)) { foreach (var target in Targets.Where( t => (!face || t.IsFacing(Player)) && R.CanCast(t) && Ultimate.CheckSingle(mode, t))) { var pred = R.GetPrediction(target, true); if (pred.Hitchance >= hitChance) { R.Cast(pred.CastPosition); break; } } } } catch (Exception ex) { Global.Logger.AddItem(new LogItem(ex)); } }
private string GetModeString(UltimateModeType mode) { if (mode == UltimateModeType.Flash) { mode = UltimateModeType.Assisted; } return mode.ToString().ToLower(); }
private bool RLogic(HitChance hitChance, int min, bool q, bool w, bool e, UltimateModeType mode = UltimateModeType.Combo) { try { foreach (var target in Targets.Where(t => R.CanCast(t))) { var pred = R.GetPrediction(target, true); if (pred.Hitchance >= hitChance) { var hits = GameObjects.EnemyHeroes.Where(enemy => R.WillHit(enemy, pred.CastPosition)).ToList(); if (UltimateManager.Check(mode, min, hits, hero => CalcComboDamage(hero, q, w, e, true))) { R.Cast(pred.CastPosition); return true; } } } } catch (Exception ex) { Global.Logger.AddItem(new LogItem(ex)); } return false; }
public bool Check(UltimateModeType mode, List<Obj_AI_Hero> hits) { try { var modeString = GetModeString(mode, true); if (_menu == null || hits == null || !hits.Any(h => h.IsValidTarget())) { return false; } if (IsActive(mode)) { if (mode != UltimateModeType.Gapcloser && mode != UltimateModeType.Interrupt) { if (Force && HeroListManager.Enabled("ultimate-force")) { var dmgCheck = DamageCalculation != null && _menu.Item(_menu.Name + ".ultimate.force.damage-check").GetValue<bool>(); var additional = _menu.Item(_menu.Name + ".ultimate.force.additional").GetValue<Slider>().Value + 1; if ( hits.Any( hit => HeroListManager.Check("ultimate-force", hit) && hits.Count >= additional && (!dmgCheck || GetDamage(hit, mode, additional) >= hit.Health))) { return true; } } if (Required && HeroListManager.Enabled("ultimate-required-" + modeString)) { var minReq = _menu.Item(_menu.Name + ".ultimate.required." + modeString + ".min") .GetValue<Slider>() .Value; var enabledHeroes = HeroListManager.GetEnabledHeroes("ultimate-required-" + modeString); if (minReq > 0 && enabledHeroes.Count > 0) { var count = enabledHeroes.Where( e => !e.IsDead && e.IsVisible && e.Distance(ObjectManager.Player) <= 2000) .Count(e => hits.Any(h => h.NetworkId.Equals(e.NetworkId))); if (count < minReq) { return false; } } } if (DamageCalculation != null && _menu.Item(_menu.Name + ".ultimate." + modeString + ".damage-check").GetValue<bool>()) { if (hits.All(h => GetDamage(h, mode, hits.Count) < h.Health)) { return false; } } return hits.Count >= GetMinHits(mode); } return true; } } catch (Exception ex) { Global.Logger.AddItem(new LogItem(ex)); } return false; }
public int GetMinHits(UltimateModeType mode) { return _menu.Item(_menu.Name + ".ultimate." + GetModeString(mode, false) + ".min").GetValue<Slider>().Value; }
public bool ShouldSingle(UltimateModeType mode) { if (_menu != null) { var enabled = _menu.Item(_menu.Name + ".ultimate.single." + GetModeString(mode, false)); return enabled != null && enabled.GetValue<bool>(); } return false; }
private string GetModeString(UltimateModeType mode, bool overrideFlash) { if (overrideFlash && mode == UltimateModeType.Flash) { mode = UltimateModeType.Assisted; } return mode.ToString().ToLower(); }
private bool RLogic(UltimateModeType mode, Obj_AI_Hero target, bool simulated = false) { try { if (!R.Instance.Name.Equals("ViktorChaosStorm", StringComparison.OrdinalIgnoreCase) || !_ultimate.IsActive(mode)) { return false; } var pred = CPrediction.Circle(R, target, HitChance.High, false); if (pred.TotalHits > 0 && _ultimate.Check(mode, pred.Hits)) { if (!simulated) { R.Cast(pred.CastPosition); var aaTarget = TargetSelector.GetTargets(Player.AttackRange + Player.BoundingRadius * 3f) .FirstOrDefault(Orbwalking.InAutoAttackRange); if (aaTarget != null) { Orbwalker.ForceTarget(aaTarget); } } return true; } } catch (Exception ex) { Global.Logger.AddItem(new LogItem(ex)); } return false; }
private bool RLogic(UltimateModeType mode, HitChance hitChance) { try { if (Ultimate.IsActive(mode)) { var maxHits = GetMaxRHits(hitChance); if (maxHits.Item1.Count > 0 && !maxHits.Item2.Equals(Vector3.Zero)) { if (Ultimate.Check(mode, maxHits.Item1)) { R.Cast(maxHits.Item2); return true; } } } } catch (Exception ex) { Global.Logger.AddItem(new LogItem(ex)); } return false; }
private bool RLogic(UltimateModeType mode, Obj_AI_Hero target) { try { if (_ultimate.IsActive(mode)) { var pred = CPrediction.Circle(R, target, HitChance.High, false); if (pred.TotalHits > 0 && _ultimate.Check(mode, pred.Hits)) { R.Cast(pred.CastPosition); return true; } } } catch (Exception ex) { Global.Logger.AddItem(new LogItem(ex)); } return false; }
public int GetMinHits(UltimateModeType mode) { return(_menu.Item(_menu.Name + ".ultimate." + GetModeString(mode, false) + ".min").GetValue <Slider>().Value); }
private bool RLogic(UltimateModeType mode, HitChance hitChance, Obj_AI_Hero target) { try { if (target == null || !Ultimate.IsActive(mode)) { return false; } var pred = CPrediction.Circle(R, target, hitChance); if (pred.TotalHits > 0) { if (Ultimate.Check(mode, pred.Hits)) { _lastRCast = Game.Time; _lastRPosition = pred.CastPosition; R.Cast(pred.CastPosition); return true; } } } catch (Exception ex) { Global.Logger.AddItem(new LogItem(ex)); } return false; }
private bool RLogic(UltimateModeType mode, Obj_AI_Hero target, bool simulated = false) { try { if (!R.Instance.Name.Equals("ViktorChaosStorm", StringComparison.OrdinalIgnoreCase) || !Ultimate.IsActive(mode)) { return false; } var pred = CPrediction.Circle(R, target, HitChance.High, false); if (pred.TotalHits > 0 && Ultimate.Check(mode, pred.Hits)) { if (!simulated) { R.Cast(pred.CastPosition); if (Orbwalking.InAutoAttackRange(target)) { Orbwalker.ForceTarget(target); } } return true; } } catch (Exception ex) { Global.Logger.AddItem(new LogItem(ex)); } return false; }
private bool RLogic(UltimateModeType mode, Obj_AI_Hero target) { try { if (Ultimate.IsActive(mode)) { var hits = GetRHits(target); if (Ultimate.Check(mode, hits.Item2)) { R.Cast(hits.Item3); return true; } } } catch (Exception ex) { Global.Logger.AddItem(new LogItem(ex)); } return false; }
public bool IsActive(UltimateModeType mode, Obj_AI_Hero hero = null) { if (_menu != null) { if (mode == UltimateModeType.Combo) { return Combo && _menu.Item(_menu.Name + ".ultimate.combo.enabled").GetValue<bool>(); } if (mode == UltimateModeType.Auto) { return Auto && _menu.Item(_menu.Name + ".ultimate.auto.enabled").GetValue<bool>(); } if (mode == UltimateModeType.Flash) { return Flash && Assisted && _menu.Item(_menu.Name + ".ultimate.assisted.enabled").GetValue<bool>() && _menu.Item(_menu.Name + ".ultimate.flash.hotkey").GetValue<KeyBind>().Active; } if (mode == UltimateModeType.Assisted) { return Assisted && _menu.Item(_menu.Name + ".ultimate.assisted.enabled").GetValue<bool>() && _menu.Item(_menu.Name + ".ultimate.assisted.hotkey").GetValue<KeyBind>().Active; } if (mode == UltimateModeType.Interrupt) { return Auto && Interrupt && hero != null && _menu.Item(_menu.Name + ".ultimate.auto.enabled").GetValue<bool>() && HeroListManager.Check("ultimate-interrupt", hero); } if (mode == UltimateModeType.Gapcloser) { return Auto && Gapcloser && hero != null && _menu.Item(_menu.Name + ".ultimate.auto.enabled").GetValue<bool>() && HeroListManager.Check("ultimate-gapcloser", hero); } } return false; }
private bool RLogicSingle(UltimateModeType mode, bool simulated = false) { try { if (!R.Instance.Name.Equals("ViktorChaosStorm", StringComparison.OrdinalIgnoreCase) || !_ultimate.ShouldSingle(mode)) { return false; } foreach (var target in GameObjects.EnemyHeroes.Where(t => _ultimate.CheckSingle(mode, t))) { var pred = CPrediction.Circle(R, target, HitChance.High, false); if (pred.TotalHits > 0) { if (!simulated) { R.Cast(pred.CastPosition); if (Orbwalking.InAutoAttackRange(target)) { Orbwalker.ForceTarget(target); } } return true; } } } catch (Exception ex) { Global.Logger.AddItem(new LogItem(ex)); } return false; }
public bool ShouldMove(UltimateModeType mode) { if (_menu != null) { var enabled = _menu.Item(_menu.Name + ".ultimate." + GetModeString(mode, true) + ".move-cursor"); return enabled != null && enabled.GetValue<bool>(); } return false; }
private bool RLogic(UltimateModeType mode, HitChance hitChance, Obj_AI_Hero target) { try { if (Q.IsCharging || target == null || !_ultimate.IsActive(mode)) { return false; } var pred = R.GetPrediction(target); if (pred.Hitchance >= hitChance) { var hits = GameObjects.EnemyHeroes.Where(x => x.Distance(target) <= _rSpreadRadius).ToList(); if (_ultimate.Check(mode, hits)) { R.Cast(pred.CastPosition); return true; } } } catch (Exception ex) { Global.Logger.AddItem(new LogItem(ex)); } return false; }
public float GetDamage(Obj_AI_Hero hero, UltimateModeType mode, int hits = 5) { if (DamageCalculation != null) { try { var dmgMultiplicator = _menu.Item(_menu.Name + ".ultimate.damage-percent" + (hits <= 1 ? "-single" : string.Empty)) .GetValue<Slider>() .Value / 100; return DamageCalculation(hero, dmgMultiplicator, mode != UltimateModeType.Flash) * dmgMultiplicator; } catch (Exception ex) { Global.Logger.AddItem(new LogItem(ex)); } } return 0f; }
private bool RLogic(Obj_AI_Hero target, HitChance hitChance, int min, bool q, bool e, UltimateModeType mode = UltimateModeType.Combo) { try { if (Q.IsCharging || target == null) { return false; } var pred = R.GetPrediction(target); if (pred.Hitchance >= hitChance) { var hits = GameObjects.EnemyHeroes.Where(x => x.Distance(target) <= _rSpreadRadius).ToList(); if (UltimateManager.Check(mode, min, hits, hero => CalcComboDamage(hero, q, e, true))) { R.Cast(pred.CastPosition); return true; } } } catch (Exception ex) { Global.Logger.AddItem(new LogItem(ex)); } return false; }
public bool CheckSingle(UltimateModeType mode, Obj_AI_Hero target) { try { if (_menu == null || target == null || !target.IsValidTarget()) { return false; } if (ShouldSingle(mode)) { var minHealth = _menu.Item(_menu.Name + ".ultimate.single.min-health").GetValue<Slider>().Value; if (Spells != null && !Spells.Any( s => s.Slot != SpellSlot.R && s.IsReady() && s.IsInRange(target) && s.GetDamage(target, 1) > 10 && Math.Abs(s.Speed - float.MaxValue) < 1 || s.From.Distance(target.ServerPosition) / s.Speed + s.Delay <= 1.0f)) { minHealth = 0; } if (target.HealthPercent < minHealth) { return false; } var alliesRange = _menu.Item(_menu.Name + ".ultimate.single.range-allies").GetValue<Slider>().Value; var alliesMax = _menu.Item(_menu.Name + ".ultimate.single.max-add-allies").GetValue<Slider>().Value; var enemiesRange = _menu.Item(_menu.Name + ".ultimate.single.range-allies").GetValue<Slider>().Value; var enemiesMax = _menu.Item(_menu.Name + ".ultimate.single.max-add-enemies").GetValue<Slider>().Value; var pos = ObjectManager.Player.Position.Extend( target.Position, ObjectManager.Player.Distance(target) / 2f); var aCount = GameObjects.AllyHeroes.Count( h => h.IsValid && !h.IsDead && !h.IsMe && h.Distance(pos) <= alliesRange); var eCount = GameObjects.EnemyHeroes.Count( h => h.IsValid && !h.IsDead && h.IsVisible && h.NetworkId != target.NetworkId && h.Distance(pos) <= enemiesRange); if (aCount > alliesMax || eCount > enemiesMax) { return false; } if (DamageCalculation != null) { if (GetDamage(target, mode, 1) < target.Health) { return false; } } return true; } } catch (Exception ex) { Global.Logger.AddItem(new LogItem(ex)); } return false; }
private void RLogicSingle(UltimateModeType mode, HitChance hitChance) { try { if (Q.IsCharging || !_ultimate.ShouldSingle(mode)) { return; } foreach (var t in GameObjects.EnemyHeroes.Where(t => _ultimate.CheckSingle(mode, t))) { var pred = R.GetPrediction(t); if (pred.Hitchance >= hitChance) { R.Cast(pred.CastPosition); break; } } } catch (Exception ex) { Global.Logger.AddItem(new LogItem(ex)); } }
private void RLogicSingle(UltimateModeType mode) { try { if (Ultimate.ShouldSingle(mode)) { foreach (var target in GameObjects.EnemyHeroes.Where(t => Ultimate.CheckSingle(mode, t))) { var hits = GetRHits(target); if (hits.Item1 > 0) { R.Cast(hits.Item3); break; } } } } catch (Exception ex) { Global.Logger.AddItem(new LogItem(ex)); } }
private bool RLogic(Obj_AI_Hero target, int min, bool q, bool e, UltimateModeType mode = UltimateModeType.Combo) { try { var pred = CPrediction.Circle(R, target, HitChance.High, false); if (pred.TotalHits > 0 && UltimateManager.Check(mode, min, pred.Hits, hero => CalcComboDamage(hero, q, e, true))) { R.Cast(pred.CastPosition); return true; } return false; } catch (Exception ex) { Global.Logger.AddItem(new LogItem(ex)); } return false; }
private bool RLogic(int min, bool q, bool w, bool e, UltimateModeType mode = UltimateModeType.Combo) { try { var hits = GetHits(R); if (UltimateManager.Check(mode, min, hits.Item2, hero => CalcComboDamage(hero, q, w, e, true))) { R.Cast(Player.Position); return true; } return false; } catch (Exception ex) { Global.Logger.AddItem(new LogItem(ex)); } return false; }
private bool RLogic(UltimateModeType mode) { try { if (_ultimate.IsActive(mode)) { var hits = GetHits(R); if (hits.Item1 > 0 && _ultimate.Check(mode, hits.Item2)) { R.Cast(Ball.Position); return true; } } } catch (Exception ex) { Global.Logger.AddItem(new LogItem(ex)); } return false; }
public bool CheckSingle(UltimateModeType mode, Obj_AI_Hero target) { try { var modeString = GetModeString(mode); if (_menu == null || target == null || !target.IsValidTarget()) { return false; } if (ShouldSingle(mode)) { var minHealth = _menu.Item(_menu.Name + ".ultimate.single.min-health").GetValue<Slider>().Value; if (target.HealthPercent < minHealth) { return false; } var alliesMax = _menu.Item(_menu.Name + ".ultimate.single.max-allies").GetValue<Slider>().Value; var enemiesMax = _menu.Item(_menu.Name + ".ultimate.single.max-enemies").GetValue<Slider>().Value; var pos = ObjectManager.Player.Position.Extend( target.Position, ObjectManager.Player.Distance(target) / 2f); var aCount = GameObjects.AllyHeroes.Count(h => h.IsValid && !h.IsMe && !h.IsDead && h.Distance(pos) <= 1750); var eCount = GameObjects.EnemyHeroes.Count( h => h.IsValid && !h.IsDead && h.IsVisible && h.Distance(pos) <= 1750); if (aCount > alliesMax || eCount > enemiesMax) { return false; } if (DamageCalculation != null && _menu.Item(_menu.Name + ".ultimate." + modeString + ".damage-check").GetValue<bool>()) { if (GetDamage(target) < target.Health) { return false; } } return true; } } catch (Exception ex) { Global.Logger.AddItem(new LogItem(ex)); } return false; }
public bool Check(UltimateModeType mode, List <Obj_AI_Hero> hits) { try { var modeString = GetModeString(mode, true); if (_menu == null || hits == null || !hits.Any(h => h.IsValidTarget())) { return(false); } if (IsActive(mode)) { if (mode != UltimateModeType.Gapcloser && mode != UltimateModeType.Interrupt) { if (Force && HeroListManager.Enabled("ultimate-force")) { var dmgCheck = DamageCalculation != null && _menu.Item(_menu.Name + ".ultimate.force.damage-check").GetValue <bool>(); var additional = _menu.Item(_menu.Name + ".ultimate.force.additional").GetValue <Slider>().Value + 1; if ( hits.Any( hit => HeroListManager.Check("ultimate-force", hit) && hits.Count >= additional && (!dmgCheck || GetDamage(hit, mode, additional) >= hit.Health))) { return(true); } } if (Required && HeroListManager.Enabled("ultimate-required-" + modeString)) { var minReq = _menu.Item(_menu.Name + ".ultimate.required." + modeString + ".min") .GetValue <Slider>() .Value; var enabledHeroes = HeroListManager.GetEnabledHeroes("ultimate-required-" + modeString); if (minReq > 0 && enabledHeroes.Count > 0) { var count = enabledHeroes.Where( e => !e.IsDead && e.IsVisible && e.Distance(ObjectManager.Player) <= 2000) .Count(e => hits.Any(h => h.NetworkId.Equals(e.NetworkId))); if (count < minReq) { return(false); } } } if (DamageCalculation != null && _menu.Item(_menu.Name + ".ultimate." + modeString + ".damage-check").GetValue <bool>()) { if (hits.All(h => GetDamage(h, mode, hits.Count) < h.Health)) { return(false); } } return(hits.Count >= GetMinHits(mode)); } return(true); } } catch (Exception ex) { Global.Logger.AddItem(new LogItem(ex)); } return(false); }
private bool RLogicSingle(UltimateModeType mode) { try { if (_ultimate.ShouldSingle(mode)) { if ( GameObjects.EnemyHeroes.Where(t => _ultimate.CheckSingle(mode, t)) .Select(target => GetHits(R)) .Any(hits => hits.Item1 > 0)) { R.Cast(Ball.Position); return true; } } } catch (Exception ex) { Global.Logger.AddItem(new LogItem(ex)); } return false; }