A specific hit location within a BodyPart — e.g., "Skull", "Upper Left Arm", "Abdomen".

Each location tracks its probability weight for random hit selection, natural protection values per ImpactAspect, and injury-related thresholds (bleeding severity, amputation modifier, shock value).

Used by the combat resolution pipeline for hit location determination and damage calculation.

Lifecycle: Rebuilt from persisted schema data on every preparation cycle. May be mutated during the lifecycle (e.g., active effects adding modifiers to protection values), but mutations are not persisted — they are recomputed on the next cycle.

Hierarchy (View Summary)

Constructors

  • Builds a single armor body location from its persisted data, binding it to its owning body part.

    Parameters

    • data: sohl.entity.body.BodyLocation.Data

      Persisted location data.

      Persisted data shape for a body location.

      • Optional__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.

      • amputability: string

        Amputability tier (Amputability value).

      • bleedingSusceptibility: string

        Bleeding tier (BleedingSusceptibility value).

      • bodyPartCode: string

        Shortcode of the BodyPart this location belongs to. A location whose code matches no part is not reachable in the hierarchy (see sohl.entity.body.BodyStructure.orphanedLocations).

      • OptionalisFumble?: boolean

        Whether a serious/grievous injury here can cause a fumble.

      • OptionalisStumble?: boolean

        Whether a serious/grievous injury here can cause a stumble.

      • Optionalname?: string

        Display name of the location.

      • probWeight: number

        Weight used in random hit location selection

      • protectionBase: { blunt: number; edged: number; fire: number; piercing: number }

        Base protection values for different impact aspects

        • blunt: number

          Base protection against blunt impact.

        • edged: number

          Base protection against edged impact.

        • fire: number

          Base protection against fire impact.

        • piercing: number

          Base protection against piercing impact.

      • shockValue: number

        Base shock value for injuries to this location (subject to modifiers)

      • shortcode: string

        Unique location identifier within its part.

    • options: sohl.entity.body.BodyLocation.Options

      Options for constructing the body location, including parent and body part references.

      Construction options for a BodyLocation instance.

      • bodyPart: sohl.entity.body.BodyPart

        Owning body part

      • index: number

        Zero-based index of this location within the flat structure.locations array.

      • parent: SohlLogic<any>

        The Logic that owns the entity. Required (the constructor throws without it) and transient — held in memory, never written to JSON.

    Returns sohl.entity.body.BodyLocation

    If required fields are missing from data or options.

Properties

amputability: string

Amputability tier — see Amputability in constants.

armorProtection: {
    blunt: number;
    edged: number;
    fire: number;
    piercing: number;
}

Worn-armor protection per aspect, summed across every ArmorGear covering this location during the lifecycle. Reset and recomputed each cycle by the armor-aggregation step; zero before aggregation runs.

Type declaration

  • blunt: number

    Worn-armor protection against blunt impact.

  • edged: number

    Worn-armor protection against edged impact.

  • fire: number

    Worn-armor protection against fire impact.

  • piercing: number

    Worn-armor protection against piercing impact.

armorType: string

Comma-joined list of armor materials covering this location, e.g. "Cloth, Mail".

bleedingSusceptibility: string

Bleeding tier — see BleedingSusceptibility in constants.

Back-reference to the owning BodyPart.

index: number

Zero-based index of this location within the flat structure.locations array.

isFumble: boolean

Whether a Serious-or-worse injury here can cause a fumble. A Serious injury requires a fumble roll; a Grievous injury fumbles automatically.

isRigid: boolean

True once any rigid armor covers this location (drives glancing blows).

isStumble: boolean

Whether a Serious-or-worse injury here can cause a stumble. A Serious injury requires a stumble roll; a Grievous injury stumbles automatically.

name: string

Display name of this location (falls back to the shortcode).

Selection weight for this location in random hit-location rolls within its part.

protectionBase: {
    blunt: sohl.entity.modifier.ValueModifier;
    edged: sohl.entity.modifier.ValueModifier;
    fire: sohl.entity.modifier.ValueModifier;
    piercing: sohl.entity.modifier.ValueModifier;
}

Natural (intrinsic) protection per aspect, before worn armor.

Type declaration

Base shock contribution this location adds to the Shock Index when wounded.

shortcode: string

Unique location identifier within its body part.

Accessors

  • get kind(): string
  • The serialization discriminator for this instance — the concrete class's static Kind. Written into the JSON by toJSON under the kind key and read back by sohl.utils.defaultFromJSON to select the constructor. Derived from the class, never stored per-instance.

    Returns string

  • get parent(): SohlLogic<any>
  • The Logic that owns this entity. Always present (the constructor rejects a missing parent) and transient — it is not serialized and is re-supplied when the entity is revived or cloned.

    Returns SohlLogic<any>

  • get position(): number
  • This location's position among its part's locations, as opposed to index, its slot in the flat structure.locations array. Drag-to-sort addresses a destination by position; storage addresses it by index.

    Returns number

  • get updatePath(): string
  • The dot-notation path prefix for Foundry update() calls targeting this location's persisted fields, e.g. "system.body.structure.locations.7".

    Returns string

Methods

  • Serialize this instance to a plain object suitable for JSON serialization.

    Returns PlainObject

    A plain object representing this instance, consistent with the Data interface of the subclass.

    The base emits only the kind tag. A subclass that adds state overrides this, chaining ...super.toJSON(), and emits keys matching its own Data interface in persisted form (a uuid/shortcode where the live object holds a resolved reference). The governing rule: toJSON() output must be valid data for the constructor. The transient parent is deliberately not emitted — it is re-supplied on revival.