{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/foundplay-io/json-schema/foundplay-io-roll-attack-request-schema.json",
  "title": "RollAttackRequest",
  "description": "Weapon-bound attack roll. Module looks up the item's `attack` activity and rolls 1d20 + actor's attack bonus (proficiency + ability + magic).\n\n**`item_id` must reference a weapon (or attack-spell) the actor owns** — get it from `GET /v1/actors/{id}` (look at `items[].id` for entries whose `system.activities` contains an attack activity). Items without an attack activity (consumables, features, non-attack spells) yield 502 with a module reason.\n\n**`advantage` and `disadvantage` are independent booleans.** Both true is allowed — Foundry cancels them to a normal roll (dnd5e standard).",
  "x-generated": "2026-10-30",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/foundplay-io-openapi.json#/components/schemas/RollAttackRequest",
  "properties": {
    "actor_id": {
      "description": "Foundry actor id within the calling tenant's world.",
      "minLength": 1,
      "type": "string"
    },
    "advantage": {
      "default": false,
      "description": "Roll with advantage (2d20kh1). Combined with `disadvantage: true` cancels to a normal roll.",
      "type": "boolean"
    },
    "disadvantage": {
      "default": false,
      "description": "Roll with disadvantage (2d20kl1). Combined with `advantage: true` cancels to a normal roll.",
      "type": "boolean"
    },
    "item_id": {
      "description": "Item id (weapon or attack-spell) owned by the actor.",
      "minLength": 1,
      "type": "string"
    },
    "show_in_chat": {
      "default": false,
      "description": "Post the roll to the world's Foundry chat. Default false (silent).",
      "type": "boolean"
    }
  },
  "required": [
    "actor_id",
    "item_id"
  ],
  "type": "object"
}