Cloud and precipitation parametrization 2: ice and mixed-phase microphysics