//****************************************************************************
// SPHERE by : Menasoft ©1997-2020
// www.sphereserver.net
// All SPHERE script files and formats are copyright Menasoft & Partners.
// This file may be freely edited for personal use, but may not be distributed
// in whole or in part, in any format without express written permission from
// Menasoft & Partners.  All donations and contributions
// become the property of Menasoft & Partners.
//****************************************************************************
// FILE LAST UPDATED: Wednesday, Jan 8, 2020
//
VERSION=0.56d

[COMMENT sphere_spells]
- Potions are just spells that have an effect attached at the potion layer.
- Spells and potion effects can be added to equipped items.
- Until monster AI is improved, all "good" spells have had the spellflag_playeronly added
- Only spells with SPELLFLAG_HARM flag can be reflected with Magic Reflection spell.
- If MAGICF_OSIFORMULAS flag is enabled on sphere.ini, it will override EFFECT / DURATION values on some spells.

///////////////////
// Magery Spells //
///////////////////

[SPELL 0]
// No effect...
DEFNAME=s_Water
NAME=Water
SOUND=0
RUNES=
CAST_TIME=0
RESOURCES=
RUNE_ITEM=0
SCROLL_ITEM=0
FLAGS=0
EFFECT_ID=0
EFFECT=0
DURATION=0.0
MANAUSE=4
SKILLREQ=MAGERY 1.0
INTERRUPT=100.0,100.0

[SPELL 1]
DEFNAME=s_clumsy
NAME=Clumsy
SOUND=snd_spell_clumsy
RUNES=UJ
CAST_TIME=0.5
RESOURCES=i_reag_blood_moss,i_reag_nightshade
RUNE_ITEM=i_rune_clumsy
SCROLL_ITEM=i_scroll_clumsy
FLAGS=spellflag_dir_anim|spellflag_targ_char|spellflag_harm|spellflag_fx_targ|spellflag_nounparalyze
EFFECT_ID=i_fx_curse
EFFECT=3,15
LAYER=layer_spell_stats
DURATION=2*60.0,3*60.0
MANAUSE=4
SKILLREQ=MAGERY 10.0
INTERRUPT=100.0,100.0

[SPELL 2]
DEFNAME=s_create_food
NAME=Create Food
SOUND=snd_spell_create_food
RUNES=IMY
CAST_TIME=0.5
RESOURCES=i_reag_garlic,i_reag_ginseng,i_reag_mandrake_root
RUNE_ITEM=i_rune_create_food
SCROLL_ITEM=i_scroll_create_food
FLAGS=spellflag_playeronly
EFFECT_ID=0
EFFECT=0
DURATION=0.0
MANAUSE=4
SKILLREQ=MAGERY 10.0
INTERRUPT=100.0,100.0

[SPELL 3]
DEFNAME=s_feeblemind
NAME=Feeblemind
SOUND=snd_spell_feeblemind
RUNES=RW
CAST_TIME=0.5
RESOURCES=i_reag_ginseng,i_reag_nightshade
RUNE_ITEM=i_rune_feeblemind
SCROLL_ITEM=i_scroll_feeblemind
FLAGS=spellflag_dir_anim|spellflag_targ_char|spellflag_harm|spellflag_fx_targ|spellflag_nounparalyze|SPELLFLAG_CURSE
EFFECT_ID=i_fx_curse
EFFECT=5,10
LAYER=layer_spell_stats
DURATION=2*60.0,3*60.0
MANAUSE=4
SKILLREQ=MAGERY 10.0
INTERRUPT=100.0,100.0

[SPELL 4]
DEFNAME=s_heal
NAME=Heal
SOUND=snd_spell_heal
RUNES=IM
CAST_TIME=0.5
RESOURCES=i_reag_garlic,i_reag_ginseng,i_reag_spider_silk
RUNE_ITEM=i_rune_heal
SCROLL_ITEM=i_scroll_heal
FLAGS=spellflag_dir_anim|spellflag_targ_char|spellflag_fx_targ|spellflag_good|spellflag_playeronly|spellflag_heal
EFFECT_ID=i_fx_heal_effect
EFFECT=5,20
DURATION=0.0
MANAUSE=4
SKILLREQ=MAGERY 10.0
INTERRUPT=100.0,100.0

[SPELL 5]
DEFNAME=s_magic_arrow
NAME=Magic Arrow
SOUND=snd_spell_magic_arrow
CAST_TIME=0.5
RUNES=IPY
RESOURCES=i_reag_sulfur_ash
RUNE_ITEM=i_rune_magic_arrow
SCROLL_ITEM=i_scroll_magic_arrow
FLAGS=spellflag_dir_anim|spellflag_targ_item|spellflag_targ_char|spellflag_harm|spellflag_damage|spellflag_fx_bolt|spellflag_resist
EFFECT_ID=i_fx_fireball_small
EFFECT=5,15
DURATION=0.0
MANAUSE=4
SKILLREQ=MAGERY 10.0
INTERRUPT=100.0,100.0
ON=@Effect
   LOCAL.DAMAGETYPE=(<DEF.dam_physical>|<DEF.dam_magic>)

[SPELL 6]
DEFNAME=s_night_sight
NAME=Night Sight
SOUND=snd_spell_night_sight
RUNES=IL
CAST_TIME=0.5
RESOURCES=i_reag_spider_silk,i_reag_sulfur_ash
RUNE_ITEM=i_rune_night_sight
SCROLL_ITEM=i_scroll_night_sight
FLAGS=spellflag_dir_anim|spellflag_targ_char|spellflag_fx_targ|spellflag_good|spellflag_playeronly
EFFECT_ID=i_fx_heal_effect
EFFECT=0
LAYER=layer_spell_night_sight
DURATION=3*60.0,10*60.0
MANAUSE=4
SKILLREQ=MAGERY 10.0
INTERRUPT=100.0,100.0

[SPELL 7]
DEFNAME=s_reactive_armor
NAME=Reactive Armor
SOUND=snd_spell_reactive_armor
RUNES=FS
CAST_TIME=0.5
RESOURCES=i_reag_garlic,i_reag_spider_silk,i_reag_sulfur_ash
RUNE_ITEM=i_rune_reactive_armor
SCROLL_ITEM=i_scroll_reactive_armor
FLAGS=spellflag_dir_anim|spellflag_targ_char|spellflag_fx_targ|spellflag_good//|spellflag_playeronly
EFFECT_ID=i_fx_heal_effect
EFFECT=10.0,60.0
LAYER=layer_spell_reactive
DURATION=3*60.0,5*60.0
MANAUSE=4
SKILLREQ=MAGERY 10.0
INTERRUPT=100.0,100.0

[SPELL 8]
DEFNAME=s_weaken
NAME=Weaken
SOUND=snd_spell_weaken
RUNES=DM
CAST_TIME=0.5
RESOURCES=i_reag_garlic,i_reag_nightshade
RUNE_ITEM=i_rune_weaken
SCROLL_ITEM=i_scroll_weaken
FLAGS=spellflag_dir_anim|spellflag_targ_char|spellflag_harm|spellflag_fx_targ|spellflag_nounparalyze|spellflag_curse
EFFECT_ID=i_fx_curse
EFFECT=5,30
LAYER=layer_spell_stats
DURATION=2*60.0,3*60.0
MANAUSE=4
SKILLREQ=MAGERY 10.0
INTERRUPT=100.0,100.0

[SPELL 9]
DEFNAME=s_agility
NAME=Agility
SOUND=snd_spell_agility
RUNES=EU
CAST_TIME=0.8
RESOURCES=i_reag_blood_moss,i_reag_mandrake_root
RUNE_ITEM=i_rune_agility
SCROLL_ITEM=i_scroll_agility
FLAGS=spellflag_dir_anim|spellflag_targ_char|spellflag_fx_targ|spellflag_good|spellflag_playeronly|spellflag_bless
EFFECT_ID=i_fx_bless_effect
EFFECT=5,20
LAYER=layer_spell_stats
DURATION=2*60.0,3*60.0
MANAUSE=6
SKILLREQ=MAGERY 20.0
INTERRUPT=100.0,100.0

[SPELL 10]
DEFNAME=s_cunning
NAME=Cunning
SOUND=snd_spell_cunning
RUNES=UW
CAST_TIME=0.8
RESOURCES=i_reag_mandrake_root,i_reag_nightshade
RUNE_ITEM=i_rune_cunning
SCROLL_ITEM=i_scroll_cunning
FLAGS=spellflag_dir_anim|spellflag_targ_char|spellflag_fx_targ|spellflag_good|spellflag_playeronly|spellflag_bless
EFFECT_ID=i_fx_bless_effect
EFFECT=5,20
LAYER=layer_spell_stats
DURATION=2*60.0,3*60.0
MANAUSE=6
SKILLREQ=MAGERY 20.0
INTERRUPT=100.0,100.0

[SPELL 11]
DEFNAME=s_cure
NAME=Cure
SOUND=snd_SPELL_CURE
RUNES=AN
CAST_TIME=0.8
RESOURCES=i_reag_garlic,i_reag_ginseng
RUNE_ITEM=i_rune_cure
SCROLL_ITEM=i_scroll_cure
FLAGS=spellflag_dir_anim|spellflag_targ_char|spellflag_fx_targ|spellflag_good|spellflag_playeronly
EFFECT_ID=i_fx_heal_effect
EFFECT=0
DURATION=0.0
MANAUSE=6
SKILLREQ=MAGERY 20.0
INTERRUPT=100.0,100.0

[SPELL 12]
DEFNAME=s_harm
NAME=Harm
SOUND=snd_spell_harm
RUNES=AM
CAST_TIME=0.8
RESOURCES=i_reag_nightshade,i_reag_spider_silk
RUNE_ITEM=i_rune_harm
SCROLL_ITEM=i_scroll_harm
FLAGS=spellflag_dir_anim|spellflag_targ_item|spellflag_targ_char|spellflag_harm|spellflag_damage|spellflag_fx_targ|spellflag_resist
EFFECT_ID=i_fx_curse
EFFECT=5,16
DURATION=0.0
MANAUSE=6
SKILLREQ=MAGERY 20.0
INTERRUPT=100.0,100.0
ON=@Effect
   LOCAL.DAMAGETYPE=(<DEF.dam_physical>|<DEF.dam_magic>)

[SPELL 13]
DEFNAME=s_magic_trap
NAME=Magic Trap
SOUND=snd_spell_magic_trap
RUNES=IJ
CAST_TIME=0.8
RESOURCES=i_reag_garlic,i_reag_spider_silk,i_reag_sulfur_ash
RUNE_ITEM=i_rune_magic_trap
SCROLL_ITEM=i_scroll_magic_trap
FLAGS=spellflag_dir_anim|spellflag_targ_item|spellflag_playeronly
EFFECT_ID=0
EFFECT=0
DURATION=0.0
MANAUSE=6
SKILLREQ=MAGERY 20.0
INTERRUPT=100.0,100.0

[SPELL 14]
DEFNAME=s_magic_untrap
NAME=Magic Untrap
SOUND=snd_spell_magic_untrap
RUNES=AJ
CAST_TIME=0.8
RESOURCES=i_reag_blood_moss,i_reag_sulfur_ash
RUNE_ITEM=i_rune_magic_untrap
SCROLL_ITEM=i_scroll_magic_untrap
FLAGS=spellflag_dir_anim|spellflag_targ_item|spellflag_playeronly
EFFECT_ID=0
EFFECT=0
DURATION=0.0
MANAUSE=6
SKILLREQ=MAGERY 20.0
INTERRUPT=100.0,100.0

[SPELL 15]
DEFNAME=s_protection
NAME=Protection
SOUND=snd_spell_protection
RUNES=US
CAST_TIME=0.8
RESOURCES=i_reag_garlic,i_reag_ginseng,i_reag_sulfur_ash
RUNE_ITEM=i_rune_protection
SCROLL_ITEM=i_scroll_protection
FLAGS=spellflag_dir_anim|spellflag_targ_char|spellflag_fx_targ|spellflag_good|spellflag_playeronly|spellflag_bless
EFFECT_ID=i_fx_sparkle
EFFECT=5,35
LAYER=layer_spell_protection
DURATION=3*60.0,5*60.0
MANAUSE=6
SKILLREQ=MAGERY 20.0
INTERRUPT=100.0,100.0

[SPELL 16]
DEFNAME=s_strength
NAME=Strength
SOUND=snd_spell_strength
RUNES=UM
CAST_TIME=0.8
RESOURCES=i_reag_mandrake_root,i_reag_nightshade
RUNE_ITEM=i_rune_strength
SCROLL_ITEM=i_scroll_strength
FLAGS=spellflag_dir_anim|spellflag_targ_char|spellflag_fx_targ|spellflag_good|spellflag_playeronly|spellflag_bless
EFFECT_ID=i_fx_bless_effect
EFFECT=5,15
LAYER=layer_spell_stats
DURATION=2*60.0,3*60.0
MANAUSE=6
SKILLREQ=MAGERY 20.0
INTERRUPT=100.0,100.0

[SPELL 17]
DEFNAME=s_bless
NAME=Bless
SOUND=snd_spell_bless
RUNES=RS
CAST_TIME=1.0
RESOURCES=i_reag_garlic,i_reag_mandrake_root
RUNE_ITEM=i_rune_bless
SCROLL_ITEM=i_scroll_bless
FLAGS=spellflag_dir_anim|spellflag_targ_obj|spellflag_fx_targ|spellflag_good|spellflag_playeronly|spellflag_bless
EFFECT_ID=i_fx_bless_effect
EFFECT=5,20
LAYER=layer_spell_stats
DURATION=2*60.0,3*60.0
MANAUSE=9
SKILLREQ=MAGERY 30.0
INTERRUPT=100.0,100.0

[SPELL 18]
DEFNAME=s_fireball
NAME=Fireball
SOUND=snd_spell_fireball
RUNES=VF
CAST_TIME=1.0
RESOURCES=i_reag_black_pearl
RUNE_ITEM=i_rune_fireball
SCROLL_ITEM=i_scroll_fireball
FLAGS=spellflag_dir_anim|spellflag_targ_obj|spellflag_harm|spellflag_damage|spellflag_fx_bolt|spellflag_resist
EFFECT_ID=i_fx_fireball
EFFECT=8,16
DURATION=0.0
MANAUSE=9
SKILLREQ=MAGERY 30.0
INTERRUPT=100.0,100.0
ON=@Effect
   LOCAL.DAMAGETYPE=(<DEF.dam_fire>|<DEF.dam_magic>)

[SPELL 19]
DEFNAME=s_magic_lock
NAME=Magic Lock
SOUND=snd_spell_magic_lock
RUNES=AP
CAST_TIME=1.0
RESOURCES=i_reag_blood_moss,i_reag_garlic,i_reag_sulfur_ash
RUNE_ITEM=i_rune_magic_lock
SCROLL_ITEM=i_scroll_magic_lock
FLAGS=spellflag_dir_anim|spellflag_targ_item|spellflag_playeronly
EFFECT_ID=0
EFFECT=0
DURATION=0.0
MANAUSE=9
SKILLREQ=MAGERY 30.0
INTERRUPT=100.0,100.0

