AdventureCompletedEvent
The adventure is over and the party won.
Full documentation: AdventureCompletedEvent. Wire type: adventure_completed.
Default visibility: player
Message codes: session.adventure.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": "The adventure is over and the party won.\n\nEmitted by `CompleteQuest` when the quest\nthat concludes the adventure completes, right after that quest's own\n`QuestCompletedEvent`, with the same\nbeat. The session mode becomes `victory`, which is final: play commands\nare refused and nothing leaves it, so a front end can treat this as its closing\nscreen.\n\nA session that has already ended doesn't get an ending twice: a party that\nfinishes the job after it has already fallen completes the quest and stays in\n`game_over`.",
"properties": {
"code": {
"default": "session.adventure.completed",
"title": "Code",
"type": "string",
"description": "The message code, always `session.adventure.completed`."
},
"visibility": {
"$ref": "#/$defs/Visibility",
"default": "player",
"description": "Player visibility: it's the party's ending."
},
"event_type": {
"const": "adventure_completed",
"default": "adventure_completed",
"title": "Event Type",
"type": "string",
"description": "The wire discriminator, `adventure_completed`."
},
"quest_id": {
"title": "Quest Id",
"type": "string",
"description": "The quest that concluded the adventure."
},
"name": {
"default": "",
"title": "Name",
"type": "string",
"description": "That quest's display name. It defaults empty only so an event written by an older version\nstill parses. The engine always fills it."
},
"narrative": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Narrative",
"description": "The quest's completion beat, the same line its\n`QuestCompletedEvent` carried, or `None`."
}
},
"required": [
"quest_id"
],
"title": "AdventureCompletedEvent",
"type": "object"
}