A melee strike mode — close-combat attack with spread, reach, and defense capabilities (block and counterstrike).

Hierarchy (View Summary)

Constructors

Properties

assocSkillCode: null | string

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

Attack roll mastery level modifier.

defense: {
    block: sohl.entity.modifier.CombatModifier;
    counterstrike: sohl.entity.modifier.CombatModifier;
}

Defense modifiers for block and counterstrike.

Type declaration

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").

Effective melee engagement range (feet). Seeded from the weapon's lengthBase; the wielder's body reach is added on top during the owning logic's evaluate phase (see WeaponGearLogic/SkillLogic).

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.

  • SchemaField definition for melee strike modes — used as one branch of the TypedSchemaField on the combat-technique SkillDataModel.strikeMode.

    Returns DataSchema

    The data schema describing a melee strike mode.