QuestCompletedEvent
A quest is finished.
Full documentation: QuestCompletedEvent. Wire type: quest_completed.
Default visibility: player
Message codes: session.quest.completed
JSON Schema
{
"$defs": {
"Visibility": {
"description": "Who is allowed to see an event.\n\nEvery event has one of these two values, and the split exists because B/X keeps some rolls behind the\nreferee's screen. Filter a log on it before you show anything to a player, or call\n`GameSession.view`, which builds the player's and the referee's\nviews for you. A narrator playing referee reads both.\n\nThe values are the lowercase strings and they serialize into every event, so a renamed value is a\n`schema_version` bump.\n\nExamples:\n ```python\n from osrlib.core.events import DamageDealtEvent, HitPointsReportedEvent, Visibility\n\n log = [\n DamageDealtEvent(target_id=\"monster-0001\", amount=5),\n HitPointsReportedEvent(target_id=\"monster-0001\", current_hp=2, max_hp=7),\n ]\n shown = [event.code for event in log if event.visibility is Visibility.PLAYER]\n assert shown == [\"combat.damage.dealt\"] # the goblin's remaining hit points stay hidden\n ```",
"enum": [
"player",
"referee"
],
"title": "Visibility",
"type": "string"
}
},
"description": "A quest is finished.\n\nEmitted by `CompleteQuest`. Whether the\nquest is done is the referee's ruling: the engine checks that the quest is\nactive, not that every objective was completed.\n\nRewards a quest pays out arrive after this event, as the commands the game issues\nfor them and their own events. When the quest is the one that concludes the\nadventure, an\n`AdventureCompletedEvent` follows\nin the same result.",
"properties": {
"code": {
"default": "session.quest.completed",
"title": "Code",
"type": "string",
"description": "The message code, always `session.quest.completed`."
},
"visibility": {
"$ref": "#/$defs/Visibility",
"default": "player",
"description": "Player visibility: finishing the job is the party's news."
},
"event_type": {
"const": "quest_completed",
"default": "quest_completed",
"title": "Event Type",
"type": "string",
"description": "The wire discriminator, `quest_completed`."
},
"quest_id": {
"title": "Quest Id",
"type": "string",
"description": "Which quest was completed."
},
"name": {
"title": "Name",
"type": "string",
"description": "The quest's display name."
},
"narrative": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Narrative",
"description": "The completion beat the author wrote, or `None`. The journal contains the same line."
}
},
"required": [
"quest_id",
"name"
],
"title": "QuestCompletedEvent",
"type": "object"
}