Ejemplo n.º 1
0
 /// <summary>
 /// Defines whether the player should use cleanse.
 /// </summary>
 public static bool ShouldUseCleanse(Obj_AI_Hero target)
 =>
 !ObjectManager.Player.IsInvulnerable &&
 !IsSpellShielded(ObjectManager.Player) &&
 (
     Bools.IsValidStun() ||
     Bools.IsValidSnare() ||
     target.HasBuff("summonerdot") ||
     target.HasBuff("summonerexhaust") ||
     target.HasBuffOfType(BuffType.Flee) ||
     target.HasBuffOfType(BuffType.Charm) ||
     target.HasBuffOfType(BuffType.Taunt) ||
     target.HasBuffOfType(BuffType.Polymorph)
 );