float GetAvailableDamage(AIHeroClient target) { if (player.Distance(target) > 3000) // save some fps { return(0); } //bool ExcludeE = false; double totaldmgavailable = 0; if (Q.IsReady()) { totaldmgavailable += Q.GetDamage(target); } if (W.IsReady()) { totaldmgavailable += W.GetDamage(target); } if (E.IsReady() && !LissUtils.CanSecondE() && LissEMissile == null) { totaldmgavailable += E.GetDamage(target); } if (R.IsReady()) { totaldmgavailable += R.GetDamage(target); } return((float)totaldmgavailable); }
private bool CastE(AIHeroClient target) { if (LissEMissile == null && !LissUtils.CanSecondE()) { var pred = E.GetPrediction(target); if (pred.HitChance >= HitChance.High) { E.Cast(pred.CastPosition); return(true); } } return(SecondEChecker(target)); }
public override void farm() { if (player.ManaPercent < 55) { return; } var minions = ObjectManager.Get <Obj_AI_Minion>() .Where( m => m.IsValidTarget() && (Vector3.Distance(m.ServerPosition, player.ServerPosition) <= Q.Range || Vector3.Distance(m.ServerPosition, player.ServerPosition) <= W.Range || Vector3.Distance(m.ServerPosition, player.ServerPosition) <= E.Range)); if (Q.IsReady()) { var KillableMinionsQ = minions.Where(m => m.Health <player.GetSpellDamage(m, SpellSlot.Q) && Vector3.Distance(m.ServerPosition, player.ServerPosition)> player.AttackRange); if (KillableMinionsQ.Any()) { Q.Cast(KillableMinionsQ.FirstOrDefault().ServerPosition); } } if (W.IsReady()) { var KillableMinionsW = minions.Where(m => m.Health < player.GetSpellDamage(m, SpellSlot.W) && Vector3.Distance(player.ServerPosition, m.ServerPosition) < W.Range); if (KillableMinionsW.Any()) { W.CastOnUnit(player); } } if (E.IsReady() && LissEMissile == null && !LissUtils.CanSecondE() && LissEMissile == null) { var KillableMinionsE = minions.Where(m => m.Health <player.GetSpellDamage(m, SpellSlot.E) && Vector3.Distance(m.ServerPosition, player.ServerPosition)> player.AttackRange); if (KillableMinionsE.Any()) { E.Cast(KillableMinionsE.FirstOrDefault().ServerPosition); } } }
public bool IsKillableFromPoint(AIHeroClient target, Vector3 Point, bool ExcludeE = false) { double totaldmgavailable = 0; if (Q.IsReady() && Vector3.Distance(Point, target.ServerPosition) < Q.Range + 35) { totaldmgavailable += player.GetSpellDamage(target, SpellSlot.Q); } if (W.IsReady() && Vector3.Distance(Point, target.ServerPosition) < W.Range + 35) { totaldmgavailable += player.GetSpellDamage(target, SpellSlot.W); } if (E.IsReady() && Vector3.Distance(Point, target.ServerPosition) < E.Range + 35 && !LissUtils.CanSecondE() && LissEMissile == null && !ExcludeE) { totaldmgavailable += player.GetSpellDamage(target, SpellSlot.E); } if (R.IsReady() && Vector3.Distance(Point, target.ServerPosition) < Q.Range + 35) { totaldmgavailable += player.GetSpellDamage(target, SpellSlot.R); } return(totaldmgavailable > target.Health); }