(a) A person commits an offense if, without the effective consent of the owner, the person:
(1) enters a habitation, or a building (or any portion of a building) not then open to the public, with intent to commit a felony, theft, or an assault; or
(2) remains concealed, with intent to commit a felony, theft, or an assault, in a building or habitation; or
(3) enters a building or habitation and commits or attempts to commit a felony, theft, or an assault.
(b) For purposes of this section, "enter" means to intrude:
(1) any part of the body; or
(2) any physical object connected with the body.
(c) Except as provided in Subsection (c-1) or (d), an offense under this section is a:
(1) state jail felony if committed in a building other than a habitation; or
(2) felony of the second degree if committed in a habitation.
(c-1) An offense under this section is a felony of the third degree if:
(1) the premises are a commercial building in which a controlled substance is generally stored, including a pharmacy, clinic, hospital, nursing facility, or warehouse; and
(2) the person entered or remained concealed in that building with intent to commit a theft of a controlled substance.
(d) An offense under this section is a felony of the first degree if:
(1) the premises are a habitation; and
(2) any party to the offense entered the habitation with intent to commit a felony other than felony theft or committed or attempted to commit a felony other than felony theft.