{
  "format": "chargen.brewery.entry",
  "version": 1,
  "game": null,
  "kind": "referencedefinition",
  "entry": {
    "name": "Penitence",
    "summary": "Physical mortification can restore a limited amount of mental resolve.",
    "rules_text": "Each session provides a number of uses equal to the rating. For one use, mark 1 Superficial damage on Health and immediately clear 1 Superficial damage from Willpower.",
    "setting_text": "",
    "character_scope": "unspecified"
  },
  "rows": [
    {
      "id": "1",
      "model": "referencedefinition",
      "fields": {
        "category": null,
        "notes": {
          "implementation": {
            "period": "session",
            "maximum": 5,
            "minimum": 1,
            "rating_text": "1\u20135",
            "source_game": "Sorcerer v5",
            "advantage_type": "Merit",
            "superficial_health_damage": 1,
            "superficial_willpower_healed": 1
          }
        }
      }
    },
    {
      "id": "2",
      "model": "ruledetail",
      "fields": {
        "row_key": "game",
        "order": 0,
        "label": "Game",
        "value": "Sorcerer v5"
      }
    },
    {
      "id": "3",
      "model": "ruledetail",
      "fields": {
        "row_key": "detail-1",
        "order": 1,
        "label": "Type",
        "value": "Merit"
      }
    },
    {
      "id": "4",
      "model": "ruledetail",
      "fields": {
        "row_key": "detail-2",
        "order": 2,
        "label": "Dots",
        "value": "1\u20135"
      }
    },
    {
      "id": "5",
      "model": "ruledetail",
      "fields": {
        "row_key": "brew-cost",
        "order": 3,
        "label": "Cost",
        "value": "1 Superficial Health damage"
      }
    },
    {
      "id": "6",
      "model": "ruledetail",
      "fields": {
        "row_key": "detail-4",
        "order": 4,
        "label": "Recovery",
        "value": "1 Superficial Willpower"
      }
    },
    {
      "id": "7",
      "model": "ruledetail",
      "fields": {
        "row_key": "detail-5",
        "order": 5,
        "label": "Use limit",
        "value": "Once per dot each session"
      }
    },
    {
      "id": "8",
      "model": "ruledetail",
      "fields": {
        "row_key": "family",
        "order": 20,
        "label": "Family",
        "value": "Psychological Advantages"
      }
    },
    {
      "id": "9",
      "model": "ruledetail",
      "fields": {
        "row_key": "brew-sources",
        "order": 90,
        "label": "Sources",
        "value": "Sorcerer v5 Core Rulebook, version 1.0, PDF pp. 58."
      }
    },
    {
      "id": "10",
      "model": "sourcelocator",
      "fields": {
        "row_key": "source-pages",
        "order": 0,
        "edition": {
          "reference": "57012eaa-b717-46dd-bc98-18e44eb796b8"
        },
        "chapter": "psychological",
        "section": "Penitence",
        "printed_page_start": "",
        "printed_page_end": "",
        "pdf_page_start": 58,
        "pdf_page_end": 58,
        "fragment_anchor": "",
        "heading_path": "Penitence",
        "bounding_boxes": {}
      }
    },
    {
      "id": "11",
      "model": "entrycitation",
      "fields": {
        "row_key": "pdf-source",
        "order": 0,
        "source": {
          "reference": "57012eaa-b717-46dd-bc98-18e44eb796b8"
        },
        "locator": {
          "local": "10"
        },
        "supports": "Source mechanics and scope; author corrections are separately cited.",
        "verified": true,
        "verification_notes": "Directly inspected supplied PDF; actual PDF pages used. Independent prose written for Chargen. Missing numerical procedures remain explicit."
      }
    },
    {
      "id": "12",
      "model": "entryrelationship",
      "fields": {
        "row_key": "child-scars-penitence",
        "order": 97,
        "target": {
          "reference": "c4eec14a-e151-457a-849c-ada50f1417b7"
        },
        "relation": {
          "reference": "1daeac93-d2a9-4bdb-b0cd-584d83b0b39b"
        },
        "requirements": null,
        "explanation": "Visible devotional injuries draw an adverse reaction outside the character's faith."
      }
    },
    {
      "id": "13",
      "model": "brewdefinition",
      "fields": {
        "row_key": "design",
        "order": 0,
        "definition": {
          "steps": [
            {
              "title": "How it works",
              "instructions": "Each session provides a number of uses equal to the rating. For one use, mark 1 Superficial damage on Health and immediately clear 1 Superficial damage from Willpower."
            }
          ],
          "fields": [
            {
              "key": "rating",
              "type": "number",
              "label": "Penitence dots",
              "initial": 1,
              "integer": true,
              "maximum": 5,
              "minimum": 1,
              "section": "Inputs",
              "help_text": "The purchased rating or fixed dot cost; not a free starting grant."
            },
            {
              "key": "details",
              "type": "text",
              "label": "Character-specific details",
              "section": "Character",
              "help_text": "Physical mortification can restore a limited amount of mental resolve."
            },
            {
              "key": "uses",
              "type": "number",
              "label": "Uses already made this session",
              "initial": 0,
              "integer": true,
              "maximum": null,
              "minimum": 0,
              "section": "Inputs",
              "help_text": ""
            },
            {
              "key": "superficial_willpower",
              "type": "number",
              "label": "Superficial Willpower damage",
              "initial": 0,
              "integer": true,
              "maximum": null,
              "minimum": 0,
              "section": "Inputs",
              "help_text": ""
            }
          ],
          "version": 1,
          "mechanics": [
            {
              "name": "Dot cost",
              "expression": {
                "symbol": "rating"
              },
              "explanation": "The dots assigned to this merit."
            },
            {
              "name": "Session allowance",
              "expression": {
                "symbol": "rating"
              },
              "explanation": "The rating is the maximum number of uses per session."
            },
            {
              "name": "Uses remaining",
              "expression": {
                "op": "max",
                "args": [
                  {
                    "literal": 0
                  },
                  {
                    "op": "subtract",
                    "args": [
                      {
                        "symbol": "rating"
                      },
                      {
                        "symbol": "uses"
                      }
                    ]
                  }
                ]
              },
              "explanation": "Subtract uses already made from the session allowance."
            },
            {
              "name": "Use available",
              "expression": {
                "op": "lt",
                "args": [
                  {
                    "symbol": "uses"
                  },
                  {
                    "symbol": "rating"
                  }
                ]
              },
              "explanation": "The number already used must be below the rating."
            },
            {
              "name": "Health damage cost",
              "expression": {
                "literal": 1
              },
              "explanation": "Each use inflicts one point of Superficial Health damage. Normal damage handling remains separate."
            },
            {
              "name": "Can heal Willpower",
              "expression": {
                "op": "all",
                "args": [
                  {
                    "op": "lt",
                    "args": [
                      {
                        "symbol": "uses"
                      },
                      {
                        "symbol": "rating"
                      }
                    ]
                  },
                  {
                    "op": "gt",
                    "args": [
                      {
                        "symbol": "superficial_willpower"
                      },
                      {
                        "literal": 0
                      }
                    ]
                  }
                ]
              },
              "explanation": "Requires remaining uses and at least one point of Superficial Willpower damage."
            },
            {
              "name": "Willpower damage after healing",
              "expression": {
                "op": "max",
                "args": [
                  {
                    "literal": 0
                  },
                  {
                    "op": "subtract",
                    "args": [
                      {
                        "symbol": "superficial_willpower"
                      },
                      {
                        "literal": 1
                      }
                    ]
                  }
                ]
              },
              "explanation": "Remove one point of Superficial damage on a valid use; do not remove Aggravated damage."
            }
          ]
        }
      }
    }
  ]
}