Lawmakers have given final approval to legislation cutting the state Court of Appeals from 15 judges to 12, setting the stage for another fight with Gov. Roy Cooper.