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.IsValidTarget(925))) { if (shouldntKS && Q.GetDamage(hero) > hero.Health) { break; } var pred = Q.GetPrediction(hero); if ((int)pred.Hitchance > (int)HitChance.Medium && pred.UnitPosition.Distance(ObjectManager.Player.ServerPosition) < Q.Range) { Q.Cast(hero); } } }
public float getDamageValue(Obj_AI_Hero target) { return(spell.GetDamage(target)); }