Calculate battle damage (Pokémon Champions)
calculate_damageCalculate the damage a move deals in Pokémon Champions, factoring in abilities, items, weather, terrain, Tera, and Doubles conditions. Reports damage range, percent, and hits-to-KO.
Instructions
Calculate the damage one Pokémon deals to another with a given move in Pokémon Champions (VGC-style, defaults to Doubles). Wraps the trusted @smogon/calc engine, so abilities (Contrary, Intimidate, ...), items, weather, terrain, Tera, crits, multi-hit, screens and Doubles spread reduction are all handled correctly. For moves whose power builds up over a battle — Rage Fist (per hit taken), Last Respects (per fainted ally) — pass moveContext so the base power scales correctly; or pin any variable-power move with moveContext.basePowerOverride. Answers questions like "does my Choice Band Staraptor-Mega OHKO that Garchomp?". Returns the damage range, percent range, hits-to-KO, and the human-readable calc string.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| move | Yes | The move the attacker uses, e.g. "Close Combat". | |
| field | No | Battle field/side conditions. Defaults to Doubles. | |
| attacker | Yes | The attacking Pokémon and its set. | |
| defender | Yes | The defending Pokémon and its set. | |
| moveContext | No | Battle-history context for moves whose base power accumulates (Rage Fist, Last Respects), or a raw basePowerOverride for any other variable-power move. |