Currently identified moods include conditional, imperative, indicative, injunctive, optative, potential, subjunctive, and more. Infinitive is a category apart from all these finite forms, and so are gerunds and participles. Some Uralic Samoyedic languages have more than ten moods; Nenets has as many as sixteen. The original Indo-European inventory of moods was indicative, subjunctive, optative, and imperative. Not every Indo-European language has each of these moods, but the most conservative ones such as Avestan, Ancient Greek, and Sanskrit have them all.
It should be noted that not all of the moods listed below are clearly conceptually distinct. Individual terminology varies from language to language, and the coverage of (e.g.) the "conditional" mood in one language may largely overlap with that of the "hypothetical" or "potential" mood in another. Even when two different moods exist in the same language, their respective usages may blur, or may be defined by syntactic rather than semantic criteria. For example, the subjunctive and optative moods in Ancient Greek alternate syntactically in many subordinate clauses, depending on the tense of the main verb. The usage of the indicative, subjunctive and jussive moods in Classical Arabic is almost completely controlled by syntactic context; the only possible alternation in the same context is between indicative and jussive following the negative particle lā.
The distinction of affirmative and negative is not mood but polarity.
Irrealis verb forms are used when speaking of an event which has not happened; is not likely to happen; or is otherwise far removed from the real course of events. For example:
had done is an irrealis verb form.
Some languages have distinct grammatical forms that indicate that the event described by a specific verb is an irrealis verb. Many of the Indo-European languages preserve a subjunctive mood that functions as an irrealis; some also preserve an optative mood that describes events that are wished for or hoped for but not factual.
From SIL: