functions: {
    and: (...args: any[]) => 0 | 1;
    eq: (a: any, b: any) => 0 | 1;
    gt: (a: any, b: any) => 0 | 1;
    gte: (a: any, b: any) => 0 | 1;
    if: (condition: any, ifTrue: any) => number;
    ifelse: (condition: any, ifTrue: any, ifFalse: any) => number;
    lookup: (condition: number, fallback: number, ...results: any[]) => number;
    lt: (a: any, b: any) => 0 | 1;
    lte: (a: any, b: any) => 0 | 1;
    ne: (a: any, b: any) => 0 | 1;
    not: (a: any) => boolean;
    or: (...args: any[]) => 0 | 1;
    sizeReach: (
        size?: string | number,
        reach?: boolean,
        stature?: "tall" | "long",
    ) => number;
    sizeRoll: (
        count: number,
        sides: number,
        target: string | number,
        initial: string | number,
    ) => number;
    xor: (...args: any[]) => 0 | 1;
} = ...

Roll functions

Type declaration

  • and: (...args: any[]) => 0 | 1
  • eq: (a: any, b: any) => 0 | 1
  • gt: (a: any, b: any) => 0 | 1
  • gte: (a: any, b: any) => 0 | 1
  • if: (condition: any, ifTrue: any) => number
  • ifelse: (condition: any, ifTrue: any, ifFalse: any) => number
  • lookup: (condition: number, fallback: number, ...results: any[]) => number
  • lt: (a: any, b: any) => 0 | 1
  • lte: (a: any, b: any) => 0 | 1
  • ne: (a: any, b: any) => 0 | 1
  • not: (a: any) => boolean
  • or: (...args: any[]) => 0 | 1
  • sizeReach: (size?: string | number, reach?: boolean, stature?: "tall" | "long") => number
  • sizeRoll: (
        count: number,
        sides: number,
        target: string | number,
        initial: string | number,
    ) => number
  • xor: (...args: any[]) => 0 | 1
eq(a,b) // equal (a === b)
ne(a,b) // not equal (a !== b)
lt(a,b) // less than (a < b)
lte(a,b) // less than or equal (a <= b)
gt(a,b) // greater than (a > b)
gte(a,b) // greater than or equal (a >= b)
and(a, b, ...) // all true
or(a, b, ...) // some true
xor(a, b, ...) // one true
not(a) // not (!a)