CastSpell
Cast a memorized spell outside battle (one round).
Full documentation: CastSpell. Wire type: cast_spell.
Legal session modes: exploring, town
JSON Schema
{
"description": "Cast a memorized spell outside battle (one round).\n\n`targets` are entity ids, or `cell:` references for location-bound casts. In\nencounter mode a hostile cast is opened through\n[`EngageBattle`][osrlib.crawl.commands.EngageBattle] and the first round's\ndeclarations instead; in battle, casting is a declaration kind.\n\nModes:\n `town`, `exploring`\n\nRejections:\n - `session.command.wrong_mode` \u2014 an encounter or battle is underway, or the\n game is over.\n - `session.command.unknown_member` \u2014 `character_id` names no party member.\n - `session.command.member_incapacitated` \u2014 the member cannot act.\n - `magic.cast.unknown_spell` \u2014 `spell_id` names no spell.\n - `magic.cast.silenced_area` \u2014 a *silence* effect covers the party's cell.\n - `magic.cast.unknown_target` \u2014 a target reference resolves to nothing.\n - `magic.cast.not_memorized` \u2014 no memorized copy (non-casters included).\n - `magic.cast.caster_incapacitated`, `magic.cast.caster_restrained`,\n `magic.cast.anti_magic_shell` \u2014 the caster cannot cast right now.\n - `magic.cast.not_reversible` \u2014 `reversed` on a spell with no reversed\n form.\n - `magic.cast.unknown_mode` \u2014 `mode` names no mode of the spell.\n - `magic.cast.target_count` \u2014 the wrong number of targets for the mode.\n - `magic.cast.out_of_range` \u2014 a target lies beyond the spell's range.\n\nEvents:\n [`SpellCastEvent`][osrlib.core.events.SpellCastEvent] plus the spell's own\n resolution \u2014 saving throws, damage, healing, effect attachments \u2014 each its\n own event. One round passes.",
"properties": {
"command_type": {
"const": "cast_spell",
"default": "cast_spell",
"title": "Command Type",
"type": "string"
},
"character_id": {
"title": "Character Id",
"type": "string"
},
"spell_id": {
"title": "Spell Id",
"type": "string"
},
"mode": {
"title": "Mode",
"type": "string"
},
"reversed": {
"default": false,
"title": "Reversed",
"type": "boolean"
},
"targets": {
"default": [],
"items": {
"type": "string"
},
"title": "Targets",
"type": "array"
}
},
"required": [
"character_id",
"spell_id",
"mode"
],
"title": "CastSpell",
"type": "object"
}