‘Sec. 1. 14 MRSA §6101, as amended by PL 2011, c. 269, §1, is further amended to read:
§ 6101. Attorney's fees
For the foreclosure of a mortgage by any method authorized by this chapter, if the mortgagee prevails, the mortgagee or the person claiming under the mortgagee may charge a reasonable attorney's fee which is a lien on the mortgaged estate, and must be included with the expense of publication, service and recording in making up the sum to be tendered by the mortgagor or the person claiming under the mortgagor in order to be entitled to redeem, provided the sum has actually been paid in full or partial discharge of an attorney's fee. If the mortgagee plaintiff in the foreclosure action does not prevail, or upon evidence that the action was not brought in good faith, the court may order the mortgagee plaintiff to pay the mortgagor's reasonable court costs and attorney's fees incurred in defending against the foreclosure or any proceeding within the foreclosure action and deny in full or in part the award of attorney's fees and costs to the mortgagee. For purposes of this section, "does not prevail" does not mean a stipulation of dismissal entered into by the parties, an agreed-upon motion to dismiss without prejudice to facilitate settlement or successful mediation of the foreclosure action pursuant to section 6321-A.’