MemberRemovedEvent
A member left the party during play.
Full documentation: MemberRemovedEvent. Wire type: member_removed.
Default visibility: player
Message codes: session.member.removed
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": "A member left the party during play.\n\nEmitted by `RemoveMember`. The member is already gone\nfrom the party and from the views, so take them off the party on screen. When `given_to` is\nset, the `ItemsGivenEvent` just before this event\nlists what that member took. The event doesn't say why the member left. The command does:\nread the `source` of the `RemoveMember`, either the one you executed or its entry in\n`GameSession.command_log`.",
"properties": {
"code": {
"default": "session.member.removed",
"title": "Code",
"type": "string",
"description": "The message code, always `session.member.removed`."
},
"visibility": {
"$ref": "#/$defs/Visibility",
"default": "player",
"description": "Player visibility: the players see who leaves them."
},
"event_type": {
"const": "member_removed",
"default": "member_removed",
"title": "Event Type",
"type": "string",
"description": "The event type, `member_removed`, which identifies this class in serialized form."
},
"character_id": {
"title": "Character Id",
"type": "string",
"description": "The id the member had, like `\"character-0002\"`. The session never gives it to another\nmember, so earlier events that name it still mean this character."
},
"name": {
"title": "Name",
"type": "string",
"description": "The member's name, so you can show the event without the member at hand."
},
"given_to": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Given To",
"description": "The id of the member who took everything the leaving member carried, or `None` when it\nall left the game with them."
}
},
"required": [
"character_id",
"name"
],
"title": "MemberRemovedEvent",
"type": "object"
}