(2) A party served with a pleading stating a cross‑claim against that party shall serve an answer thereto within 30 days after being served. A plaintiff shall serve a reply to a counterclaim in the answer within 30 days after being served with the answer, or, if a reply is ordered by the court, within 15 days after service of the order, unless the order otherwise directs.
(b) How Presented. Every defense, in law or fact, to a claim for relief in any pleading, whether a claim, counterclaim, cross‑claim, or third‑party claim, shall be asserted in the responsive pleading thereto if one is required, except that the following defenses may at the option of the pleader be made by motion:
A motion making any of these defense shall be made before pleading if further pleading is permitted. No defense or objection is waived by being joined with one or more other defenses or objections in a responsive pleading or motion.
If a pleading sets forth a claim for relief to which the adverse party is not required to serve a responsive pleading, the adverse party may assert at the trial any defense in law or fact to that claim for relief.
If, on a motion asserting the defense numbered (6) to dismiss for failure of the pleading to state a claim upon which relief can be granted, matters outside the pleading are presented to and not excluded by the court, the motion shall be treated as one for summary judgment and disposed of as provided in §§ 25‑1330 to 25‑1336, and all parties shall be given reasonable opportunity to present all material made pertinent to such a motion by statute.
(c) Motion for Judgment on the Pleadings. After the pleadings are closed but within such time as not to delay the trial, any party may move for judgment on the pleadings. If, on a motion for judgment on the pleadings, matters outside the pleadings are presented to and not excluded by the court, the motion shall be treated as one for summary judgment and disposed of as provided in §§ 25‑1330 to 25‑1336 and all parties shall be given reasonable opportunity to present all material made pertinent to such a motion by statute.
(d) Preliminary Hearings. The defenses specifically enumerated (1)‑(2) and (4)‑(7) in subdivision (b) of this rule, whether made in a pleading or by motion, and the motion for judgment mentioned in subdivision (c) of this rule shall be heard and determined before trial on application of any party, unless the court orders that the hearing and determination thereof be deferred until the trial.
(e) Motion for More Definite Statement. If a pleading to which a responsive pleading is permitted is so vague or ambiguous that a party cannot reasonably be required to frame a responsive pleading, the party may move for a more definite statement before interposing a responsive pleading. The motion shall point out the defects complained of and the details desired. If the motion is granted and the order of the court is not obeyed within 10 days or within such time as the court may fix, the court may strike the pleading or make such order as it deems just.
(f) Motion to Strike. Upon motion by a party before responding to a pleading, or if no responsive pleading is permitted by these rules, upon motion made by a party within 30 days after the service of the pleading upon the party or upon the court's own initiative at any time, the court may order stricken from any pleading any insufficient defense or any redundant, immaterial, impertinent, or scandalous matter.
(g) Consolidation of Defenses in Motion. A party who makes a motion under this rule may join with it any other motions then available to the party. If a party makes a motion under this rule but omits therefrom any defense or objection then available to the party which this rule permits to be raised by motion, the party shall not thereafter make a motion based on the defense or objection so omitted, except a motion as provided in subdivision (h)(2) hereof on any of the grounds there stated.
(A) if omitted from a motion in the circumstances described in subdivision (g), or
(B) if it is neither made by motion under this rule nor included in a responsive pleading or an amendment thereof permitted by § 6-1115(a) to be made as a matter of course.
(2) A defense of failure to state a claim upon which relief can be granted, a defense of failure to join a necessary party, and an objection of failure to state a legal defense to a claim may be made in any pleading permitted or ordered under § 6-1107(a), or by motion for judgment on the pleadings, or at the trial on the merits.