AbstractRebuilds a strike mode from its persisted schema data, synthesizing the modifier objects used during combat resolution.
Derives spread from data.attack.spread,
attack from data.attack.modifier (seeded as an "AtkMod" delta),
and impact from data.impactBase
(dice count, die size, flat modifier, and aspect). The attack
modifier is disabled when data.attack.disabled or the noAttack trait
is set.
Persisted strike-mode fields (see StrikeModeBase.Data).
The owning Logic instance, used as the modifiers' parent.
This strike mode's key within the parent's strikeModes map.
Shortcode of the associated skill (resolved to SkillLogic at runtime).
Attack roll mastery level modifier.
Impact (damage) modifier with dice and aspect.
Minimum body parts needed to wield the weapon in this mode.
Descriptive name of this mode (e.g., "Cut", "Thrust", "Shoot").
Stable shortcode of this strike mode within its parent's strikeModes map.
How precisely this mode can target a specific body part.
Miscellaneous traits/flags for this strike mode.
The strike mode type discriminator: "melee" or "missile".
The full label of this strike mode, including its parent logic's name.
A string like "Broadsword Cut" or "Throwing Axe Throw".
The wielding weapon's Heft, surfaced for display — all of a weapon's
strike modes share it. Read live from the parent weapon's logic (a getter,
so it reflects the weapon's fully-evaluated ValueModifier).
undefined for combat-technique strike modes, whose parent is a skill
with no heft, so the Heft column is simply blank for those.
Whether this is a melee strike mode.
Whether this is a missile strike mode.
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.
A pointer to this strike mode within its parent logic (weapon or combat-technique skill).
A serializable object referring to this strike mode
Begin automated combat with this weapon. Delegates into the attacker's
StrikeModeBase.automatedCombatStart action — the single combat-start
entry point — passing this strike mode's pointer as scope.mode, so the
attack dialog opens with this mode selected (the attacker may still switch
to any other in-range mode).
The action context driving the automated combat start.
The result of the combatant's automatedCombatStart action, or undefined if the actor is not in the active combat.
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.
Compares this strike mode to another for sorting purposes.
The strike mode to compare to.
A negative number if this comes before other, positive if after, or 0 if equal.
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.
StaticbaseThe 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.
The shared data-schema field definitions for strike modes.
StaticfromCreates a strike mode instance from pointer data.
The pointer data referring to a strike mode.
The referred-to strike mode, or undefined if the pointer is invalid.
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.