TakeTreasure
Empty a cache or pile into the party's packs (one turn, RAW).
Full documentation: TakeTreasure. Wire type: take_treasure.
Legal session modes: exploring
JSON Schema
{
"description": "Empty a cache or pile into the party's packs (one turn, RAW).\n\nThe party must be exploring a dungeon (see\n`EnterDungeon`). `feature_id` names an\nauthored cache, an engine-generated cache, or the literal `pile` for goods\ndropped on the cell.\n\nBy default the haul spreads across the living members: items go to a\ncharacter whose class can use them (the fighter takes the plate mail, the\nmagic-user the arcane scroll), gems and jewellery divide by worth, and coins\ndivide evenly denomination by denomination. Nothing is ever loaded past the\n1,600-coin maximum load, so a pickup cannot immobilise the party. The group\nmoves at its slowest member's rate, so overloading one member slows everyone.\nName `recipient_id` to override: that member alone fills their pack, up to their\nown maximum load. Whatever exceeds the carriers' capacity stays in the drop pile on\nthe cell. Nothing is destroyed, and the party can lighten up and come back for\nit. This first pass is automatic bookkeeping, not a ruling: rearrange it freely\nwith `GiveItems`, and note that XP divides\nevenly however the goods end up split, per RAW.\n\nThe named recipient, or the leading living member when none is named, is the\none who reaches in, so taking a trapped cache with its trap unresolved risks\nspringing it on them.\n\nModes:\n `exploring`\n\nRejections:\n - `session.command.wrong_mode` - the session is not exploring a dungeon.\n - `session.command.no_living_members` - no one is left to carry.\n - `session.command.unknown_member` - `recipient_id` names no party member.\n - `session.command.member_incapacitated` - the recipient cannot act.\n - `exploration.feature.unknown` - nothing by that id on this cell.\n - `exploration.feature.emptied` - the cache has already been emptied.\n\nEvents:\n One `ItemAcquiredEvent` per member\n who took something, listing their goods and coin value with `origin`\n `\"treasure\"`, in marching order,\n and an `ItemsLeftBehindEvent`\n when the party could not carry it all. An unresolved treasure trap rolls first\n (`DetectionRolledEvent`, a\n `TrapEvent`, and the trap's resolution\n when it springs). Under the immediate XP timing an\n `XpAwardedEvent` follows per member.\n One turn passes.",
"properties": {
"command_type": {
"const": "take_treasure",
"default": "take_treasure",
"title": "Command Type",
"type": "string",
"description": "The wire discriminator. Each subclass fixes it to its own snake_case literal, like\n`\"move_party\"` or `\"open_door\"`, so you never set it yourself: constructing the subclass\ndoes. It's what `parse_command` and the\n`AnyCommand` union read to rebuild the right class\nfrom a serialized mapping, and it stays the same across releases."
},
"source": {
"anyOf": [
{
"minLength": 1,
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Source",
"description": "An annotation naming the authored object (a trigger or quest id) or the game\nsystem on whose behalf the command was issued. Execution never reads it: a stamped\ncommand does exactly what the same command unstamped does. It is logged and replayed\nwith the command, so the log alone answers \"why did this happen\". Absent is `None`,\nand the empty string is not a value."
},
"feature_id": {
"title": "Feature Id",
"type": "string",
"description": "What to empty. An authored cache is named by its\n`FeatureSpec.id`. A cache the engine rolled is named\nby the id on\n`HoardGeneratedEvent.cache_ref`. The\nliteral `\"pile\"` names the loose goods lying on the party's cell, which\n`PlayerView.piles` lists by cell reference. A cache\nalready emptied comes back with `exploration.feature.emptied`."
},
"recipient_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Recipient Id",
"description": "One member to take the whole haul, by\n`MemberView.id`, or `None` to spread it across the\nparty. The named member fills their own pack up to their own maximum load and the rest\nstays on the cell, so naming a recipient is the way to keep a specific item with a\nspecific character. Whoever is named is also the one who reaches in, and so the one an\nunresolved treasure trap springs on."
}
},
"required": [
"feature_id"
],
"title": "TakeTreasure",
"type": "object"
}