public static bool CanCastSpell(this Obj_AI_Base target, Spell.Targeted spell) { var asBase = spell as Spell.SpellBase; return target.CanCastSpell(asBase); }
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; }