• The reason a combatant is an invalid automated-attack target — the first TARGET_INVALID_STATUSES entry it has (dead / vanquished) — or null when it is a valid target. Pure and unit-tested.

    Parameters

    • statuses: Iterable<string>

      The target actor's active status-effect ids.

    • isDefeated: boolean

      Whether the target combatant is Foundry-DEFEATED.

    Returns string | null

    The disqualifying status id, or null.