The term's operator value.
An object of additional options which describes and modifies the term.
Internal
_evaluatedAn internal flag for whether the term has been evaluated
Internal
_rootA reference to the Roll at the root of the evaluation tree.
Is this term intermediate, and should be evaluated first as part of the simplification process?
Static
PRECEDENCEAn object of operators with their precedence values.
Static
OPERATORSAn array of operators which represent arithmetic operations
Static
REGEXPA regular expression used to match a term of this type
Static
SERIALIZE_An array of additional attributes which should be retained when the term is serialized
Static
FLAVOR_A regular expression pattern which identifies optional term-level flavor text
Static
FLAVOR_A regular expression which identifies term-level flavor text
Optional flavor text which modifies and describes this term.
A string representation of the formula expression for this RollTerm, prior to evaluation.
A string or numeric representation of the final output for this term, after evaluation.
A string representation of the formula, including optional flavor text.
Whether this term is entirely deterministic or contains some randomness.
A reference to the RollResolver app being used to externally resolve this term.
Evaluate the term, processing its inputs and finalizing its total.
Optional
options: { Options which modify how the RollTerm is evaluated
Minimize the result, obtaining the smallest possible value.
Maximize the result, obtaining the largest possible value.
If true, string terms will not throw an error when evaluated.
Returns a Promise if the term is non-deterministic.
Protected
_evaluateStatic
isDetermine if evaluating a given RollTerm with certain evaluation options can be done so deterministically.
The term.
Optional
options: { Options for evaluating the term.
Force the result to be maximized.
Force the result to be minimized.
Static
fromStatic
fromConstruct a RollTerm from parser information.
The node.
Static
fromJSONStatic
Protected
_from
A type of RollTerm used to denote and perform an arithmetic operation.