CompleteQuest
Referee: finish an active quest — and, on the concluding quest, the adventure.
Full documentation: CompleteQuest. Wire type: complete_quest.
Legal session modes: battle, encounter, exploring, game_over, town, victory
JSON Schema
{
"description": "Referee: finish an active quest \u2014 and, on the concluding quest, the adventure.\n\nThe quest must be active, and that is the whole test: the completion rule is\n*not* checked here. Ruling a quest done is the referee's call, and an authored\nquest layer is simply a disciplined issuer that checks the rule before issuing.\nIds are the closed domain\n[`ActivateQuest`][osrlib.crawl.commands.ActivateQuest] documents.\n\nRewards are not this command's business: whoever completes the quest issues the\nauthored rewards afterwards as ordinary commands of their own, so a completion\ndriven by hand grants nothing and every reward that does land is a line in the\nlog. The completion appends the quest's `completion` beat to the journal when\nits author wrote one, and the events carry the same line; no\n[`JournalEntryAddedEvent`][osrlib.crawl.events.JournalEntryAddedEvent] follows.\n\n**The victory transition.** Completing a quest whose spec carries\n`concludes_adventure` from a non-terminal mode clears any open encounter and\nbattle \u2014 a concluded session holds no live play state \u2014 and switches the session\nto `victory`. This is the one entrance to that mode. From a terminal mode\n(`game_over` or `victory`) the quest still completes and still journals, but\nnothing transitions and no adventure-completed event lands: an ended session\nnever ends again, so the record shows a fallen party finishing the job without\nresurrecting the adventure around it. Referee commands are legal in every mode,\nterminal modes included.\n\nModes:\n `town`, `exploring`, `encounter`, `battle`, `game_over`, `victory`\n\nRejections:\n - `session.command.unknown_quest` \u2014 `quest_id` names no quest of the\n adventure.\n - `session.command.quest_state` \u2014 the quest is inactive or already\n completed; the rejection names the quest and the state that refused it.\n\nEvents:\n [`QuestCompletedEvent`][osrlib.crawl.events.QuestCompletedEvent] with the\n quest id, the quest's name, and the completion beat, followed by\n [`AdventureCompletedEvent`][osrlib.crawl.events.AdventureCompletedEvent]\n carrying the same beat when the quest concludes the adventure and the\n session had not already ended.",
"properties": {
"command_type": {
"const": "complete_quest",
"default": "complete_quest",
"title": "Command Type",
"type": "string"
},
"source": {
"anyOf": [
{
"minLength": 1,
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Source"
},
"quest_id": {
"minLength": 1,
"title": "Quest Id",
"type": "string"
}
},
"required": [
"quest_id"
],
"title": "CompleteQuest",
"type": "object"
}