Say I am against a PKMN that uses Swagger on my Rattata. It sharply raises attack or something and also makes rattata confused. If rattata hurts itself in its confusion will the attack boost make damage done to rattata more than without attack boost?
Yes, if rattata's attack is raised he will deal more damage to himself, but only when he uses a physical attack.