"healing"
{
  symbol = "❤️"
  effect = Heal { FLESH }
  cooldown = {10 31}
  sound = "SPELL_HEALING"
}
"advanced healing"
{
  upgrade = "healing"
  symbol = "❤️"
  effect = Name SPELLS_ADVANCED_HEALING_EFFECT Heal { FLESH }
  range = 1
  targetSelf = true
  cooldown = {10 31}
  sound = "SPELL_HEALING"
}
"expert healing"
{
  upgrade = "advanced healing"
  symbol = "❤️"
  effect = Name SPELLS_EXPERT_HEALING_EFFECT Heal { FLESH }
  targetSelf = true
  range = 4
  cooldown = {10 31}
  sound = "SPELL_HEALING"
}
"group healing"
{
  symbol = "💕"
  effect = Name SPELLS_GROUP_HEALING_EFFECT Area 2 Filter Not Enemy Heal { FLESH }
  cooldown = {25 51}
  sound = "SPELL_HEALING"
}
"heal spirit"
{
  symbol = "✴"
  effect = Name SPELLS_HEAL_SPIRIT_EFFECT Heal { SPIRIT }
  range = 1
  targetSelf = true
  cooldown = {10 31}
  sound = "SPELL_HEALING"
}
"advanced heal spirit"
{
  upgrade = "heal spirit"
  symbol = "✴"
  effect = Name SPELLS_ADVANCED_HEAL_SPIRIT_EFFECT Heal { SPIRIT }
  targetSelf = true
  range = 4
  cooldown = {10 31}
  sound = "SPELL_HEALING"
}
"heal spirit group"
{
  symbol = "✴✴"
  effect = Name SPELLS_HEAL_SPIRIT_GROUP_EFFECT Area 2 Filter Not Enemy Heal { SPIRIT }
  cooldown = {25 51}
  sound = "SPELL_HEALING"
}
"cure poison"
{
  symbol = "⚕"
  effect = Name SPELLS_CURE_POISON_EFFECT RemoveLasting POISON
  cooldown = {25 51}
  sound = "SPELL_CURE_POISON"
}
"advanced cure poison"
{
  upgrade = "cure poison"
  symbol = "⚕"
  effect = Name SPELLS_ADVANCED_CURE_POISON_EFFECT RemoveLasting POISON
  cooldown = {25 51}
  targetSelf = true
  range = 1
  sound = "SPELL_CURE_POISON"
}
"cure blindness"
{
  symbol = "👁"
  effect = Name SPELLS_CURE_BLINDNESS_EFFECT RemoveLasting BLIND
  cooldown = {25 51}
  targetSelf = true
  range = 1
  sound = "SPELL_CURE_POISON"
}
"blindness"
{
  symbol = "🕶️"
  effect = Name SPELLS_BLINDNESS_EFFECT Lasting 5 BLIND
  cooldown = {10
21}
  range = 5
}
"poison resistance"
{
  symbol = "🐍"
  effect = Lasting POISON_RESISTANT
  cooldown = {50 101}
  targetSelf = true
  range = 1
  sound = "SPELL_CURE_POISON"
}
"poison breath"
{
  symbol = "☠"
  effect = Name SPELLS_POISON_BREATH_EFFECT Area 1 EmitGas "POISON_GAS" 0.5
  fx = {FLAMETHROWER ColorId GREEN}
  range = 4
  cooldown = {15 31}
  sound = "SPELL_BLAST"
  message = SPELLS_POISON_BREATH_MESSAGE SPELLS_POISON_BREATH_MESSAGE1
}
"summon flies"
{
  symbol = "🐝"
  effect = Summon "FLY" {3 7} 100
  cooldown = {30 61}
  sound = "SPELL_SUMMON_INSECTS"
}

Def TryNoFriendlyFire(EffectHit, EffectPass) {
  Filter Or { Attacker Not LastingEffect NO_FRIENDLY_FIRE
      And { Enemy Attacker LastingEffect NO_FRIENDLY_FIRE }} {
    EffectHit
    # This makes the effect return true if there was any creature even if it wasn't injured.
    Filter AnyCreature() NoEffect()
  }
  ReturnFalse Filter Attacker LastingEffect NO_FRIENDLY_FIRE Filter Not Enemy
    EffectPass
}
End

Def MinDistanceFromStrongEnemy(Dist)
  AI And{Distance none Dist AIAfraidOf} 1 -1
End

Def TryMagicMissile()
  TryNoFriendlyFire(
    {
      CreatureMessage {SPELLS_MAGIC_MISSILE_SECONDPERSON SPELLS_MAGIC_MISSILE_THIRDPERSON}
      Damage SPELL_DAMAGE SPELL
    },
    CreatureMessage {SPELLS_MAGIC_MISSILE_SECONDPERSON1 SPELLS_MAGIC_MISSILE_THIRDPERSON1}
  )
