[
  {
    "id": "stonefist",
    "type": "SPELL",
    "name": "Stonefist",
    "description": "Encases your arms and hands in a sheath of magical stone, you can punch and defend yourself with it in melee combat.",
    "valid_targets": [ "self" ],
    "flags": [ "SOMATIC", "LOUD" ],
    "min_damage": 1,
    "max_damage": 1,
    "effect": "spawn_item",
    "effect_str": "stonefist",
    "shape": "blast",
    "spell_class": "EARTHSHAPER",
    "energy_source": "MANA",
    "difficulty": 2,
    "max_level": 15,
    "base_casting_time": 200,
    "base_energy_cost": 100,
    "min_duration": 24000,
    "max_duration": 360000,
    "duration_increment": 24000,
    "learn_spells": { "stonefist_plus": 15 }
  },
  {
    "id": "stonefist_plus",
    "type": "SPELL",
    "name": "Improved Stonefist",
    "description": "Encases your arms and hands in a sheath of magical stone, you can punch and defend yourself with it in melee combat.  Now you know this spell like the back of your hand, and start to design your own version.",
    "valid_targets": [ "self" ],
    "flags": [ "SOMATIC" ],
    "min_damage": 1,
    "max_damage": 1,
    "effect": "spawn_item",
    "effect_str": "stonefist",
    "shape": "blast",
    "spell_class": "EARTHSHAPER",
    "energy_source": "MANA",
    "difficulty": 2,
    "max_level": 25,
    "base_casting_time": 200,
    "final_casting_time": 50,
    "casting_time_increment": -6,
    "base_energy_cost": 100,
    "final_energy_cost": 50,
    "energy_increment": -2,
    "min_duration": 360000,
    "max_duration": 2160000,
    "duration_increment": 72000
  },
  {
    "id": "seismic_stomp",
    "type": "SPELL",
    "name": "Seismic Stomp",
    "description": "Focusing mana into your leg, you stomp your foot and send out a shockwave, knocking enemies around you onto the ground.",
    "effect": "attack",
    "effect_str": "downed",
    "shape": "blast",
    "valid_targets": [ "hostile", "ground", "none" ],
    "flags": [ "SOMATIC", "LOUD", "NO_PROJECTILE" ],
    "max_level": 10,
    "min_damage": 2,
    "max_damage": 10,
    "damage_increment": 0.8,
    "min_aoe": 3,
    "max_aoe": 12,
    "aoe_increment": 1,
    "min_duration": 1000,
    "max_duration": 6000,
    "duration_increment": 500,
    "spell_class": "EARTHSHAPER",
    "base_casting_time": 100,
    "base_energy_cost": 250,
    "energy_source": "MANA",
    "difficulty": 2,
    "damage_type": "bash"
  },
  {
    "id": "recover_stamina",
    "type": "SPELL",
    "name": "Stone's Endurance",
    "description": "You focus on the stones beneath you and draw from their agelessness.  Your mana is converted to stamina.",
    "effect": "recover_energy",
    "effect_str": "STAMINA",
    "shape": "blast",
    "valid_targets": [ "self" ],
    "flags": [ "NO_HANDS", "CONCENTRATE", "SILENT" ],
    "min_damage": 1500,
    "max_damage": 10000,
    "damage_increment": 750,
    "max_level": 12,
    "spell_class": "EARTHSHAPER",
    "base_casting_time": 500,
    "final_casting_time": 300,
    "casting_time_increment": -17,
    "energy_source": "MANA",
    "base_energy_cost": 150,
    "energy_increment": 75,
    "final_energy_cost": 1000,
    "difficulty": 5
  },
  {
    "id": "eshaper_shardspray",
    "type": "SPELL",
    "name": "Shardspray",
    "description": "This spell projects a wide spray of sharp metal shards, cutting into your foes and friends alike.",
    "valid_targets": [ "hostile", "ground", "ally" ],
    "flags": [ "SOMATIC", "LOUD", "NO_HANDS" ],
    "components": "spell_components_shardspray",
    "effect": "attack",
    "shape": "cone",
    "spell_class": "EARTHSHAPER",
    "energy_source": "MANA",
    "difficulty": 3,
    "base_casting_time": 100,
    "base_energy_cost": 100,
    "max_level": 20,
    "min_damage": 30,
    "max_damage": 80,
    "damage_increment": 2.5,
    "damage_type": "cut",
    "min_aoe": 25,
    "max_aoe": 60,
    "aoe_increment": 5,
    "min_range": 3,
    "max_range": 10,
    "range_increment": 0.5,
    "min_pierce": 0,
    "max_pierce": 5,
    "pierce_increment": 0.4
  },
  {
    "id": "eshaper_piercing_bolt",
    "type": "SPELL",
    "name": "Piercing Bolt",
    "description": "This spell projects a piercing rod of conjured iron at those that dare oppose you.",
    "valid_targets": [ "hostile" ],
    "flags": [ "SOMATIC", "LOUD" ],
    "effect": "attack",
    "shape": "blast",
    "spell_class": "EARTHSHAPER",
    "energy_source": "MANA",
    "base_casting_time": 100,
    "base_energy_cost": 115,
    "difficulty": 2,
    "max_level": 20,
    "min_damage": 20,
    "max_damage": 50,
    "damage_increment": 3,
    "damage_type": "stab",
    "min_range": 8,
    "max_range": 26,
    "range_increment": 1.5
  },
  {
    "id": "eshaper_shardstorm",
    "type": "SPELL",
    "name": "Shardstorm",
    "description": "Creates an omnidirectional spray of razor sharp metal shards all around you.",
    "valid_targets": [ "hostile", "ally", "ground" ],
    "flags": [ "SOMATIC", "LOUD" ],
    "min_damage": 20,
    "max_damage": 60,
    "damage_increment": 2.0,
    "damage_type": "cut",
    "min_aoe": 1,
    "max_aoe": 6,
    "aoe_increment": 0.25,
    "base_energy_cost": 200,
    "spell_class": "EARTHSHAPER",
    "difficulty": 4,
    "max_level": 20,
    "base_casting_time": 100,
    "energy_source": "MANA",
    "shape": "blast",
    "effect": "attack"
  },
  {
    "id": "eshaper_rockbolt",
    "type": "SPELL",
    "name": "Rockbolt",
    "description": "Fires a conjured stone projectile at high velocity.",
    "valid_targets": [ "hostile", "ally" ],
    "flags": [ "SOMATIC", "LOUD" ],
    "min_damage": 5,
    "damage_increment": 1.5,
    "damage_type": "bash",
    "max_damage": 26,
    "min_range": 5,
    "range_increment": 0.5,
    "max_range": 15,
    "base_energy_cost": 50,
    "spell_class": "EARTHSHAPER",
    "difficulty": 1,
    "max_level": 20,
    "base_casting_time": 100,
    "energy_source": "MANA",
    "shape": "blast",
    "effect": "attack"
  },
  {
    "id": "move_earth",
    "type": "SPELL",
    "name": "Move Earth",
    "description": "Your essence flows around you, and the earth follows.",
    "valid_targets": [ "hostile", "ally", "ground", "self" ],
    "flags": [ "SOMATIC", "LOUD", "NO_PROJECTILE" ],
    "min_aoe": 1,
    "max_aoe": 2,
    "min_damage": 100,
    "max_damage": 1,
    "damage_increment": -5,
    "aoe_increment": 0.25,
    "base_energy_cost": 200,
    "spell_class": "EARTHSHAPER",
    "difficulty": 4,
    "max_level": 20,
    "min_range": 5,
    "max_range": 5,
    "base_casting_time": 1200,
    "final_casting_time": 200,
    "casting_time_increment": -50,
    "energy_source": "MANA",
    "shape": "blast",
    "effect": "ter_transform",
    "effect_str": "move_earth"
  },
  {
    "id": "create_rune_earthshaper",
    "type": "SPELL",
    "name": "Earthshaper Rune",
    "description": "This ritual creates a small pebble attuned to Earthshapers.  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_earthshaper",
    "shape": "blast",
    "base_casting_time": 5000,
    "base_energy_cost": 5,
    "min_duration": 1,
    "max_duration": 2,
    "duration_increment": 1,
    "difficulty": 0,
    "max_level": 0,
    "spell_class": "EARTHSHAPER",
    "energy_source": "MANA",
    "flags": [ "PERMANENT", "NO_LEGS", "CONCENTRATE" ]
  },
  {
    "id": "clairvoyance",
    "type": "SPELL",
    "name": "Clairvoyance",
    "description": "You close your eyes and the earth surrenders its secrets to you.",
    "effect": "attack",
    "shape": "blast",
    "valid_targets": [ "ally", "hostile", "ground" ],
    "flags": [ "SOMATIC", "VERBAL", "IGNORE_WALLS", "NO_PROJECTILE" ],
    "max_level": 20,
    "min_aoe": 4,
    "max_aoe": 13,
    "aoe_increment": 0.5,
    "spell_class": "EARTHSHAPER",
    "base_casting_time": 350,
    "base_energy_cost": 750,
    "energy_source": "MANA",
    "difficulty": 4,
    "field_id": "fd_clairvoyant",
    "min_field_intensity": 1,
    "max_field_intensity": 1
  },
  {
    "id": "earthshaper_stoneskin",
    "type": "SPELL",
    "name": "Stoneskin",
    "description": "Envelops your entire body in armor formed from living rock, encumbering yet protective.",
    "valid_targets": [ "self" ],
    "effect": "spawn_item",
    "effect_str": "aura_stoneskin",
    "shape": "blast",
    "flags": [ "SOMATIC", "LOUD" ],
    "spell_class": "EARTHSHAPER",
    "energy_source": "MANA",
    "difficulty": 4,
    "base_casting_time": 300,
    "base_energy_cost": 300,
    "max_level": 15,
    "min_damage": 1,
    "max_damage": 1,
    "min_duration": 24000,
    "max_duration": 360000,
    "duration_increment": 24000,
    "learn_spells": { "earthshaper_stoneskin_plus": 15 }
  },
  {
    "id": "earthshaper_stoneskin_plus",
    "type": "SPELL",
    "name": "Improved Stoneskin",
    "description": "Envelops your entire body in armor formed from living rock, encumbering yet protective.  Now you know this spell like the back of your hand, and start to design your own version.",
    "valid_targets": [ "self" ],
    "effect": "spawn_item",
    "effect_str": "aura_stoneskin",
    "shape": "blast",
    "flags": [ "SOMATIC", "LOUD" ],
    "spell_class": "EARTHSHAPER",
    "energy_source": "MANA",
    "difficulty": 6,
    "base_casting_time": 300,
    "final_casting_time": 100,
    "casting_time_increment": -8,
    "base_energy_cost": 300,
    "final_energy_cost": 100,
    "energy_increment": -8,
    "max_level": 25,
    "min_damage": 1,
    "max_damage": 1,
    "min_duration": 360000,
    "max_duration": 2160000,
    "duration_increment": 72000
  },
  {
    "id": "earthshaper_pillar",
    "type": "SPELL",
    "name": "Pillar of Stone",
    "description": "Drawing upon the surrounding earth, you form a pillar of solid rock.  Experience will make the task easier, and less disruptive to the surrounding area.",
    "valid_targets": [ "ground" ],
    "effect": "ter_transform",
    "effect_str": "earthshaper_pillar",
    "shape": "blast",
    "extra_effects": [ { "id": "earthshaper_pillar_side_effect" } ],
    "flags": [ "SOMATIC", "LOUD", "NO_PROJECTILE" ],
    "spell_class": "EARTHSHAPER",
    "energy_source": "MANA",
    "difficulty": 3,
    "base_casting_time": 30000,
    "final_casting_time": 6000,
    "casting_time_increment": -2400,
    "base_energy_cost": 500,
    "max_level": 10,
    "min_range": 3,
    "max_range": 6,
    "range_increment": 0.3
  },
  {
    "id": "earthshaper_pillar_side_effect",
    "type": "SPELL",
    "name": "Pillar Side Effect",
    "description": "Bash effect that follows, levels reduce damage and AoE.",
    "valid_targets": [ "ground" ],
    "effect": "bash",
    "shape": "blast",
    "flags": [ "IGNORE_WALLS", "SILENT", "NO_PROJECTILE" ],
    "max_level": 10,
    "min_damage": 80,
    "max_damage": 20,
    "damage_increment": -6,
    "min_aoe": 6,
    "max_aoe": 1,
    "aoe_increment": -0.5
  },
  {
    "id": "pertifying_touch",
    "type": "SPELL",
    "name": "Petrifying Touch",
    "description": "Your hands tries to transform the body of your enemy into a pure stone.  The effect is temporary, but it can deal significant damage.",
    "valid_targets": [ "hostile" ],
    "flags": [ "NO_PROJECTILE", "SILENT", "NO_HANDS" ],
    "effect": "attack",
    "shape": "blast",
    "damage_type": "stab",
    "min_damage": 10,
    "damage_increment": 2,
    "max_damage": 45,
    "min_range": 1,
    "max_range": 1,
    "base_energy_cost": 175,
    "final_energy_cost": 75,
    "energy_increment": -5,
    "spell_class": "EARTHSHAPER",
    "difficulty": 7,
    "max_level": 20,
    "base_casting_time": 160,
    "final_casting_time": 40,
    "casting_time_increment": -6,
    "extra_effects": [ { "id": "pertifying_touch_moves" } ],
    "energy_source": "MANA"
  },
  {
    "id": "pertifying_touch_moves",
    "type": "SPELL",
    "name": "Petrifying Touch Moves Removing",
    "description": "Delete some amount of moves from monster, and inflict DoT.  You can see it only in debug mode.",
    "valid_targets": [ "hostile" ],
    "flags": [ "SILENT", "NO_EXPLOSION_SFX" ],
    "effect": "mod_moves",
    "shape": "blast",
    "min_damage": -1000,
    "max_damage": -1,
    "damage_increment": 50,
    "min_dot": 0,
    "max_dot": 10,
    "dot_increment": 0.5,
    "max_level": 20
  },
  {
    "id": "reactive_armor",
    "type": "SPELL",
    "name": "Reactive Armour",
    "description": "Explode your stone skin, to deal massive damage to all enemies around.",
    "effect": "attack",
    "effect_str": "downed",
    "shape": "blast",
    "components": "spell_components_reactive_armor",
    "valid_targets": [ "hostile", "ground" ],
    "flags": [ "SOMATIC", "LOUD", "NO_HANDS", "RANDOM_DURATION" ],
    "max_level": 20,
    "min_damage": 20,
    "max_damage": 200,
    "damage_increment": 9,
    "min_aoe": 2,
    "max_aoe": 12,
    "aoe_increment": 0.5,
    "min_duration": 100,
    "max_duration": 600,
    "spell_class": "EARTHSHAPER",
    "base_casting_time": 160,
    "final_casting_time": 40,
    "casting_time_increment": -6,
    "base_energy_cost": 350,
    "final_energy_cost": 250,
    "energy_increment": -5,
    "energy_source": "MANA",
    "difficulty": 5,
    "damage_type": "stab"
  },
  {
    "id": "eshaper_impalement",
    "type": "SPELL",
    "name": "Impalement",
    "description": "Summon a stone spikes underground, that penetrate your enemies, and nail them for a while.",
    "//": "Would be great to replace the extra effect with some custom field, that do not allow enemies to pass it by, and stops the one who is inside, dealing some damage",
    "effect": "attack",
    "shape": "blast",
    "valid_targets": [ "hostile", "ground" ],
    "flags": [ "SOMATIC", "VERBAL", "NO_PROJECTILE", "NO_LEGS" ],
    "max_level": 20,
    "min_damage": 16,
    "max_damage": 106,
    "damage_increment": 5,
    "min_aoe": 1,
    "max_aoe": 7,
    "aoe_increment": 0.3,
    "min_range": 6,
    "max_range": 20,
    "range_increment": 1.0,
    "spell_class": "EARTHSHAPER",
    "base_casting_time": 200,
    "base_energy_cost": 300,
    "energy_source": "MANA",
    "difficulty": 5,
    "damage_type": "stab",
    "extra_effects": [ { "id": "eshaper_impalement_moves" } ]
  },
  {
    "id": "eshaper_impalement_moves",
    "type": "SPELL",
    "name": "Impalement Moves Removing",
    "description": "Delete some random amount of moves from monster.  You can see it only in debug mode.",
    "valid_targets": [ "hostile" ],
    "flags": [ "SILENT", "RANDOM_DAMAGE", "NO_PROJECTILE", "NO_EXPLOSION_SFX" ],
    "effect": "mod_moves",
    "shape": "blast",
    "max_level": 20,
    "min_aoe": 1,
    "max_aoe": 7,
    "aoe_increment": 0.3,
    "min_damage": -1000,
    "max_damage": -1
  },
  {
    "id": "eshaper_spawn_tools",
    "type": "SPELL",
    "name": "Utility Molding",
    "description": "Shape the basic working tools, using your own magic abilities and earth nearby.  Activate to change the shape of a tool.",
    "valid_targets": [ "self" ],
    "flags": [ "SOMATIC", "LOUD" ],
    "min_damage": 1,
    "max_damage": 1,
    "effect": "effect_on_condition",
    "effect_str": "EOC_EARTHSHAPER_UTILITY_MOLDING",
    "shape": "blast",
    "spell_class": "EARTHSHAPER",
    "energy_source": "MANA",
    "difficulty": 2,
    "max_level": 14,
    "base_casting_time": 360000,
    "final_casting_time": 90000,
    "casting_time_increment": -18000,
    "base_energy_cost": 600,
    "final_energy_cost": 200,
    "energy_increment": -30,
    "min_duration": 576000,
    "max_duration": 8640000,
    "duration_increment": 576000
  },
  {
    "type": "effect_on_condition",
    "id": "EOC_EARTHSHAPER_UTILITY_MOLDING",
    "effect": [
      {
        "run_eoc_selector": [
          "EOC_EARTHSHAPER_UTILITY_MOLDING_HAMMER",
          "EOC_EARTHSHAPER_UTILITY_MOLDING_PICKAXE",
          "EOC_EARTHSHAPER_UTILITY_MOLDING_AXE",
          "EOC_EARTHSHAPER_UTILITY_MOLDING_KNIFE",
          "EOC_EARTHSHAPER_UTILITY_MOLDING_SHOVEL"
        ],
        "names": [ "Summon Hammer", "Summon Pickaxe", "Summon Axe", "Summon Knife", "Summon Shovel" ],
        "keys": [ "1", "2", "3", "4", "5" ],
        "descriptions": [
          "Transform the living earth into a hammer.",
          "Transform the living earth into a pickaxe.",
          "Transform the living earth into an axe.",
          "Transform the living earth into a knife.",
          "Transform the living earth into a shovel."
        ]
      }
    ]
  },
  {
    "type": "effect_on_condition",
    "id": "EOC_EARTHSHAPER_UTILITY_MOLDING_HAMMER",
    "effect": [ { "u_cast_spell": { "id": "eshaper_spawn_hammer" } } ]
  },
  {
    "type": "effect_on_condition",
    "id": "EOC_EARTHSHAPER_UTILITY_MOLDING_PICKAXE",
    "effect": [ { "u_cast_spell": { "id": "eshaper_spawn_pickaxe" } } ]
  },
  {
    "type": "effect_on_condition",
    "id": "EOC_EARTHSHAPER_UTILITY_MOLDING_AXE",
    "effect": [ { "u_cast_spell": { "id": "eshaper_spawn_axe" } } ]
  },
  {
    "type": "effect_on_condition",
    "id": "EOC_EARTHSHAPER_UTILITY_MOLDING_KNIFE",
    "effect": [ { "u_cast_spell": { "id": "eshaper_spawn_knife" } } ]
  },
  {
    "type": "effect_on_condition",
    "id": "EOC_EARTHSHAPER_UTILITY_MOLDING_SHOVEL",
    "effect": [ { "u_cast_spell": { "id": "eshaper_spawn_shovel" } } ]
  },
  {
    "id": "eshaper_spawn_hammer",
    "type": "SPELL",
    "name": "Utility Molding (Hammer)",
    "description": "Spawn the Utility molding hammer.  It's a bug if you have this spell directly.",
    "valid_targets": [ "self" ],
    "flags": [ "SILENT", "NO_EXPLOSION_SFX" ],
    "min_damage": 1,
    "max_damage": 1,
    "effect": "spawn_item",
    "effect_str": "eshaper_hammer",
    "shape": "blast",
    "min_duration": { "math": [ "( (u_spell_level('eshaper_spawn_tools') * 576000) + 576000)" ] },
    "max_duration": { "math": [ "( (u_spell_level('eshaper_spawn_tools') * 576000) + 576000)" ] }
  },
  {
    "id": "eshaper_spawn_pickaxe",
    "type": "SPELL",
    "name": "Utility Molding (Pickaxe)",
    "description": "Spawn the Utility molding pickaxe.  It's a bug if you have this spell directly.",
    "valid_targets": [ "self" ],
    "flags": [ "SILENT", "NO_EXPLOSION_SFX" ],
    "min_damage": 1,
    "max_damage": 1,
    "effect": "spawn_item",
    "effect_str": "eshaper_pickaxe",
    "shape": "blast",
    "min_duration": { "math": [ "( (u_spell_level('eshaper_spawn_tools') * 576000) + 576000)" ] },
    "max_duration": { "math": [ "( (u_spell_level('eshaper_spawn_tools') * 576000) + 576000)" ] }
  },
  {
    "id": "eshaper_spawn_axe",
    "type": "SPELL",
    "name": "Utility Molding (Axe)",
    "description": "Spawn the Utility molding axe.  It's a bug if you have this spell directly.",
    "valid_targets": [ "self" ],
    "flags": [ "SILENT", "NO_EXPLOSION_SFX" ],
    "min_damage": 1,
    "max_damage": 1,
    "effect": "spawn_item",
    "effect_str": "eshaper_ax",
    "shape": "blast",
    "min_duration": { "math": [ "( (u_spell_level('eshaper_spawn_tools') * 576000) + 576000)" ] },
    "max_duration": { "math": [ "( (u_spell_level('eshaper_spawn_tools') * 576000) + 576000)" ] }
  },
  {
    "id": "eshaper_spawn_knife",
    "type": "SPELL",
    "name": "Utility Molding (Knife)",
    "description": "Spawn the Utility molding knife.  It's a bug if you have this spell directly.",
    "valid_targets": [ "self" ],
    "flags": [ "SILENT", "NO_EXPLOSION_SFX" ],
    "min_damage": 1,
    "max_damage": 1,
    "effect": "spawn_item",
    "effect_str": "eshaper_knife",
    "shape": "blast",
    "min_duration": { "math": [ "( (u_spell_level('eshaper_spawn_tools') * 576000) + 576000)" ] },
    "max_duration": { "math": [ "( (u_spell_level('eshaper_spawn_tools') * 576000) + 576000)" ] }
  },
  {
    "id": "eshaper_spawn_shovel",
    "type": "SPELL",
    "name": "Utility Molding (Shovel)",
    "description": "Spawn the Utility molding shovel.  It's a bug if you have this spell directly.",
    "valid_targets": [ "self" ],
    "flags": [ "SILENT", "NO_EXPLOSION_SFX" ],
    "min_damage": 1,
    "max_damage": 1,
    "effect": "spawn_item",
    "effect_str": "eshaper_shovel",
    "shape": "blast",
    "min_duration": { "math": [ "( (u_spell_level('eshaper_spawn_tools') * 576000) + 576000)" ] },
    "max_duration": { "math": [ "( (u_spell_level('eshaper_spawn_tools') * 576000) + 576000)" ] }
  },
  {
    "id": "eshaper_melee_damage",
    "type": "SPELL",
    "name": "Weighting",
    "description": "Fill yourself with the power of Earth, and make each your attacks as devastating as an earthquake.",
    "valid_targets": [ "self" ],
    "effect": "attack",
    "effect_str": "eshaper_melee_damage",
    "shape": "blast",
    "flags": [ "NO_LEGS", "SILENT", "NO_EXPLOSION_SFX" ],
    "spell_class": "EARTHSHAPER",
    "energy_source": "MANA",
    "difficulty": 6,
    "base_casting_time": 1500,
    "final_casting_time": 500,
    "casting_time_increment": -40,
    "base_energy_cost": 500,
    "final_energy_cost": 200,
    "energy_increment": -12,
    "max_level": 25,
    "min_duration": 14400,
    "max_duration": 360000,
    "duration_increment": 14400
  },
  {
    "id": "eshaper_crystal_wrap",
    "type": "SPELL",
    "name": "Crystal Wrapping",
    "description": "You cover your body with a layer of small, razor-sharp crystals.  It makes monsters that attack you take some damage in return, and gives you some additional cut damage in melee.",
    "valid_targets": [ "self" ],
    "effect": "attack",
    "effect_str": "eshaper_crystal_wrap",
    "shape": "blast",
    "flags": [ "NO_LEGS", "SILENT", "NO_EXPLOSION_SFX" ],
    "spell_class": "EARTHSHAPER",
    "energy_source": "MANA",
    "difficulty": 6,
    "base_casting_time": 1500,
    "final_casting_time": 500,
    "casting_time_increment": -40,
    "base_energy_cost": 500,
    "final_energy_cost": 200,
    "energy_increment": -12,
    "max_level": 25,
    "min_duration": 14400,
    "max_duration": 360000,
    "duration_increment": 14400
  },
  {
    "type": "SPELL",
    "id": "eshaper_crystal_wrap_damage",
    "name": "Crystal Wrapping Damage",
    "description": "Return some damage to attacker.  You can see it only in debug mode.",
    "effect": "attack",
    "shape": "blast",
    "flags": [ "SILENT", "RANDOM_DAMAGE", "NO_EXPLOSION_SFX" ],
    "min_damage": 13,
    "max_damage": 6,
    "valid_targets": [ "hostile" ],
    "damage_type": "cut",
    "min_range": 1,
    "max_range": 1
  },
  {
    "id": "shape_of_dust",
    "type": "SPELL",
    "name": "Shape of Dust",
    "description": "Hide yourself within sand-filled winds.  It's harder to hit you, and monsters can't spot you.",
    "//": "Fuck its broken. I thought you can make monster hard to see you, so you will be able to hide from them beyond the sand, but of course invis make monsters even more dumb, and they start to stoically ignore your existence.",
    "valid_targets": [ "self" ],
    "flags": [ "SOMATIC", "LOUD" ],
    "effect": "attack",
    "effect_str": "effect_shape_of_dust",
    "shape": "blast",
    "spell_class": "EARTHSHAPER",
    "energy_source": "MANA",
    "difficulty": 7,
    "max_level": 25,
    "base_casting_time": 500,
    "base_energy_cost": 350,
    "min_duration": 2400,
    "max_duration": 60000,
    "duration_increment": 2400
  },
  {
    "id": "summon_eshaper_golem",
    "type": "SPELL",
    "name": "Summon Earthshaper's Golem",
    "description": "Shape a strong golem out of stone.  It may help for a while, but you haven't enough energy to support it forever.",
    "valid_targets": [ "ground" ],
    "min_damage": 1,
    "max_damage": 1,
    "max_level": 30,
    "difficulty": 6,
    "spell_class": "EARTHSHAPER",
    "effect": "summon",
    "effect_str": "mon_eshaper_golem",
    "shape": "blast",
    "energy_source": "MANA",
    "base_energy_cost": 750,
    "final_energy_cost": 400,
    "energy_increment": -12,
    "base_casting_time": 360000,
    "final_casting_time": 180000,
    "casting_time_increment": -6000,
    "min_aoe": 1,
    "max_aoe": 1,
    "flags": [ "SOMATIC", "VERBAL", "CONCENTRATE" ],
    "min_duration": 12000,
    "max_duration": 360000,
    "duration_increment": 12000
  },
  {
    "id": "earthshaper_boulder",
    "type": "SPELL",
    "name": "Summon Boulder",
    "description": "Pull the smooth rock underground, using your forces of earth shaping.  You can use it as a table, or as a primitive anvil.",
    "valid_targets": [ "ground" ],
    "effect": "ter_transform",
    "effect_str": "earthshaper_boulder",
    "shape": "blast",
    "flags": [ "SOMATIC", "NO_PROJECTILE" ],
    "spell_class": "EARTHSHAPER",
    "energy_source": "MANA",
    "difficulty": 3,
    "base_casting_time": 360000,
    "final_casting_time": 120000,
    "casting_time_increment": -24000,
    "base_energy_cost": 500,
    "max_level": 10,
    "min_range": 1,
    "max_range": 1
  },
  {
    "id": "earthshaper_reveal_world_map",
    "type": "SPELL",
    "name": "Reading the Earthbones",
    "description": "You extend your senses into the ground, becoming aware of every hill and valley within a large area.  It will only work when in contact with the earth.",
    "valid_targets": [ "self" ],
    "flags": [ "NO_HANDS", "CONCENTRATE", "VERBAL" ],
    "effect": "effect_on_condition",
    "effect_str": "EOC_EARTHSHAPER_MAP",
    "shape": "blast",
    "max_level": 15,
    "spell_class": "EARTHSHAPER",
    "base_casting_time": 6000,
    "energy_source": "MANA",
    "base_energy_cost": 1000,
    "difficulty": 8
  },
  {
    "type": "effect_on_condition",
    "id": "EOC_EARTHSHAPER_MAP",
    "condition": { "compare_int": [ { "u_val": "pos_z" }, "<=", { "const": 0 } ] },
    "effect": [ { "u_cast_spell": { "id": "earthshaper_map_real" } } ],
    "false_effect": [ { "u_message": "Without a direct connection to the living earth, the spell fails." } ]
  },
  {
    "id": "earthshaper_map_real",
    "type": "SPELL",
    "name": "Reading the Earthbones Real Spell",
    "description": "This is the spell that actually fires when you cast Reading the Earthbones.  It's a bug if you have it.",
    "valid_targets": [ "none" ],
    "message": "The secrets of the living earth are revealed to you.",
    "flags": [ "NO_HANDS", "SILENT" ],
    "effect": "map",
    "shape": "blast",
    "max_level": 1,
    "min_aoe": { "math": [ "( 7 + (u_spell_level('earthshaper_reveal_world_map') * 2.2) )" ] }
  },
  {
    "id": "earthshaper_danger_sense",
    "type": "SPELL",
    "name": "Tremorsense",
    "description": "By sensing their movements upon the earth, you can detect nearby sources of danger.  You must maintain a connection to the earth for the spell to function.",
    "valid_targets": [ "self" ],
    "spell_class": "EARTHSHAPER",
    "flags": [ "CONCENTRATE", "SOMATIC", "VERBAL", "NO_EXPLOSION_SFX" ],
    "effect": "effect_on_condition",
    "effect_str": "EOC_EARTHSHAPER_DANGERSENSE",
    "shape": "blast",
    "energy_source": "MANA",
    "difficulty": 3,
    "max_level": 10,
    "base_casting_time": 400,
    "base_energy_cost": 350,
    "min_duration": 30000,
    "max_duration": 300000,
    "duration_increment": 30000
  },
  {
    "type": "effect_on_condition",
    "id": "EOC_EARTHSHAPER_DANGERSENSE",
    "condition": { "math": [ "u_val('pos_z')", "<=", "0" ] },
    "effect": [
      {
        "u_add_effect": "effect_tremorsense",
        "duration": { "math": [ "(u_spell_level('earthshaper_danger_sense') * 30000)" ] }
      }
    ],
    "false_effect": [ { "u_message": "Without a direct connection to the living earth, the spell fails.", "type": "bad" } ]
  },
  {
    "type": "effect_on_condition",
    "id": "EOC_EARTHSHAPER_DANGERSENSE_CHECKER",
    "recurrence": 1,
    "condition": { "and": [ { "math": [ "u_val('pos_z')", ">=", "1" ] }, { "u_has_effect": "effect_tremorsense" } ] },
    "effect": [
      { "u_lose_effect": "effect_tremorsense" },
      {
        "u_message": "As you break your connection to the living earth, your magical senses fade away.",
        "type": "bad"
      }
    ]
  },
  {
    "id": "earthshaper_fortitude_of_stone",
    "type": "SPELL",
    "name": "Stones' Fortitude",
    "description": "Draw on the eternal endurance of the stones, slowing your metabolism and staving off hunger and thirst.  However, while the enchantment is in effect, you will not heal.",
    "flags": [ "CONCENTRATE", "SOMATIC", "VERBAL" ],
    "valid_targets": [ "self" ],
    "spell_class": "EARTHSHAPER",
    "energy_source": "MANA",
    "effect": "attack",
    "effect_str": "earthshaper_fortitude_of_stone",
    "shape": "blast",
    "difficulty": 4,
    "base_casting_time": 500,
    "base_energy_cost": 650,
    "max_level": 20,
    "min_duration": 360000,
    "max_duration": 2160000,
    "duration_increment": 100000
  },
  {
    "id": "earthshaper_turning_of_earth",
    "type": "SPELL",
    "name": "The Turning of the Earth",
    "description": "Ask the earth spirits to prepare the earth for growth and planting.",
    "flags": [ "CONCENTRATE", "SOMATIC", "VERBAL", "LOUD" ],
    "valid_targets": [ "ground" ],
    "max_level": 12,
    "spell_class": "EARTHSHAPER",
    "energy_source": "MANA",
    "shape": "line",
    "difficulty": 2,
    "effect": "ter_transform",
    "effect_str": "earthshaper_turning_earth",
    "base_casting_time": 1500,
    "base_energy_cost": 800,
    "final_energy_cost": 350,
    "energy_increment": -37.5,
    "min_range": 3,
    "max_range": 20,
    "range_increment": 1.2
  },
  {
    "id": "earthshaper_granite_aegis",
    "type": "SPELL",
    "name": "Granite Aegis",
    "description": "In an extremity of danger, summon a hollow shell of rock around yourself.  It lasts only a few moments, but sometimes that's all you need.  You must be standing on the living earth to invoke it.",
    "flags": [ "SOMATIC", "VERBAL" ],
    "valid_targets": [ "self" ],
    "max_level": 10,
    "spell_class": "EARTHSHAPER",
    "energy_source": "MANA",
    "shape": "blast",
    "difficulty": 9,
    "effect": "effect_on_condition",
    "effect_str": "EOC_EARTHSHAPER_GRANITE_AEGIS",
    "base_casting_time": 150,
    "final_casting_time": 100,
    "casting_time_increment": -5,
    "base_energy_cost": 750
  },
  {
    "type": "effect_on_condition",
    "id": "EOC_EARTHSHAPER_GRANITE_AEGIS",
    "condition": {
      "and": [
        {
          "or": [
            { "u_is_on_terrain": "t_rock_floor_no_roof" },
            { "u_is_on_terrain": "t_rock_floor" },
            { "u_is_on_terrain": "t_dirtfloor_no_roof" },
            { "u_is_on_terrain": "t_clay" },
            { "u_is_on_terrain": "t_claymound" },
            { "u_is_on_terrain": "t_claymound_underground" },
            { "u_is_on_terrain": "t_sandmound" },
            { "u_is_on_terrain": "t_dirtmoundfloor" },
            { "u_is_on_terrain": "t_dirt" },
            { "u_is_on_terrain": "t_dirt_underground" },
            { "u_is_on_terrain": "t_forestfloor" },
            { "u_is_on_terrain": "t_grass" },
            { "u_is_on_terrain": "t_grass_tall" },
            { "u_is_on_terrain": "t_grass_dead" },
            { "u_is_on_terrain": "t_grass_white" },
            { "u_is_on_terrain": "t_forestfloor" },
            { "u_is_on_terrain": "t_moss" },
            { "u_is_on_terrain": "t_soil" },
            { "u_is_on_terrain": "t_dirtmound" },
            { "u_is_on_terrain": "t_region_soil" },
            { "u_is_on_terrain": "t_pit_shallow" },
            { "u_is_on_terrain": "t_pit" },
            { "u_is_on_terrain": "t_puddle_underground" },
            { "u_is_on_terrain": "t_mud" },
            { "u_is_on_terrain": "t_mud_underground" },
            { "u_is_on_terrain": "t_concrete_y" },
            { "u_is_on_terrain": "t_concrete" },
            { "u_is_on_terrain": "t_thconc_y_olight" },
            { "u_is_on_terrain": "t_thconc_warning" },
            { "u_is_on_terrain": "t_thconc_y" },
            { "u_is_on_terrain": "t_thconc_r" },
            { "u_is_on_terrain": "t_thconc_floor" },
            { "u_is_on_terrain": "t_strconc_floor" },
            { "u_is_on_terrain": "t_strconc_floor_olight" },
            { "u_is_on_terrain": "t_strconc_floor_no_roof" },
            { "u_is_on_terrain": "t_railroad_rubble" }
          ]
        },
        { "math": [ "u_val('pos_z')", "<=", "0" ] }
      ]
    },
    "effect": [
      {
        "u_location_variable": { "global_val": "earthshaper_granite_aegis_location" },
        "min_radius": 0,
        "max_radius": 0,
        "outdoor_only": false
      },
      {
        "u_transform_radius": 1,
        "ter_furn_transform": "earthshaper_granite_aegis_to_stone",
        "target_var": { "global_val": "earthshaper_granite_aegis_location" }
      },
      {
        "u_transform_radius": 0,
        "ter_furn_transform": "earthshaper_granite_aegis_to_stone_safe",
        "target_var": { "global_val": "earthshaper_granite_aegis_location" },
        "time_in_future": [ "0 seconds", "0 seconds" ]
      },
      {
        "u_transform_radius": 1,
        "ter_furn_transform": "earthshaper_granite_aegis_from_stone",
        "target_var": { "global_val": "earthshaper_granite_aegis_location" },
        "time_in_future": [ "5 seconds", "20 seconds" ]
      }
    ],
    "false_effect": { "u_message": "Without a connection to the living earth or a flat surface of solid rock, the spell fails." }
  }
]
