Construction data for a SuccessTestResult.

interface Data {
    __kind?: string;
    autoCriticalFail?: boolean;
    canFate: boolean;
    description: string;
    isSuccessValue?: boolean;
    masteryLevelModifier: sohl.entity.modifier.MasteryLevelModifier;
    mishaps: string[];
    movement: SuccessTestResultMovement;
    name: string;
    roll: sohl.entity.roll.SimpleRoll;
    rollMode: SohlSpeakerRollMode;
    speaker: sohl.core.logic.SohlSpeaker;
    successLevel: number;
    successStarTable: LimitedDescription[];
    targetValueFunc: (sl: number) => number;
    testType: string;
    title: string;
    tokenUuid: string;
}

Hierarchy (View Summary)

Properties

__kind?: string

Discriminator kind, written on serialization (SohlEntity.toJSON) and read back on revival. Optional as constructor input — it is derived from the concrete class, not supplied by callers.

autoCriticalFail?: boolean

Force an auto-Critical-Failure (#568) — the test requires a body part the actor cannot use. Defaults false.

canFate: boolean

Whether fate may be spent on this test.

description: string

Human-readable description shown on the chat card.

isSuccessValue?: boolean

Whether this is a Success Value test (#848) — graded into a Success Value and Success Stars via successStarTable. Defaults false.

The mastery-level modifier to test against.

mishaps: string[]

Mishap codes to seed (e.g. fumble, stumble).

Tactical movement state for the test.

name: string

Internal identifier for the result.

A pre-seeded d100 roll (omit to roll fresh in SuccessTestResult.evaluate).

Foundry roll mode for chat output.

Speaker identity for the result's chat card.

successLevel: number

A previously-evaluated success level to restore (e.g. a cross-client snapshot).

successStarTable: LimitedDescription[]

The description table used to derive result text and stars. Rides the wire as data (#206); the display outcome (text, stars) is computed from it on read, never stored (#205).

targetValueFunc: (sl: number) => number

Maps a success level to the test's target value (identity for a plain success test).

testType: string

Which kind of test this is (a TEST_TYPE id).

title: string

Title shown on the chat card.

tokenUuid: string

The token the test is associated with.