Pal Amon is right, it applied to all battles.
It was an upgrade over the beep and I generally liked it. My only problem with it was that it overruled that epic music that kicked in when facing the gym leader’s last Pokémon. They should have made an exception for that and boss battles.
I like the idea but not the execution. Gen 5 did a lot of experimentation and not all of it worked.
The story of every generation since Gen IV (unless you count that bad 3D on Olivine City's Lighthouse). Well, technically the story of all the Pokémon games (and a most games, ever) but I think Gen IV is the one where none of the issues are the new stuff they were trying.