Cade Cunningham scored 40 points a day after being selected as an All-Star reserve, helping the Detroit Pistons beat the Dallas Mavericks on Thursday night.