[
  {
    "type": "effect_on_condition",
    "id": "EOC_ELECTROKIN_SEE_ELECTRICITY_INITIATE",
    "condition": { "not": { "u_has_effect": "effect_electrokin_see_electricity" } },
    "effect": [
      { "u_message": "You open your senses to the flow of current.", "type": "good" },
      { "run_eocs": "EOC_POWER_MAINTENANCE_PLUS_ONE" },
      { "u_add_effect": "effect_electrokin_see_electricity", "duration": "PERMANENT" },
      {
        "run_eocs": "EOC_ELECTROKIN_SEE_ELECTRICITY_DRAIN",
        "time_in_future": [
          {
            "math": [
              "( ( (u_spell_level('electrokinetic_see_electric') + u_spell_level('electrokinetic_see_electric_knack') ) * 150) + 900) * (scaling_factor(u_val('intelligence') ) ) * u_nether_attunement_power_scaling"
            ]
          },
          {
            "math": [
              "( ( (u_spell_level('electrokinetic_see_electric') + u_spell_level('electrokinetic_see_electric_knack') ) * 300) + 1800) * (scaling_factor(u_val('intelligence') ) ) * u_nether_attunement_power_scaling"
            ]
          }
        ]
      }
    ],
    "false_effect": [ { "run_eocs": "EOC_ELECTROKIN_REMOVE_SEE_ELECTRICITY" } ]
  },
  {
    "type": "effect_on_condition",
    "id": "EOC_ELECTROKIN_REMOVE_SEE_ELECTRICITY",
    "condition": { "u_has_effect": "effect_electrokin_see_electricity" },
    "effect": [ { "run_eocs": "EOC_POWER_MAINTENANCE_MINUS_ONE" }, { "u_lose_effect": "effect_electrokin_see_electricity" } ]
  },
  {
    "type": "effect_on_condition",
    "id": "EOC_ELECTROKIN_SEE_ELECTRICITY_DRAIN",
    "condition": { "u_has_effect": "effect_electrokin_see_electricity" },
    "effect": [
      {
        "if": { "math": [ "u_spell_level('electrokinetic_see_electric') >= 1" ] },
        "then": { "math": [ "u_latest_channeled_power_difficulty = u_spell_difficulty('electrokinetic_see_electric')" ] },
        "else": { "math": [ "u_latest_channeled_power_difficulty = u_spell_difficulty('electrokinetic_see_electric_knack')" ] }
      },
      { "run_eocs": [ "EOC_PSIONICS_GAIN_NETHER_ATTUNEMENT_2", "EOC_PSI_MAINTENANCE_CALORIE_COST_CALCULATOR" ] },
      {
        "if": { "math": [ "u_spell_level('electrokinetic_see_electric') >= 1" ] },
        "then": { "math": [ "u_spell_exp('electrokinetic_see_electric')", "+=", "psionic_power_experience_formula()" ] },
        "else": { "math": [ "u_spell_exp('electrokinetic_see_electric_knack')", "+=", "psionic_power_experience_formula()" ] }
      },
      { "run_eocs": "EOC_POWER_MAINTENANCE_CONCENTRATION_CHECK" },
      {
        "run_eocs": "EOC_ELECTROKIN_SEE_ELECTRICITY_DRAIN",
        "time_in_future": [
          {
            "math": [
              "( ( (u_spell_level('electrokinetic_see_electric') + u_spell_level('electrokinetic_see_electric_knack') ) * 150) + 900) * (scaling_factor(u_val('intelligence') ) ) * u_nether_attunement_power_scaling"
            ]
          },
          {
            "math": [
              "( ( (u_spell_level('electrokinetic_see_electric') + u_spell_level('electrokinetic_see_electric_knack') ) * 300) + 1800) * (scaling_factor(u_val('intelligence') ) ) * u_nether_attunement_power_scaling"
            ]
          }
        ]
      }
    ],
    "false_effect": [  ]
  },
  {
    "type": "effect_on_condition",
    "id": "EOC_ELECTROKIN_ZAP_ENEMIES_INITIATE",
    "condition": { "not": { "u_has_effect": "effect_electrokin_zap_enemies" } },
    "effect": [
      { "u_message": "Your skin tingles.", "type": "good" },
      { "run_eocs": "EOC_POWER_MAINTENANCE_PLUS_ONE" },
      { "u_add_effect": "effect_electrokin_zap_enemies", "duration": "PERMANENT" },
      {
        "run_eocs": "EOC_ELECTROKIN_ZAP_ENEMIES_DRAIN",
        "time_in_future": [
          {
            "math": [
              "( (u_spell_level('electrokinetic_zap_enemies') * 80) + 300) * (scaling_factor(u_val('intelligence') ) ) * u_nether_attunement_power_scaling"
            ]
          },
          {
            "math": [
              "( (u_spell_level('electrokinetic_zap_enemies') * 225) + 800) * (scaling_factor(u_val('intelligence') ) ) * u_nether_attunement_power_scaling"
            ]
          }
        ]
      }
    ],
    "false_effect": [ { "run_eocs": "EOC_ELECTROKIN_REMOVE_ZAP_ENEMIES" } ]
  },
  {
    "type": "effect_on_condition",
    "id": "EOC_ELECTROKIN_REMOVE_ZAP_ENEMIES",
    "condition": { "u_has_effect": "effect_electrokin_zap_enemies" },
    "effect": [ { "run_eocs": "EOC_POWER_MAINTENANCE_MINUS_ONE" }, { "u_lose_effect": "effect_electrokin_zap_enemies" } ]
  },
  {
    "type": "effect_on_condition",
    "id": "EOC_ELECTROKIN_ZAP_ENEMIES_DRAIN",
    "condition": { "u_has_effect": "effect_electrokin_zap_enemies" },
    "effect": [
      { "math": [ "u_latest_channeled_power_difficulty = 2" ] },
      { "run_eocs": [ "EOC_PSIONICS_GAIN_NETHER_ATTUNEMENT_2", "EOC_PSI_MAINTENANCE_CALORIE_COST_CALCULATOR" ] },
      { "math": [ "u_spell_exp('electrokinetic_zap_enemies')", "+=", "psionic_power_experience_formula()" ] },
      { "run_eocs": "EOC_POWER_MAINTENANCE_CONCENTRATION_CHECK" },
      {
        "run_eocs": "EOC_ELECTROKIN_ZAP_ENEMIES_DRAIN",
        "time_in_future": [
          {
            "math": [
              "( (u_spell_level('electrokinetic_zap_enemies') * 80) + 300) * (scaling_factor(u_val('intelligence') ) ) * u_nether_attunement_power_scaling"
            ]
          },
          {
            "math": [
              "( (u_spell_level('electrokinetic_zap_enemies') * 225) + 800) * (scaling_factor(u_val('intelligence') ) ) * u_nether_attunement_power_scaling"
            ]
          }
        ]
      }
    ],
    "false_effect": [  ]
  },
  {
    "type": "effect_on_condition",
    "id": "EOC_ELECTROKIN_MELEE_ATTACKS_INITIATE",
    "condition": { "not": { "u_has_effect": "effect_electrokin_melee_attacks" } },
    "effect": [
      { "u_message": "Lightning crackles between your fingers!", "type": "good" },
      { "run_eocs": "EOC_POWER_MAINTENANCE_PLUS_ONE" },
      { "u_add_effect": "effect_electrokin_melee_attacks", "duration": "PERMANENT" },
      {
        "run_eocs": "EOC_ELECTROKIN_MELEE_ATTACKS_DRAIN",
        "time_in_future": [
          {
            "math": [
              "( (u_spell_level('electrokinetic_melee_attacks') * 55) + 240) * (scaling_factor(u_val('intelligence') ) ) * u_nether_attunement_power_scaling"
            ]
          },
          {
            "math": [
              "( (u_spell_level('electrokinetic_melee_attacks') * 90) + 600) * (scaling_factor(u_val('intelligence') ) ) * u_nether_attunement_power_scaling"
            ]
          }
        ]
      }
    ],
    "false_effect": [ { "run_eocs": "EOC_ELECTROKIN_REMOVE_MELEE_ATTACKS" } ]
  },
  {
    "type": "effect_on_condition",
    "id": "EOC_ELECTROKIN_REMOVE_MELEE_ATTACKS",
    "condition": { "u_has_effect": "effect_electrokin_melee_attacks" },
    "effect": [ { "run_eocs": "EOC_POWER_MAINTENANCE_MINUS_ONE" }, { "u_lose_effect": "effect_electrokin_melee_attacks" } ]
  },
  {
    "type": "effect_on_condition",
    "id": "EOC_ELECTROKIN_MELEE_ATTACKS_DRAIN",
    "condition": { "u_has_effect": "effect_electrokin_melee_attacks" },
    "effect": [
      { "math": [ "u_latest_channeled_power_difficulty = 3" ] },
      { "run_eocs": [ "EOC_PSIONICS_GAIN_NETHER_ATTUNEMENT_2", "EOC_PSI_MAINTENANCE_CALORIE_COST_CALCULATOR" ] },
      { "math": [ "u_spell_exp('electrokinetic_melee_attacks')", "+=", "psionic_power_experience_formula()" ] },
      { "run_eocs": "EOC_POWER_MAINTENANCE_CONCENTRATION_CHECK" },
      {
        "run_eocs": "EOC_ELECTROKIN_MELEE_ATTACKS_DRAIN",
        "time_in_future": [
          {
            "math": [
              "( (u_spell_level('electrokinetic_melee_attacks') * 55) + 240) * (scaling_factor(u_val('intelligence') ) ) * u_nether_attunement_power_scaling"
            ]
          },
          {
            "math": [
              "( (u_spell_level('electrokinetic_melee_attacks') * 90) + 600) * (scaling_factor(u_val('intelligence') ) ) * u_nether_attunement_power_scaling"
            ]
          }
        ]
      }
    ],
    "false_effect": [  ]
  },
  {
    "type": "effect_on_condition",
    "id": "EOC_ELECTROKIN_HACKING_INTERFACE_INITIATE",
    "condition": { "not": { "u_has_effect": "effect_electrokin_hacking_interface" } },
    "effect": [
      { "u_message": "You now have the ability to hack into nearby electronics.", "type": "good" },
      { "run_eocs": [ "EOC_POWER_MAINTENANCE_PLUS_ONE", "EOC_ELECTROKIN_HACKING_INTERFACE_SWITCHER" ] },
      { "u_add_effect": "effect_electrokin_hacking_interface", "duration": "PERMANENT" },
      {
        "run_eocs": "EOC_ELECTROKIN_HACKING_INTERFACE_DRAIN",
        "time_in_future": [
          {
            "math": [
              "( ( ( (u_spell_level('electrokinetic_hacking_interface') + u_spell_level('electrokinetic_hacking_interface_knack') ) * 45 ) + 600) * (scaling_factor(u_val('intelligence') ) ) ) * u_nether_attunement_power_scaling"
            ]
          },
          {
            "math": [
              "( ( ( (u_spell_level('electrokinetic_hacking_interface') + u_spell_level('electrokinetic_hacking_interface_knack') ) * 90 ) + 1800) * (scaling_factor(u_val('intelligence') ) ) ) * u_nether_attunement_power_scaling"
            ]
          }
        ]
      }
    ],
    "false_effect": [ { "run_eocs": "EOC_ELECTROKIN_REMOVE_HACKING_INTERFACE" } ]
  },
  {
    "type": "effect_on_condition",
    "id": "EOC_ELECTROKIN_REMOVE_HACKING_INTERFACE",
    "condition": { "u_has_effect": "effect_electrokin_hacking_interface" },
    "effect": [
      { "u_remove_item_with": "electrokinetic_electrohack_1" },
      { "u_remove_item_with": "electrokinetic_electrohack_2" },
      { "u_remove_item_with": "electrokinetic_electrohack_3" },
      { "u_remove_item_with": "electrokinetic_electrohack_4" },
      { "u_remove_item_with": "electrokinetic_electrohack_5" },
      { "u_lose_effect": "effect_electrokin_hacking_interface" },
      { "run_eocs": "EOC_POWER_MAINTENANCE_MINUS_ONE" }
    ]
  },
  {
    "type": "effect_on_condition",
    "id": "EOC_ELECTROKIN_HACKING_INTERFACE_SWITCHER",
    "effect": {
      "switch": {
        "math": [ "u_spell_level('electrokinetic_hacking_interface') + u_spell_level('electrokinetic_hacking_interface_knack')" ]
      },
      "cases": [
        {
          "case": 0,
          "effect": [ { "u_spawn_item": "electrokinetic_electrohack_1", "suppress_message": true, "force_equip": true } ]
        },
        {
          "case": 5,
          "effect": [ { "u_spawn_item": "electrokinetic_electrohack_2", "suppress_message": true, "force_equip": true } ]
        },
        {
          "case": 10,
          "effect": [ { "u_spawn_item": "electrokinetic_electrohack_3", "suppress_message": true, "force_equip": true } ]
        },
        {
          "case": 15,
          "effect": [ { "u_spawn_item": "electrokinetic_electrohack_4", "suppress_message": true, "force_equip": true } ]
        },
        {
          "case": 20,
          "effect": [ { "u_spawn_item": "electrokinetic_electrohack_5", "suppress_message": true, "force_equip": true } ]
        }
      ]
    }
  },
  {
    "type": "effect_on_condition",
    "id": "EOC_ELECTROKIN_HACKING_INTERFACE_DRAIN",
    "condition": { "u_has_effect": "effect_electrokin_hacking_interface" },
    "effect": [
      {
        "if": { "math": [ "u_spell_level('electrokinetic_hacking_interface') >= 1" ] },
        "then": { "math": [ "u_latest_channeled_power_difficulty = u_spell_difficulty('electrokinetic_hacking_interface')" ] },
        "else": { "math": [ "u_latest_channeled_power_difficulty = u_spell_difficulty('electrokinetic_hacking_interface_knack')" ] }
      },
      { "run_eocs": [ "EOC_PSIONICS_GAIN_NETHER_ATTUNEMENT_2", "EOC_PSI_MAINTENANCE_CALORIE_COST_CALCULATOR" ] },
      {
        "if": { "math": [ "u_spell_level('electrokinetic_hacking_interface') >= 1" ] },
        "then": { "math": [ "u_spell_exp('electrokinetic_hacking_interface')", "+=", "psionic_power_experience_formula()" ] },
        "else": { "math": [ "u_spell_exp('electrokinetic_hacking_interface_knack')", "+=", "psionic_power_experience_formula()" ] }
      },
      { "run_eocs": "EOC_POWER_MAINTENANCE_CONCENTRATION_CHECK" },
      {
        "run_eocs": "EOC_ELECTROKIN_HACKING_INTERFACE_DRAIN",
        "time_in_future": [
          {
            "math": [
              "( ( ( (u_spell_level('electrokinetic_hacking_interface') + u_spell_level('electrokinetic_hacking_interface_knack') ) * 45 ) + 600) * (scaling_factor(u_val('intelligence') ) ) ) * u_nether_attunement_power_scaling"
            ]
          },
          {
            "math": [
              "( ( ( (u_spell_level('electrokinetic_hacking_interface') + u_spell_level('electrokinetic_hacking_interface_knack') ) * 90 ) + 1800) * (scaling_factor(u_val('intelligence') ) ) ) * u_nether_attunement_power_scaling"
            ]
          }
        ]
      }
    ],
    "false_effect": [  ]
  },
  {
    "type": "effect_on_condition",
    "id": "EOC_ELECTROKIN_PERSONAL_BATTERY_INITIATE",
    "condition": { "not": { "u_has_effect": "effect_nether_attunement_electrokinetic_power_drain" } },
    "effect": [ { "run_eocs": "EOC_ELECTROKIN_PERSONAL_BATTERY_INITIATE_REAL" } ],
    "false_effect": [ { "u_message": "The power you channel vanishes into nothingness.", "type": "bad" } ]
  },
  {
    "type": "effect_on_condition",
    "id": "EOC_ELECTROKIN_PERSONAL_BATTERY_INITIATE_REAL",
    "condition": { "not": { "u_has_effect": "effect_electrokin_personal_battery" } },
    "effect": [
      { "u_message": "The hair on your body stands up on end.", "type": "good" },
      { "u_add_effect": "effect_electrokin_personal_battery", "duration": "PERMANENT" },
      { "run_eocs": [ "EOC_POWER_MAINTENANCE_PLUS_ONE", "EOC_ELECTROKIN_PERSONAL_BATTERY_EFFECT_BEGIN" ] },
      {
        "run_eocs": "EOC_ELECTROKIN_PERSONAL_BATTERY_DRAIN",
        "time_in_future": [
          {
            "math": [
              "min( (( ( (u_spell_level('electrokinetic_personal_battery') * 45 ) + 600) * (scaling_factor(u_val('intelligence') ) ) ) * u_nether_attunement_power_scaling), 14400)"
            ]
          },
          {
            "math": [
              "min( (( ( (u_spell_level('electrokinetic_personal_battery') * 90 ) + 1800) * (scaling_factor(u_val('intelligence') ) ) ) * u_nether_attunement_power_scaling), 14400)"
            ]
          }
        ]
      }
    ],
    "false_effect": [ { "run_eocs": "EOC_ELECTROKIN_REMOVE_PERSONAL_BATTERY" } ]
  },
  {
    "type": "effect_on_condition",
    "id": "EOC_ELECTROKIN_REMOVE_PERSONAL_BATTERY",
    "condition": { "u_has_effect": "effect_electrokin_personal_battery" },
    "effect": [ { "u_lose_effect": "effect_electrokin_personal_battery" }, { "run_eocs": "EOC_POWER_MAINTENANCE_MINUS_ONE" } ]
  },
  {
    "type": "effect_on_condition",
    "id": "EOC_ELECTROKIN_PERSONAL_BATTERY_EFFECT_BEGIN",
    "condition": { "u_has_effect": "effect_electrokin_personal_battery" },
    "effect": [
      {
        "run_eocs": "EOC_ELECTROKIN_PERSONAL_BATTERY_EFFECT_BEGIN",
        "time_in_future": [
          {
            "math": [
              "max( ( 60 - ( ( (u_spell_level('electrokinetic_personal_battery') * 2.5 ) * scaling_factor(u_val('intelligence')  ) * u_nether_attunement_power_scaling ) ) ), 5)"
            ]
          },
          {
            "math": [
              "max( ( 240 - ( (  (u_spell_level('electrokinetic_personal_battery') * 5 ) * scaling_factor(u_val('intelligence') ) * u_nether_attunement_power_scaling ) ) ), 10)"
            ]
          }
        ]
      },
      {
        "math": [
          "u_electrokin_personal_battery_power_count",
          "=",
          "( (u_spell_level('electrokinetic_personal_battery') / 5) + 1) * scaling_factor(u_val('intelligence') ) * u_nether_attunement_power_scaling"
        ]
      },
      { "run_eocs": "EOC_ELECTROKIN_PERSONAL_BATTERY_EFFECT" }
    ]
  },
  {
    "type": "effect_on_condition",
    "id": "EOC_ELECTROKIN_PERSONAL_BATTERY_EFFECT",
    "//": "recursively runs until available power is < 1 or all items are charged",
    "condition": { "math": [ "u_electrokin_personal_battery_power_count >= 1" ] },
    "effect": [
      { "math": [ "u_electrokin_personal_battery_item_count = 0" ] },
      { "run_eocs": "EOC_ELECTROKIN_PERSONAL_BATTERY_EFFECT_GET_ITEM_COUNT" },
      { "run_eocs": "EOC_ELECTROKIN_PERSONAL_BATTERY_EFFECT_AMMEND_ITEM_COUNT" },
      {
        "if": { "math": [ "u_electrokin_personal_battery_item_count > 0" ] },
        "then": {
          "math": [
            "u_electrokin_personal_battery_max_indv_power",
            "=",
            "floor(u_electrokin_personal_battery_power_count / u_electrokin_personal_battery_item_count)"
          ]
        },
        "else": { "math": [ "u_electrokin_personal_battery_max_indv_power = 0" ] }
      },
      { "run_eocs": "EOC_ELECTROKIN_PERSONAL_BATTERY_EFFECT_POWER_ITEMS" }
    ]
  },
  {
    "type": "effect_on_condition",
    "id": "EOC_ELECTROKIN_PERSONAL_BATTERY_EFFECT_POWER_ITEMS",
    "//": "power uncharged items and calls the main eoc to deal with any remaining power left over",
    "condition": {
      "and": [
        { "math": [ "u_electrokin_personal_battery_power_count >= 1" ] },
        { "math": [ "u_electrokin_personal_battery_item_count >= 1" ] }
      ]
    },
    "effect": [
      {
        "u_run_inv_eocs": "all",
        "search_data": [ { "is_chargeable": true } ],
        "true_eocs": [
          {
            "id": "EOC_ELECTROKIN_PERSONAL_BATTERY_EFFECT_POWER_ITEMS_DISTRIBUTION",
            "condition": { "math": [ "u_electrokin_personal_battery_power_count >= 1" ] },
            "effect": [
              {
                "if": { "math": [ "u_electrokin_personal_battery_max_indv_power >= 1" ] },
                "then": {
                  "math": [
                    "u_electrokin_personal_battery_power_count_used",
                    "=",
                    "min( n_val('power_max') - n_val('power'), u_electrokin_personal_battery_max_indv_power )"
                  ]
                },
                "else": {
                  "math": [
                    "u_electrokin_personal_battery_power_count_used",
                    "=",
                    "min( n_val('power_max') - n_val('power'), u_electrokin_personal_battery_power_count )"
                  ]
                }
              },
              {
                "math": [
                  "u_electrokin_personal_battery_power_count_used",
                  "=",
                  "min( n_val('power_max') - n_val('power'), u_electrokin_personal_battery_max_indv_power )"
                ]
              },
              { "math": [ "n_val('power')", "+=", "u_electrokin_personal_battery_power_count_used" ] },
              {
                "math": [ "u_electrokin_personal_battery_power_count", "-=", "u_electrokin_personal_battery_power_count_used" ]
              }
            ]
          }
        ]
      },
      { "run_eocs": "EOC_ELECTROKIN_PERSONAL_BATTERY_EFFECT" }
    ]
  },
  {
    "type": "effect_on_condition",
    "id": "EOC_ELECTROKIN_PERSONAL_BATTERY_EFFECT_GET_ITEM_COUNT",
    "//": "get total items without max power",
    "effect": [
      {
        "u_run_inv_eocs": "all",
        "search_data": [ { "is_chargeable": true } ],
        "true_eocs": [
          {
            "id": "EOC_ELECTROKIN_PERSONAL_BATTERY_GET_ITEM_COUNT_2",
            "effect": [ { "math": [ "u_electrokin_personal_battery_item_count++" ] } ]
          }
        ]
      }
    ]
  },
  {
    "type": "effect_on_condition",
    "id": "EOC_ELECTROKIN_PERSONAL_BATTERY_EFFECT_AMMEND_ITEM_COUNT",
    "//": "Reduce item count if the total chargeable power / uncharged item count is less than 1.",
    "condition": {
      "and": [
        { "math": [ "u_electrokin_personal_battery_power_count", ">=", "1" ] },
        { "math": [ "u_electrokin_personal_battery_item_count", ">=", "1" ] },
        {
          "math": [ "u_electrokin_personal_battery_power_count / u_electrokin_personal_battery_item_count", "<", "1" ]
        }
      ]
    },
    "effect": [
      { "math": [ "u_electrokin_personal_battery_item_count--" ] },
      { "run_eocs": "EOC_ELECTROKIN_PERSONAL_BATTERY_EFFECT_AMMEND_ITEM_COUNT" }
    ]
  },
  {
    "type": "effect_on_condition",
    "id": "EOC_ELECTROKIN_PERSONAL_BATTERY_DRAIN",
    "condition": { "u_has_effect": "effect_electrokin_personal_battery" },
    "effect": [
      { "math": [ "u_latest_channeled_power_difficulty = 3" ] },
      { "run_eocs": [ "EOC_PSIONICS_GAIN_NETHER_ATTUNEMENT_2", "EOC_PSI_MAINTENANCE_CALORIE_COST_CALCULATOR" ] },
      { "math": [ "u_spell_exp('electrokinetic_personal_battery')", "+=", "psionic_power_experience_formula()" ] },
      { "run_eocs": "EOC_POWER_MAINTENANCE_CONCENTRATION_CHECK" },
      {
        "run_eocs": "EOC_ELECTROKIN_PERSONAL_BATTERY_DRAIN",
        "time_in_future": [
          {
            "math": [
              "min( (( ( (u_spell_level('electrokinetic_personal_battery') * 45 ) + 600) * (scaling_factor(u_val('intelligence') ) ) ) * u_nether_attunement_power_scaling), 14400)"
            ]
          },
          {
            "math": [
              "min( (( ( (u_spell_level('electrokinetic_personal_battery') * 90 ) + 1800) * (scaling_factor(u_val('intelligence') ) ) ) * u_nether_attunement_power_scaling), 14400)"
            ]
          }
        ]
      }
    ]
  },
  {
    "type": "effect_on_condition",
    "id": "EOC_ELECTROKIN_REDUCE_PAIN_INITIATE",
    "condition": { "not": { "u_has_effect": "effect_electrokin_reduce_pain" } },
    "effect": [
      { "u_message": "The aches and pains of post-Cataclysmic life fade, just a little.", "type": "good" },
      { "run_eocs": "EOC_POWER_MAINTENANCE_PLUS_ONE" },
      { "u_add_effect": "effect_electrokin_reduce_pain", "duration": "PERMANENT" },
      {
        "run_eocs": "EOC_ELECTROKIN_REDUCE_PAIN_DRAIN",
        "time_in_future": [
          {
            "math": [
              "( (u_spell_level('electrokinetic_reduce_pain') * 120) + 600) * (scaling_factor(u_val('intelligence') ) ) * u_nether_attunement_power_scaling"
            ]
          },
          {
            "math": [
              "( (u_spell_level('electrokinetic_reduce_pain') * 280) + 1500) * (scaling_factor(u_val('intelligence') ) ) * u_nether_attunement_power_scaling"
            ]
          }
        ]
      }
    ],
    "false_effect": [ { "run_eocs": "EOC_ELECTROKIN_REMOVE_REDUCE_PAIN" } ]
  },
  {
    "type": "effect_on_condition",
    "id": "EOC_ELECTROKIN_REMOVE_REDUCE_PAIN",
    "condition": { "u_has_effect": "effect_electrokin_reduce_pain" },
    "effect": [ { "run_eocs": "EOC_POWER_MAINTENANCE_MINUS_ONE" }, { "u_lose_effect": "effect_electrokin_reduce_pain" } ]
  },
  {
    "type": "effect_on_condition",
    "id": "EOC_ELECTROKIN_REDUCE_PAIN_DRAIN",
    "condition": { "u_has_effect": "effect_electrokin_reduce_pain" },
    "effect": [
      { "math": [ "u_latest_channeled_power_difficulty = 4" ] },
      { "run_eocs": [ "EOC_PSIONICS_GAIN_NETHER_ATTUNEMENT_2", "EOC_PSI_MAINTENANCE_CALORIE_COST_CALCULATOR" ] },
      { "math": [ "u_spell_exp('electrokinetic_reduce_pain')", "+=", "psionic_power_experience_formula()" ] },
      { "run_eocs": "EOC_POWER_MAINTENANCE_CONCENTRATION_CHECK" },
      {
        "run_eocs": "EOC_ELECTROKIN_REDUCE_PAIN_DRAIN",
        "time_in_future": [
          {
            "math": [
              "( (u_spell_level('electrokinetic_reduce_pain') * 120) + 600) * (scaling_factor(u_val('intelligence') ) ) * u_nether_attunement_power_scaling"
            ]
          },
          {
            "math": [
              "( (u_spell_level('electrokinetic_reduce_pain') * 280) + 1500) * (scaling_factor(u_val('intelligence') ) ) * u_nether_attunement_power_scaling"
            ]
          }
        ]
      }
    ],
    "false_effect": [  ]
  },
  {
    "type": "effect_on_condition",
    "id": "EOC_ELECTROKIN_SPEED_BOOST_INITIATE",
    "condition": { "not": { "u_has_effect": "effect_electrokinetic_speed_boost" } },
    "effect": [
      { "u_message": "You enhance the functioning of your neurons.", "type": "good" },
      { "run_eocs": "EOC_POWER_MAINTENANCE_PLUS_ONE" },
      { "u_add_effect": "effect_electrokinetic_speed_boost", "duration": "PERMANENT" },
      {
        "run_eocs": "EOC_ELECTROKIN_SPEED_BOOST_DRAIN",
        "time_in_future": [
          {
            "math": [
              "( (u_spell_level('electrokinetic_speed_boost') * 18) + 81) * (scaling_factor(u_val('intelligence') ) ) * u_nether_attunement_power_scaling"
            ]
          },
          {
            "math": [
              "( (u_spell_level('electrokinetic_speed_boost') * 57) + 286) * (scaling_factor(u_val('intelligence') ) ) * u_nether_attunement_power_scaling"
            ]
          }
        ]
      }
    ],
    "false_effect": [ { "run_eocs": "EOC_ELECTROKIN_REMOVE_SPEED_BOOST" } ]
  },
  {
    "type": "effect_on_condition",
    "id": "EOC_ELECTROKIN_REMOVE_SPEED_BOOST",
    "condition": { "u_has_effect": "effect_electrokinetic_speed_boost" },
    "effect": [ { "run_eocs": "EOC_POWER_MAINTENANCE_MINUS_ONE" }, { "u_lose_effect": "effect_electrokinetic_speed_boost" } ]
  },
  {
    "type": "effect_on_condition",
    "id": "EOC_ELECTROKIN_SPEED_BOOST_DRAIN",
    "condition": { "u_has_effect": "effect_electrokinetic_speed_boost" },
    "effect": [
      { "math": [ "u_latest_channeled_power_difficulty = 6" ] },
      { "run_eocs": [ "EOC_PSIONICS_GAIN_NETHER_ATTUNEMENT_2", "EOC_PSI_MAINTENANCE_CALORIE_COST_CALCULATOR" ] },
      { "math": [ "u_spell_exp('electrokinetic_speed_boost')", "+=", "psionic_power_experience_formula()" ] },
      { "run_eocs": "EOC_POWER_MAINTENANCE_CONCENTRATION_CHECK" },
      {
        "run_eocs": "EOC_ELECTROKIN_SPEED_BOOST_DRAIN",
        "time_in_future": [
          {
            "math": [
              "( (u_spell_level('electrokinetic_speed_boost') * 18) + 81) * (scaling_factor(u_val('intelligence') ) ) * u_nether_attunement_power_scaling"
            ]
          },
          {
            "math": [
              "( (u_spell_level('electrokinetic_speed_boost') * 57) + 286) * (scaling_factor(u_val('intelligence') ) ) * u_nether_attunement_power_scaling"
            ]
          }
        ]
      }
    ],
    "false_effect": [  ]
  },
  {
    "type": "effect_on_condition",
    "id": "EOC_ELECTROKIN_LIGHTNING_AURA_INITIATE",
    "condition": { "not": { "u_has_effect": "effect_electrokinetic_lightning_aura" } },
    "effect": [
      { "u_message": "The air around you begins crackling with electricity!", "type": "good" },
      { "run_eocs": "EOC_POWER_MAINTENANCE_PLUS_ONE" },
      { "u_add_effect": "effect_electrokinetic_lightning_aura", "duration": "PERMANENT" },
      { "run_eocs": "EOC_ELECTROKIN_LIGHTNING_AURA_EFFECTS" },
      {
        "run_eocs": "EOC_ELECTROKIN_LIGHTNING_AURA_DRAIN",
        "time_in_future": [
          {
            "math": [
              "( (u_spell_level('electrokinetic_lightning_aura') * 15) + 60) * (scaling_factor(u_val('intelligence') ) ) * u_nether_attunement_power_scaling"
            ]
          },
          {
            "math": [
              "( (u_spell_level('electrokinetic_lightning_aura') * 25) + 250) * (scaling_factor(u_val('intelligence') ) ) * u_nether_attunement_power_scaling"
            ]
          }
        ]
      }
    ],
    "false_effect": [ { "run_eocs": "EOC_ELECTROKIN_REMOVE_LIGHTNING_AURA" } ]
  },
  {
    "type": "effect_on_condition",
    "id": "EOC_ELECTROKIN_REMOVE_LIGHTNING_AURA",
    "condition": { "u_has_effect": "effect_electrokinetic_lightning_aura" },
    "effect": [
      { "run_eocs": "EOC_POWER_MAINTENANCE_MINUS_ONE" },
      { "u_lose_effect": "effect_electrokinetic_lightning_aura" },
      { "u_add_effect": "effect_electrokinetic_lightning_aura_aftershock", "duration": "5 seconds" }
    ]
  },
  {
    "type": "effect_on_condition",
    "id": "EOC_ELECTROKIN_LIGHTNING_AURA_DRAIN",
    "condition": { "u_has_effect": "effect_electrokinetic_lightning_aura" },
    "effect": [
      { "math": [ "u_latest_channeled_power_difficulty = 8" ] },
      { "run_eocs": [ "EOC_PSIONICS_GAIN_NETHER_ATTUNEMENT_2", "EOC_PSI_MAINTENANCE_CALORIE_COST_CALCULATOR" ] },
      { "math": [ "u_spell_exp('electrokinetic_lightning_aura')", "+=", "psionic_power_experience_formula()" ] },
      { "run_eocs": "EOC_POWER_MAINTENANCE_CONCENTRATION_CHECK" },
      {
        "run_eocs": "EOC_ELECTROKIN_LIGHTNING_AURA_DRAIN",
        "time_in_future": [
          {
            "math": [
              "( (u_spell_level('electrokinetic_lightning_aura') * 15) + 60) * (scaling_factor(u_val('intelligence') ) ) * u_nether_attunement_power_scaling"
            ]
          },
          {
            "math": [
              "( (u_spell_level('electrokinetic_lightning_aura') * 25) + 250) * (scaling_factor(u_val('intelligence') ) ) * u_nether_attunement_power_scaling"
            ]
          }
        ]
      }
    ],
    "false_effect": [  ]
  },
  {
    "type": "effect_on_condition",
    "id": "EOC_ELECTROKIN_LIGHTNING_AURA_EFFECTS",
    "condition": { "u_has_effect": "effect_electrokinetic_lightning_aura" },
    "effect": [
      {
        "u_location_variable": { "global_val": "lightning_aura_nearby_target" },
        "monster": "",
        "target_min_radius": 0,
        "target_max_radius": {
          "math": [
            "min( ( (u_spell_level('electrokinetic_lightning_aura') * 0.33) + 2) * (scaling_factor(u_val('intelligence') ) ), 10)"
          ]
        }
      },
      {
        "u_cast_spell": { "id": "electrokinetic_lightning_aura_attack_placeholder" },
        "loc": { "global_val": "lightning_aura_nearby_target" }
      },
      { "u_cast_spell": { "id": "electrokinetic_lightning_aura_spark" } },
      { "run_eocs": "EOC_ELECTROKIN_LIGHTNING_AURA_EFFECTS", "time_in_future": "5 seconds" }
    ]
  }
]
