They would do various things. Sometimes they would give the opponents money to avoid war, sometimes they would form alliances through marriages. If they had been democratic they would've avoided even more since the people rarely wanted to go to war but they did because the monarchs wanted them to. They could give opponents land or they could unify under a single banner and avoid war that way.