If any person maliciously discharges a firearm within any building when occupied by one or more persons in such a manner as to endanger the life or lives of such person or persons, or maliciously shoots at, or maliciously throws any missile at or against any dwelling house or other building when occupied by one or more persons, whereby the life or lives of any such person or persons may be put in peril, the person so offending is guilty of a Class 4 felony. In the event of the death of any person, resulting from such malicious shooting or throwing, the person so offending is guilty of murder in the second degree. However, if the homicide is willful, deliberate and premeditated, he is guilty of murder in the first degree.
If any such act be done unlawfully, but not maliciously, the person so offending is guilty of a Class 6 felony; and, in the event of the death of any person resulting from such unlawful shooting or throwing, the person so offending is guilty of involuntary manslaughter. If any person willfully discharges a firearm within or shoots at any school building whether occupied or not, he is guilty of a Class 4 felony.
Va. Code § 18.2-279