class 1 raid_boss_type1 : raid_boss_alone
{
parameter:
	int	PhysicalSpecial_a = -1;
	int	SelfRangePhysicalSpecial_a = -1;
	int	SelfBuff_a = -1;
	int	SelfRangeCancel_a = -1;

handler:
	EventHandler TIMER_FIRED_EX(timer_id)
	{
		if( timer_id == 1001 )
		{
			if( gg::Rand(5) < 1 )
			{
				myself::AddUseSkillDesire(myself.sm,SelfBuff_a,1,1,1000000);
			}
		}
		super;
	}

	EventHandler ATTACKED(attacker,damage)
	{
		if( attacker.is_pc != 0 || myself::IsInCategory(11,attacker.npc_class_id) )
		{
			if( attacker == myself.top_desire_target && gg::Rand(15) < 1 )
			{
				myself::AddUseSkillDesire(attacker,PhysicalSpecial_a,0,1,1000000);
			}
			if( attacker != myself.top_desire_target && myself::DistFromMe(attacker) < 150 && gg::Rand(( 25 * 15 )) < 1 )
			{
				myself::AddUseSkillDesire(myself.sm,SelfRangePhysicalSpecial_a,0,1,1000000);
			}
			if( myself::DistFromMe(attacker) < 150 && gg::Rand(( 50 * 15 )) < 1 )
			{
				myself::AddUseSkillDesire(myself.sm,SelfRangeCancel_a,0,1,1000000);
			}
		}
		super;
	}

	EventHandler SEE_SPELL(speller,skill_name_id)
	{
		if( speller == myself.top_desire_target && gg::Rand(15) < 1 )
		{
			myself::AddUseSkillDesire(speller,PhysicalSpecial_a,0,1,1000000);
		}
		if( speller != myself.top_desire_target && myself::DistFromMe(speller) < 150 && gg::Rand(( 25 * 15 )) < 1 )
		{
			myself::AddUseSkillDesire(myself.sm,SelfRangePhysicalSpecial_a,0,1,1000000);
		}
		if( myself::DistFromMe(speller) < 150 && gg::Rand(( 50 * 15 )) < 1 )
		{
			myself::AddUseSkillDesire(myself.sm,SelfRangeCancel_a,0,1,1000000);
		}
		super;
	}

}
