EngageBattle
Start a battle with the monsters the party has met.
Full documentation: EngageBattle. Wire type: engage_battle.
Legal session modes: encounter
JSON Schema
{
"description": "Start a battle with the monsters the party has met.\n\nAn encounter must be open. Attacks, spells, and an item's striking effects\nhappen only in battle, so this is how the party starts a fight.\n`TurnUndead` is the one aggressive act the\nparty can take in an encounter without starting a battle first. When the monsters were\nsurprised at the start of the encounter, the party gets a free first round. During a\npursuit, the party turns and fights at the current distance. Once the battle has\nstarted, send one `ResolveBattleRound` for\neach round.\n\nModes:\n `encounter`\n\nRejections:\n - `session.command.wrong_mode` - no encounter is open.\n - `encounter.none_active` - a second check behind the mode gate, which normal\n play never reaches.\n\nEvents:\n `BattleStartedEvent`. A monster group\n whose morale score is 2 flees at once\n (`MonsterFledEvent`). When every group\n flees, the battle ends at once, with a\n `BattleEndedEvent` and the events of the\n encounter's end.",
"properties": {
"command_type": {
"const": "engage_battle",
"default": "engage_battle",
"title": "Command Type",
"type": "string",
"description": "The name that identifies the command class in serialized data. Each command class fixes\nit to a distinct snake_case string, like `\"move_party\"` or `\"open_door\"`, and constructing\nthe class sets it, so you never pass it yourself.\n`parse_command` and the\n`AnyCommand` union use it to rebuild the right class\nfrom a serialized mapping. A class's value never changes between releases."
},
"source": {
"anyOf": [
{
"minLength": 1,
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Source",
"description": "Who or what issued the command on whose behalf: an authored trigger or quest id, or the\nname of one of your game's systems. The engine never reads it, so a command with a\n`source` does exactly what the same command without one does. The session logs and\nreplays it with the command, so the log alone shows why something happened. Leave it\n`None` when there's nothing to record. An empty string fails validation when the command\nis constructed."
}
},
"title": "EngageBattle",
"type": "object"
}