The roles of heat and gas in a mushy magma chamber