ItemsGivenEvent
Items or coins passed from one party member to another.
Full documentation: ItemsGivenEvent. Wire type: items_given.
Default visibility: player
Message codes: exploration.item.given
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": "Items or coins passed from one party member to another.\n\nEmitted by `GiveItems`, and by\n`ResolveBattleRound` for a `give_item`\ndeclaration, which hands over one item in the party's magic phase. Update both members'\ninventories on screen when it arrives. Nothing enters or leaves the party, so\nthe party's total is unchanged.",
"properties": {
"code": {
"default": "exploration.item.given",
"title": "Code",
"type": "string",
"description": "The message code, always `exploration.item.given`."
},
"visibility": {
"$ref": "#/$defs/Visibility",
"default": "player",
"description": "Player visibility: the party arranged the handover."
},
"event_type": {
"const": "items_given",
"default": "items_given",
"title": "Event Type",
"type": "string",
"description": "The event type, `items_given`, which identifies this class in serialized form."
},
"character_id": {
"title": "Character Id",
"type": "string",
"description": "The member who handed the goods over."
},
"recipient_id": {
"title": "Recipient Id",
"type": "string",
"description": "The member who took them."
},
"item_ids": {
"default": [],
"items": {
"type": "string"
},
"title": "Item Ids",
"type": "array",
"description": "What was handed over, as catalog ids for mundane gear and instance ids for valuables and\nmagic items."
},
"coins_gp_value": {
"default": 0,
"title": "Coins Gp Value",
"type": "integer",
"description": "The coins handed over, as their value in gold pieces."
}
},
"required": [
"character_id",
"recipient_id"
],
"title": "ItemsGivenEvent",
"type": "object"
}