The Diamondbacks made their ninth-inning predicament worse by walking Mookie Betts to get to Max Muncy, who capped a 7-4 win with a three-run homer.