Warfare, terrain, and political expansion