PurchaseHealing
Buy a temple healing service in town (takes no game time).
Full documentation: PurchaseHealing. Wire type: purchase_healing.
Legal session modes: town
JSON Schema
{
"description": "Buy a temple healing service in town (takes no game time).\n\nThe party must be in town. Name the patient in `character_id` and the service in `service`.\nEach service works as the matching spell, cast on the member by a temple cleric. The cleric is\nof the lowest level that can cast the service unless you choose a level in `caster_level`.\n\nThe town's `TownSpec.healing_prices` sets\nwhat each service costs, and a service the town doesn't list costs the standard price from\n`HEALING_SERVICES`. The OSE SRD describes the base\ntown in prose and lists no temple prices, so osrlib sets the standard prices, by `service`\nvalue: `cure_light_wounds` 25 gp, `cure_serious_wounds` 100 gp, `cure_disease` 150 gp,\n`neutralize_poison` 150 gp, `remove_curse` 200 gp, and `raise_dead` 1,500 gp. The price is the\nsame at every cleric level. To show what the party's town charges, read\n`PlayerView.town_healing_prices`.\n\nThe whole party pays the fee, not only the patient. The temple takes it from the patient's\npurse first, then from the other members' purses in marching order, dead members included,\nuntil the fee is paid. A service the town sets at 0 gp takes nothing from any purse.\n\nEach purse pays only in whole gold pieces, and any value below a gold piece stays in the\npurse. For example, two members who each have 12 gp and\n5 sp are worth 25 gp together. Each purse can pay only 12 gp, so together they can pay 24\ngp, and the session refuses a 25 gp service.\n\nBecause the party pays, a dead member can be raised even when that member's purse is\nempty, and the party doesn't have to move coins between purses first.\n\nModes:\n `town`\n\nRejections:\n - `session.command.wrong_mode` - the party is not in town.\n - `session.command.unknown_member` - `character_id` matches no party member.\n - `town.healing.caster_level_out_of_range` - `caster_level` is below the lowest level\n that can cast the service, or above the highest level a cleric can reach. The\n rejection's `minimum` and `maximum` params give the lowest and highest levels the\n temple accepts for the service.\n - `items.purchase.insufficient_funds` - the whole gold pieces in the party's\n purses add up to less than the town's price for the service.\n - `town.healing.no_effect` - the service would do nothing for the member. That's\n `raise_dead` for a living member or for one dead longer than the spell reaches at\n the cleric's level, `cure_disease` for a member who isn't diseased, and\n `neutralize_poison` for a member who isn't poisoned and didn't die of poison in the\n last 10 rounds. The session checks the party's funds first, so a party that can't\n pay gets `items.purchase.insufficient_funds` instead.\n\nEvents:\n A `HealingPurchasedEvent` listing\n which purses paid and how much each one paid, then the events of the service's\n spell, like healing, the end of a poison or a disease, or the result of a *raise dead*.",
"properties": {
"command_type": {
"const": "purchase_healing",
"default": "purchase_healing",
"title": "Command Type",
"type": "string",
"description": "The name that identifies the command class in serialized data. Each command class fixes\nit to a distinct snake_case string, like `\"move_party\"` or `\"open_door\"`, and constructing\nthe class sets it, so you never pass it yourself.\n`parse_command` and the\n`AnyCommand` union use it to rebuild the right class\nfrom a serialized mapping. A class's value never changes between releases."
},
"source": {
"anyOf": [
{
"minLength": 1,
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Source",
"description": "Who or what issued the command on whose behalf: an authored trigger or quest id, or the\nname of one of your game's systems. The engine never reads it, so a command with a\n`source` does exactly what the same command without one does. The session logs and\nreplays it with the command, so the log alone shows why something happened. Leave it\n`None` when there's nothing to record. An empty string fails validation when the command\nis constructed."
},
"character_id": {
"title": "Character Id",
"type": "string",
"description": "Who is treated, by `MemberView.id`. This member's\npurse pays first, and the rest of the party pays whatever is left. The member can be dead.\n`raise_dead` is the service for a dead member, and the session refuses it for a living\none."
},
"service": {
"enum": [
"cure_light_wounds",
"cure_serious_wounds",
"cure_disease",
"neutralize_poison",
"remove_curse",
"raise_dead"
],
"title": "Service",
"type": "string",
"description": "Which service to buy. Each works as the matching spell, cast by the temple cleric.\n`remove_curse` also frees the member from cursed items whose curse has been revealed, so they\ncan take them off."
},
"caster_level": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Caster Level",
"description": "The level of the temple cleric who casts the service, or `None` for the lowest level that\ncan cast it, like level 2 for `cure_light_wounds` and level 7 for `raise_dead`.\n\nThe level decides how long dead a member `raise_dead` can bring back: 4 days for each level\nabove 7th. A level 7 cleric raises only a member who died less than a day ago, and a level 9\ncleric raises a member dead up to 8 days. The session refuses a level below the lowest that can\ncast the service, or above 14, the highest level a cleric can reach. The price is the same at\nevery level."
}
},
"required": [
"character_id",
"service"
],
"title": "PurchaseHealing",
"type": "object"
}