yes, you could also use the list logical operator along with length():
var/list/legs = list("left leg","right leg")
if(length(broken&legs) == 2 && !reagents.has_reagent("morphine"))

although that's harder to read