Construction data for a CombatResult.

interface Data {
    __kind?: string;
    attackResult?: sohl.entity.result.AttackResult;
    breakTies: boolean;
    defendResult?:
        | sohl.entity.result.AttackResult
        | sohl.entity.result.DefendResult;
    description: string;
    name: string;
    rollMode: string;
    sourceTestResult: sohl.entity.result.SuccessTestResult;
    speaker: sohl.core.logic.SohlSpeaker;
    targetTestResult: sohl.entity.result.SuccessTestResult;
    targetToken: null
    | SohlTokenDocument;
    tieBreak: number;
    tieBreakReason: TieBreakReason;
    title: 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.

The attacker's evaluated AttackResult. Optional alias for sourceTestResult — supply one or the other (or both).

breakTies: boolean

Whether a tie should be broken rather than reported as a tie.

The defender's evaluated DefendResult or AttackResult (for counterstrikes). Optional alias for targetTestResult.

description: string

Human-readable description shown on the chat card.

name: string

Internal identifier for the result.

rollMode: string

Foundry roll mode for chat output.

The initiating actor's success test.

Speaker identity for the result's chat card.

The responding actor's success test (or built from targetToken).

targetToken: null | SohlTokenDocument

The target's token, used to build a target test when one isn't supplied.

tieBreak: number

The side a tie is awarded to (an OPPOSED_TEST_RESULT_TIEBREAK value).

tieBreakReason: TieBreakReason

Which rule settled a broken tie.

title: string

Title shown on the chat card.