Skip to content

GiveItems

Hand items and coins from one party member to another (zero time).

Full documentation: GiveItems. Wire type: give_items.

Legal session modes: exploring, town

JSON Schema

{
  "$defs": {
    "Coins": {
      "description": "A frozen coin bundle: generated treasure, cache contents, dropped piles.",
      "properties": {
        "pp": {
          "default": 0,
          "minimum": 0,
          "title": "Pp",
          "type": "integer"
        },
        "gp": {
          "default": 0,
          "minimum": 0,
          "title": "Gp",
          "type": "integer"
        },
        "ep": {
          "default": 0,
          "minimum": 0,
          "title": "Ep",
          "type": "integer"
        },
        "sp": {
          "default": 0,
          "minimum": 0,
          "title": "Sp",
          "type": "integer"
        },
        "cp": {
          "default": 0,
          "minimum": 0,
          "title": "Cp",
          "type": "integer"
        }
      },
      "title": "Coins",
      "type": "object"
    }
  },
  "description": "Hand items and coins from one party member to another (zero time).\n\nThe distribute-the-load move: `character_id` is the giver, `recipient_id` the\ncompanion who takes the goods. Each `item_ids` entry gives one unit (repeat an\nid for more); a given magic item releases any worn effects first and lands\nunequipped in the recipient's pack. Legal in town and while exploring \u2014 not\nmid-encounter or in battle. Both members must be able-bodied.\n\nModes:\n    `town`, `exploring`\n\nRejections:\n    - `session.command.wrong_mode` \u2014 an encounter or battle is underway, or the\n      game is over.\n    - `session.command.unknown_member` \u2014 `character_id` or `recipient_id` names\n      no party member.\n    - `session.command.member_incapacitated` \u2014 the giver or recipient cannot\n      act.\n    - `exploration.give.same_member` \u2014 giver and recipient are the same member.\n    - `items.curse.stuck` \u2014 a revealed cursed item cannot be handed off.\n    - `exploration.item.not_carried` \u2014 the giver lacks an item or the coins.\n\nEvents:\n    [`ItemsGivenEvent`][osrlib.crawl.events.ItemsGivenEvent] with what changed\n    hands. A worn magic item's effects release\n    ([`EffectReleasedEvent`][osrlib.core.events.EffectReleasedEvent]).",
  "properties": {
    "command_type": {
      "const": "give_items",
      "default": "give_items",
      "title": "Command Type",
      "type": "string"
    },
    "character_id": {
      "title": "Character Id",
      "type": "string"
    },
    "recipient_id": {
      "title": "Recipient Id",
      "type": "string"
    },
    "item_ids": {
      "default": [],
      "items": {
        "type": "string"
      },
      "title": "Item Ids",
      "type": "array"
    },
    "coins": {
      "$ref": "#/$defs/Coins",
      "default": {
        "pp": 0,
        "gp": 0,
        "ep": 0,
        "sp": 0,
        "cp": 0
      }
    }
  },
  "required": [
    "character_id",
    "recipient_id"
  ],
  "title": "GiveItems",
  "type": "object"
}