Acute alcohol consumption sgnificantly reduces protein synthesis over about 48 hours. The effect time and impact on synthesis is dependent on the amount consumed, but even a few drinks will wreak havoc for at least 24 hours with about 50% synthesis degradation. Alcohol does lower testosterone levels, but this is only in "natural" people. Using AAS will avoid the decrease in T while drinking, but protein synthesis is still degraded through a blunted translation initiation. Chronic alcohol consumption has even more pronounced effects.
You can certainly drink in moderation, on or off cycle, and make gains. While on cycle the gains won't be hugely affected if you have a couple drinks once a week, but if you take oral AAS with alcohol you are risking liver damage. Alcohol also upregulates aromatase activity, meaning you'll experience an increase in estrogenic activity while intoxicated. I also suggest you research ethanol metabolism, as there are plenty of consequences that go along with that too, at least as far as body composition and recovery goes. Alcohol also decreases thyroid output.
Smoking pot would be much less harsh on gaining strength/muscle. I suggest not smoking before lifting for obvious reasons. Pot does have similar effects on the hormonal/endocrine function--lowering of T levels, increase aromatase activity, thyroid stuff, etc., however I have not found anything regarding a negative impact on protein synthesis at the cellular level. Smoking anything does negatively impact lung and hemoglobin function, resulting in less oxygen available to the body/muscles. This would result in both a decrease in work capacity and a decrease in recovery.
Take this how you will, but if you are willing to take AAS to improve your body or performance you may want to reconsider your lifestyle. I will not pass judgment on your choices, but take your health into account.