A Town of Tonawanda man who shot his victim in the torso and in the back during an attempted robbery in August 2011 was sentenced Wednesday to 12 years in prison.

Wayne Marshall, 19, of Claremont Avenue, who on Monday pleaded guilty to first-degree assault, has been diagnosed with leukemia, his attorney said.

Defense attorney Michael Blotnik asked for a sentence of 10 years or less.

Erie County Judge Sheila A. DiTullio cited the debilitating injuries to the victim, a community college basketball player in Monroe County. The injuries he suffered in the attack ended his playing days.

“You shot this guy, and he’ll never be the same,” DiTullio told Marshall. “He’ll never play basketball again. He can’t walk well.”

During the sentencing, DiTullio recalled the pre- sentencing report that mentioned Marshall was “somewhat intoxicated” during the attack.

“Being drunk and having a weapon is a dangerous combination,” DiTullio said.

A bullet remains lodged in the victim’s spine, said Assistant District Attorney Paul Parisi, the chief juvenile crimes prosecutor for the Erie County District Attorney’s Office.

On Monday, Marshall and Robert Finch, 21, of Ruhland Avenue, admitted that they tried to rob the victim with a loaded gun at Leroy and Fillmore avenues. Both pleaded guilty to first-degree assault.

The victim did not come to court for the sentencing.

Marshall had faced 25 years in prison for his crime.

Finch will be sentenced Dec. 5.