Heroic Lands Heroic Lands
Home Thalorna Blog
Projects
Song of Heroic Lands HârnMaster 3 Modules API Documentation KnowledgeBase
License
  • Preparing search index...
  • The search index is not available
Song of Heroic Lands API - v0.8.2
  • Song of Heroic Lands API
  • sohl
  • document
  • item
  • logic
  • resolveStrikeMode

Function resolveStrikeMode

  • resolveStrikeMode(
        logic: StrikeModeCombatant,
        context: sohl.entity.action.SohlActionContext<Partial<StrikeModeTestScope>>,
    ): Promise<sohl.entity.strikemode.StrikeModeBase | undefined>
  • Resolve which strike mode a combat action should act on, per the hybrid rule:

    1. If context.scope.strikeModeId is set, use that mode (the combat-tab anchors always pass it; a macro may too). An id that matches no mode resolves to undefined with a warning.
    2. Otherwise, if the item has exactly one strike mode, use it — so a single-mode weapon or a combat technique (which always has exactly one) never prompts.
    3. Otherwise (two or more modes, none specified), prompt the user to choose with a picker dialog.

    Parameters

    • logic: StrikeModeCombatant

      The weapon or combat-technique logic exposing the strike modes.

    • context: sohl.entity.action.SohlActionContext<Partial<StrikeModeTestScope>>

      The action context; its scope.strikeModeId is honored first.

    Returns Promise<sohl.entity.strikemode.StrikeModeBase | undefined>

    The resolved strike mode, or undefined if none could be resolved (no modes, an unknown id, or the picker was dismissed).

    • Defined in src/document/item/logic/strikeModeTest.ts:87

Settings

Member Visibility
Song of Heroic Lands API - v0.8.2
  • Loading...

Generated using TypeDoc with typedoc-github-theme

© 2020–2026 Tom Rodriguez. Content under The World of Thalorna and Song of Heroic Lands is licensed under CC BY-SA 4.0; all other content is © Tom Rodriguez, all rights reserved. See License.

CC BY-SA 4.0 Discord