Ejemplo n.º 1
0
        public static bool CanCastSpell(this Obj_AI_Base target, Spell.Skillshot spell, int hitchancePercent = 75)
        {
            var asBase = spell as Spell.SpellBase;
            var pred   = spell.GetPrediction(target);

            return(target.CanCastSpell(asBase) && pred.HitChancePercent >= 75);
        }
Ejemplo n.º 2
0
 public static bool TryToCast(this Spell.Skillshot spell, Obj_AI_Base target, Menu m, int percent = 75)
 {
     if (target == null)
     {
         return(false);
     }
     return(target.CanCastSpell(spell) && m.GetCheckBoxValue(spell.Slot.ToString().ToLower()) && spell.Cast(target));
 }
Ejemplo n.º 3
0
 public static bool TryToCast(this Spell.Active spell, Obj_AI_Base target, Menu m)
 {
     if (target == null)
     {
         return(false);
     }
     return(target.CanCastSpell(spell) && m.GetCheckBoxValue(spell.Slot.ToString().ToLower()) && spell.Cast());
 }
Ejemplo n.º 4
0
        public static bool CanCastSpell(this Obj_AI_Base target, Spell.Targeted spell)
        {
            var asBase = spell as Spell.SpellBase;

            return(target.CanCastSpell(asBase));
        }
Ejemplo n.º 5
0
 public static bool CanCastSpell(this Obj_AI_Base entity, Spell spell, HitChance hitchance) => entity != null && spell != null && entity.CanCastSpell(spell) && spell.GetPrediction(entity).Hitchance >= hitchance;
Ejemplo n.º 6
0
 public static bool TryToCast(this Spell.Ranged spell, Obj_AI_Base target, Menu m)
 {
     if (target == null) return false;
     return target.CanCastSpell(spell) && m.GetCheckBoxValue(spell.Slot.ToString().ToLower() + "Use") && spell.Cast(target);
 }