ยง 8303. Additional allowance in the discretion of the court. (a) Discretionary allowance in action. Whether or not costs have been awarded, the court before which the trial was had, or in which the judgment was entered, on motion, may award: 1. to any party to an action to foreclose a mortgage upon real property, a sum not exceeding two and one-half percent of the sum due or claimed to be due upon such mortgage, and not exceeding the sum of three hundred dollars; or 2. to any party to a difficult or extraordinary case, where a defense has been interposed, a sum not exceeding five per cent of the sum recovered or claimed, or of the value of the subject matter involved, and not exceeding the sum of three thousand dollars; or 3. to any party to an action for the partition of real property, a sum not exceeding five per cent of the value of the subject matter involved and not exceeding the sum of three thousand dollars; or 4. to the fiduciary or to any party to an action which involves the construction of a will or an intervivos trust instrument, such sums as it deems reasonable for counsel fees and other expenses necessarily incurred with respect to such construction in the action; and the court may direct that the whole or any part of such allowance shall be paid to the attorney rendering the services in the action, and may provide that the determination of the amount of any allowance in connection therewith be reserved for a supplemental order to be entered after the time to appeal has expired, or if an appeal be taken, then after final determination of the appeal; and a court on appeal may make a like award and direction on appeal; or 5. to the attorney for the petitioner in a proceeding to dispose of an infant's property, such sum as to the court may seem just and proper; or 6. to the plaintiffs in an action or proceeding brought by the attorney-general under articles twenty-two, twenty-two-A, twenty-three-A or thirty-three or section three hundred ninety-one-b or five hundred twenty-a of the general business law, or under subdivision twelve of section sixty-three of the executive law, or under article twenty-three of the arts and cultural affairs law, or in an action or proceeding brought by the attorney-general under applicable statutes to dissolve a corporation or for usurpation of public office, or unlawful exercise of franchise or of corporate right, a sum not exceeding two thousand dollars against each defendant. (b) Discretionary allowance on enforcement motion. The court, on a motion relating to the enforcement of a judgment, may award to the judgment creditor a sum not exceeding five per cent of the judgment or fifty dollars, whichever is more.