Protean

Effect:

Immediately before using a move (except Struggle), the Pokémon changes its type to match that move. This works only once each time the Pokémon enters battle. The user becomes a single-type Pokémon and gains STAB for that move. The effect ends when the Pokémon switches out, and it will not trigger again until it re-enters battle. Protean will not activate if the user is already that single type, or if the move fails before execution. This ability cannot be copied or replaced.

Protean is introduced in Gen 6: