Reference · Rolls and exact odds
rulesTextfunction
The modifiers of one kind of dice as notation writes them, in the one order they are written: >=8f=1!, r<3kh3. Two kinds with the same die and the same text here are the same dice under the same rules.
Import it
import { rulesText } from "@johnmorrisdotca/korokoro";
Definition
function rulesText(group: DiceGroup): string
Parameters
| Name | Type | Description |
|---|---|---|
group | DiceGroup | One kind of dice and its rules. |
Returns
string
The modifiers of one kind of dice as notation writes them, in the one order they are written: >=8f=1!, r<3kh3. Two kinds with the same die and the same text here are the same dice under the same rules.
Examples
import { rulesText } from "@johnmorrisdotca/korokoro";
import { parseNotation } from "@johnmorrisdotca/korokoro";
console.log(rulesText(parseNotation("4d6kh3")!));kh3What it prints (run when this page was built)