This common trope in American Westerns depicts a society where gun fights were common and killing an equally armed man was not immoral, as long as he was facing you. Is this artistic portrayal of American history based in any way on actual laws or customs?
Well, Nevada Lawyer, I have a Nevada answer for you. I'm transcribing books from the Alf Doten Dairies for the University of Nevada, Reno, Special Collections. Doten discusses various sorts of assaults with deadly weapons and the subsequent inquest - and when appropriate, trials. First of all, dueling was against the law in Nevada. When law enforcement officials could catch the participants they could be arrested. Often officials were tipped off about a planned duel and would meet the contestants at the designated location to break up the contest (typically without arrest).
Altercations involving weapons often also involved alcohol. When someone was killed or badly wounded, there was an inquest to determine what happened and if anyone should be prosecuted. Doten reports on these in some detail because he was a reporter, so he had to report on the incident and on the resulting court action. Inquests frequently sent the participants or the survivor home without charges because it was usually fairly clear that neither participant was more guilty than the other and some degree of self defense could be argued on the part of the survivor. There were cases where someone without a weapon was assaulted, and this usually resulted in a charge. For example, on July 10th 1865:
Charles Duval struck John Templeton with a new pick on the left breast near the breast bone and a little below the nipple — went in some 2 ½ inches — He walked across the street and down a flight of steps before he fell — picked up & taken into house near by — will probably die — Duval was arrested — cause of this was a recent quarrel and grudge — Templeton came along, and after a few words passed, he caught Duval by throat — D stepped back & took pick & let him have it
On July 12th:
J Templeton that was stabbed in the breast with a pick by Chas Duval on Monday evening, died at 5 ½ oclock this PM — Duval is in custody.
In this case, Doten doesn't tell us what happened to Duval, but in the context, it appears that Duval was not going to be released: taking a pick axe to a man without a weapon was probably regarded as going a bit too far.
Contest between men who decided to shoot at one another would each be judged in context, but it was usually too difficult to sort out the aggressor from the victim, and so survivors were often let go without a court case. Doten documents cases where rival witnesses testified on behalf of both the survivor and the person who died, and often the assailant was let go because conflicting testimony was too difficult to sort out. I suspect the court system looked at these kinds of incidents as hopeless and not worth the time and effort to put someone on trial.
Since you're a Nevada lawyer, a word of caution: you may or may not understand that the court may view things differently in the twenty-first century as compared to the nineteenth, so please don't use this information in the defense of a modern, surviving assailant. If that's what you had in mind, that is.