The legislation matches a federal measure some advocates predict will "decimate" the industry—then sets out regulations for what’s left.