End

"magic missile"
{
  symbol = "⥇"
  effect = MinDistanceFromStrongEnemy(2) Name SPELLS_MAGIC_MISSILE_EFFECT Description SPELLS_MAGIC_MISSILE_EFFECT2
      TryMagicMissile()
  fx = {MAGIC_MISSILE}
  range = 4
  cooldown = {5 21}
  sound = "SPELL_BLAST"
}
"advanced magic missile"
{
  upgrade = "magic missile"
  symbol = "⥇"
  effect = MinDistanceFromStrongEnemy(2) Name SPELLS_ADVANCED_MAGIC_MISSILE_EFFECT Description SPELLS_ADVANCED_MAGIC_MISSILE_EFFECT2
      TryMagicMissile()
  fx = {MAGIC_MISSILE}
  range = 8
  cooldown = {5 21}
  sound = "SPELL_BLAST"
}
"expert magic missile"
{
  upgrade = "advanced magic missile"
  symbol = "⥇"
  effect = MinDistanceFromStrongEnemy(2) Name SPELLS_EXPERT_MAGIC_MISSILE_EFFECT Description SPELLS_EXPERT_MAGIC_MISSILE_EFFECT2
      TryMagicMissile()
  fx = {MAGIC_MISSILE}
  range = 12
  cooldown = {5 21}
  sound = "SPELL_BLAST"
}
"deception"
{
  symbol = "🎭"
  effect = Deception
  cooldown = {30 61}
  sound = "SPELL_DECEPTION"
}
"fog cloud"
{
  symbol = "🌫"
  effect = Name SPELLS_FOG_CLOUD_EFFECT Description SPELLS_FOG_CLOUD_EFFECT1 Area 4 Filter DistanceD none 3.2 EmitGas "FOG" 1
  cooldown = {30 61}
}
"invisibility"
{
  symbol = "🕵️"
  effect = Lasting INVISIBLE
  cooldown = {100 301}
  sound = "SPELL_INVISIBILITY"
}
"advanced invisibility"
{
  upgrade = "invisibility"
  symbol = "🕵️"
  effect = Name SPELLS_ADVANCED_INVISIBILITY_EFFECT Lasting INVISIBLE
  cooldown = {100 301}
  sound = "SPELL_INVISIBILITY"
}
"automaton invisibility"
{
  symbol = "🕵️"
  effect = Name SPELLS_AUTOMATON_INVISIBILITY_EFFECT Lasting 10 INVISIBLE
  cooldown = 20
  sound = "SPELL_INVISIBILITY"
}
"escape"
{
  symbol = "✈️"
  effect = Escape {}
  cooldown = {50 101}
  sound = "SPELL_TELEPORT"
}
"blink"
{
  symbol = "👁️"
  effect = Name SPELLS_BLINK_EFFECT Escape { 2 }
  cooldown = 1
  sound = "SPELL_TELEPORT"
}
"teleport"
{
  symbol = "🌀"
  effect = Teleport
  range = 3
  cooldown = {50 201}
  endOnly = true
  sound = "SPELL_TELEPORT"
}
"advanced teleport"
{
  upgrade = "teleport"
  symbol = "🌀"
  effect = Name SPELLS_ADVANCED_TELEPORT_EFFECT Teleport
  range = 8
  cooldown = {50 201}
  endOnly = true
  sound = "SPELL_TELEPORT"
}
"automaton teleport"
{
  symbol = "🌀"
  effect = Teleport
  range = 3
  cooldown = 10
  endOnly = true
  sound = "SPELL_TELEPORT"
}
"jump"
{
  symbol = "👟"
  effect = Jump
  range = 3
  cooldown = 10
  message = SPELLS_JUMP_MESSAGE SPELLS_JUMP_MESSAGE1
  type = ABILITY
}
"panic"
{
  symbol = "😱"
  effect = Lasting PANIC
  range = 5
  cooldown = {25 51}
  sound = "SPELL_STR_BONUS"
}
"pacify"
{
  symbol = "☮"
  effect = Name SPELLS_PACIFY_EFFECT Lasting PEACEFULNESS
  range = 2
  cooldown = {20 61}
  endOnly = true
  sound = "SPELL_STR_BONUS"
}
"haste"
{
  symbol = "🏃"
  effect = Lasting SPEED
  cooldown = {30 61}
  sound = "SPELL_SPEED_SELF"
}
"advanced haste"
{
  upgrade = "haste"
  symbol = "🏃"
  effect = Name SPELLS_ADVANCED_HASTE_EFFECT Lasting SPEED
  targetSelf = true
  range = 1
  cooldown = {30 61}
  sound = "SPELL_SPEED_SELF"
}
"warhorse_haste"
{
  symbol = "🐎"
  effect = Name SPELLS_WARHORSE_HASTE_EFFECT ApplyToSteed Lasting SPEED
  cooldown = 50
  sound = "HORSE_GALLOP"
  message = SPELLS_WARHORSE_HASTE_MESSAGE SPELLS_WARHORSE_HASTE_MESSAGE1
}
"slow"
{
  symbol = "🐢"
  effect = Lasting SLOWED
  range = 3
  cooldown = {30 61}
  sound = "SPELL_SPEED_SELF"
}
"magic cancellation"
{
  symbol = "🔮"
  effect = Lasting MAGIC_CANCELLATION
  range = 2
  cooldown = {50 151}
  sound = "SPELL_STR_BONUS"
}
"directed blast"
{
  symbol = "💨"
  effect = Blast
  range = 4
  endOnly = true
  cooldown = {5 21}
  sound = "SPELL_BLAST"
}
"pull"
{
  symbol = "⮄"
  effect = Pull
  range = 6
#    endOnly = true
  cooldown = {5 21}
  endOnly = true
  sound = "SPELL_BLAST"
}
"circular blast"
{
  symbol = "💥"
  effect = CircularBlast
  cooldown = {5 21}
  sound = "SPELL_AIR_BLAST"
  message = SPELLS_CIRCULAR_BLAST_MESSAGE SPELLS_CIRCULAR_BLAST_MESSAGE1
}
"defense bonus"
{
  symbol = "🛡"
  effect = Name SPELLS_DEFENSE_BONUS_EFFECT Lasting 40 DEF_BONUS
  cooldown = {30 81}
  sound = "SPELL_DEX_BONUS"
}
"advanced defense bonus"
{
  upgrade = "defense bonus"
  symbol = "🛡"
  effect = Name SPELLS_ADVANCED_DEFENSE_BONUS_EFFECT Lasting 40 DEF_BONUS
  targetSelf = true
  range = 1
  cooldown = {30 81}
  sound = "SPELL_DEX_BONUS"
}
"mass defense bonus"
{
  upgrade = "advanced defense bonus"
  symbol = "🛡"
  effect = Name SPELLS_MASS_DEFENSE_BONUS_EFFECT Area 10 Filter Not Enemy Lasting 40 DEF_BONUS
  cooldown = {30 81}
  sound = "SPELL_DEX_BONUS"
}
"damage bonus"
{
  symbol = "💪"
  effect = Name SPELLS_DAMAGE_BONUS_EFFECT Lasting 40 DAM_BONUS
  cooldown = {30 81}
  sound = "SPELL_STR_BONUS"
}
"advanced damage bonus"
{
  upgrade = "damage bonus"
  symbol = "💪"
  effect = Name SPELLS_ADVANCED_DAMAGE_BONUS_EFFECT Lasting 40 DAM_BONUS
  targetSelf = true
  range = 1
  cooldown = {30 81}
  sound = "SPELL_STR_BONUS"
}
"mass damage bonus"
{
  upgrade = "advanced damage bonus"
  symbol = "💪"
  effect = Name SPELLS_MASS_DAMAGE_BONUS_EFFECT Area 10 Filter Not Enemy Lasting 40 DAM_BONUS
  cooldown = {30 81}
  sound = "SPELL_STR_BONUS"
}
"bolster"
{
  symbol = "🛡"
  effect = Name SPELLS_BOLSTER_EFFECT Area 1 Filter Not Enemy Lasting 40 DEF_BONUS 
  cooldown = {30 81}
  sound = "SPELL_DEX_BONUS"
}
"rally"
{
  symbol = "💪"
  effect = Name SPELLS_RALLY_EFFECT Area 1 Filter Not Enemy Lasting 40 DAM_BONUS 
  cooldown = {30 81}
  sound = "SPELL_DEX_BONUS"
}
"summon element"
{
  symbol = "👾"
  effect = SummonElement
  cooldown = {30 81}
  sound = "SPELL_SUMMON_SPIRIT"
}
"meteor shower"
{
  symbol = "☄"
  effect = Name SPELLS_METEOR_SHOWER_EFFECT PlaceFurniture "METEOR_SHOWER"
  cooldown = {30 81}
  sound = "SPELL_METEOR_SHOWER"
}
"fire elemental"
{
  symbol = "👾"
  effect = Name SPELLS_FIRE_ELEMENTAL_EFFECT Summon "FIRE_ELEMENTAL" { 1 2 } 100
  cooldown = {30 81}
  sound = "SPELL_FIRE_SPHERE_PET"
}
"advanced fire elemental"
{
  upgrade = "fire elemental"
  symbol = "👾"
  effect = Name SPELLS_ADVANCED_FIRE_ELEMENTAL_EFFECT Summon "FIRE_ELEMENTAL" { 2 4 } 100
  cooldown = {30 81}
  sound = "SPELL_FIRE_SPHERE_PET"
}
"fire breath"
{
  symbol = "🐲"
  effect = Name SPELLS_FIRE_BREATH_EFFECT Fire
{}
  fx = {FLAMETHROWER ColorId LIGHT_RED}
  range = 4
  cooldown = {15 31}
  sound = "SPELL_BLAST"
  message = SPELLS_FIRE_BREATH_MESSAGE SPELLS_FIRE_BREATH_MESSAGE1
}
"oil breath"
{
  symbol = "🛢"
  effect = Name SPELLS_OIL_BREATH_EFFECT Lasting OIL
  fx = {FLAMETHROWER ColorId BLACK}
  range = 4
  cooldown = {15 31}
  sound = "SPELL_BLAST"
  message = SPELLS_OIL_BREATH_MESSAGE SPELLS_OIL_BREATH_MESSAGE1
}
"firewall"
{
  symbol = "𝍔"
  effect =  Name SPELLS_FIREWALL_EFFECT CustomArea PlaceFurniture "FIRE_WALL" { {0 -2} {0 -1} {0 0} {0 1} {0 2} }
  endOnly = true
  range = 2
  cooldown = {15 31}
  sound = "SPELL_BLAST"
}
"fire trap"
{
  symbol = "◌"
  effect =  Name SPELLS_FIRE_TRAP_EFFECT AI Enemy 0 1 AI Not Enemy 1 0 CustomArea PlaceFurniture "FIRE_WALL"
      { {0 -2} {1 -2} {2 -1} {2 0} {2 1} {1 2} {0 2} {-1 2} {-2 1} {-2 0} {-2 -1} {-1 -2} }
  endOnly = true
  range = 8
  cooldown = {15 31}
  sound = "SPELL_BLAST"
}
"fireball"
{
  symbol = "🔥"
  effect = Name SPELLS_FIREBALL_EFFECT Fire {}
  fx = {FIREBALL}
  range = 4
  cooldown = {15 31}
  sound = "SPELL_FIRE_SPHERE_PET"
}
"earth elemental"
{
  symbol = "👾"
  effect = Name SPELLS_EARTH_ELEMENTAL_EFFECT Summon "EARTH_ELEMENTAL" 1 100
  cooldown = {30 81}
  sound = "SPELL_FIRE_SPHERE_PET"
}
"advanced earth elemental"
{
  upgrade = "earth elemental"
  symbol = "👾"
  effect = Name SPELLS_ADVANCED_EARTH_ELEMENTAL_EFFECT Summon "EARTH_ELEMENTAL" { 2 4 } 100
  cooldown = {30 81}
  sound = "SPELL_FIRE_SPHERE_PET"
}
"ice cone"
{
  symbol = "❄"
  effect = Name SPELLS_ICE_CONE_EFFECT Ice
{}
  fx = {FLAMETHROWER ColorId LIGHT_BLUE}
  range = 4
  cooldown = {15 31}
  #sound = "SPELL_FIRE_SPHERE_PET"
}
"acid stream"
{
  symbol = "🜅"
  effect = Name SPELLS_ACID_STREAM_EFFECT Acid
{}
  fx = {FLAMETHROWER ColorId YELLOW}
  range = 4
  cooldown = {15 31}
  message = SPELLS_ACID_STREAM_MESSAGE SPELLS_ACID_STREAM_MESSAGE1
}
"black smoke breath"
{
  symbol = "🚬"
  effect = Name SPELLS_BLACK_SMOKE_BREATH_EFFECT Area 1 EmitGas "BLACK_SMOKE" 1
  fx = {FLAMETHROWER ColorId BLACK}
  range = 4
  cooldown = {15 31}
  message = SPELLS_BLACK_SMOKE_BREATH_MESSAGE SPELLS_BLACK_SMOKE_BREATH_MESSAGE1
}
"shove"
{
  symbol = "👉"
  effect = Shove
  range = 1
  cooldown = {15 31}
  message = USE_ABILITY_MESSAGE USE_ABILITY_MESSAGE1
  type = ABILITY
}
"swap positions"
{
  symbol = "⇅"
  effect = SwapPosition
  range = 1
  cooldown = {15 31}
  message = USE_ABILITY_MESSAGE USE_ABILITY_MESSAGE1
}
"black dragon blindness"
{
  symbol = "🙈"
  effect = Name SPELLS_BLACK_DRAGON_BLINDNESS_EFFECT Area 30 Filter Enemy Lasting BLIND
  cooldown = 3
}
"dragon greeting"
{
  symbol = "🏠"
  range = 10
  effect = Name SPELLS_DRAGON_GREETING_EFFECT Description SPELLS_DRAGON_GREETING_EFFECT1
    Filter And { Attacker InTerritory LastingEffect INVISIBLE } AI And{} 0 1 {
      PlayerMessage CRITICAL SPELLS_DRAGON_GREETING_EFFECT2
      Analytics "milestone" "dragonGreeting"
    }
  cooldown = 100000
  message = "" ""
}
"grant wish"
{
  symbol = "$"
  effect = Name SPELLS_GRANT_WISH_EFFECT { Wish Caster Suicide TURN_INVISIBLE }
  range = 1
  targetSelf = false
  cooldown = 150
}
"double trouble"
{
  symbol = "👤👤"
  effect = DoubleTrouble
  cooldown = {300 1001}
}
"animate weapons"
{
  symbol = "⚔️"
  effect = Name SPELLS_ANIMATE_WEAPONS_EFFECT AnimateItems 5 5 {30 50} WEAPON
  cooldown = {50 201}
}
"animate corpses"
{
  symbol = "👤"
  effect = Name SPELLS_ANIMATE_CORPSES_EFFECT AnimateItems 3 5 {10 20} CORPSE
  cooldown = {50 201}
}
"advanced animate corpses"
{
  upgrade = "animate corpses"
  symbol = "👤"
  effect = Name SPELLS_ADVANCED_ANIMATE_CORPSES_EFFECT AnimateItems 6 5 {30 50} CORPSE
  cooldown = {50 201}
}
"adoxie right hand"
{
  symbol = "-."
  effect = Name SPELLS_ADOXIE_RIGHT_HAND_EFFECT Summon "ADOXIE_HAND_RIGHT" { 1 } 50
  cooldown = 50
  sound = "SPELL_SUMMON_SPIRIT"
}
"adoxie left hand"
{
  symbol = ".-"
  effect = Name SPELLS_ADOXIE_LEFT_HAND_EFFECT Summon "ADOXIE_LEFT_HAND" { 1 } 50
  cooldown = 50
  sound = "SPELL_SUMMON_SPIRIT"
}
"adoxie left foot"
{
  symbol = "_|"
  effect = Name SPELLS_ADOXIE_LEFT_FOOT_EFFECT Summon "ADOXIE_FOOT_LEFT" { 1 } 50
  cooldown = 50
  sound = "SPELL_SUMMON_SPIRIT"
}
"adoxie right foot"
{
  symbol = "|_"
  effect = Name SPELLS_ADOXIE_RIGHT_FOOT_EFFECT Summon "ADOXIE_FOOT_RIGHT" { 1 } 50
  cooldown = 50
  sound = "SPELL_SUMMON_SPIRIT"
}
"dig"
{
  symbol = "X"
  effect = Name SPELLS_DIG_EFFECT DestroyWalls DIG
  range = 7
  cooldown = 10
  blockedByWall = false
}

