MagicDispelledEvent
A dispel magic went off, and these enchantments went with it.
Full documentation: MagicDispelledEvent. Wire type: magic_dispelled.
Default visibility: player
Message codes: magic.dispel.resolved
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 *dispel magic* went off, and these enchantments went with it.\n\n`cast_spell` emits this when a dispelling spell resolves. Every dispellable\neffect on the targets goes, except that one put there by a higher-level caster gets a roll to survive, better\nthe wider the gap in levels, so a single dispel can take some enchantments and leave others. What a monster\ninflicted is not dispellable at all. The effects that went are also reported one by one as\n`EffectReleasedEvent`.",
"properties": {
"code": {
"default": "magic.dispel.resolved",
"title": "Code",
"type": "string",
"description": "Fixed at `magic.dispel.resolved`."
},
"visibility": {
"$ref": "#/$defs/Visibility",
"default": "player",
"description": "Player visibility: the spell and what it undid are the players' to see."
},
"event_type": {
"const": "magic_dispelled",
"default": "magic_dispelled",
"title": "Event Type",
"type": "string",
"description": "The wire name for this event type."
},
"caster_id": {
"title": "Caster Id",
"type": "string",
"description": "The entity id of the caster who dispelled."
},
"released_effect_ids": {
"default": [],
"items": {
"type": "string"
},
"title": "Released Effect Ids",
"type": "array",
"description": "The ids of the effects the dispel ended."
},
"surviving_effect_ids": {
"default": [],
"items": {
"type": "string"
},
"title": "Surviving Effect Ids",
"type": "array",
"description": "The ids of the dispellable effects that survived."
}
},
"required": [
"caster_id"
],
"title": "MagicDispelledEvent",
"type": "object"
}