attack_modifiers
Compute an attack's Advantage or Disadvantage from both combatants' conditions and distance, including ranged close-combat penalties, using SRD 5.2.1 rules.
Instructions
Compose an attack roll's Advantage/Disadvantage from both combatants' conditions and distance (Prone's 5-foot flip, Blinded, Restrained, Paralyzed, Stunned, Invisible with the seen exception, the Grappled attacker rule, and — for ranged attacks — the Ranged Attacks in Close Combat Disadvantage). Condition-sensitive observations such as charmer/grappler relationships, visibility, and the nearby-enemy census are required rather than defaulted. Exhaustion is returned as a flat modifier, never Advantage. Genuinely ambiguous rules text (e.g. a seen Invisible target) returns cannot-adjudicate with the ambiguous sentence cited.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ranged | No | true if this is a ranged attack (weapon or spell); enables the Ranged Attacks in Close Combat rule | |
| target | No | ||
| attacker | No | ||
| request_id | No | ||
| distance_ft | Yes | ||
| table_policy | No | ||
| asserted_facts | No | ||
| nearby_enemies | No | required for a ranged attack; enemies within 5 ft of the attacker (an explicit empty list means none). A ranged attack gets Disadvantage if any can see the attacker and isn't Incapacitated. | |
| policy_context | No | ||
| table_decision | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| why | Yes | ||
| data | No | ||
| facts | Yes | ||
| adapter | Yes | ||
| verdict | Yes | ||
| rule_ids | Yes | ||
| citations | Yes | ||
| exit_code | Yes | ||
| assumptions | Yes | ||
| explanation | Yes | ||
| rule_result | Yes | ||
| checked_scope | Yes | ||
| coverage_level | Yes | ||
| state_mutation | Yes | ||
| table_decision | Yes | ||
| unchecked_scope | Yes |