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
  • combatant
  • logic
  • defaultModeIndex

Function defaultModeIndex

  • defaultModeIndex(
        modes: sohl.entity.strikemode.StrikeModeBase[],
        preferences: (undefined | null | PointerData)[],
        ml: (mode: sohl.entity.strikemode.StrikeModeBase) => number,
    ): number
  • The default mode index for a picker: the first of preferences that is still available, otherwise the best-chance mode (highest effective ML). Pure.

    Parameters

    • modes: sohl.entity.strikemode.StrikeModeBase[]

      The available strike modes, in display order.

    • preferences: (undefined | null | PointerData)[]

      Preferred mode pointers, most-preferred first; absent (undefined/null) and no-longer-available entries are skipped.

    • ml: (mode: sohl.entity.strikemode.StrikeModeBase) => number

      Extracts the effective mastery level of a mode (the best-chance tiebreak).

    Returns number

    The index of the default mode in modes, or -1 if modes is empty.

    • Defined in src/document/combatant/logic/SohlCombatantLogic.ts:1449

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