[
  {
    "id": "banishment_greater",
    "type": "SPELL",
    "name": "Greater Banishment",
    "description": "A more advanced version of Banishment, which is a ritual spell that attempts to banish a monster.  Being closely related to blood magic, the Blood Mage is much more specialized to use a spell like this.",
    "valid_targets": [ "hostile" ],
    "flags": [ "CONVEYANCE_SPELL", "SOMATIC", "VERBAL", "MUST_HAVE_CLASS_TO_LEARN", "NO_HANDS" ],
    "extra_effects": [ { "id": "eoc_conveyance_setup", "hit_self": true } ],
    "effect": "banishment",
    "shape": "blast",
    "min_damage": 120,
    "damage_increment": 15,
    "max_damage": 640,
    "min_range": 6,
    "max_range": 6,
    "min_aoe": 0,
    "max_aoe": 2,
    "aoe_increment": 0.04,
    "base_energy_cost": 400,
    "spell_class": "BLOOD_MAGE",
    "difficulty": 6,
    "max_level": 35,
    "base_casting_time": 100,
    "magic_type": "magiclysm_generic_magic"
  },
  {
    "id": "demon_possession_aura",
    "type": "ITEM",
    "subtypes": [ "ARMOR", "ARTIFACT" ],
    "name": "Ixythyug the Destroyer's soul",
    "description": "RIP AND TEAR",
    "weight": "1 g",
    "volume": "1 ml",
    "symbol": "o",
    "color": "white",
    "flags": [ "PERSONAL", "SEMITANGIBLE", "OVERSIZE", "TRADER_AVOID", "NO_TAKEOFF", "NONCONDUCTIVE" ],
    "max_worn": 1,
    "passive_effects": [
      {
        "has": "WORN",
        "condition": "ALWAYS",
        "mutations": [
          "DEMON_HORNS",
          "DEMON_HOOVES",
          "DEMON_POSSES",
          "DEMON_CLAWS",
          "DEMON_SKIN",
          "DEMON_TAIL",
          "DEMON_HUGE",
          "NOPAIN",
          "FACIAL_HAIR_GOATEE"
        ]
      }
    ]
  },
  {
    "id": "demonic_possession",
    "type": "SPELL",
    "name": "Demonic Possession",
    "description": "You allow a demon to possess your body for a short time, giving you great combat abilities.  You still retain control, though lose your spellcasting abilities temporarily.",
    "valid_targets": [ "self" ],
    "flags": [ "CONJURATION_SPELL", "SOMATIC", "NO_LEGS", "MUST_HAVE_CLASS_TO_LEARN" ],
    "extra_effects": [ { "id": "eoc_summon_setup", "hit_self": true } ],
    "effect": "effect_on_condition",
    "shape": "blast",
    "effect_str": "EOC_DEMON_POSSESSION",
    "min_damage": 1,
    "max_damage": 1,
    "min_duration": 360000,
    "max_duration": 1440000,
    "duration_increment": 30858,
    "spell_class": "BLOOD_MAGE",
    "difficulty": 5,
    "max_level": 35,
    "base_casting_time": 800,
    "base_energy_cost": 5,
    "magic_type": "magiclysm_generic_magic",
    "energy_source": "HP"
  },
  {
    "type": "effect_on_condition",
    "id": "EOC_DEMON_POSSESSION",
    "condition": { "and": [ { "not": { "u_has_trait": "HUGE" } }, { "not": { "u_has_trait": "HUGE_OK" } } ] },
    "effect": [
      { "u_message": "Your body swells and warps as your size increases!", "type": "good" },
      { "math": [ "u_preshift_size = u_val('size')" ] },
      {
        "switch": { "math": [ "u_preshift_size" ] },
        "cases": [
          { "case": 1, "effect": [ { "math": [ "u_calories('dont_affect_weariness': true)", "*=", "12" ] } ] },
          { "case": 2, "effect": [ { "math": [ "u_calories('dont_affect_weariness': true)", "*=", "6" ] } ] },
          { "case": 3, "effect": [ { "math": [ "u_calories('dont_affect_weariness': true)", "*=", "2" ] } ] },
          { "case": 4, "effect": [ { "math": [ "u_calories('dont_affect_weariness': true)", "*=", "1.5" ] } ] },
          { "case": 5, "effect": [  ] }
        ]
      },
      { "u_cast_spell": { "id": "demonic_possession_real" } },
      {
        "run_eocs": "EOC_DEMON_POSSESSION_REMOVE",
        "time_in_future": { "math": [ "(u_spell_level('demonic_possession') * 309) + 3600" ] }
      }
    ],
    "false_effect": [
      { "u_message": "Your body fills with demonic power!", "type": "good" },
      { "u_cast_spell": { "id": "demonic_possession_real" } },
      {
        "run_eocs": "EOC_DEMON_POSSESSION_REMOVE",
        "time_in_future": { "math": [ "(u_spell_level('demonic_possession') * 309) + 3600" ] }
      }
    ]
  },
  {
    "type": "effect_on_condition",
    "id": "EOC_DEMON_POSSESSION_REMOVE",
    "effect": [
      { "u_message": "Your body shrinks and warps as your size decreases!", "type": "bad" },
      {
        "switch": { "math": [ "u_preshift_size" ] },
        "cases": [
          { "case": 1, "effect": [ { "math": [ "u_calories('dont_affect_weariness': true)", "/=", "12" ] } ] },
          { "case": 2, "effect": [ { "math": [ "u_calories('dont_affect_weariness': true)", "/=", "6" ] } ] },
          { "case": 3, "effect": [ { "math": [ "u_calories('dont_affect_weariness': true)", "/=", "2" ] } ] },
          { "case": 4, "effect": [ { "math": [ "u_calories('dont_affect_weariness': true)", "/=", "1.5" ] } ] },
          { "case": 5, "effect": [  ] }
        ]
      }
    ]
  },
  {
    "id": "demonic_possession_real",
    "type": "SPELL",
    "name": "Demonic Possession Real",
    "description": "Grants the aura that gives the demon traits.  You're not supposed to see this.",
    "valid_targets": [ "self" ],
    "flags": [ "CONJURATION_SPELL", "SOMATIC", "NO_LEGS", "MUST_HAVE_CLASS_TO_LEARN", "SILENT", "NO_EXPLOSION_SFX" ],
    "extra_effects": [ { "id": "eoc_summon_setup", "hit_self": true } ],
    "effect": "spawn_item",
    "shape": "blast",
    "effect_str": "demon_possession_aura",
    "min_damage": 1,
    "max_damage": 1,
    "min_duration": { "math": [ "(u_spell_level('demonic_possession') * 30900) + 360000" ] },
    "max_duration": { "math": [ "(u_spell_level('demonic_possession') * 30900) + 360000" ] },
    "spell_class": "BLOOD_MAGE",
    "difficulty": 5,
    "max_level": 35,
    "base_casting_time": 0
  }
]
