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.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"connection_id": "<connection_id>",
"unit_id": "<unit_id>",
"target_id": "<target_id>"
},
"name": "attack"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| connection_id | Yes | ||
| unit_id | Yes | ||
| target_id | Yes |