The law bans a broader array of military-style weapons, restricts ammunition magazines to seven rounds from 10, creates a more comprehensive database of people barred from owning guns, and makes New York the first state to require background checks to buy bullets.