[
  {
    "id": "shadow_field",
    "type": "SPELL",
    "name": "Shadow Field",
    "description": "Shroud an area in intense shadows.",
    "effect": "attack",
    "field_id": "fd_darkness",
    "min_field_intensity": 1,
    "max_field_intensity": 1,
    "shape": "blast",
    "valid_targets": [ "self", "ground" ],
    "extra_effects": [ { "id": "eoc_evocation_setup", "hit_self": true } ],
    "min_duration": 3000,
    "max_duration": 45000,
    "min_range": 10,
    "max_range": 10,
    "min_aoe": 1,
    "max_aoe": 4,
    "aoe_increment": 0.25,
    "duration_increment": 1400,
    "max_level": 30,
    "spell_class": "MAGUS",
    "magic_type": "magiclysm_generic_magic",
    "base_energy_cost": 250,
    "base_casting_time": 100,
    "difficulty": 1,
    "flags": [ "EVOCATION_SPELL", "NO_LEGS", "SOMATIC", "CONCENTRATE" ]
  },
  {
    "id": "magic_missile",
    "type": "SPELL",
    "name": "Magic Missile",
    "description": "I cast Magic Missile at the darkness!",
    "valid_targets": [ "hostile" ],
    "flags": [ "EVOCATION_SPELL", "RANDOM_DAMAGE", "VERBAL", "SOMATIC", "NO_LEGS", "SILENT", "NO_PROJECTILE" ],
    "extra_effects": [ { "id": "eoc_evocation_setup", "hit_self": true } ],
    "min_damage": { "math": [ "(u_spell_level('magic_missile') * 0.75) + 0" ] },
    "max_damage": { "math": [ "(u_spell_level('magic_missile') * 1) + 3" ] },
    "damage_type": "nether",
    "min_range": 8,
    "range_increment": 0.8,
    "max_range": 20,
    "base_energy_cost": 50,
    "spell_class": "MAGUS",
    "difficulty": 1,
    "max_level": 15,
    "base_casting_time": 100,
    "magic_type": "magiclysm_generic_magic",
    "shape": "blast",
    "effect": "attack"
  },
  {
    "id": "phase_door",
    "type": "SPELL",
    "name": "Phase Door",
    "description": "Teleports you a short distance in a random direction.",
    "effect": "short_range_teleport",
    "shape": "blast",
    "valid_targets": [ "none" ],
    "flags": [ "CONVEYANCE_SPELL", "SOMATIC", "SILENT", "NO_LEGS" ],
    "extra_effects": [ { "id": "eoc_conveyance_setup", "hit_self": true } ],
    "min_range": 3,
    "max_range": 4,
    "range_increment": 0.1,
    "min_aoe": 2,
    "max_aoe": 4,
    "aoe_increment": 0.2,
    "max_level": 10,
    "difficulty": 2,
    "spell_class": "MAGUS",
    "base_casting_time": 100,
    "magic_type": "magiclysm_generic_magic",
    "base_energy_cost": 100,
    "learn_spells": { "dimension_door": 10 }
  },
  {
    "id": "dimension_door",
    "type": "SPELL",
    "name": "Dimension Door",
    "description": "Teleports you randomly near a target location.",
    "effect": "short_range_teleport",
    "shape": "blast",
    "valid_targets": [ "ground" ],
    "flags": [ "CONVEYANCE_SPELL", "SOMATIC", "SILENT", "NO_LEGS", "TARGET_TELEPORT" ],
    "extra_effects": [ { "id": "eoc_conveyance_setup", "hit_self": true } ],
    "min_range": 10,
    "max_range": 20,
    "range_increment": 1,
    "min_aoe": 6,
    "max_aoe": 3,
    "aoe_increment": -0.3,
    "max_level": 30,
    "difficulty": 5,
    "spell_class": "MAGUS",
    "base_casting_time": 600,
    "magic_type": "magiclysm_generic_magic",
    "base_energy_cost": 600,
    "energy_increment": -10,
    "final_energy_cost": 350
  },
  {
    "id": "gravity_well",
    "type": "SPELL",
    "name": "Gravity Well",
    "description": "Summons a well of gravity centered on the targeted location.  Dealing bashing damage to all creatures in the affected area.",
    "effect": "attack",
    "shape": "blast",
    "valid_targets": [ "self", "ally", "hostile", "ground" ],
    "flags": [ "EVOCATION_SPELL", "SOMATIC", "VERBAL", "CONCENTRATE", "NO_PROJECTILE", "SPLIT_DAMAGE" ],
    "extra_effects": [ { "id": "eoc_evocation_setup", "hit_self": true } ],
    "min_damage": 21,
    "max_damage": 45,
    "damage_increment": 1.2,
    "damage_type": "gravity",
    "min_range": 5,
    "max_range": 15,
    "range_increment": 0.5,
    "min_aoe": 1,
    "max_aoe": 6,
    "aoe_increment": 0.25,
    "max_level": 20,
    "difficulty": 10,
    "spell_class": "MAGUS",
    "base_casting_time": 600,
    "magic_type": "magiclysm_generic_magic",
    "base_energy_cost": 350
  },
  {
    "id": "magus_mana_blast",
    "type": "SPELL",
    "name": "Mana Blast",
    "description": "A blast of concentrated magical power that obliterates a large area.",
    "valid_targets": [ "hostile", "ground" ],
    "flags": [ "EVOCATION_SPELL", "RANDOM_DAMAGE", "VERBAL", "SOMATIC", "NO_LEGS", "SPLIT_DAMAGE" ],
    "effect": "attack",
    "shape": "blast",
    "spell_class": "MAGUS",
    "magic_type": "magiclysm_generic_magic",
    "extra_effects": [ { "id": "eoc_evocation_setup", "hit_self": true } ],
    "min_damage": { "math": [ "(u_spell_level('magus_mana_blast') * 1.1) + 12" ] },
    "max_damage": { "math": [ "(u_spell_level('magus_mana_blast') * 2.4) + 18" ] },
    "base_casting_time": 150,
    "base_energy_cost": 200,
    "difficulty": 5,
    "max_level": 20,
    "damage_type": "nether",
    "min_aoe": 1,
    "max_aoe": 3,
    "aoe_increment": 0.25,
    "min_range": 5,
    "max_range": 20,
    "range_increment": 1
  },
  {
    "id": "magus_mana_bolt",
    "type": "SPELL",
    "name": "Mana Bolt",
    "description": "A bolt of magical power that only damages your foes.",
    "valid_targets": [ "hostile" ],
    "flags": [ "EVOCATION_SPELL", "RANDOM_DAMAGE", "VERBAL", "SOMATIC", "NO_LEGS" ],
    "extra_effects": [ { "id": "eoc_evocation_setup", "hit_self": true } ],
    "effect": "attack",
    "shape": "blast",
    "min_damage": { "math": [ "(u_spell_level('magus_mana_bolt') * 2) + 12" ] },
    "max_damage": { "math": [ "(u_spell_level('magus_mana_bolt') * 4.1) + 24" ] },
    "spell_class": "MAGUS",
    "magic_type": "magiclysm_generic_magic",
    "base_casting_time": 100,
    "base_energy_cost": 150,
    "difficulty": 5,
    "max_level": 20,
    "damage_type": "nether",
    "min_range": 5,
    "max_range": 30,
    "range_increment": 1.5
  },
  {
    "id": "magus_haste",
    "type": "SPELL",
    "name": "Haste",
    "description": "This spell gives you an enormous boost of speed lasting a short period of time.",
    "valid_targets": [ "self" ],
    "flags": [ "ENHANCEMENT_SPELL", "LOUD", "VERBAL", "SOMATIC", "NO_PROJECTILE" ],
    "extra_effects": [ { "id": "eoc_enhancement_setup", "hit_self": true } ],
    "effect": "attack",
    "effect_str": "haste",
    "shape": "blast",
    "spell_class": "MAGUS",
    "magic_type": "magiclysm_generic_magic",
    "components": "spell_components_haste",
    "difficulty": 8,
    "base_casting_time": 400,
    "casting_time_increment": -10,
    "final_casting_time": 200,
    "base_energy_cost": 450,
    "max_level": 20,
    "min_duration": 600,
    "max_duration": 12000,
    "duration_increment": 600
  },
  {
    "id": "magus_slow",
    "type": "SPELL",
    "name": "Slow",
    "description": "This spell weakens your target, resulting in a decrease of speed lasting a short period of time.",
    "valid_targets": [ "ally", "hostile" ],
    "flags": [ "ENERVATION_SPELL", "LOUD", "VERBAL", "SOMATIC", "NO_PROJECTILE" ],
    "extra_effects": [ { "id": "eoc_enervation_setup", "hit_self": true } ],
    "effect": "attack",
    "effect_str": "magic_slowed",
    "shape": "blast",
    "spell_class": "MAGUS",
    "magic_type": "magiclysm_generic_magic",
    "difficulty": 6,
    "base_casting_time": 200,
    "base_energy_cost": 400,
    "max_level": 20,
    "min_range": 5,
    "max_range": 30,
    "range_increment": 1.5,
    "min_duration": 600,
    "max_duration": 12000,
    "duration_increment": 600
  },
  {
    "id": "magus_baleful_polymorph",
    "type": "SPELL",
    "name": "Baleful Polymorph",
    "description": "Transform your enemies into frogs.",
    "valid_targets": [ "hostile" ],
    "flags": [ "TRANSFORMATION_SPELL", "VERBAL", "SOMATIC", "NO_LEGS", "NO_PROJECTILE" ],
    "effect": "targeted_polymorph",
    "effect_str": "mon_baleful_polymorph_frog",
    "extra_effects": [ { "id": "eoc_transformation_setup", "hit_self": true } ],
    "shape": "blast",
    "spell_class": "MAGUS",
    "magic_type": "magiclysm_generic_magic",
    "base_casting_time": 150,
    "base_energy_cost": 150,
    "difficulty": 8,
    "max_level": 20,
    "min_damage": 20,
    "max_damage": 40,
    "damage_increment": 2,
    "damage_type": "pure",
    "min_range": 5,
    "max_range": 30,
    "range_increment": 1.5
  },
  {
    "id": "magus_mana_beam",
    "type": "SPELL",
    "name": "Mana Beam",
    "description": "A beam of focused magical power that damages any foes in its path.",
    "valid_targets": [ "hostile", "ground" ],
    "flags": [ "EVOCATION_SPELL", "RANDOM_DAMAGE", "VERBAL", "SOMATIC", "NO_LEGS", "LOUD", "SPLIT_DAMAGE" ],
    "extra_effects": [ { "id": "eoc_evocation_setup", "hit_self": true } ],
    "effect": "attack",
    "shape": "line",
    "spell_class": "MAGUS",
    "magic_type": "magiclysm_generic_magic",
    "min_damage": { "math": [ "(u_spell_level('magus_mana_beam') * 1.2) + 6" ] },
    "max_damage": { "math": [ "(u_spell_level('magus_mana_beam') * 2) + 11" ] },
    "base_casting_time": 150,
    "base_energy_cost": 200,
    "difficulty": 4,
    "max_level": 20,
    "damage_type": "nether",
    "min_aoe": 1,
    "max_aoe": 1,
    "min_range": 5,
    "max_range": 20,
    "range_increment": 1
  },
  {
    "id": "magus_escape",
    "type": "SPELL",
    "name": "Escape",
    "description": "Teleports you in a random direction a medium distance, to help escape your foes in dangerous situations.",
    "effect": "short_range_teleport",
    "shape": "blast",
    "valid_targets": [ "none" ],
    "flags": [ "CONVEYANCE_SPELL", "SOMATIC", "SILENT", "NO_LEGS", "VERBAL" ],
    "extra_effects": [ { "id": "eoc_conveyance_setup", "hit_self": true } ],
    "min_aoe": 5,
    "max_aoe": 10,
    "aoe_increment": 0.25,
    "min_range": 25,
    "max_range": 35,
    "range_increment": 0.5,
    "max_level": 20,
    "difficulty": 5,
    "spell_class": "MAGUS",
    "base_casting_time": 100,
    "magic_type": "magiclysm_generic_magic",
    "base_energy_cost": 250
  },
  {
    "id": "create_rune_magus",
    "type": "SPELL",
    "name": "Magus Rune",
    "description": "This ritual forces small amounts of mana to crystallize out into intricate patterns, making a rune attuned to Magi.  You can use the rune as a catalyst for recipes.",
    "valid_targets": [ "self" ],
    "min_damage": 1,
    "max_damage": 1,
    "effect": "spawn_item",
    "effect_str": "rune_magus",
    "shape": "blast",
    "extra_effects": [ { "id": "eoc_channeling_setup", "hit_self": true } ],
    "base_casting_time": 5000,
    "base_energy_cost": 5,
    "min_duration": 1,
    "max_duration": 2,
    "duration_increment": 1,
    "difficulty": 0,
    "max_level": 0,
    "spell_class": "MAGUS",
    "magic_type": "magiclysm_generic_magic",
    "flags": [ "CHANNELING_SPELL", "PERMANENT", "NO_LEGS", "CONCENTRATE" ]
  },
  {
    "id": "cats_grace",
    "type": "SPELL",
    "name": "Cat's Grace",
    "description": "You align your senses to be closer to those of a cat, becoming more graceful, agile, and coordinated.",
    "valid_targets": [ "self" ],
    "extra_effects": [ { "id": "eoc_enhancement_setup", "hit_self": true } ],
    "min_duration": 6000,
    "max_duration": 360000,
    "duration_increment": 17700,
    "max_level": 20,
    "spell_class": "MAGUS",
    "magic_type": "magiclysm_generic_magic",
    "base_energy_cost": 400,
    "energy_increment": -5.0,
    "final_energy_cost": 300,
    "base_casting_time": 250,
    "difficulty": 5,
    "flags": [ "ENHANCEMENT_SPELL", "VERBAL", "SOMATIC", "NO_LEGS", "NO_PROJECTILE" ],
    "shape": "blast",
    "effect": "attack",
    "effect_str": "cats_grace"
  },
  {
    "id": "eagles_sight",
    "type": "SPELL",
    "name": "Eagle's Sight",
    "description": "You gain the perception of an eagle.",
    "valid_targets": [ "self" ],
    "extra_effects": [ { "id": "eoc_enhancement_setup", "hit_self": true } ],
    "min_duration": 6000,
    "max_duration": 360000,
    "duration_increment": 17700,
    "max_level": 20,
    "spell_class": "MAGUS",
    "magic_type": "magiclysm_generic_magic",
    "base_energy_cost": 400,
    "energy_increment": -5.0,
    "final_energy_cost": 300,
    "base_casting_time": 250,
    "difficulty": 5,
    "flags": [ "ENHANCEMENT_SPELL", "VERBAL", "SOMATIC", "NO_LEGS", "NO_PROJECTILE" ],
    "shape": "blast",
    "effect": "attack",
    "effect_str": "eagles_sight"
  },
  {
    "id": "ogres_strength",
    "type": "SPELL",
    "name": "Ogre's Strength",
    "description": "You gain the strength of an ogre.",
    "valid_targets": [ "self" ],
    "extra_effects": [ { "id": "eoc_enhancement_setup", "hit_self": true } ],
    "min_duration": 6000,
    "max_duration": 360000,
    "duration_increment": 17700,
    "max_level": 20,
    "spell_class": "MAGUS",
    "magic_type": "magiclysm_generic_magic",
    "base_energy_cost": 400,
    "energy_increment": -5.0,
    "final_energy_cost": 300,
    "base_casting_time": 250,
    "difficulty": 5,
    "flags": [ "ENHANCEMENT_SPELL", "VERBAL", "SOMATIC", "NO_LEGS", "NO_PROJECTILE" ],
    "shape": "blast",
    "effect": "attack",
    "effect_str": "ogres_strength"
  },
  {
    "id": "foxs_cunning",
    "type": "SPELL",
    "name": "Fox's Cunning",
    "description": "You become wily like a fox.",
    "valid_targets": [ "self" ],
    "extra_effects": [ { "id": "eoc_enhancement_setup", "hit_self": true } ],
    "min_duration": 6000,
    "max_duration": 360000,
    "duration_increment": 17700,
    "max_level": 20,
    "spell_class": "MAGUS",
    "magic_type": "magiclysm_generic_magic",
    "base_energy_cost": 400,
    "energy_increment": -5.0,
    "final_energy_cost": 300,
    "base_casting_time": 250,
    "difficulty": 5,
    "flags": [ "ENHANCEMENT_SPELL", "VERBAL", "SOMATIC", "NO_LEGS", "NO_PROJECTILE" ],
    "shape": "blast",
    "effect": "attack",
    "effect_str": "foxs_cunning"
  },
  {
    "id": "magus_force_jar",
    "type": "SPELL",
    "name": { "str": "Jar of Force" },
    "description": "Summon a jar of force in which you can store liquids.",
    "effect": "spawn_item",
    "effect_str": "jar_3l_force",
    "shape": "blast",
    "valid_targets": [ "self" ],
    "flags": [ "CONJURATION_SPELL", "SOMATIC", "CONCENTRATE", "VERBAL" ],
    "extra_effects": [ { "id": "eoc_summon_setup", "hit_self": true } ],
    "max_level": 15,
    "min_damage": 1,
    "max_damage": 1,
    "min_duration": 8640000,
    "max_duration": 129600000,
    "duration_increment": 8640000,
    "spell_class": "MAGUS",
    "base_casting_time": 400,
    "base_energy_cost": 350,
    "magic_type": "magiclysm_generic_magic",
    "difficulty": 3
  },
  {
    "id": "magus_summon_impact_sling",
    "type": "SPELL",
    "name": { "str": "Impact Sling" },
    "description": "This spell infuses a sling with tremendous force, delivering devastating pebble shots until the energy tears it apart.",
    "effect": "spawn_item",
    "effect_str": "impactsling",
    "shape": "blast",
    "valid_targets": [ "self" ],
    "flags": [ "CONJURATION_SPELL", "SOMATIC", "CONCENTRATE", "VERBAL" ],
    "extra_effects": [ { "id": "eoc_summon_setup", "hit_self": true } ],
    "components": "spell_components_impactsling",
    "max_level": 15,
    "min_damage": 1,
    "max_damage": 1,
    "min_duration": 24000,
    "max_duration": 360000,
    "duration_increment": 24000,
    "spell_class": "MAGUS",
    "base_casting_time": 400,
    "base_energy_cost": 350,
    "magic_type": "magiclysm_generic_magic",
    "difficulty": 4,
    "learn_spells": { "magus_summon_impact_sling_plus": 15 }
  },
  {
    "id": "magus_summon_impact_sling_plus",
    "type": "SPELL",
    "name": { "str": "Enhanced Impact Sling" },
    "description": "This spell infuses a sling with tremendous force, delivering devastating pebble shots until the energy tears it apart.  Now you know this spell like the back of your hand, and have started to design your own version.",
    "effect": "spawn_item",
    "effect_str": "impactsling",
    "shape": "blast",
    "valid_targets": [ "self" ],
    "flags": [ "CONJURATION_SPELL", "SOMATIC", "VERBAL", "NO_FAIL" ],
    "extra_effects": [ { "id": "eoc_summon_setup", "hit_self": true } ],
    "components": "spell_components_impactsling",
    "max_level": 25,
    "min_damage": 1,
    "max_damage": 1,
    "min_duration": 360000,
    "max_duration": 2160000,
    "duration_increment": 72000,
    "spell_class": "MAGUS",
    "base_casting_time": 400,
    "final_casting_time": 150,
    "casting_time_increment": -10,
    "base_energy_cost": 350,
    "final_energy_cost": 100,
    "energy_increment": -10,
    "magic_type": "magiclysm_generic_magic",
    "difficulty": 6
  },
  {
    "id": "focused_bolt",
    "type": "SPELL",
    "name": "Focused Bolt",
    "description": "You focus your mana into a microscopically thin pulsed beam of pure energy, capable of extreme range and precision; as well as unparalleled penetration, provided proper skill.  Once the invention of a notorious assassin, this spell has slain many a king and noble.  Passed on only through direct descendants over the ages, though occasionally shared by them to others.",
    "effect": "attack",
    "shape": "line",
    "valid_targets": [ "hostile", "ground" ],
    "flags": [ "EVOCATION_SPELL", "RANDOM_DAMAGE", "SOMATIC", "NO_LEGS", "CONCENTRATE", "SILENT", "NO_PROJECTILE" ],
    "extra_effects": [ { "id": "eoc_evocation_setup", "hit_self": true } ],
    "max_level": 30,
    "min_damage": { "math": [ "(u_spell_level('focused_bolt') * 1) + 1" ] },
    "max_damage": { "math": [ "(u_spell_level('focused_bolt') * 3) + 4" ] },
    "damage_type": "nether",
    "min_range": 5,
    "max_range": 50,
    "range_increment": 1.5,
    "min_aoe": 5,
    "max_aoe": 0,
    "aoe_increment": -0.5,
    "spell_class": "MAGUS",
    "base_casting_time": 500,
    "base_energy_cost": 400,
    "magic_type": "magiclysm_generic_magic",
    "difficulty": 8
  },
  {
    "id": "magus_slowfall",
    "type": "SPELL",
    "name": "Slowfall",
    "description": "Reduce the velocity of your falls by a great amount, or to zero if at high mastery.",
    "valid_targets": [ "self" ],
    "spell_class": "MAGUS",
    "flags": [ "ENHANCEMENT_SPELL", "CONCENTRATE", "VERBAL", "SOMATIC" ],
    "extra_effects": [ { "id": "eoc_enhancement_setup", "hit_self": true } ],
    "effect": "attack",
    "effect_str": "effect_magus_slowfall",
    "shape": "blast",
    "difficulty": 2,
    "max_level": 10,
    "min_duration": 6000,
    "max_duration": 30000,
    "duration_increment": 2400,
    "magic_type": "magiclysm_generic_magic",
    "base_energy_cost": 150,
    "base_casting_time": 150
  },
  {
    "id": "magus_spiderclimb",
    "type": "SPELL",
    "name": "Spider Climb",
    "description": "Ascend even the most sheer wall with ease as you cling to surfaces.",
    "valid_targets": [ "self" ],
    "spell_class": "MAGUS",
    "flags": [ "ENHANCEMENT_SPELL", "CONCENTRATE", "VERBAL", "SOMATIC" ],
    "extra_effects": [ { "id": "eoc_enhancement_setup", "hit_self": true } ],
    "effect": "attack",
    "effect_str": "effect_magus_spiderclimb",
    "shape": "blast",
    "difficulty": 3,
    "max_level": 15,
    "min_duration": 30000,
    "max_duration": 120000,
    "duration_increment": 6000,
    "magic_type": "magiclysm_generic_magic",
    "base_energy_cost": 250,
    "base_casting_time": 250
  },
  {
    "id": "magus_teleport_mark",
    "type": "SPELL",
    "name": "Magus's Mark",
    "description": "Mark a particular patch of ground to allow you to return to it later.",
    "valid_targets": [ "self" ],
    "spell_class": "MAGUS",
    "flags": [ "CONVEYANCE_SPELL", "CONCENTRATE", "VERBAL", "SOMATIC" ],
    "extra_effects": [ { "id": "eoc_conveyance_setup", "hit_self": true } ],
    "effect": "effect_on_condition",
    "effect_str": "EOC_MAGUS_MARK",
    "components": "spell_components_magus_mark",
    "shape": "blast",
    "difficulty": 5,
    "max_level": 10,
    "magic_type": "magiclysm_generic_magic",
    "base_energy_cost": 2000,
    "base_casting_time": 90000
  },
  {
    "type": "effect_on_condition",
    "id": "EOC_MAGUS_MARK",
    "effect": [
      { "u_location_variable": { "u_val": "magus_teleport_mark" }, "min_radius": 0, "max_radius": 0 },
      {
        "u_message": "As you make the gestures and recite the incantation, a brief glow fills your surroundings.",
        "type": "good"
      }
    ]
  },
  {
    "id": "magus_word_of_recall",
    "type": "SPELL",
    "name": "Word of Recall",
    "description": "Immediately return to the place you marked with Magus's Mark, no matter how far away it is.",
    "valid_targets": [ "self" ],
    "spell_class": "MAGUS",
    "flags": [ "CONVEYANCE_SPELL", "VERBAL", "SOMATIC" ],
    "extra_effects": [ { "id": "eoc_conveyance_setup", "hit_self": true } ],
    "effect": "effect_on_condition",
    "effect_str": "EOC_MAGUS_RECALL",
    "components": "spell_components_word_of_recall",
    "shape": "blast",
    "difficulty": 8,
    "max_level": 15,
    "magic_type": "magiclysm_generic_magic",
    "base_energy_cost": 400,
    "base_casting_time": 100
  },
  {
    "id": "EOC_MAGUS_RECALL",
    "type": "effect_on_condition",
    "effect": [
      { "u_message": "You shout out the word of recall and suddenly you are somewhere else.", "type": "good" },
      { "u_teleport": { "u_val": "magus_teleport_mark" } }
    ]
  },
  {
    "id": "magus_stop_attack_shield",
    "type": "SPELL",
    "name": "Mageshield",
    "description": "A simple but powerful spell, Mageshield will render the caster immune to any single attack.  It is indiscriminate: whether hit by an anti-tank missile or the caster stubbing their toe, it will absorb all energy of the attack and then fade.",
    "valid_targets": [ "self" ],
    "spell_class": "MAGUS",
    "flags": [ "CONJURATION_SPELL", "CONCENTRATE", "VERBAL", "SOMATIC" ],
    "extra_effects": [ { "id": "eoc_summon_setup", "hit_self": true } ],
    "effect": "attack",
    "effect_str": "effect_magus_mageshield",
    "shape": "blast",
    "difficulty": 2,
    "max_level": 20,
    "min_duration": 180000,
    "max_duration": 1380000,
    "duration_increment": 60000,
    "magic_type": "magiclysm_generic_magic",
    "base_energy_cost": 200,
    "base_casting_time": 1500
  },
  {
    "type": "effect_on_condition",
    "id": "EOC_MAGUS_STOP_ATTACK_SHIELD",
    "eoc_type": "EVENT",
    "required_event": "character_takes_damage",
    "condition": { "u_has_effect": "effect_magus_mageshield" },
    "effect": [ { "u_lose_effect": "effect_magus_mageshield" } ]
  },
  {
    "id": "magus_far_hand_pull",
    "type": "SPELL",
    "name": "Sorcerer's Hand",
    "description": "Pull a target or set of items to you.",
    "valid_targets": [ "ally", "hostile", "item", "ground" ],
    "spell_class": "MAGUS",
    "flags": [ "EVOCATION_SPELL", "CONCENTRATE", "VERBAL", "SOMATIC", "NO_HANDS" ],
    "extra_effects": [ { "id": "eoc_evocation_setup", "hit_self": true } ],
    "difficulty": 2,
    "max_level": 10,
    "effect": "directed_push",
    "shape": "blast",
    "min_damage": -1,
    "max_damage": -10,
    "damage_increment": -1,
    "min_range": 1,
    "max_range": 10,
    "range_increment": 1,
    "magic_type": "magiclysm_generic_magic",
    "base_energy_cost": 200,
    "final_energy_cost": 50,
    "energy_increment": -10,
    "base_casting_time": 150,
    "final_casting_time": 50,
    "casting_time_increment": -10
  },
  {
    "id": "magus_ranged_increase",
    "type": "SPELL",
    "name": "Arrowflight",
    "description": "A popular military spell since ancient times, Arrowflight increases the range of bows and, as it later turned out, firearms.",
    "valid_targets": [ "self", "ally" ],
    "spell_class": "MAGUS",
    "flags": [ "ENHANCEMENT_SPELL", "CONCENTRATE", "VERBAL", "SOMATIC" ],
    "extra_effects": [ { "id": "eoc_enhancement_setup", "hit_self": true } ],
    "effect": "attack",
    "effect_str": "effect_magus_ranged_increase",
    "shape": "blast",
    "difficulty": 5,
    "max_level": 15,
    "min_range": 1,
    "max_range": 1,
    "min_duration": 36000,
    "max_duration": 576000,
    "duration_increment": 36000,
    "magic_type": "magiclysm_generic_magic",
    "base_energy_cost": 350,
    "base_casting_time": 300
  },
  {
    "id": "magus_diamond_imbuement",
    "type": "SPELL",
    "name": "Diamond Imbuement",
    "description": "Magically infuse a melee weapon with the hardness and resilience of a diamond as well as its industrial cutting capability, making it supremely sharp and durable.  However, like a diamond, any damage the weapon suffers afterwards cannot be repaired.",
    "valid_targets": [ "self" ],
    "spell_class": "MAGUS",
    "flags": [ "ENHANCEMENT_SPELL", "CONCENTRATE", "VERBAL", "NO_HANDS" ],
    "extra_effects": [ { "id": "eoc_channeling_setup", "hit_self": true } ],
    "effect": "effect_on_condition",
    "effect_str": "EOC_MAGUS_DIAMOND_IMBUEMENT",
    "components": "spell_components_diamond_imbuement",
    "shape": "blast",
    "difficulty": 8,
    "max_level": 15,
    "magic_type": "magiclysm_generic_magic",
    "base_energy_cost": 900,
    "base_casting_time": 180000
  },
  {
    "type": "effect_on_condition",
    "id": "EOC_MAGUS_DIAMOND_IMBUEMENT",
    "effect": [
      {
        "u_run_inv_eocs": "manual",
        "search_data": [ { "category": "weapons" } ],
        "true_eocs": [
          {
            "id": "EOC_MAGUS_DIAMOND_IMBUEMENT_ITEM",
            "effect": [ { "npc_set_flag": "DIAMOND" }, { "npc_set_flag": "DURABLE_MELEE" }, { "npc_set_flag": "NO_REPAIR" } ]
          }
        ]
      }
    ]
  },
  {
    "id": "magus_silence",
    "type": "SPELL",
    "name": "Silence",
    "description": "Affect the air around the target and their vocal cords, preventing them from making any noise whatsoever.  This makes them much more stealthy, but they cannot cast any spells requiring speech.",
    "valid_targets": [ "self", "ally", "hostile" ],
    "flags": [ "ENERVATION_SPELL", "SOMATIC", "VERBAL", "NO_LEGS" ],
    "max_level": 15,
    "spell_class": "MAGUS",
    "effect": "attack",
    "effect_str": "effect_magus_silence",
    "extra_effects": [ { "id": "eoc_enervation_setup", "hit_self": true } ],
    "shape": "blast",
    "difficulty": 5,
    "min_duration": 1200,
    "max_duration": 10200,
    "duration_increment": 600,
    "min_range": 3,
    "max_range": 35,
    "range_increment": 1.2,
    "magic_type": "magiclysm_generic_magic",
    "base_casting_time": 150,
    "base_energy_cost": 350
  },
  {
    "id": "magus_light_target",
    "type": "SPELL",
    "name": "Faerie Fire",
    "description": "Cause the air around the target to glow slightly, revealing their location and making it slightly harder for them to dodge attacks.",
    "valid_targets": [ "ally", "hostile" ],
    "flags": [ "ENERVATION_SPELL", "SOMATIC", "VERBAL", "NO_LEGS" ],
    "max_level": 20,
    "spell_class": "MAGUS",
    "effect": "attack",
    "effect_str": "effect_magus_faerie_fire",
    "extra_effects": [ { "id": "eoc_enervation_setup", "hit_self": true } ],
    "shape": "blast",
    "difficulty": 2,
    "min_duration": 1500,
    "max_duration": 30000,
    "duration_increment": 1500,
    "min_range": 3,
    "max_range": 25,
    "range_increment": 1.1,
    "min_aoe": 0,
    "max_aoe": 1,
    "aoe_increment": 0.05,
    "magic_type": "magiclysm_generic_magic",
    "base_casting_time": 100,
    "base_energy_cost": 75
  },
  {
    "id": "magus_permanent_light",
    "type": "SPELL",
    "name": "Imperishable Light",
    "description": "Enchant the air in a location to glow, producing a orb of soft light.  While not particularly bright, the light will last years if you're not lucky and millennia if you are.",
    "valid_targets": [ "ground" ],
    "effect": "ter_transform",
    "effect_str": "ter_magus_permanent_light",
    "shape": "blast",
    "flags": [ "CONJURATION_SPELL", "CONCENTRATE", "SOMATIC", "VERBAL" ],
    "components": "spell_components_magus_permanent_light",
    "max_level": 15,
    "spell_class": "MAGUS",
    "magic_type": "magiclysm_generic_magic",
    "difficulty": 8,
    "min_range": 1,
    "max_range": 1,
    "base_casting_time": 180000,
    "base_energy_cost": 2500,
    "final_energy_cost": 1500,
    "energy_increment": -75,
    "extra_effects": [ { "id": "eoc_summon_setup", "hit_self": true } ]
  },
  {
    "id": "magus_cannot_move_attack_or_damage_target",
    "type": "SPELL",
    "name": "Adamantine Gaol",
    "description": "Create an impenetrable shell of force around the target, preventing them from moving or acting for the spell's duration.  The shell works in two directions and the target is also immune to all harm.\n\nAdamantine Gaol <color_yellow>cannot be dispelled</color>.",
    "valid_targets": [ "ally", "hostile", "self" ],
    "flags": [ "EVOCATION_SPELL", "VERBAL", "SOMATIC" ],
    "extra_effects": [ { "id": "eoc_evocation_setup", "hit_self": true } ],
    "effect": "attack",
    "effect_str": "effect_magus_cannot_move_attack_or_damage_target",
    "shape": "blast",
    "spell_class": "MAGUS",
    "magic_type": "magiclysm_generic_magic",
    "difficulty": 10,
    "base_casting_time": 75,
    "base_energy_cost": 750,
    "max_level": 20,
    "min_range": 5,
    "max_range": 30,
    "range_increment": 1.5,
    "min_duration": 600,
    "max_duration": 2500,
    "duration_increment": 100
  },
  {
    "id": "magus_push_nearby_enemies_back",
    "type": "SPELL",
    "name": "Repulsion Wave",
    "description": "Unleash a wave of force, hurling all nearby targets away from you.  Heavier targets are harder to affect.",
    "valid_targets": [ "ally", "hostile" ],
    "flags": [ "EVOCATION_SPELL", "VERBAL", "SOMATIC" ],
    "extra_effects": [ { "id": "eoc_evocation_setup", "hit_self": true } ],
    "effect": "effect_on_condition",
    "effect_str": "EOC_MAGUS_PUSH_NEARBY_ENEMIES_BACK",
    "shape": "blast",
    "spell_class": "MAGUS",
    "magic_type": "magiclysm_generic_magic",
    "difficulty": 5,
    "base_casting_time": 75,
    "base_energy_cost": 350,
    "max_level": 20,
    "min_aoe": 1,
    "max_aoe": 3,
    "aoe_increment": 0.2
  },
  {
    "type": "effect_on_condition",
    "id": "EOC_MAGUS_PUSH_NEARBY_ENEMIES_BACK",
    "condition": "has_alpha",
    "effect": [
      { "npc_location_variable": { "context_val": "player_position" } },
      { "math": [ "_push_nearby_enemies_power_level = n_spell_level('magus_push_nearby_enemies_back')" ] },
      { "math": [ "_telekinesis_weight_ratio = 55" ] },
      {
        "math": [
          "_weight_ratio",
          "=",
          "( (_push_nearby_enemies_power_level * _telekinesis_weight_ratio) + (_telekinesis_weight_ratio / 2) ) / (u_weight() / 1000000)"
        ]
      },
      { "math": [ "_telekinesis_shove_spell_level = clamp( ( (_weight_ratio - 1) * 1.5), 0, 20)" ] },
      {
        "if": { "x_in_y_chance": { "x": { "math": [ "_weight_ratio * 1000" ] }, "y": 1000 } },
        "then": [ { "u_add_effect": "downed", "duration": 2 } ]
      },
      {
        "u_knockback": { "math": [ "_telekinesis_shove_spell_level" ] },
        "stun": 2,
        "dam_mult": { "math": [ "1 + (_telekinesis_shove_spell_level * 0.4)" ] },
        "direction_var": { "context_val": "player_position" }
      }
    ]
  }
]
