Builds a single armor body location from its persisted data, binding it to its owning body part.
Persisted location data.
Persisted data shape for a body location.
Optional__kind?: stringDiscriminator 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 tier (Amputability value).
Bleeding tier (BleedingSusceptibility value).
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?: booleanWhether a serious/grievous injury here can cause a fumble.
OptionalisStumble?: booleanWhether a serious/grievous injury here can cause a stumble.
Optionalname?: stringDisplay name of the location.
Weight used in random hit location selection
Base protection values for different impact aspects
Base protection against blunt impact.
Base protection against edged impact.
Base protection against fire impact.
Base protection against piercing impact.
Base shock value for injuries to this location (subject to modifiers)
Unique location identifier within its part.
Options for constructing the body location, including parent and body part references.
Construction options for a BodyLocation instance.
ReadonlyamputabilityAmputability tier — see Amputability in constants.
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.
Worn-armor protection against blunt impact.
Worn-armor protection against edged impact.
Worn-armor protection against fire impact.
Worn-armor protection against piercing impact.
Comma-joined list of armor materials covering this location, e.g. "Cloth, Mail".
ReadonlybleedingBleeding tier — see BleedingSusceptibility in constants.
ReadonlybodyBack-reference to the owning BodyPart.
ReadonlyindexZero-based index of this location within the flat structure.locations array.
ReadonlyisWhether a Serious-or-worse injury here can cause a fumble. A Serious injury requires a fumble roll; a Grievous injury fumbles automatically.
True once any rigid armor covers this location (drives glancing blows).
ReadonlyisWhether a Serious-or-worse injury here can cause a stumble. A Serious injury requires a stumble roll; a Grievous injury stumbles automatically.
ReadonlynameDisplay name of this location (falls back to the shortcode).
ReadonlyprobSelection weight for this location in random hit-location rolls within its part.
ReadonlyprotectionNatural (intrinsic) protection per aspect, before worn armor.
Natural protection against blunt impact.
Natural protection against edged impact.
Natural protection against fire impact.
Natural protection against piercing impact.
ReadonlyshockBase shock contribution this location adds to the Shock Index when wounded.
ReadonlyshortcodeUnique location identifier within its body part.
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.
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.
The dot-notation path prefix for Foundry update() calls targeting
this location's persisted fields, e.g.
"system.body.structure.locations.7".
Deep-copy this entity, re-parenting the copy under parent with no other
changes. Shorthand for clone({}, { parent }).
The Logic to own the cloned entity.
The cloned entity.
Deep-copy this entity, optionally overriding fields and clone options.
Field overrides applied to the clone.
Clone options (e.g. a new parent).
The cloned entity.
Serialize this instance to a plain object suitable for JSON serialization.
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.
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.