When bases are tower-defended, and when u have no cash for attacking (needless to say : a real attack need cash), the best and easiest way to gain some money is to repair some building... This is just a matter of common sens.
When bases are tower-defended, we can divide a player cycle of life like this...1- Spend cash
2- Attack
3- Death
4- If the player has enough money => return to number "1"
5- If the player hasn't enough money then defend and repair until he can return to number "1"
And so on...
When bases aren't tower-defended, this is another story... 