GameOverEvent
No party member is left standing, and the session has ended.
Full documentation: GameOverEvent. Wire type: game_over.
Default visibility: player
Message codes: session.game_over
JSON Schema
{
"$defs": {
"Visibility": {
"description": "Who may see an event: the players, or only the referee.\n\nEvery event has one of these values, because in B/X the referee makes some rolls behind a screen. Filter\na log on it before you show anything to a player, or call\n`GameSession.view`, which builds the players' view and the referee's\nview for you. A narrator that plays the referee reads every event.\n\nA serialized event contains the lowercase value. The values stay fixed within a `schema_version`, the version\nstamp of the saved format.\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": "No party member is left standing, and the session has ended.\n\nA member stands while they are neither dead nor turned to stone. Emitted by the command\nduring which the last standing member died or was petrified, whatever felled them: a\nlost battle, a trap, a fall down a chute, starvation, a poison that took effect\nwhile the referee moved the clock, or a basilisk's gaze. It comes after that command's other\nevents, and the session mode becomes `game_over`.\n\nThe session refuses play commands from then on. Referee commands still work, and\n`PlaceParty` takes the session out of\n`game_over`. Placing the fallen party in town lets the temple raise the dead with\n`PurchaseHealing`. The temple has no cure for\nstone, so a statue needs *stone to flesh* from a magic-user, who can join the party in town\nwith `AddMember`.",
"properties": {
"code": {
"default": "session.game_over",
"title": "Code",
"type": "string",
"description": "The message code, always `session.game_over`."
},
"visibility": {
"$ref": "#/$defs/Visibility",
"default": "player",
"description": "Player visibility: it's the party's ending."
},
"event_type": {
"const": "game_over",
"default": "game_over",
"title": "Event Type",
"type": "string",
"description": "The event type, `game_over`, which identifies this class in serialized form."
},
"reason": {
"title": "Reason",
"type": "string",
"description": "Why the session ended, as a short phrase. Every ending has the same reason, that the party\nhas fallen. What killed them is in the events just before it."
}
},
"required": [
"reason"
],
"title": "GameOverEvent",
"type": "object"
}