[SPELL 20]
DEFNAME=s_poison
NAME=Poison
SOUND=snd_spell_poison
RUNES=IN
CAST_TIME=1.0
RESOURCES=i_reag_nightshade
RUNE_ITEM=i_rune_poison
SCROLL_ITEM=i_scroll_poison
FLAGS=spellflag_dir_anim|spellflag_targ_obj|spellflag_harm|spellflag_fx_targ|spellflag_resist
EFFECT_ID=i_fx_curse
EFFECT=100,750	//Only used without Magicf_OsiFormulas
LAYER=layer_flag_poison
DURATION=1.0,15.0
MANAUSE=9
SKILLREQ=MAGERY 30.0
INTERRUPT=100.0,100.0

[SPELL 21]
DEFNAME=s_telekinesis
NAME=Telekinesis
SOUND=snd_spell_telekinesis
RUNES=OPY
CAST_TIME=1.0
RESOURCES=i_reag_blood_moss,i_reag_mandrake_root
RUNE_ITEM=i_rune_telekinesis
SCROLL_ITEM=i_scroll_telekinesis
FLAGS=spellflag_dir_anim|spellflag_targ_obj|spellflag_fx_targ|spellflag_playeronly
EFFECT_ID=0
EFFECT=0
DURATION=0.0
MANAUSE=9
SKILLREQ=MAGERY 30.0
INTERRUPT=100.0,100.0

[SPELL 22]
// NOTE: Teleport sound/effect_id is handled by sphere.ini settings
DEFNAME=s_teleport
NAME=Teleport
SOUND=0
RUNES=RP
CAST_TIME=1.0
RESOURCES=i_reag_blood_moss,i_reag_mandrake_root
RUNE_ITEM=i_rune_teleport
SCROLL_ITEM=i_scroll_teleport
FLAGS=spellflag_dir_anim|spellflag_targ_xyz|spellflag_playeronly
EFFECT_ID=0
EFFECT=0
DURATION=0.0
MANAUSE=9
SKILLREQ=MAGERY 30.0
INTERRUPT=100.0,100.0

[SPELL 23]
DEFNAME=s_unlock
NAME=Magic Unlock
SOUND=snd_spell_unlock
RUNES=EP
CAST_TIME=1.0
RESOURCES=i_reag_blood_moss,i_reag_sulfur_ash
RUNE_ITEM=i_rune_unlock
SCROLL_ITEM=i_scroll_unlock
FLAGS=spellflag_dir_anim|spellflag_targ_item|spellflag_fx_targ|spellflag_playeronly
EFFECT_ID=0
EFFECT=0
DURATION=0.0
MANAUSE=9
SKILLREQ=MAGERY 30.0
INTERRUPT=100.0,100.0

[SPELL 24]
DEFNAME=s_wall_of_stone
NAME=Wall of Stone
SOUND=snd_spell_wall_of_stone
RUNES=ISY
CAST_TIME=1.0
RESOURCES=i_reag_blood_moss,i_reag_garlic
RUNE_ITEM=i_rune_wall_of_stone
SCROLL_ITEM=i_scroll_wall_of_stone
FLAGS=spellflag_dir_anim|spellflag_targ_xyz|spellflag_harm|spellflag_fx_targ|spellflag_field|spellflag_playeronly
EFFECT_ID=0
EFFECT=0
DURATION=2*60.0,4*60.0
MANAUSE=9
SKILLREQ=MAGERY 30.0
INTERRUPT=100.0,100.0
ON=@Success
   LOCAL.FieldWidth=3
ON=@Effect
   LOCAL.DAMAGETYPE=(<DEF.dam_physical>|<DEF.dam_magic>)

[SPELL 25]
DEFNAME=s_archcure
NAME=Arch Cure
SOUND=snd_spell_archcure
RUNES=VAN
CAST_TIME=1.3
RESOURCES=i_reag_garlic,i_reag_ginseng,i_reag_mandrake_root
RUNE_ITEM=i_rune_archcure
SCROLL_ITEM=i_scroll_archcure
FLAGS=spellflag_fx_targ|spellflag_good|spellflag_playeronly|spellflag_area
EFFECT_ID=i_fx_heal_effect
EFFECT=0
DURATION=0.0
MANAUSE=11
SKILLREQ=MAGERY 40.0
INTERRUPT=100.0,100.0
ON=@Success
   LOCAL.AREARADIUS=2

[SPELL 26]
DEFNAME=s_archprotection
NAME=Arch Protection
SOUND=snd_spell_archprotection
RUNES=VUS
CAST_TIME=1.3
RESOURCES=i_reag_garlic,i_reag_ginseng,i_reag_mandrake_root,i_reag_sulfur_ash
RUNE_ITEM=i_rune_archprotection
SCROLL_ITEM=i_scroll_archprotection
FLAGS=spellflag_fx_targ|spellflag_good|spellflag_playeronly|spellflag_area|spellflag_bless
EFFECT_ID=i_fx_bless_effect
EFFECT=5,15
LAYER=layer_spell_protection	//No real need, since this calls s_protection... but for some custom modifications for arch spells this may be needed
DURATION=30.0,1000.0
MANAUSE=11
SKILLREQ=MAGERY 40.0
INTERRUPT=100.0,100.0
ON=@Success
   LOCAL.AREARADIUS=3

[SPELL 27]
DEFNAME=s_curse
NAME=Curse
SOUND=snd_spell_curse
RUNES=DS
CAST_TIME=1.3
RESOURCES=i_reag_garlic,i_reag_nightshade,i_reag_sulfur_ash
RUNE_ITEM=i_rune_curse
SCROLL_ITEM=i_scroll_curse
FLAGS=spellflag_dir_anim|spellflag_targ_obj|spellflag_harm|spellflag_fx_targ|spellflag_nounparalyze|spellflag_curse
EFFECT_ID=i_fx_curse
EFFECT=5,15
LAYER=layer_spell_stats
DURATION=10.0,60.0
MANAUSE=11
SKILLREQ=MAGERY 40.0
INTERRUPT=100.0,100.0

[SPELL 28]
DEFNAME=s_fire_field
NAME=Fire Field
SOUND=snd_spell_fire_field
RUNES=IFG
CAST_TIME=1.3
RESOURCES=i_reag_black_pearl,i_reag_spider_silk,i_reag_sulfur_ash
RUNE_ITEM=i_rune_fire_field
SCROLL_ITEM=i_scroll_fire_field
FLAGS=spellflag_dir_anim|spellflag_targ_xyz|spellflag_harm|spellflag_damage|spellflag_fx_targ|spellflag_field|spellflag_playeronly
EFFECT_ID=0
EFFECT=2,12
DURATION=2*60.0,4*60.0
MANAUSE=11
SKILLREQ=MAGERY 40.0
INTERRUPT=100.0,100.0
ON=@Success
   LOCAL.FieldWidth=5
ON=@Effect
   LOCAL.DAMAGETYPE=(<DEF.dam_fire>|<DEF.dam_magic>)

[SPELL 29]
DEFNAME=s_greater_heal
NAME=Greater Heal
SOUND=snd_spell_greater_heal
RUNES=IVM
CAST_TIME=1.3
RESOURCES=i_reag_garlic,i_reag_ginseng,i_reag_mandrake_root,i_reag_spider_silk
RUNE_ITEM=i_rune_greater_heal
SCROLL_ITEM=i_scroll_greater_heal
FLAGS=spellflag_dir_anim|spellflag_targ_char|spellflag_fx_targ|spellflag_good|spellflag_playeronly|spellflag_heal
EFFECT_ID=i_fx_heal_effect
EFFECT=10,50
DURATION=0.0
MANAUSE=11
SKILLREQ=MAGERY 40.0
INTERRUPT=100.0,100.0

[SPELL 30]
DEFNAME=s_lightning
NAME=Lightning
SOUND=snd_spell_lightning
RUNES=POG
CAST_TIME=1.3
RESOURCES=i_reag_mandrake_root,i_reag_sulfur_ash
RUNE_ITEM=i_rune_lightning
SCROLL_ITEM=i_scroll_lightning
FLAGS=spellflag_dir_anim|spellflag_targ_obj|spellflag_fx_targ|spellflag_harm|spellflag_damage|spellflag_resist
EFFECT_ID=0
EFFECT=10,20
DURATION=0.0
MANAUSE=11
SKILLREQ=MAGERY 40.0
INTERRUPT=100.0,100.0
ON=@Effect
   LOCAL.DAMAGETYPE=(<DEF.dam_energy>|<DEF.dam_magic>)

[SPELL 31]
DEFNAME=s_mana_drain
NAME=Mana Drain
SOUND=snd_spell_mana_drain
RUNES=OR
CAST_TIME=1.3
RESOURCES=i_reag_black_pearl,i_reag_mandrake_root,i_reag_spider_silk
RUNE_ITEM=i_rune_mana_drain
SCROLL_ITEM=i_scroll_mana_drain
FLAGS=spellflag_dir_anim|spellflag_targ_char|spellflag_harm|spellflag_fx_targ|spellflag_resist
EFFECT_ID=i_fx_vortex
EFFECT=0
LAYER=layer_spell_stats
DURATION=5.0
MANAUSE=11
SKILLREQ=MAGERY 40.0
INTERRUPT=100.0,100.0

[SPELL 32]
DEFNAME=s_recall
NAME=Recall
SOUND=snd_spell_recall
RUNES=KOP
CAST_TIME=1.3
RESOURCES=i_reag_black_pearl,i_reag_blood_moss,i_reag_mandrake_root
RUNE_ITEM=i_rune_recall
SCROLL_ITEM=i_scroll_recall
FLAGS=spellflag_targ_item|spellflag_playeronly
EFFECT_ID=i_fx_smoke
EFFECT=0
DURATION=0.0
MANAUSE=11
SKILLREQ=MAGERY 40.0
INTERRUPT=100.0,100.0

[SPELL 33]
DEFNAME=s_blade_spirits
NAME=Blade Spirit
SOUND=snd_spell_blade_spirits
RUNES=IJHY
CAST_TIME=7.5
RESOURCES=i_reag_black_pearl,i_reag_mandrake_root,i_reag_nightshade
RUNE_ITEM=i_rune_blade_spirits
SCROLL_ITEM=i_scroll_blade_spirits
FLAGS=spellflag_dir_anim|spellflag_targ_xyz|spellflag_summon
EFFECT_ID=0
EFFECT=0
LAYER=layer_spell_summon
DURATION=60.0,2*60.0
MANAUSE=18
SKILLREQ=MAGERY 50.0
INTERRUPT=100.0,100.0

[SPELL 34]
DEFNAME=s_dispel_field
NAME=Dispel Field
SOUND=snd_spell_dispel_field
RUNES=AG
CAST_TIME=1.5
RESOURCES=i_reag_black_pearl,i_reag_garlic,i_reag_spider_silk,i_reag_sulfur_ash
RUNE_ITEM=i_rune_dispel_field
SCROLL_ITEM=i_scroll_dispel_field
FLAGS=spellflag_dir_anim|spellflag_targ_item|spellflag_playeronly
EFFECT_ID=i_fx_heal_effect
EFFECT=0
DURATION=0.0
MANAUSE=14
SKILLREQ=MAGERY 50.0
INTERRUPT=100.0,100.0

[SPELL 35]
DEFNAME=s_incognito
NAME=Incognito
SOUND=snd_spell_incognito
RUNES=KIE
CAST_TIME=1.5
RESOURCES=i_reag_blood_moss,i_reag_garlic,i_reag_nightshade
RUNE_ITEM=i_rune_incognito
SCROLL_ITEM=i_scroll_incognito
FLAGS=spellflag_playeronly
EFFECT_ID=0
EFFECT=0
LAYER=layer_spell_incognito
DURATION=5*60.0,8*60.0
MANAUSE=14
SKILLREQ=MAGERY 50.0
INTERRUPT=100.0,100.0

[SPELL 36]
DEFNAME=s_magic_reflection
NAME=Magic Reflection
SOUND=snd_spell_magic_reflection
RUNES=IJS
CAST_TIME=1.5
RESOURCES=i_reag_garlic,i_reag_mandrake_root,i_reag_spider_silk
RUNE_ITEM=i_rune_magic_reflection
SCROLL_ITEM=i_scroll_magic_reflection
FLAGS=spellflag_dir_anim|spellflag_targ_char|spellflag_fx_targ|spellflag_good|spellflag_playeronly|spellflag_bless
EFFECT_ID=i_fx_bless_effect
EFFECT=0
LAYER=layer_spell_magic_reflect
DURATION=4*60.0,8*60.0
MANAUSE=14
SKILLREQ=MAGERY 50.0
INTERRUPT=100.0,100.0

[SPELL 37]
DEFNAME=s_mind_blast
NAME=Mind Blast
SOUND=snd_spell_mind_blast
RUNES=PCW
CAST_TIME=1.5
RESOURCES=i_reag_black_pearl,i_reag_mandrake_root,i_reag_nightshade,i_reag_sulfur_ash
RUNE_ITEM=i_rune_mind_blast
SCROLL_ITEM=i_scroll_mind_blast
FLAGS=spellflag_dir_anim|spellflag_targ_char|spellflag_harm|spellflag_damage|spellflag_fx_targ|spellflag_resist|spellflag_nounparalyze
EFFECT_ID=i_fx_curse
EFFECT=5,20
DURATION=0.0
MANAUSE=14
SKILLREQ=MAGERY 50.0
INTERRUPT=100.0,100.0
ON=@Effect
   LOCAL.DAMAGETYPE=(<DEF.dam_cold>|<DEF.dam_magic>)

[SPELL 38]
DEFNAME=s_paralyze
NAME=Paralyze
SOUND=snd_spell_paralyze
RUNES=AEP
CAST_TIME=1.5
RESOURCES=i_reag_garlic,i_reag_mandrake_root,i_reag_spider_silk
RUNE_ITEM=i_rune_paralyze
SCROLL_ITEM=i_scroll_paralyze
FLAGS=spellflag_dir_anim|spellflag_targ_char|spellflag_harm|spellflag_fx_targ|spellflag_resist|spellflag_nounparalyze
EFFECT_ID=i_fx_curse
EFFECT=0
LAYER=layer_spell_paralyze
DURATION=60.0,3*60.0
MANAUSE=14
SKILLREQ=MAGERY 50.0
INTERRUPT=100.0,100.0

[SPELL 39]
DEFNAME=s_poison_field
NAME=Poison Field
SOUND=snd_spell_poison_field
RUNES=ING
CAST_TIME=1.5
RESOURCES=i_reag_black_pearl,i_reag_nightshade,i_reag_spider_silk
RUNE_ITEM=i_rune_poison_field
SCROLL_ITEM=i_scroll_poison_field
FLAGS=spellflag_dir_anim|spellflag_targ_xyz|spellflag_harm|spellflag_damage|spellflag_fx_targ|spellflag_field|spellflag_playeronly
EFFECT_ID=i_fx_curse
EFFECT=5,50 // 50,500
LAYER=layer_flag_poison
DURATION=2*60.0,4*60.0
MANAUSE=14
SKILLREQ=MAGERY 50.0
INTERRUPT=100.0,100.0
ON=@Success
   LOCAL.FieldWidth=5
