Your options are to immediately contact a qualified criminal drug defense lawyer ...this is the only way you can get a proper evaluation of your friend's case. Those are a lot of charges from what you are describing ...no doubt there is a lengthy conversation and lots of questions that need answers in order to determine whether your friend has any defenses, if his rights were violated, if the search was legal, if the entry into the home was legal, if the sales charge is valid, etc.
As for the charges, it is not uncommon for someone to be arrested and charged with more than what the case actually worth ...for example, police and prosecutors often "overcharge" a simple possession case into a possession for sale case. While possession for sale of narcotics cases are generally not eligible offenses for drug diversion, that does not mean diversion is not an option. Again, these cases are often overcharged ...even so, depending on a person's criminal history, diversion can often be negotiated as a settlement of the case.
In any case, the only way to truly assess your friend's case is to speak with an experienced drug lawyer ASAP. If you would like to discuss this matter further, you are welcome to contact me.
I hope this was helpful. Good luck!
No. Diversion is not available even without the intent to sell charge because of the battery charge. The best defense in a case like this is to demonstrate illegal police entry of the house. If this can be proved, the charges may be dismissed.