class 1 ai_gludio_stand : default_npc
{
parameter:
	float	Attack_DecayRatio = 6.600000;
	float	UseSkill_DecayRatio = 66000.000000;
	float	Attack_BoostValue = 500.000000;
	float	UseSkill_BoostValue = 100000.000000;

handler:
	EventHandler CREATED()
	{
		myself.attack_tick = 200;
	}

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

	EventHandler ATTACKED(attacker,damage)
	{
		if( attacker.z > ( myself.sm.z + 100 ) )
		{
		}
		else 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) )
			{
				myself::AddAttackDesire(attacker,0,( ( ( damage / myself.sm.max_hp ) / 0.050000 ) * 100 ));
			}
		}
	}

	EventHandler CLAN_ATTACKED(attacker,victim,damage)
	{
		if( victim.z > ( myself.sm.z + 100 ) )
		{
		}
		else 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) )
			{
				myself::AddAttackDesire(attacker,0,( ( ( damage / myself.sm.max_hp ) / 0.050000 ) * 50 ));
			}
		}
	}

	EventHandler STATIC_OBJECT_CLAN_ATTACKED(attacker,damage)
	{
		if( attacker.npc_class_id == 1014737 )
		{
			if( gg::Rand(100) < 10 )
			{
				myself::AddAttackDesire(attacker.master,0,5000.000000);
			}
			else
			{
				myself::AddAttackDesire(attacker,0,1000.000000);
			}
		}
		else if( myself::Castle_GetPledgeState(attacker) != 2 )
		{
			if( attacker.is_pc != 0 || myself::IsInCategory(11,attacker.npc_class_id) )
			{
				myself::AddAttackDesire(attacker,0,( ( ( damage / myself.sm.max_hp ) / 0.050000 ) * 50 ));
			}
		}
	}

	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 )
		{
			myself::AddAttackDesire(creature,0,200);
		}
	}

	EventHandler SEE_SPELL(speller,skill_name_id,target)
	{
		if( myself::IsInCategory(11,speller.npc_class_id) != 0 && myself::Castle_GetPledgeState(speller.master) == 2 )
		{
		}
		else if( myself::Castle_GetPledgeState(speller) != 2 )
		{
			if( myself::Skill_GetEffectPoint(skill_name_id) > 0 )
			{
				myself::AddAttackDesire(speller,0,( ( ( myself::Skill_GetEffectPoint(skill_name_id) / myself.sm.max_hp ) / 0.050000 ) * 150 ));
			}
		}
	}

}
