Construction data for an ImpactModifier.

interface Data {
    __kind?: string;
    aimBodyPartCode: string;
    aspect: ImpactAspect;
    baseValue: null | number;
    customFunction: null | Function;
    deltas: sohl.entity.modifier.ValueDelta[];
    disabledReason: string;
    roll: sohl.entity.roll.SimpleRoll;
    spread: number;
    variant: ImpactVariant;
}

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.

aimBodyPartCode: string

The body part shortcode this attack aims at (empty when unaimed).

aspect: ImpactAspect

The damage aspect (blunt/edged/piercing/fire); defaults to blunt.

baseValue: null | number

The base value before deltas (null to leave unset).

customFunction: null | Function

Handler for a CUSTOM delta (null if unused).

The deltas applied on top of the base.

disabledReason: string

Reason the value is disabled; "" (or falsy) means enabled.

Pre-rolled or seed dice for the impact.

spread: number

Strike spread for hit-location scatter (0 when unaimed).

variant: ImpactVariant

The impact variant (e.g., normal, frost, piercing); defaults to normal.