LearnSpell
Add a spell to an arcane caster's spell book — leveling or mentoring made concrete.
Full documentation: LearnSpell. Wire type: learn_spell.
Legal session modes: exploring, town
JSON Schema
{
"description": "Add a spell to an arcane caster's spell book \u2014 leveling or mentoring made concrete.\n\nLegal in town and while exploring. The book holds, per spell level, at most\nthe caster's current slot count at that level, and it never shrinks \u2014 a\ndrained caster's book may sit over capacity, taking nothing more until\ncapacity catches up. No game time passes: the fiction around the learning\n(the mentor's week, a copied scroll's costs) belongs to the game.\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.book.not_arcane` \u2014 the class keeps no spell book.\n - `magic.book.unknown_spell` \u2014 `spell_id` names no spell.\n - `magic.book.wrong_list` \u2014 the spell is off the caster's spell list.\n - `magic.book.duplicate` \u2014 the book already holds the spell.\n - `magic.book.capacity_exceeded` \u2014 no open slot at the spell's level.\n\nEvents:\n [`SpellBookUpdatedEvent`][osrlib.core.events.SpellBookUpdatedEvent] with\n the added spell. No game time passes.",
"properties": {
"command_type": {
"const": "learn_spell",
"default": "learn_spell",
"title": "Command Type",
"type": "string"
},
"character_id": {
"title": "Character Id",
"type": "string"
},
"spell_id": {
"title": "Spell Id",
"type": "string"
}
},
"required": [
"character_id",
"spell_id"
],
"title": "LearnSpell",
"type": "object"
}