A generalization of Cope’s rule