ON=@Effect
   LOCAL.DAMAGETYPE=(<DEF.dam_poison>|<DEF.dam_magic>)

[SPELL 40]
DEFNAME=s_summon_creature
NAME=Summon Creature
SOUND=snd_spell_summon_creature
RUNES=KX
CAST_TIME=7.5
RESOURCES=i_reag_blood_moss,i_reag_mandrake_root,i_reag_spider_silk
RUNE_ITEM=i_rune_summon_creature
SCROLL_ITEM=i_scroll_summon_creature
FLAGS=spellflag_dir_anim|spellflag_summon|spellflag_playeronly
EFFECT_ID=0
EFFECT=0
LAYER=layer_spell_summon
DURATION=3*60.0,5*60.0
MANAUSE=18
SKILLREQ=MAGERY 50.0
INTERRUPT=100.0,100.0

[SPELL 41]
DEFNAME=s_dispel
NAME=Dispel
SOUND=snd_spell_dispel
RUNES=AO
CAST_TIME=1.8
RESOURCES=i_reag_garlic,i_reag_mandrake_root,i_reag_sulfur_ash
RUNE_ITEM=i_rune_dispel
SCROLL_ITEM=i_scroll_dispel
FLAGS=spellflag_dir_anim|spellflag_targ_char
EFFECT_ID=i_fx_smoke
EFFECT=0
DURATION=0.0
MANAUSE=20
SKILLREQ=MAGERY 60.0
INTERRUPT=100.0,100.0

[SPELL 42]
DEFNAME=s_energy_bolt
NAME=Energy Bolt
SOUND=snd_spell_energy_bolt
RUNES=CP
CAST_TIME=1.8
RESOURCES=i_reag_black_pearl,i_reag_nightshade
RUNE_ITEM=i_rune_energy_bolt
SCROLL_ITEM=i_scroll_energy_bolt
FLAGS=spellflag_dir_anim|spellflag_targ_obj|spellflag_harm|spellflag_damage|spellflag_fx_bolt|spellflag_resist
EFFECT_ID=i_fx_ebolt
EFFECT=10,45
DURATION=0.0
MANAUSE=20
SKILLREQ=MAGERY 60.0
INTERRUPT=100.0,100.0
ON=@Effect
   LOCAL.DAMAGETYPE=(<DEF.dam_energy>|<DEF.dam_magic>)

[SPELL 43]
DEFNAME=s_explosion
NAME=Explosion
SOUND=snd_spell_explosion
RUNES=VOF
CAST_TIME=3.8
RESOURCES=i_reag_blood_moss,i_reag_mandrake_root
RUNE_ITEM=i_rune_explosion
SCROLL_ITEM=i_scroll_explosion
FLAGS=spellflag_dir_anim|spellflag_targ_obj|spellflag_harm|spellflag_damage|spellflag_fx_targ|spellflag_resist
EFFECT_ID=i_fx_explode
EFFECT=15,35
DURATION=0.0
MANAUSE=20
SKILLREQ=MAGERY 60.0
INTERRUPT=100.0,100.0
ON=@Effect
   LOCAL.DAMAGETYPE=(<DEF.dam_general>|<DEF.dam_magic>)

[SPELL 44]
DEFNAME=s_invisibility
NAME=Invisibility
SOUND=snd_spell_invisibility
RUNES=ALX
CAST_TIME=1.8
RESOURCES=i_reag_blood_moss,i_reag_nightshade
RUNE_ITEM=i_rune_invisibility
SCROLL_ITEM=i_scroll_invisibility
FLAGS=spellflag_dir_anim|spellflag_targ_char|spellflag_good|spellflag_playeronly
EFFECT_ID=0
EFFECT=0
LAYER=layer_spell_invis
DURATION=3*60.0,5*60.0
MANAUSE=20
SKILLREQ=MAGERY 60.0
INTERRUPT=100.0,100.0

[SPELL 45]
DEFNAME=s_mark
NAME=Mark
SOUND=snd_spell_mark
RUNES=KPY
CAST_TIME=1.8
RESOURCES=i_reag_black_pearl,i_reag_blood_moss,i_reag_mandrake_root
RUNE_ITEM=i_rune_mark
SCROLL_ITEM=i_scroll_mark
FLAGS=spellflag_targ_item|spellflag_playeronly
EFFECT_ID=0
EFFECT=1,10
DURATION=0.0
MANAUSE=20
SKILLREQ=MAGERY 60.0
INTERRUPT=100.0,100.0
ON=@Effect
   REF1=<TOPOBJ>
   LOCAL.InsideHouse=<QVAL (<ISEMPTY <REGION.TYPE>>)? 0:1>
   IF (<REF1.P.M> == 0)		// Felucca
      COLOR=<QVAL (<LOCAL.InsideHouse>)? 066d:0>
   ELIF (<REF1.P.M> == 1)	// Trammel
      COLOR=<QVAL (<LOCAL.InsideHouse>)? 047f:032>
   ELIF (<REF1.P.M> == 3)	// Malas
      COLOR=<QVAL (<LOCAL.InsideHouse>)? 055f:044e>
   ELIF (<REF1.P.M> == 4)	// Tokuno Islands
      COLOR=<QVAL (<LOCAL.InsideHouse>)? 047f:0482>
   ELIF (<REF1.P.M> == 5)	// Ter Mur
      COLOR=048a
   ENDIF

[SPELL 46]
DEFNAME=s_mass_curse
NAME=Mass Curse
SOUND=snd_spell_mass_curse
RUNES=VDS
CAST_TIME=1.8
RESOURCES=i_reag_garlic,i_reag_mandrake_root,i_reag_nightshade,i_reag_sulfur_ash
RUNE_ITEM=i_rune_mass_curse
SCROLL_ITEM=i_scroll_mass_curse
FLAGS=spellflag_harm|spellflag_fx_targ|spellflag_playeronly|spellflag_area|spellflag_nounparalyze|spellflag_curse
EFFECT_ID=i_fx_curse
EFFECT=5,30
DURATION=0.0
MANAUSE=20
LAYER=layer_spell_stats
SKILLREQ=MAGERY 60.0
INTERRUPT=100.0,100.0
ON=@Success
   LOCAL.AREARADIUS=2

[SPELL 47]
DEFNAME=s_paralyzation_field
NAME=Paralyze Field
SOUND=snd_spell_paralyze_field
RUNES=IEG
CAST_TIME=1.8
RESOURCES=i_reag_black_pearl,i_reag_ginseng,i_reag_spider_silk
RUNE_ITEM=i_rune_paralyze_field
SCROLL_ITEM=i_scroll_paralyze_field
FLAGS=spellflag_dir_anim|spellflag_targ_xyz|spellflag_harm|spellflag_fx_targ|spellflag_field|spellflag_playeronly|spellflag_nounparalyze
EFFECT_ID=i_fx_curse
EFFECT=0
LAYER=layer_spell_paralyze
DURATION=2*60.0,3*60.0
MANAUSE=20
SKILLREQ=MAGERY 60.0
INTERRUPT=100.0,100.0
ON=@Success
   LOCAL.FieldWidth=5

[SPELL 48]
DEFNAME=s_reveal
NAME=Reveal
SOUND=snd_spell_reveal
RUNES=WQ
CAST_TIME=1.8
RESOURCES=i_reag_blood_moss,i_reag_sulfur_ash
RUNE_ITEM=i_rune_reveal
SCROLL_ITEM=i_scroll_reveal
FLAGS=spellflag_area|spellflag_fx_targ
EFFECT_ID=i_fx_sparkle
EFFECT=0
DURATION=0.0
MANAUSE=20
SKILLREQ=MAGERY 60.0
INTERRUPT=100.0,100.0
ON=@Success
   LOCAL.AREARADIUS=<eval 1+(<MAGERY>/200)>

[SPELL 49]
DEFNAME=s_chain_lightning
NAME=Chain Lightning
SOUND=snd_spell_chain_lightning
RUNES=VOG
CAST_TIME=2.0
RESOURCES=i_reag_black_pearl,i_reag_blood_moss,i_reag_mandrake_root,i_reag_sulfur_ash
RUNE_ITEM=i_rune_chain_lightning
SCROLL_ITEM=i_scroll_chain_lightning
FLAGS=spellflag_dir_anim|spellflag_targ_xyz|spellflag_harm|spellflag_damage|spellflag_area|spellflag_resist|spellflag_playeronly
EFFECT_ID=0
EFFECT=10,20
DURATION=0.0
MANAUSE=40
SKILLREQ=MAGERY 70.0
INTERRUPT=100.0,100.0
ON=@Success
   LOCAL.AREARADIUS=2
ON=@Effect
   LOCAL.DAMAGETYPE=(<DEF.dam_energy>|<DEF.dam_magic>)

[SPELL 50]
DEFNAME=s_energy_field
NAME=Energy Field
SOUND=snd_spell_energy_field
RUNES=ISG
CAST_TIME=2.0
RESOURCES=i_reag_black_pearl,i_reag_mandrake_root,i_reag_spider_silk,i_reag_sulfur_ash
RUNE_ITEM=i_rune_energy_field
SCROLL_ITEM=i_scroll_energy_field
FLAGS=spellflag_dir_anim|spellflag_targ_xyz|spellflag_harm|spellflag_fx_targ|spellflag_field|spellflag_playeronly
EFFECT_ID=0
EFFECT=0
DURATION=2*60.0,3*60.0
MANAUSE=40
SKILLREQ=MAGERY 70.0
INTERRUPT=100.0,100.0
ON=@Success
   LOCAL.FieldWidth=5

[SPELL 51]
DEFNAME=s_flamestrike
NAME=Flamestrike
SOUND=snd_spell_flamestrike
RUNES=KVF
CAST_TIME=2.0
RESOURCES=i_reag_spider_silk,i_reag_sulfur_ash
RUNE_ITEM=i_rune_flamestrike
SCROLL_ITEM=i_scroll_flamestrike
FLAGS=spellflag_dir_anim|spellflag_targ_obj|spellflag_harm|spellflag_damage|spellflag_fx_targ|spellflag_resist
EFFECT_ID=i_fire_column
EFFECT=25,50
DURATION=0.0
MANAUSE=40
SKILLREQ=MAGERY 70.0
INTERRUPT=100.0,100.0
ON=@Effect
   LOCAL.DAMAGETYPE=(<DEF.dam_fire>|<DEF.dam_magic>)

[SPELL 52]
DEFNAME=s_gate_travel
NAME=Gate Travel
SOUND=snd_spell_gate_travel
RUNES=VRP
CAST_TIME=2.0
RESOURCES=i_reag_black_pearl,i_reag_mandrake_root,i_reag_sulfur_ash
RUNE_ITEM=i_rune_gate_travel
SCROLL_ITEM=i_scroll_gate_travel
FLAGS=spellflag_targ_item|spellflag_playeronly
EFFECT_ID=0
EFFECT=0
DURATION=60.0
MANAUSE=40
SKILLREQ=MAGERY 70.0
INTERRUPT=100.0,100.0

[SPELL 53]
DEFNAME=s_mana_vampire
NAME=Mana Vampire
SOUND=snd_spell_mana_vampire
RUNES=OS
CAST_TIME=2.0
RESOURCES=i_reag_black_pearl,i_reag_blood_moss,i_reag_mandrake_root,i_reag_spider_silk
RUNE_ITEM=i_rune_mana_vampire
SCROLL_ITEM=i_scroll_mana_vampire
FLAGS=spellflag_dir_anim|spellflag_targ_char|spellflag_harm|spellflag_fx_targ|spellflag_resist
EFFECT_ID=i_fx_curse
EFFECT=0
DURATION=0.0
MANAUSE=40
SKILLREQ=MAGERY 70.0
INTERRUPT=100.0,100.0

[SPELL 54]
DEFNAME=s_mass_dispel
NAME=Mass Dispel
SOUND=snd_spell_mass_dispel
RUNES=VAO
CAST_TIME=2.0
RESOURCES=i_reag_black_pearl,i_reag_garlic,i_reag_mandrake_root,i_reag_sulfur_ash
RUNE_ITEM=i_rune_mass_dispel
SCROLL_ITEM=i_scroll_mass_dispel
FLAGS=spellflag_fx_targ|spellflag_area
EFFECT_ID=i_fx_smoke
EFFECT=0
DURATION=0.0
MANAUSE=40
SKILLREQ=MAGERY 70.0
INTERRUPT=100.0,100.0
ON=@Success
   LOCAL.AREARADIUS=8

[SPELL 55]
DEFNAME=s_meteor_swarm
NAME=Meteor Swarm
SOUND=snd_spell_meteor_swarm
RUNES=FKDY
CAST_TIME=2.0
RESOURCES=i_reag_blood_moss,i_reag_mandrake_root,i_reag_spider_silk,i_reag_sulfur_ash
RUNE_ITEM=i_rune_meteor_swarm
SCROLL_ITEM=i_scroll_meteor_swarm
FLAGS=spellflag_dir_anim|spellflag_targ_xyz|spellflag_harm|spellflag_damage|spellflag_area|spellflag_fx_bolt|spellflag_resist|spellflag_playeronly
EFFECT_ID=i_fx_fireball
EFFECT=35,50
DURATION=0.0
MANAUSE=40
SKILLREQ=MAGERY 70.0
INTERRUPT=100.0,100.0
ON=@Success
   LOCAL.AREARADIUS=2
ON=@Effect
   LOCAL.DAMAGETYPE=(<DEF.dam_physical>|<DEF.dam_magic>)

[SPELL 56]
DEFNAME=s_polymorph
NAME=Polymorph
SOUND=snd_spell_polymorph
RUNES=VYR
CAST_TIME=2.0
RESOURCES=i_reag_blood_moss,i_reag_mandrake_root,i_reag_spider_silk
RUNE_ITEM=i_rune_polymorph
SCROLL_ITEM=i_scroll_polymorph
FLAGS=spellflag_playeronly|spellflag_noprecast
EFFECT_ID=0
EFFECT=0
LAYER=layer_spell_polymorph
DURATION=5*60.0,8*60.0
MANAUSE=40
SKILLREQ=MAGERY 70.0
INTERRUPT=100.0,100.0
ON=@Select
   IF (<FLAGS> & statf_polymorph)
    IF (<MANA> < <SERV.SPELL.s_polymorph.MANAUSE>)
     SYSMESSAGE <DEFMSG.spell_try_nomana>
    ELSE
     MANA -= <SERV.SPELL.s_polymorph.MANAUSE>
     FINDID.<SERV.SPELL.s_polymorph.RUNE_ITEM>.REMOVE
    ENDIF
    return 1
   ENDIF

