Base class for all strike modes — a specific way a weapon or combat technique can be used in combat.

A single weapon can have multiple strike modes (e.g., a broadsword has "Cut", "Thrust", and "Pommel" melee modes; a throwing axe has a melee "Chop" mode and a missile "Throw" mode).

Strike modes carry the modifiers and test methods needed for combat resolution: attack rolls, impact calculation, and (for melee) defense rolls.

Lifecycle: Rebuilt from persisted schema data on every preparation cycle. Modifiers may be mutated during the lifecycle (e.g., injury penalties, weapon quality bonuses), but mutations are not persisted.

Hierarchy (View Summary)

Constructors

Properties

assocSkillCode: null | string

Shortcode of the associated skill (resolved to SkillLogic at runtime).

Attack roll mastery level modifier.

Impact (damage) modifier with dice and aspect.

minParts: number

Minimum body parts needed to wield the weapon in this mode.

name: string

Descriptive name of this mode (e.g., "Cut", "Thrust", "Shoot").

shortcode: string

Stable shortcode of this strike mode within its parent's strikeModes map.

How precisely this mode can target a specific body part.

traits: PlainObject

Miscellaneous traits/flags for this strike mode.

The strike mode type discriminator: "melee" or "missile".

Accessors

  • get fullLabel(): string
  • The full label of this strike mode, including its parent logic's name.

    Returns string

    A string like "Broadsword Cut" or "Throwing Axe Throw".

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

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.

  • The base SchemaField definitions shared by all strike-mode types. Subclasses should call this and merge in their type-specific fields to produce a SchemaField suitable for use in a TypedSchemaField.

    Returns DataSchema

    The shared data-schema field definitions for strike modes.