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
FLAVOR_A regular expression pattern which identifies optional term-level flavor text
Static
FLAVOR_A regular expression which identifies term-level flavor text
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
A string representation of the formula expression for this RollTerm, prior to evaluation.
A string representation of the formula, including optional flavor text.
A string or numeric representation of the final output for this term, after evaluation.
Optional flavor text which modifies and describes this term.
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
An abstract class which represents a single token that can be used as part of a Roll formula. Every portion of a Roll formula is parsed into a subclass of RollTerm in order for the Roll to be fully evaluated.