[SPELL 57]
DEFNAME=s_earthquake
NAME=Earthquake
SOUND=snd_spell_earthquake
RUNES=IVP
CAST_TIME=2.3
RESOURCES=i_reag_blood_moss,i_reag_ginseng,i_reag_mandrake_root,i_reag_sulfur_ash
RUNE_ITEM=i_rune_earthquake
SCROLL_ITEM=i_scroll_earthquake
FLAGS=spellflag_harm|spellflag_damage|spellflag_area|spellflag_fx_targ|spellflag_playeronly
EFFECT_ID=i_fx_smoke
EFFECT=30,45
DURATION=30.0
MANAUSE=50
SKILLREQ=MAGERY 80.0
INTERRUPT=100.0,100.0
ON=@Success
   LOCAL.AREARADIUS=<eval 1+(<MAGERY>/150)>
ON=@Effect
   LOCAL.DAMAGETYPE=(<DEF.dam_physical>|<DEF.dam_magic>)

[SPELL 58]
DEFNAME=s_energy_vortex
NAME=Energy Vortex
SOUND=snd_spell_energy_vortex
RUNES=VCP
CAST_TIME=2.3
RESOURCES=i_reag_black_pearl,i_reag_blood_moss,i_reag_mandrake_root,i_reag_nightshade
RUNE_ITEM=i_rune_energy_vortex
SCROLL_ITEM=i_scroll_energy_vortex
FLAGS=spellflag_dir_anim|spellflag_targ_xyz|spellflag_harm|spellflag_summon
EFFECT_ID=0
EFFECT=0
LAYER=layer_spell_summon
DURATION=60.0,90.0
MANAUSE=50
SKILLREQ=MAGERY 80.0
INTERRUPT=100.0,100.0

[SPELL 59]
DEFNAME=s_resurrection
NAME=Resurrection
SOUND=snd_spell_resurrection
RUNES=AC
CAST_TIME=2.3
RESOURCES=i_reag_blood_moss,i_reag_garlic,i_reag_ginseng
RUNE_ITEM=i_rune_resurrection
SCROLL_ITEM=i_scroll_resurrection
FLAGS=spellflag_dir_anim|spellflag_targ_char|spellflag_fx_targ|spellflag_good|spellflag_targ_dead|spellflag_playeronly
EFFECT_ID=i_fx_sparkle
EFFECT=0
DURATION=0.0
MANAUSE=50
SKILLREQ=MAGERY 80.0
INTERRUPT=100.0,100.0

[SPELL 60]
DEFNAME=s_summon_elem_air
NAME=Air Elemental
SOUND=snd_spell_summon_elem_air
RUNES=KVXH
CAST_TIME=2.3
RESOURCES=i_reag_blood_moss,i_reag_mandrake_root,i_reag_spider_silk
RUNE_ITEM=i_rune_summon_elem_air
SCROLL_ITEM=i_scroll_summon_elem_air
FLAGS=spellflag_dir_anim|spellflag_summon
EFFECT_ID=0
EFFECT=0
LAYER=layer_spell_summon
DURATION=2*60.0,3*60.0
MANAUSE=50
SKILLREQ=MAGERY 80.0
INTERRUPT=100.0,100.0

[SPELL 61]
DEFNAME=s_summon_daemon
NAME=Summon Daemon
SOUND=snd_spell_summon_daemon
RUNES=KVXC
CAST_TIME=2.3
RESOURCES=i_reag_blood_moss,i_reag_mandrake_root,i_reag_spider_silk,i_reag_sulfur_ash
RUNE_ITEM=i_rune_summon_daemon
SCROLL_ITEM=i_scroll_summon_daemon
FLAGS=spellflag_dir_anim|spellflag_summon
EFFECT_ID=0
EFFECT=0
LAYER=layer_spell_summon
DURATION=2*60.0,3*60.0
MANAUSE=50
SKILLREQ=MAGERY 80.0
INTERRUPT=100.0,100.0

[SPELL 62]
DEFNAME=s_summon_elem_earth
NAME=Earth Elemental
SOUND=snd_spell_summon_elem_earth
RUNES=KVXY
CAST_TIME=2.3
RESOURCES=i_reag_blood_moss,i_reag_mandrake_root,i_reag_spider_silk
RUNE_ITEM=i_rune_summon_elem_earth
SCROLL_ITEM=i_scroll_summon_elem_earth
FLAGS=spellflag_dir_anim|spellflag_summon
EFFECT_ID=0
EFFECT=0
LAYER=layer_spell_summon
DURATION=2*60.0,3*60.0
MANAUSE=50
SKILLREQ=MAGERY 80.0
INTERRUPT=100.0,100.0

[SPELL 63]
DEFNAME=s_summon_elem_fire
NAME=Fire Elemental
SOUND=snd_spell_summon_elem_fire
RUNES=KVXF
CAST_TIME=2.3
RESOURCES=i_reag_blood_moss,i_reag_mandrake_root,i_reag_spider_silk,i_reag_sulfur_ash
RUNE_ITEM=i_rune_summon_elem_fire
SCROLL_ITEM=i_scroll_summon_elem_fire
FLAGS=spellflag_dir_anim|spellflag_summon
EFFECT_ID=0
EFFECT=0
LAYER=layer_spell_summon
DURATION=2*60.0,3*60.0
MANAUSE=50
SKILLREQ=MAGERY 80.0
INTERRUPT=100.0,100.0

[SPELL 64]
DEFNAME=s_summon_elem_water
NAME=Water Elemental
SOUND=snd_spell_summon_elem_water
RUNES=KVXAF
CAST_TIME=2.3
RESOURCES=i_reag_blood_moss,i_reag_mandrake_root,i_reag_spider_silk
RUNE_ITEM=i_rune_summon_elem_water
SCROLL_ITEM=i_scroll_summon_elem_water
FLAGS=spellflag_dir_anim|spellflag_summon
EFFECT_ID=0
EFFECT=0
LAYER=layer_spell_summon
DURATION=2*60.0,3*60.0
MANAUSE=50
SKILLREQ=MAGERY 80.0
INTERRUPT=100.0,100.0


///////////////////
// Sphere Spells //
///////////////////

[SPELL 1000]
DEFNAME=s_summon_undead
NAME=Summon Undead
SOUND=snd_spell_summon_undead
RUNES=KNM
CAST_TIME=2.3
RESOURCES=i_reag_blood_moss
RUNE_ITEM=i_RUNE_ALCHEM_1
SCROLL_ITEM=i_scroll_X_GREEN2
FLAGS=spellflag_dir_anim|spellflag_targ_xyz|spellflag_summon
EFFECT_ID=0
EFFECT=0
LAYER=layer_spell_summon
DURATION=2*60.0,3*60.0
MANAUSE=15
SKILLREQ=MAGERY 30.0, NECROMANCY 40.0
INTERRUPT=100.0,100.0

[SPELL 1001]
DEFNAME=s_animate_dead
NAME=Animate Dead
SOUND=snd_SPELL_ANIMATE_DEAD
RUNES=IAMG
CAST_TIME=60
RESOURCES=i_reag_blood_moss
RUNE_ITEM=i_RUNE_ALCHEM_2
SCROLL_ITEM=i_scroll_X_TEAL2
FLAGS=SPELLFLAG_TARG_ITEM
EFFECT_ID=0
EFFECT=0
LAYER=layer_spell_summon
DURATION=2*60.0,3*60.0
MANAUSE=15
// NOTE: This spell, in past testings, when used on a player corpse, would cause the loss of all players effects upon decay. I suggest code that when used on a player corpse and the player is in the area that it ressurects the player, retains the items, but leaves him controlled by the caster for the duration of the spell, like a pet  :)
SKILLREQ=MAGERY 30.0, NECROMANCY 40.0
INTERRUPT=100.0,100.0

[SPELL 1002]
DEFNAME=s_bone_armor
NAME=Bone Armor
SOUND=snd_SPELL_BONE_ARMOR
RUNES=ICSY
CAST_TIME=60
RESOURCES=i_reag_blood_moss
RUNE_ITEM=i_RUNE_ALCHEM_3
SCROLL_ITEM=i_scroll_X_BROWN2
FLAGS=SPELLFLAG_TARG_OBJ
EFFECT_ID=0
EFFECT=0
LAYER=layer_spell_protection
DURATION=0.0
MANAUSE=15
SKILLREQ=MAGERY 30.0, NECROMANCY 40.0
INTERRUPT=100.0,100.0

[SPELL 1003]
//Adds a light halo around the character
DEFNAME=s_light
NAME=Light
SOUND=snd_SPELL_LIGHT
RUNES=IL
CAST_TIME=60
RESOURCES=i_reag_spider_silk,i_reag_sulfur_ash
RUNE_ITEM=i_light_source
SCROLL_ITEM=I_SCROLL_X_RED
FLAGS=SPELLFLAG_TARG_CHAR| SPELLFLAG_GOOD
EFFECT_ID=0
EFFECT=0
LAYER=layer_spell_night_sight
DURATION=3*60.0,5*60.0
MANAUSE=15
SKILLREQ=MAGERY 30.0, NECROMANCY 40.0
INTERRUPT=100.0,100.0

[SPELL 1004]
DEFNAME=s_fire_bolt
NAME=Fire Bolt
SOUND=snd_SPELL_FIRE_BOLT
RUNES=VFP
CAST_TIME=60
RESOURCES=i_reag_black_pearl,i_reag_sulfur_ash,i_reag_nightshade
RUNE_ITEM=i_rune_FIREBALL
SCROLL_ITEM=I_SCROLL_X_BLUE
FLAGS=SPELLFLAG_TARG_CHAR|SPELLFLAG_DIR_ANIM|SPELLFLAG_HARM|SPELLFLAG_FX_BOLT|SPELLFLAG_RESIST|SPELLFLAG_DAMAGE
EFFECT_ID=i_fx_firesnake
EFFECT=30,50
DURATION=0.0
MANAUSE=15
SKILLREQ=MAGERY 30.0, NECROMANCY 40.0
INTERRUPT=100.0,100.0

[SPELL 1005]
DEFNAME=s_Hallucination
NAME=Hallucination
SOUND=snd_Z_END_MYSTERY1
RUNES=WN
CAST_TIME=60
RESOURCES=i_reag_garlic,i_reag_nightshade
RUNE_ITEM=i_rune_MIND_BLAST
SCROLL_ITEM=i_scroll_MIND_BLAST
FLAGS=SPELLFLAG_TARG_CHAR|SPELLFLAG_DIR_ANIM| SPELLFLAG_HARM | SPELLFLAG_FX_TARG| spellflag_curse
EFFECT_ID=i_fx_curse
EFFECT=2,5
LAYER=layer_flag_hallucination
DURATION=2*60.0,4*60.0
MANAUSE=15
SKILLREQ=MAGERY 30.0, NECROMANCY 40.0
INTERRUPT=100.0,100.0

[SPELL 1006]
DEFNAME=s_Stone
NAME=Stone
FLAGS=SPELLFLAG_TARG_CHAR|SPELLFLAG_DIR_ANIM| SPELLFLAG_HARM | SPELLFLAG_FX_TARG | SPELLFLAG_PLAYERONLY
RUNE_ITEM=i_RUNE_ALCHEM_3
DURATION=2*60.0,4*60.0

[SPELL 1007]
DEFNAME=s_Shrink
NAME=Shrink
FLAGS=SPELLFLAG_TARG_CHAR|SPELLFLAG_DIR_ANIM| SPELLFLAG_HARM | SPELLFLAG_FX_TARG | SPELLFLAG_PLAYERONLY
RUNE_ITEM=i_RUNE_ALCHEM_3
DURATION=2*60.0,4*60.0

[SPELL 1008]
DEFNAME=s_Refresh
NAME=Refresh
FLAGS=SPELLFLAG_TARG_CHAR | SPELLFLAG_FX_TARG | SPELLFLAG_GOOD | SPELLFLAG_PLAYERONLY
RUNE_ITEM=i_RUNE_ALCHEM_3
EFFECT=40,180

[SPELL 1009]
DEFNAME=s_Restore
NAME=Restore
FLAGS=SPELLFLAG_TARG_CHAR | SPELLFLAG_FX_TARG | SPELLFLAG_GOOD | SPELLFLAG_PLAYERONLY
RUNE_ITEM=i_RUNE_ALCHEM_3
EFFECT=10,100

[SPELL 1010]
DEFNAME=s_Mana
NAME=Mana
FLAGS=SPELLFLAG_TARG_CHAR | SPELLFLAG_FX_TARG | SPELLFLAG_GOOD | SPELLFLAG_PLAYERONLY
RUNE_ITEM=i_RUNE_ALCHEM_3
EFFECT_ID=i_fx_HEAL_EFFECT
EFFECT=10,100

[SPELL 1011]
DEFNAME=s_Sustenance
NAME=Sustenance
FLAGS=SPELLFLAG_TARG_CHAR|SPELLFLAG_DIR_ANIM| SPELLFLAG_GOOD | SPELLFLAG_FX_TARG | SPELLFLAG_PLAYERONLY
RUNE_ITEM=i_RUNE_ALCHEM_3
EFFECT=4,100

[SPELL 1012]
// This potion makes your skin match the colors of whatever is behind you.
DEFNAME=s_Chameleon
NAME=Chameleon
FLAGS=SPELLFLAG_TARG_CHAR|SPELLFLAG_DIR_ANIM| SPELLFLAG_HARM | SPELLFLAG_FX_TARG | SPELLFLAG_PLAYERONLY
RUNE_ITEM=i_RUNE_ALCHEM_3
DURATION=2*60.0,4*60.0

[SPELL 1013]
// This potion polymorphs you into an animal for a while.
DEFNAME=s_BeastForm
NAME=Beast Form
FLAGS=SPELLFLAG_HARM| SPELLFLAG_PLAYERONLY
RUNE_ITEM=i_RUNE_ALCHEM_3
DURATION=2*60.0,4*60.0

[SPELL 1014]
// This potion polymorphs you into a monster for a while.
DEFNAME=s_Monster_Form
NAME=Monster Form
FLAGS=SPELLFLAG_HARM| SPELLFLAG_PLAYERONLY
RUNE_ITEM=i_RUNE_ALCHEM_3
DURATION=2*60.0,4*60.0

[SPELL 1015]
// This potion permanently changes your gender.
DEFNAME=s_Gender_Swap
NAME=Gender Swap
FLAGS=SPELLFLAG_HARM| SPELLFLAG_PLAYERONLY
RUNE_ITEM=i_RUNE_ALCHEM_3

[SPELL 1016]
// Temporarily increases your meditation skill.
DEFNAME=s_Trance
NAME=Trance
FLAGS=SPELLFLAG_PLAYERONLY
RUNE_ITEM=i_RUNE_ALCHEM_3
EFFECT_ID=i_fx_HEAL_EFFECT
DURATION=2*60.0,4*60.0

[SPELL 1017]
// This potion turns you into an immobile but untargetable particle system for a while.
DEFNAME=s_Particle_Form
NAME=Particle Form
FLAGS=SPELLFLAG_PLAYERONLY
RUNE_ITEM=i_RUNE_ALCHEM_3
DURATION=2*60.0,4*60.0

