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

Function buildAttackCardData

  • buildAttackCardData(input: AttackCardInput): ActionCardSpec
  • Build the sohl.document.chat.ActionCardSpec for the automated-combat attack card from an evaluated sohl.entity.result.AttackResult. Pure and Foundry-free.

    The card is assembled the same way every action card is (see sohl.document.chat.buildActionCard): a body template (attack-card.hbs) plus a buttons array. Transparency-by-design — the attacker's choices (Aim, Aspect) and the resolved Attack Mastery Level ride in the body data for everyone to see.

    All four defense buttons are emitted (when there is a target); each is a self-sufficient defense-resume action addressed to the defender's combatant (so the click resolves on the defender's client), carrying the evaluated attack in its scope (revived by the resume flows as context.scope.attackResult). Per-defender capability gating (Block/Counterstrike/Dodge) still happens later, at render time, in sohl.document.chat.gateAutomatedDefenseButtons. With no target the card is informational (no buttons).

    Parameters

    • input: AttackCardInput

      The evaluated attack result and attacker/target metadata.

    Returns ActionCardSpec

    The action-card spec for the attack card.

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

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