Construct an empty impact modifier owned by parent — shorthand for
new ImpactModifier({}, { parent }) (aspect defaults to blunt).
The owning sohl.core.logic.SohlLogic.
Builds an impact modifier, parsing the optional damage roll and resolving the aspect (defaulting to blunt when none is supplied).
Impact data; roll (the dice) and aspect are optional —
aspect defaults to blunt.
Must provide options.parent (base ValueModifier).
OptionalbaseThe base value before deltas (undefined until set; treated as 0 by base).
OptionalcustomHandler invoked by a CUSTOM delta to compute a value, when one is used.
The list of ValueDelta modifiers applied on top of the base.
Reason the value is disabled as an i18n key; empty string means enabled. Localize for display via disabledLabel. See disabled.
The body part shortcode this attack aims at (empty when unaimed).
The damage aspect (blunt/edged/piercing/fire) this impact delivers.
The base value (0 when unset).
Setter form of setBase.
Render the deltas as an HTML breakdown (name + adjustment per row) for chat cards and tooltips; when disabled, renders the localized disabled reason instead.
A compact, human-readable summary of how the value is derived: the base
contribution followed by each applied delta (e.g. Base +30, SSMod +25),
or the disabled marker (Dsbl) when disabled. An unmodified value
still summarizes as Base +N, so the summary is never empty for an
enabled value.
Named deltaLabel — not shortcode — because a ValueModifier's
derivation summary is unrelated to the document system.shortcode
identity key used across the rest of the system.
The impact as a formula string, e.g. "2d6+3" (or "0" when empty).
Number of faces on the impact die (0 when there are no dice).
Beyond the inherited disabled reason, an impact is disabled automatically when it would deal no damage — both the dice and the effective modifier are zero.
The disabled reason localized for display, or "" when enabled.
disabledReason always stores an i18n key (never localized prose), so callers that surface the reason to a human must localize it here rather than emitting the raw key (#948). Idempotent on already-plain text.
The computed effective value — the base with all deltas applied (always 0 when disabled). Recomputed lazily on access.
Whether no deltas have been applied.
Whether a base value has been explicitly set.
A coarse index derived from the base value (base / 10, truncated).
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.
The diceFormula with the aspect suffix appended, e.g. "2d6+3e" for edged.
The deltas' net contribution to the value — effective − base.
Number of impact dice (0 when none).
Strike spread governing hit-location scatter from aimBodyPartCode.
0 when not aimed.
The impact variant (e.g., normal, frost, piercing); null when not set.
Add an additive (+value) delta. A new delta replaces any existing one
with the same abbrev.
this, for chaining.
Two forms: (abbrev, value) resolves the display name from the
VALUE_DELTA_INFO registry (and throws on an unknown abbrev);
(name, abbrev, value) supplies both explicitly for ad-hoc deltas.
Fold another modifier into this one, preserving the full auditable
derivation: every labeled delta from other (its name, abbrev,
operator, and value) is replayed onto this modifier, so the merged result
keeps each source justification in its tooltip and this modifier can then
layer its own deltas on top.
Deltas are additive — other's are appended to whatever this modifier
already carries (each replayed through the internal _oper, so
same-abbrev replacement and OVERRIDE semantics apply, and the clones
are re-parented to this modifier). The base is not additive — a
modifier has exactly
one base — so other's base is adopted only when includeBase is set,
and it replaces any existing base rather than adding to it. Omit
includeBase to take other's modifiers while keeping this modifier's
own base.
The modifier to merge from.
Merge options.
OptionalincludeBase?: booleanWhen set, replace this modifier's base with
other's base.
this, for chaining.
Add a DOWNGRADE (ceiling / maximum) delta: the effective value cannot
exceed value. Same argument forms as add.
this, for chaining.
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.
Add an UPGRADE (floor / minimum) delta: the effective value cannot drop
below value. Same argument forms as add.
this, for chaining.
Find the delta with the given abbrev.
The delta abbrev to look up.
The matching ValueDelta, or undefined.
Add a multiplicative (×value) delta. Same argument forms as
add.
this, for chaining.
Add an OVERRIDE delta that replaces the value, ignoring all other
modifiers. Same argument forms as add.
this, for chaining.
Chainable form of the disabled setter.
A reason string, or a boolean (true applies a default
reason; false clears it).
this, for chaining.
Serialize to a plain object satisfying ImpactModifier.Data: the
inherited ValueModifier fields plus the impact roll and aspect.
The plain-object representation.
StaticformatFormat the dice term of an impact — "", "d6", or "2d6" — applying the
shared convention that a single die drops its redundant count (d6, not
1d6) and that a count of zero (or an absent die size) yields no dice term
at all. Shared by diceFormula and the strike-mode sheet's Impact
column so both render identically.
The number of dice.
The die size (faces), or null/0 when there is no die.
The dice term, or an empty string when there are no dice.
A ValueModifier specialized for damage/impact calculation — the amount of harm delivered by an attack or effect before defenses and resistances are applied.
Impact components
An impact has three parts:
Key properties
"2d6+3""2d6+3e"(edged)Disabled state
Automatically disabled when both dice and effective modifier are zero, meaning the strike deals no damage. Can also be explicitly disabled via the inherited
disabledproperty.Lifecycle
Created from strike mode data during combat resolution. The base modifier comes from the weapon/technique's impact base, and deltas are added for strength, quality, and situational factors before evaluate is called.