Skip to content

ConditionGainedEvent

A creature gained a condition.

Full documentation: ConditionGainedEvent. Wire type: condition_gained.

Default visibility: player

Message codes: effects.condition.gained

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": "A creature gained a condition.\n\nEmitted by [`grant_condition`][osrlib.core.effects.grant_condition] \u2014 directly, or\nthrough [`EffectsLedger.attach`][osrlib.core.effects.EffectsLedger.attach]\nattaching an effect that carries one.",
  "properties": {
    "code": {
      "default": "effects.condition.gained",
      "title": "Code",
      "type": "string"
    },
    "visibility": {
      "$ref": "#/$defs/Visibility",
      "default": "player"
    },
    "event_type": {
      "const": "condition_gained",
      "default": "condition_gained",
      "title": "Event Type",
      "type": "string"
    },
    "target_id": {
      "title": "Target Id",
      "type": "string"
    },
    "condition": {
      "title": "Condition",
      "type": "string"
    },
    "effect_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Effect Id"
    }
  },
  "required": [
    "target_id",
    "condition"
  ],
  "title": "ConditionGainedEvent",
  "type": "object"
}