Conflict and Defense: A General Theory