[
  {
    "type": "SPELL",
    "id": "storm_chain_master",
    "name": "Storm Chain",
    "description": "You touch an unwilling subject and lightning dances from you to multiple nearby enemies.",
    "effect": "attack",
    "shape": "blast",
    "damage_type": "electric",
    "spell_class": "STORM_ELEMENTAL",
    "max_level": 35,
    "min_damage": { "math": [ "(u_spell_level('storm_chain_master') * 0.5) + 1" ] },
    "max_damage": { "math": [ "(u_spell_level('storm_chain_master') * 1.4) + 6" ] },
    "min_range": 1,
    "max_range": 1,
    "magic_type": "magiclysm_generic_magic",
    "base_energy_cost": 500,
    "base_casting_time": 100,
    "difficulty": 4,
    "flags": [ "EVOCATION_SPELL", "RANDOM_DAMAGE", "LOUD", "SOMATIC", "NO_LEGS", "MUST_HAVE_CLASS_TO_LEARN" ],
    "sound_description": "a crackle",
    "valid_targets": [ "hostile" ],
    "extra_effects": [ { "id": "storm_chain_1" }, { "id": "storm_chain_1" }, { "id": "eoc_evocation_setup", "hit_self": true } ]
  },
  {
    "type": "SPELL",
    "id": "storm_chain_1",
    "name": { "str": "Storm Chain 1", "//~": "NO_I18N" },
    "description": { "str": "#1 in the storm chain series of effects.", "//~": "NO_I18N" },
    "effect": "attack",
    "shape": "line",
    "damage_type": "electric",
    "field_id": "fd_electricity",
    "min_field_intensity": 2,
    "max_field_intensity": 2,
    "field_chance": 1,
    "max_level": 35,
    "min_damage": { "math": [ "(u_spell_level('storm_chain_master') * 0.5) + 1" ] },
    "max_damage": { "math": [ "(u_spell_level('storm_chain_master') * 1.4) + 6" ] },
    "min_range": 13,
    "range_increment": 0.2,
    "max_range": 20,
    "min_aoe": 1,
    "max_aoe": 1,
    "sound_description": "a crackle",
    "valid_targets": [ "hostile", "ground" ],
    "flags": [ "EVOCATION_SPELL", "RANDOM_DAMAGE", "LOUD", "RANDOM_TARGET", "RANDOM_CRITTER" ],
    "extra_effects": [ { "id": "storm_chain_2" }, { "id": "storm_chain_2" } ]
  },
  {
    "type": "SPELL",
    "id": "storm_chain_2",
    "name": { "str": "Storm Chain 2", "//~": "NO_I18N" },
    "description": { "str": "#2 in the storm chain series of effects.", "//~": "NO_I18N" },
    "effect": "attack",
    "shape": "line",
    "damage_type": "electric",
    "field_id": "fd_electricity",
    "min_field_intensity": 2,
    "max_field_intensity": 2,
    "field_chance": 1,
    "max_level": 35,
    "min_damage": { "math": [ "(u_spell_level('storm_chain_master') * 0.5) + 1" ] },
    "max_damage": { "math": [ "(u_spell_level('storm_chain_master') * 1.4) + 6" ] },
    "min_range": 7,
    "range_increment": 0.2,
    "max_range": 14,
    "min_aoe": 1,
    "max_aoe": 1,
    "sound_description": "a crackle",
    "valid_targets": [ "hostile", "ground" ],
    "flags": [ "EVOCATION_SPELL", "RANDOM_DAMAGE", "LOUD", "RANDOM_TARGET", "RANDOM_CRITTER" ],
    "extra_effects": [ { "id": "storm_chain_3" }, { "id": "storm_chain_3" } ]
  },
  {
    "type": "SPELL",
    "id": "storm_chain_3",
    "name": { "str": "Storm Chain 3", "//~": "NO_I18N" },
    "description": { "str": "#3 in the storm chain series of effects.", "//~": "NO_I18N" },
    "effect": "attack",
    "shape": "line",
    "damage_type": "electric",
    "field_id": "fd_electricity",
    "min_field_intensity": 2,
    "max_field_intensity": 2,
    "field_chance": 1,
    "max_level": 35,
    "min_damage": { "math": [ "(u_spell_level('storm_chain_master') * 0.5) + 1" ] },
    "max_damage": { "math": [ "(u_spell_level('storm_chain_master') * 1.4) + 6" ] },
    "min_range": 0,
    "range_increment": 0.2,
    "max_range": 7,
    "min_aoe": 1,
    "max_aoe": 1,
    "sound_description": "a crackle",
    "valid_targets": [ "hostile", "ground" ],
    "flags": [ "EVOCATION_SPELL", "RANDOM_DAMAGE", "LOUD", "RANDOM_TARGET", "RANDOM_CRITTER" ]
  },
  {
    "id": "storm_elemental_electric_melee",
    "type": "SPELL",
    "name": "Galvanic",
    "description": "Fill your hands with high-voltage electricity, and deal additional electric damage in melee.",
    "valid_targets": [ "self" ],
    "effect": "attack",
    "effect_str": "eff_storm_elemental_electric_melee",
    "shape": "blast",
    "flags": [ "ENHANCEMENT_SPELL", "NO_LEGS", "SILENT", "NO_HANDS", "NO_EXPLOSION_SFX" ],
    "extra_effects": [ { "id": "eoc_enhancement_setup", "hit_self": true } ],
    "spell_class": "STORM_ELEMENTAL",
    "difficulty": 4,
    "min_duration": 20000,
    "max_duration": 720000,
    "duration_increment": 20000,
    "base_casting_time": 500,
    "final_casting_time": 150,
    "casting_time_increment": -10,
    "base_energy_cost": 325,
    "final_energy_cost": 150,
    "energy_increment": -5,
    "max_level": 35,
    "magic_type": "magiclysm_generic_magic"
  },
  {
    "id": "eff_storm_elemental_electric_melee",
    "type": "effect_type",
    "name": [ "Galvanic" ],
    "desc": [ "You deal additional electric damage in melee." ],
    "apply_message": "Electric energy is concentrated in your hands, and it's ready to go.",
    "remove_message": "Your hands turn back to normal condition.",
    "rating": "good",
    "show_intensity": false,
    "enchantments": [
      {
        "melee_damage_bonus": [
          { "type": "electric", "add": { "math": [ "(u_spell_level('storm_elemental_electric_melee') * 0.9) * rng(0.5,1.4)" ] } }
        ]
      },
      { "values": [ { "value": "MELEE_DAMAGE", "multiply": 0.4 } ] }
    ]
  }
]
