Except as provided in § 18.2-25, every person who attempts to commit an offense that is a felony shall be punished as follows:
(1) If the felony attempted is punishable by a maximum punishment of life imprisonment or a term of years in excess of twenty years, an attempt thereat shall be punishable as a Class 4 felony.
(2) If the felony attempted is punishable by a maximum punishment of twenty years' imprisonment, an attempt thereat shall be punishable as a Class 5 felony.
(3) If the felony attempted is punishable by a maximum punishment of less than twenty years' imprisonment, an attempt thereat shall be punishable as a Class 6 felony.