class 1 ai_gludio_wizard_stand : default_npc
{
parameter:
	float	Attack_DecayRatio = 6.600000;
	float	UseSkill_DecayRatio = 66000.000000;
	float	Attack_BoostValue = 500.000000;
	float	UseSkill_BoostValue = 100000.000000;
	int	DDMagic = 1024257;

handler:
	EventHandler NO_DESIRE()
	{
		myself::AddDoNothingDesire(40,20);
	}

	EventHandler SEE_CREATURE(creature)
	{
		if( myself::IsInCategory(11,creature.npc_class_id) != 0 && myself::Castle_GetPledgeState(creature.master) == 2 )
		{
		}
		else if( myself::Castle_GetPledgeState(creature) != 2 )
		{
			if( myself::Skill_GetConsumeMP(DDMagic) < myself.sm.mp && myself::Skill_GetConsumeHP(DDMagic) < myself.sm.hp && myself::Skill_InReuseDelay(DDMagic) == 0 )
			{
				myself::AddUseSkillDesire(creature,DDMagic,0,0,1000000);
			}
		}
	}

	EventHandler CLAN_ATTACKED(attacker,damage)
	{
		if( myself::IsInCategory(11,attacker.npc_class_id) != 0 && myself::Castle_GetPledgeState(attacker.master) == 2 )
		{
		}
		else if( myself::Castle_GetPledgeState(attacker) != 2 )
		{
			if( ( attacker.is_pc != 0 || myself::IsInCategory(11,attacker.npc_class_id) ) && gg::Rand(100) < 10 )
			{
				if( myself::Skill_GetConsumeMP(DDMagic) < myself.sm.mp && myself::Skill_GetConsumeHP(DDMagic) < myself.sm.hp && myself::Skill_InReuseDelay(DDMagic) == 0 )
				{
					myself::AddUseSkillDesire(attacker,DDMagic,0,0,1000000);
				}
			}
		}
	}

}
