The roll formula to parse
Optional
data: objectThe data object against which to parse attributes within the formula
Optional
options: Partial<D20RollConstructorOptions> = {}Optional
context: D20RollContext = {}Static
CHAT_The default handlebars template used to render the roll's chat message
Static
DIALOG_The default handlebars template used to render the roll's dialog
Static
STATIC_Static roll results
Static
standardStandard roll used by the system (1d20).
Modifier on the roll besides natural roll. Undefined if the roll isn't evaluated.
The D20 die this roll is based on.
The flavor this roll was created with.
Is this roll a critical success? Returns undefined if roll isn't evaluated.
Is this roll a misfire.
Is this roll a natural 1? Returns undefined if roll isn't evaluated.
Is this roll a natural 20? Returns undefined if roll isn't evaluated.
Natural roll value. Undefined if the roll isn't evaluated.
Static
defaultDefault options for D20Rolls
Private
_applyPrivate
_applyProtected
_getProtected
_onProtected
A callback applying the user's input from the dialog to the roll and its options.
The dialog's submitted HTML
Optional
staticRoll: null | numberA static roll result to use instead of rolling the dice
This roll
Render a Dialog for the user to enter additional bonuses, set a static roll result, or take 10/20.
Optional
options: D20RollDialogOptions = {}Additional options determining what options to show in the dialog
A promise that resolves when the dialog is closed
Transform this roll into a ChatMessage displaying the result. This function can either create a ChatMessage (by default) or return the data object that would be used to create one.
The data object to use when creating the message
Additional options which configure how the message is created
The created ChatMessage document, or the object of data that would be used to create one
Static
cleanStatic
getStatic
safeSynchronous and thrown error consuming roll evaluation.
Roll formula
Data supplied to roll
If error occurs, this will be included in the error message.
Optional
options: { Additional options
If true, no error will be printed even if one occurs.
Optional
evalOpts: object = {}Additional options to pass to Roll.evaluate()
.err
set if an error occurred during evaluation.Static
safeSynchronous and thrown error consuming roll evaluation.
Roll formula
Data supplied to roll
If error occurs, this will be included in the error message.
Additional options
If true, no error will be printed
Additional options to pass to Roll.evaluate()
.err
set if an error occurred during evaluation.Generated using TypeDoc
A class adding additional functionality to Roll Rolls for d20 based Pathfinder rolls.