DamageAbsorbedEvent
A hit that landed and did nothing, because the target cannot be harmed by that kind of attack.
Full documentation: DamageAbsorbedEvent. Wire type: damage_absorbed.
Default visibility: player
Message codes: combat.damage.absorbed
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 hit that landed and did nothing, because the target cannot be harmed by that kind of attack.\n\nThis arrives instead of `DamageDealtEvent` when the target's defenses\nshut the source out altogether: a creature that only silver or magic can touch, or one immune to the energy\nin play. No damage was rolled, so treat it as a hit that accomplished nothing rather than as a miss.",
"properties": {
"code": {
"default": "combat.damage.absorbed",
"title": "Code",
"type": "string",
"description": "Fixed at `combat.damage.absorbed`."
},
"visibility": {
"$ref": "#/$defs/Visibility",
"default": "player",
"description": "Player visibility: the blow landing and doing nothing is something the players watch happen."
},
"event_type": {
"const": "damage_absorbed",
"default": "damage_absorbed",
"title": "Event Type",
"type": "string",
"description": "The wire name for this event type."
},
"target_id": {
"title": "Target Id",
"type": "string",
"description": "The entity id of the creature the attack could not harm."
},
"attacker_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Attacker Id",
"description": "The entity id of the attacker, or `None` when nothing was attacking."
},
"keys": {
"default": [],
"items": {
"type": "string"
},
"title": "Keys",
"type": "array",
"description": "What the attack presented to the defenses, which is what they turned away: keys like `silver` or\n`magic`, plus the energy element when there was one."
}
},
"required": [
"target_id"
],
"title": "DamageAbsorbedEvent",
"type": "object"
}