If I smoke before Ramadan, but not during Ramadan, does it affect my fasts? Analogous to how drinking alcohol means your fasts or salaahs will not be accepted for forty days.
No, it won't affect your fasts as long as you're NOT smoking while you're fasting.
PS: Many brothers and sisters consider Ramadan as a perfect opportunity for quitting. Please at least give a try.