The original provided string term used to construct the parenthetical
Alternatively, an already-evaluated Roll instance may be passed directly
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?
An object of additional options which describes and modifies the term.
The regular expression pattern used to identify the opening of a parenthetical expression. This could also identify the opening of a math function.
A regular expression pattern used to identify the closing of a parenthetical expression.
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 regular expression used to match a term of this type
An array of evaluated DiceTerm instances that should be bubbled up to the parent Roll
A string representation of the formula, including optional flavor text.
Optional flavor text which modifies and describes this term.
This method is temporarily factored out in order to provide different behaviors synchronous evaluation. This will be removed in 0.10.x
Evaluate the term.
Options which modify how the RollTerm is evaluated, see RollTerm#evaluate
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.
Construct a ParentheticalTerm from an Array of component terms which should be wrapped inside the parentheses.
The array of terms to use as internal parts of the parenthetical
The constructed ParentheticalTerm instance
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 enclose a parenthetical expression to be recursively evaluated.