attack
Attack an enemy unit to resolve combat and counter-attack. Both units may take damage or die. Requires attacker in READY or MOVED status and target in range. Use simulate_attack to preview before committing.
Instructions
Mutating. Attack an enemy unit, resolving combat and counter-attack immediately. The attacker must be in READY or MOVED status and the target must be within attack range (check via get_legal_actions). unit_id is your attacking unit; target_id is the enemy unit. Both units may take damage; either may die. After attacking, the unit's status becomes DONE for this turn. Use simulate_attack first to preview the outcome without committing. Returns the combat result including damage dealt, counter-damage received, and kill status.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| connection_id | Yes | ||
| unit_id | Yes | ||
| target_id | Yes |