Example #1
0
        private static void OnDraw(EventArgs args)
        {
            // Check if summoner wants circles around smiteables
            if (DrawRange.CurrentValue && (HoldKey.CurrentValue || ToggleKey.CurrentValue))
            {
                foreach (var smiteable in CurrentySmiteable.Where(o => o.IsHPBarRendered).Where(smiteable => Player.Instance.IsInRange(smiteable, SmiteRange * 2)))
                {
                    // Get default out of range color
                    var color = SmiteColorOutOfRange;
                    var width = 1;

                    // Check if player is in range of smiteable
                    if (Player.Instance.IsInRange(smiteable, SmiteRange + Player.Instance.BoundingRadius + smiteable.BoundingRadius))
                    {
                        // In range, apply new color
                        color = SmiteColor;

                        // Check if killable
                        if (smiteable.TotalShieldHealth() <= SmiteDamage)
                        {
                            width = 10;
                        }
                    }

                    // Adjust color
                    if (!SmiteSpell.IsReady())
                    {
                        color   = SmiteColorOutOfRange;
                        color.A = 75;
                    }

                    // Draw the circle around the smiteable
                    Circle.Draw(color, smiteable.BoundingRadius + SmiteRange, width, smiteable);

                    // Check if killable
                    if (SmiteSpell.IsReady() && smiteable.TotalShieldHealth() <= SmiteDamage)
                    {
                        // Draw a bounding circle around the smiteable if killable
                        Circle.Draw(color, smiteable.BoundingRadius, width, smiteable);
                    }
                }
            }
        }
Example #2
0
        private static void OnCreate(GameObject sender, EventArgs args)
        {
            // Only neutrals
            if (sender.Team != GameObjectTeam.Neutral)
            {
                return;
            }

            // Only attackables
            var attackable = sender as Obj_AI_Base;

            if (attackable == null)
            {
                return;
            }

            // Check if neutral is a smiteable
            var name = attackable.BaseSkinName.ToLower();

            if (JungleMonsters.Any(entry => name.Equals(entry.Value.Item1.ToLower())))
            {
                CurrentySmiteable.Add(attackable);
            }
        }
Example #3
0
 private static void OnUpdate(EventArgs args)
 {
     // Check if summoner wants to smite
     if ((HoldKey.CurrentValue || ToggleKey.CurrentValue) && SmiteSpell.IsReady())
     {
         // Get first smiteable monster
         var smiteable =
             CurrentySmiteable.Where(o => Player.Instance.IsInRange(o, SmiteRange + Player.Instance.BoundingRadius + o.BoundingRadius)).OrderByDescending(o => o.MaxHealth).FirstOrDefault();
         if (smiteable != null)
         {
             // Check if that monster is enabled
             var name = smiteable.BaseSkinName.ToLower();
             if (EnabledMonsters.Any(enabled => name.Equals(enabled.Key.ToLower()) && enabled.Value.CurrentValue))
             {
                 // Check if monster can be killed
                 if (smiteable.TotalShieldHealth() <= SmiteDamage)
                 {
                     // Cast Smite
                     SmiteSpell.Cast(smiteable);
                 }
             }
         }
     }
 }
Example #4
0
 private static void OnDelete(GameObject sender, EventArgs args)
 {
     // Remove game object from set
     CurrentySmiteable.Remove(sender as Obj_AI_Base);
 }