PartyMovedEvent
The party moved a cell or turned in place, and here is where it now stands.
Full documentation: PartyMovedEvent. Wire type: party_moved.
Default visibility: player
Message codes: exploration.party.moved, exploration.party.turned
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 party moved a cell or turned in place, and here is where it now stands.\n\nEmitted by `MoveParty` with the cell it\nstepped into, and by `TurnParty` with the\nunchanged cell and the new facing. It's what a first-person front end redraws\nfrom.\n\nA move that a wall, a closed door, or the edge of the map stops is a rejection\n(`exploration.move.blocked`) rather than an event: walking into a wall changes\nnothing about the game, so nothing is reported.",
"properties": {
"code": {
"title": "Code",
"type": "string",
"description": "What happened, as two or more lowercase segments separated by dots and namespaced by subsystem, like\n`combat.attack.hit`. This is what you branch on and what\n`format_message` looks up. Anything else raises a validation error."
},
"visibility": {
"$ref": "#/$defs/Visibility",
"default": "player",
"description": "Player visibility: where the party stands is the party's own business."
},
"event_type": {
"const": "party_moved",
"default": "party_moved",
"title": "Event Type",
"type": "string",
"description": "The wire discriminator, `party_moved`."
},
"x": {
"title": "X",
"type": "integer",
"description": "The column the party is in after the command, counting from zero at the level's west edge."
},
"y": {
"title": "Y",
"type": "integer",
"description": "The row the party is in after the command, counting from zero at the level's north edge."
},
"facing": {
"title": "Facing",
"type": "string",
"description": "The direction the party now faces, as the lowercase value of a\n`Direction` (`\"north\"`, `\"east\"`, `\"south\"`, `\"west\"`). A\nmove faces the way it went, so this changes on a step as well as on a turn."
}
},
"required": [
"code",
"x",
"y",
"facing"
],
"title": "PartyMovedEvent",
"type": "object"
}