(1)   Whoever does any of the following is guilty of a Class A misdemeanor:

     (a)    Endangers another’s safety by the negligent operation or handling of a dangerous weapon; or

     (b)    Operates or goes armed with a firearm while he or she is under the influence of an intoxicant; or

     (bm)    Operates or goes armed with a firearm while he or she has a detectable amount of a restricted controlled substance in his or her blood. A defendant has a defense to any action under this paragraph that is based on the defendant allegedly having a detectable amount of methamphetamine, gamma-hydroxybutyric acid, or delta-9-tetrahydrocannabinol in his or her blood, if he or she proves by a preponderance of the evidence that at the time of the incident or occurrence he or she had a valid prescription for methamphetamine or one of its metabolic precursors, gamma-hydroxybutyric acid, or delta-9-tetrahydrocannabinol.

     (c)    Except as provided in sub. (1m), intentionally points a firearm at or toward another.

     (d)    While on the lands of another discharges a firearm within 100 yards of any building devoted to human occupancy situated on and attached to the lands of another without the express permission of the owner or occupant of the building. “Building” as used in this paragraph does not include any tent, bus, truck, vehicle or similar portable unit.

   (1m)   

     (a)    In this subsection:

        1.    “Ambulance” has the meaning given in s. 256.01 (1).

        2.    “Emergency medical technician” has the meaning given in s. 256.01 (5).

        3.    “First responder” has the meaning given in s. 256.01 (9).

     (b)    Whoever intentionally points a firearm at or towards a law enforcement officer, a fire fighter, an emergency medical technician, a first responder, an ambulance driver, or a commission warden who is acting in an official capacity and who the person knows or has reason to know is a law enforcement officer, a fire fighter, an emergency medical technician, a first responder, an ambulance driver, or a commission warden is guilty of a Class H felony.

   (2)   Whoever does any of the following is guilty of a Class G felony:

     (a)    Intentionally discharges a firearm into a vehicle or building under circumstances in which he or she should realize there might be a human being present therein; or

     (b)    Sets a spring gun.

   (3)   

     (a)    Whoever intentionally discharges a firearm from a vehicle while on a highway, as defined in s. 340.01 (22), or on a vehicle parking lot that is open to the public under any of the following circumstances is guilty of a Class F felony:

        1.    The person discharges the firearm at or toward another.

        2.    The person discharges the firearm at or toward any building or other vehicle.

     (b)   

        1.    Paragraph (a) does not apply to any of the following who, in the line of duty, discharges a firearm from a vehicle:

           a.    A peace officer, except for a commission warden who is not a state-certified commission warden.

           b.    A member of the U.S. armed forces.

           c.    A member of the national guard.

        2.    Paragraph (a) does not apply to the holder of a permit under s. 29.193 (2) who is hunting from a standing motor vehicle, as defined in s. 29.001 (57), in accordance with s. 29.193 (2) (cr) 2.

     (c)    The state does not have to negate any exception under par. (b). Any party that claims that an exception under par. (b) is applicable has the burden of proving the exception by a preponderance of the evidence.

     (d)    The driver of the vehicle may be charged and convicted for a violation of par. (a) according to the criteria under s. 939.05.

     (e)    A person under par. (a) has a defense of privilege of self-defense or defense of others in accordance with s. 939.48.