StanceChangedEvent
The monsters' attitude toward the party changed.
Full documentation: StanceChangedEvent. Wire type: stance_changed.
Default visibility: player
Message codes: encounter.stance.changed
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": "The monsters' attitude toward the party changed.\n\nEmitted when an encounter opens, with the first stance. Also emitted when\n`Parley` changes the monsters' mood, when an\nuncertain stance is rolled again on a later encounter round and changes, and when\nundead that `TurnUndead` failed to turn attack.\n\nThe 2d6 reaction roll behind a stance is a kernel event at referee visibility. An\nencounter whose stance the adventure's author fixed has no roll. What reaches the\nparty is how the creatures are acting.",
"properties": {
"code": {
"default": "encounter.stance.changed",
"title": "Code",
"type": "string",
"description": "The message code, always `encounter.stance.changed`."
},
"visibility": {
"$ref": "#/$defs/Visibility",
"default": "player",
"description": "Player visibility: behavior is visible even when the roll behind it isn't."
},
"event_type": {
"const": "stance_changed",
"default": "stance_changed",
"title": "Event Type",
"type": "string",
"description": "The event type, `stance_changed`, which identifies this class in serialized form."
},
"stance": {
"title": "Stance",
"type": "string",
"description": "How the monsters are acting now, as a\n`ReactionResult` value: `\"attacks\"`, `\"hostile\"`,\n`\"uncertain\"`, `\"indifferent\"`, or `\"friendly\"`. An attacking stance opens battle in the same\nresult."
}
},
"required": [
"stance"
],
"title": "StanceChangedEvent",
"type": "object"
}