Def OneTimeAbility(SpellName, SpellDesc, SpellEffect, SpellSymbol)
SpellName
{
  effect = AI And{} 0 1 Name SpellName Description SpellDesc {
    SpellEffect
    RemoveAbility SpellName
  }
  symbol = SpellSymbol
  cooldown = 1
}
End

Def OneTimeAbilityNew(SpellId, SpellName, SpellDesc, SpellEffect, SpellSymbol)
SpellId {
  effect = AI And{} 0 1 Name SpellName Description SpellDesc {
    SpellEffect
    RemoveAbility SpellId
  }
  symbol = SpellSymbol
  cooldown = 1
}
End

OneTimeAbilityNew("ennoblement", SPELLS_ENNOBLEMENT_EFFECT, SPELLS_ENNOBLEMENT_EFFECT1, { SetViewId {"vampire_lord"} SetCreatureName SPELLS_ENNOBLEMENT_ID }, "🧛")
OneTimeAbilityNew("bypass allies", SPELLS_BYPASS_ALLIES_EFFECT, SPELLS_BYPASS_ALLIES_EFFECT1, Permanent NO_FRIENDLY_FIRE, "🎯")


Def AnyCreature() Health 0 1 End
Def NoEffect() Unlock "nothing" End

"shoot arrow"
{
  symbol = "↣"
  effect = MinDistanceFromStrongEnemy(4) Name SPELLS_SHOOT_ARROW_EFFECT Description SPELLS_SHOOT_ARROW_EFFECT1
      TryNoFriendlyFire(
        {
          CreatureMessage { SPELLS_SHOOT_ARROW_SECONDPERSON SPELLS_SHOOT_ARROW_THIRDPERSON}
          Damage RANGED_DAMAGE SHOOT
        },
        CreatureMessage { SPELLS_SHOOT_ARROW_SECONDPERSON1 SPELLS_SHOOT_ARROW_THIRDPERSON1}
      )
  range = 7
  cooldown = 1
  maxHits = 1
  projectileViewId = {"arrow"}
  message = SPELLS_SHOOT_ARROW_MESSAGE SPELLS_SHOOT_ARROW_MESSAGE1
  type = ABILITY
}
"shoot bolt"
{
  symbol = "⇾"
  effect = MinDistanceFromStrongEnemy(4) Name SPELLS_SHOOT_BOLT_EFFECT Description SPELLS_SHOOT_BOLT_EFFECT1
      TryNoFriendlyFire(
        {
          CreatureMessage { SPELLS_SHOOT_BOLT_SECONDPERSON SPELLS_SHOOT_BOLT_THIRDPERSON}
          Damage RANGED_DAMAGE SHOOT
        },
        CreatureMessage { SPELLS_SHOOT_BOLT_SECONDPERSON1 SPELLS_SHOOT_BOLT_THIRDPERSON1}
      )
  range = 14
  cooldown = 3
  maxHits = 1
  projectileViewId = {"arrow"}
  message = SPELLS_SHOOT_BOLT_MESSAGE SPELLS_SHOOT_BOLT_MESSAGE1
  type = ABILITY
}
"audience"
{
  symbol = "👑"
  effect = Audience none
  cooldown = {50 101}
}
"repair automaton"
{
  symbol = "🔧"
  effect = Name SPELLS_REPAIR_AUTOMATON_EFFECT Description SPELLS_REPAIR_AUTOMATON_EFFECT1 Filter Automaton
      RegrowBodyPart 1
  range = 1
  targetSelf = true
  cooldown = 10
  sound = "TRAP_ARMING"
  message = SPELLS_REPAIR_AUTOMATON_MESSAGE SPELLS_REPAIR_AUTOMATON_MESSAGE1
  type = ABILITY
}
"chicken"
{
  symbol = "🐔"
  effect = Name SPELLS_CHICKEN_EFFECT Description SPELLS_CHICKEN_EFFECT1
      Filter Not CreatureId "CHICKEN" AI Enemy -1 1 {
    Polymorph "CHICKEN" 30
    Permanent INVULNERABLE
  }
  range = 5
  endOnly = true
  targetSelf = true
  cooldown = {30 61}
  message = SPELLS_CHICKEN_MESSAGE SPELLS_CHICKEN_MESSAGE1
}
"shapeshift"
{
  symbol = "⇝"
  effect = Name SPELLS_SHAPESHIFT_EFFECT Description SPELLS_SHAPESHIFT_EFFECT1 AI And {} 0 1 {
    Polymorph none 100
    SetCreatureName SPELLS_SHAPESHIFT_EFFECT2
  }
  message = "" ""
  cooldown = 1
}
"berserker"
{
  symbol = "🐻"
  effect = Name SPELLS_BERSERKER_EFFECT Description SPELLS_BERSERKER_EFFECT1 AI Health 0.6 1.0 1 -2 {
    Polymorph "CAVE_BEAR" 30
    IncreaseAttr DAMAGE 20
  }
  message = "" ""
  cooldown = 100
}
"summon chicken"
{
  symbol = "🐤"
  effect = Summon "CHICKEN" 1 15
  message = SPELLS_CLUCK_MESSAGE SPELLS_CLUCK_MESSAGE1
  cooldown = 5
  type = ABILITY
}
"summon more chickens"
{
  upgrade = "summon chicken"
  symbol = "🐤🐤"
  effect = Name SPELLS_SUMMON_MORE_CHICKENS_EFFECT Summon "CHICKEN" {3 5} 15
  message = SPELLS_CLUCK_MESSAGE SPELLS_CLUCK_MESSAGE1
  cooldown = {3 10}
  type = ABILITY
}
"chickenmorph"
{
  symbol = "🐣"
  effect = Name SPELLS_CHICKENMORPH_EFFECT Description SPELLS_CHICKENMORPH_EFFECT1 AI Health 0 0.4 0 1 {
    Polymorph "CHICKEN" 10
    Permanent INVULNERABLE
    Filter IsPlayer Achievement "polymorphed_into_chicken"
  }
  cooldown = {30 101}
  message = SPELLS_CLUCK_MESSAGE SPELLS_CLUCK_MESSAGE1
  type = ABILITY
}
"advanced chickenmorph"
{
  upgrade = "chickenmorph"
  symbol = "🐣"
  effect = Name SPELLS_ADVANCED_CHICKENMORPH_EFFECT Description SPELLS_ADVANCED_CHICKENMORPH_EFFECT1
      AI And { Health 0.25 1 Not Enemy } 1 -1 AI And { Not CreatureId "CHICKEN" Enemy } -1 1 {
    Polymorph "CHICKEN" 10
    Permanent INVULNERABLE
    Filter IsPlayer Achievement "polymorphed_into_chicken"
  }
  targetSelf = true
  endOnly = true
  range = 5
  cooldown = {30 101}
  message = SPELLS_CLUCK_MESSAGE SPELLS_CLUCK_MESSAGE1
  type = ABILITY
}
"chickengeddon"
{
  symbol = "🐓"
  effect = Name SPELLS_CHICKENGEDDON_EFFECT Description SPELLS_CHICKENGEDDON_EFFECT1
    Area 20 {
      Polymorph "CHICKEN" 10
      AI And {} 1 -1 Permanent INVULNERABLE
      Filter IsPlayer Achievement "polymorphed_into_chicken"
    }
  cooldown = {150 301}
  message = SPELLS_CLUCK_MESSAGE SPELLS_CLUCK_MESSAGE1
  type = ABILITY
}
"balrogs whip"
{
  symbol = "ℒ"
  effect = Name SPELLS_BALROGS_WHIP_EFFECT Description SPELLS_BALROGS_WHIP_EFFECT1 { Fire{} Damage SPELL_DAMAGE SPELL }
  fx = {BALROGS_WHIP ColorId LIGHT_RED}
  range = 4
  cooldown = 2
  endOnly = true
  message = SPELLS_BALROGS_WHIP_MESSAGE SPELLS_BALROGS_WHIP_MESSAGE1
}
"kings charge"
{
  symbol = "👑"
  effect = Name SPELLS_KINGS_CHARGE_EFFECT Description SPELLS_KINGS_CHARGE_EFFECT1 {
    Filter Attacker CreatureStatus LEADER Area 10 Filter And{ Not Enemy Distance 1 none } Lasting 40 KINGS_CHARGE
    Filter Not Attacker CreatureStatus LEADER CreatureMessage { SPELLS_KINGS_CHARGE_SECONDPERSON SPELLS_KINGS_CHARGE_THIRDPERSON }
  }
  cooldown = 300
  sound = "SPELL_STR_BONUS"
}
"shaitan insanity"
{
  symbol = "😈"
  effect = Lasting 30 INSANITY
  cooldown = 5
  range = 10
}
"tengu teleport"
{
  symbol = "🌀"
  effect = Teleport
  range = 10
  cooldown = 1
  endOnly = true
  sound = "SPELL_TELEPORT"
}
"banshee scream"
{
  symbol = "😱"
  effect = Area 6 Filter Enemy Damage SPELL_DAMAGE SPELL
  cooldown = 30
  message = SPELLS_BANSHEE_SCREAM_MESSAGE SPELLS_BANSHEE_SCREAM_MESSAGE1
  type = ABILITY
}
"vetala animate corpses"
{
  upgrade = "animate corpses"
  symbol = "👤"
  effect = Name SPELLS_VETALA_ANIMATE_CORPSES_EFFECT AnimateItems 2 5 {30 50} CORPSE
  cooldown = {3}
}
"leyak acid"
{
  symbol = "🜅"
  effect = Name SPELLS_LEYAK_ACID_EFFECT Area 1 Acid
{}
  fx = {FLAMETHROWER ColorId YELLOW}
  range = 5
  cooldown = {5 10}
  message = SPELLS_ACID_STREAM_MESSAGE SPELLS_ACID_STREAM_MESSAGE1
  type = ABILITY
}
"ghoul corpse feast"
{
  symbol = "👤"
  effect = Name SPELLS_GHOUL_CORPSE_FEAST_EFFECT Description SPELLS_GHOUL_CORPSE_FEAST_EFFECT1 ChainUntilFail {
    EatCorpse
    Lasting 200 WELL_FED
  }
  message = SPELLS_GHOUL_CORPSE_FEAST_MESSAGE SPELLS_GHOUL_CORPSE_FEAST_MESSAGE1
  cooldown = 1
  type = ABILITY
}
"healing prayer" inherit "healing" {
  effect = Name SPELLS_HEALING_EFFECT Heal { FLESH }
  message = SPELLS_HEALING_MESSAGE SPELLS_HEALING_MESSAGE1
  type = ABILITY
}
"strength prayer" inherit "damage bonus" {
  effect = Name SPELLS_DAMAGE_BONUS_EFFECT1 Lasting 40 DAM_BONUS
  message = SPELLS_DAMAGE_BONUS_MESSAGE SPELLS_DAMAGE_BONUS_MESSAGE1
  type = ABILITY
}
"protection prayer" inherit "defense bonus" {
  effect = Name SPELLS_DEFENSE_BONUS_EFFECT1 Lasting 40 DEF_BONUS
  message = SPELLS_DEFENSE_BONUS_MESSAGE SPELLS_DEFENSE_BONUS_MESSAGE1
  type = ABILITY
}
"devout healing prayer" inherit "advanced healing" {
  effect = Name SPELLS_ADVANCED_HEALING_EFFECT1 Heal { FLESH }
  message = SPELLS_ADVANCED_HEALING_MESSAGE SPELLS_ADVANCED_HEALING_MESSAGE1
  upgrade = "healing prayer"
  type = ABILITY
}

