If your partner or you is a "Treecko", teach it Dig. You also need to get a Violent Seed and an X-Eye Seed or two.When you reach Dialga or Palkia, before they can use any moves, simply hit them with an X-Eye Seed. If you miss, they will not attack and will just pick up the item. Once they are under the mighty doom of the X-Eye Seed, give the Violent Seed to whoever is the Treecko and then use Dig when Dialga or Palkia are close. The attack does 500 or so damage for me, and one blow KO'ed them. Even better, if you or your partner is a Pikachu with the Treecko, you would then teach it Agility, which will give you up to four attacks in one turn.