[SPELL 1018]
// This potion erects a temporary force field around you. Nobody approaching will be able to get within 1 tile of you though you can move close to them if you wish.
DEFNAME=s_Shield
NAME=Shield
FLAGS=SPELLFLAG_PLAYERONLY
RUNE_ITEM=i_RUNE_ALCHEM_3
DURATION=2*60.0,4*60.0

[SPELL 1019]
// This potion turns your skin into steel, giving a boost to your AR.
DEFNAME=s_Steelskin
NAME=Steel Skin
FLAGS=SPELLFLAG_TARG_CHAR | SPELLFLAG_FX_TARG| SPELLFLAG_GOOD | SPELLFLAG_PLAYERONLY
RUNE_ITEM=i_RUNE_ALCHEM_3
EFFECT=4,40
DURATION=2*60.0,4*60.0

[SPELL 1020]
// This potion turns your skin into stone, giving a boost to your AR.
DEFNAME=s_Stoneskin
NAME=Stone Skin
FLAGS=SPELLFLAG_TARG_CHAR | SPELLFLAG_FX_TARG| SPELLFLAG_GOOD | SPELLFLAG_PLAYERONLY
RUNE_ITEM=i_RUNE_ALCHEM_3
EFFECT=4,40
DURATION=2*60.0,4*60.0

[SPELL 1021]
// Regen hit points at fast rate.
DEFNAME=s_Regenerate
NAME=Regeneration
FLAGS=SPELLFLAG_TARG_CHAR | SPELLFLAG_FX_TARG | SPELLFLAG_GOOD | SPELLFLAG_PLAYERONLY
RUNE_ITEM=i_RUNE_ALCHEM_3
DURATION=2*60.0,4*60.0

[SPELL 1022]
// Enchant a weapon or armor.
// Effect of all enchanted weapons is tied to EFFECT here !
DEFNAME=s_Enchant
NAME=Enchantment
FLAGS=SPELLFLAG_TARG_OBJ | SPELLFLAG_FX_TARG | SPELLFLAG_GOOD | SPELLFLAG_PLAYERONLY
RUNE_ITEM=i_RUNE_ALCHEM_3
MANAUSE=200
SKILLREQ=MAGERY 200.0
EFFECT=1,9

[SPELL 1023]
//
DEFNAME=s_Forget
NAME=Forget
FLAGS=SPELLFLAG_HARM| SPELLFLAG_PLAYERONLY
RUNE_ITEM=i_RUNE_ALCHEM_3

//Spells can be defined up to 1055

///////////////////////
// Necromancy Spells //
///////////////////////

[SPELL 101]
DEFNAME=s_animate_dead_aos
NAME=Animate Dead
SOUND=snd_spell_animate_dead
RUNES=.Uus Corp
CAST_TIME=4.0
RESOURCES=i_reag_blood_vial,i_reag_grave_dust
RUNE_ITEM=i_rune_animate_dead
SCROLL_ITEM=i_scroll_animate_dead
FLAGS=spellflag_targ_item|spellflag_good|spellflag_fx_targ|spellflag_playeronly|spellflag_targ_no_player|spellflag_targ_no_npc
EFFECT_ID=i_fx_sparkle
EFFECT=0
LAYER=layer_spell_summon
DURATION=0
MANAUSE=23
SKILLREQ=NECROMANCY 40.0
INTERRUPT=100.0,40.0
PROMPT_MSG=@0,,2 1061083//"Animate what corpse?"

[SPELL 102]
DEFNAME=s_blood_oath
NAME=Blood Oath
SOUND=snd_spell_curse
RUNES=.In Jux Mani Xen
CAST_TIME=1.5
RESOURCES=i_reag_blood_vial
RUNE_ITEM=i_rune_blood_oath
SCROLL_ITEM=i_scroll_blood_oath
FLAGS=spellflag_dir_anim|spellflag_targ_char|spellflag_harm|spellflag_fx_targ|spellflag_nounparalyze
EFFECT_ID=i_fx_curse
EFFECT=0
DURATION=0
MANAUSE=13
SKILLREQ=NECROMANCY 20.0
INTERRUPT=100.0,20.0
PROMPT_MSG=Target a creature to put this curse on.

[SPELL 103]
DEFNAME=s_corpse_skin
NAME=Corpse Skin
SOUND=snd_spell_curse
RUNES=.In Aglo Corp Yelm
CAST_TIME=2.0
RESOURCES=i_reag_batwing,i_reag_grave_dust
RUNE_ITEM=i_rune_corpse_skin
SCROLL_ITEM=i_scroll_corpse_skin
FLAGS=spellflag_dir_anim|spellflag_targ_char|spellflag_harm|spellflag_fx_targ|spellflag_nounparalyze
EFFECT_ID=i_fx_sparkle
EFFECT=10,15
LAYER=layer_spell_corpse_skin
DURATION=0
MANAUSE=11
SKILLREQ=NECROMANCY 20.0
INTERRUPT=100.0,20.0
PROMPT_MSG=Target a creature to put this curse on.

[SPELL 104]
DEFNAME=s_curse_weapon
NAME=Curse Weapon
SOUND=snd_spell_curse
RUNES=.An Sanct Gra Char
CAST_TIME=1.0
RESOURCES=i_reag_pig_iron
RUNE_ITEM=i_rune_curse_weapon
SCROLL_ITEM=i_scroll_curse_weapon
FLAGS=spellflag_good
EFFECT_ID=i_fx_sparkle
EFFECT=10,15
LAYER=layer_spell_curse_weapon
DURATION=0
MANAUSE=7
SKILLREQ=NECROMANCY 0.1
INTERRUPT=100.0,0.0

[SPELL 105]
DEFNAME=s_evil_omen
NAME=Evil Omen
SOUND=snd_spell_curse
RUNES=.Pas Tym An Sanct
CAST_TIME=1.0
RESOURCES=i_reag_batwing,i_reag_nox_crystal
RUNE_ITEM=i_rune_evil_omen
SCROLL_ITEM=i_scroll_evil_omen
FLAGS=spellflag_dir_anim|spellflag_targ_char|spellflag_harm|spellflag_fx_targ|spellflag_nounparalyze
EFFECT_ID=i_fx_curse
EFFECT=10,15
LAYER=layer_spell_evil_omen
DURATION=0
MANAUSE=11
SKILLREQ=NECROMANCY 20.0
INTERRUPT=60.0,20.0
PROMPT_MSG=Target a creature to put this curse on.

[SPELL 106]
DEFNAME=s_horrific_beast
NAME=Horrific Beast
SOUND=snd_spell_bless
RUNES=.Rel Xen Vas Bal
CAST_TIME=4.0
RESOURCES=i_reag_batwing,i_reag_blood_vial
RUNE_ITEM=i_rune_horrific_beast
SCROLL_ITEM=i_scroll_horrific_beast
FLAGS=spellflag_good|spellflag_playeronly|spellflag_poly
EFFECT_ID=i_fx_smoke
EFFECT=5,15
LAYER=layer_spell_polymorph
DURATION=0
MANAUSE=11
SKILLREQ=NECROMANCY 40.0
INTERRUPT=100.0,40.0

ON=@Select
   IF (<FLAGS> & statf_polymorph)
    IF (<MANA> < <SERV.SPELL.s_horrific_beast.MANAUSE>)
     SYSMESSAGE <DEFMSG.spell_try_nomana>
    ELSE
     MANA -= <SERV.SPELL.s_horrific_beast.MANAUSE>
     FINDID.<SERV.SPELL.s_horrific_beast.RUNE_ITEM>.REMOVE
    ENDIF
    return 1
   ENDIF

[SPELL 107]
DEFNAME=s_lich_form
NAME=Lich Form
SOUND=snd_spell_bless
RUNES=.Rel Xen Corp Ort
CAST_TIME=4.0
RESOURCES=i_reag_nox_crystal,i_reag_blood_vial,i_reag_grave_dust
RUNE_ITEM=i_rune_lich_form
SCROLL_ITEM=i_scroll_lich_form
FLAGS=spellflag_good|spellflag_playeronly|spellflag_poly
EFFECT_ID=i_fx_smoke
EFFECT=5,15
LAYER=layer_spell_polymorph
DURATION=0
MANAUSE=23
SKILLREQ=NECROMANCY 70.0
INTERRUPT=100.0,70.0

ON=@Select
   IF (<FLAGS> & statf_polymorph)
    IF (<MANA> < <SERV.SPELL.s_lich_form.MANAUSE>)
     SYSMESSAGE <DEFMSG.spell_try_nomana>
    ELSE
     MANA -= <SERV.SPELL.s_lich_form.MANAUSE>
     FINDID.<SERV.SPELL.s_lich_form.RUNE_ITEM>.REMOVE
    ENDIF
    return 1
   ENDIF

[SPELL 108]
DEFNAME=s_mind_rot
NAME=Mind Rot
SOUND=snd_spell_feeblemind
RUNES=.Wis An Ben
CAST_TIME=1.5
RESOURCES=i_reag_batwing,i_reag_blood_vial,i_reag_pig_iron
RUNE_ITEM=i_rune_mind_rot
SCROLL_ITEM=i_scroll_mind_rot
FLAGS=spellflag_dir_anim|spellflag_targ_char|spellflag_harm|spellflag_fx_targ|spellflag_nounparalyze
EFFECT_ID=i_fx_curse
EFFECT=5,15
LAYER=layer_spell_mind_rot
DURATION=0
MANAUSE=17
SKILLREQ=NECROMANCY 30.0
INTERRUPT=100.0,30.0
PROMPT_MSG=Target a creature to put this curse on.

[SPELL 109]
DEFNAME=s_pain_spike
NAME=Pain Spike
SOUND=snd_spell_curse
RUNES=.@0 In Sar
CAST_TIME=2.0
RESOURCES=i_reag_grave_dust,i_reag_pig_iron
RUNE_ITEM=i_rune_pain_spike
SCROLL_ITEM=i_scroll_pain_spike
FLAGS=spellflag_dir_anim|spellflag_targ_char|spellflag_harm|spellflag_fx_targ
EFFECT_ID=i_fx_curse
EFFECT=0
LAYER=layer_spell_pain_spike
DURATION=0
MANAUSE=5
SKILLREQ=NECROMANCY 20.0
INTERRUPT=100.0,20.0

[SPELL 110]
DEFNAME=s_poison_strike
NAME=Poison Strike
SOUND=snd_spell_poison
RUNES=.In Vas Nox
CAST_TIME=2.0
RESOURCES=i_reag_nox_crystal
RUNE_ITEM=i_rune_poison_strike
SCROLL_ITEM=i_scroll_poison_strike
FLAGS=spellflag_dir_anim|spellflag_targ_char|spellflag_harm|spellflag_resist|spellflag_nounparalyze|spellflag_area|spellflag_fx_targ
EFFECT_ID=//FIXME
EFFECT=36,40
//LAYER=layer_flag_poison	// TODO: Necromancers with > 60.0 skill have a 3-9% chance to poison the target, using .poison x,x would be enough, no need for layer flag?
DURATION=0
MANAUSE=17
SKILLREQ=NECROMANCY 50.0
INTERRUPT=100.0,50.0
PROMPT_MSG=Who will you poison strike?

ON=@Success
local.AreaRadius=2

ON=@Effect
if (<IsItem>)
	return 1
endif
if (<src.act>==<uid>)
	local.damage=<eval <r36,40> + ((300 + (<src.SpiritSpeak> * 9)) / 1000)>
	damage=<dlocal.damage>,<src>,dam_magic,0,0,0,100,0	// Poison damage
	if (<src.Poisoning> > 600)	// Necromancers having more than 60.0 skill points in Poisoning skill have a 3% to 9% chance (scales with poison skill) to poison their target.
		local.chances = <eval 3 + <muldiv <src.poisoning>/10,3,60>>	// with 60 points you have a base of 3% to poison target, each 10 points until 120 represents another 1% chance
		if (<local.chances> < <r100>)	// If caster got enough chances
			Poison <src.Poisoning>	// poison me 
		endif
	endif
else
	local.distance = <src.act.distance>
	local.dam=<eval <local.damage> / (<local.distance>+1)>
	damage=<dlocal.dam>,<src>,dam_magic,0,0,0,100,0	// Poison damage
endfor

// s_Strangle
// Chokes an enemy with poison, doing more damage as their Stamina drops.
// The power of the effect is equal to the Caster's Spirit Speak skill divided by 10.
// The minimum power is 4.
// The power number determines the duration and base damage of the Strangle effect.

// Each point of power causes the Strangle effect to damage the target one time.
// -The first round of damage is done after five seconds.
// -Four seconds later, the second round hits.
// -Each round after that comes one second more quickly than the last, until there is only 1 second between hits.
// Damage is calculated as follows: 
// -The range of damage is between power - 2 and power + 1.
// -Then the damage is multiplied based on the victim's current and maximum Stamina values.
// -The more the victim is fatigued, the more damage this spell deals.
// -The damage is multiplied by the result of this formula:
	// -3 - (Cur Stamina ÷ Max Stamina x 2. For example, suppose the base damage for a Strangle hit is 5. The target currently has 40 out of a maximum of 80 stamina. Final damage for that hit is: 5 x (3 - (40 ÷ 80 x 2) = 10.
[SPELL 111]
DEFNAME=s_strangle
NAME=Strangle
SOUND=snd_spell_curse
RUNES=.In Bal Nox
CAST_TIME=2.5
RESOURCES=i_reag_nox_crystal,i_reag_blood_vial
RUNE_ITEM=i_rune_strangle
SCROLL_ITEM=i_scroll_strangle
FLAGS=spellflag_dir_anim|spellflag_targ_char|spellflag_harm|spellflag_fx_targ|spellflag_nounparalyze
EFFECT_ID=i_fx_curse
EFFECT=0
LAYER=layer_spell_strangle
DURATION=0
MANAUSE=29
SKILLREQ=NECROMANCY 65.0
INTERRUPT=100.0,65.0

[SPELL 112]
DEFNAME=s_summon_familiar
NAME=Summon Familiar
SOUND=snd_spell_summon_creature
RUNES=.Kal Xen Bal
CAST_TIME=4.0
RESOURCES=i_reag_batwing,i_reag_grave_dust,i_reag_blood_vial
RUNE_ITEM=i_rune_summon_familiar
SCROLL_ITEM=i_scroll_summon_familiar
FLAGS=spellflag_dir_anim|spellflag_summon|spellflag_playeronly
//EFFECT_ID=//FIXME
EFFECT=0
LAYER=layer_spell_summon
DURATION=120.0,240.0
MANAUSE=17
SKILLREQ=NECROMANCY 30.0
INTERRUPT=100.0,70.0

[SPELL 113]
DEFNAME=s_vampiric_embrace
NAME=Vampiric Embrace
SOUND=snd_spell_bless
RUNES=.Rel Xen An Sanct
CAST_TIME=4.0
RESOURCES=i_reag_batwing,i_reag_nox_crystal,i_reag_pig_iron
RUNE_ITEM=i_rune_vampiric_embrace
SCROLL_ITEM=i_scroll_vampiric_embrace
FLAGS=spellflag_good|spellflag_playeronly|spellflag_poly
EFFECT_ID=i_fx_smoke
EFFECT=5,15
LAYER=layer_spell_polymorph
DURATION=0
MANAUSE=23
SKILLREQ=NECROMANCY 99.0
INTERRUPT=100.0,100.0

