{
		object oTarget = 	GetSpellTarget(OBJECT_SELF);
	
    		effect eLink1, eLink2;
    		effect eInvalid;

    		SWFP_SHAPE = SHAPE_SPHERE;
            SWFP_HARMFUL = FALSE;

		JD_RemoveRelatedPowers( oTarget, JD_PREP );
            JD_ForcePowerCost( OBJECT_SELF, GetSpellId(), TRUE);		
            if( GetSpellId() == JD_REZ_SUP_MSTR )
            {			
			#include "jd_rez_sup_mstr"
            }
            if( ( ( GetSpellId() == JD_REZ_SUP_MSTR ) && ( GetSpellAcquired( JD_PREP_SUP_MSTR ) ) ) || ( GetSpellId() == JD_PREP_SUP_MSTR ) )
            {			
			#include "jd_prep_6"
            }
		else if( ( ( GetSpellId() == JD_REZ_SUP_MSTR ) && ( GetSpellAcquired( JD_PREP_SUP_IMP ) ) ) || ( GetSpellId() == JD_PREP_SUP_IMP ) )
		{
	           	#include "jd_prep_5"
		}
		else if( ( ( GetSpellId() == JD_REZ_SUP_MSTR ) && ( GetSpellAcquired( JD_PREP_SUP  ) ) ) || ( GetSpellId() == JD_PREP_SUP ) )
       	{	
			#include "jd_prep_4"
 		}
		else if( ( ( GetSpellId() == JD_REZ_SUP_MSTR ) && ( GetSpellAcquired( JD_PREP_MSTR  ) ) ) || ( GetSpellId() == JD_PREP_MSTR ) )
       	{	
			#include "jd_prep_3"
 		}
		else if( ( ( GetSpellId() == JD_REZ_SUP_MSTR ) && ( GetSpellAcquired( JD_PREP_IMP  ) ) ) || ( GetSpellId() == JD_PREP_IMP ) )
       	{	
			#include "jd_prep_2"
 		}
		else if( ( ( GetSpellId() == JD_REZ_SUP_MSTR ) && ( GetSpellAcquired( JD_PREP  ) ) ) || ( GetSpellId() == JD_PREP ) )
       	{	
			#include "jd_prep_1"
 		}
            if( GetSpellAcquired( JD_PROTECT_MSTR ) )
		{	
			#include "jd_protect_mstr"			
            }
            else if( GetSpellAcquired( JD_PROTECT_IMP ) )
            {
			#include "jd_protect_imp"
            }
            else if( GetSpellAcquired( JD_PROTECT ) ) 
            {
			#include "jd_protect"
		}
            if( GetSpellAcquired( JD_RAGE_MSTR ) )
		{	
			#include "jd_rage_mstr"			
            } 
            else if( GetSpellAcquired( JD_RAGE_IMP ) )
            {
			#include "jd_rage_imp"
            }
            else if( GetSpellAcquired( JD_RAGE ) ) 
            {
			#include "jd_rage"
            }
            if( GetSpellAcquired( JD_RECK_MSTR ) )
            {
			#include "jd_reck_mstr"			
            }
            else if( GetSpellAcquired( JD_RECK_IMP ) )
            {
			#include "jd_reck_imp"
            }
            else if( GetSpellAcquired( JD_RECK ) ) 
            {
			#include "jd_reck"
            }
            if( GetSpellAcquired( JD_MSTR_DEMO ) )
            {
			#include "jd_demo_mstr"			
            }
            else if( GetSpellAcquired( JD_IMP_DEMO ) )
            {
			#include "jd_demo_imp"
            }
            else if( GetSpellAcquired( JD_DEMO ) ) 
            {
			#include "jd_demo"
            }
            if( GetSpellAcquired( JD_MSTR_AWARE ) ) 
            { 
			#include "jd_aware_mstr"			
            }
            else if( GetSpellAcquired( JD_IMP_AWARE ) )
            {
			#include "jd_aware_imp"
            }
            else if( GetSpellAcquired( JD_AWARE ) ) 
            {
			#include "jd_aware" 
            }
            if( GetSpellAcquired( JD_MSTR_COMP ) ) 
            {
			#include "jd_comp_mstr"			
            }
            else if( GetSpellAcquired( JD_IMP_COMP ) )
            {
			#include "jd_comp_imp"
            }
            else if( GetSpellAcquired( JD_COMP ) )
            {
			#include "jd_comp"
            }
            if( GetSpellAcquired( JD_MSTR_PERS ) ) 
            {
			#include "jd_pers_mstr"			
            }
            else if( GetSpellAcquired( JD_IMP_PERS ) )
            {
			#include "jd_pers_imp"
            }
            else if( GetSpellAcquired( JD_PERS ) )
            {
			#include "jd_pers" 
            }
            if( GetSpellAcquired( JD_MSTR_REPAIR ) )
            {
			#include "jd_repair_mstr"			
            }
            else if( GetSpellAcquired( JD_IMP_REPAIR ) )
            {
			#include "jd_repair_imp"
            }
            else  if( GetSpellAcquired( JD_REPAIR ) )
            {
			#include "jd_repair" 
            }
            if( GetSpellAcquired( JD_MSTR_SECURITY ) )
            {
			#include "jd_secure_mstr"			
            }
            else if( GetSpellAcquired( JD_IMP_SECURITY ) )
            {
			#include "jd_secure_imp"
            }
            else if( GetSpellAcquired( JD_SECURITY ) ) 
            {
			#include "jd_secure"  
            }
            if( GetSpellAcquired( JD_MSTR_STEALTH ) )
            { 
			#include "jd_stealth_mstr"			
            }
            else if( GetSpellAcquired( JD_IMP_STEALTH ) )
            {
			#include "jd_stealth_imp"
            }
            else if( GetSpellAcquired( JD_STEALTH ) ) 
            {
			#include "jd_stealth"
            }
            if( GetSpellAcquired( JD_MSTR_TREAT_INJURY ) )
            {
			#include "jd_treat_inj_mstr" 		
            }
            else if( GetSpellAcquired( JD_IMP_TREAT_INJURY ) )
            {
			#include "jd_treat_inj_imp"
            }
            else if( GetSpellAcquired( JD_TREAT_INJURY ) )  
            {
			#include "jd_treat_inj"	
            }
            if( GetSpellAcquired( FORCE_POWER_SPEED_MASTERY ) )
            {
			#include "jd_speed_mstr"			
            } 
            else if( GetSpellAcquired( FORCE_POWER_KNIGHT_SPEED ) )
            {
			#include "jd_speed_imp"
            }
            else if( GetSpellAcquired( FORCE_POWER_SPEED_BURST ) ) 
            {
			#include "jd_speed"
            }
            if( GetSpellAcquired( FORCE_POWER_FORCE_ARMOR ) ) 
            {
			#include "jd_aura_mstr"
            } 
            else if( GetSpellAcquired( FORCE_POWER_FORCE_SHIELD ) ) 
            { 
			#include "jd_aura_imp"
            }
            else if( GetSpellAcquired( FORCE_POWER_FORCE_AURA ) ) 
            {
			#include "jd_aura"
            }
            if( GetSpellAcquired( FORCE_POWER_MIND_MASTERY ) ) 
            {
			#include "jd_valor_mstr"
            }
            else if( GetSpellAcquired( FORCE_POWER_KNIGHT_MIND ) ) 
            {
			#include "jd_valor_imp"
            } 
            else if( GetSpellAcquired( FORCE_POWER_FORCE_MIND ) ) 
            { 
			#include "jd_valor"
            } 
            if( GetSpellAcquired( FORCE_POWER_MASTER_ENERGY_RESISTANCE ) ) 
            {
			#include "jd_resist_mstr"
            }
            else if( GetSpellAcquired( FORCE_POWER_RESIST_COLD_HEAT_ENERGY ) ) 
            {  
			#include "jd_resist_imp"
            }
            else if( GetSpellAcquired( FORCE_POWER_RESIST_POISON_DISEASE_SONIC ) ) 
            {
			#include "jd_resist"
            }
            if( GetSpellAcquired( FORCE_POWER_MASTER_FORCE_BARRIER ) ) 
            {
			#include "jd_barrier_mstr"
            }
            else if( GetSpellAcquired( FORCE_POWER_IMPROVED_FORCE_BARRIER ) ) 
            {
			#include "jd_barrier_imp"
            } 
            else if( GetSpellAcquired( FORCE_POWER_FORCE_BARRIER ) ) 
            { 
			#include "jd_barrier"
            }
            if( GetSpellAcquired( FORCE_POWER_MASTER_BATTLE_MEDITATION_PC ) ) 
            {
			#include "jd_battle_pc_mstr"
            } 
            else if( GetSpellAcquired( FORCE_POWER_IMPROVED_BATTLE_MEDITATION_PC ) ) 
            {
			#include "jd_battle_pc_imp"
            } 
            else if( GetSpellAcquired( FORCE_POWER_BATTLE_MEDITATION_PC ) ) 
            {
			#include "jd_battle_pc"
            }
            if( GetSpellAcquired( FORCE_POWER_FORCE_IMMUNITY ) ) 
            {  
			#include "jd_forceresist_imp"
            }   
            else if( GetSpellAcquired( FORCE_POWER_RESIST_FORCE ) ) 
            {  
			#include "jd_forceresist"
            } 
            if( GetSpellAcquired( FORCE_POWER_INSPIRE_FOLLOWERS_VI ) ) 
            {
			#include "jd_inspire_6"
            }
            else if( GetSpellAcquired( FORCE_POWER_INSPIRE_FOLLOWERS_V ) ) 
            {
			#include "jd_inspire_5"
            }
            else if( GetSpellAcquired( FORCE_POWER_INSPIRE_FOLLOWERS_IV ) ) 
            {
			#include "jd_inspire_4"
            } 
            else if( GetSpellAcquired( FORCE_POWER_INSPIRE_FOLLOWERS_III ) ) 
            {   
			#include "jd_inspire_3"
            }
            else if( GetSpellAcquired( FORCE_POWER_INSPIRE_FOLLOWERS_II ) ) 
            {
			#include "jd_inspire_2"
            }
            else if( GetSpellAcquired( FORCE_POWER_INSPIRE_FOLLOWERS_I ) ) 
            {
			#include "jd_inspire_1"
            }
            if( GetSpellAcquired( FORCE_POWER_MASTER_FORCE_BODY ) ) 
            {
			#include "jd_force_body_mstr"
            }
            else if( GetSpellAcquired( FORCE_POWER_IMPROVED_FORCE_BODY ) ) 
            {
			#include "jd_force_body_imp"
            }
            else if( GetSpellAcquired( FORCE_POWER_FORCE_BODY ) ) 
            {
			#include "jd_force_body"
            } 
}