Aftermath is an ability introduced in generation 4.
8 Pokémon can have this ability, such as Drifloon, Drifblim, Stunky, Skuntank and Voltorb. For 4 of them it is the hidden ability, usually obtained from events, raids or breeding.
Official effect
Damages the attacker for 1/4 its max HP when knocked out by a contact move.