[
  {
    "id": "afs_telepathic_shield",
    "type": "SPELL",
    "name": "[Ψ]Telepathic Shield (C)",
    "description": "You can protect your mind from the dangers of Salus IV.\n\nThis power <color_yellow>is maintained by concentration</color> and <color_red>may fail</color> if <color_yellow>concentration is interrupted</color>.",
    "message": "",
    "teachable": false,
    "valid_targets": [ "self" ],
    "spell_class": "AFS_TELEPATH",
    "skill": "metaphysics",
    "flags": [ "PSIONIC", "CONCENTRATE", "SILENT", "NO_HANDS", "NO_LEGS", "RANDOM_DURATION" ],
    "effect": "effect_on_condition",
    "effect_str": "EOC_AFS_TELEPATH_SHIELD_INITIATE",
    "shape": "blast",
    "difficulty": 2,
    "max_level": { "math": [ "int_to_level(1)" ] },
    "min_duration": {
      "math": [ "( (u_spell_level('afs_telepathic_shield') * 1500) + 18000) * (scaling_factor(u_val('intelligence') ) ) " ]
    },
    "max_duration": {
      "math": [ "( (u_spell_level('afs_telepathic_shield') * 3600) + 72000) * (scaling_factor(u_val('intelligence') ) ) " ]
    },
    "magic_type": "aftershock_psionics",
    "base_energy_cost": {
      "math": [
        "u_effect_intensity('effect_afs_telepathic_psi_armor') > -1 ? 0 : max((2500 - (u_spell_level('afs_telepathic_shield') * 125)), 500)"
      ]
    },
    "base_casting_time": {
      "math": [
        "u_effect_intensity('effect_afs_telepathic_psi_armor') > -1 ? 10 : max((100 -(u_spell_level('afs_telepathic_shield') * 6.5)), 10)"
      ]
    }
  },
  {
    "id": "afs_telepathic_mind_sense",
    "type": "SPELL",
    "name": "[Ψ]Sense Minds (C)",
    "description": "You can use your powers to detect the tell-tale hum of a living, sapient mind, no matter how strange or alien it may be.\n\nThis power <color_yellow>is maintained by concentration</color> and <color_red>may fail</color> if <color_yellow>concentration is interrupted</color>.",
    "message": "",
    "teachable": false,
    "valid_targets": [ "self" ],
    "spell_class": "AFS_TELEPATH",
    "skill": "metaphysics",
    "flags": [ "PSIONIC", "CONCENTRATE", "SILENT", "NO_HANDS", "NO_LEGS", "RANDOM_DURATION" ],
    "effect": "effect_on_condition",
    "effect_str": "EOC_AFS_TELEPATH_SENSE_MINDS_INITIATE",
    "shape": "blast",
    "difficulty": 3,
    "max_level": { "math": [ "int_to_level(1)" ] },
    "min_duration": {
      "math": [ "( (u_spell_level('afs_telepathic_mind_sense') * 2600) + 9000) * (scaling_factor(u_val('intelligence') ) ) " ]
    },
    "max_duration": {
      "math": [ "( (u_spell_level('afs_telepathic_mind_sense') * 13100) + 60000) * (scaling_factor(u_val('intelligence') ) ) " ]
    },
    "magic_type": "aftershock_psionics",
    "base_energy_cost": {
      "math": [
        "u_effect_intensity('effect_afs_telepath_sense_minds') > -1 ? 0 : max((3500 - (u_spell_level('afs_telepathic_mind_sense') * 115)), 1500)"
      ]
    },
    "base_casting_time": { "math": [ "u_effect_intensity('effect_afs_telepath_sense_minds') > -1 ? 10 : 500" ] }
  },
  {
    "id": "afs_telepathic_suggestion",
    "type": "SPELL",
    "name": "[Ψ]Telepathic Suggestion (C)",
    "description": "You can subtly influence the thoughts of others, making them more amenable to your point of view.\n\nThis power <color_yellow>is maintained by concentration</color> and <color_red>may fail</color> if <color_yellow>concentration is interrupted</color>.",
    "message": "",
    "teachable": false,
    "valid_targets": [ "self" ],
    "spell_class": "AFS_TELEPATH",
    "skill": "metaphysics",
    "flags": [ "PSIONIC", "CONCENTRATE", "SILENT", "NO_HANDS", "NO_LEGS", "RANDOM_DURATION" ],
    "difficulty": 4,
    "max_level": { "math": [ "int_to_level(1)" ] },
    "effect": "effect_on_condition",
    "effect_str": "EOC_AFS_TELEPATH_SUGGESTION_INITIATE",
    "shape": "blast",
    "min_duration": {
      "math": [ "( (u_spell_level('afs_telepathic_suggestion') * 38100) + 98100) * (scaling_factor(u_val('intelligence') ) ) " ]
    },
    "max_duration": {
      "math": [ "( (u_spell_level('afs_telepathic_suggestion') * 89900) + 252000) * (scaling_factor(u_val('intelligence') ) ) " ]
    },
    "magic_type": "aftershock_psionics",
    "base_energy_cost": {
      "math": [
        "u_effect_intensity('effect_afs_telepathic_suggestion') > -1 ? 0 : max((5000 - (u_spell_level('afs_telepathic_suggestion') * 125)), 2000)"
      ]
    },
    "base_casting_time": {
      "math": [
        "u_effect_intensity('effect_afs_telepathic_suggestion') > -1 ? 10 : max((300 -(u_spell_level('afs_telepathic_suggestion') * 9.5)), 150)"
      ]
    }
  },
  {
    "id": "afs_telepathic_confusion",
    "type": "SPELL",
    "name": "[Ψ]Sensory Deprivation",
    "description": "Disconnect a target's brain from its senses, leaving it blinded and confused.",
    "message": "You lock your target's mind away!",
    "teachable": false,
    "valid_targets": [ "hostile" ],
    "spell_class": "AFS_TELEPATH",
    "skill": "metaphysics",
    "flags": [ "PSIONIC", "CONCENTRATE", "NO_PROJECTILE", "SILENT", "NO_HANDS", "NO_LEGS", "RANDOM_DURATION" ],
    "difficulty": 5,
    "max_level": { "math": [ "int_to_level(1)" ] },
    "effect": "attack",
    "effect_str": "psi_stunned",
    "extra_effects": [ { "id": "afs_telepathic_confusion_blind", "hit_self": false, "max_level": 20 } ],
    "shape": "blast",
    "min_duration": { "math": [ "( (u_spell_level('afs_telepathic_confusion') * 50) + 200) * (scaling_factor(u_val('intelligence') ) ) " ] },
    "max_duration": {
      "math": [ "( (u_spell_level('afs_telepathic_confusion') * 150) + 800) * (scaling_factor(u_val('intelligence') ) ) " ]
    },
    "min_range": {
      "math": [ "min( (( (u_spell_level('afs_telepathic_confusion') * 1.1) + 3) * (scaling_factor(u_val('intelligence') ) ) ), 80)" ]
    },
    "max_range": 80,
    "magic_type": "aftershock_psionics",
    "base_energy_cost": 3750,
    "final_energy_cost": 1500,
    "energy_increment": -150,
    "base_casting_time": 90,
    "final_casting_time": 40,
    "casting_time_increment": -3.5,
    "ignored_monster_species": [ "ROBOT", "ROBOT_FLYING", "BIOMACHINE", "NETHER_EMANATION", "LEECH_PLANT", "WORM", "FUNGUS", "SLIME" ]
  },
  {
    "id": "afs_telepathic_confusion_blind",
    "type": "SPELL",
    "name": "[Ψ]Sensory Deprivation blind Effect",
    "description": "The is the part of the Sensory Deprivation that blinds the target.  It's a bug if you have it.",
    "valid_targets": [ "hostile" ],
    "skill": "metaphysics",
    "flags": [ "PSIONIC", "NO_PROJECTILE", "SILENT", "NO_HANDS", "NO_LEGS", "RANDOM_DURATION" ],
    "max_level": { "math": [ "int_to_level(1)" ] },
    "effect": "attack",
    "effect_str": "blind",
    "damage_type": "psi_telepathic_damage",
    "shape": "blast",
    "min_duration": {
      "math": [ "( (u_spell_level('afs_telepathic_confusion') * 100) + 400) * (scaling_factor(u_val('intelligence') ) ) " ]
    },
    "max_duration": {
      "math": [ "( (u_spell_level('afs_telepathic_confusion') * 100) + 2000) * (scaling_factor(u_val('intelligence') ) ) " ]
    },
    "min_range": { "math": [ "( (u_spell_level('afs_telepathic_confusion') * 2) + 3) * (scaling_factor(u_val('intelligence') ) ) " ] },
    "ignored_monster_species": [ "ROBOT", "ROBOT_FLYING", "BIOMACHINE", "NETHER_EMANATION", "LEECH_PLANT", "WORM", "FUNGUS", "SLIME" ]
  },
  {
    "id": "afs_telepathic_blast",
    "type": "SPELL",
    "name": "[Ψ]Synaptic Overload",
    "description": "Short-circuit and overwhelm a target's brain, causing extreme damage or death.  Does not work on targets without living minds, such as robots.",
    "message": "You assault the mind of your target!",
    "teachable": false,
    "valid_targets": [ "hostile" ],
    "spell_class": "AFS_TELEPATH",
    "skill": "metaphysics",
    "flags": [
      "PSIONIC",
      "CONCENTRATE",
      "NO_PROJECTILE",
      "SILENT",
      "RANDOM_DAMAGE",
      "NO_HANDS",
      "NO_LEGS",
      "NO_EXPLOSION_SFX",
      "PERCENTAGE_DAMAGE"
    ],
    "difficulty": 7,
    "max_level": { "math": [ "int_to_level(1)" ] },
    "effect": "attack",
    "shape": "blast",
    "damage_type": "psi_telepathic_damage",
    "min_damage": { "math": [ "( (u_spell_level('afs_telepathic_blast') * 1.5) + 5) * (scaling_factor(u_val('intelligence') ) ) " ] },
    "max_damage": { "math": [ "( (u_spell_level('afs_telepathic_blast') * 3) + 5) * (scaling_factor(u_val('intelligence') ) ) " ] },
    "min_range": {
      "math": [ "min( (( (u_spell_level('afs_telepathic_blast') * 1.1) + 3) * (scaling_factor(u_val('intelligence') ) ) ), 80)" ]
    },
    "max_range": 80,
    "magic_type": "aftershock_psionics",
    "base_energy_cost": 5500,
    "final_energy_cost": 1250,
    "energy_increment": -125,
    "base_casting_time": 75,
    "final_casting_time": 25,
    "casting_time_increment": -2.5,
    "ignored_monster_species": [ "ROBOT", "ROBOT_FLYING", "BIOMACHINE", "NETHER_EMANATION", "LEECH_PLANT", "WORM", "FUNGUS", "SLIME" ]
  }
]
