Anticipation is an ability introduced in generation 4.
11 Pokémon can have this ability, such as Barboach, Whiscash, Wormadam, Croagunk and Toxicroak. For 2 of them it is the hidden ability, usually obtained from events, raids or breeding.
Official effect
Notifies all trainers upon entering battle if an opponent has a super-effective move, Self-Destruct, Explosion, or a one-hit KO move.