{
  "format": "chargen.brewery.entry",
  "version": 1,
  "game": null,
  "kind": "referencedefinition",
  "entry": {
    "name": "Mana Surge",
    "summary": "Spend Mana to add dice to one roll.",
    "rules_text": "Each Mana point spent adds two dice to the chosen roll. The option can support Sorcery, Attribute or Skill tests, combat, and resistance. Declare the expenditure before rolling, and deduct the points from the current reserve.\n\nAdditional points increase this same bonus. The general limit on combining different Mana expenditure options still applies.",
    "setting_text": "",
    "character_scope": "unspecified"
  },
  "rows": [
    {
      "id": "1",
      "model": "referencedefinition",
      "fields": {
        "category": null,
        "notes": {
          "implementation": {
            "source_game": "Sorcerer v5",
            "cost_per_unit": 1,
            "bonus_dice_per_unit": 2
          }
        }
      }
    },
    {
      "id": "2",
      "model": "ruledetail",
      "fields": {
        "row_key": "game",
        "order": 0,
        "label": "Game",
        "value": "Sorcerer v5"
      }
    },
    {
      "id": "3",
      "model": "ruledetail",
      "fields": {
        "row_key": "brew-cost",
        "order": 1,
        "label": "Cost",
        "value": "1 or more Mana"
      }
    },
    {
      "id": "4",
      "model": "ruledetail",
      "fields": {
        "row_key": "detail-2",
        "order": 2,
        "label": "Effect",
        "value": "+2 dice per Mana spent"
      }
    },
    {
      "id": "5",
      "model": "ruledetail",
      "fields": {
        "row_key": "brew-duration",
        "order": 3,
        "label": "Duration",
        "value": "One roll"
      }
    },
    {
      "id": "6",
      "model": "ruledetail",
      "fields": {
        "row_key": "family",
        "order": 20,
        "label": "Family",
        "value": "Mana"
      }
    },
    {
      "id": "7",
      "model": "ruledetail",
      "fields": {
        "row_key": "brew-sources",
        "order": 90,
        "label": "Sources",
        "value": "Sorcerer v5 Core Rulebook, version 1.0, PDF pp. 11."
      }
    },
    {
      "id": "8",
      "model": "sourcelocator",
      "fields": {
        "row_key": "source-pages",
        "order": 0,
        "edition": {
          "reference": "57012eaa-b717-46dd-bc98-18e44eb796b8"
        },
        "chapter": "mana",
        "section": "Mana Surge",
        "printed_page_start": "",
        "printed_page_end": "",
        "pdf_page_start": 11,
        "pdf_page_end": 11,
        "fragment_anchor": "",
        "heading_path": "Mana Surge",
        "bounding_boxes": {}
      }
    },
    {
      "id": "9",
      "model": "entrycitation",
      "fields": {
        "row_key": "pdf-source",
        "order": 0,
        "source": {
          "reference": "57012eaa-b717-46dd-bc98-18e44eb796b8"
        },
        "locator": {
          "local": "8"
        },
        "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": "10",
      "model": "brewdefinition",
      "fields": {
        "row_key": "design",
        "order": 0,
        "definition": {
          "steps": [
            {
              "title": "How it works",
              "instructions": "Each Mana point spent adds two dice to the chosen roll. The option can support Sorcery, Attribute or Skill tests, combat, and resistance. Declare the expenditure before rolling, and deduct the points from the current reserve."
            },
            {
              "title": "Rule detail 2",
              "instructions": "Additional points increase this same bonus. The general limit on combining different Mana expenditure options still applies."
            }
          ],
          "fields": [
            {
              "key": "mana_current",
              "type": "number",
              "label": "Current Mana",
              "initial": 0,
              "integer": true,
              "maximum": null,
              "minimum": 0,
              "section": "Inputs",
              "help_text": ""
            },
            {
              "key": "mana_spent",
              "type": "number",
              "label": "Mana to spend",
              "initial": 1,
              "integer": true,
              "maximum": null,
              "minimum": 1,
              "section": "Inputs",
              "help_text": ""
            },
            {
              "key": "base_pool",
              "type": "number",
              "label": "Dice pool before the surge",
              "initial": 0,
              "integer": true,
              "maximum": null,
              "minimum": 0,
              "section": "Inputs",
              "help_text": ""
            }
          ],
          "version": 1,
          "mechanics": [
            {
              "name": "Enough Mana",
              "expression": {
                "op": "gte",
                "args": [
                  {
                    "symbol": "mana_current"
                  },
                  {
                    "symbol": "mana_spent"
                  }
                ]
              },
              "explanation": "The expenditure is available only when the current reserve covers its full cost."
            },
            {
              "name": "Mana after paying",
              "expression": {
                "op": "subtract",
                "args": [
                  {
                    "symbol": "mana_current"
                  },
                  {
                    "symbol": "mana_spent"
                  }
                ]
              },
              "explanation": "Apply this result only when Enough Mana is Yes. A negative result means the payment is not possible."
            },
            {
              "name": "Bonus dice",
              "expression": {
                "op": "multiply",
                "args": [
                  {
                    "symbol": "mana_spent"
                  },
                  {
                    "literal": 2
                  }
                ]
              },
              "explanation": "Each Mana point adds two dice to this one roll."
            },
            {
              "name": "Surged dice pool",
              "expression": {
                "op": "add",
                "args": [
                  {
                    "symbol": "base_pool"
                  },
                  {
                    "op": "multiply",
                    "args": [
                      {
                        "symbol": "mana_spent"
                      },
                      {
                        "literal": 2
                      }
                    ]
                  }
                ]
              },
              "explanation": "Use only if the entire Mana expenditure can be paid."
            }
          ]
        }
      }
    }
  ]
}