@alpaca-software/40kdc-data
    Preparing search index...

    Function resolveAttachedLeader

    • The roster's leader entry attached to bodyguardUnitId, if any. Import stores the inferred (always-provisional) attachment on the leader's RosterUnit, pointing down to its bodyguard via leader_attachment.bodyguard_ref. Selection UIs start from the body unit, so this scans for the leader whose bodyguard_ref.id matches. Returns undefined when no leader in the roster is attached to that unit (the common case — attachments are optional at game start).

      Parameters

      • roster: Roster
      • bodyguardUnitId: string

      Returns RosterUnit | undefined