{
  "format": "encounterra.homebrew",
  "schemaVersion": "0.1",
  "package": {
    "id": "cb80fe29-6dfa-439d-9d26-fb341afc351e",
    "name": "Marbleweaver Moth - Quarry Trapper",
    "version": "0.1.0"
  },
  "requires": { "ruleset": "dnd-2024", "srdCatalog": "5.2.1-encounterra.1" },
  "definitions": [
    {
      "kind": "monster", "id": "marbleweaver-moth", "name": "Marbleweaver Moth",
      "stats": {
        "hitPoints": 112, "armorClass": 15, "size": "large", "creatureType": "monstrosity",
        "speedFeet": 15, "flySpeedFeet": 40, "darkvisionFeet": 60, "difficultyClass": 15,
        "abilityScores": { "strength": 16, "dexterity": 16, "constitution": 18, "intelligence": 5, "wisdom": 14, "charisma": 8 },
        "savingThrows": { "strength": 3, "dexterity": 6, "constitution": 7, "intelligence": -3, "wisdom": 2, "charisma": -1 }
      },
      "resources": [{ "id": "cocoon", "name": "Calcifying Cocoon", "maximum": 2, "refresh": "longRest" }],
      "actions": ["#mineral-mandibles", "#binding-filament", "#leaden-dust", "#calcifying-cocoon"]
    },
    {
      "kind": "action", "id": "mineral-mandibles", "name": "Mineral Mandibles",
      "target": { "side": "enemy", "rangeFeet": 5 },
      "resolution": { "kind": "attack", "attackType": "melee", "attackBonus": 6,
        "damage": { "dice": { "count": 3, "sides": 6 }, "bonus": 3, "damageType": "piercing" } }
    },
    {
      "kind": "action", "id": "binding-filament", "name": "Binding Filament", "magical": true,
      "activation": "bonusAction",
      "target": { "side": "enemy", "rangeFeet": 60, "requiresSight": true, "excludesCondition": "restrained" },
      "resolution": { "kind": "savingThrow", "ability": "strength", "dc": 15,
        "onFailure": { "op": "applyCondition", "condition": "restrained", "duration": "repeatSaveEndOfTurn",
          "repeatSave": { "ability": "strength", "dc": 15 } } }
    },
    {
      "kind": "action", "id": "leaden-dust", "name": "Leaden Dust", "magical": true,
      "target": { "side": "enemy", "rangeFeet": 60, "requiresSight": true, "excludesCondition": "dragon-slowed" },
      "resolution": { "kind": "savingThrow", "ability": "constitution", "dc": 15, "halfOnSave": true,
        "onFailure": [
          { "op": "damage", "amount": { "dice": { "count": 4, "sides": 8 } }, "damageType": "necrotic" },
          { "op": "applyCondition", "condition": "dragon-slowed", "duration": "endOfTargetNextTurn" }
        ],
        "onSuccess": { "op": "damage", "amount": { "kind": "divide", "operands": [{ "dice": { "count": 4, "sides": 8 } }, 2] }, "damageType": "necrotic" }
      }
    },
    {
      "kind": "action", "id": "calcifying-cocoon", "name": "Calcifying Cocoon", "magical": true,
      "resource": { "ref": "cocoon", "cost": 1 },
      "target": { "side": "enemy", "rangeFeet": 60, "requiresSight": true, "excludesCondition": "petrified" },
      "resolution": { "kind": "savingThrow", "ability": "constitution", "dc": 15,
        "onFailure": { "op": "applyCondition", "condition": "restrained", "duration": "repeatSaveEndOfTurn",
          "repeatSave": { "ability": "constitution", "dc": 15, "onFailureCondition": "petrified" } }
      }
    }
  ]
}
