Ammonia removes all odors from washable fabrics without damaging colors or textiles. It's especially good for oily stains - cigarette smoke has a lot of oily stuff in it, and that's what makes it so difficult to remove.
Ammonia stinks to high heaven when you first start the washer, but after the rinse cycle, your clothes smell nothing but clean and fresh.
When the house was full of teenagers, about once a month I'd add a half-cup or a cup to every load I did - strips out soap residue, smells, stains and brightens colors.
It also removes pet odors, and I used to use nothing but ammonia and water in the steam cleaner when I cleaned the carpets.