@vttforge/core / RollLike
Interface: RollLike ​
foundry.dice.Roll.
Properties ​
data ​
readonlydata:Record<string,unknown>
dice ​
readonlydice:DieTermLike[]
formula ​
readonlyformula:string
isDeterministic ​
readonlyisDeterministic:boolean
options ​
options:
Record<string,unknown>
result ​
readonlyresult:string
terms ​
readonlyterms:RollTermLike[]
total ​
readonlytotal:number|undefined
Undefined until the roll is evaluated.
Methods ​
alter() ​
alter(
multiply,add,options?):this
Parameters ​
multiply ​
number
add ​
number
options? ​
multiplyNumeric? ​
boolean
Returns ​
this
clone() ​
clone():
this
Returns ​
this
evaluate() ​
evaluate(
options?):Promise<RollLike>
Always await this. Nothing reads total before it resolves.
Parameters ​
options? ​
Returns ​
Promise<RollLike>
evaluateSync() ​
evaluateSync(
options?):this
Only for a deterministic roll: pass minimize or maximize.
Parameters ​
options? ​
RollEvaluateOptions & object
Returns ​
this
getTooltip() ​
getTooltip():
Promise<string>
Returns ​
Promise<string>
render() ​
render(
options?):Promise<string>
Parameters ​
options? ​
flavor? ​
string
isPrivate? ​
boolean
template? ​
string
Returns ​
Promise<string>
reroll() ​
reroll(
options?):Promise<RollLike>
Parameters ​
options? ​
Returns ​
Promise<RollLike>
resetFormula() ​
resetFormula():
string
Returns ​
string
roll() ​
roll(
options?):Promise<RollLike>
An async alias of evaluate.
Parameters ​
options? ​
Returns ​
Promise<RollLike>
toAnchor() ​
toAnchor(
options?):HTMLAnchorElement
Parameters ​
options? ​
attrs? ​
Record<string, string>
classes? ​
readonly string[]
dataset? ​
Record<string, string>
icon? ​
string
label? ​
string
Returns ​
HTMLAnchorElement
toJSON() ​
toJSON():
Record<string,unknown>
Returns ​
Record<string, unknown>
toMessage() ​
toMessage(
messageData?,options?):Promise<unknown>
Parameters ​
messageData? ​
Record<string, unknown>
options? ​
Returns ​
Promise<unknown>