Skip to content

EffectAttachedEvent

An effect attached to a creature, item, or location (referee bookkeeping).

Full documentation: EffectAttachedEvent. Wire type: effect_attached.

Default visibility: referee

Message codes: effects.effect.attached

JSON Schema

{
  "$defs": {
    "Visibility": {
      "description": "Who may see an event.\n\nThe wire values are `\"player\"` and `\"referee\"` \u2014 lowercase, serialized into every\nevent; changing them is a `schema_version` bump.",
      "enum": [
        "player",
        "referee"
      ],
      "title": "Visibility",
      "type": "string"
    }
  },
  "description": "An effect attached to a creature, item, or location (referee bookkeeping).\n\nEmitted by [`EffectsLedger.attach`][osrlib.core.effects.EffectsLedger.attach].",
  "properties": {
    "code": {
      "default": "effects.effect.attached",
      "title": "Code",
      "type": "string"
    },
    "visibility": {
      "$ref": "#/$defs/Visibility",
      "default": "referee"
    },
    "event_type": {
      "const": "effect_attached",
      "default": "effect_attached",
      "title": "Event Type",
      "type": "string"
    },
    "effect_id": {
      "title": "Effect Id",
      "type": "string"
    },
    "kind": {
      "title": "Kind",
      "type": "string"
    },
    "target_ref": {
      "title": "Target Ref",
      "type": "string"
    },
    "expires_round": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Expires Round"
    }
  },
  "required": [
    "effect_id",
    "kind",
    "target_ref"
  ],
  "title": "EffectAttachedEvent",
  "type": "object"
}