(2) The court in its discretion may designate a prevailing party and award attorney fees, costs and disbursements to the prevailing party, but no attorney fees, costs and disbursements shall be awarded against a judge as a defendant in a mandamus action for any action taken in the judge’s official capacity. Attorney fees, costs and disbursements may only be awarded against adverse parties who have been served with the petition and writ. [Amended by 1989 c.702 §5]