Skip to content

GrantCoins

Referee: place coins directly into a member's purse.

Full documentation: GrantCoins. Wire type: grant_coins.

Legal session modes: battle, encounter, exploring, game_over, 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": "Referee: place coins directly into a member's purse.\n\nReferee commands are legal in every mode.\n\nModes:\n    `town`, `exploring`, `encounter`, `battle`, `game_over`\n\nRejections:\n    - `session.command.unknown_member` \u2014 `character_id` names no party member.\n\nEvents:\n    [`ItemAcquiredEvent`][osrlib.crawl.events.ItemAcquiredEvent] with the coin\n    value.",
  "properties": {
    "command_type": {
      "const": "grant_coins",
      "default": "grant_coins",
      "title": "Command Type",
      "type": "string"
    },
    "character_id": {
      "title": "Character Id",
      "type": "string"
    },
    "coins": {
      "$ref": "#/$defs/Coins"
    }
  },
  "required": [
    "character_id",
    "coins"
  ],
  "title": "GrantCoins",
  "type": "object"
}