[
  {
    "id": "psionic_drained_spell",
    "type": "SPELL",
    "name": { "str": "Nether-Attunement" },
    "valid_targets": [ "self" ],
    "description": "Applies Nether Attunement to you.",
    "flags": [ "SILENT", "NO_EXPLOSION_SFX", "NO_FAIL" ],
    "message": "",
    "effect": "effect_on_condition",
    "effect_str": "EOC_RAISE_NETHER_ATTUNEMENT",
    "shape": "blast"
  },
  {
    "id": "psionic_drained_difficulty_one",
    "type": "SPELL",
    "name": { "str": "Five Percent Nether Attunement Chance" },
    "valid_targets": [ "self" ],
    "description": "5% chance to gain nether-attunement.",
    "flags": [ "SILENT", "WONDER", "NO_EXPLOSION_SFX" ],
    "message": "",
    "shape": "blast",
    "effect": "noise",
    "min_damage": 1,
    "max_damage": 1,
    "extra_effects": [
      { "id": "death_fakespell" },
      { "id": "death_fakespell" },
      { "id": "death_fakespell" },
      { "id": "death_fakespell" },
      { "id": "death_fakespell" },
      { "id": "death_fakespell" },
      { "id": "death_fakespell" },
      { "id": "death_fakespell" },
      { "id": "death_fakespell" },
      { "id": "death_fakespell" },
      { "id": "death_fakespell" },
      { "id": "death_fakespell" },
      { "id": "death_fakespell" },
      { "id": "death_fakespell" },
      { "id": "death_fakespell" },
      { "id": "death_fakespell" },
      { "id": "death_fakespell" },
      { "id": "death_fakespell" },
      { "id": "death_fakespell" },
      { "id": "psionic_drained_spell", "max_level": 0, "hit_self": true }
    ]
  },
  {
    "id": "psionic_drained_difficulty_two",
    "type": "SPELL",
    "name": { "str": "Six point six Percent Nether Attunement Chance" },
    "valid_targets": [ "self" ],
    "description": "6.6% chance to gain nether-attunement.",
    "flags": [ "SILENT", "WONDER", "NO_EXPLOSION_SFX" ],
    "message": "",
    "shape": "blast",
    "effect": "noise",
    "min_damage": 1,
    "max_damage": 1,
    "extra_effects": [
      { "id": "death_fakespell" },
      { "id": "death_fakespell" },
      { "id": "death_fakespell" },
      { "id": "death_fakespell" },
      { "id": "death_fakespell" },
      { "id": "death_fakespell" },
      { "id": "death_fakespell" },
      { "id": "death_fakespell" },
      { "id": "death_fakespell" },
      { "id": "death_fakespell" },
      { "id": "death_fakespell" },
      { "id": "death_fakespell" },
      { "id": "death_fakespell" },
      { "id": "death_fakespell" },
      { "id": "psionic_drained_spell", "max_level": 0, "hit_self": true }
    ]
  },
  {
    "id": "psionic_drained_difficulty_three",
    "type": "SPELL",
    "name": { "str": "Eight Point Three Percent Nether Attunement Chance" },
    "valid_targets": [ "self" ],
    "description": "8.3% chance to gain nether-attunement.",
    "flags": [ "SILENT", "WONDER", "NO_EXPLOSION_SFX" ],
    "message": "",
    "shape": "blast",
    "effect": "noise",
    "min_damage": 1,
    "max_damage": 1,
    "extra_effects": [
      { "id": "death_fakespell" },
      { "id": "death_fakespell" },
      { "id": "death_fakespell" },
      { "id": "death_fakespell" },
      { "id": "death_fakespell" },
      { "id": "death_fakespell" },
      { "id": "death_fakespell" },
      { "id": "death_fakespell" },
      { "id": "death_fakespell" },
      { "id": "death_fakespell" },
      { "id": "death_fakespell" },
      { "id": "psionic_drained_spell", "max_level": 0, "hit_self": true }
    ]
  },
  {
    "id": "psionic_drained_difficulty_four",
    "type": "SPELL",
    "name": { "str": "Eleven Percent Nether Attunement Chance" },
    "valid_targets": [ "self" ],
    "description": "11% chance to gain nether-attunement.",
    "flags": [ "SILENT", "WONDER", "NO_EXPLOSION_SFX" ],
    "message": "",
    "shape": "blast",
    "effect": "noise",
    "min_damage": 1,
    "max_damage": 1,
    "extra_effects": [
      { "id": "death_fakespell" },
      { "id": "death_fakespell" },
      { "id": "death_fakespell" },
      { "id": "death_fakespell" },
      { "id": "death_fakespell" },
      { "id": "death_fakespell" },
      { "id": "death_fakespell" },
      { "id": "death_fakespell" },
      { "id": "psionic_drained_spell", "max_level": 0, "hit_self": true }
    ]
  },
  {
    "id": "psionic_drained_difficulty_five",
    "type": "SPELL",
    "name": { "str": "Fourteen Percent Nether Attunement Chance" },
    "valid_targets": [ "self" ],
    "description": "14% chance to gain nether-attunement.",
    "flags": [ "SILENT", "WONDER", "NO_EXPLOSION_SFX" ],
    "message": "",
    "shape": "blast",
    "effect": "noise",
    "min_damage": 1,
    "max_damage": 1,
    "extra_effects": [
      { "id": "death_fakespell" },
      { "id": "death_fakespell" },
      { "id": "death_fakespell" },
      { "id": "death_fakespell" },
      { "id": "death_fakespell" },
      { "id": "death_fakespell" },
      { "id": "psionic_drained_spell", "max_level": 0, "hit_self": true }
    ]
  },
  {
    "id": "psionic_drained_difficulty_six",
    "type": "SPELL",
    "name": { "str": "Twenty Percent Nether Attunement Chance" },
    "valid_targets": [ "self" ],
    "description": "20% chance to gain nether-attunement.",
    "flags": [ "SILENT", "WONDER", "NO_EXPLOSION_SFX" ],
    "message": "",
    "shape": "blast",
    "effect": "noise",
    "min_damage": 1,
    "max_damage": 1,
    "extra_effects": [
      { "id": "death_fakespell" },
      { "id": "death_fakespell" },
      { "id": "death_fakespell" },
      { "id": "death_fakespell" },
      { "id": "psionic_drained_spell", "max_level": 0, "hit_self": true }
    ]
  },
  {
    "id": "psionic_drained_difficulty_seven",
    "type": "SPELL",
    "name": { "str": "Thirty-three Percent Nether Attunement Chance" },
    "valid_targets": [ "self" ],
    "description": "33% chance to gain nether-attunement.",
    "flags": [ "SILENT", "WONDER", "NO_EXPLOSION_SFX" ],
    "message": "",
    "shape": "blast",
    "effect": "noise",
    "min_damage": 1,
    "max_damage": 1,
    "extra_effects": [
      { "id": "death_fakespell" },
      { "id": "death_fakespell" },
      { "id": "psionic_drained_spell", "max_level": 0, "hit_self": true }
    ]
  },
  {
    "id": "psionic_drained_difficulty_eight",
    "type": "SPELL",
    "name": { "str": "Fifty Percent Nether Attunement Chance" },
    "valid_targets": [ "self" ],
    "description": "50% chance to gain nether-attunement.",
    "flags": [ "SILENT", "WONDER", "NO_EXPLOSION_SFX" ],
    "message": "",
    "shape": "blast",
    "effect": "noise",
    "min_damage": 1,
    "max_damage": 1,
    "extra_effects": [ { "id": "death_fakespell" }, { "id": "psionic_drained_spell", "max_level": 0, "hit_self": true } ]
  },
  {
    "id": "psionic_drained_difficulty_nine",
    "type": "SPELL",
    "name": { "str": "Seventy-five Percent Nether Attunement Chance" },
    "valid_targets": [ "self" ],
    "description": "75% chance to gain nether-attunement.",
    "flags": [ "SILENT", "WONDER", "NO_EXPLOSION_SFX" ],
    "message": "",
    "shape": "blast",
    "effect": "noise",
    "min_damage": 1,
    "max_damage": 1,
    "extra_effects": [
      { "id": "death_fakespell" },
      { "id": "psionic_drained_spell", "max_level": 0, "hit_self": true },
      { "id": "psionic_drained_spell", "max_level": 0, "hit_self": true },
      { "id": "psionic_drained_spell", "max_level": 0, "hit_self": true }
    ]
  },
  {
    "id": "psionic_drained_difficulty_ten",
    "type": "SPELL",
    "name": { "str": "One hundred Percent Nether Attunement Chance" },
    "valid_targets": [ "self" ],
    "description": "100% chance to gain nether-attunement.",
    "flags": [ "SILENT", "WONDER", "NO_EXPLOSION_SFX" ],
    "message": "",
    "shape": "blast",
    "effect": "noise",
    "min_damage": 1,
    "max_damage": 1,
    "extra_effects": [ { "id": "psionic_drained_spell", "max_level": 0, "hit_self": true } ]
  },
  {
    "id": "psionic_maintenance_drain_spell",
    "type": "SPELL",
    "name": { "str": "Psionic Maintenance Nether Attunement" },
    "valid_targets": [ "self" ],
    "description": "Applies Nether Attunement to you when maintaining a power.",
    "flags": [ "SILENT", "NO_EXPLOSION_SFX", "NO_FAIL" ],
    "message": "",
    "effect": "effect_on_condition",
    "effect_str": "EOC_RAISE_NETHER_ATTUNEMENT_MAINTENANCE",
    "shape": "blast"
  },
  {
    "type": "effect_on_condition",
    "id": "EOC_RAISE_NETHER_ATTUNEMENT_MAINTENANCE",
    "condition": { "math": [ "u_vitamin('vitamin_psionic_drain') < 15" ] },
    "effect": [ { "run_eocs": "EOC_RAISE_NETHER_ATTUNEMENT_MAINTENANCE_BELOW_THRESHOLD" } ],
    "false_effect": [ { "run_eocs": "EOC_RAISE_NETHER_ATTUNEMENT_MAINTENANCE_ABOVE_THRESHOLD" } ]
  },
  {
    "type": "effect_on_condition",
    "id": "EOC_RAISE_NETHER_ATTUNEMENT_MAINTENANCE_BELOW_THRESHOLD",
    "condition": { "u_has_effect": "effect_noetic_resilience" },
    "effect": [
      { "u_message": "You feel a strange tingling sensation as you concentrate.", "type": "mixed" },
      { "math": [ "u_vitamin('vitamin_psionic_drain')", "+=", "rand(1)" ] }
    ],
    "false_effect": [
      { "u_message": "You feel a strange tingling sensation as you concentrate.", "type": "mixed" },
      { "math": [ "u_vitamin('vitamin_psionic_drain')", "+=", "rand(3)" ] }
    ]
  },
  {
    "type": "effect_on_condition",
    "id": "EOC_RAISE_NETHER_ATTUNEMENT_MAINTENANCE_ABOVE_THRESHOLD",
    "condition": { "u_has_effect": "effect_noetic_resilience" },
    "effect": [
      { "u_message": "You feel a strange tingling sensation as you concentrate.", "type": "mixed" },
      { "math": [ "u_vitamin('vitamin_psionic_drain')", "+=", "rand(3) * u_nether_attunement_power_scaling" ] }
    ],
    "false_effect": [
      { "u_message": "You feel a strange tingling sensation as you concentrate.", "type": "mixed" },
      { "math": [ "u_vitamin('vitamin_psionic_drain')", "+=", "(rand(5) + 2) * u_nether_attunement_power_scaling" ] }
    ]
  },
  {
    "id": "psionic_maintenance_drained_difficulty_one",
    "type": "SPELL",
    "name": { "str": "Five Percent Nether Attunement Chance" },
    "valid_targets": [ "self" ],
    "description": "5% chance to gain nether-attunement.",
    "flags": [ "SILENT", "WONDER", "NO_EXPLOSION_SFX" ],
    "message": "",
    "shape": "blast",
    "effect": "noise",
    "min_damage": 1,
    "max_damage": 1,
    "extra_effects": [
      { "id": "death_fakespell" },
      { "id": "death_fakespell" },
      { "id": "death_fakespell" },
      { "id": "death_fakespell" },
      { "id": "death_fakespell" },
      { "id": "death_fakespell" },
      { "id": "death_fakespell" },
      { "id": "death_fakespell" },
      { "id": "death_fakespell" },
      { "id": "death_fakespell" },
      { "id": "death_fakespell" },
      { "id": "death_fakespell" },
      { "id": "death_fakespell" },
      { "id": "death_fakespell" },
      { "id": "death_fakespell" },
      { "id": "death_fakespell" },
      { "id": "death_fakespell" },
      { "id": "death_fakespell" },
      { "id": "death_fakespell" },
      { "id": "psionic_maintenance_drain_spell", "max_level": 0, "hit_self": true }
    ]
  },
  {
    "id": "psionic_maintenance_drained_difficulty_two",
    "type": "SPELL",
    "name": { "str": "Six point six Percent Nether Attunement Chance" },
    "valid_targets": [ "self" ],
    "description": "6.6% chance to gain nether-attunement.",
    "flags": [ "SILENT", "WONDER", "NO_EXPLOSION_SFX" ],
    "message": "",
    "shape": "blast",
    "effect": "noise",
    "min_damage": 1,
    "max_damage": 1,
    "extra_effects": [
      { "id": "death_fakespell" },
      { "id": "death_fakespell" },
      { "id": "death_fakespell" },
      { "id": "death_fakespell" },
      { "id": "death_fakespell" },
      { "id": "death_fakespell" },
      { "id": "death_fakespell" },
      { "id": "death_fakespell" },
      { "id": "death_fakespell" },
      { "id": "death_fakespell" },
      { "id": "death_fakespell" },
      { "id": "death_fakespell" },
      { "id": "death_fakespell" },
      { "id": "death_fakespell" },
      { "id": "psionic_maintenance_drain_spell", "max_level": 0, "hit_self": true }
    ]
  },
  {
    "id": "psionic_maintenance_drained_difficulty_three",
    "type": "SPELL",
    "name": { "str": "Eight Point Three Percent Nether Attunement Chance" },
    "valid_targets": [ "self" ],
    "description": "8.3% chance to gain nether-attunement.",
    "flags": [ "SILENT", "WONDER", "NO_EXPLOSION_SFX" ],
    "message": "",
    "shape": "blast",
    "effect": "noise",
    "min_damage": 1,
    "max_damage": 1,
    "extra_effects": [
      { "id": "death_fakespell" },
      { "id": "death_fakespell" },
      { "id": "death_fakespell" },
      { "id": "death_fakespell" },
      { "id": "death_fakespell" },
      { "id": "death_fakespell" },
      { "id": "death_fakespell" },
      { "id": "death_fakespell" },
      { "id": "death_fakespell" },
      { "id": "death_fakespell" },
      { "id": "death_fakespell" },
      { "id": "psionic_maintenance_drain_spell", "max_level": 0, "hit_self": true }
    ]
  },
  {
    "id": "psionic_maintenance_drained_difficulty_four",
    "type": "SPELL",
    "name": { "str": "Eleven Percent Nether Attunement Chance" },
    "valid_targets": [ "self" ],
    "description": "11% chance to gain nether-attunement.",
    "flags": [ "SILENT", "WONDER", "NO_EXPLOSION_SFX" ],
    "message": "",
    "shape": "blast",
    "effect": "noise",
    "min_damage": 1,
    "max_damage": 1,
    "extra_effects": [
      { "id": "death_fakespell" },
      { "id": "death_fakespell" },
      { "id": "death_fakespell" },
      { "id": "death_fakespell" },
      { "id": "death_fakespell" },
      { "id": "death_fakespell" },
      { "id": "death_fakespell" },
      { "id": "death_fakespell" },
      { "id": "psionic_maintenance_drain_spell", "max_level": 0, "hit_self": true }
    ]
  },
  {
    "id": "psionic_maintenance_drained_difficulty_five",
    "type": "SPELL",
    "name": { "str": "Fourteen Percent Nether Attunement Chance" },
    "valid_targets": [ "self" ],
    "description": "14% chance to gain nether-attunement.",
    "flags": [ "SILENT", "WONDER", "NO_EXPLOSION_SFX" ],
    "message": "",
    "shape": "blast",
    "effect": "noise",
    "min_damage": 1,
    "max_damage": 1,
    "extra_effects": [
      { "id": "death_fakespell" },
      { "id": "death_fakespell" },
      { "id": "death_fakespell" },
      { "id": "death_fakespell" },
      { "id": "death_fakespell" },
      { "id": "death_fakespell" },
      { "id": "psionic_maintenance_drain_spell", "max_level": 0, "hit_self": true }
    ]
  },
  {
    "id": "psionic_maintenance_drained_difficulty_six",
    "type": "SPELL",
    "name": { "str": "Twenty Percent Nether Attunement Chance" },
    "valid_targets": [ "self" ],
    "description": "20% chance to gain nether-attunement.",
    "flags": [ "SILENT", "WONDER", "NO_EXPLOSION_SFX" ],
    "message": "",
    "shape": "blast",
    "effect": "noise",
    "min_damage": 1,
    "max_damage": 1,
    "extra_effects": [
      { "id": "death_fakespell" },
      { "id": "death_fakespell" },
      { "id": "death_fakespell" },
      { "id": "death_fakespell" },
      { "id": "psionic_maintenance_drain_spell", "max_level": 0, "hit_self": true }
    ]
  },
  {
    "id": "psionic_maintenance_drained_difficulty_seven",
    "type": "SPELL",
    "name": { "str": "Thirty-three Percent Nether Attunement Chance" },
    "valid_targets": [ "self" ],
    "description": "33% chance to gain nether-attunement.",
    "flags": [ "SILENT", "WONDER", "NO_EXPLOSION_SFX" ],
    "message": "",
    "shape": "blast",
    "effect": "noise",
    "min_damage": 1,
    "max_damage": 1,
    "extra_effects": [
      { "id": "death_fakespell" },
      { "id": "death_fakespell" },
      { "id": "psionic_maintenance_drain_spell", "max_level": 0, "hit_self": true }
    ]
  },
  {
    "id": "psionic_maintenance_drained_difficulty_eight",
    "type": "SPELL",
    "name": { "str": "Fifty Percent Nether Attunement Chance" },
    "valid_targets": [ "self" ],
    "description": "50% chance to gain nether-attunement.",
    "flags": [ "SILENT", "WONDER", "NO_EXPLOSION_SFX" ],
    "message": "",
    "shape": "blast",
    "effect": "noise",
    "min_damage": 1,
    "max_damage": 1,
    "extra_effects": [ { "id": "death_fakespell" }, { "id": "psionic_maintenance_drain_spell", "max_level": 0, "hit_self": true } ]
  },
  {
    "id": "psionic_maintenance_drained_difficulty_nine",
    "type": "SPELL",
    "name": { "str": "Seventy-five Percent Nether Attunement Chance" },
    "valid_targets": [ "self" ],
    "description": "75% chance to gain nether-attunement.",
    "flags": [ "SILENT", "WONDER", "NO_EXPLOSION_SFX" ],
    "message": "",
    "shape": "blast",
    "effect": "noise",
    "min_damage": 1,
    "max_damage": 1,
    "extra_effects": [
      { "id": "death_fakespell" },
      { "id": "psionic_maintenance_drain_spell", "max_level": 0, "hit_self": true },
      { "id": "psionic_maintenance_drain_spell", "max_level": 0, "hit_self": true },
      { "id": "psionic_maintenance_drain_spell", "max_level": 0, "hit_self": true }
    ]
  },
  {
    "id": "psionic_maintenance_drained_difficulty_ten",
    "type": "SPELL",
    "name": { "str": "One hundred Percent Nether Attunement Chance" },
    "valid_targets": [ "self" ],
    "description": "100% chance to gain nether-attunement.",
    "flags": [ "SILENT", "WONDER", "NO_EXPLOSION_SFX" ],
    "message": "",
    "shape": "blast",
    "effect": "noise",
    "min_damage": 1,
    "max_damage": 1,
    "extra_effects": [ { "id": "psionic_maintenance_drain_spell", "max_level": 0, "hit_self": true } ]
  }
]