Def TryHolyMissile()
  TryNoFriendlyFire(
    {
      CreatureMessage {SPELLS_MAGIC_MISSILE_SECONDPERSON SPELLS_MAGIC_MISSILE_THIRDPERSON}
      Damage DIVINITY SPELL
    },
    CreatureMessage {SPELLS_MAGIC_MISSILE_SECONDPERSON1 SPELLS_MAGIC_MISSILE_THIRDPERSON1}
  )
End

"holy missile" inherit "magic missile"
{
  effect = MinDistanceFromStrongEnemy(2) Name SPELLS_MAGIC_MISSILE_EFFECT1 Description SPELLS_MAGIC_MISSILE_EFFECT3
      TryHolyMissile()
  type = ABILITY
}
"advanced holy missile" inherit "advanced magic missile"
{
  upgrade = "holy missile"
  effect = MinDistanceFromStrongEnemy(2) Name SPELLS_ADVANCED_MAGIC_MISSILE_EFFECT1 Description SPELLS_ADVANCED_MAGIC_MISSILE_EFFECT3
      TryHolyMissile()
  type = ABILITY
}
"expert holy missile" inherit "expert magic missile"
{
  upgrade = "advanced holy missile"
  effect = MinDistanceFromStrongEnemy(2) Name SPELLS_EXPERT_MAGIC_MISSILE_EFFECT1 Description SPELLS_EXPERT_MAGIC_MISSILE_EFFECT3
      TryHolyMissile()
  type = ABILITY
}
"bishop audience"
{
  symbol = "👑"
  effect = Name SPELLS_BISHOP_AUDIENCE_EFFECT Description SPELLS_BISHOP_AUDIENCE_EFFECT1 Filter CreatureStatus LEADER SummonMinions
  cooldown = {50 101}
}
"illness"
{
  symbol = "☣"
  effect = Lasting PLAGUE
  range = 5
  cooldown = {10 20}
  endOnly = true
}
"insanity"
{
  symbol = "😈"
  effect = Lasting 100 INSANITY
  range = 5
  cooldown = {10 20}
  endOnly = true
}
"bleeding"
{
  symbol = "💦"
  effect = Lasting 100 BLEEDING
  range = 5
  cooldown = {10 20}
  endOnly = true
}
"spider infestation"
{
  symbol = "🕷️"
  effect = Summon "SPIDER" noKillCredit {5 8} 60
  cooldown = {30 50}
}
"snake infestation"
{
  symbol = "🐍"
  effect = Summon "SNAKE" noKillCredit {5 8} 60
  cooldown = {30 50}
}
"lizard infestation"
{
  symbol = "🐉"
  effect = Summon "GIANT_LIZARD" noKillCredit {2 5} 60
  cooldown = {30 50}
}
"summon kraken"
{
  symbol = "🐙"
  effect = Description SUMMON_SINGLE_EFFECT_DESCRIPTION(KRAKEN) {
    SetFlag "placed kraken" false
    Area 8 Filter IsDeepWater {
      Filter Not Flag "placed kraken" {
        Summon "KRAKEN" noKillCredit 1 200
        SetFlag "placed kraken" true
      }
    }
    Area 8 Filter IsWater {
      Filter Not Flag "placed kraken" {
        Summon "KRAKEN" noKillCredit 1 200
        SetFlag "placed kraken" true
      }
    }
  }
  cooldown = {100 200}
}
"polymorph other"
{
  symbol = "⇌"
  effect = Polymorph none none
  cooldown = {10 20}
  range = 5
  endOnly = true
}
"girl polymorph"
{
  symbol = "👧"
  effect = AI And {} 1 -1 Lasting 100 WITCH
  cooldown = {200}
}
"strix polymorph"
{
  symbol = "🐦"
  effect = AI And {} 1 -1 Polymorph "STRIX" 40
  cooldown = {80}
}
"night hag polymorph"
{
  symbol = "👹"
  effect = AI And {} 1 -1 Polymorph "NIGHT_HAG" 40
  cooldown = {80}
}
"animate small items"
{
  symbol = "🔪"
  effect = AnimateItems 5 5 10 SMALL_ITEMS
  cooldown = {20}
}
"animate medium items"
{
  symbol = "📚"
  effect = AnimateItems 5 5 20 MEDIUM_ITEMS
  cooldown = {40}
}
"animate furniture"
{
  symbol = "🛏️"
  effect = AI And {} 1 -1 AnimateFurniture 6 5 30 false
  cooldown = {60}
}
"animate walls"
{
  symbol = "🏠"
  effect = AI And {} 1 -1 AnimateFurniture 10 5 30 true
  cooldown = {60}
}
