Skip to content

WanderingCheckEvent

The wandering-monster cadence came round and the referee rolled for it.

Full documentation: WanderingCheckEvent. Wire type: wandering_check.

Default visibility: referee

Message codes: exploration.wandering.checked

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 wandering-monster cadence came round and the referee rolled for it.\n\nEmitted while the party is in a dungeon, by any command that crosses the turn\nthe cadence lands on, most often `MoveParty`\nor `Rest`. When the check hits, the encounter\nopens in the same result and the command that was spending time stops there.\n\nIt's referee visibility because the party has no way of knowing a check was\nmade, only of meeting what it produced.",
  "properties": {
    "code": {
      "default": "exploration.wandering.checked",
      "title": "Code",
      "type": "string",
      "description": "The message code, always `exploration.wandering.checked`."
    },
    "visibility": {
      "$ref": "#/$defs/Visibility",
      "default": "referee",
      "description": "Referee visibility: the check is made behind the screen, and only its result walks in."
    },
    "event_type": {
      "const": "wandering_check",
      "default": "wandering_check",
      "title": "Event Type",
      "type": "string",
      "description": "The wire discriminator, `wandering_check`."
    },
    "chance": {
      "title": "Chance",
      "type": "integer",
      "description": "The X-in-6 chance the check needed, after the level's own rate and any adjustment like\nthe lower chance while resting."
    },
    "roll": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Roll",
      "description": "The d6 that was rolled, or `None` when the chance came out at zero and no die was\nrolled."
    },
    "encounter": {
      "title": "Encounter",
      "type": "boolean",
      "description": "Whether the check produced an encounter. When it did, the encounter's own events follow in\nthe same result."
    }
  },
  "required": [
    "chance",
    "encounter"
  ],
  "title": "WanderingCheckEvent",
  "type": "object"
}