An object of additional options which describes and modifies the term.
An internal flag for whether the term has been evaluated
Is this term intermediate, and should be evaluated first as part of the simplification process?
A regular expression used to match a term of this type
An array of additional attributes which should be retained when the term is serialized
A regular expression pattern which identifies optional term-level flavor text
A regular expression which identifies term-level flavor text
A string representation of the formula, including optional flavor text.
Optional flavor text which modifies and describes this term.
Whether this term is entirely deterministic or contains some randomness.
Evaluate the term, processing its inputs and finalizing its total.
Options which modify how the RollTerm is evaluated
The evaluated RollTerm
Serialize the RollTerm to a JSON string which allows it to be saved in the database or embedded in text. This method should return an object suitable for passing to the JSON.stringify function.
Determine whether a string expression matches a NumericTerm
The expression to parse
Construct a term of this type given a matched regular expression array.
The matched regular expression array
The constructed term
Construct a RollTerm from a provided data object
Provided data from an un-serialized term
The constructed RollTerm
Reconstruct a RollTerm instance from a provided JSON string
A serialized JSON representation of a DiceTerm
A reconstructed RollTerm from the provided JSON
Define term-specific logic for how a de-serialized data object is restored as a functional RollTerm
The de-serialized term data
The re-constructed RollTerm object
A type of RollTerm used to represent static numbers.