Skip to content

ReactionRolledEvent

How a monster takes to meeting the party.

Full documentation: ReactionRolledEvent. Wire type: reaction_rolled.

Default visibility: referee

Message codes: encounter.reaction.rolled

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": "How a monster takes to meeting the party.\n\n`roll_reaction` emits one of these at the start of an encounter that is\nnot already a fight. The result tells you how to play the monster.",
  "properties": {
    "code": {
      "default": "encounter.reaction.rolled",
      "title": "Code",
      "type": "string",
      "description": "Fixed at `encounter.reaction.rolled`."
    },
    "visibility": {
      "$ref": "#/$defs/Visibility",
      "default": "referee",
      "description": "Referee visibility: the players read a monster's mood from how it behaves, not from the dice."
    },
    "event_type": {
      "const": "reaction_rolled",
      "default": "reaction_rolled",
      "title": "Event Type",
      "type": "string",
      "description": "The wire name for this event type."
    },
    "roll": {
      "title": "Roll",
      "type": "integer",
      "description": "The 2d6 total, before the modifier."
    },
    "modifier": {
      "default": 0,
      "title": "Modifier",
      "type": "integer",
      "description": "The speaking character's charisma reaction adjustment, when one applied."
    },
    "total": {
      "title": "Total",
      "type": "integer",
      "description": "The roll plus the modifier, which is what the reaction table was read with. A total outside 2 to 12 reads\nas the nearest end of the table."
    },
    "result": {
      "title": "Result",
      "type": "string",
      "description": "The band the total fell in, as a `ReactionResult` value: `attacks`,\n`hostile`, `uncertain`, `indifferent`, or `friendly`."
    }
  },
  "required": [
    "roll",
    "total",
    "result"
  ],
  "title": "ReactionRolledEvent",
  "type": "object"
}