[
  {
    "type": "effect_on_condition",
    "id": "EOC_metamagic_toggle_quicken",
    "condition": { "u_has_var": "quicken_deactivated", "context": "perk_metamagic", "value": "yes" },
    "effect": [
      { "u_message": "You activate your quicken metamagic" },
      { "u_add_var": "quicken_deactivated", "context": "perk_metamagic", "value": "no" }
    ],
    "false_effect": [
      { "u_message": "You deactivate your quicken metamagic" },
      { "u_add_var": "quicken_deactivated", "context": "perk_metamagic", "value": "yes" }
    ]
  },
  {
    "type": "effect_on_condition",
    "id": "EOC_metamagic_quicken",
    "eoc_type": "EVENT",
    "required_event": "opens_spellbook",
    "condition": {
      "and": [
        { "u_has_trait": "perk_metamagic_quicken" },
        { "not": { "u_has_var": "quicken_deactivated", "context": "perk_metamagic", "value": "yes" } }
      ]
    },
    "effect": [
      { "math": [ "u_spellcasting_adjustment('casting_time', 'flag_blacklist': 'CONSUMES_RUNES' )", "=", "-0.95" ] },
      { "math": [ "u_spellcasting_adjustment('cost', 'flag_blacklist': 'CONSUMES_RUNES' )", "=", "1" ] }
    ]
  }
]
