Skip to content

StanceChangedEvent

The monsters' attitude toward the party changed, as behavior the party can read.

Full documentation: StanceChangedEvent. Wire type: stance_changed.

Default visibility: player

Message codes: encounter.stance.changed

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 monsters' attitude toward the party changed, as behavior the party can read.\n\nEmitted when an encounter opens with its first reaction, when\n`Parley` talks the monsters into a different\nmood, when an uncertain stance resolves on the next beat, and when\n`TurnUndead` settles the matter by making the\nsurvivors hostile.\n\nThe 2d6 reaction roll behind it is a kernel event at referee visibility. What\nreaches the party 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 wire discriminator, `stance_changed`."
    },
    "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"
}