static void HealIfNeeded() { int manaToHeal = (int)(Player.MaxMana / 100) * Config.HealManaPct; if (!Config.EnableHeal || cougarForm() || Player.Mana < manaToHeal || Player.IsRecalling()) { return; } if (Config.HealSelf) { int healthToHeal = (int)(Player.MaxHealth / 100) * Config.HealPct; if (Player.Health <= healthToHeal && SpellManager.PrimalSurge.IsReady()) { SpellManager.CastSpell(SpellManager.PrimalSurge, Player, false); } } if (Config.HealAllies) { var targets = ObjectManager.Get <Obj_AI_Hero>().Where(hero => hero.IsValidTarget(SpellManager.PrimalSurge.Range) && hero.IsAlly && hero.IsDead).OrderBy(hero => hero.Health); foreach (Obj_AI_Hero target in targets) { int healthToHeal = (int)(target.MaxHealth / 100) * Config.HealPct; if (target.Health <= healthToHeal && SpellManager.PrimalSurge.IsReady()) { SpellManager.CastSpell(SpellManager.PrimalSurge, target, false); } } } }
static void AntiGapcloser_OnEnemyGapcloser(ActiveGapcloser gapcloser) { if (Config.DodgeWithPounce) { var awayPosition = gapcloser.End.Extend(ObjectManager.Player.ServerPosition, ObjectManager.Player.Distance(gapcloser.End) + SpellManager.Pounce.Range); if (!cougarForm()) { SpellManager.AspectOfTheCougar.Cast(); } SpellManager.CastSpell(SpellManager.Pounce, awayPosition, false); } }
static void JungleClear() { var target = MinionManager.GetMinions(Player.ServerPosition, SpellManager.Javelin.Range, MinionTypes.All, MinionTeam.Neutral, MinionOrderTypes.MaxHealth).FirstOrDefault(); if (!target.IsValidTarget(SpellManager.Javelin.Range)) { return; } if (cougarForm()) { //Cougar clear if (Config.JungleTakedown && (isOffCooldown(NidaleeSpell.Takedown) || SpellManager.Takedown.IsReady())) { SpellManager.Takedown.Cast(); } if (Config.JunglePounce && (isOffCooldown(NidaleeSpell.Pounce) || SpellManager.Pounce.IsReady())) { float pounceRange = target.Hunted() ? 750 : SpellManager.Pounce.Range; if (target.IsValidTarget(pounceRange)) { SpellManager.CastSpell(SpellManager.Pounce, target.ServerPosition, false); } } if (Config.JungleSwipe && (isOffCooldown(NidaleeSpell.Swipe) || SpellManager.Swipe.IsReady())) { if (target.IsValidTarget(SpellManager.Swipe.Range)) { SpellManager.CastSpell(SpellManager.Swipe, target.ServerPosition, false); } } if (Config.JungleJavelin && isOffCooldown(NidaleeSpell.Javelin)) { if (SpellManager.AspectOfTheCougar.IsReady()) { SpellManager.AspectOfTheCougar.Cast(); } } } else { //Human clear int manaToClear = (int)(Player.MaxMana / 100) * Config.JungleManaPct; if (Player.Mana < manaToClear) { return; } if (Config.JungleJavelin && (isOffCooldown(NidaleeSpell.Javelin) || SpellManager.Javelin.IsReady())) { if (target.IsValidTarget(SpellManager.Javelin.Range)) { SpellManager.CastSpell(SpellManager.Javelin, target, HitChance.High, false); } } if (Config.JungleJavelin && (isOffCooldown(NidaleeSpell.Bushwhack) || SpellManager.Bushwhack.IsReady())) { if (target.IsValidTarget(SpellManager.Bushwhack.Range)) { SpellManager.CastSpell(SpellManager.Bushwhack, target.ServerPosition, false); } } if (target.Hunted()) { if (SpellManager.AspectOfTheCougar.IsReady()) { SpellManager.AspectOfTheCougar.Cast(); } } } }
static void Harass() { var target = TargetSelector.GetSelectedTarget(); if (target == null || !target.IsValidTarget(SpellManager.Javelin.Range)) { target = TargetSelector.GetTarget(SpellManager.Javelin.Range, TargetSelector.DamageType.Magical); } if (!target.IsValidTarget(SpellManager.Javelin.Range)) { return; } if (cougarForm()) { //Cougar harass if (Config.HarassTakedown && (isOffCooldown(NidaleeSpell.Takedown) || SpellManager.Takedown.IsReady())) { SpellManager.Takedown.Cast(); } if (Config.HarassPounce && (isOffCooldown(NidaleeSpell.Pounce) || SpellManager.Pounce.IsReady())) { float pounceRange = target.Hunted() ? 750 : SpellManager.Pounce.Range; if (target.IsValidTarget(pounceRange)) { SpellManager.CastSpell(SpellManager.Pounce, target.ServerPosition, false); } } if (Config.HarassSwipe && (isOffCooldown(NidaleeSpell.Swipe) || SpellManager.Swipe.IsReady())) { if (target.IsValidTarget(SpellManager.Swipe.Range)) { SpellManager.CastSpell(SpellManager.Swipe, target.ServerPosition, false); } } if (Config.HarassJavelin && isOffCooldown(NidaleeSpell.Javelin)) { if (SpellManager.AspectOfTheCougar.IsReady()) { SpellManager.AspectOfTheCougar.Cast(); } } } else { //Human harass int manaToHarass = (int)(Player.MaxMana / 100) * Config.HealManaPct; if (Player.Mana < manaToHarass) { return; } if (Config.HarassJavelin && (isOffCooldown(NidaleeSpell.Javelin) || SpellManager.Javelin.IsReady())) { if (target.IsValidTarget(SpellManager.Javelin.Range)) { SpellManager.CastSpell(SpellManager.Javelin, target, HitChance.High, false); } } if (Config.HarassBushwhack && (isOffCooldown(NidaleeSpell.Bushwhack) || SpellManager.Bushwhack.IsReady())) { if (target.IsValidTarget(SpellManager.Bushwhack.Range)) { SpellManager.CastSpell(SpellManager.Bushwhack, target.ServerPosition, false); } } if (target.Hunted()) { if (SpellManager.AspectOfTheCougar.IsReady()) { SpellManager.AspectOfTheCougar.Cast(); } } } }
static void Combo() { var target = TargetSelector.GetSelectedTarget(); if (target == null || !target.IsValidTarget(SpellManager.Javelin.Range)) { target = TargetSelector.GetTarget(SpellManager.Javelin.Range, TargetSelector.DamageType.Magical); } if (!target.IsValidTarget(SpellManager.Javelin.Range)) { return; } if (cougarForm()) { //Cougar combo if (Config.ComboTakedown && (isOffCooldown(NidaleeSpell.Takedown) || SpellManager.Takedown.IsReady())) { SpellManager.Takedown.Cast(); } if (Config.ComboPounce && (isOffCooldown(NidaleeSpell.Pounce) || SpellManager.Pounce.IsReady())) { float pounceRange = target.Hunted() ? 750 : SpellManager.Pounce.Range; if (target.IsValidTarget(pounceRange)) { SpellManager.CastSpell(SpellManager.Pounce, target.ServerPosition, false); } } if (Config.ComboSwipe && (isOffCooldown(NidaleeSpell.Swipe) || SpellManager.Swipe.IsReady())) { if (target.IsValidTarget(SpellManager.Swipe.Range)) { SpellManager.CastSpell(SpellManager.Swipe, target.ServerPosition, false); } } if (Config.ComboJavelin && isOffCooldown(NidaleeSpell.Javelin)) { if (SpellManager.AspectOfTheCougar.IsReady()) { SpellManager.AspectOfTheCougar.Cast(); } } } //Human combo else { if (Config.ComboJavelin && (isOffCooldown(NidaleeSpell.Javelin) || SpellManager.Javelin.IsReady())) { if (target.IsValidTarget(SpellManager.Javelin.Range)) { SpellManager.CastSpell(SpellManager.Javelin, target, HitChance.High, false); } } if (Config.ComboBushwhack && (isOffCooldown(NidaleeSpell.Bushwhack) || SpellManager.Bushwhack.IsReady())) { if (target.IsValidTarget(SpellManager.Bushwhack.Range)) { SpellManager.CastSpell(SpellManager.Bushwhack, target.ServerPosition, false); } } if (target.Hunted()) { if (SpellManager.AspectOfTheCougar.IsReady()) { SpellManager.AspectOfTheCougar.Cast(); } } } }