combat_math
Calculate exact damage for a single hit using engine formulas, including crit chance and crit damage from ratings.
Instructions
Explain one hit using the engine's exact formulas (recovered from libgame.so, see docs/GAME_MATH.md). attack_type/armor_type 1..5 (Melee, Pierce, Magic, Siege, Hero); player heroes attack as 5. skill_coeff=1.0 for a normal hit or skill%/100 for a skill. Ratings are raw Hero.data stats. Also returns crit chance and crit-damage that the ratings convert to.
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": {
"atk": "<atk>"
},
"name": "combat_math"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| atk | Yes | ||
| is_crit | No | ||
| armor_type | No | ||
| attack_type | No | ||
| crit_rating | No | ||
| skill_coeff | No | ||
| crit_dmg_rating | No | ||
| target_reduce_rating | No | ||
| target_tenacity_rating | No |