class 1 raid_boss_type6 : raid_boss_alone
{
parameter:
	int	SelfRangeDDMagic = 1032449;

handler:
	EventHandler ATTACKED(attacker,damage)
	{
		if( attacker.is_pc != 0 || myself::IsInCategory(11,attacker.npc_class_id) )
		{
			if( attacker != myself.top_desire_target && myself::DistFromMe(attacker) < 150 && gg::Rand(100) < 50 )
			{
				if( myself::Skill_GetConsumeMP(SelfRangeDDMagic) < myself.sm.mp && myself::Skill_GetConsumeHP(SelfRangeDDMagic) < myself.sm.hp && myself::Skill_InReuseDelay(SelfRangeDDMagic) == 0 )
				{
					myself::AddUseSkillDesire(myself.sm,SelfRangeDDMagic,0,1,1000000);
				}
			}
		}
		super;
	}

	EventHandler SEE_SPELL(speller,skill_name_id)
	{
		if( speller != myself.top_desire_target && myself::DistFromMe(speller) < 150 && gg::Rand(100) < 50 )
		{
			if( myself::Skill_GetConsumeMP(SelfRangeDDMagic) < myself.sm.mp && myself::Skill_GetConsumeHP(SelfRangeDDMagic) < myself.sm.hp && myself::Skill_InReuseDelay(SelfRangeDDMagic) == 0 )
			{
				myself::AddUseSkillDesire(myself.sm,SelfRangeDDMagic,0,1,1000000);
			}
		}
		super;
	}

}
