Skip to content

MonsterRevivedEvent

A monster the party thought dead has got back up.

Full documentation: MonsterRevivedEvent. Wire type: monster_revived.

Default visibility: player

Message codes: effects.regeneration.revived

JSON Schema

{
  "$defs": {
    "Visibility": {
      "description": "Who may see an event: the players, or only the referee.\n\nEvery event has one of these values, because in B/X the referee makes some rolls behind a screen. Filter\na log on it before you show anything to a player, or call\n`GameSession.view`, which builds the players' view and the referee's\nview for you. A narrator that plays the referee reads every event.\n\nA serialized event contains the lowercase value. The values stay fixed within a `schema_version`, the version\nstamp of the saved format.\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 monster the party thought dead has got back up.\n\n`EffectsLedger.advance` reports this for a regeneration effect\nwhen the monster's countdown runs out,\nwhich for a troll is 2d6 rounds after it was killed. The monster comes back with 1 hit point, and loses the\n`dead` condition at the same time. A monster stops getting back up once the damage it can't regenerate, fire\nand acid for a troll, adds up to its maximum hit points.",
  "properties": {
    "code": {
      "default": "effects.regeneration.revived",
      "title": "Code",
      "type": "string",
      "description": "Fixed at `effects.regeneration.revived`."
    },
    "visibility": {
      "$ref": "#/$defs/Visibility",
      "default": "player",
      "description": "Player visibility: the players see the monster get back up."
    },
    "event_type": {
      "const": "monster_revived",
      "default": "monster_revived",
      "title": "Event Type",
      "type": "string",
      "description": "The fixed string that identifies this event class in a serialized event."
    },
    "target_id": {
      "title": "Target Id",
      "type": "string",
      "description": "The entity id of the monster that came back."
    }
  },
  "required": [
    "target_id"
  ],
  "title": "MonsterRevivedEvent",
  "type": "object"
}