So I'm guessing that gaining 31 trophies is an average amount?
If an average battle, 100% destruction of a base ranges from 13 to 34 trophies iirc. I once got 52 on a revenge attack. The amount of stars you get affects trophies, since each star represents 1/3 rounded down. If you get 50% in a 13 available trophy base, you will get 4. If you get the town hall and 50%, 8, and so on.
In other news, I started my last cannon to level 9. My wizard tower and air defense will be done later today (level 4, level 5), and the dark barracks still have over three days left.