The black legs and broken nails are evidence that the duck either accidentally became stuck somewhere or a predator or other event may have caused the duck to panic and injure itself.
Look carefully at the legs. There may be signs of scrapes or even tiny lacerations. The legs can be treated to...
A photo would be helpful. Sometimes words are needed with a photo and sometimes a photo is needed with words. Words and photos just go better together. It's the next best thing to actually being there.