PrepareSpells
Prepare a caster's daily spells: once per sleep, after an uninterrupted night, six turns.
Full documentation: PrepareSpells. Wire type: prepare_spells.
Legal session modes: exploring, town
JSON Schema
{
"$defs": {
"MemorizedSpell": {
"description": "One memorized copy of a spell: the id and the form fixed at memorization.\n\n`spell_id` is a spell id from [`load_spells`][osrlib.data.load_spells] \u2014 see\n[the spell id index][spells-index]. Arcane casters fix the normal or reversed\nform when memorizing (the OSE SRD: \"The normal or reversed form of a spell must\nbe selected when the spell is memorized\"); divine casters always memorize the\nnormal form and choose at cast time, so their copies carry `reversed=False`.",
"properties": {
"spell_id": {
"minLength": 1,
"title": "Spell Id",
"type": "string"
},
"reversed": {
"default": false,
"title": "Reversed",
"type": "boolean"
}
},
"required": [
"spell_id"
],
"title": "MemorizedSpell",
"type": "object"
}
},
"description": "Prepare a caster's daily spells: once per sleep, after an uninterrupted night, six turns.\n\nLegal in town and while exploring. The caster must have slept (a night or day\n[`Rest`][osrlib.crawl.commands.Rest]) since the last preparation; the\nselections replace the memorized list wholesale.\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.memorize.needs_sleep` \u2014 no sleep since the last preparation.\n - `magic.memorize.not_a_caster` \u2014 the class casts no spells.\n - `magic.memorize.unknown_spell` \u2014 a selection names no known spell.\n - `magic.memorize.wrong_list` \u2014 a selection is off the caster's spell list.\n - `magic.memorize.divine_reverses_at_cast` \u2014 divine casters choose the\n reversed form at casting, not at prayer.\n - `magic.memorize.not_in_book` \u2014 an arcane selection is missing from the\n spell book.\n - `magic.memorize.not_reversible` \u2014 a reversed selection has no reversed\n form.\n - `magic.memorize.slots_exceeded` \u2014 more selections at some spell level\n than the caster has slots.\n\nEvents:\n [`SpellsMemorizedEvent`][osrlib.core.events.SpellsMemorizedEvent] with the\n prepared list. Six turns pass with their usual follow-on events.",
"properties": {
"command_type": {
"const": "prepare_spells",
"default": "prepare_spells",
"title": "Command Type",
"type": "string"
},
"character_id": {
"title": "Character Id",
"type": "string"
},
"selections": {
"default": [],
"items": {
"$ref": "#/$defs/MemorizedSpell"
},
"title": "Selections",
"type": "array"
}
},
"required": [
"character_id"
],
"title": "PrepareSpells",
"type": "object"
}