private void ProcessSpell_TwitchSprayandPrayAttack(Obj_AI_Base hero, GameObjectProcessSpellCastEventArgs args, SpellData spellData, SpecialSpellEventArgs specialSpellArgs) { if (spellData.spellName == "TwitchSprayandPrayAttack") { spellData.spellDelay = hero.AttackCastDelay * 1000; } }
public void OnTeleport(Obj_AI_Base sender, Teleport.TeleportEventArgs args) { var enemy = RandomUltUnits.Find(x => x.Unit.NetworkId == sender.NetworkId); if (enemy == null || args.Type != TeleportType.Recall) { return; } var recall = enemy.RecallData; switch (args.Status) { case TeleportStatus.Start: { recall.Status = RecallStatus.Active; recall.Started = Game.Time; recall.Duration = args.Duration; recall.Ended = recall.Started + recall.Duration; break; } case TeleportStatus.Abort: { recall.Status = RecallStatus.Abort; recall.Ended = Game.Time; break; } case TeleportStatus.Finish: { recall.Status = RecallStatus.Finished; recall.Ended = Game.Time; break; } } }
protected override void Volatile_OnTeleport(Obj_AI_Base sender, Teleport.TeleportEventArgs args) { if (args.Type == TeleportType.Recall && sender is AIHeroClient && HackMenu["trackRecalls"].Cast<CheckBox>().CurrentValue && !sender.IsMe) { switch (args.Status) { case TeleportStatus.Abort: foreach (var source in Recalls.Where(r => r.Hero == sender)) { source.Abort(); } break; case TeleportStatus.Start: var recall = Recalls.FirstOrDefault(r => r.Hero == sender); if (recall != null) { Recalls.Remove(recall); } Recalls.Add(new Recall((AIHeroClient) sender, Environment.TickCount, Environment.TickCount + args.Duration, args.Duration)); break; } } }
private static float GetComboDamage(Obj_AI_Base enemy) { var damage = 0d; if (spells[Spells.Q].IsReady()) { damage += Player.GetSpellDamage(enemy, SpellSlot.Q); } if (spells[Spells.W].IsReady()) { damage += Player.GetSpellDamage(enemy, SpellSlot.W); } if (spells[Spells.E].IsReady()) { damage += Player.GetSpellDamage(enemy, SpellSlot.E); } if (spells[Spells.R].IsReady()) { //damage += Player.GetSpellDamage(enemy, SpellSlot.R); damage += enemy.Buffs.Where(buff => buff.Name == "dariushemo").Sum(buff => Player.GetSpellDamage(enemy, SpellSlot.R, 1) * (1 + buff.Count / 5) - 1); } return (float)damage; }
/// <summary> /// Gets auto attack range of given unit /// </summary> /// <param name="_unit">Unit to get aa range</param> /// <returns>Auto attack range of unit</returns> public static float GetAARange(Obj_AI_Base _unit = null) { Obj_AI_Base unit = CorrectUnit(_unit); if (unit.CharData.BaseSkinName == "Azir") return 1000f; return unit.AttackRange + unit.BoundingRadius; }
private static void ProcessSpell_SionE(Obj_AI_Base hero, GameObjectProcessSpellCastEventArgs args, SpellData spellData, SpecialSpellEventArgs specialSpellArgs) { if (spellData.SpellName == "SionE") { var objList = new List<Obj_AI_Minion>(); foreach (var obj in ObjectManager.Get<Obj_AI_Minion>()) { if (obj != null && obj.IsValid && !obj.IsDead && obj.IsAlly) { objList.Add(obj); } } objList.OrderBy(o => o.Distance(hero.ServerPosition)); var spellStart = args.Start.To2D(); var dir = (args.End.To2D() - spellStart).Normalized(); var spellEnd = spellStart + dir * spellData.Range; foreach (var obj in objList) { var objProjection = obj.ServerPosition.To2D().ProjectOn(spellStart, spellEnd); if (objProjection.IsOnSegment && objProjection.SegmentPoint.Distance(obj.ServerPosition.To2D()) < obj.BoundingRadius + spellData.Radius) { //sth happens } } //specialSpellArgs.noProcess = true; } }
private void Obj_AI_Hero_OnAggro(Obj_AI_Base sender, GameObjectAggroEventArgs args) { if (sender.IsEnemy && args.NetworkId == player.NetworkId && !aggroList.Contains(sender.NetworkId)) { aggroList.Add(sender.NetworkId); } }
/// <summary> /// Called on do-cast. /// </summary> /// <param name="sender">The sender.</param> /// <param name="args">The args.</param> public static void Weaving(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args) { if (!(args.Target is AIHeroClient) || Invulnerable.Check(args.Target as AIHeroClient, DamageType.Magical)) { return; } /// <summary> /// The Q Combo Weaving Logic. /// </summary> if (Vars.Q.IsReady() && (args.Target as AIHeroClient).LSIsValidTarget(Vars.Q.Range) && Vars.getCheckBoxItem(Vars.QMenu, "combo")) { Vars.Q.Cast(Vars.Q.GetPrediction(args.Target as AIHeroClient).CastPosition); return; } /// <summary> /// The R Combo Weaving Logic. /// </summary> if (Vars.R.IsReady() && (args.Target as AIHeroClient).HasBuff("dianamoonlight") && (args.Target as AIHeroClient).LSIsValidTarget(Vars.R.Range) && Vars.getCheckBoxItem(Vars.RMenu, "combo")) { Vars.R.CastOnUnit(args.Target as AIHeroClient); } }
public static float GetSpellDamage(this SpellSlot slot, Obj_AI_Base target, int typeOfDamage = 1) { if (target != null) { var level = Util.MyHero.Spellbook.GetSpell(slot).Level; switch (slot) { case SpellSlot.Q: return Util.MyHero.CalculateDamageOnUnit(target, DamageType.Physical, 1.1f * Util.MyHero.TotalAttackDamage); case SpellSlot.W: return Util.MyHero.CalculateDamageOnUnit(target, DamageType.Physical, 10f + 50f * level + 1.4f * Util.MyHero.TotalAttackDamage); case SpellSlot.E: return Util.MyHero.CalculateDamageOnUnit(target, DamageType.Magical, 25f + 55f * level + 1f * Util.MyHero.TotalMagicalDamage); case SpellSlot.R: var percentMod = Math.Min((int)(Vector3.Distance(target.ServerPosition, Util.MyHero.ServerPosition) / 100f) * 6f + 10f, 100f) / 100f; float rawDamage; if (typeOfDamage == 2) { rawDamage = 0.8f * percentMod * (200f + 50f * level + Util.MyHero.TotalAttackDamage + (0.25f + 0.05f * level) * (target.MaxHealth - target.Health)); } else { rawDamage = percentMod * (200f + 50f * level + Util.MyHero.TotalAttackDamage + (0.25f + 0.05f * level) * (target.MaxHealth - target.Health)); } return Util.MyHero.CalculateDamageOnUnit(target, DamageType.Physical, rawDamage); } } return Util.MyHero.GetSpellDamage(target, slot); }
private static void FocusW(Obj_AI_Base target) { if (Player.Instance.Mana < 5) { if (Spells.E.IsReady() && Spells.E.IsInRange(target)) { var ePredict = Spells.E.GetPrediction(target); if (ePredict.HitChancePercent >= 70) { Spells.E.Cast(ePredict.CastPosition); } } if (Spells.Q.IsReady() && Player.Instance.IsInAutoAttackRange(target)) { Spells.Q.Cast(); } if (Spells.W.IsReady() && Player.Instance.IsInAutoAttackRange(target)) { Spells.W.Cast(target); } } else { if (Spells.W.IsReady() && Player.Instance.IsInAutoAttackRange(target)) { Spells.W.Cast(target); } } }
public static bool Contains(Obj_AI_Base unit, GameObjectProcessSpellCastEventArgs args) { var name = unit.CharData.BaseSkinName; var slot = unit.GetSpellSlot(args); if (!List.ContainsKey(name) || !Program.Menu.Item(name).IsActive()) { return false; } var correctSlot = List[name].Equals(slot); if (args.SData.IsAutoAttack()) { if (name.Equals("Blitzcrank")) {} } if (name.Equals("Jayce")) { correctSlot = correctSlot && unit.CharData.BaseSkinName.Equals("JayceHammerForm"); } if (name.Equals("LeBlanc")) { correctSlot = args.SData.Name.Equals("LeblancChaosOrbM"); } if (name.Equals("Lissandra")) { //correctSlot = spellslot 48 } //Game.PrintChat("{0} {1} {2}", name, slot, active); return correctSlot; }
private float GetComboDamage(Obj_AI_Base target) { float damage = 0f; if (GeassLib.Functions.Calculations.Damage.CheckNoDamageBuffs((Obj_AI_Hero)target))return damage; //if (!Champion.Player.IsWindingUp) // can auto attack // if (Champion.Player.Distance(target) < Champion.Player.AttackRange) // target in auto range // damage += (float)Champion.Player.GetAutoAttackDamage(target) - 50; if (Champion.GetSpellR.IsReady()) if (Champion.Player.Distance(target) < Champion.GetSpellR.Range) damage += Champion.GetSpellR.GetDamage(target); if (target.HasBuff("tristanaecharge")) { int count = target.GetBuffCount("tristanaecharge"); if (!Champion.Player.IsWindingUp) if (Champion.Player.Distance(target) < Champion.Player.AttackRange) // target in auto range count++; damage += (float)(Champion.GetSpellE.GetDamage(target) * (count * 0.30)) + Champion.GetSpellE.GetDamage(target); return damage; } if (Champion.GetSpellE.IsReady()) if (Champion.Player.Distance(target) < Champion.GetSpellE.Range) damage += (float)(Champion.GetSpellE.GetDamage(target) * 0.30) + Champion.GetSpellE.GetDamage(target); // 1 auto charge return damage; }
public static void CastSpellQShot(Obj_AI_Base target, int spellAoE) { var po = Q.GetPrediction(target); if (po.CollisionObjects.Count > 0) { var firstCol = po.CollisionObjects.OrderBy(unit => unit.Distance(Player.ServerPosition)).First(); if (firstCol.IsValidTarget() && (/*firstCol.Distance(target.ServerPosition) < spellAoE ||*/ firstCol.Distance(po.UnitPosition) < spellAoE)) { if(firstCol.Type == GameObjectType.obj_AI_Hero) if (Program.Config.Item("MURAMANA").GetValue<bool>() && (Items.HasItem(ItemData.Muramana.Id) || Items.HasItem(ItemData.Muramana2.Id))) { if (!Player.HasBuff("Muramana")) { Items.UseItem(ItemData.Muramana.Id); Items.UseItem(ItemData.Muramana2.Id); } } Q.Cast(po.CastPosition); } } else { if (Program.Config.Item("MURAMANA").GetValue<bool>() && (Items.HasItem(ItemData.Muramana.Id) || Items.HasItem(ItemData.Muramana2.Id))) { if (!Player.HasBuff("Muramana")) { Items.UseItem(ItemData.Muramana.Id); Items.UseItem(ItemData.Muramana2.Id); } } Q.Cast(po.CastPosition); } }
public static float GetTotalDamage(Obj_AI_Base target) { // Auto attack damage double damage = Player.GetAutoAttackDamage(target); // Q damage if (SpellManager.Q.IsReady()) { damage += Player.GetSpellDamage(target, SpellSlot.Q); } // E stack damage with ally ult on enemy if (SpellManager.E.IsReady() && target.HasBuff("FerociousHowl")) { damage += SpellManager.E.GetDamage(target) * 0.7; } // E stack damage with exhaust on player if (SpellManager.E.IsReady() && Player.HasBuff("summonerexhaust")) { damage += SpellManager.E.GetDamage(target) * 0.4; } // E stack damage if (SpellManager.E.IsReady()) { damage += SpellManager.E.GetDamage(target); } return (float)damage; }
public static void SpellCast(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args) { if (!sender.IsMe) return; if ((Orbwalker.ActiveModesFlags.HasFlag(Orbwalker.ActiveModes.LaneClear) && Manager.MenuManager.UseQLC && Variables._Player.ManaPercent >= Manager.MenuManager.UseQLCMana) && Manager.SpellManager.Q.IsReady()) { if (Orbwalker.CanAutoAttack) { return; } foreach (var minion in EntityManager.MinionsAndMonsters.GetLaneMinions(EntityManager.UnitTeam.Enemy, Variables._Player.ServerPosition, Variables._Player.GetAutoAttackRange())) { if (minion == null) return; var dmg = Variables._Player.GetSpellDamage(minion, SpellSlot.Q) + Variables._Player.GetAutoAttackDamage(minion); if (Prediction.Health.GetPrediction(minion, (int)(Variables._Player.AttackDelay * 1000)) <= dmg / 2 && (Orbwalker.LastTarget == null || Orbwalker.LastTarget.NetworkId != minion.NetworkId)) { Player.CastSpell(SpellSlot.Q, Game.CursorPos); } } } }
public static void OnInterruptableSpell(Obj_AI_Base sender, Interrupter.InterruptableSpellEventArgs args) { if (sender.IsEnemy && !sender.IsMinion && args.EndTime > Soraka.E.CastDelay) { Soraka.E.Cast(sender); } }
public static float GetDragonReduction(Obj_AI_Base target) { return Player.HasBuff("s5test_dragonslayerbuff") ? SpellManager.E.GetDamage(target) * (1 - (.07f * Player.GetBuffCount("s5test_dragonslayerbuff"))) : SpellManager.E.GetDamage(target); }
public static float DamageBySpell(Obj_AI_Base Enemy, SpellSlot Slot) { float Damage = 0f; switch (Slot) { case SpellSlot.Q: if (Q.IsReady()) { Damage += new float[] { 80, 115, 150, 185, 220}[Player.GetSpell(Slot).Level -1] + (0.8f * me.FlatMagicDamageMod); } break; case SpellSlot.W: if (W.IsReady()) { Damage += new float[] { 70, 115, 160, 205, 250 }[Player.GetSpell(Slot).Level - 1] + (0.85f * me.FlatMagicDamageMod); } break; case SpellSlot.R: if (R.IsReady()) { Damage += new float[] { 150, 275, 400 }[Player.GetSpell(Slot).Level - 1] + (0.65f * me.FlatMagicDamageMod); } break; } return Player.Instance.CalculateDamageOnUnit(Enemy, DamageType.Magical, Damage); }
private void Obj_AI_Base_OnProcessSpellCast(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args) { if (sender.IsEnemy && sender is Obj_AI_Hero && sender.Distance(Player.Position) < 800) { switch (args.SData.Name) { case "akalismokebomb": CastVisionWards(sender.ServerPosition); break; case "deceive": CastVisionWards(sender.ServerPosition); break; case "khazixr": CastVisionWards(sender.ServerPosition); break; case "khazixrlong": CastVisionWards(sender.ServerPosition); break; case "talonshadowassault": CastVisionWards(sender.ServerPosition); break; case "monkeykingdecoy": CastVisionWards(sender.ServerPosition); break; case "RengarR": CastVisionWards(sender.ServerPosition); break; case "TwitchHideInShadows": CastVisionWards(sender.ServerPosition); break; } } }
internal static void SpellCast(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args) { if (!Helper.GetBool("Evade.WTS", YasuoMenu.EvadeM) || sender.IsAlly || !SpellSlot.W.IsReady() || (!Helper.GetBool("Evade.FOW", YasuoMenu.EvadeM) && !sender.IsVisible)) { return; } if (args.SData.Name.Equals("MissFortuneBulletTime")) { var ssdata = GetSpell(args.SData.Name); if (ssdata.IsEnabled) { var end = args.Start.LSTo2D().LSExtend(args.End.LSTo2D(), 1400); EvadeA.Geometry.Rectangle rect = new EvadeA.Geometry.Rectangle(args.Start.LSTo2D(), end, args.SData.LineWidth); var topoly = rect.ToPolygon(); var newls = new LittleStruct { poly = topoly, argss = args, RealEndPos = end, StartTick = YasuoEvade.TickCount, data = ssdata }; DetectedPolygons.Add(newls); LeagueSharp.Common.Utility.DelayAction.Add(3000, () => DetectedPolygons.Clear()); } } if (!args.Target.IsMe) { return; } //Console.WriteLine(args.SData.Name + " " + sender.BaseSkinName); var sdata = GetSpell(args.SData.Name); if (sdata != null && sdata.IsEnabled) { var castpos = Helper.Yasuo.ServerPosition.LSExtend(args.Start, 50); LeagueSharp.Common.Utility.DelayAction.Add((int)sdata.delay, () => Helper.Spells[Helper.W].Cast(castpos)); } }
// Secondary Checks public static bool BuffStatus(Obj_AI_Base target) { return !target.Buffs.Any(a => a.IsValid() && a.DisplayName == "Chrono Shift" && a.DisplayName == "FioraW" && a.Type == BuffType.SpellShield); }
private static void Game_OnUpdate(EventArgs args) { if (Minion != null && !Minion.IsValidTarget(float.MaxValue, false)) { Minion = null; } if (!Menu.Item("Enabled").IsActive() || Player.IsDead || !Smite.IsReady()) { return; } var minion = NearbyMinions.FirstOrDefault( buff => buff.IsValidTarget() && SmiteableMinions.Contains(buff.CharData.BaseSkinName)); if (minion == null || !minion.IsValid) { return; } Minion = minion; if (Player.GetSummonerSpellDamage(minion, Damage.SummonerSpell.Smite) > Minion.Health) { Smite.CastOnUnit(Minion); } }
private static void CastQ(Obj_AI_Base unit, Vector2 unitPosition, int minTargets = 0) { var points = new List<Vector2>(); var hitBoxes = new List<int>(); var startPoint = ObjectManager.Player.ServerPosition.To2D(); var originalDirection = Q.Range*(unitPosition - startPoint).Normalized(); foreach (var enemy in ObjectManager.Get<Obj_AI_Hero>()) { if (enemy.IsValidTarget() && enemy.NetworkId != unit.NetworkId) { var pos = Q.GetPrediction(enemy); if (pos.HitChance >= Prediction.HitChance.LowHitchance) { points.Add(pos.Position.To2D()); hitBoxes.Add((int) enemy.BoundingRadius); } } } var posiblePositions = new List<Vector2>(); for (var i = 0; i < 3; i++) { if (i == 0) posiblePositions.Add(unitPosition + originalDirection.Rotated(0)); if (i == 1) posiblePositions.Add(startPoint + originalDirection.Rotated(Qangle)); if (i == 2) posiblePositions.Add(startPoint + originalDirection.Rotated(-Qangle)); } if (startPoint.Distance(unitPosition) < 900) { for (var i = 0; i < 3; i++) { var pos = posiblePositions[i]; var direction = (pos - startPoint).Normalized().Perpendicular(); var k = (2/3*(unit.BoundingRadius + Q.Width)); posiblePositions.Add(startPoint - k*direction); posiblePositions.Add(startPoint + k*direction); } } var bestPosition = new Vector2(); var bestHit = -1; foreach (var position in posiblePositions) { var hits = CountHits(position, points, hitBoxes); if (hits > bestHit) { bestPosition = position; bestHit = hits; } } if (bestHit + 1 <= minTargets) return; Q.Cast(bestPosition.To3D(), true); }
protected bool CastE(Obj_AI_Base target) { var collision = E.GetPrediction(target).CollisionObjects; if (collision != null && collision.Length == 1) { var distance1 = target.Distance(Player.Instance); var distance2 = E.GetPrediction(target) .CollisionObjects.OrderBy(x => x.Distance(Player.Instance)) .FirstOrDefault() .Distance(Player.Instance); if (distance1 - distance2 > 50) { return false; } E.Cast(E.GetPrediction(target).CastPosition); } else if (E.GetPrediction(target).HitChance >= HitChance.High) { E.Cast(target); } else { return false; } Orbwalker.ResetAutoAttack(); Player.IssueOrder(GameObjectOrder.AttackUnit, target); return true; }
public EvadeData(Vector2 v, bool bl1, bool bl2, Obj_AI_Base obj) { Position = v; IsTargetted = bl1; IsSelfCast = bl2; Target = obj; }
static float getComboDamage(Obj_AI_Base enemy) { if (enemy != null) { float damage = 0; if (_Q.IsReady()) if (_R.IsReady() || _W.IsReady() || _E.IsReady()) { damage += (_Q.GetDamage(enemy) * 2); } else { damage += _Q.GetDamage(enemy); } if (_W.IsReady()) damage += _W.GetDamage(enemy); if (_E.IsReady()) damage += (_E.GetDamage(enemy)); if (_R.IsReady()) if (_Q.IsReady()) { damage += (_Q.GetDamage(enemy) * 1.5f * 2f); } else { damage += _R.GetDamage(enemy); } if (!Player.IsWindingUp) damage += (float)Player.GetAutoAttackDamage(enemy, true); return damage; } return 0; }
private static void Obj_AI_Base_OnProcessSpellCast(Obj_AI_Base sender, GameObjectProcessSpellCastEventArgs args) { /*if (args.Target.Equals(Player)) { args.SData. }*/ }
/// <summary> /// Gets the calculated damage based on the given damage type onto the target from source. /// </summary> /// <param name="source"> /// The source /// </param> /// <param name="target"> /// The target /// </param> /// <param name="damageType"> /// The damage type /// </param> /// <param name="amount"> /// The amount /// </param> /// <returns> /// The estimated damage from calculations. /// </returns> public static double CalculateDamage( this Obj_AI_Base source, Obj_AI_Base target, DamageType damageType, double amount) { var damage = 0d; switch (damageType) { case DamageType.Magical: damage = source.CalculateMagicDamage(target, amount); break; case DamageType.Physical: damage = source.CalculatePhysicalDamage(target, amount); break; case DamageType.Mixed: damage = source.CalculateMixedDamage(target, damage / 2, damage / 2); break; case DamageType.True: damage = Math.Max(Math.Floor(amount), 0); break; } return damage; }
public override void doAfterAttack(Obj_AI_Base minion) { if (minion is Obj_AI_Minion) { UseQ((Obj_AI_Minion)minion); } }
public TargetSpell(Obj_AI_Base target, Obj_AI_Base caster, Champion champ, SpellSlot slot) { Target = target; Caster = caster; Champ = champ; Slot = slot; }
/// <summary> /// Return true if unit is under ally turret range. /// <returns></returns> public static bool UnderAllyTurret(this Obj_AI_Base unit) { return(UnderAllyTurret(unit.Position)); }
/// <summary> /// Returns true if the unit is under turret range. /// </summary> public static bool UnderTurret(this Obj_AI_Base unit, bool enemyTurretsOnly) { return(UnderTurret(unit.Position, enemyTurretsOnly)); }
/// <summary> /// Calculates the 3D distance to the unit. /// </summary> public static float Distance3D(this Obj_AI_Base unit, Obj_AI_Base anotherUnit, bool squared = false) { return squared ? Vector3.DistanceSquared(unit.Position, anotherUnit.Position) : Vector3.Distance(unit.Position, anotherUnit.Position); }
/// <summary> /// Calculates the 2D distance to the point. /// </summary> public static float Distance(this Obj_AI_Base unit, Vector2 point, bool squared = false) { return unit.ServerPosition.To2D().Distance(point, squared); }
/// <summary> /// Calculates the 2D distance to the unit. /// </summary> public static float Distance(this Obj_AI_Base unit, AttackableUnit anotherUnit, bool squared = false) { return unit.ServerPosition.To2D().Distance(anotherUnit.Position.To2D(), squared); }
//Obj_AI_Base class extended methods: public static float Distance(Obj_AI_Base anotherUnit, bool squared = false) { return ObjectManager.Player.Distance(anotherUnit, squared); }
/// <summary> /// Calculates the distance to the unit. /// </summary> public static float Distance(this Vector2 v, Obj_AI_Base to, bool squared = false) { return v.Distance(to.ServerPosition.To2D(), squared); }
public static int CountEnemysInRange(this Obj_AI_Base unit, float range) { return(unit.ServerPosition.CountEnemiesInRange(range)); }
/// <summary> /// Checks if this unit is the same as the given champion name /// </summary> public static bool IsChampion(this Obj_AI_Base unit, string championName) { var hero = unit as AIHeroClient; return(hero != null && hero.IsValid && hero.ChampionName.Equals(championName)); }
/// <summary> /// Returns true if the unit is under tower range. /// </summary> public static bool UnderTurret(this Obj_AI_Base unit) { return(UnderTurret(unit.Position, true)); }
/// <summary> /// Returns if both source and target are Facing Themselves. /// </summary> public static bool IsBothFacing(Obj_AI_Base source, Obj_AI_Base target) { return(source.IsFacing(target) && target.IsFacing(source)); }
public static float ManaPercentage(this Obj_AI_Base unit) { return(unit.ManaPercent); }
public static float AbilityPower(this Obj_AI_Base @base) { return(@base.FlatMagicDamageMod + (@base.PercentMagicDamageMod * @base.FlatMagicDamageMod)); }
/// <summary> /// Checks if the unit is a Hero or Champion /// </summary> public static bool IsChampion(this Obj_AI_Base unit) { var hero = unit as AIHeroClient; return(hero != null && hero.IsValid); }
public static void drawText(string msg, Obj_AI_Base Hero, Color color) { var wts = Drawing.WorldToScreen(Hero.Position); Drawing.DrawText(wts[0] - msg.Length * 5, wts[1], color, msg); }
public static float HealthPercentage(this Obj_AI_Base unit) { return(unit.HealthPercent); }
private static void ProcessSpell_OrianaIzunaCommand(Obj_AI_Base hero, GameObjectProcessSpellCastEventArgs args, SpellData spellData, SpecialSpellEventArgs specialSpellArgs) { if (spellData.spellName == "OrianaIzunaCommand") { foreach (KeyValuePair <int, ObjectTrackerInfo> entry in objTracker) { var info = entry.Value; if (entry.Value.Name == "TheDoomBall") { if (info.usePosition) { SpellDetector.CreateSpellData(hero, info.position, args.End, spellData, null, 0); } else { if (info.obj == null) { return; } SpellDetector.CreateSpellData(hero, info.obj.Position, args.End, spellData, null, 0); } info.position = args.End; info.usePosition = true; } } specialSpellArgs.noProcess = true; } if (spellData.spellName == "OrianaDetonateCommand" || spellData.spellName == "OrianaDissonanceCommand") { foreach (KeyValuePair <int, ObjectTrackerInfo> entry in objTracker) { var info = entry.Value; if (entry.Value.Name == "TheDoomBall") { if (info.usePosition) { Vector3 endPos2 = info.position; SpellDetector.CreateSpellData(hero, endPos2, endPos2, spellData, null, 0); } else { if (info.obj == null) { return; } Vector3 endPos2 = info.obj.Position; SpellDetector.CreateSpellData(hero, endPos2, endPos2, spellData, null, 0); } } } specialSpellArgs.noProcess = true; } }
public static List <AIHeroClient> GetEnemiesInRange(this Obj_AI_Base unit, float range) { return(GetEnemiesInRange(unit.ServerPosition, range)); }
private static bool HaveW(Obj_AI_Base target, bool checkCanStun = false) { var buff = target.GetBuffCount("KennenMarkOfStorm"); return(buff > 0 && (!checkCanStun || buff == 2)); }
public override void useR(Obj_AI_Base target) { }
public static bool HasBlueBuff(this Obj_AI_Base obj) { return(obj.Buffs.Any(buff => buff.DisplayName == "CrestoftheAncientGolem")); }
private static void ProcessSpell_jayceshockblast(Obj_AI_Base hero, GameObjectProcessSpellCastEventArgs args, SpellData spellData, SpecialSpellEventArgs specialSpellArgs) { if (spellData.spellName == "jayceshockblast") { } }
public static bool HasPassive(this Obj_AI_Base obj) { return(obj.PassiveCooldownEndTime - (Game.Time - 15.5) <= 0); }
public static bool HasRedBuff(this Obj_AI_Base obj) { return(obj.Buffs.Any(buff => buff.DisplayName == "BlessingoftheLizardElder")); }
public static bool HasSheenBuff(this Obj_AI_Base obj) { return(obj.Buffs.Any(buff => buff.Name.ToLower() == "sheen")); }
public static bool HasBuffInst(this Obj_AI_Base obj, string buffName) { return(obj.Buffs.Any(buff => buff.DisplayName == buffName)); }
public static float RDamage(Obj_AI_Base target) { return(Player.Instance.CalculateDamageOnUnit(target, DamageType.Magical, rDamage[R.Level - 1] + 0.6f * Player.Instance.FlatMagicDamageMod)); }
public static bool CanKillableWith(this Obj_AI_Base t, Spell spell) { return(t.Health < spell.GetDamage(t) - 5); }