build_battle_command
Create in-battle event commands for troop battle-event pages: reveal hidden enemies, add/remove states, or abort battles. Returns a command object.
Instructions
Build an in-battle event command for a troop battle-event page (see build_troop_page / add_troop_page / insert_event_commands target "troop_page"): enemy_appear (335 — reveal a troop member added with hidden: true, i.e. a summon/reinforcement), enemy_state (333 — add/remove a state on one troop member or the whole troop, e.g. a telegraph "Gathering power" state), or abort_battle (340 — end the battle with no victory/defeat; the calling Battle Processing takes its Escape branch). enemyIndex is the 0-based troop slot (members[] order), NOT an enemy id; enemy_state also accepts -1 = entire troop. Read-only: returns { command }.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| kind | Yes | Which battle command to build | |
| indent | No | Indentation level (default 0) | |
| stateId | No | enemy_state: the state id | |
| enemyIndex | No | enemy_appear/enemy_state: 0-based troop slot (members[] order); enemy_state also allows -1 = entire troop | |
| stateOperation | No | enemy_state: add or remove the state (default add) |