ON=@Select
   IF (<FLAGS> & statf_polymorph)
    IF (<MANA> < <SERV.SPELL.s_vampiric_embrace.MANAUSE>)
     SYSMESSAGE <DEFMSG.spell_try_nomana>
    ELSE
     MANA -= <SERV.SPELL.s_vampiric_embrace.MANAUSE>
     FINDID.<SERV.SPELL.s_vampiric_embrace.RUNE_ITEM>.REMOVE
    ENDIF
    return 1
   ENDIF

[SPELL 114]
DEFNAME=s_vengeful_spirit
NAME=Vengeful Spirit
SOUND=snd_monster_ghost1
RUNES=.Kal Xen Bal Beh
CAST_TIME=8.0
RESOURCES=i_reag_batwing,i_reag_grave_dust,i_reag_pig_iron
RUNE_ITEM=i_rune_vengeful_spirit
SCROLL_ITEM=i_scroll_vengeful_spirit
FLAGS=spellflag_dir_anim|spellflag_targ_char|spellflag_fx_targ
EFFECT_ID=i_fx_smoke
//EFFECT=
LAYER=layer_spell_summon
DURATION=10.0,20.0
MANAUSE=41
SKILLREQ=NECROMANCY 80.0
INTERRUPT=100.0,80.0

[SPELL 115]
DEFNAME=s_wither
NAME=Wither
SOUND=snd_wind2
RUNES=.Kal Vas An Flam
CAST_TIME=1.5
RESOURCES=i_reag_nox_crystal,i_reag_grave_dust,i_reag_pig_iron
RUNE_ITEM=i_rune_wither
SCROLL_ITEM=i_scroll_wither
FLAGS=spellflag_dir_anim|spellflag_harm|spellflag_area|spellflag_targ_char|spellflag_fx_targ
EFFECT_ID=
//FIXME
//EFFECT=
//DURATION=
MANAUSE=23
SKILLREQ=NECROMANCY 60.0
INTERRUPT=100.0,60.0

ON=@Success
local.AreaRadius=4

ON=@Effect	//It does more damage to good characters.
if (!<IsChar>)
	return 1
endif
if (<karma> > 1000)	// There's no much information on what is considered 'good', so we use Karma at base.
	argn2 *=<argn2>/4	// There's no information about damage bonuses, so +25% damage for 'good' characters.
endif

[SPELL 116]
DEFNAME=s_wraith_form
NAME=Wraith Form
SOUND=snd_spell_bless
RUNES=.Rel Xen Um
CAST_TIME=4.0
RESOURCES=i_reag_nox_crystal,i_reag_pig_iron
RUNE_ITEM=i_rune_wraith_form
SCROLL_ITEM=i_scroll_wraith_form
FLAGS=spellflag_good|spellflag_playeronly|spellflag_poly
EFFECT_ID=i_fx_smoke
//EFFECT=-1
LAYER=layer_spell_polymorph
DURATION=0
MANAUSE=17
SKILLREQ=NECROMANCY 20.0
INTERRUPT=100.0,20.0

ON=@Select
   IF (<FLAGS> & statf_polymorph)
    IF (<MANA> < <SERV.SPELL.s_wraith_form.MANAUSE>)
     SYSMESSAGE <DEFMSG.spell_try_nomana>
    ELSE
     MANA -= <SERV.SPELL.s_wraith_form.MANAUSE>
     FINDID.<SERV.SPELL.s_wraith_form.RUNE_ITEM>.REMOVE
    ENDIF
    return 1
   ENDIF

[SPELL 117]
DEFNAME=s_exorcism
NAME=Exorcism
SOUND=
RUNES=.Ort Corp Grav
CAST_TIME=2.0
RESOURCES=i_reag_nox_crystal,i_reag_grave_dust
RUNE_ITEM=i_rune_exorcism
SCROLL_ITEM=i_scroll_exorcism
FLAGS=
EFFECT_ID=0
EFFECT=0
DURATION=0
MANAUSE=40
SKILLREQ=Necromancy 80.0
INTERRUPT=100.0,1.0

/////////////////////
// Chivalry Spells //
/////////////////////

[SPELL 201]
DEFNAME=s_cleanse_by_fire
NAME=Cleanse by Fire
SOUND=0
RUNES=.@,,2 1060718
CAST_TIME=1.0
RESOURCES=
//RUNE_ITEM=
SCROLL_ITEM=i_scroll_cleanse_by_fire
FLAGS=spellflag_targ_char|spellflag_fx_targ|spellflag_good|spellflag_playeronly
EFFECT_ID=i_fx_bless_effect
EFFECT=10
DURATION=0
MANAUSE=10
TITHINGUSE=10
SKILLREQ=CHIVALRY 5.0
INTERRUPT=100.0,55.0
PROMPT_MSG=Who shall you cure?

[SPELL 202]
DEFNAME=s_close_wounds
NAME=Close Wounds
SOUND=0202
RUNES=.@,,2 1060719
CAST_TIME=1.5
RESOURCES=
//RUNE_ITEM=0
//SCROLL_ITEM=0
FLAGS=spellflag_targ_char|spellflag_fx_targ|spellflag_good|spellflag_playeronly|spellflag_heal
EFFECT_ID=i_fx_heal_effect
EFFECT=10
DURATION=0
MANAUSE=10
TITHINGUSE=10
SKILLREQ=SKILL_CHIVALRY 0.1
INTERRUPT=0.0,0.0
PROMPT_MSG=Who shall you heal?

[SPELL 203]
DEFNAME=s_Consecrate_Weapon
NAME=Consecrate Weapon
SOUND=
RUNES=.@,,2 1060720
CAST_TIME=0.1
RESOURCES=
//RUNE_ITEM=0
//SCROLL_ITEM=0
FLAGS=spellflag_playeronly|spellflag_nofreezeoncast
EFFECT_ID=
EFFECT=10
LAYER=layer_spell_consecrate_weapon
DURATION=0.0
MANAUSE=10
TITHINGUSE=10
SKILLREQ=SKILL_CHIVALRY 15.0
INTERRUPT=0.0,0.0

[SPELL 204]
DEFNAME=s_Dispel_Evil
NAME=Dispel Evil
SOUND=snd_spell_dispel
RUNES=.@,,2 1060721
CAST_TIME=0.3
RESOURCES=
//RUNE_ITEM=0
//SCROLL_ITEM=0
FLAGS=spellflag_playeronly|spellflag_nofreezeoncast
EFFECT_ID=
EFFECT=10
DURATION=0.0
MANAUSE=10
TITHINGUSE=10
SKILLREQ=SKILL_CHIVALRY 35.0
INTERRUPT=0.0,0.0

[SPELL 205]
DEFNAME=s_Divine_Fury
NAME=Divine Fury
SOUND=020F
RUNES=.@,,2 1060722
CAST_TIME=1.0
RESOURCES=
//RUNE_ITEM=0
//SCROLL_ITEM=0
FLAGS=spellflag_playeronly|spellflag_nofreezeoncast
EFFECT_ID=0376A
EFFECT=10
LAYER=layer_spell_divine_fury
DURATION=0.0
MANAUSE=15
TITHINGUSE=10
SKILLREQ=SKILL_CHIVALRY 25.0
INTERRUPT=0.0,0.0

[SPELL 206]
DEFNAME=s_Enemy_of_One
NAME=Enemy of One
SOUND=0f5
RUNES=.@,,2 1060723
CAST_TIME=0.5
RESOURCES=
//RUNE_ITEM=0
//SCROLL_ITEM=0
FLAGS=spellflag_playeronly|spellflag_nofreezeoncast
EFFECT_ID=0376A
EFFECT=10
LAYER=layer_spell_enemy_of_one
DURATION=0.0
MANAUSE=20
TITHINGUSE=10
SKILLREQ=CHIVALRY 45.0
INTERRUPT=0.0,0.0

[SPELL 207]
DEFNAME=s_Holy_Light
NAME=Holy Light
SOUND=snd_spell_light
RUNES=.@,,2 1060724
CAST_TIME=1.8
RESOURCES=
//RUNE_ITEM=0
//SCROLL_ITEM=0
FLAGS=spellflag_playeronly|spellflag_nofreezeoncast
EFFECT_ID=
EFFECT=10
DURATION=0.0
MANAUSE=10
TITHINGUSE=10
SKILLREQ=CHIVALRY 55.0
INTERRUPT=0.0,0.0

[SPELL 208]
DEFNAME=s_Noble_Sacrifice
NAME=Noble Sacrifice
SOUND=
RUNES=.@,,2 1060725
CAST_TIME=1.5
RESOURCES=
//RUNE_ITEM=0
//SCROLL_ITEM=0
FLAGS=spellflag_playeronly|spellflag_nofreezeoncast|spellflag_heal
EFFECT_ID=
EFFECT=30
DURATION=0.0
MANAUSE=20
TITHINGUSE=30
SKILLREQ=SKILL_CHIVALRY 65.0
INTERRUPT=0.0,0.0

[SPELL 209]
DEFNAME=s_Remove_Curse
NAME=Remove Curse
SOUND=
RUNES=.@,,2 1060726
CAST_TIME=1.5
RESOURCES=
//RUNE_ITEM=0
//SCROLL_ITEM=0
FLAGS=spellflag_playeronly|spellflag_targ_char|spellflag_nofreezeoncast
EFFECT_ID=
EFFECT=10
DURATION=0.0
MANAUSE=20
TITHINGUSE=30
SKILLREQ=SKILL_CHIVALRY 5.0
INTERRUPT=0.0,0.0

[SPELL 210]
DEFNAME=s_Sacred_Journey
NAME=Sacred Journey
SOUND=
RUNES=.@,,2 1060727
CAST_TIME=1.5
RESOURCES=
//RUNE_ITEM=0
//SCROLL_ITEM=0
FLAGS=spellflag_playeronly|spellflag_targ_item|spellflag_nofreezeoncast
EFFECT_ID=
EFFECT=15
DURATION=0.0
MANAUSE=10
TITHINGUSE=15
SKILLREQ=SKILL_CHIVALRY 15.0
INTERRUPT=0.0,0.0

////////////////////
// Bushido Spells //
////////////////////
//"
// A character with Bushido as well as the Parrying skill will be able to
// block with a sword, though their defense chance with an actual Shield is
// lowered as they progress as a Samurai. Bushido also offers the only method
// in the game to entirely avoid direct spell damage: The Evasion ability.
//
// A Samurai with 50 Bushido or above may activate the Perfection system
// by honoring a target creature. This grants a damage bonus dependant on
// consecutive hits.
//
// At 90 skill, it becomes possible to use Bushido in place of Animal Taming
// for the purpose of controlling and riding Lesser Hiryus.
//
// This skill also counts towards your ability to perform Special Moves and
// gives a damage bonus to the Whirlwind special move.
//"

[SPELL 401]
//"
// Once enabled, the next blow the caster lands must be a killing blow.
//
// If successful, the caster gets a 10 second Swing Speed Increase of 0.25s
// and 8 to 10 Hit Points are restored (adjusted upwards per level of
// Perfection.)
//
// An unsuccessful use yields a 6 second loss of all Magic Resistance and
// all other Resistances are reduced by 40.
//
// Duration: Killing blow must land within 6-10 seconds.
//"
DEFNAME=s_honorable_execution
NAME=Honorable Execution
SOUND=snd_bushido_honorable_execution
RUNES=
CAST_TIME=
RESOURCES=
RUNE_ITEM=i_rune_honorable_execution
SCROLL_ITEM=0
FLAGS=spellflag_scripted
EFFECT_ID=
EFFECT=
DURATION=
MANAUSE=0
SKILLREQ=Bushido 25.0
INTERRUPT=0.0,0.0

[SPELL 402]
//"
// A defensive stance that allows Stamina and Hit Points gain with each
// successful parry.  Each such parry will heal 1 to (Bushido / 12) hit
// points, and refresh stamina for 1 to (Bushido / 5).
//
// Also increases stamina and Hit Point Regeneration rate for 4 seconds
// upon activation.  The increased rate is halted if hit during the 4
// second duration.  Max HP healed = ((Bushido*Bushido)/576)+15
//
// Duration: 4 seconds
//"
DEFNAME=s_confidence
NAME=Confidence
SOUND=snd_bushido_confidence
RUNES=
CAST_TIME=
RESOURCES=
RUNE_ITEM=i_rune_confidence
SCROLL_ITEM=0
FLAGS=spellflag_scripted
EFFECT_ID=
EFFECT=
DURATION=
MANAUSE=10
SKILLREQ=Bushido 25.0
INTERRUPT=0.0,0.0

[SPELL 403]
//"
// Increases your chance to parry, also grants the ability to parry direct
// damage attacks from other sources, such as spells and Dragons Breath.
// Evasion can only be used once every 20 seconds. The chance to block is
// based on Bushido, Anatomy, and Tactics. The duration of Evasion is also
// influenced by these skills.
//
// Duration: 3 to 6 seconds with a 2 second bonus if your Bushido is above
// 100.0 and both Tactics and Anatomy are 100.0 or better.
//"
DEFNAME=s_evasion
NAME=Evasion
SOUND=snd_bushido_evasion
RUNES=
CAST_TIME=
RESOURCES=
RUNE_ITEM=i_rune_evasion
SCROLL_ITEM=0
FLAGS=spellflag_disabled
EFFECT_ID=
EFFECT=
DURATION=
MANAUSE=10
SKILLREQ=Bushido 60.0
INTERRUPT=0.0,0.0

[SPELL 404]
//"
// Places you in a defensive stance that allows you to automatically counter
// attack the next time you successfully parry, without interrupting your
// normal swing timer. The Counter Attack takes normal hit and miss ratios
// into account, and therefore can miss.
//
// Duration: Until next successful parry
//"
DEFNAME=s_counter_attack
NAME=Counter Attack
SOUND=0
RUNES=
CAST_TIME=
RESOURCES=
RUNE_ITEM=i_rune_counter_attack
SCROLL_ITEM=0
FLAGS=spellflag_disabled
EFFECT_ID=
EFFECT=
DURATION=
MANAUSE=5
SKILLREQ=Bushido 40.0
INTERRUPT=0.0,0.0

[SPELL 405]
//"
// Allows a single attack with a 50% Hit Chance Increase. The HCI cap of 45%
// applies. However, if under the effects of a Hit Lower Attack, the full
// 50% bonus is enjoyed. (The bonus can overcome the effects of Hit Lower
// Attack.) Also, some hits under the effect of a Lighting Strike will be
// deemed Critical Hits and will do extra damage. 
//
// Duration: Instant
//"
DEFNAME=s_lightning_strike
NAME=Lightning Strike
SOUND=snd_bushido_lightning_strike
RUNES=
CAST_TIME=
RESOURCES=
RUNE_ITEM=i_rune_lightning_strike
SCROLL_ITEM=0
FLAGS=spellflag_disabled
EFFECT_ID=
EFFECT=
DURATION=
MANAUSE=10
SKILLREQ=Bushido 50.0
INTERRUPT=0.0,0.0

