The Pokémon changes its Ability to match that of a defeated ally.
When an ally faints, this Pokémon gains its Ability.