Skip to content

CurseRevealedEvent

A cursed item showed its true nature, and won't let go.

Full documentation: CurseRevealedEvent. Wire type: curse_revealed.

Default visibility: player

Message codes: items.curse.revealed

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": "A cursed item showed its true nature, and won't let go.\n\nEmitted alongside `ItemIdentifiedEvent`\nthe first time a cursed item is used or worn. From here the bearer is stuck with\nit until something removes the curse.",
  "properties": {
    "code": {
      "default": "items.curse.revealed",
      "title": "Code",
      "type": "string",
      "description": "The message code, always `items.curse.revealed`."
    },
    "visibility": {
      "$ref": "#/$defs/Visibility",
      "default": "player",
      "description": "Player visibility: the bearer finds out the hard way."
    },
    "event_type": {
      "const": "curse_revealed",
      "default": "curse_revealed",
      "title": "Event Type",
      "type": "string",
      "description": "The wire discriminator, `curse_revealed`."
    },
    "character_id": {
      "title": "Character Id",
      "type": "string",
      "description": "The member the curse has attached itself to."
    },
    "instance_id": {
      "title": "Instance Id",
      "type": "string",
      "description": "The session-scoped id of the cursed item."
    },
    "template_id": {
      "title": "Template Id",
      "type": "string",
      "description": "What the item is, as its magic item catalog id."
    }
  },
  "required": [
    "character_id",
    "instance_id",
    "template_id"
  ],
  "title": "CurseRevealedEvent",
  "type": "object"
}