[SPELL 406]
//"
// Works only on multiple targets. A successful hit on an opponent results in
// another hit attempt on a different, adjacent opponent. Normal hit and miss
// ratios apply. A damage bonus of 100% is applied to the second target, if
// the first target is killed.
//
// Duration: Instant
//"
DEFNAME=s_momentum_strike
NAME=Momentum Strike
SOUND=snd_bushido_momentum_strike
RUNES=
CAST_TIME=
RESOURCES=
RUNE_ITEM=i_rune_momentum_strike
SCROLL_ITEM=0
FLAGS=spellflag_disabled
EFFECT_ID=
EFFECT=
DURATION=
MANAUSE=10
SKILLREQ=BUSHIDO 70.0
INTERRUPT=0.0,0.0


/////////////////////
// Ninjitsu Spells //
/////////////////////

[SPELL 501]
DEFNAME=s_focus_attack
NAME=Focus Attack
SOUND=snd_ninjitsu_focus_attack
RUNES=
CAST_TIME=
RESOURCES=
RUNE_ITEM=i_rune_focus_attack
SCROLL_ITEM=
FLAGS=
EFFECT_ID=
EFFECT=
DURATION=
MANAUSE=10
SKILLREQ=NINJITSU 30.0
INTERRUPT=0.0,0.0

[SPELL 502]
DEFNAME=s_death_strike
NAME=Death Strike
SOUND=//Scripted because it is different for males and females
RUNES=
CAST_TIME=
RESOURCES=
RUNE_ITEM=i_rune_death_strike
SCROLL_ITEM=0
FLAGS=
EFFECT_ID=
EFFECT=
DURATION=
MANAUSE=30
SKILLREQ=NINJITSU 85.0
INTERRUPT=0.0,0.0
ON=@Success
   IF (<SRC.f_isfemale>)
      SRC.SOUND snd_ninjitsu_deathstrike_f
   ELSE
      SRC.SOUND snd_ninjitsu_deathstrike_m
   ENDIF

[SPELL 503]
DEFNAME=s_animal_form
NAME=Animal Form
SOUND=0
RUNES=
CAST_TIME=
RESOURCES=
RUNE_ITEM=i_rune_animal_form
SCROLL_ITEM=0
FLAGS=
EFFECT_ID=
EFFECT=
DURATION=
MANAUSE=10
SKILLREQ=NINJITSU 0.0
INTERRUPT=0.0,0.0

[SPELL 504]
DEFNAME=s_ki_attack
NAME=Ki Attack
SOUND=snd_ninjitsu_ki_attack
RUNES=
CAST_TIME=
RESOURCES=
RUNE_ITEM=i_rune_ki_attack
SCROLL_ITEM=0
FLAGS=
EFFECT_ID=
EFFECT=
DURATION=
MANAUSE=
SKILLREQ=NINJITSU 0.0
INTERRUPT=0.0,0.0

[SPELL 505]
DEFNAME=s_surprise_attack
NAME=Surprise Attack
SOUND=//Scripted because its different depending on gender
RUNES=
CAST_TIME=
RESOURCES=
RUNE_ITEM=i_rune_suprise_attack
SCROLL_ITEM=0
FLAGS=
EFFECT_ID=
EFFECT=
DURATION=
MANAUSE=20
SKILLREQ=NINJITSU 60.0
INTERRUPT=0.0,0.0
ON=@Success
   IF (<SRC.f_isfemale>)
      SRC.SOUND snd_ninjitsu_suprise_attack_f
   ELSE
      SRC.SOUND snd_ninjitsu_suprise_attack_m
   ENDIF

[SPELL 506]
DEFNAME=s_backstab
NAME=Backstab
SOUND=0
RUNES=
CAST_TIME=
RESOURCES=
RUNE_ITEM=i_rune_backstab
SCROLL_ITEM=0
FLAGS=
EFFECT_ID=
EFFECT=
DURATION=
MANAUSE=30
SKILLREQ=NINJITSU 40.0
INTERRUPT=0.0,0.0

[SPELL 507]
DEFNAME=s_shadowjump
NAME=Shadowjump
SOUND=snd_ninjitsu_shadowjump
RUNES=
CAST_TIME=
RESOURCES=
RUNE_ITEM=i_rune_shadowjump
SCROLL_ITEM=0
FLAGS=
EFFECT_ID=
EFFECT=
DURATION=
MANAUSE=15
SKILLREQ=NINJITSU 50.0
INTERRUPT=0.0,0.0

[SPELL 508]
DEFNAME=s_mirror_image
NAME=Mirror Image
SOUND=snd_ninjitsu_mirror_image
RUNES=
CAST_TIME=
RESOURCES=
RUNE_ITEM=i_rune_mirror_image
SCROLL_ITEM=0
FLAGS=
EFFECT_ID=
EFFECT=
DURATION=
MANAUSE=10
SKILLREQ=NINJITSU 20.0
INTERRUPT=0.0,0.0

/////////////////////////
// Spellweaving Spells //
/////////////////////////

[SPELL 601]
DEFNAME=s_arcane_circle
NAME=Arcane Circle
SOUND=snd_spellweave_arcane_circle
RUNES=//Myrshalee
CAST_TIME=0.5
RESOURCES=
RUNE_ITEM=0
SCROLL_ITEM=i_scroll_arcane_circle
FLAGS=spellflag_disabled|spellflag_good
EFFECT_ID=03779
EFFECT=0
DURATION=0.0
MANAUSE=24
SKILLREQ=SPELLWEAVING 0.1
INTERRUPT=100.0,100.0

[SPELL 602]
DEFNAME=s_gift_of_renewal
NAME=Gift of Renewal
SOUND=snd_spellweave_gift_of_renewal
RUNES=//Olorisstra
CAST_TIME=3.0
RESOURCES=
RUNE_ITEM=0
SCROLL_ITEM=i_scroll_gift_of_renewal
FLAGS=spellflag_disabled|spellflag_good|spellflag_targ_char
EFFECT_ID=0
EFFECT=0
LAYER=layer_spell_gift_of_renewal
DURATION=0.0
MANAUSE=24
SKILLREQ=SPELLWEAVING 0.1
INTERRUPT=100.0,100.0

[SPELL 603]
DEFNAME=s_immolating_weapon
NAME=Immolating Weapon
SOUND=snd_spellweave_immolating_weapon
RUNES=//Thalshara
CAST_TIME=1.0
RESOURCES=
RUNE_ITEM=0
SCROLL_ITEM=i_scroll_immolating_weapon
FLAGS=spellflag_disabled|spellflag_good|spellflag_bless|spellflag_targ_item
EFFECT_ID=0
EFFECT=0
LAYER=LAYER_SPELL_Immolating_Weapon
DURATION=0.0
MANAUSE=26
SKILLREQ=SPELLWEAVING 0.1
INTERRUPT=100.0,100.0

[SPELL 604]
DEFNAME=s_attunement
NAME=Attunement
SOUND=snd_spellweave_attunement
RUNES=//Haeldril
CAST_TIME=1.0
RESOURCES=
RUNE_ITEM=0
SCROLL_ITEM=i_scroll_attunement
FLAGS=spellflag_disabled|spellflag_good|spellflag_bless|spellflag_targ_char
EFFECT_ID=0
EFFECT=0
LAYER=layer_spell_attunement
DURATION=0.0
MANAUSE=26
SKILLREQ=SPELLWEAVING 0.1
INTERRUPT=100.0,100.0

[SPELL 605]
DEFNAME=s_thunderstorm
NAME=Thunderstorm
SOUND=snd_spellweave_thunderstorm
RUNES=//Erelonia
CAST_TIME=1.5
RESOURCES=
RUNE_ITEM=0
SCROLL_ITEM=i_scroll_thunderstorm
FLAGS=spellflag_disabled|spellflag_targ_xyz|spellflag_harm|spellflag_resist
EFFECT_ID=0
EFFECT=0
LAYER=layer_spell_thunderstorm
DURATION=0.0
MANAUSE=32
SKILLREQ=SPELLWEAVING 10.1
INTERRUPT=100.0,100.0

[SPELL 606]
DEFNAME=s_nature_fury
NAME=Nature's Fury
SOUND=snd_spellweave_natures_fury
RUNES=//Rauvvrae
CAST_TIME=1.5
RESOURCES=
RUNE_ITEM=0
SCROLL_ITEM=i_scroll_nature_fury
FLAGS=spellflag_disabled|spellflag_harm|spellflag_targ_xyz|spellflag_playeronly
EFFECT_ID=0
EFFECT=0
DURATION=0.0
MANAUSE=24
SKILLREQ=SPELLWEAVING 0.1
INTERRUPT=100.0,100.0
//snd_spellweave_natures_fury_attack
//snd_spellweave_natures_fury_idle

[SPELL 607]
DEFNAME=s_summon_fey
NAME=Summon Fey
SOUND=0
RUNES=//Alalithra
CAST_TIME=2.0
RESOURCES=
RUNE_ITEM=0
SCROLL_ITEM=i_scroll_summon_fey
FLAGS=spellflag_disabled|spellflag_summon
EFFECT_ID=0
EFFECT=0
LAYER=layer_spell_summon
DURATION=0.0
MANAUSE=31
SKILLREQ=SPELLWEAVING 24.1
INTERRUPT=100.0,100.0

[SPELL 608]
DEFNAME=s_summon_fiend
NAME=Summon Fiend
SOUND=0
RUNES=//Nylisstra
CAST_TIME=2.0
RESOURCES=
RUNE_ITEM=0
SCROLL_ITEM=i_scroll_summon_fiend
FLAGS=spellflag_disabled|spellflag_summon
EFFECT_ID=0
EFFECT=0
LAYER=layer_spell_summon
DURATION=0.0
MANAUSE=31
SKILLREQ=SPELLWEAVING 24.1
INTERRUPT=100.0,100.0

[SPELL 609]
DEFNAME=s_reaper_form
NAME=Reaper Form
SOUND=0
RUNES=//Tarisstree
CAST_TIME=2.5
RESOURCES=
RUNE_ITEM=i_scroll_reaper_form
SCROLL_ITEM=i_scroll_reaper_form
FLAGS=spellflag_good|spellflag_poly
EFFECT_ID=0
EFFECT=0
LAYER=layer_spell_polymorph
DURATION=0.0
MANAUSE=24
SKILLREQ=SPELLWEAVING 34.1
INTERRUPT=100.0,100.0

ON=@Select
   IF (<FLAGS> & statf_polymorph)
    IF (<MANA> < <SERV.SPELL.s_reaper_form.MANAUSE>)
     SYSMESSAGE <DEFMSG.spell_try_nomana>
    ELSE
     MANA -= <SERV.SPELL.s_reaper_form.MANAUSE>
     FINDID.<SERV.SPELL.s_reaper_form.RUNE_ITEM>.REMOVE
    ENDIF
    return 1
   ENDIF

[SPELL 610]
DEFNAME=s_wildfire
NAME=Wildfire
SOUND=snd_spellweave_wildfire
RUNES=//Haelyn
CAST_TIME=2.5
RESOURCES=
RUNE_ITEM=0
SCROLL_ITEM=i_scroll_wildfire
FLAGS=spellflag_disabled|spellflag_field|spellflag_targ_xyz|spellflag_harm
EFFECT_ID=0
EFFECT=0
DURATION=0.0
MANAUSE=34
SKILLREQ=SPELLWEAVING 38.1
INTERRUPT=100.0,100.0

[SPELL 611]
DEFNAME=s_essence_of_wind
NAME=Essence of Wind
SOUND=snd_spellweave_essence_of_wind
RUNES=//Anathrae
CAST_TIME=3.0
RESOURCES=
RUNE_ITEM=0
SCROLL_ITEM=i_scroll_essence_of_wind
FLAGS=spellflag_disabled|spellflag_curse|spellflag_harm|spellflag_resist|spellflag_targ_char
EFFECT_ID=0
EFFECT=0
LAYER=layer_spell_essence_of_wind
DURATION=0.0
MANAUSE=40
SKILLREQ=SPELLWEAVING 52.1
INTERRUPT=100.0,100.0
//snd_spellweave_essence_of_wind_cold

[SPELL 612]
DEFNAME=s_dryad_allure
NAME=Dryad Allure
SOUND=snd_spellweave_dryad_allure
RUNES=//Rathril
CAST_TIME=3.0
RESOURCES=
RUNE_ITEM=0
SCROLL_ITEM=i_scroll_dryad_allure
FLAGS=spellflag_disabled|spellflag_targ_char
EFFECT_ID=0
EFFECT=0
LAYER=layer_spell_dryad_allure
DURATION=0.0
MANAUSE=40
SKILLREQ=SPELLWEAVING 52.1
INTERRUPT=100.0,100.0
//snd_spellweave_dryad_allure_fail

[SPELL 613]
DEFNAME=s_ethereal_voyage
NAME=Ethereal Voyage
SOUND=snd_spellweave_ethereal_voyage
RUNES=//Orlavdra
CAST_TIME=3.5
RESOURCES=
RUNE_ITEM=0
SCROLL_ITEM=i_scroll_ethereal_voyage
FLAGS=spellflag_disabled|spellflag_playeronly|spellflag_bless|spellflag_good
EFFECT_ID=0
EFFECT=0
LAYER=layer_spell_ethereal_voyage
DURATION=0.0
MANAUSE=60
SKILLREQ=SPELLWEAVING 66.1
INTERRUPT=100.0,100.0

[SPELL 614]
DEFNAME=s_word_of_death
NAME=Word of Death
SOUND=0
RUNES=//Nyraxle
CAST_TIME=3.5
RESOURCES=
RUNE_ITEM=0
SCROLL_ITEM=i_scroll_word_of_death
FLAGS=spellflag_disabled|spellflag_playeronly|spellflag_targ_xyz|spellflag_area|spellflag_harm
EFFECT_ID=0
EFFECT=0
DURATION=0.0
MANAUSE=60
SKILLREQ=SPELLWEAVING 66.1
INTERRUPT=100.0,100.0

[SPELL 615]
DEFNAME=s_gift_of_life
NAME=Gift of Life
SOUND=0
RUNES=//Illorae
CAST_TIME=4.0
RESOURCES=
RUNE_ITEM=0
SCROLL_ITEM=i_scroll_gift_of_life
FLAGS=spellflag_disabled|spellflag_good|spellflag_bless
EFFECT_ID=0
EFFECT=0
LAYER=layer_spell_gift_of_life
DURATION=0.0
MANAUSE=70
SKILLREQ=SPELLWEAVING 80.1
INTERRUPT=100.0,100.0

