public static void OnLoad() { try { player = ObjectManager.Player; if (player.ChampionName != ChampionName) { return; } ShowNotification("BlackZilean by blacky - Loaded", Color.Crimson, 10000); //DamageIndicator.Initialize(GetComboDamage); //DamageIndicator.Enabled = true; //DamageIndicator.DrawingColor = Color.GreenYellow; ManaManager = new ManaManager(); MenuGenerator.Load(); SkillsHandler.Load(); AntiGapcloser.OnEnemyGapcloser += OnEnemyGapcloser; Drawing.OnDraw += DrawHandler.OnDraw; Game.OnUpdate += OnUpdate; } catch (Exception e) { Console.WriteLine("An error occurred: '{0}'", e); } }
public static void OnLoad() { try { player = ObjectManager.Player; if (player.ChampionName != ChampionName) { return; } ShowNotification("Kassadin the Harbinger", Color.DarkOrange, 10000); ShowNotification("by blacky - Loaded", Color.DarkOrange, 10000); DamageIndicator.Initialize(GetComboDamage); DamageIndicator.Enabled = true; DamageIndicator.DrawingColor = Color.GreenYellow; ManaManager = new ManaManager(); MenuGenerator.Load(); SkillsHandler.Load(); AntiGapcloser.OnEnemyGapcloser += OnEnemyGapcloser; Interrupter2.OnInterruptableTarget += OnInterruptableTarget; Orbwalking.BeforeAttack += OnBeforeAttack; Drawing.OnDraw += DrawHandler.OnDraw; Game.OnUpdate += OnUpdate; } catch (Exception e) { Console.WriteLine("An error occurred: '{0}'", e); } }
public static void OnLoad() { try { player = ObjectManager.Player; if (player.ChampionName != ChampionName) { return; } ShowNotification("Lissandra the Ice Goddess", Color.DeepSkyBlue, 10000); ShowNotification("by blacky & Asuna - Loaded", Color.DeepSkyBlue, 10000); DamageIndicator.Initialize(GetComboDamage); DamageIndicator.Enabled = true; DamageIndicator.DrawingColor = Color.GreenYellow; ManaManager = new ManaManager(); MenuGenerator.Load(); SkillsHandler.Load(); AntiGapcloser.OnEnemyGapcloser += OnEnemyGapcloser; Interrupter2.OnInterruptableTarget += OnInterruptableTarget; Drawing.OnDraw += DrawHandler.OnDraw; Game.OnUpdate += OnUpdate; Obj_AI_Base.OnProcessSpellCast += Obj_AI_Base_OnProcessSpellCast; DamagePrediction.OnTargettedSpellWillKill += DamagePrediction_OnTargettedSpellWillKill; EStartTick = -1; } catch (Exception e) { Console.WriteLine("An error occurred: '{0}'", e); } }
private static bool ShouldUseIgnite(AIHeroClient target) { if (!CanCastIgnite()) { return(false); } var damage = 0f; damage += (float)ObjectManager.Player.GetAutoAttackDamage(target, true) * 2; damage += (SkillsHandler.GetQPrediction(target) != null && SkillsHandler.Spells[SpellSlot.Q].IsReady() && GetMenuValue <bool>("lissandra.combo.useQ")) ? (float)player.GetSpellDamage(target, SpellSlot.Q) : 0f; damage += (target.IsValidTarget(SkillsHandler.Spells[SpellSlot.W].Range) && SkillsHandler.Spells[SpellSlot.W].IsReady() && GetMenuValue <bool>("lissandra.combo.useW")) ? (float)player.GetSpellDamage(target, SpellSlot.W) : 0f; damage += (target.IsValidTarget(SkillsHandler.Spells[SpellSlot.E].Range) && SkillsHandler.Spells[SpellSlot.E].IsReady() && GetMenuValue <bool>("lissandra.combo.useE")) ? (float)player.GetSpellDamage(target, SpellSlot.E) : 0f; damage += (target.IsValidTarget(SkillsHandler.Spells[SpellSlot.R].Range) && SkillsHandler.Spells[SpellSlot.R].IsReady() && GetMenuValue <bool>("lissandra.combo.useR")) ? (float)player.GetSpellDamage(target, SpellSlot.R) : 0f; var damageWithIgnite = damage + player.GetSummonerSpellDamage(target, Damage.SummonerSpell.Ignite); if (damage < target.Health + 15 && damageWithIgnite > target.Health + 15) { return(true); } return(false); }
private void OnTriggerEnter2D(Collider2D collision) { Obstacle obs = collision.gameObject.GetComponent <Obstacle>(); if (obs != null && obs.UniqueID == target.UniqueID) { obs.DoDestroyEffect(); acquired_target = false; SkillsHandler.OnMissileCollide(target.UniqueID); gameObject.SetActive(false); Destroy(gameObject, 3f); } }
public void UseSkill(System.Object data) { gameObject.SetActive(true); if (data != null && data.GetType() == typeof(Obstacle)) { target = (Obstacle)data; SkillsHandler.OnMissileLaunched(target.UniqueID); acquired_target = true; Debug.Log("Target Accquired : " + target); } else { Debug.Log("Could not find target"); } }
private static void OnHarass() { var harassTarget = TargetSelector.GetTarget(SkillsHandler.QShard.Range, TargetSelector.DamageType.Magical); if (!ManaManager.CanHarass() && !ManaManager.PlayerHasPassive()) { return; } if (harassTarget.IsValidTarget()) { if (GetMenuValue <bool>("lissandra.harass.useQ") && harassTarget.IsValidTarget(SkillsHandler.QShard.Range) && SkillsHandler.Spells[SpellSlot.Q].IsReady()) { var predictionPosition = SkillsHandler.GetQPrediction(harassTarget); if (predictionPosition != null) { //Found a valid Q prediction SkillsHandler.Spells[SpellSlot.Q].Cast((Vector3)predictionPosition); } } if (GetMenuValue <bool>("lissandra.harass.useW") && harassTarget.IsValidTarget(SkillsHandler.Spells[SpellSlot.W].Range) && SkillsHandler.Spells[SpellSlot.W].IsReady()) { SkillsHandler.Spells[SpellSlot.W].Cast(); } if (GetMenuValue <bool>("lissandra.harass.useE") && harassTarget.IsValidTarget(SkillsHandler.Spells[SpellSlot.E].Range) && SkillsHandler.Spells[SpellSlot.E].IsReady()) { if (!EActive) { SkillsHandler.Spells[SpellSlot.E].CastIfHitchanceEquals(harassTarget, CustomHitChance); } } } }
private void OnTriggerEnter2D(Collider2D collision) { Obstacle obs = collision.gameObject.GetComponent <Obstacle>(); if (obs != null && obs.UniqueID == target.UniqueID) { if (obs.TypeOfObstacle == LevelObjectType.GOOD_BLOCK) { obs.OnPlayerHit(out LevelObjectType type); } else { Debug.LogWarning("Good Missile Script collided with obstacle which is not good.. So just destroying the objection now"); obs.DoDestroyEffect(); } acquired_target = false; SkillsHandler.OnMissileCollide(target.UniqueID); gameObject.SetActive(false); Destroy(gameObject, 3f); } }
public static float GetComboDamage(AIHeroClient target) { var damage = 0f; damage += (float)player.GetAutoAttackDamage(target, true) * 2; damage += (SkillsHandler.GetQPrediction(target) != null && SkillsHandler.Spells[SpellSlot.Q].IsReady() && GetMenuValue <bool>("lissandra.combo.useQ")) ? (float)player.GetSpellDamage(target, SpellSlot.Q) : 0f; damage += (target.IsValidTarget(SkillsHandler.Spells[SpellSlot.W].Range) && SkillsHandler.Spells[SpellSlot.W].IsReady() && GetMenuValue <bool>("lissandra.combo.useW")) ? (float)player.GetSpellDamage(target, SpellSlot.W) : 0f; damage += (target.IsValidTarget(SkillsHandler.Spells[SpellSlot.E].Range) && SkillsHandler.Spells[SpellSlot.E].IsReady() && GetMenuValue <bool>("lissandra.combo.useE")) ? (float)player.GetSpellDamage(target, SpellSlot.E) : 0f; damage += (target.IsValidTarget(SkillsHandler.Spells[SpellSlot.R].Range) && SkillsHandler.Spells[SpellSlot.R].IsReady() && GetMenuValue <bool>("lissandra.combo.useR")) ? (float)player.GetSpellDamage(target, SpellSlot.R) : 0f; return(damage); }
void Awake() { skillsHandler = this; }
public Obstacle FindClosestObstacleForMissile(Vector3 startPosition, LevelObjectType type) { Obstacle closest = null; if (IsCurrentlyActive) { int total_count = transform.childCount; for (int i = 0; i < total_count; i++) { ObstacleBlock block = transform.GetChild(i).GetComponent <ObstacleBlock>(); if (block != null) { int total_obstacles = block.obstacles.Length; for (int j = 0; j < total_obstacles; j++) { if (block.obstacles[j].gameObject.activeSelf && block.obstacles[j].TypeOfObstacle == type && !SkillsHandler.CheckIfTargetExists(block.obstacles[j].UniqueID)) { closest = block.obstacles[j]; } } } } } return(closest); }
private static void OnCombo() { //TODO The All In Combo. var comboTarget = TargetSelector.GetTarget(SkillsHandler.QShard.Range, TargetSelector.DamageType.Magical); if (comboTarget.IsValidTarget()) { if (GetMenuValue <bool>("lissandra.combo.useQ") && comboTarget.IsValidTarget(SkillsHandler.QShard.Range) && SkillsHandler.Spells[SpellSlot.Q].IsReady()) { var predictionPosition = SkillsHandler.GetQPrediction(comboTarget); if (predictionPosition != null) { //Found a valid Q prediction SkillsHandler.Spells[SpellSlot.Q].Cast((Vector3)predictionPosition); } } if (GetMenuValue <bool>("lissandra.combo.useW") && comboTarget.IsValidTarget(SkillsHandler.Spells[SpellSlot.W].Range) && SkillsHandler.Spells[SpellSlot.W].IsReady() && !comboTarget.IsStunned) { SkillsHandler.Spells[SpellSlot.W].Cast(); } if (GetMenuValue <bool>("lissandra.combo.useE") && comboTarget.IsValidTarget(SkillsHandler.Spells[SpellSlot.E].Range) && SkillsHandler.Spells[SpellSlot.E].IsReady()) { if (!EActive) { var comboTargetPosition = Prediction.GetPrediction(comboTarget, TimeToEEnd(ObjectManager.Player.ServerPosition, comboTarget.ServerPosition)).UnitPosition; //TODO This will probably fail horribly because it's such a long delay ayy lmao if (comboTargetPosition.IsSafePositionEx() && comboTargetPosition.PassesNoEIntoEnemiesCheck()) { SkillsHandler.Spells[SpellSlot.E].Cast(comboTargetPosition); } else { if (SkillsHandler.Spells[SpellSlot.E].IsInRange(comboTargetPosition) && CurrentEPosition.IsSafePositionEx()) { SkillsHandler.Spells[SpellSlot.E].Cast(comboTarget); } } } } if (GetMenuValue <bool>("lissandra.combo.useR") && comboTarget.IsValidTarget(SkillsHandler.Spells[SpellSlot.R].Range) && SkillsHandler.Spells[SpellSlot.R].IsReady()) { var selfR = GetMenuValue <Slider>("lissandra.combo.options.selfR").Value; var defensiveR = GetMenuValue <Slider>("lissandra.combo.options.defensiveR").Value; if (player.CountEnemiesInRange(250) >= defensiveR) { SkillsHandler.Spells[SpellSlot.R].CastOnUnit(player); } if (player.Health / player.MaxHealth * 100 < selfR && player.CountEnemiesInRange(SkillsHandler.Spells[SpellSlot.R].Range) > 0) { SkillsHandler.Spells[SpellSlot.R].CastOnUnit(player); } if (GetMenuValue <bool>("lissandra.combo.options.alwaysR")) { SkillsHandler.Spells[SpellSlot.R].CastOnUnit(comboTarget); } if ((player.GetSpellDamage(comboTarget, SpellSlot.R) * 1.2) > comboTarget.Health + 10 && Menu.Item("lissandra.combo.options.whitelistR" + comboTarget.CharData.BaseSkinName) != null && Menu.Item("lissandra.combo.options.whitelistR" + comboTarget.CharData.BaseSkinName) .GetValue <bool>() == false) { SkillsHandler.Spells[SpellSlot.R].CastOnUnit(comboTarget); } if (GetComboDamage(comboTarget) > comboTarget.Health + 10 && Menu.Item("lissandra.combo.options.whitelistR" + comboTarget.CharData.BaseSkinName) != null && Menu.Item("lissandra.combo.options.whitelistR" + comboTarget.CharData.BaseSkinName) .GetValue <bool>() == false) { SkillsHandler.Spells[SpellSlot.R].CastOnUnit(comboTarget); } } if (ShouldUseIgnite(comboTarget) && player.Distance(comboTarget) <= 600) { player.Spellbook.CastSpell(SkillsHandler.IgniteSlot, comboTarget); } } }