David Milch, who created NYPD Blue and Deadwood, is on a $40-a-week allowance after gambling away his entire fortune.

According to The Hollywood Reporter, the four-time Emmy winner earned an estimated $100 million throughout his career. However, a lawsuit filed by Milch's wife, Rita Milch, reveals the critically-acclaimed writer is now $17 million in debt due to his severe gambling addiction.

Rita filed suit last year seeking $25 million in damages from the couples' business managers, Nigro Karlin Segal Feldsein & Bolno LLP (NFSFB), for not fully informing her about her family's financial state. Rita says she only discovered the extent of David's debt in March 2011, when she became suspicious after NKSFB employees suggested transfering the Milch's house's title to her and her three kids.

Rita was then presented with a detailed account of the checks David had cashed at horse race tracks between January 2000 and March 2011, which totaled $23,510,982.04. According to the suit, the staggering sum "represented only a portion of the total amount spent at the race track, since it did not include gambling expenses from any other time period, nor did it include large cash draws that were also used for gambling."

The Deadwood movie is finally happening

David has struggled with addiction throughout his life. He was addicted to heroin in the '80s and drank heavily in college, but previously told The New Yorker that he hadn't taken drugs since seeking treatment in 1999. But he continued to be regular at racetracks, a hobby which inspired his short-lived HBO series Luck.

"He was one of the most devoted gamblers," John Perrotta, an author and adviser on Luck, told THR. "He was very serious about it, and he was a very good handicapper."

"He's obviously a genius and extraordinarily talented, and he's got a fire that burns in him brighter than anyone else," said horse trainer Darrell Vienna, who helped David during his research for Deadwood. "But it can cause a lot of damage. He's an extraordinary person. He's insightful in everything he does -- people, horses, everything -- and he's very insightful about himself, and therein lies the rub. He's a person of extremes."

To make ends meet, David and Rita have had to put both their homes, in Brentwood and Martha's Vineyard, on the market. Rita has sold "a significant amount" of her jewelry and art, as well as held garage sales, the lawsuit alleges. Now, the couple is living in an 1,800-square-foot rental in Santa Monica, living off of David's HBO earnings - he's currently working on a Deadwood movie - while attempting to pay back the IRS. According to THR, Rita gives David $40 a week in cash to live on, and ensures that he is unable to gamble.