[
  {
    "type": "enchantment",
    "id": "ench_longsword_holy",
    "has": "WIELD",
    "condition": "ALWAYS",
    "name": { "str": "Magic blade" },
    "description": "The damage done and light emitted by this sword increase with intelligence.",
    "melee_damage_bonus": [
      {
        "type": "light",
        "add": {
          "math": [ "min( ( (u_val('intelligence') * 2) + (u_spell_level('holy_blade') + u_spell_level('holy_blade_plus') ) ),40)" ]
        }
      }
    ],
    "values": [
      {
        "value": "LUMINATION",
        "add": { "math": [ "((u_val('intelligence') * 2) + (u_spell_level('holy_blade') + u_spell_level('holy_blade_plus'))) * 3" ] }
      }
    ]
  },
  {
    "type": "enchantment",
    "id": "ench_armor_spirit",
    "has": "WORN",
    "condition": "ALWAYS",
    "name": { "str": "Magic armor" },
    "description": "This magical armor improves with your intelligence and the spell's level.",
    "incoming_damage_mod": [
      {
        "type": "bash",
        "add": {
          "math": [
            "max( ( ( (u_val('intelligence') * 1.5) + (u_spell_level('spirit_armor') + u_spell_level('spirit_armor_plus')) * 0.5) * -1), -45)"
          ]
        }
      },
      {
        "type": "stab",
        "add": {
          "math": [
            "max( ( ( (u_val('intelligence') * 1.5) + (u_spell_level('spirit_armor') + u_spell_level('spirit_armor_plus')) * 0.5) * -1), -45)"
          ]
        }
      },
      {
        "type": "cut",
        "add": {
          "math": [
            "max( ( ( (u_val('intelligence') * 1.5) + (u_spell_level('spirit_armor') + u_spell_level('spirit_armor_plus')) * 0.5) * -1), -45)"
          ]
        }
      },
      {
        "type": "bullet",
        "add": {
          "math": [
            "max( ( ( (u_val('intelligence') * 1.5) + (u_spell_level('spirit_armor') + u_spell_level('spirit_armor_plus')) * 0.5) * -1), -45)"
          ]
        }
      }
    ],
    "values": [
      {
        "value": "LUMINATION",
        "add": {
          "math": [ "((u_val('intelligence') * 1.5) + (u_spell_level('spirit_armor') + u_spell_level('spirit_armor_plus')) * 0.5) * 3" ]
        }
      }
    ]
  },
  {
    "type": "enchantment",
    "id": "ench_storm_hammer",
    "has": "WIELD",
    "condition": "ALWAYS",
    "name": { "str": "Storm hammer" },
    "description": "A magical hammer whose damage increases with the spell.",
    "melee_damage_bonus": [
      {
        "type": "electric",
        "add": { "math": [ "(5 + (1 * u_spell_level('storm_hammer')) + (1 * u_spell_level('storm_hammer_plus')))" ] }
      }
    ]
  },
  {
    "type": "enchantment",
    "id": "ench_stormglove",
    "has": "WORN",
    "condition": { "not": "u_has_weapon" },
    "name": { "str": "Stormglove" },
    "description": "A coating of lighting on your hand and lower arm.",
    "melee_damage_bonus": [
      {
        "type": "electric",
        "add": { "math": [ "rand(5 + (1 * u_spell_level('stormfist')) + (1 * u_spell_level('stormfist_plus')))" ] }
      }
    ]
  },
  {
    "type": "enchantment",
    "id": "ench_aura_caustic",
    "has": "WORN",
    "condition": "ALWAYS",
    "hit_me_effect": [ { "id": "corrosive_aura_spell" } ],
    "incoming_damage_mod": [
      {
        "type": "acid",
        "add": {
          "math": [ "(-2 - (0.5 * u_spell_level('biomancer_caustic_aura')) - (0.5 * u_spell_level('biomancer_caustic_aura_plus')))" ]
        }
      }
    ],
    "melee_damage_bonus": [
      {
        "type": "acid",
        "add": {
          "math": [ "(1 + (0.25 * u_spell_level('biomancer_caustic_aura')) + (0.25 * u_spell_level('biomancer_caustic_aura_plus')))" ]
        }
      }
    ]
  },
  {
    "type": "enchantment",
    "id": "ench_subzero_talons",
    "has": "WORN",
    "condition": "ALWAYS",
    "name": { "str": "Subzero Talons" },
    "description": "Icy talons to freeze your enemies.",
    "melee_damage_bonus": [ { "type": "cold", "add": { "math": [ "(3 + (0.5 * u_spell_level('summon_subzero_talons')))" ] } } ]
  },
  {
    "type": "enchantment",
    "id": "ench_aura_feral",
    "name": { "str": "Feral Aura" },
    "description": "Unleashing the rage within.",
    "has": "HELD",
    "condition": "ALWAYS",
    "values": [
      { "value": "STRENGTH", "add": { "math": [ "(1 + (u_spell_level('druid_feralform') / 5 ))" ] } },
      { "value": "DEXTERITY", "add": { "math": [ "(1 + (u_spell_level('druid_feralform') / 5 ))" ] } },
      { "value": "INTELLIGENCE", "add": { "math": [ "(-3 + (u_spell_level('druid_feralform') / 7 ))" ] } },
      { "value": "PERCEPTION", "add": { "math": [ "(-3 + (u_spell_level('druid_feralform') / 7 ))" ] } }
    ],
    "mutations": [ "LIGHTFUR", "CLAWS", "ADRENALINE", "CANINE_EARS", "PERSISTENCE_HUNTER", "SNARL", "CARNIVORE", "SMELLY2", "DEFORMED2" ]
  },
  {
    "type": "enchantment",
    "id": "ench_aura_feral_plus",
    "name": { "str": "Enhanced Feral Aura" },
    "description": "Unleashing the rage within.",
    "has": "HELD",
    "condition": "ALWAYS",
    "values": [
      { "value": "STRENGTH", "add": { "math": [ "(3 + (u_spell_level('druid_feralform_plus') / 5 ))" ] } },
      { "value": "DEXTERITY", "add": { "math": [ "(3 + (u_spell_level('druid_feralform_plus') / 5 ))" ] } },
      { "value": "PERCEPTION", "add": { "math": [ "(0 + (u_spell_level('druid_feralform') / 7 ))" ] } }
    ],
    "mutations": [
      "FUR",
      "CLAWS_RAT",
      "ADRENALINE",
      "FANGS",
      "CANINE_EARS",
      "PERSISTENCE_HUNTER",
      "SNARL",
      "CARNIVORE",
      "SMELLY2",
      "DEFORMED3"
    ]
  },
  {
    "type": "enchantment",
    "id": "ench_luck_bone",
    "has": "HELD",
    "condition": "ALWAYS",
    "name": { "str": "Luck Bone" },
    "//": "relic_data is set when the item is created and then never changes, so each luck-bone should have random minor effects.  All deliberately picked so they can't be seen on the character sheet",
    "description": "The spirits within are giving you their blessing.",
    "incoming_damage_mod": [
      { "type": "bash", "add": { "math": [ "rand(3) * -1" ] } },
      { "type": "cut", "add": { "math": [ "rand(3) * -1" ] } },
      { "type": "stab", "add": { "math": [ "rand(3) * -1" ] } },
      { "type": "bullet", "add": { "math": [ "rand(3) * -1" ] } },
      { "type": "acid", "add": { "math": [ "rand(3) * -1" ] } },
      { "type": "electric", "add": { "math": [ "rand(3) * -1" ] } },
      { "type": "heat", "add": { "math": [ "rand(3) * -1" ] } },
      { "type": "cold", "add": { "math": [ "rand(3) * -1" ] } },
      { "type": "biological", "add": { "math": [ "rand(3) * -1" ] } }
    ],
    "values": [
      { "value": "FORCEFIELD", "add": { "math": [ "rand(5) * 0.01" ] } },
      { "value": "EVASION", "add": { "math": [ "rand(5) * 0.01" ] } },
      { "value": "LEARNING_FOCUS", "add": { "math": [ "rand(5)" ] } },
      { "value": "PAIN", "add": { "math": [ "rand(3) * -1" ] } },
      { "value": "REGEN_HP", "multiply": { "math": [ "rand(10) * 0.01" ] } },
      { "value": "REGEN_MANA", "multiply": { "math": [ "rand(10) * 0.01" ] } },
      { "value": "REGEN_STAMINA", "multiply": { "math": [ "rand(10) * 0.01" ] } }
    ]
  },
  {
    "type": "enchantment",
    "id": "ench_technomancer_far_sight_lens",
    "has": "HELD",
    "condition": "ALWAYS",
    "name": { "str": "Enhanced Vision" },
    "description": "Looking through your enchanted lens allows you to see farther than ever.",
    "values": [
      {
        "value": "OVERMAP_SIGHT",
        "add": {
          "math": [ "(5 + (0.5 * u_spell_level('technomancer_far_sight')) + (1 * u_spell_level('technomancer_far_sight_plus')))" ]
        }
      }
    ]
  }
]