[SPELL 616]
DEFNAME=s_arcane_empowerment
NAME=Arcane Empowerment
SOUND=snd_spellweave_arcane_empowerment
RUNES=//Aslavdra
CAST_TIME=4.0
RESOURCES=
RUNE_ITEM=0
SCROLL_ITEM=i_scroll_arcane_empowerment
FLAGS=spellflag_disabled|spellflag_targ_char|spellflag_good|spellflag_bless
EFFECT_ID=0
EFFECT=0
LAYER=layer_spell_arcane_empowerment
DURATION=0.0
MANAUSE=70
SKILLREQ=SPELLWEAVING 80.1
INTERRUPT=100.0,100.0
//snd_spellweave_arcane_empowerment_end


//////////////////////
// Mysticism Spells //
//////////////////////

[SPELL 678]
// deals damage to target
DEFNAME=s_Nether_Bolt
NAME=Nether Bolt
CAST_TIME=1.0
RUNES=ICY
RESOURCES=i_reag_black_pearl, i_reag_sulfur_ash
FLAGS=SPELLFLAG_TARG_CHAR | SPELLFLAG_DIR_ANIM | SPELLFLAG_HARM
RUNE_ITEM=//i_rune_NETHER_BOLT
SCROLL_ITEM=i_scroll_NETHER_BOLT
EFFECT_ID=0
EFFECT=5,15
DURATION=0.0
MANAUSE=4
SKILLREQ=MYSTICISM 10.0
INTERRUPT=100.0,100.0

[SPELL 679]
// conjures healing stone to heal caster when used
DEFNAME=s_Healing_Stone
NAME=Healing Stone
CAST_TIME=1.0
RUNES=KIM
RESOURCES=i_reag_bone, i_reag_garlic, i_reag_ginseng, i_reag_spider_silk
FLAGS=0
RUNE_ITEM=//i_rune_HEALING_STONE
SCROLL_ITEM=i_scroll_HEALING_STONE
EFFECT_ID=i_fx_HEAL_EFFECT
EFFECT=5,20
DURATION=0.0
MANAUSE=4
SKILLREQ=MYSTICISM 10.0
INTERRUPT=100.0,100.0

[SPELL 680]
// dispels beneficial spell from target
DEFNAME=s_Purge_Magic
NAME=Healing Stone
CAST_TIME=1.0
RUNES=AOS
RESOURCES=i_reag_fertile_dirt, i_reag_garlic, i_reag_mandrake_root, i_reag_sulfur_ash
FLAGS=SPELLFLAG_TARG_CHAR | SPELLFLAG_DIR_ANIM | SPELLFLAG_HARM
RUNE_ITEM=//i_rune_PURGE_MAGIC
SCROLL_ITEM=i_scroll_PURGE_MAGIC
EFFECT_ID=i_fx_curse
EFFECT=3,15
DURATION=0.0
MANAUSE=6
SKILLREQ=MYSTICISM 8.0
INTERRUPT=100.0,100.0

[SPELL 681]
// enchants weapon with selected spell
DEFNAME=s_Enchant_Weapon
NAME=Enchant
CAST_TIME=1.0
RUNES=IOY
RESOURCES=i_reag_spider_silk, i_reag_mandrake_root, i_reag_sulfur_ash
FLAGS=SPELLFLAG_TARG_ITEM
RUNE_ITEM=//i_rune_ENCHANT
SCROLL_ITEM=i_scroll_ENCHANT
EFFECT_ID=0
EFFECT=3,15
DURATION=45.0,60.0
MANAUSE=6
SKILLREQ=MYSTICISM 8.0
INTERRUPT=100.0,100.0

[SPELL 682]
// sends target to sleep (unable to attack or cast, slow movement)
DEFNAME=s_Sleep
NAME=Sleep
CAST_TIME=1.0
RUNES=IZ
RESOURCES=i_reag_nightshade, i_reag_spider_silk, i_reag_black_pearl
FLAGS=SPELLFLAG_TARG_CHAR | SPELLFLAG_DIR_ANIM | SPELLFLAG_HARM
RUNE_ITEM=//i_rune_SLEEP
SCROLL_ITEM=i_scroll_SLEEP
EFFECT_ID=i_fx_curse
EFFECT=5,30
LAYER=layer_spell_sleep
DURATION=45.0,60.0
MANAUSE=9
SKILLREQ=MYSTICISM 20.0
INTERRUPT=100.0,100.0

[SPELL 683]
// summons an eagle
DEFNAME=s_Eagle_Strike
NAME=Eagle Strike
CAST_TIME=1.0
RUNES=KPZ
RESOURCES=i_reag_blood_moss, i_reag_bone, i_reag_spider_silk, i_reag_mandrake_root
FLAGS=SPELLFLAG_TARG_CHAR | SPELLFLAG_DIR_ANIM | SPELLFLAG_HARM
RUNE_ITEM=//i_rune_EAGLE_STRIKE
SCROLL_ITEM=i_scroll_EAGLE_STRIKE
EFFECT_ID=0
EFFECT=5,30
DURATION=0.0
MANAUSE=9
SKILLREQ=MYSTICISM 20.0
INTERRUPT=100.0,100.0

[SPELL 684]
// summons an animated weapon to automatically fight
DEFNAME=s_Animated_Weapon
NAME=Animated Weapon
CAST_TIME=1.0
RUNES=IJPY
RESOURCES=i_reag_bone, i_reag_black_pearl, i_reag_mandrake_root, i_reag_nightshade
FLAGS=SPELLFLAG_SUMMON
RUNE_ITEM=//i_rune_ANIMATED_WEAPON
SCROLL_ITEM=i_scroll_ANIMATED_WEAPON
EFFECT_ID=0
EFFECT=5,30
LAYER=layer_spell_summon
DURATION=45.0,60.0
MANAUSE=11
SKILLREQ=MYSTICISM 33.0
INTERRUPT=100.0,100.0

[SPELL 685]
// improves caster physical stats and armour, reduces movement/casting/attack speed
DEFNAME=s_Stone_Form
NAME=Stone Form
CAST_TIME=1.0
RUNES=IRY
RESOURCES=i_reag_blood_moss, i_reag_fertile_dirt, i_reag_garlic
FLAGS=spellflag_poly|spellflag_good
RUNE_ITEM=i_scroll_STONE_FORM//i_rune_STONE_FORM
SCROLL_ITEM=i_scroll_STONE_FORM
EFFECT_ID=0
EFFECT=5,30
LAYER=layer_spell_polymorph
DURATION=45.0,60.0
MANAUSE=11
SKILLREQ=MYSTICISM 33.0
INTERRUPT=100.0,100.0

ON=@Select
   IF (<FLAGS> & statf_polymorph)
    IF (<MANA> < <SERV.SPELL.s_Stone_Form.MANAUSE>)
     SYSMESSAGE <DEFMSG.spell_try_nomana>
    ELSE
     MANA -= <SERV.SPELL.s_Stone_Form.MANAUSE>
     FINDID.<SERV.SPELL.s_Stone_Form.RUNE_ITEM>.REMOVE
    ENDIF
    return 1
   ENDIF

[SPELL 686]
// charges a spell stone with a selected spell, to be instantly cast when used
DEFNAME=s_Spell_Trigger
NAME=Spell Trigger
CAST_TIME=1.0
RUNES=IVOE
RESOURCES=i_reag_dragon_blood, i_reag_garlic, i_reag_mandrake_root, i_reag_spider_silk
FLAGS=SPELLFLAG_TARG_ITEM
RUNE_ITEM=//i_rune_SPELL_TRIGGER
SCROLL_ITEM=i_scroll_SPELL_TRIGGER
EFFECT_ID=0
EFFECT=5,30
DURATION=0.0
MANAUSE=14
SKILLREQ=MYSTICISM 45.0
INTERRUPT=100.0,100.0

[SPELL 687]
// area-effect sleep
DEFNAME=s_Mass_Sleep
NAME=Mass Sleep
CAST_TIME=1.0
RUNES=VZ
RESOURCES=i_reag_ginseng, i_reag_nightshade, i_reag_spider_silk
FLAGS=0
RUNE_ITEM=//i_rune_MASS_SLEEP
SCROLL_ITEM=i_scroll_MASS_SLEEP
EFFECT_ID=0
EFFECT=5,30
LAYER=layer_spell_sleep
DURATION=0.0
MANAUSE=14
SKILLREQ=MYSTICISM 45.0
INTERRUPT=100.0,100.0

[SPELL 688]
// cure, remove curse and heal target
DEFNAME=s_Cleansing_Winds
NAME=Cleansing Winds
CAST_TIME=1.0
RUNES=IVMH
RESOURCES=i_reag_dragon_blood, i_reag_garlic, i_reag_ginseng, i_reag_mandrake_root
FLAGS=SPELLFLAG_TARG_CHAR | SPELLFLAG_DIR_ANIM
RUNE_ITEM=//i_rune_CLEANSING_WINDS
SCROLL_ITEM=i_scroll_CLEANSING_WINDS
EFFECT_ID=i_fx_HEAL_EFFECT
EFFECT=5,30
DURATION=0.0
MANAUSE=20
SKILLREQ=MYSTICISM 58.0
INTERRUPT=100.0,100.0

[SPELL 689]
// damages target, chance to knockback/stun
DEFNAME=s_Bombard
NAME=Bombard
CAST_TIME=1.0
RUNES=CPY
RESOURCES=i_reag_blood_moss, i_reag_dragon_blood, i_reag_garlic, i_reag_sulfur_ash
FLAGS=SPELLFLAG_TARG_CHAR | SPELLFLAG_DIR_ANIM | SPELLFLAG_HARM
RUNE_ITEM=//i_rune_BOMBARD
SCROLL_ITEM=i_scroll_BOMBARD
EFFECT_ID=0
EFFECT=5,30
LAYER=layer_spell_bombard
DURATION=0.0
MANAUSE=20
SKILLREQ=MYSTICISM 58.0
INTERRUPT=100.0,100.0

[SPELL 690]
// area of effect, affected targets receive damage when dealing damage (attack/spell)
DEFNAME=s_Spell_Plague
NAME=Spell Plague
CAST_TIME=1.0
RUNES=VRJO
RESOURCES=i_reag_daemon_bone, i_reag_dragon_blood, i_reag_nightshade, i_reag_sulfur_ash
FLAGS=SPELLFLAG_HARM
RUNE_ITEM=//i_rune_SPELL_PLAGUE
SCROLL_ITEM=i_scroll_SPELL_PLAGUE
EFFECT_ID=0
EFFECT=5,30
LAYER=layer_spell_spell_plague
DURATION=0.0
MANAUSE=40
SKILLREQ=MYSTICISM 70.0
INTERRUPT=100.0,100.0

[SPELL 691]
// area of effect, deals damage
DEFNAME=s_Hail_Storm
NAME=Hail Storm
CAST_TIME=1.0
RUNES=KDY
RESOURCES=i_reag_dragon_blood, i_reag_blood_moss, i_reag_black_pearl, i_reag_mandrake_root
FLAGS=SPELLFLAG_HARM
RUNE_ITEM=//i_rune_HAIL_STORM
SCROLL_ITEM=i_scroll_HAIL_STORM
EFFECT_ID=0
EFFECT=5,30
DURATION=0.0
MANAUSE=40
SKILLREQ=MYSTICISM 70.0
INTERRUPT=100.0,100.0

[SPELL 692]
// area of effect, deals damage and reduces mana/stamina
DEFNAME=s_Nether_Cyclone
NAME=Nether Cyclone
CAST_TIME=1.0
RUNES=GH
RESOURCES=i_reag_mandrake_root, i_reag_nightshade, i_reag_sulfur_ash, i_reag_blood_moss
FLAGS=SPELLFLAG_HARM
RUNE_ITEM=//i_rune_NETHER_CYCLONE
SCROLL_ITEM=i_scroll_NETHER_CYCLONE
EFFECT_ID=0
EFFECT=5,30
LAYER=layer_spell_nether_cyclone
DURATION=30.0,.45.0
MANAUSE=50
SKILLREQ=MYSTICISM 83.0
INTERRUPT=100.0,100.0

[SPELL 693]
// summons colossal stone titan
DEFNAME=s_Rising_Colossus
NAME=Rising Collossus
CAST_TIME=1.0
RUNES=KVXCP
RESOURCES=i_reag_daemon_bone, i_reag_dragon_blood, i_reag_fertile_dirt, i_reag_nightshade
FLAGS=SPELLFLAG_SUMMON
RUNE_ITEM=//i_rune_RISING_COLOSSUS
SCROLL_ITEM=i_scroll_RISING_COLOSSUS
EFFECT_ID=0
EFFECT=5,30
DURATION=30.0,.45.0
MANAUSE=50
SKILLREQ=MYSTICISM 83.0
INTERRUPT=100.0,100.0

/////////////////
// Bard spells //
/////////////////

[SPELL 701]
DEFNAME=s_inspire
NAME=Inspire
SOUND=0
RUNES=
CAST_TIME=
RESOURCES=
RUNE_ITEM=0
SCROLL_ITEM=0
FLAGS=
EFFECT_ID=
EFFECT=
DURATION=
MANAUSE=16
SKILLREQ=Provocation 90.0
INTERRUPT=0.0,0.0

[SPELL 702]
DEFNAME=s_invigorate
NAME=Invigorate
SOUND=0
RUNES=
CAST_TIME=
RESOURCES=
RUNE_ITEM=0
SCROLL_ITEM=0
FLAGS=
EFFECT_ID=
EFFECT=
DURATION=
MANAUSE=22
SKILLREQ=Provocation 90.0
INTERRUPT=0.0,0.0

[SPELL 703]
DEFNAME=s_resilience
NAME=Resilience
SOUND=0
RUNES=
CAST_TIME=
RESOURCES=
RUNE_ITEM=0
SCROLL_ITEM=0
FLAGS=
EFFECT_ID=
EFFECT=
DURATION=
MANAUSE=16
SKILLREQ=Peacemaking 90.0
INTERRUPT=0.0,0.0

[SPELL 704]
DEFNAME=s_perseverance
NAME=Perseverance
SOUND=0
RUNES=
CAST_TIME=
RESOURCES=
RUNE_ITEM=0
SCROLL_ITEM=0
FLAGS=
EFFECT_ID=
EFFECT=
DURATION=
MANAUSE=18
SKILLREQ=Peacemaking 90.0
INTERRUPT=0.0,0.0

[SPELL 705]
DEFNAME=s_tribulation
NAME=Tribulation
SOUND=0
RUNES=
CAST_TIME=
RESOURCES=
RUNE_ITEM=0
SCROLL_ITEM=0
FLAGS=
EFFECT_ID=
EFFECT=
DURATION=
MANAUSE=24
SKILLREQ=Enticement 90.0
INTERRUPT=0.0,0.0

[SPELL 706]
DEFNAME=s_despair
NAME=Despair
SOUND=0
RUNES=
CAST_TIME=
RESOURCES=
RUNE_ITEM=0
SCROLL_ITEM=0
FLAGS=
EFFECT_ID=
EFFECT=
DURATION=
MANAUSE=26
SKILLREQ=Enticement 90.0
INTERRUPT=0.0,0.0

[EOF]
