{
  "format": "chargen.brewery.entry",
  "version": 1,
  "game": null,
  "kind": "contentpack",
  "entry": {
    "name": "02 \u2014 Mana and Ego",
    "summary": "Magical reserves, enhancements, recovery, Ego dice, and crises.",
    "rules_text": "Open a linked entry for its full description, mechanics, source pages, and related options.",
    "setting_text": "",
    "character_scope": "unspecified"
  },
  "rows": [
    {
      "id": "1",
      "model": "contentpack",
      "fields": {
        "category": null,
        "optional": false,
        "requirements": null
      }
    },
    {
      "id": "2",
      "model": "ruledetail",
      "fields": {
        "row_key": "game",
        "order": 0,
        "label": "Game",
        "value": "Sorcerer v5"
      }
    },
    {
      "id": "3",
      "model": "ruledetail",
      "fields": {
        "row_key": "brew-sources",
        "order": 90,
        "label": "Sources",
        "value": "Sorcerer v5 Core Rulebook, version 1.0, PDF pp. 10\u201316."
      }
    },
    {
      "id": "4",
      "model": "sourcelocator",
      "fields": {
        "row_key": "source-pages",
        "order": 0,
        "edition": {
          "reference": "57012eaa-b717-46dd-bc98-18e44eb796b8"
        },
        "chapter": "collection-sections",
        "section": "02 \u2014 Mana and Ego",
        "printed_page_start": "",
        "printed_page_end": "",
        "pdf_page_start": 10,
        "pdf_page_end": 16,
        "fragment_anchor": "",
        "heading_path": "02 \u2014 Mana and Ego",
        "bounding_boxes": {}
      }
    },
    {
      "id": "5",
      "model": "entrycitation",
      "fields": {
        "row_key": "pdf-source",
        "order": 0,
        "source": {
          "reference": "57012eaa-b717-46dd-bc98-18e44eb796b8"
        },
        "locator": {
          "local": "4"
        },
        "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": "6",
      "model": "packentry",
      "fields": {
        "row_key": "item-mana",
        "order": 0,
        "entry": {
          "reference": "cf0130b7-8880-4cbb-a50e-a79ea1831841"
        },
        "role": "Mana"
      }
    },
    {
      "id": "7",
      "model": "packentry",
      "fields": {
        "row_key": "item-ego",
        "order": 1,
        "entry": {
          "reference": "dd628732-b2ea-4005-84bb-d2351c99f2cf"
        },
        "role": "Ego"
      }
    },
    {
      "id": "8",
      "model": "brewdefinition",
      "fields": {
        "row_key": "design",
        "order": 0,
        "definition": {
          "steps": [
            {
              "title": "Mana",
              "instructions": "Use the linked entry for the complete rule, source pages, and any situational requirements."
            },
            {
              "title": "Ego",
              "instructions": "Use the linked entry for the complete rule, source pages, and any situational requirements."
            }
          ],
          "fields": [
            {
              "key": "wits",
              "type": "number",
              "label": "Wits rating",
              "initial": 0,
              "integer": true,
              "maximum": null,
              "minimum": 0,
              "section": "Inputs",
              "help_text": ""
            },
            {
              "key": "practice_skill",
              "type": "text",
              "label": "Approved practice Skill",
              "section": "Character",
              "help_text": "Examples include Occult, Science, Technology and Craft. Other choices require Storyteller agreement."
            },
            {
              "key": "practice_skill_rating",
              "type": "number",
              "label": "Approved practice Skill rating",
              "initial": 0,
              "integer": true,
              "maximum": null,
              "minimum": 0,
              "section": "Inputs",
              "help_text": ""
            },
            {
              "key": "mana_current",
              "type": "number",
              "label": "Current Mana",
              "initial": 0,
              "integer": true,
              "maximum": null,
              "minimum": 0,
              "section": "Inputs",
              "help_text": ""
            },
            {
              "key": "ego",
              "type": "number",
              "label": "Current Ego",
              "initial": 1,
              "integer": true,
              "maximum": 5,
              "minimum": 1,
              "section": "Inputs",
              "help_text": "Ego starts at 1 and remains between 1 and 5."
            },
            {
              "key": "pool",
              "type": "number",
              "label": "Total dice pool",
              "initial": 0,
              "integer": true,
              "maximum": null,
              "minimum": 0,
              "section": "Inputs",
              "help_text": ""
            },
            {
              "key": "successful_roll",
              "type": "boolean",
              "label": "The roll succeeded",
              "initial": false,
              "section": "Conditions"
            },
            {
              "key": "ego_ten",
              "type": "boolean",
              "label": "At least one Ego die shows 10",
              "initial": false,
              "section": "Conditions"
            },
            {
              "key": "ego_one",
              "type": "boolean",
              "label": "At least one Ego die shows 1",
              "initial": false,
              "section": "Conditions"
            }
          ],
          "version": 1,
          "mechanics": [
            {
              "name": "Maximum Mana",
              "expression": {
                "op": "add",
                "args": [
                  {
                    "symbol": "wits"
                  },
                  {
                    "symbol": "practice_skill_rating"
                  }
                ]
              },
              "explanation": "Wits plus the approved practice Skill rating."
            },
            {
              "name": "Reserve within capacity",
              "expression": {
                "op": "lte",
                "args": [
                  {
                    "symbol": "mana_current"
                  },
                  {
                    "op": "add",
                    "args": [
                      {
                        "symbol": "wits"
                      },
                      {
                        "symbol": "practice_skill_rating"
                      }
                    ]
                  }
                ]
              },
              "explanation": "Current Mana must be between zero and its calculated maximum."
            },
            {
              "name": "Missing Mana",
              "expression": {
                "op": "max",
                "args": [
                  {
                    "literal": 0
                  },
                  {
                    "op": "subtract",
                    "args": [
                      {
                        "op": "add",
                        "args": [
                          {
                            "symbol": "wits"
                          },
                          {
                            "symbol": "practice_skill_rating"
                          }
                        ]
                      },
                      {
                        "symbol": "mana_current"
                      }
                    ]
                  }
                ]
              },
              "explanation": "The number of points needed to fill the reserve, assuming its current value is valid."
            },
            {
              "name": "Ego dice requested",
              "expression": {
                "symbol": "ego"
              },
              "explanation": "Replace this many ordinary dice. If the pool is smaller, the source does not specify how to handle the shortage."
            },
            {
              "name": "Pool supports replacement",
              "expression": {
                "op": "gte",
                "args": [
                  {
                    "symbol": "pool"
                  },
                  {
                    "symbol": "ego"
                  }
                ]
              },
              "explanation": "No means a small-pool ruling is needed before assembling the dice."
            },
            {
              "name": "Egotistical Success",
              "expression": {
                "op": "all",
                "args": [
                  {
                    "symbol": "successful_roll"
                  },
                  {
                    "symbol": "ego_ten"
                  }
                ]
              },
              "explanation": "A successful roll with at least one Ego die showing 10."
            },
            {
              "name": "Egotistical Failure",
              "expression": {
                "op": "all",
                "args": [
                  {
                    "op": "not",
                    "args": [
                      {
                        "symbol": "successful_roll"
                      }
                    ]
                  },
                  {
                    "symbol": "ego_one"
                  }
                ]
              },
              "explanation": "A failed roll with at least one Ego die showing 1."
            },
            {
              "name": "Ego after accepting the success reduction",
              "expression": {
                "op": "max",
                "args": [
                  {
                    "literal": 1
                  },
                  {
                    "op": "subtract",
                    "args": [
                      {
                        "symbol": "ego"
                      },
                      {
                        "literal": 1
                      }
                    ]
                  }
                ]
              },
              "explanation": "Optional: apply only following an Egotistical Success; never below 1."
            },
            {
              "name": "Ego after an Egotistical Failure",
              "expression": {
                "op": "min",
                "args": [
                  {
                    "literal": 5
                  },
                  {
                    "op": "add",
                    "args": [
                      {
                        "symbol": "ego"
                      },
                      {
                        "literal": 1
                      }
                    ]
                  }
                ]
              },
              "explanation": "Apply only after an Egotistical Failure; never above 5."
            },
            {
              "name": "Paradigm Crisis triggered",
              "expression": {
                "op": "all",
                "args": [
                  {
                    "op": "eq",
                    "args": [
                      {
                        "symbol": "ego"
                      },
                      {
                        "literal": 5
                      }
                    ]
                  },
                  {
                    "op": "all",
                    "args": [
                      {
                        "op": "not",
                        "args": [
                          {
                            "symbol": "successful_roll"
                          }
                        ]
                      },
                      {
                        "symbol": "ego_one"
                      }
                    ]
                  }
                ]
              },
              "explanation": "An Egotistical Failure while already at Ego 5 triggers a crisis."
            }
          ]
        }
      }
    }
  ]
}