Reference · Rolls and exact odds
isSuccessRollfunction
Whether the first thing a roll says is a number of successes: every kind of dice in it is counted.
Import it
import { isSuccessRoll } from "@johnmorrisdotca/korokoro";
Definition
function isSuccessRoll(spec: RollSpec): boolean
Parameters
| Name | Type | Description |
|---|---|---|
spec | RollSpec | Dice counts, sides, rules and modifier; omitted fields use the documented defaults. |
Returns
boolean
Whether the first thing a roll says is a number of successes: every kind of dice in it is counted.
Examples
import { isSuccessRoll } from "@johnmorrisdotca/korokoro";
import { parseNotation } from "@johnmorrisdotca/korokoro";
console.log(isSuccessRoll(parseNotation("3d6>=5")!));trueWhat it prints (run when this page was built)